/*! For license information please see application-88deec29c5f53f1c79d5.js.LICENSE.txt */
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/packs/",n(n.s=1651)}([function(t,e,n){"use strict";t.exports=n(631)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(228);function i(t,e,n){return(e=Object(r.a)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";n.r(e),function(t,r){n.d(e,"addDisposer",(function(){return Y})),n.d(e,"addMiddleware",(function(){return kt})),n.d(e,"applyAction",(function(){return _t})),n.d(e,"applyPatch",(function(){return w})),n.d(e,"applySnapshot",(function(){return P})),n.d(e,"cast",(function(){return Q})),n.d(e,"castFlowReturn",(function(){return Le})),n.d(e,"castToReferenceSnapshot",(function(){return et})),n.d(e,"castToSnapshot",(function(){return tt})),n.d(e,"clone",(function(){return q})),n.d(e,"createActionTrackingMiddleware",(function(){return gt})),n.d(e,"createActionTrackingMiddleware2",(function(){return vt})),n.d(e,"decorate",(function(){return It})),n.d(e,"destroy",(function(){return W})),n.d(e,"detach",(function(){return H})),n.d(e,"escapeJsonPath",(function(){return De})),n.d(e,"flow",(function(){return Ie})),n.d(e,"getChildType",(function(){return b})),n.d(e,"getEnv",(function(){return Z})),n.d(e,"getIdentifier",(function(){return B})),n.d(e,"getLivelinessChecking",(function(){return u})),n.d(e,"getMembers",(function(){return J})),n.d(e,"getNodeId",(function(){return nt})),n.d(e,"getParent",(function(){return k})),n.d(e,"getParentOfType",(function(){return L})),n.d(e,"getPath",(function(){return M})),n.d(e,"getPathParts",(function(){return R})),n.d(e,"getPropertyMembers",(function(){return $})),n.d(e,"getRelativePath",(function(){return V})),n.d(e,"getRoot",(function(){return j})),n.d(e,"getRunningActionContext",(function(){return jt})),n.d(e,"getSnapshot",(function(){return C})),n.d(e,"getType",(function(){return v})),n.d(e,"hasParent",(function(){return T})),n.d(e,"hasParentOfType",(function(){return I})),n.d(e,"isActionContextChildOf",(function(){return Rt})),n.d(e,"isActionContextThisOrChildOf",(function(){return Nt})),n.d(e,"isAlive",(function(){return X})),n.d(e,"isArrayType",(function(){return Je})),n.d(e,"isFrozenType",(function(){return Nn})),n.d(e,"isIdentifierType",(function(){return Zn})),n.d(e,"isLateType",(function(){return jn})),n.d(e,"isLiteralType",(function(){return bn})),n.d(e,"isMapType",(function(){return Xe})),n.d(e,"isModelType",(function(){return an})),n.d(e,"isOptionalType",(function(){return Cn})),n.d(e,"isPrimitiveType",(function(){return gn})),n.d(e,"isProtected",(function(){return S})),n.d(e,"isReferenceType",(function(){return Vn})),n.d(e,"isRefinementType",(function(){return An})),n.d(e,"isRoot",(function(){return N})),n.d(e,"isStateTreeNode",(function(){return Kt})),n.d(e,"isType",(function(){return pt})),n.d(e,"isUnionType",(function(){return En})),n.d(e,"isValidReference",(function(){return U})),n.d(e,"joinJsonPath",(function(){return Be})),n.d(e,"onAction",(function(){return wt})),n.d(e,"onPatch",(function(){return _})),n.d(e,"onSnapshot",(function(){return A})),n.d(e,"process",(function(){return ae})),n.d(e,"protect",(function(){return E})),n.d(e,"recordActions",(function(){return At})),n.d(e,"recordPatches",(function(){return x})),n.d(e,"resolveIdentifier",(function(){return F})),n.d(e,"resolvePath",(function(){return D})),n.d(e,"setLivelinessChecking",(function(){return s})),n.d(e,"setLivelynessChecking",(function(){return l})),n.d(e,"splitJsonPath",(function(){return ze})),n.d(e,"toGenerator",(function(){return Me})),n.d(e,"toGeneratorFunction",(function(){return je})),n.d(e,"tryReference",(function(){return z})),n.d(e,"tryResolve",(function(){return G})),n.d(e,"typecheck",(function(){return qt})),n.d(e,"types",(function(){return Qn})),n.d(e,"unescapeJsonPath",(function(){return Fe})),n.d(e,"unprotect",(function(){return O})),n.d(e,"walk",(function(){return K}));var i,o=n(16),a="warn";function s(t){a=t}function u(){return a}function l(t){s(t)}!function(t){t.afterCreate="afterCreate",t.afterAttach="afterAttach",t.afterCreationFinalization="afterCreationFinalization",t.beforeDetach="beforeDetach",t.beforeDestroy="beforeDestroy"}(i||(i={}));var c=function(t,e){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},c(t,e)};function f(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var h=function(){return h=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},h.apply(this,arguments)};function p(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function d(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function m(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function v(t){return $t(t,1),Jt(t).type}function b(t,e){return $t(t,1),Jt(t).getChildType(e)}function _(t,e){return $t(t,1),Pe(e,2),Jt(t).onPatch(e)}function A(t,e){return $t(t,1),Pe(e,2),Jt(t).onSnapshot(e)}function w(t,e){$t(t,1),Se(e,(function(t){return"object"===typeof t}),"object or array",2),Jt(t).applyPatches(de(e))}function x(t,e){$t(t,1);var n,r={patches:[],reversedInversePatches:[]},i={},o={get recording(){return!!n},get patches(){return i.patches||(i.patches=r.patches.slice()),i.patches},get reversedInversePatches(){return i.reversedInversePatches||(i.reversedInversePatches=r.reversedInversePatches.slice()),i.reversedInversePatches},get inversePatches(){return i.inversePatches||(i.inversePatches=r.reversedInversePatches.slice().reverse()),i.inversePatches},stop:function(){n&&(n(),n=void 0)},resume:function(){n||(n=_(t,(function(t,n){e&&!e(t,n,jt())||(r.patches.push(t),r.reversedInversePatches.unshift(n),i.patches=void 0,i.inversePatches=void 0,i.reversedInversePatches=void 0)})))},replay:function(e){w(e||t,r.patches)},undo:function(e){w(e||t,r.reversedInversePatches)}};return o.resume(),o}function E(t){$t(t,1);var e=Jt(t);if(!e.isRoot)throw ce("`protect` can only be invoked on root nodes");e.isProtectionEnabled=!0}function O(t){$t(t,1);var e=Jt(t);if(!e.isRoot)throw ce("`unprotect` can only be invoked on root nodes");e.isProtectionEnabled=!1}function S(t){return Jt(t).isProtected}function P(t,e){return $t(t,1),Jt(t).applySnapshot(e)}function C(t,e){void 0===e&&(e=!0),$t(t,1);var n=Jt(t);return e?n.snapshot:ve(n.type.getSnapshot(n,!1))}function T(t,e){void 0===e&&(e=1),$t(t,1),Ce(e,2,0);for(var n=Jt(t).parent;n;){if(0===--e)return!0;n=n.parent}return!1}function k(t,e){void 0===e&&(e=1),$t(t,1),Ce(e,2,0);for(var n=e,r=Jt(t).parent;r;){if(0===--n)return r.storedValue;r=r.parent}throw ce("Failed to find the parent of "+Jt(t)+" at depth "+e)}function I(t,e){$t(t,1),dt(e,2);for(var n=Jt(t).parent;n;){if(e.is(n.storedValue))return!0;n=n.parent}return!1}function L(t,e){$t(t,1),dt(e,2);for(var n=Jt(t).parent;n;){if(e.is(n.storedValue))return n.storedValue;n=n.parent}throw ce("Failed to find the parent of "+Jt(t)+" of a given type")}function j(t){return $t(t,1),Jt(t).root.storedValue}function M(t){return $t(t,1),Jt(t).path}function R(t){return $t(t,1),ze(Jt(t).path)}function N(t){return $t(t,1),Jt(t).isRoot}function D(t,e){$t(t,1),Te(e,2);var n=re(Jt(t),e);return n?n.value:void 0}function F(t,e,n){dt(t,1),$t(e,2),Se(n,$n,"string or number (identifier)",3);var r=Jt(e).root.identifierCache.resolve(t,Kn(n));return r?r.value:void 0}function B(t){return $t(t,1),Jt(t).identifier}function z(t,e){void 0===e&&(e=!0);try{var n=t();if(void 0===n||null===n)return;if(Kt(n))return e?X(n)?n:void 0:n;throw ce("The reference to be checked is not one of node, null or undefined")}catch(r){if(r instanceof Fn)return;throw r}}function U(t,e){void 0===e&&(e=!0);try{var n=t();if(void 0===n||null===n)return!1;if(Kt(n))return!e||X(n);throw ce("The reference to be checked is not one of node, null or undefined")}catch(r){if(r instanceof Fn)return!1;throw r}}function G(t,e){$t(t,1),Te(e,2);var n=re(Jt(t),e,!1);if(void 0!==n)try{return n.value}catch(r){return}}function V(t,e){return $t(t,1),$t(e,2),ne(Jt(t),Jt(e))}function q(t,e){void 0===e&&(e=!0),$t(t,1);var n=Jt(t);return n.type.create(n.snapshot,!0===e?n.root.environment:!1===e?void 0:e)}function H(t){return $t(t,1),Jt(t).detach(),t}function W(t){$t(t,1);var e=Jt(t);e.isRoot?e.die():e.parent.removeChild(e.subpath)}function X(t){return $t(t,1),Jt(t).observableIsAlive}function Y(t,e){return $t(t,1),Pe(e,2),Jt(t).addDisposer(e),e}function Z(t){$t(t,1);var e=Jt(t).root.environment;return e||ue}function K(t,e){$t(t,1),Pe(e,2);var n=Jt(t);n.getChildren().forEach((function(t){Kt(t.storedValue)&&K(t.storedValue,e)})),e(n.storedValue)}function $(t){var e;return Se(e=Kt(t)?v(t):t,(function(t){return an(t)}),"model type or model instance",1),{name:e.name,properties:h({},e.properties)}}function J(t){var e=Jt(t).type,n=h(h({},$(e)),{actions:[],volatile:[],views:[]});return Object.getOwnPropertyNames(t).forEach((function(e){if(!(e in n.properties)){var r=Object.getOwnPropertyDescriptor(t,e);r.get?Object(o.o)(t,e)?n.views.push(e):n.volatile.push(e):!0===r.value._isMSTAction?n.actions.push(e):Object(o.q)(t,e)?n.volatile.push(e):n.views.push(e)}})),n}function Q(t){return t}function tt(t){return t}function et(t){return t}function nt(t){return $t(t,1),Jt(t).nodeId}var rt,it=function(){function t(t,e,n,r){this.type=t,this.environment=r,this._state=Ht.INITIALIZING,this.environment=r,this.baseSetParent(e,n)}return Object.defineProperty(t.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(t){var e=this.isAlive;this._state=t;var n=this.isAlive;this.aliveAtom&&e!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),t.prototype.fireInternalHook=function(t){this._hookSubscribers&&this._hookSubscribers.emit(t,this,t)},t.prototype.registerHook=function(t,e){return this._hookSubscribers||(this._hookSubscribers=new Ae),this._hookSubscribers.register(t,e)},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),t.prototype.baseSetParent=function(t,e){this._parent=t,this._subpath=e,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()},Object.defineProperty(t.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),t.prototype.getEscapedPath=function(t){return t&&(this.pathAtom||(this.pathAtom=Object(o.j)("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?De(this._subpath):""),this.parent.getEscapedPath(t)+"/"+this._escapedSubpath):""},Object.defineProperty(t.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAlive",{get:function(){return this.state!==Ht.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDetaching",{get:function(){return this.state===Ht.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Object(o.j)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),t.prototype.baseFinalizeCreation=function(t){if(this.state===Ht.CREATED){if(this.parent){if(this.parent.state!==Ht.FINALIZED)return;this.fireHook(i.afterAttach)}this.state=Ht.FINALIZED,t&&t()}},t.prototype.baseFinalizeDeath=function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=Ht.DEAD},t.prototype.baseAboutToDie=function(){this.fireHook(i.beforeDestroy)},t}(),ot=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r,i)||this;try{a.storedValue=e.createNewInstance(o)}catch(s){throw a.state=Ht.DEAD,s}return a.state=Ht.CREATED,a.finalizeCreation(),a}return f(e,t),Object.defineProperty(e.prototype,"root",{get:function(){if(!this.parent)throw ce("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),e.prototype.setParent=function(t,e){var n=this.parent!==t,r=this.subpath!==e;(n||r)&&(this.environment=void 0,this.baseSetParent(this.parent,e))},Object.defineProperty(e.prototype,"snapshot",{get:function(){return ve(this.getSnapshot())},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(){return this.type.getSnapshot(this)},e.prototype.toString=function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+t+(this.isAlive?"":" [dead]")},e.prototype.die=function(){this.isAlive&&this.state!==Ht.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},e.prototype.finalizeCreation=function(){this.baseFinalizeCreation()},e.prototype.aboutToDie=function(){this.baseAboutToDie()},e.prototype.finalizeDeath=function(){this.baseFinalizeDeath()},e.prototype.fireHook=function(t){this.fireInternalHook(t)},p([o.g],e.prototype,"die",null),e}(it),at=1,st={onError:function(t){throw t}},ut=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r,i)||this;if(a.nodeId=++at,a.isProtectionEnabled=!0,a._autoUnbox=!0,a._isRunningAction=!1,a._hasSnapshotReaction=!1,a._observableInstanceState=0,a._cachedInitialSnapshotCreated=!1,a.unbox=a.unbox.bind(a),a._initialSnapshot=ve(o),a.identifierAttribute=e.identifierAttribute,n||(a.identifierCache=new Xt),a._childNodes=e.initializeChildNodes(a,a._initialSnapshot),a.identifier=null,a.unnormalizedIdentifier=null,a.identifierAttribute&&a._initialSnapshot){var s=a._initialSnapshot[a.identifierAttribute];if(void 0===s){var u=a._childNodes[a.identifierAttribute];u&&(s=u.value)}if("string"!==typeof s&&"number"!==typeof s)throw ce("Instance identifier '"+a.identifierAttribute+"' for type '"+a.type.name+"' must be a string or a number");a.identifier=Kn(s),a.unnormalizedIdentifier=s}return n?n.root.identifierCache.addNodeToCache(a):a.identifierCache.addNodeToCache(a),a}return f(e,t),e.prototype.applyPatches=function(t){this.createObservableInstanceIfNeeded(),this._applyPatches(t)},e.prototype.applySnapshot=function(t){this.createObservableInstanceIfNeeded(),this._applySnapshot(t)},e.prototype.createObservableInstanceIfNeeded=function(){0===this._observableInstanceState&&this.createObservableInstance()},e.prototype.createObservableInstance=function(){var t,e;this._observableInstanceState=1;for(var n=[],r=this.parent;r&&0===r._observableInstanceState;)n.unshift(r),r=r.parent;try{for(var a=m(n),s=a.next();!s.done;s=a.next()){s.value.createObservableInstanceIfNeeded()}}catch(f){t={error:f}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}var u,l,c=this.type;try{this.storedValue=c.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,c.finalizeNewInstance(this,this.storedValue)}catch(h){throw this.state=Ht.DEAD,h}finally{this._isRunningAction=!1}this._observableInstanceState=2,u=this,l="snapshot",Object(o.l)(u,l).trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=ue,this.state=Ht.CREATED,this.fireHook(i.afterCreate),this.finalizeCreation()},Object.defineProperty(e.prototype,"root",{get:function(){var t=this.parent;return t?t.root:this},enumerable:!1,configurable:!0}),e.prototype.clearParent=function(){if(this.parent){this.fireHook(i.beforeDetach);var t=this.state;this.state=Ht.DETACHING;var e=this.root,n=e.environment,r=e.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=t}}},e.prototype.setParent=function(t,e){var n=t!==this.parent,r=e!==this.subpath;(n||r)&&(n?(this.environment=void 0,t.root.identifierCache.mergeCache(this),this.baseSetParent(t,e),this.fireHook(i.afterAttach)):r&&this.baseSetParent(this.parent,e))},e.prototype.fireHook=function(t){var e=this;this.fireInternalHook(t);var n=this.storedValue&&"object"===typeof this.storedValue&&this.storedValue[t];"function"===typeof n&&(o.d?Object(o.d)((function(){n.apply(e.storedValue)})):n.apply(this.storedValue))},Object.defineProperty(e.prototype,"snapshot",{get:function(){return ve(this.getSnapshot())},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath},e.prototype._getActualSnapshot=function(){return this.type.getSnapshot(this)},e.prototype._getCachedInitialSnapshot=function(){if(!this._cachedInitialSnapshotCreated){var t=this.type,e=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=t.processInitialSnapshot(e,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot},e.prototype.isRunningAction=function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()},e.prototype.assertAlive=function(t){var e=u();if(!this.isAlive&&"ignore"!==e){var n=this._getAssertAliveError(t);switch(e){case"error":throw ce(n);case"warn":Oe(n)}}},e.prototype._getAssertAliveError=function(t){var e=this.getEscapedPath(!1)||this.pathUponDeath||"",n=t.subpath&&De(t.subpath)||"",r=t.actionContext||Ot();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var i="";r&&null!=r.name&&(i=(r&&r.context&&M(r.context)||e)+"."+r.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+e+"', Subpath: '"+n+"', Action: '"+i+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."},e.prototype.getChildNode=function(t){this.assertAlive({subpath:t}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,t):this._childNodes[t]}finally{this._autoUnbox=!0}},e.prototype.getChildren=function(){this.assertAlive(ue),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):oe(this._childNodes)}finally{this._autoUnbox=!0}},e.prototype.getChildType=function(t){return this.type.getChildType(t)},Object.defineProperty(e.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),e.prototype.assertWritable=function(t){if(this.assertAlive(t),!this.isRunningAction()&&this.isProtected)throw ce("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")},e.prototype.removeChild=function(t){this.type.removeChild(this,t)},e.prototype.unbox=function(t){return t?(this.assertAlive({subpath:t.subpath||t.subpathUponDeath}),this._autoUnbox?t.value:t):t},e.prototype.toString=function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>",e=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+t+e+(this.isAlive?"":" [dead]")},e.prototype.finalizeCreation=function(){var t=this;this.baseFinalizeCreation((function(){var e,n;try{for(var r=m(t.getChildren()),o=r.next();!o.done;o=r.next()){o.value.finalizeCreation()}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t.fireInternalHook(i.afterCreationFinalization)}))},e.prototype.detach=function(){if(!this.isAlive)throw ce("Error while detaching, node is not alive.");this.clearParent()},e.prototype.preboot=function(){var t=this;this._applyPatches=Tt(this.storedValue,"@APPLY_PATCHES",(function(e){e.forEach((function(e){var n=ze(e.path);ie(t,n.slice(0,-1)).applyPatchLocally(n[n.length-1],e)}))})),this._applySnapshot=Tt(this.storedValue,"@APPLY_SNAPSHOT",(function(e){if(e!==t.snapshot)return t.type.applySnapshot(t,e)})),be(this.storedValue,"$treenode",this),be(this.storedValue,"toJSON",te)},e.prototype.die=function(){this.isAlive&&this.state!==Ht.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},e.prototype.aboutToDie=function(){0!==this._observableInstanceState&&(this.getChildren().forEach((function(t){t.aboutToDie()})),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))},e.prototype.finalizeDeath=function(){this.getChildren().forEach((function(t){t.finalizeDeath()})),this.root.identifierCache.notifyDied(this);var t=this.snapshot;this._snapshotUponDeath=t,this._internalEventsClearAll(),this.baseFinalizeDeath()},e.prototype.onSnapshot=function(t){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",t)},e.prototype.emitSnapshot=function(t){this._internalEventsEmit("snapshot",t)},e.prototype.onPatch=function(t){return this._internalEventsRegister("patch",t)},e.prototype.emitPatch=function(t,e){if(this._internalEventsHasSubscribers("patch")){var n=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)t[o]=i[o]}return t}({},t,{path:e.path.substr(this.path.length)+"/"+t.path}),r=g(function(t){if(!("oldValue"in t))throw ce("Patches without `oldValue` field cannot be inversed");return[Re(t),Ne(t)]}(n),2),i=r[0],o=r[1];this._internalEventsEmit("patch",i,o)}this.parent&&this.parent.emitPatch(t,e)},e.prototype.hasDisposer=function(t){return this._internalEventsHas("dispose",t)},e.prototype.addDisposer=function(t){if(this.hasDisposer(t))throw ce("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",t,!0)},e.prototype.removeDisposer=function(t){if(!this._internalEventsHas("dispose",t))throw ce("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",t)},e.prototype.removeMiddleware=function(t){if(this.middlewares){var e=this.middlewares.indexOf(t);e>=0&&this.middlewares.splice(e,1)}},e.prototype.addMiddleWare=function(t,e){var n=this;void 0===e&&(e=!0);var r={handler:t,includeHooks:e};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}},e.prototype.applyPatchLocally=function(t,e){this.assertWritable({subpath:t}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,t,e)},e.prototype._addSnapshotReaction=function(){var t=this;if(!this._hasSnapshotReaction){var e=Object(o.t)((function(){return t.snapshot}),(function(e){return t.emitSnapshot(e)}),st);this.addDisposer(e),this._hasSnapshotReaction=!0}},e.prototype._internalEventsHasSubscribers=function(t){return!!this._internalEvents&&this._internalEvents.hasSubscribers(t)},e.prototype._internalEventsRegister=function(t,e,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new Ae),this._internalEvents.register(t,e,n)},e.prototype._internalEventsHas=function(t,e){return!!this._internalEvents&&this._internalEvents.has(t,e)},e.prototype._internalEventsUnregister=function(t,e){this._internalEvents&&this._internalEvents.unregister(t,e)},e.prototype._internalEventsEmit=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._internalEvents&&(e=this._internalEvents).emit.apply(e,y([t],n))},e.prototype._internalEventsClear=function(t){this._internalEvents&&this._internalEvents.clear(t)},e.prototype._internalEventsClearAll=function(){this._internalEvents&&this._internalEvents.clearAll()},p([o.g],e.prototype,"createObservableInstance",null),p([o.h],e.prototype,"snapshot",null),p([o.g],e.prototype,"detach",null),p([o.g],e.prototype,"die",null),e}(it);!function(t){t[t.String=1]="String",t[t.Number=2]="Number",t[t.Boolean=4]="Boolean",t[t.Date=8]="Date",t[t.Literal=16]="Literal",t[t.Array=32]="Array",t[t.Map=64]="Map",t[t.Object=128]="Object",t[t.Frozen=256]="Frozen",t[t.Optional=512]="Optional",t[t.Reference=1024]="Reference",t[t.Identifier=2048]="Identifier",t[t.Late=4096]="Late",t[t.Refinement=8192]="Refinement",t[t.Union=16384]="Union",t[t.Null=32768]="Null",t[t.Undefined=65536]="Undefined",t[t.Integer=131072]="Integer",t[t.Custom=262144]="Custom",t[t.SnapshotProcessor=524288]="SnapshotProcessor"}(rt||(rt={}));var lt="cannotDetermine",ct=function(){function t(t){this.isType=!0,this.name=t}return t.prototype.create=function(t,e){return Vt(this,t),this.instantiate(null,"",e,t).value},t.prototype.getSnapshot=function(t,e){throw ce("unimplemented method")},t.prototype.isAssignableFrom=function(t){return t===this},t.prototype.validate=function(t,e){if(Qt(t)){var n=v(t);return this.isAssignableFrom(n)?zt():Ut(e,t)}return this.isValidSnapshot(t,e)},t.prototype.is=function(t){return 0===this.validate(t,[{path:"",type:this}]).length},Object.defineProperty(t.prototype,"Type",{get:function(){throw ce("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"TypeWithoutSTN",{get:function(){throw ce("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"SnapshotType",{get:function(){throw ce("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CreationType",{get:function(){throw ce("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),p([o.g],t.prototype,"create",null),t}(),ft=function(t){function e(e){return t.call(this,e)||this}return f(e,t),e.prototype.create=function(e,n){return void 0===e&&(e=this.getDefaultSnapshot()),t.prototype.create.call(this,e,n)},e.prototype.getValue=function(t){return t.createObservableInstanceIfNeeded(),t.storedValue},e.prototype.tryToReconcileNode=function(t,e){return!t.isDetaching&&(t.snapshot===e||(!(!Kt(e)||Jt(e)!==t)||!(t.type!==this||!ge(e)||Kt(e)||t.identifierAttribute&&t.identifier!==Kn(e[t.identifierAttribute]))&&(t.applySnapshot(e),!0)))},e.prototype.reconcile=function(t,e,n,r){if(this.tryToReconcileNode(t,e))return t.setParent(n,r),t;if(t.die(),Kt(e)&&this.isAssignableFrom(v(e))){var i=Jt(e);return i.setParent(n,r),i}return this.instantiate(n,r,void 0,e)},e.prototype.getSubTypes=function(){return null},p([o.g],e.prototype,"create",null),e}(ct),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.createNewInstance=function(t){return t},e.prototype.getValue=function(t){return t.storedValue},e.prototype.getSnapshot=function(t){return t.storedValue},e.prototype.reconcile=function(t,e,n,r){if(!t.isDetaching&&t.type===this&&t.storedValue===e)return t;var i=this.instantiate(n,r,void 0,e);return t.die(),i},e.prototype.getSubTypes=function(){return null},e}(ct);function pt(t){return"object"===typeof t&&t&&!0===t.isType}function dt(t,e){Se(t,pt,"mobx-state-tree type",e)}var mt=new Map;function gt(t){return function(e,n,r){switch(e.type){case"action":if(t.filter&&!0!==t.filter(e))return n(e);var i=t.onStart(e);t.onResume(e,i),mt.set(e.id,{call:e,context:i,async:!1});try{var o=n(e);return t.onSuspend(e,i),!1===mt.get(e.id).async&&(mt.delete(e.id),t.onSuccess(e,i,o)),o}catch(s){throw mt.delete(e.id),t.onFail(e,i,s),s}case"flow_spawn":return(a=mt.get(e.rootId)).async=!0,n(e);case"flow_resume":case"flow_resume_error":var a=mt.get(e.rootId);t.onResume(e,a.context);try{return n(e)}finally{t.onSuspend(e,a.context)}case"flow_throw":a=mt.get(e.rootId);return mt.delete(e.rootId),t.onFail(e,a.context,e.args[0]),n(e);case"flow_return":a=mt.get(e.rootId);return mt.delete(e.rootId),t.onSuccess(e,a.context,e.args[0]),n(e)}}}var yt=function(){function t(t,e){this.hooks=t,this.call=e,this.flowsPending=0,this.running=!0,t&&t.onStart(e)}return t.prototype.finish=function(t){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,t))},t.prototype.incFlowsPending=function(){this.flowsPending++},t.prototype.decFlowsPending=function(){this.flowsPending--},Object.defineProperty(t.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),t}();function vt(t){var e=new WeakMap;return function(n,r){var i=n.parentActionEvent?e.get(n.parentActionEvent):void 0;if("action"===n.type){var o=h(h({},n),{env:i&&i.call.env,parentCall:i&&i.call}),a=!t.filter||t.filter(o),s=new yt(a?t:void 0,o);e.set(n,s);var u=void 0;try{u=r(n)}catch(c){throw s.finish(c),c}return s.hasFlowsPending||s.finish(),u}if(!i)return r(n);switch(n.type){case"flow_spawn":return i.incFlowsPending(),r(n);case"flow_resume":case"flow_resume_error":return r(n);case"flow_throw":var l=n.args[0];try{return r(n)}finally{i.decFlowsPending(),i.hasFlowsPending||i.finish(l)}case"flow_return":try{return r(n)}finally{i.decFlowsPending(),i.hasFlowsPending||i.finish()}}}}function bt(t){return{$MST_UNSERIALIZABLE:!0,type:t}}function _t(t,e){$t(t,1),Se(e,(function(t){return"object"===typeof t}),"object or array",2),Object(o.u)((function(){de(e).forEach((function(e){return function(t,e){var n=G(t,e.path||"");if(!n)throw ce("Invalid action path: "+(e.path||""));var r=Jt(n);if("@APPLY_PATCHES"===e.name)return w.call(null,n,e.args[0]);if("@APPLY_SNAPSHOT"===e.name)return P.call(null,n,e.args[0]);if("function"!==typeof n[e.name])throw ce("Action '"+e.name+"' does not exist in '"+r.path+"'");return n[e.name].apply(n,e.args?e.args.map((function(t){return(e=t)&&"object"===typeof e&&"$MST_DATE"in e?new Date(e.$MST_DATE):e;var e})):[])}(t,e)}))}))}function At(t,e){$t(t,1);var n,r=[],i=function(t){(!e||e(t,jt()))&&r.push(t)},o={actions:r,get recording(){return!!n},stop:function(){n&&(n(),n=void 0)},resume:function(){n||(n=wt(t,i))},replay:function(t){_t(t,r)}};return o.resume(),o}function wt(t,e,n){return void 0===n&&(n=!1),$t(t,1),kt(t,(function(r,i){if("action"===r.type&&r.id===r.rootId){var o=Jt(r.context),a={name:r.name,path:ne(Jt(t),o),args:r.args.map((function(t,e){return function(t,e,n,r){if(r instanceof Date)return{$MST_DATE:r.getTime()};if(ye(r))return r;if(Kt(r))return bt("[MSTNode: "+v(r).name+"]");if("function"===typeof r)return bt("[function]");if("object"===typeof r&&!me(r)&&!pe(r))return bt("[object "+(r&&r.constructor&&r.constructor.name||"Complex Object")+"]");try{return JSON.stringify(r),r}catch(i){return bt(""+i)}}(0,r.name,0,t)}))};if(n){var s=i(r);return e(a),s}return e(a),i(r)}return i(r)}))}var xt,Et=1;function Ot(){return xt}function St(){return Et++}function Pt(t,e){var n=Jt(t.context);"action"===t.type&&n.assertAlive({actionContext:t});var r=n._isRunningAction;n._isRunningAction=!0;var a=xt;xt=t;try{return function(t,e,n){var r=new Lt(t,n);if(r.isEmpty)return Object(o.g)(n).apply(null,e.args);var a=null;function s(t){var e=r.getNextMiddleware(),u=e&&e.handler;if(!u)return Object(o.g)(n).apply(null,t.args);if(!e.includeHooks&&i[t.name])return s(t);function l(t,e){!0,a=s(t),e&&(a=e(a))}function c(t){!0,a=t}return u(t,l,c),a}return s(e)}(n,t,e)}finally{xt=a,n._isRunningAction=r}}function Ct(t){if(t)return"action"===t.type?t:t.parentActionEvent}function Tt(t,e,n){var r=function(){var r=St(),i=xt,o=Ct(i);return Pt({type:"action",name:e,id:r,args:we(arguments),context:t,tree:j(t),rootId:i?i.rootId:r,parentId:i?i.id:0,allParentIds:i?y(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},n)};return r._isMSTAction=!0,r}function kt(t,e,n){void 0===n&&(n=!0);var r=Jt(t);return r.addMiddleWare(e,n)}function It(t,e,n){void 0===n&&(n=!0);var r={handler:t,includeHooks:n};return e.$mst_middleware=e.$mst_middleware||[],e.$mst_middleware.push(r),e}var Lt=function(){function t(t,e){this.arrayIndex=0,this.inArrayIndex=0,this.middlewares=[],e.$mst_middleware&&this.middlewares.push(e.$mst_middleware);for(var n=t;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),t.prototype.getNextMiddleware=function(){var t=this.middlewares[this.arrayIndex];if(t){var e=t[this.inArrayIndex++];return e||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}},t}();function jt(){for(var t=Ot();t&&"action"!==t.type;)t=t.parentActionEvent;return t}function Mt(t,e,n){for(var r="number"===typeof e?e:e.id,i=n?t:t.parentActionEvent;i;){if(i.id===r)return!0;i=i.parentActionEvent}return!1}function Rt(t,e){return Mt(t,e,!1)}function Nt(t,e){return Mt(t,e,!0)}function Dt(t){return"function"===typeof t?"<function"+(t.name?" "+t.name:"")+">":Kt(t)?"<"+t+">":"`"+function(t){try{return JSON.stringify(t)}catch(e){return"<Unserializable: "+e+">"}}(t)+"`"}function Ft(t){var e=t.value,n=t.context[t.context.length-1].type,r=t.context.map((function(t){return t.path})).filter((function(t){return t.length>0})).join("/"),i=r.length>0?'at path "/'+r+'" ':"",o=Kt(e)?"value of type "+Jt(e).type.name+":":ye(e)?"value":"snapshot",a=n&&Kt(e)&&n.is(Jt(e).snapshot);return""+i+o+" "+Dt(e)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(t.message?" ("+t.message+")":"")+(n?gn(n)||ye(e)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function Bt(t,e,n){return t.concat([{path:e,type:n}])}function zt(){return se}function Ut(t,e,n){return[{context:t,value:e,message:n}]}function Gt(t){return t.reduce((function(t,e){return t.concat(e)}),[])}function Vt(e,n){"undefined"!==typeof t&&t.env&&"true"===t.env.ENABLE_TYPE_CHECK&&qt(e,n)}function qt(t,e){var n=t.validate(e,[{path:"",type:t}]);if(n.length>0)throw ce(function(t,e,n){if(0===n.length)return;return"Error while converting "+(r=Dt(e),(r.length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `")+t.name+"`:\n\n    "+n.map(Ft).join("\n    ");var r}(t,e,n))}var Ht,Wt=0,Xt=function(){function t(){this.cacheId=Wt++,this.cache=o.r.map(),this.lastCacheModificationPerId=o.r.map()}return t.prototype.updateLastCacheModificationPerId=function(t){var e=this.lastCacheModificationPerId.get(t);this.lastCacheModificationPerId.set(t,void 0===e?1:e+1)},t.prototype.getLastCacheModificationPerId=function(t){var e=this.lastCacheModificationPerId.get(t)||0;return this.cacheId+"-"+e},t.prototype.addNodeToCache=function(t,e){if(void 0===e&&(e=!0),t.identifierAttribute){var n=t.identifier;this.cache.has(n)||this.cache.set(n,o.r.array([],le));var r=this.cache.get(n);if(-1!==r.indexOf(t))throw ce("Already registered");r.push(t),e&&this.updateLastCacheModificationPerId(n)}},t.prototype.mergeCache=function(t){var e=this;Object(o.y)(t.identifierCache.cache).forEach((function(t){return t.forEach((function(t){e.addNodeToCache(t)}))}))},t.prototype.notifyDied=function(t){if(t.identifierAttribute){var e=t.identifier,n=this.cache.get(e);n&&(n.remove(t),n.length||this.cache.delete(e),this.updateLastCacheModificationPerId(t.identifier))}},t.prototype.splitCache=function(e){var n=this,r=new t,i=e.path;return Object(o.k)(this.cache).forEach((function(t){for(var e=g(t,2),o=e[0],a=e[1],s=!1,u=a.length-1;u>=0;u--)0===a[u].path.indexOf(i)&&(r.addNodeToCache(a[u],!1),a.splice(u,1),s=!0);s&&n.updateLastCacheModificationPerId(o)})),r},t.prototype.has=function(t,e){var n=this.cache.get(e);return!!n&&n.some((function(e){return t.isAssignableFrom(e.type)}))},t.prototype.resolve=function(t,e){var n=this.cache.get(e);if(!n)return null;var r=n.filter((function(e){return t.isAssignableFrom(e.type)}));switch(r.length){case 0:return null;case 1:return r[0];default:throw ce("Cannot resolve a reference to type '"+t.name+"' with id: '"+e+"' unambigously, there are multiple candidates: "+r.map((function(t){return t.path})).join(", "))}},t}();function Yt(t,e,n,r,i){var o=Qt(i);if(o){if(o.parent)throw ce("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(e?e.path:"")+"/"+n+"', but it lives already at '"+o.path+"'");return e&&o.setParent(e,n),o}return new ut(t,e,n,r,i)}function Zt(t,e,n,r,i){return new ot(t,e,n,r,i)}function Kt(t){return!(!t||!t.$treenode)}function $t(t,e){Se(t,Kt,"mobx-state-tree node",e)}function Jt(t){if(!Kt(t))throw ce("Value "+t+" is no MST Node");return t.$treenode}function Qt(t){return t&&t.$treenode||null}function te(){return Jt(this).snapshot}!function(t){t[t.INITIALIZING=0]="INITIALIZING",t[t.CREATED=1]="CREATED",t[t.FINALIZED=2]="FINALIZED",t[t.DETACHING=3]="DETACHING",t[t.DEAD=4]="DEAD"}(Ht||(Ht={}));var ee=function(t){return".."};function ne(t,e){if(t.root!==e.root)throw ce("Cannot calculate relative path: objects '"+t+"' and '"+e+"' are not part of the same object tree");for(var n=ze(t.path),r=ze(e.path),i=0;i<n.length&&n[i]===r[i];i++);return n.slice(i).map(ee).join("/")+Be(r.slice(i))}function re(t,e,n){return void 0===n&&(n=!0),ie(t,ze(e),n)}function ie(t,e,n){void 0===n&&(n=!0);for(var r=t,i=0;i<e.length;i++){var o=e[i];if(".."===o){if(r=r.parent)continue}else{if("."===o)continue;if(r){if(r instanceof ot)try{var a=r.value;Kt(a)&&(r=Jt(a))}catch(s){if(!n)return;throw s}if(r instanceof ut)if(r.getChildType(o)&&(r=r.getChildNode(o)))continue}}if(n)throw ce("Could not resolve '"+o+"' in path '"+(Be(e.slice(0,i))||"/")+"' while resolving '"+Be(e)+"'");return}return r}function oe(t){if(!t)return se;var e=Object.keys(t);if(!e.length)return se;var n=new Array(e.length);return e.forEach((function(e,r){n[r]=t[e]})),n}function ae(t){return Ee("process","`process()` has been renamed to `flow()`. See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. Note that the middleware event types starting with `process` now start with `flow`."),Ie(t)}var se=Object.freeze([]),ue=Object.freeze({}),le="string"===typeof o.a?{deep:!1}:{deep:!1,proxy:!1};function ce(t){return void 0===t&&(t="Illegal state"),new Error("[mobx-state-tree] "+t)}function fe(t){return t}Object.freeze(le);var he=Number.isInteger||function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t};function pe(t){return Array.isArray(t)||Object(o.p)(t)}function de(t){return t?pe(t)?t:[t]:se}function me(t){if(null===t||"object"!==typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function ge(t){return null!==t&&"object"===typeof t&&!(t instanceof Date)&&!(t instanceof RegExp)}function ye(t,e){return void 0===e&&(e=!0),null===t||void 0===t||!!("string"===typeof t||"number"===typeof t||"boolean"===typeof t||e&&t instanceof Date)}function ve(t){return t}function be(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}var _e=function(){function t(){this.handlers=[]}return Object.defineProperty(t.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),t.prototype.register=function(t,e){var n=this;return void 0===e&&(e=!1),e?this.handlers.unshift(t):this.handlers.push(t),function(){n.unregister(t)}},t.prototype.has=function(t){return this.handlers.indexOf(t)>=0},t.prototype.unregister=function(t){var e=this.handlers.indexOf(t);e>=0&&this.handlers.splice(e,1)},t.prototype.clear=function(){this.handlers.length=0},t.prototype.emit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.handlers.slice();n.forEach((function(e){return e.apply(void 0,y(t))}))},t}(),Ae=function(){function t(){}return t.prototype.hasSubscribers=function(t){var e=this.eventHandlers&&this.eventHandlers[t];return!!e&&e.hasSubscribers},t.prototype.register=function(t,e,n){void 0===n&&(n=!1),this.eventHandlers||(this.eventHandlers={});var r=this.eventHandlers[t];return r||(r=this.eventHandlers[t]=new _e),r.register(e,n)},t.prototype.has=function(t,e){var n=this.eventHandlers&&this.eventHandlers[t];return!!n&&n.has(e)},t.prototype.unregister=function(t,e){var n=this.eventHandlers&&this.eventHandlers[t];n&&n.unregister(e)},t.prototype.clear=function(t){this.eventHandlers&&delete this.eventHandlers[t]},t.prototype.clearAll=function(){this.eventHandlers=void 0},t.prototype.emit=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.eventHandlers&&this.eventHandlers[t];i&&(e=i).emit.apply(e,y(n))},t}();function we(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t[n];return e}function xe(t,e){return 0===t.indexOf(e)}var Ee=function(t,e){};function Oe(t){console.warn(new Error("[mobx-state-tree] "+t))}function Se(t,e,n,r){0}function Pe(t,e){Se()}function Ce(t,e,n,r){Se(),void 0!==n&&Se(),void 0!==r&&Se()}function Te(t,e,n){void 0===n&&(n=!0),Se(),n||Se()}function ke(t){"function"===typeof queueMicrotask?queueMicrotask(t):"function"===typeof r?r(t):setTimeout(t,1)}function Ie(t){return function(t,e){var n=function(){var r=St(),i=Ot();if(!i)throw ce("a mst flow must always have a parent context");var o=Ct(i);if(!o)throw ce("a mst flow must always have a parent action context");var a={name:t,id:r,tree:i.tree,context:i.context,parentId:i.id,allParentIds:y(i.allParentIds,[i.id]),rootId:i.rootId,parentEvent:i,parentActionEvent:o},s=arguments;function u(t,e,r){t.$mst_middleware=n.$mst_middleware,Pt(h(h({},a),{type:e,args:[r]}),t)}return new Promise((function(t,r){var i,o=function(){i=e.apply(null,arguments),l(void 0)};function l(t){var e;try{u((function(t){e=i.next(t)}),"flow_resume",t)}catch(n){return void ke((function(){u((function(t){r(n)}),"flow_throw",n)}))}f(e)}function c(t){var e;try{u((function(t){e=i.throw(t)}),"flow_resume_error",t)}catch(n){return void ke((function(){u((function(t){r(n)}),"flow_throw",n)}))}f(e)}function f(e){if(!e.done){if(!e.value||"function"!==typeof e.value.then)throw ce("Only promises can be yielded to `async`, got: "+e);return e.value.then(l,c)}ke((function(){u((function(e){t(e)}),"flow_return",e.value)}))}o.$mst_middleware=n.$mst_middleware,Pt(h(h({},a),{type:"flow_spawn",args:we(s)}),o)}))};return n}(t.name,t)}function Le(t){return t}function je(t){return function(){var e,n=[];for(e=0;e<arguments.length;e++)n[e]=arguments[e];return d(this,(function(e){switch(e.label){case 0:return[4,t.apply(void 0,y(n))];case 1:return[2,e.sent()]}}))}}function Me(t){return d(this,(function(e){switch(e.label){case 0:return[4,t];case 1:return[2,e.sent()]}}))}function Re(t){switch(t.op){case"add":return{op:"add",path:t.path,value:t.value};case"remove":return{op:"remove",path:t.path};case"replace":return{op:"replace",path:t.path,value:t.value}}}function Ne(t){switch(t.op){case"add":return{op:"remove",path:t.path};case"remove":return{op:"add",path:t.path,value:t.oldValue};case"replace":return{op:"replace",path:t.path,value:t.oldValue}}}function De(t){return!0===("number"===typeof t)?""+t:-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function Fe(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function Be(t){if(0===t.length)return"";var e=function(t){return t.map(De).join("/")};return"."===t[0]||".."===t[0]?e(t):"/"+e(t)}function ze(t){var e=t.split("/").map(Fe);if(!(""===t||"."===t||".."===t||xe(t,"/")||xe(t,"./")||xe(t,"../")))throw ce("a json path must be either rooted, empty or relative, but got '"+t+"'");return""===e[0]&&e.shift(),e}Ee.ids={};var Ue=function(t){function e(e,n,r){var i=t.call(this,r||e.name)||this;return i._subtype=e,i._processors=n,i}return f(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return this._subtype.flags|rt.SnapshotProcessor},enumerable:!1,configurable:!0}),e.prototype.describe=function(){return"snapshotProcessor("+this._subtype.describe()+")"},e.prototype.preProcessSnapshot=function(t){return this._processors.preProcessor?this._processors.preProcessor.call(null,t):t},e.prototype.postProcessSnapshot=function(t){return this._processors.postProcessor?this._processors.postProcessor.call(null,t):t},e.prototype._fixNode=function(t){var e=this;!function(t,e){for(var n,r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=m(i),s=a.next();!s.done;s=a.next()){var u=s.value;t[u]=e[u].bind(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(t.type,this,"isAssignableFrom","create");var n=t.getSnapshot;t.getSnapshot=function(){return e.postProcessSnapshot(n.call(t))}},e.prototype.instantiate=function(t,e,n,r){var i=Kt(r)?r:this.preProcessSnapshot(r),o=this._subtype.instantiate(t,e,n,i);return this._fixNode(o),o},e.prototype.reconcile=function(t,e,n,r){var i=this._subtype.reconcile(t,Kt(e)?e:this.preProcessSnapshot(e),n,r);return i!==t&&this._fixNode(i),i},e.prototype.getSnapshot=function(t,e){void 0===e&&(e=!0);var n=this._subtype.getSnapshot(t);return e?this.postProcessSnapshot(n):n},e.prototype.isValidSnapshot=function(t,e){var n=this.preProcessSnapshot(t);return this._subtype.validate(n,e)},e.prototype.getSubTypes=function(){return this._subtype},e.prototype.is=function(t){var e=pt(t)?this._subtype:Kt(t)?C(t,!1):this.preProcessSnapshot(t);return 0===this._subtype.validate(e,[{path:"",type:this._subtype}]).length},e}(ct);var Ge,Ve="Map.put can only be used to store complex values that have an identifier type attribute";function qe(t,e){var n,r,i=t.getSubTypes();if(i===lt)return!1;if(i){var o=de(i);try{for(var a=m(o),s=a.next();!s.done;s=a.next()){if(!qe(s.value,e))return!1}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}return t instanceof on&&e.push(t),!0}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO"}(Ge||(Ge={}));var He=function(t){function e(e){return t.call(this,e,o.r.ref.enhancer)||this}return f(e,t),e.prototype.get=function(e){return t.prototype.get.call(this,""+e)},e.prototype.has=function(e){return t.prototype.has.call(this,""+e)},e.prototype.delete=function(e){return t.prototype.delete.call(this,""+e)},e.prototype.set=function(e,n){return t.prototype.set.call(this,""+e,n)},e.prototype.put=function(t){if(!t)throw ce("Map.put cannot be used to set empty values");if(Kt(t)){var e=Jt(t);if(null===e.identifier)throw ce(Ve);return this.set(e.identifier,t),t}if(ge(t)){var n=Jt(this),r=n.type;if(r.identifierMode!==Ge.YES)throw ce(Ve);var i=t[r.mapIdentifierAttribute];if(!$n(i)){var o=this.put(r.getChildType().create(t,n.environment));return this.put(C(o))}var a=Kn(i);return this.set(a,t),this.get(a)}throw ce("Map.put can only be used to store complex values")},e}(o.b),We=function(t){function e(e,n,r){void 0===r&&(r=[]);var i=t.call(this,e)||this;return i._subType=n,i.identifierMode=Ge.UNKNOWN,i.mapIdentifierAttribute=void 0,i.flags=rt.Map,i.hookInitializers=[],i._determineIdentifierMode(),i.hookInitializers=r,i}return f(e,t),e.prototype.hooks=function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new e(this.name,this._subType,n)},e.prototype.instantiate=function(t,e,n,r){return this._determineIdentifierMode(),Yt(this,t,e,n,r)},e.prototype._determineIdentifierMode=function(){if(this.identifierMode===Ge.UNKNOWN){var t=[];if(qe(this._subType,t)){var e=void 0;t.forEach((function(t){if(t.identifierAttribute){if(e&&e!==t.identifierAttribute)throw ce("The objects in a map should all have the same identifier attribute, expected '"+e+"', but child of type '"+t.name+"' declared attribute '"+t.identifierAttribute+"' as identifier");e=t.identifierAttribute}})),e?(this.identifierMode=Ge.YES,this.mapIdentifierAttribute=e):this.identifierMode=Ge.NO}}},e.prototype.initializeChildNodes=function(t,e){void 0===e&&(e={});var n=t.type._subType,r={};return Object.keys(e).forEach((function(i){r[i]=n.instantiate(t,i,void 0,e[i])})),r},e.prototype.createNewInstance=function(t){return new He(t)},e.prototype.finalizeNewInstance=function(t,e){Object(o.f)(e,t.unbox),t.type.hookInitializers.forEach((function(t){var n=t(e);Object.keys(n).forEach((function(t){var r=n[t],i=Tt(e,t,r);be(e,t,i)}))})),Object(o.n)(e,this.willChange),Object(o.s)(e,this.didChange)},e.prototype.describe=function(){return"Map<string, "+this._subType.describe()+">"},e.prototype.getChildren=function(t){return Object(o.y)(t.storedValue)},e.prototype.getChildNode=function(t,e){var n=t.storedValue.get(""+e);if(!n)throw ce("Not a child "+e);return n},e.prototype.willChange=function(t){var e=Jt(t.object),n=t.name;e.assertWritable({subpath:n});var r=e.type,i=r._subType;switch(t.type){case"update":var o=t.newValue;if(o===t.object.get(n))return null;Vt(i,o),t.newValue=i.reconcile(e.getChildNode(n),t.newValue,e,n),r.processIdentifier(n,t.newValue);break;case"add":Vt(i,t.newValue),t.newValue=i.instantiate(e,n,void 0,t.newValue),r.processIdentifier(n,t.newValue)}return t},e.prototype.processIdentifier=function(t,e){if(this.identifierMode===Ge.YES&&e instanceof ut){var n=e.identifier;if(n!==t)throw ce("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+t+"'")}},e.prototype.getSnapshot=function(t){var e={};return t.getChildren().forEach((function(t){e[t.subpath]=t.snapshot})),e},e.prototype.processInitialSnapshot=function(t){var e={};return Object.keys(t).forEach((function(n){e[n]=t[n].getSnapshot()})),e},e.prototype.didChange=function(t){var e=Jt(t.object);switch(t.type){case"update":return void e.emitPatch({op:"replace",path:De(t.name),value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},e);case"add":return void e.emitPatch({op:"add",path:De(t.name),value:t.newValue.snapshot,oldValue:void 0},e);case"delete":var n=t.oldValue.snapshot;return t.oldValue.die(),void e.emitPatch({op:"remove",path:De(t.name),oldValue:n},e)}},e.prototype.applyPatchLocally=function(t,e,n){var r=t.storedValue;switch(n.op){case"add":case"replace":r.set(e,n.value);break;case"remove":r.delete(e)}},e.prototype.applySnapshot=function(t,e){Vt(this,e);var n=t.storedValue,r={};if(Array.from(n.keys()).forEach((function(t){r[t]=!1})),e)for(var i in e)n.set(i,e[i]),r[""+i]=!0;Object.keys(r).forEach((function(t){!1===r[t]&&n.delete(t)}))},e.prototype.getChildType=function(){return this._subType},e.prototype.isValidSnapshot=function(t,e){var n=this;return me(t)?Gt(Object.keys(t).map((function(r){return n._subType.validate(t[r],Bt(e,r,n._subType))}))):Ut(e,t,"Value is not a plain object")},e.prototype.getDefaultSnapshot=function(){return ue},e.prototype.removeChild=function(t,e){t.storedValue.delete(e)},p([o.g],e.prototype,"applySnapshot",null),e}(ft);function Xe(t){return pt(t)&&(t.flags&rt.Map)>0}var Ye=function(t){function e(e,n,r){void 0===r&&(r=[]);var i=t.call(this,e)||this;return i._subType=n,i.flags=rt.Array,i.hookInitializers=[],i.hookInitializers=r,i}return f(e,t),e.prototype.hooks=function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new e(this.name,this._subType,n)},e.prototype.instantiate=function(t,e,n,r){return Yt(this,t,e,n,r)},e.prototype.initializeChildNodes=function(t,e){void 0===e&&(e=[]);var n=t.type._subType,r={};return e.forEach((function(e,i){var o=""+i;r[o]=n.instantiate(t,o,void 0,e)})),r},e.prototype.createNewInstance=function(t){return o.r.array(oe(t),le)},e.prototype.finalizeNewInstance=function(t,e){Object(o.e)(e).dehancer=t.unbox,t.type.hookInitializers.forEach((function(t){var n=t(e);Object.keys(n).forEach((function(t){var r=n[t],i=Tt(e,t,r);be(e,t,i)}))})),Object(o.n)(e,this.willChange),Object(o.s)(e,this.didChange)},e.prototype.describe=function(){return this._subType.describe()+"[]"},e.prototype.getChildren=function(t){return t.storedValue.slice()},e.prototype.getChildNode=function(t,e){var n=Number(e);if(n<t.storedValue.length)return t.storedValue[n];throw ce("Not a child: "+e)},e.prototype.willChange=function(t){var e=Jt(t.object);e.assertWritable({subpath:""+t.index});var n=e.type._subType,r=e.getChildren();switch(t.type){case"update":if(t.newValue===t.object[t.index])return null;var i=Ze(e,n,[r[t.index]],[t.newValue],[t.index]);if(!i)return null;t.newValue=i[0];break;case"splice":var o=t.index,a=t.removedCount,s=t.added,u=Ze(e,n,r.slice(o,o+a),s,s.map((function(t,e){return o+e})));if(!u)return null;t.added=u;for(var l=o+a;l<r.length;l++)r[l].setParent(e,""+(l+s.length-a))}return t},e.prototype.getSnapshot=function(t){return t.getChildren().map((function(t){return t.snapshot}))},e.prototype.processInitialSnapshot=function(t){var e=[];return Object.keys(t).forEach((function(n){e.push(t[n].getSnapshot())})),e},e.prototype.didChange=function(t){var e=Jt(t.object);switch(t.type){case"update":return void e.emitPatch({op:"replace",path:""+t.index,value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},e);case"splice":for(var n=t.removedCount-1;n>=0;n--)e.emitPatch({op:"remove",path:""+(t.index+n),oldValue:t.removed[n].snapshot},e);for(n=0;n<t.addedCount;n++)e.emitPatch({op:"add",path:""+(t.index+n),value:e.getChildNode(""+(t.index+n)).snapshot,oldValue:void 0},e);return}},e.prototype.applyPatchLocally=function(t,e,n){var r=t.storedValue,i="-"===e?r.length:Number(e);switch(n.op){case"replace":r[i]=n.value;break;case"add":r.splice(i,0,n.value);break;case"remove":r.splice(i,1)}},e.prototype.applySnapshot=function(t,e){Vt(this,e),t.storedValue.replace(e)},e.prototype.getChildType=function(){return this._subType},e.prototype.isValidSnapshot=function(t,e){var n=this;return pe(t)?Gt(t.map((function(t,r){return n._subType.validate(t,Bt(e,""+r,n._subType))}))):Ut(e,t,"Value is not an array")},e.prototype.getDefaultSnapshot=function(){return se},e.prototype.removeChild=function(t,e){t.storedValue.splice(Number(e),1)},p([o.g],e.prototype,"applySnapshot",null),e}(ft);function Ze(t,e,n,r,i){for(var o,a=!0,s=0;;s++){var u=s<=r.length-1,l=n[s],c=u?r[s]:void 0,f=""+i[s];if(((o=c)instanceof ot||o instanceof ut)&&(c=c.storedValue),!l&&!u)break;if(u)if(l)if($e(l,c))n[s]=Ke(e,t,f,c,l);else{for(var h=void 0,p=s;p<n.length;p++)if($e(n[p],c)){h=n.splice(p,1)[0];break}a=!1;d=Ke(e,t,f,c,h);n.splice(s,0,d)}else{if(Kt(c)&&Jt(c).parent===t)throw ce("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+t.path+"/"+f+"', but it lives already at '"+Jt(c).path+"'");a=!1;var d=Ke(e,t,f,c);n.splice(s,0,d)}else a=!1,n.splice(s,1),l instanceof ut&&l.createObservableInstanceIfNeeded(),l.die(),s--}return a?null:n}function Ke(t,e,n,r,i){Vt(t,r);var o=function(){if(Kt(r)){var o=Jt(r);if(o.assertAlive(ue),null!==o.parent&&o.parent===e)return o.setParent(e,n),o}return i?t.reconcile(i,r,e,n):t.instantiate(e,n,void 0,r)}();return i&&i!==o&&(i instanceof ut&&i.createObservableInstanceIfNeeded(),i.die()),o}function $e(t,e){if(!t.isAlive)return!1;if(Kt(e)){var n=Jt(e);return n.isAlive&&n===t}return t.snapshot===e||t instanceof ut&&null!==t.identifier&&t.identifierAttribute&&me(e)&&t.identifier===Kn(e[t.identifierAttribute])&&t.type.is(e)}function Je(t){return pt(t)&&(t.flags&rt.Array)>0}var Qe="preProcessSnapshot",tn="postProcessSnapshot";function en(){return Jt(this).toString()}var nn={name:"AnonymousModel",properties:{},initializers:se};function rn(t){return Object.keys(t).reduce((function(t,e){var n,r,o;if(e in i)throw ce("Hook '"+e+"' was defined as property. Hooks should be defined as part of the actions");var a=Object.getOwnPropertyDescriptor(t,e);if("get"in a)throw ce("Getters are not supported as properties. Please use views instead");var s=a.value;if(null===s||void 0===s)throw ce("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(ye(s))return Object.assign({},t,((n={})[e]=Sn(function(t){switch(typeof t){case"string":return un;case"number":return ln;case"boolean":return fn;case"object":if(t instanceof Date)return mn}throw ce("Cannot determine primitive type from value "+t)}(s),s),n));if(s instanceof We)return Object.assign({},t,((r={})[e]=Sn(s,{}),r));if(s instanceof Ye)return Object.assign({},t,((o={})[e]=Sn(s,[]),o));if(pt(s))return t;throw ce("Invalid type definition for property '"+e+"', cannot infer a type from a value like '"+s+"' ("+typeof s+")")}),t)}var on=function(t){function e(e){var n=t.call(this,e.name||nn.name)||this;return n.flags=rt.Object,n.named=function(t){return n.cloneAndEnhance({name:t})},n.props=function(t){return n.cloneAndEnhance({properties:t})},n.preProcessSnapshot=function(t){var e=n.preProcessor;return e?n.cloneAndEnhance({preProcessor:function(n){return e(t(n))}}):n.cloneAndEnhance({preProcessor:t})},n.postProcessSnapshot=function(t){var e=n.postProcessor;return e?n.cloneAndEnhance({postProcessor:function(n){return t(e(n))}}):n.cloneAndEnhance({postProcessor:t})},Object.assign(n,nn,e),n.properties=rn(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return f(e,t),e.prototype._getIdentifierAttribute=function(){var t=void 0;return this.forAllProps((function(e,n){if(n.flags&rt.Identifier){if(t)throw ce("Cannot define property '"+e+"' as object identifier, property '"+t+"' is already defined as identifier property");t=e}})),t},e.prototype.cloneAndEnhance=function(t){return new e({name:t.name||this.name,properties:Object.assign({},this.properties,t.properties),initializers:this.initializers.concat(t.initializers||[]),preProcessor:t.preProcessor||this.preProcessor,postProcessor:t.postProcessor||this.postProcessor})},e.prototype.actions=function(t){var e=this;return this.cloneAndEnhance({initializers:[function(n){return e.instantiateActions(n,t(n)),n}]})},e.prototype.instantiateActions=function(t,e){if(!me(e))throw ce("actions initializer should return a plain object containing actions");Object.keys(e).forEach((function(n){if(n===Qe)throw ce("Cannot define action 'preProcessSnapshot', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(n===tn)throw ce("Cannot define action 'postProcessSnapshot', it should be defined using 'type.postProcessSnapshot(fn)' instead");var r=e[n],o=t[n];if(n in i&&o){var a=r;r=function(){o.apply(null,arguments),a.apply(null,arguments)}}var s=r.$mst_middleware,u=r.bind(e);u.$mst_middleware=s;var l=Tt(t,n,u);e[n]=l,be(t,n,l)}))},e.prototype.volatile=function(t){var e=this;if("function"!==typeof t)throw ce("You passed an "+typeof t+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(n){return e.instantiateVolatileState(n,t(n)),n}]})},e.prototype.instantiateVolatileState=function(t,e){if(!me(e))throw ce("volatile state initializer should return a plain object containing state");Object(o.v)(t,e)},e.prototype.extend=function(t){var e=this;return this.cloneAndEnhance({initializers:[function(n){var r=t(n),i=r.actions,o=r.views,a=r.state,s=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}(r,["actions","views","state"]);for(var u in s)throw ce("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+u+"'");return a&&e.instantiateVolatileState(n,a),o&&e.instantiateViews(n,o),i&&e.instantiateActions(n,i),n}]})},e.prototype.views=function(t){var e=this;return this.cloneAndEnhance({initializers:[function(n){return e.instantiateViews(n,t(n)),n}]})},e.prototype.instantiateViews=function(t,e){if(!me(e))throw ce("views initializer should return a plain object containing views");Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);if("get"in r)if(Object(o.o)(t,n)){var i=Object(o.e)(t,n);i.derivation=r.get,i.scope=t,r.set&&(i.setter=Object(o.g)(i.name+"-setter",r.set))}else Object(o.h)(t,n,r,!0);else{if("function"!==typeof r.value)throw ce("A view member should either be a function or getter based property");be(t,n,r.value)}}))},e.prototype.instantiate=function(t,e,n,r){return Yt(this,t,e,n,Kt(r)?r:this.applySnapshotPreProcessor(r))},e.prototype.initializeChildNodes=function(t,e){void 0===e&&(e={});var n=t.type,r={};return n.forAllProps((function(n,i){r[n]=i.instantiate(t,n,void 0,e[n])})),r},e.prototype.createNewInstance=function(t){return o.r.object(t,ue,le)},e.prototype.finalizeNewInstance=function(t,e){be(e,"toString",en),this.forAllProps((function(n){Object(o.f)(e,n,t.unbox)})),this.initializers.reduce((function(t,e){return e(t)}),e),Object(o.n)(e,this.willChange),Object(o.s)(e,this.didChange)},e.prototype.willChange=function(t){var e=t,n=Jt(e.object),r=e.name;n.assertWritable({subpath:r});var i=n.type.properties[r];return i&&(Vt(i,e.newValue),e.newValue=i.reconcile(n.getChildNode(r),e.newValue,n,r)),e},e.prototype.didChange=function(t){var e=t,n=Jt(e.object);if(n.type.properties[e.name]){var r=e.oldValue?e.oldValue.snapshot:void 0;n.emitPatch({op:"replace",path:De(e.name),value:e.newValue.snapshot,oldValue:r},n)}},e.prototype.getChildren=function(t){var e=this,n=[];return this.forAllProps((function(r){n.push(e.getChildNode(t,r))})),n},e.prototype.getChildNode=function(t,e){if(!(e in this.properties))throw ce("Not a value property: "+e);var n=Object(o.e)(t.storedValue,e).value;if(!n)throw ce("Node not available for property "+e);return n},e.prototype.getSnapshot=function(t,e){var n=this;void 0===e&&(e=!0);var r={};return this.forAllProps((function(e,i){Object(o.l)(t.storedValue,e).reportObserved(),r[e]=n.getChildNode(t,e).snapshot})),e?this.applySnapshotPostProcessor(r):r},e.prototype.processInitialSnapshot=function(t){var e={};return Object.keys(t).forEach((function(n){e[n]=t[n].getSnapshot()})),this.applySnapshotPostProcessor(e)},e.prototype.applyPatchLocally=function(t,e,n){if("replace"!==n.op&&"add"!==n.op)throw ce("object does not support operation "+n.op);t.storedValue[e]=n.value},e.prototype.applySnapshot=function(t,e){var n=this.applySnapshotPreProcessor(e);Vt(this,n),this.forAllProps((function(e){t.storedValue[e]=n[e]}))},e.prototype.applySnapshotPreProcessor=function(t){var e=this.preProcessor;return e?e.call(null,t):t},e.prototype.applySnapshotPostProcessor=function(t){var e=this.postProcessor;return e?e.call(null,t):t},e.prototype.getChildType=function(t){return Te(),this.properties[t]},e.prototype.isValidSnapshot=function(t,e){var n=this,r=this.applySnapshotPreProcessor(t);return me(r)?Gt(this.propertyNames.map((function(t){return n.properties[t].validate(r[t],Bt(e,t,n.properties[t]))}))):Ut(e,r,"Value is not a plain object")},e.prototype.forAllProps=function(t){var e=this;this.propertyNames.forEach((function(n){return t(n,e.properties[n])}))},e.prototype.describe=function(){var t=this;return"{ "+this.propertyNames.map((function(e){return e+": "+t.properties[e].describe()})).join("; ")+" }"},e.prototype.getDefaultSnapshot=function(){return ue},e.prototype.removeChild=function(t,e){t.storedValue[e]=void 0},p([o.g],e.prototype,"applySnapshot",null),e}(ft);function an(t){return pt(t)&&(t.flags&rt.Object)>0}var sn=function(t){function e(e,n,r,i){void 0===i&&(i=fe);var o=t.call(this,e)||this;return o.flags=n,o.checker=r,o.initializer=i,o.flags=n,o}return f(e,t),e.prototype.describe=function(){return this.name},e.prototype.instantiate=function(t,e,n,r){return Zt(this,t,e,n,r)},e.prototype.createNewInstance=function(t){return this.initializer(t)},e.prototype.isValidSnapshot=function(t,e){return ye(t)&&this.checker(t)?zt():Ut(e,t,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))},e}(ht),un=new sn("string",rt.String,(function(t){return"string"===typeof t})),ln=new sn("number",rt.Number,(function(t){return"number"===typeof t})),cn=new sn("integer",rt.Integer,(function(t){return he(t)})),fn=new sn("boolean",rt.Boolean,(function(t){return"boolean"===typeof t})),hn=new sn("null",rt.Null,(function(t){return null===t})),pn=new sn("undefined",rt.Undefined,(function(t){return void 0===t})),dn=new sn("Date",rt.Date,(function(t){return"number"===typeof t||t instanceof Date}),(function(t){return t instanceof Date?t:new Date(t)}));dn.getSnapshot=function(t){return t.storedValue.getTime()};var mn=dn;function gn(t){return pt(t)&&(t.flags&(rt.String|rt.Number|rt.Integer|rt.Boolean|rt.Date))>0}var yn=function(t){function e(e){var n=t.call(this,JSON.stringify(e))||this;return n.flags=rt.Literal,n.value=e,n}return f(e,t),e.prototype.instantiate=function(t,e,n,r){return Zt(this,t,e,n,r)},e.prototype.describe=function(){return JSON.stringify(this.value)},e.prototype.isValidSnapshot=function(t,e){return ye(t)&&t===this.value?zt():Ut(e,t,"Value is not a literal "+JSON.stringify(this.value))},e}(ht);function vn(t){return Se(),new yn(t)}function bn(t){return pt(t)&&(t.flags&rt.Literal)>0}var _n=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._subtype=n,o._predicate=r,o._message=i,o}return f(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return this._subtype.flags|rt.Refinement},enumerable:!1,configurable:!0}),e.prototype.describe=function(){return this.name},e.prototype.instantiate=function(t,e,n,r){return this._subtype.instantiate(t,e,n,r)},e.prototype.isAssignableFrom=function(t){return this._subtype.isAssignableFrom(t)},e.prototype.isValidSnapshot=function(t,e){var n=this._subtype.validate(t,e);if(n.length>0)return n;var r=Kt(t)?Jt(t).snapshot:t;return this._predicate(r)?zt():Ut(e,t,this._message(t))},e.prototype.reconcile=function(t,e,n,r){return this._subtype.reconcile(t,e,n,r)},e.prototype.getSubTypes=function(){return this._subtype},e}(ct);function An(t){return(t.flags&rt.Refinement)>0}var wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i._types=n,i._eager=!0,r=h({eager:!0,dispatcher:void 0},r),i._dispatcher=r.dispatcher,r.eager||(i._eager=!1),i}return f(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){var t=rt.Union;return this._types.forEach((function(e){t|=e.flags})),t},enumerable:!1,configurable:!0}),e.prototype.isAssignableFrom=function(t){return this._types.some((function(e){return e.isAssignableFrom(t)}))},e.prototype.describe=function(){return"("+this._types.map((function(t){return t.describe()})).join(" | ")+")"},e.prototype.instantiate=function(t,e,n,r){var i=this.determineType(r,void 0);if(!i)throw ce("No matching type for union "+this.describe());return i.instantiate(t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){var i=this.determineType(e,t.type);if(!i)throw ce("No matching type for union "+this.describe());return i.reconcile(t,e,n,r)},e.prototype.determineType=function(t,e){return this._dispatcher?this._dispatcher(t):e?e.is(t)?e:this._types.filter((function(t){return t!==e})).find((function(e){return e.is(t)})):this._types.find((function(e){return e.is(t)}))},e.prototype.isValidSnapshot=function(t,e){if(this._dispatcher)return this._dispatcher(t).validate(t,e);for(var n=[],r=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(t,e);if(0===o.length){if(this._eager)return zt();r++}else n.push(o)}return 1===r?zt():Ut(e,t,"No type is applicable for the union").concat(Gt(n))},e.prototype.getSubTypes=function(){return this._types},e}(ct);function xn(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=pt(t)?void 0:t,i=pt(t)?y([t],e):e,o="("+i.map((function(t){return t.name})).join(" | ")+")";return new wn(o,i,r)}function En(t){return(t.flags&rt.Union)>0}var On=function(t){function e(e,n,r){var i=t.call(this,e.name)||this;return i._subtype=e,i._defaultValue=n,i.optionalValues=r,i}return f(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return this._subtype.flags|rt.Optional},enumerable:!1,configurable:!0}),e.prototype.describe=function(){return this._subtype.describe()+"?"},e.prototype.instantiate=function(t,e,n,r){if(this.optionalValues.indexOf(r)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(t,e,n,i)}return this._subtype.instantiate(t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){return this._subtype.reconcile(t,this.optionalValues.indexOf(e)<0&&this._subtype.is(e)?e:this.getDefaultInstanceOrSnapshot(),n,r)},e.prototype.getDefaultInstanceOrSnapshot=function(){var t="function"===typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"===typeof this._defaultValue&&Vt(this,t),t},e.prototype.isValidSnapshot=function(t,e){return this.optionalValues.indexOf(t)>=0?zt():this._subtype.validate(t,e)},e.prototype.isAssignableFrom=function(t){return this._subtype.isAssignableFrom(t)},e.prototype.getSubTypes=function(){return this._subtype},e}(ct);function Sn(t,e,n){return function(t,e){if("function"!==typeof e&&Kt(e))throw ce("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");dt(t,1)}(t,e),new On(t,e,n||Pn)}var Pn=[void 0];function Cn(t){return pt(t)&&(t.flags&rt.Optional)>0}var Tn=Sn(pn,void 0),kn=Sn(hn,null);function In(t){return dt(t,1),xn(t,Tn)}var Ln=function(t){function e(e,n){var r=t.call(this,e)||this;return r._definition=n,r}return f(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|rt.Late},enumerable:!1,configurable:!0}),e.prototype.getSubType=function(t){if(!this._subType){var e=void 0;try{e=this._definition()}catch(n){if(!(n instanceof ReferenceError))throw n;e=void 0}if(t&&void 0===e)throw ce("Late type seems to be used too early, the definition (still) returns undefined");e&&(this._subType=e)}return this._subType},e.prototype.instantiate=function(t,e,n,r){return this.getSubType(!0).instantiate(t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){return this.getSubType(!0).reconcile(t,e,n,r)},e.prototype.describe=function(){var t=this.getSubType(!1);return t?t.name:"<uknown late type>"},e.prototype.isValidSnapshot=function(t,e){var n=this.getSubType(!1);return n?n.validate(t,e):zt()},e.prototype.isAssignableFrom=function(t){var e=this.getSubType(!1);return!!e&&e.isAssignableFrom(t)},e.prototype.getSubTypes=function(){var t=this.getSubType(!1);return t||lt},e}(ct);function jn(t){return pt(t)&&(t.flags&rt.Late)>0}var Mn=function(t){function e(e){var n=t.call(this,e?"frozen("+e.name+")":"frozen")||this;return n.subType=e,n.flags=rt.Frozen,n}return f(e,t),e.prototype.describe=function(){return"<any immutable value>"},e.prototype.instantiate=function(t,e,n,r){return Zt(this,t,e,n,r)},e.prototype.isValidSnapshot=function(t,e){return function(t){return"function"!==typeof t}(t)?this.subType?this.subType.validate(t,e):zt():Ut(e,t,"Value is not serializable and cannot be frozen")},e}(ht),Rn=new Mn;function Nn(t){return pt(t)&&(t.flags&rt.Frozen)>0}var Dn=function(){function t(t,e){if(this.targetType=e,$n(t))this.identifier=t;else{if(!Kt(t))throw ce("Can only store references to tree nodes or identifiers, got: '"+t+"'");var n=Jt(t);if(!n.identifierAttribute)throw ce("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null===r||void 0===r)throw ce("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return t.prototype.updateResolvedReference=function(t){var e=Kn(this.identifier),n=t.root,r=n.identifierCache.getLastCacheModificationPerId(e);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var i=this.targetType,o=n.identifierCache.resolve(i,e);if(!o)throw new Fn("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+t.path+")");this.resolvedReference={node:o,lastCacheModification:r}}},Object.defineProperty(t.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),t}(),Fn=function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return f(e,t),e}(Error),Bn=function(t){function e(e,n){var r=t.call(this,"reference("+e.name+")")||this;return r.targetType=e,r.onInvalidated=n,r.flags=rt.Reference,r}return f(e,t),e.prototype.describe=function(){return this.name},e.prototype.isAssignableFrom=function(t){return this.targetType.isAssignableFrom(t)},e.prototype.isValidSnapshot=function(t,e){return $n(t)?zt():Ut(e,t,"Value is not a valid identifier, which is a string or a number")},e.prototype.fireInvalidated=function(t,e,n,r){var i=e.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:t,parent:o,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(t){w(e.root.storedValue,{op:"replace",value:t,path:e.path})},removeRef:function(){an(i.type)?this.replaceRef(void 0):w(e.root.storedValue,{op:"remove",path:e.path})}})}},e.prototype.addTargetNodeWatcher=function(t,e){var n=this,r=this.getValue(t);if(r){var o=Jt(r),a=function(r,a){var s=function(t){switch(t){case i.beforeDestroy:return"destroy";case i.beforeDetach:return"detach";default:return}}(a);s&&n.fireInvalidated(s,t,e,o)},s=o.registerHook(i.beforeDetach,a),u=o.registerHook(i.beforeDestroy,a);return function(){s(),u()}}},e.prototype.watchTargetNodeForInvalidations=function(t,e,n){var r=this;if(this.onInvalidated){var o;t.registerHook(i.beforeDestroy,(function(){o&&o()}));var a=function(i){o&&o();var a=t.parent,s=a&&a.storedValue;if(a&&a.isAlive&&s){(n?!!n.get(e,s):t.root.identifierCache.has(r.targetType,Kn(e)))?o=r.addTargetNodeWatcher(t,e):i||r.fireInvalidated("invalidSnapshotReference",t,e,null)}};t.state===Ht.FINALIZED?a(!0):(t.isRoot||t.root.registerHook(i.afterCreationFinalization,(function(){t.parent&&t.parent.createObservableInstanceIfNeeded()})),t.registerHook(i.afterAttach,(function(){a(!1)})))}},e}(ht),zn=function(t){function e(e,n){return t.call(this,e,n)||this}return f(e,t),e.prototype.getValue=function(t){if(t.isAlive)return t.storedValue.resolvedValue},e.prototype.getSnapshot=function(t){return t.storedValue.identifier},e.prototype.instantiate=function(t,e,n,r){var i=Kt(r)?B(r):r,o=new Dn(r,this.targetType),a=Zt(this,t,e,n,o);return o.node=a,this.watchTargetNodeForInvalidations(a,i,void 0),a},e.prototype.reconcile=function(t,e,n,r){if(!t.isDetaching&&t.type===this){var i=Kt(e),o=t.storedValue;if(!i&&o.identifier===e||i&&o.resolvedValue===e)return t.setParent(n,r),t}var a=this.instantiate(n,r,void 0,e);return t.die(),a},e}(Bn),Un=function(t){function e(e,n,r){var i=t.call(this,e,r)||this;return i.options=n,i}return f(e,t),e.prototype.getValue=function(t){if(t.isAlive)return this.options.get(t.storedValue,t.parent?t.parent.storedValue:null)},e.prototype.getSnapshot=function(t){return t.storedValue},e.prototype.instantiate=function(t,e,n,r){var i=Kt(r)?this.options.set(r,t?t.storedValue:null):r,o=Zt(this,t,e,n,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o},e.prototype.reconcile=function(t,e,n,r){var i=Kt(e)?this.options.set(e,t?t.storedValue:null):e;if(!t.isDetaching&&t.type===this&&t.storedValue===i)return t.setParent(n,r),t;var o=this.instantiate(n,r,void 0,i);return t.die(),o},e}(Bn);function Gn(t,e){dt(t,1);var n=e||void 0,r=e?e.onInvalidated:void 0;return n&&(n.get||n.set)?new Un(t,{get:n.get,set:n.set},r):new zn(t,r)}function Vn(t){return(t.flags&rt.Reference)>0}var qn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.validType=n,r.flags=rt.Identifier,r}return f(e,t),e.prototype.instantiate=function(t,e,n,r){if(!t||!(t.type instanceof on))throw ce("Identifier types can only be instantiated as direct child of a model type");return Zt(this,t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){if(t.storedValue!==e)throw ce("Tried to change identifier from '"+t.storedValue+"' to '"+e+"'. Changing identifiers is not allowed.");return t.setParent(n,r),t},e.prototype.isValidSnapshot=function(t,e){return typeof t!==this.validType?Ut(e,t,"Value is not a valid "+this.describe()+", expected a "+this.validType):zt()},e}(ht),Hn=function(t){function e(){var e=t.call(this,"identifier","string")||this;return e.flags=rt.Identifier,e}return f(e,t),e.prototype.describe=function(){return"identifier"},e}(qn),Wn=function(t){function e(){return t.call(this,"identifierNumber","number")||this}return f(e,t),e.prototype.getSnapshot=function(t){return t.storedValue},e.prototype.describe=function(){return"identifierNumber"},e}(qn),Xn=new Hn,Yn=new Wn;function Zn(t){return pt(t)&&(t.flags&rt.Identifier)>0}function Kn(t){return""+t}function $n(t){return"string"===typeof t||"number"===typeof t}var Jn=function(t){function e(e){var n=t.call(this,e.name)||this;return n.options=e,n.flags=rt.Custom,n}return f(e,t),e.prototype.describe=function(){return this.name},e.prototype.isValidSnapshot=function(t,e){if(this.options.isTargetType(t))return zt();var n=this.options.getValidationMessage(t);return n?Ut(e,t,"Invalid value for type '"+this.name+"': "+n):zt()},e.prototype.getSnapshot=function(t){return this.options.toSnapshot(t.storedValue)},e.prototype.instantiate=function(t,e,n,r){return Zt(this,t,e,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r,t&&t.root.environment))},e.prototype.reconcile=function(t,e,n,r){var i=!this.options.isTargetType(e);if(!t.isDetaching&&(t.type===this&&(i?e===t.snapshot:e===t.storedValue)))return t.setParent(n,r),t;var o=i?this.options.fromSnapshot(e,n.root.environment):e,a=this.instantiate(n,r,void 0,o);return t.die(),a},e}(ht),Qn={enumeration:function(t,e){var n="string"===typeof t?e:t,r=xn.apply(void 0,y(n.map((function(t){return vn(""+t)}))));return"string"===typeof t&&(r.name=t),r},model:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="string"===typeof t[0]?t.shift():"AnonymousModel",r=t.shift()||{};return new on({name:n,properties:r})},compose:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="string"===typeof t[0],r=n?t[0]:"AnonymousModel";return n&&t.shift(),t.reduce((function(t,e){return t.cloneAndEnhance({name:t.name+"_"+e.name,properties:e.properties,initializers:e.initializers,preProcessor:function(n){return e.applySnapshotPreProcessor(t.applySnapshotPreProcessor(n))},postProcessor:function(n){return e.applySnapshotPostProcessor(t.applySnapshotPostProcessor(n))}})})).named(r)},custom:function(t){return new Jn(t)},reference:Gn,safeReference:function(t,e){var n=Gn(t,h(h({},e),{onInvalidated:function(t){e&&e.onInvalidated&&e.onInvalidated(t),t.removeRef()}}));return e&&!1===e.acceptsUndefined?n:In(n)},union:xn,optional:Sn,literal:vn,maybe:In,maybeNull:function(t){return dt(t,1),xn(t,kn)},refinement:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="string"===typeof t[0]?t.shift():pt(t[0])?t[0].name:null,r=t[0],i=t[1],o=t[2]?t[2]:function(t){return"Value does not respect the refinement predicate"};return dt(r,[1,2]),Te(),Pe(),Pe(),new _n(n,r,i,o)},string:un,boolean:fn,number:ln,integer:cn,Date:mn,map:function(t){return new We("map<string, "+t.name+">",t)},array:function(t){return dt(t,1),new Ye(t.name+"[]",t)},frozen:function(t){return 0===arguments.length?Rn:pt(t)?new Mn(t):Sn(Rn,t)},identifier:Xn,identifierNumber:Yn,late:function(t,e){var n="string"===typeof t?t:"late("+t.toString()+")",r="string"===typeof t?e:t;return new Ln(n,r)},undefined:pn,null:hn,snapshotProcessor:function(t,e,n){return dt(t,1),new Ue(t,e,n)}}}.call(this,n(68),n(330).setImmediate)},function(t,e,n){t.exports=n(632)()},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"ServerStyleSheet",(function(){return Bt})),n.d(e,"StyleSheetConsumer",(function(){return it})),n.d(e,"StyleSheetContext",(function(){return rt})),n.d(e,"StyleSheetManager",(function(){return ct})),n.d(e,"ThemeConsumer",(function(){return It})),n.d(e,"ThemeContext",(function(){return kt})),n.d(e,"ThemeProvider",(function(){return Lt})),n.d(e,"__PRIVATE__",(function(){return Gt})),n.d(e,"createGlobalStyle",(function(){return Dt})),n.d(e,"css",(function(){return bt})),n.d(e,"isStyledComponent",(function(){return _})),n.d(e,"keyframes",(function(){return Ft})),n.d(e,"useTheme",(function(){return Ut})),n.d(e,"version",(function(){return w})),n.d(e,"withTheme",(function(){return zt}));var r=n(226),i=n(0),o=n.n(i),a=n(831),s=n.n(a),u=n(430),l=n(338),c=n(383),f=n(179),h=n.n(f);function p(){return(p=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=function(t,e){for(var n=[t[0]],r=0,i=e.length;r<i;r+=1)n.push(e[r],t[r+1]);return n},m=function(t){return null!==t&&"object"==typeof t&&"[object Object]"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!Object(r.typeOf)(t)},g=Object.freeze([]),y=Object.freeze({});function v(t){return"function"==typeof t}function b(t){return t.displayName||t.name||"Component"}function _(t){return t&&"string"==typeof t.styledComponentId}var A="undefined"!=typeof t&&(t.env.REACT_APP_SC_ATTR||t.env.SC_ATTR)||"data-styled",w="5.2.1",x="undefined"!=typeof window&&"HTMLElement"in window,E=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==t.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&t.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env.SC_DISABLE_SPEEDY&&""!==t.env.SC_DISABLE_SPEEDY&&("false"!==t.env.SC_DISABLE_SPEEDY&&t.env.SC_DISABLE_SPEEDY)),O={};function S(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+t+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var P=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=t.prototype;return e.indexOfGroup=function(t){for(var e=0,n=0;n<t;n++)e+=this.groupSizes[n];return e},e.insertRules=function(t,e){if(t>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;t>=i;)(i<<=1)<0&&S(16,""+t);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(t+1),s=0,u=e.length;s<u;s++)this.tag.insertRule(a,e[s])&&(this.groupSizes[t]++,a++)},e.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),r=n+e;this.groupSizes[t]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},e.getGroup=function(t){var e="";if(t>=this.length||0===this.groupSizes[t])return e;for(var n=this.groupSizes[t],r=this.indexOfGroup(t),i=r+n,o=r;o<i;o++)e+=this.tag.getRule(o)+"/*!sc*/\n";return e},t}(),C=new Map,T=new Map,k=1,I=function(t){if(C.has(t))return C.get(t);for(;T.has(k);)k++;var e=k++;return C.set(t,e),T.set(e,t),e},L=function(t){return T.get(t)},j=function(t,e){C.set(t,e),T.set(e,t)},M="style["+A+'][data-styled-version="5.2.1"]',R=new RegExp("^"+A+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),N=function(t,e,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&t.registerName(e,r)},D=function(t,e){for(var n=e.innerHTML.split("/*!sc*/\n"),r=[],i=0,o=n.length;i<o;i++){var a=n[i].trim();if(a){var s=a.match(R);if(s){var u=0|parseInt(s[1],10),l=s[2];0!==u&&(j(l,u),N(t,l,s[3]),t.getTag().insertRules(u,r)),r.length=0}else r.push(a)}}},F=function(){return n.nc},B=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=function(t){for(var e=t.childNodes,n=e.length;n>=0;n--){var r=e[n];if(r&&1===r.nodeType&&r.hasAttribute(A))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(A,"active"),r.setAttribute("data-styled-version","5.2.1");var a=F();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},z=function(){function t(t){var e=this.element=B(t);e.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,n=0,r=e.length;n<r;n++){var i=e[n];if(i.ownerNode===t)return i}S(17)}(e),this.length=0}var e=t.prototype;return e.insertRule=function(t,e){try{return this.sheet.insertRule(e,t),this.length++,!0}catch(t){return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var e=this.sheet.cssRules[t];return void 0!==e&&"string"==typeof e.cssText?e.cssText:""},t}(),U=function(){function t(t){var e=this.element=B(t);this.nodes=e.childNodes,this.length=0}var e=t.prototype;return e.insertRule=function(t,e){if(t<=this.length&&t>=0){var n=document.createTextNode(e),r=this.nodes[t];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},t}(),G=function(){function t(t){this.rules=[],this.length=0}var e=t.prototype;return e.insertRule=function(t,e){return t<=this.length&&(this.rules.splice(t,0,e),this.length++,!0)},e.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.getRule=function(t){return t<this.length?this.rules[t]:""},t}(),V=x,q={isServer:!x,useCSSOMInjection:!E},H=function(){function t(t,e,n){void 0===t&&(t=y),void 0===e&&(e={}),this.options=p({},q,{},t),this.gs=e,this.names=new Map(n),!this.options.isServer&&x&&V&&(V=!1,function(t){for(var e=document.querySelectorAll(M),n=0,r=e.length;n<r;n++){var i=e[n];i&&"active"!==i.getAttribute(A)&&(D(t,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}t.registerId=function(t){return I(t)};var e=t.prototype;return e.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(p({},this.options,{},e),this.gs,n&&this.names||void 0)},e.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.getTag=function(){return this.tag||(this.tag=(n=(e=this.options).isServer,r=e.useCSSOMInjection,i=e.target,t=n?new G(i):r?new z(i):new U(i),new P(t)));var t,e,n,r,i},e.hasNameForId=function(t,e){return this.names.has(t)&&this.names.get(t).has(e)},e.registerName=function(t,e){if(I(t),this.names.has(t))this.names.get(t).add(e);else{var n=new Set;n.add(e),this.names.set(t,n)}},e.insertRules=function(t,e,n){this.registerName(t,e),this.getTag().insertRules(I(t),n)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(I(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var e=t.getTag(),n=e.length,r="",i=0;i<n;i++){var o=L(i);if(void 0!==o){var a=t.names.get(o),s=e.getGroup(i);if(void 0!==a&&0!==s.length){var u=A+".g"+i+'[id="'+o+'"]',l="";void 0!==a&&a.forEach((function(t){t.length>0&&(l+=t+",")})),r+=""+s+u+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},t}(),W=/(a)(d)/gi,X=function(t){return String.fromCharCode(t+(t>25?39:97))};function Y(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=X(e%52)+n;return(X(e%52)+n).replace(W,"$1-$2")}var Z=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},K=function(t){return Z(5381,t)};function $(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(v(n)&&!_(n))return!1}return!0}var J=K("5.2.1"),Q=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&$(t),this.componentId=e,this.baseHash=Z(J,e),this.baseStyle=n,H.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,e,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=vt(this.rules,t,e,n).join(""),a=Y(Z(this.baseHash,o.length)>>>0);if(!e.hasNameForId(r,a)){var s=n(o,"."+a,void 0,r);e.insertRules(r,a,s)}i.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,l=Z(this.baseHash,n.hash),c="",f=0;f<u;f++){var h=this.rules[f];if("string"==typeof h)c+=h;else if(h){var p=vt(h,t,e,n),d=Array.isArray(p)?p.join(""):p;l=Z(l,d+f),c+=d}}if(c){var m=Y(l>>>0);if(!e.hasNameForId(r,m)){var g=n(c,"."+m,void 0,r);e.insertRules(r,m,g)}i.push(m)}}return i.join(" ")},t}(),tt=/^\s*\/\/.*$/gm,et=[":","[",".","#"];function nt(t){var e,n,r,i,o=void 0===t?y:t,a=o.options,s=void 0===a?y:a,l=o.plugins,c=void 0===l?g:l,f=new u.a(s),h=[],p=function(t){function e(e){if(e)try{t(e+"}")}catch(t){}}return function(n,r,i,o,a,s,u,l,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return t(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return t(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(e)}}}((function(t){h.push(t)})),d=function(t,r,o){return 0===r&&et.includes(o[n.length])||o.match(i)?t:"."+e};function m(t,o,a,s){void 0===s&&(s="&");var u=t.replace(tt,""),l=o&&a?a+" "+o+" { "+u+" }":u;return e=s,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),f(a||!o?"":o,l)}return f.use([].concat(c,[function(t,e,i){2===t&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,d))},p,function(t){if(-2===t){var e=h;return h=[],e}}])),m.hash=c.length?c.reduce((function(t,e){return e.name||S(15),Z(t,e.name)}),5381).toString():"",m}var rt=o.a.createContext(),it=rt.Consumer,ot=o.a.createContext(),at=(ot.Consumer,new H),st=nt();function ut(){return Object(i.useContext)(rt)||at}function lt(){return Object(i.useContext)(ot)||st}function ct(t){var e=Object(i.useState)(t.stylisPlugins),n=e[0],r=e[1],a=ut(),u=Object(i.useMemo)((function(){var e=a;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),l=Object(i.useMemo)((function(){return nt({options:{prefix:!t.disableVendorPrefixes},plugins:n})}),[t.disableVendorPrefixes,n]);return Object(i.useEffect)((function(){s()(n,t.stylisPlugins)||r(t.stylisPlugins)}),[t.stylisPlugins]),o.a.createElement(rt.Provider,{value:u},o.a.createElement(ot.Provider,{value:l},t.children))}var ft=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=st);var r=n.name+e.hash;t.hasNameForId(n.id,r)||t.insertRules(n.id,r,e(n.rules,r,"@keyframes"))},this.toString=function(){return S(12,String(n.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=e}return t.prototype.getName=function(t){return void 0===t&&(t=st),this.name+t.hash},t}(),ht=/([A-Z])/,pt=/([A-Z])/g,dt=/^ms-/,mt=function(t){return"-"+t.toLowerCase()};function gt(t){return ht.test(t)?t.replace(pt,mt).replace(dt,"-ms-"):t}var yt=function(t){return null==t||!1===t||""===t};function vt(t,e,n,r){if(Array.isArray(t)){for(var i,o=[],a=0,s=t.length;a<s;a+=1)""!==(i=vt(t[a],e,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return yt(t)?"":_(t)?"."+t.styledComponentId:v(t)?"function"!=typeof(u=t)||u.prototype&&u.prototype.isReactComponent||!e?t:vt(t(e),e,n,r):t instanceof ft?n?(t.inject(n,r),t.getName(r)):t:m(t)?function t(e,n){var r,i,o=[];for(var a in e)e.hasOwnProperty(a)&&!yt(e[a])&&(m(e[a])?o.push.apply(o,t(e[a],a)):v(e[a])?o.push(gt(a)+":",e[a],";"):o.push(gt(a)+": "+(r=a,(null==(i=e[a])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in l.a?String(i).trim():i+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(t):t.toString();var u}function bt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return v(t)||m(t)?vt(d(g,[t].concat(n))):0===n.length&&1===t.length&&"string"==typeof t[0]?t:vt(d(t,n))}new Set;var _t=function(t,e,n){return void 0===n&&(n=y),t.theme!==n.theme&&t.theme||e||n.theme},At=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,wt=/(^-|-$)/g;function xt(t){return t.replace(At,"-").replace(wt,"")}var Et=function(t){return Y(K(t)>>>0)};function Ot(t){return"string"==typeof t&&!0}var St=function(t){return"function"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)},Pt=function(t){return"__proto__"!==t&&"constructor"!==t&&"prototype"!==t};function Ct(t,e,n){var r=t[n];St(e)&&St(r)?Tt(r,e):t[n]=e}function Tt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];if(St(a))for(var s in a)Pt(s)&&Ct(t,a[s],s)}return t}var kt=o.a.createContext(),It=kt.Consumer;function Lt(t){var e=Object(i.useContext)(kt),n=Object(i.useMemo)((function(){return function(t,e){return t?v(t)?t(e):Array.isArray(t)||"object"!=typeof t?S(8):e?p({},e,{},t):t:S(14)}(t.theme,e)}),[t.theme,e]);return t.children?o.a.createElement(kt.Provider,{value:n},t.children):null}var jt={};function Mt(t,e,n){var r=_(t),a=!Ot(t),s=e.attrs,u=void 0===s?g:s,l=e.componentId,f=void 0===l?function(t,e){var n="string"!=typeof t?"sc":xt(t);jt[n]=(jt[n]||0)+1;var r=n+"-"+Et("5.2.1"+n+jt[n]);return e?e+"-"+r:r}(e.displayName,e.parentComponentId):l,d=e.displayName,m=void 0===d?function(t){return Ot(t)?"styled."+t:"Styled("+b(t)+")"}(t):d,A=e.displayName&&e.componentId?xt(e.displayName)+"-"+e.componentId:e.componentId||f,w=r&&t.attrs?Array.prototype.concat(t.attrs,u).filter(Boolean):u,x=e.shouldForwardProp;r&&t.shouldForwardProp&&(x=e.shouldForwardProp?function(n,r){return t.shouldForwardProp(n,r)&&e.shouldForwardProp(n,r)}:t.shouldForwardProp);var E,O=new Q(n,A,r?t.componentStyle:void 0),S=O.isStatic&&0===u.length,P=function(t,e){return function(t,e,n,r){var o=t.attrs,a=t.componentStyle,s=t.defaultProps,u=t.foldedComponentIds,l=t.shouldForwardProp,f=t.styledComponentId,h=t.target,d=function(t,e,n){void 0===t&&(t=y);var r=p({},e,{theme:t}),i={};return n.forEach((function(t){var e,n,o,a=t;for(e in v(a)&&(a=a(r)),a)r[e]=i[e]="className"===e?(n=i[e],o=a[e],n&&o?n+" "+o:n||o):a[e]})),[r,i]}(_t(e,Object(i.useContext)(kt),s)||y,e,o),m=d[0],g=d[1],b=function(t,e,n,r){var i=ut(),o=lt();return e?t.generateAndInjectStyles(y,i,o):t.generateAndInjectStyles(n,i,o)}(a,r,m),_=n,A=g.$as||e.$as||g.as||e.as||h,w=Ot(A),x=g!==e?p({},e,{},g):e,E={};for(var O in x)"$"!==O[0]&&"as"!==O&&("forwardedAs"===O?E.as=x[O]:(l?l(O,c.default):!w||Object(c.default)(O))&&(E[O]=x[O]));return e.style&&g.style!==e.style&&(E.style=p({},e.style,{},g.style)),E.className=Array.prototype.concat(u,f,b!==f?b:null,e.className,g.className).filter(Boolean).join(" "),E.ref=_,Object(i.createElement)(A,E)}(E,t,e,S)};return P.displayName=m,(E=o.a.forwardRef(P)).attrs=w,E.componentStyle=O,E.displayName=m,E.shouldForwardProp=x,E.foldedComponentIds=r?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):g,E.styledComponentId=A,E.target=r?t.target:t,E.withComponent=function(t){var r=e.componentId,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}(e,["componentId"]),o=r&&r+"-"+(Ot(t)?t:xt(b(t)));return Mt(t,p({},i,{attrs:w,componentId:o}),n)},Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?Tt({},t.defaultProps,e):e}}),E.toString=function(){return"."+E.styledComponentId},a&&h()(E,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),E}var Rt=function(t){return function t(e,n,i){if(void 0===i&&(i=y),!Object(r.isValidElementType)(n))return S(1,String(n));var o=function(){return e(n,i,bt.apply(void 0,arguments))};return o.withConfig=function(r){return t(e,n,p({},i,{},r))},o.attrs=function(r){return t(e,n,p({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},o}(Mt,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(t){Rt[t]=Rt(t)}));var Nt=function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=$(t),H.registerId(this.componentId+1)}var e=t.prototype;return e.createStyles=function(t,e,n,r){var i=r(vt(this.rules,e,n,r).join(""),""),o=this.componentId+t;n.insertRules(o,o,i)},e.removeStyles=function(t,e){e.clearRules(this.componentId+t)},e.renderStyles=function(t,e,n,r){t>2&&H.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,r)},t}();function Dt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var a=bt.apply(void 0,[t].concat(n)),s="sc-global-"+Et(JSON.stringify(a)),u=new Nt(a,s);function l(t){var e=ut(),n=lt(),r=Object(i.useContext)(kt),o=Object(i.useRef)(e.allocateGSInstance(s)).current;return Object(i.useLayoutEffect)((function(){return c(o,t,e,r,n),function(){return u.removeStyles(o,e)}}),[o,t,e,r,n]),null}function c(t,e,n,r,i){if(u.isStatic)u.renderStyles(t,O,n,i);else{var o=p({},e,{theme:_t(e,r,l.defaultProps)});u.renderStyles(t,o,n,i)}}return o.a.memo(l)}function Ft(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=bt.apply(void 0,[t].concat(n)).join(""),o=Et(i);return new ft(o,i)}var Bt=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=F();return"<style "+[n&&'nonce="'+n+'"',A+'="true"','data-styled-version="5.2.1"'].filter(Boolean).join(" ")+">"+e+"</style>"},this.getStyleTags=function(){return t.sealed?S(2):t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)return S(2);var n=((e={})[A]="",e["data-styled-version"]="5.2.1",e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),r=F();return r&&(n.nonce=r),[o.a.createElement("style",p({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new H({isServer:!0}),this.sealed=!1}var e=t.prototype;return e.collectStyles=function(t){return this.sealed?S(2):o.a.createElement(ct,{sheet:this.instance},t)},e.interleaveWithNodeStream=function(t){return S(3)},t}(),zt=function(t){var e=o.a.forwardRef((function(e,n){var r=Object(i.useContext)(kt),a=t.defaultProps,s=_t(e,r,a);return o.a.createElement(t,p({},e,{theme:s,ref:n}))}));return h()(e,t),e.displayName="WithTheme("+b(t)+")",e},Ut=function(){return Object(i.useContext)(kt)},Gt={StyleSheet:H,masterSheet:at};e.default=Rt}.call(this,n(68))},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s}));var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=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},o.apply(this,arguments)};function a(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 s(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}},function(t,e,n){"use strict";n.d(e,"k",(function(){return r})),n.d(e,"i",(function(){return a})),n.d(e,"j",(function(){return s})),n.d(e,"g",(function(){return u})),n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"f",(function(){return q})),n.d(e,"n",(function(){return V})),n.d(e,"l",(function(){return H})),n.d(e,"o",(function(){return W})),n.d(e,"c",(function(){return rt})),n.d(e,"m",(function(){return ot})),n.d(e,"h",(function(){return it})),n.d(e,"e",(function(){return Y})),n.d(e,"d",(function(){return Z}));const r=new(n(1135).a)({id:"luma.gl"});function i(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}const o="Invalid WebGLRenderingContext";function a(t){return"undefined"!==typeof WebGLRenderingContext&&t instanceof WebGLRenderingContext||("undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&Number.isFinite(t._version)))}function s(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}function u(t){return s(t)?t:null}function l(t){return i(a(t),o),t}function c(t){return i(s(t),"Requires WebGL2"),t}const f={};function h(t,e){var n;f[t]=!0,void 0!==e&&(n=e,globalThis.console&&globalThis.console.error&&globalThis.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 d=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,a,s){const u=e.currentVertexArrayObject;u.maxAttrib=Math.max(u.maxAttrib,t);const l=u.attribs[t];return l.buffer=e.currentArrayBuffer,l.size=r,l.type=i,l.normalized=o,l.stride=a,l.offset=s,l.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",globalThis.console&&globalThis.console.log&&globalThis.console.log(t),e.reset_()}),!0),this.reset_()};d.prototype.VERTEX_ARRAY_BINDING_OES=34229,d.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=new p(this),this.currentVertexArrayObject=null,this.currentArrayBuffer=null,this.vertexArrayObjects=[this.defaultVertexArrayObject],this.bindVertexArrayOES(null)},d.prototype.createVertexArrayOES=function(){const t=new p(this);return this.vertexArrayObjects.push(t),t},d.prototype.deleteVertexArrayOES=function(t){t.isAlive=!1,this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(t),1),this.currentVertexArrayObject===t&&this.bindVertexArrayOES(null)},d.prototype.isVertexArrayOES=function(t){return!!(t&&t instanceof p&&t.hasBeenBound&&t.ext===this)},d.prototype.bindVertexArrayOES=function(t){const e=this.gl;if(t&&!t.isAlive)return void h(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 a=Math.max(r?r.maxAttrib:0,i.maxAttrib);for(let s=0;s<=a;s++){const t=i.attribs[s],a=r?r.attribs[s]:null;if(r&&t.enabled===a.enabled||(t.enabled?n.enableVertexAttribArray.call(e,s):n.disableVertexAttribArray.call(e,s)),t.enabled){let i=!1;r&&t.buffer===a.buffer||(o!==t.buffer&&(n.bindBuffer.call(e,34962,t.buffer),o=t.buffer),i=!0),(i||t.cached!==a.cached)&&n.vertexAttribPointer.call(e,s,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",g="WEBGL_draw_buffers",y="WEBGL_debug_renderer_info",v=t=>s(t)?void 0:0,b={3074:t=>s(t)?void 0:36064,35723:t=>s(t)?void 0:4352,35977:v,32937:v,36795:(t,e)=>{const n=s(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:v,35071:v,37447:v,36063:(t,e)=>{if(!s(t)){const n=t.getExtension(g);return n?e(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:v,35374:v,35377:v,34852:t=>{if(!s(t)){const e=t.getExtension(g);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:v,35373:v,35657:v,36183:v,37137:v,34045:v,35978:v,35979:v,35968:v,35376:v,35375:v,35659:v,37154:v,35371:v,35658:v,35076:v,35077:v,35380:v};const _="ANGLE_instanced_arrays";const A={OES_vertex_array_object:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},[_]:{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:()=>{}}},w={readBuffer:(t,e,n)=>{s(t)&&e(n)},getVertexAttrib:(t,e,n,r)=>{const{webgl2:i,ext:o}=function(t,e){return{webgl2:s(t),ext:t.getExtension(e)}}(t,_);let a;switch(r){case 35069:a=!!i&&void 0;break;case 35070:a=i||o?void 0:0}return void 0!==a?a:e(n,r)},getProgramParameter:(t,e,n,r)=>{if(!s(t))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return e(n,r)},getInternalformatParameter:(t,e,n,r,i)=>s(t)||32937!==i?t.getInternalformatParameter(n,r,i):new Int32Array([0]),getTexParameter(t,e,n,r){if(34046===r){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=b[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 x(t,e){let{extension:n,target:r,target2:o}=e;const a=A[n];i(a);const{meta:s={}}=a,{suffix:u=""}=s,l=t.getExtension(n);for(const i of Object.keys(a)){const e="".concat(i).concat(u);let n=null;"meta"===i||"function"===typeof t[i]||(l&&"function"===typeof l[e]?n=function(){return l[e](...arguments)}:"function"===typeof a[i]&&(n=a[i].bind(r))),n&&(r[i]=n,o[i]=n)}}globalThis.polyfillContext=function(t){t.luma=t.luma||{};const{luma:e}=t;return e.polyfilled||(!function(t){if("function"===typeof t.createVertexArray)return;const 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 d(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&&x(t,{extension:n,target:t.luma,target2:t})}(t,A),function(t,e){let{target:n,target2:r}=e;Object.keys(w).forEach((e=>{if("function"===typeof w[e]){const i=t[e]?t[e].bind(t):()=>{},o=w[e].bind(null,t,i);n[e]=o,r[e]=o}}))}(t,{target:e,target2:t}),e.polyfilled=!0),t};const E={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},O=(t,e,n)=>e?t.enable(n):t.disable(n),S=(t,e,n)=>t.hint(n,e),P=(t,e,n)=>t.pixelStorei(n,e);function C(t){return Array.isArray(t)||ArrayBuffer.isView(t)}const T={3042:O,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:O,2885:(t,e)=>t.cullFace(e),2929:O,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:O,35723:S,36006:(t,e)=>{const n=s(t)?36009:36160;return t.bindFramebuffer(n,e)},2886:(t,e)=>t.frontFace(e),33170:S,2849:(t,e)=>t.lineWidth(e),32823:O,32824:"polygonOffset",10752:"polygonOffset",35977:O,32938:"sampleCoverage",32939:"sampleCoverage",3089:O,3088:(t,e)=>t.scissor(...e),2960:O,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:P,3317:P,37440:P,37441:P,37443:P,3330:P,3332:P,3331:P,36010:(t,e)=>t.bindFramebuffer(36008,e),3314:P,32878:P,3316:P,3315:P,32877:P,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=C(e)?e:[e,e],t.blendEquationSeparate(...e)},blendFunc:(t,e)=>{e=C(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=C(e)?e:[e,e];const[n,r]=e;t.stencilMaskSeparate(1028,n),t.stencilMaskSeparate(1029,r)},stencilFunc:(t,e)=>{e=C(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,a,s]=e;t.stencilFuncSeparate(1028,n,r,i),t.stencilFuncSeparate(1029,o,a,s)},stencilOp:(t,e)=>{e=C(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,a,s]=e;t.stencilOpSeparate(1028,n,r,i),t.stencilOpSeparate(1029,o,a,s)},viewport:(t,e)=>t.viewport(...e)};function k(t,e,n){return void 0!==e[t]?e[t]:n[t]}const I={blendEquation:(t,e,n)=>t.blendEquationSeparate(k(32777,e,n),k(34877,e,n)),blendFunc:(t,e,n)=>t.blendFuncSeparate(k(32969,e,n),k(32968,e,n),k(32971,e,n),k(32970,e,n)),polygonOffset:(t,e,n)=>t.polygonOffset(k(32824,e,n),k(10752,e,n)),sampleCoverage:(t,e,n)=>t.sampleCoverage(k(32938,e,n),k(32939,e,n)),stencilFuncFront:(t,e,n)=>t.stencilFuncSeparate(1028,k(2962,e,n),k(2967,e,n),k(2963,e,n)),stencilFuncBack:(t,e,n)=>t.stencilFuncSeparate(1029,k(34816,e,n),k(36003,e,n),k(36004,e,n)),stencilOpFront:(t,e,n)=>t.stencilOpSeparate(1028,k(2964,e,n),k(2965,e,n),k(2966,e,n)),stencilOpBack:(t,e,n)=>t.stencilOpSeparate(1029,k(34817,e,n),k(34818,e,n),k(34819,e,n))},L={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]})},j=(t,e)=>t.isEnabled(e),M={3042:j,2884:j,2929:j,3024:j,32823:j,32926:j,32928:j,3089:j,2960:j,35977:j};function R(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 D(t,e){const n=t[e].bind(t);t[e]=function(){const e=arguments.length<=0?void 0:arguments[0];return e in t.state.cache&&t.state.enable?t.state.cache[e]:n(...arguments)},Object.defineProperty(t[e],"name",{value:"".concat(e,"-from-cache"),configurable:!1})}function F(t,e,n){const r=t[e].bind(t);t[e]=function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];const{valueChanged:a,oldValue:s}=n(t.state._updateCache,...i);return a&&r(...i),s},Object.defineProperty(t[e],"name",{value:"".concat(e,"-to-cache"),configurable:!1})}function B(t){const e=t.useProgram.bind(t);t.useProgram=function(n){t.state.program!==n&&(e(n),t.state.program=n)}}class z{constructor(t){let{copyState:e=!1,log:n=(()=>{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.program=null,this.stateStack=[],this.enable=!0,this.cache=e?q(t):Object.assign({},E),this.log=n,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(){this.stateStack.push({})}pop(){i(this.stateStack.length>0);const t=this.stateStack[this.stateStack.length-1];V(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 a=t[o],s=this.cache[o];N(a,s)||(n=!0,e=s,r&&!(o in r)&&(r[o]=s),this.cache[o]=a)}return{valueChanged:n,oldValue:e}}}function U(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{enable:n=!0,copyState:r}=e;if(i(void 0!==r),!t.state){const{polyfillContext:e}=globalThis;e&&e(t),t.state=new z(t,{copyState:r}),B(t);for(const n in L){F(t,n,L[n])}D(t,"getParameter"),D(t,"isEnabled")}return t.state.enable=n,t}function G(t){i(t.state),t.state.pop()}function V(t,e){if(i(a(t),"setParameters requires a WebGL context"),R(e))return;const n={};for(const i in e){const r=Number(i),o=T[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,I[i])(t,e,r)}}function q(t,e){if("number"===typeof(e=e||E)){const n=e,r=M[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=M[i];r[i]=e?e(t,Number(i)):t.getParameter(Number(i))}return r}function H(t){V(t,E)}function W(t,e,n){if(R(e))return n(t);const{nocatch:r=!0}=e;let i;if(function(t){t.state||U(t,{copyState:!1}),t.state.push()}(t),V(t,e),r)i=n(t),G(t);else try{i=n(t)}finally{G(t)}return i}var X=n(244);function Y(t){const{luma:e}=t;if(t.canvas&&e){const{clientWidth:n}=e.canvasSizeInfo;return n?t.drawingBufferWidth/n:1}return 1}function Z(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=Y(t),i=t.drawingBufferWidth,o=t.drawingBufferHeight;return $(e,r,i,o,n)}function K(t){const e="undefined"===typeof window?1:window.devicePixelRatio||1;return Number.isFinite(t)?t<=0?1:t:t?e:1}function $(t,e,n,r,i){const o=J(t[0],e,n);let a=Q(t[1],e,r,i),s=J(t[0]+1,e,n);const u=s===n-1?s:s-1;let l;return s=Q(t[1]+1,e,r,i),i?(s=0===s?s:s+1,l=a,a=s):l=s===r-1?s:s-1,{x:o,y:a,width:Math.max(u-o+1,1),height:Math.max(l-a+1,1)}}function J(t,e,n){return Math.min(Math.round(t*e),n-1)}function Q(t,e,n,r){return r?Math.max(0,n-1-Math.round(t*e)):Math.min(Math.round(t*e),n-1)}const tt=Object(X.a)(),et=tt&&"undefined"!==typeof document,nt={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function rt(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(tt,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),t=Object.assign({},nt,t);const{width:e,height:n}=t;function r(e){if(t.throwOnError)throw new Error(e);return console.error(e),null}let o;t.onError=r;const{canvas:a}=t,s=st({canvas:a,width:e,height:n,onError:r});return o=at(s,t),o?(o=it(o,t),ut(o),o):null}function it(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||t._instrumented)return t;t._version=t._version||lt(t),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{},e=Object.assign({},nt,e);const{manageState:n,debug:i}=e;return n&&U(t,{copyState:!1,log:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.log(1,...e)()}}),tt&&i&&(globalThis.makeDebugContext?(t=globalThis.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 ot(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.canvas){return void ct(t,K(e.useDevicePixels),e)}const n=t.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in e&&"height"in e&&n.resize(e.width,e.height)}function at(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:a=!0}=e;let s=null;return a&&(s=s||t.getContext("webgl2",e),s=s||t.getContext("experimental-webgl2",e)),o&&(s=s||t.getContext("webgl",e),s=s||t.getContext("experimental-webgl",e)),t.removeEventListener("webglcontextcreationerror",i,!1),s?(e.onContextLost&&t.addEventListener("webglcontextlost",e.onContextLost,!1),e.onContextRestored&&t.addEventListener("webglcontextrestored",e.onContextRestored,!1),s):n("Failed to create ".concat(a&&!o?"WebGL2":"WebGL"," context: ").concat(r||"Unknown error"))}function st(t){let e,{canvas:n,width:r=800,height:i=600,onError:o}=t;if("string"===typeof n){et&&"complete"===document.readyState||o("createGLContext called on canvas '".concat(n,"' before page was loaded")),e=document.getElementById(n)}else n?e=n:(e=document.createElement("canvas"),e.id="lumagl-canvas",e.style.width=Number.isFinite(r)?"".concat(r,"px"):"100%",e.style.height=Number.isFinite(i)?"".concat(i,"px"):"100%",document.body.insertBefore(e,document.body.firstChild));return e}function ut(t){const e=s(t)?"WebGL2":"WebGL1",n=function(t){const e=t.getParameter(7936),n=t.getParameter(7937),r=t.getExtension("WEBGL_debug_renderer_info");return{vendor:r&&t.getParameter(r.UNMASKED_VENDOR_WEBGL||7936)||e,renderer:r&&t.getParameter(r.UNMASKED_RENDERER_WEBGL||7937)||n,vendorMasked:e,rendererMasked:n,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t),i=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",o=t.debug?" debug":"";r.info(1,"".concat(e).concat(o," context ").concat(i))()}function lt(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext?2:1}function ct(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 a=t.luma.canvasSizeInfo;if(a.clientWidth!==i||a.clientHeight!==o||a.devicePixelRatio!==e){let n=e;const a=Math.floor(i*n),s=Math.floor(o*n);t.canvas.width=a,t.canvas.height=s,t.drawingBufferWidth===a&&t.drawingBufferHeight===s||(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})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var r=n(16),i=n(0),o=n.n(i);if(!i.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.w)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var a=n(128),s=n(110),u=Object(s.b)("observerBatching");function l(t){t()}var c=!1;function f(){return c}function h(t){return Object(r.m)(t)}var p,d=1e4,m=new Set;function g(){void 0===p&&(p=setTimeout(y,1e4))}function y(){p=void 0;var t=Date.now();m.forEach((function(e){var n=e.current;n&&t>=n.cleanAt&&(n.reaction.dispose(),e.current=null,m.delete(e))})),m.size>0&&g()}var v=!1,b=[];var _={};function A(t){return"observer"+t}function w(t,e,n){if(void 0===e&&(e="observed"),void 0===n&&(n=_),f())return t();var i,a=function(t){return function(){v?b.push(t):t()}}((n.useForceUpdate||s.d)()),u=o.a.useRef(null);if(!u.current){var l=new r.c(A(e),(function(){c.mounted?a():(l.dispose(),u.current=null)})),c=function(t){return{cleanAt:Date.now()+d,reaction:t}}(l);u.current=c,i=u,m.add(i),g()}var p=u.current.reaction;return o.a.useDebugValue(p,h),o.a.useEffect((function(){var t;return t=u,m.delete(t),u.current?u.current.mounted=!0:(u.current={reaction:new r.c(A(e),(function(){a()})),cleanAt:1/0},a()),function(){u.current.reaction.dispose(),u.current=null}}),[]),function(t){v=!0,b=[];try{var e=t();v=!1;var n=b.length>0?b:void 0;return o.a.useLayoutEffect((function(){n&&n.forEach((function(t){return t()}))}),[n]),e}finally{v=!1}}((function(){var e,n;if(p.track((function(){try{e=t()}catch(r){n=r}})),n)throw n;return e}))}var x=function(){return x=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},x.apply(this,arguments)};function E(t,e){if(f())return t;var n,r,o,a=x({forwardRef:!1},e),s=t.displayName||t.name,u=function(e,n){return w((function(){return t(e,n)}),s)};return u.displayName=s,n=a.forwardRef?Object(i.memo)(Object(i.forwardRef)(u)):Object(i.memo)(u),r=t,o=n,Object.keys(r).forEach((function(t){O[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))})),n.displayName=s,n}var O={$$typeof:!0,render:!0,compare:!0,type:!0};function S(t){var e=t.children,n=t.render,r=e||n;return"function"!==typeof r?null:w(r)}function P(t,e,n,r,i){var o="children"===e?"render":"children",a="function"===typeof t[e],s="function"===typeof t[o];return a&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):a||s?null:new Error("Invalid prop `"+i+"` of type `"+typeof t[e]+"` supplied to `"+n+"`, expected `function`.")}S.propTypes={children:P,render:P},S.displayName="Observer";var C;(C=a.unstable_batchedUpdates)||(C=l),Object(r.i)({reactionScheduler:C}),Object(s.a)()[u]=!0},function(t,e,n){var r,i;i=this,r=function(){return function(t){"use strict";var e=t&&t.I18n||{},n=Array.prototype.slice,r=function(t){return("0"+t.toString()).substr(-2)},i=function(t,e){return p("round",t,-e).toFixed(e)},o=function(t){var e=typeof t;return"function"===e||"object"===e},a=function(t){return"function"===typeof t},s=function(t){return"undefined"!==typeof t&&null!==t},u=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},l=function(t){return"string"===typeof t||"[object String]"===Object.prototype.toString.call(t)},c=function(t){return"number"===typeof t||"[object Number]"===Object.prototype.toString.call(t)},f=function(t){return!0===t||!1===t},h=function(t){return null===t},p=function(t,e,n){return"undefined"===typeof n||0===+n?Math[t](e):(e=+e,n=+n,isNaN(e)||"number"!==typeof n||n%1!==0?NaN:(e=e.toString().split("e"),+((e=(e=Math[t](+(e[0]+"e"+(e[1]?+e[1]-n:-n)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]+n:n))))},d=function(t,e){return a(t)?t(e):t},m=function(t,e){var n,r;for(n in e)e.hasOwnProperty(n)&&(r=e[n],l(r)||c(r)||f(r)||u(r)||h(r)?t[n]=r:(null==t[n]&&(t[n]={}),m(t[n],r)));return t},g={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},y={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},v={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},b={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},_=[null,"kb","mb","gb","tb"],A={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};return e.reset=function(){var t;for(t in A)this[t]=A[t]},e.initializeOptions=function(){var t;for(t in A)s(this[t])||(this[t]=A[t])},e.initializeOptions(),e.locales={},e.locales.get=function(t){var n=this[t]||this[e.locale]||this.default;return a(n)&&(n=n(t)),!1===u(n)&&(n=[n]),n},e.locales.default=function(t){var n=[],r=[];return t&&n.push(t),!t&&e.locale&&n.push(e.locale),e.fallbacks&&e.defaultLocale&&n.push(e.defaultLocale),n.forEach((function(t){var n=t.split("-"),i=null,o=null;3===n.length?(i=[n[0],n[1]].join("-"),o=n[0]):2===n.length&&(i=n[0]),-1===r.indexOf(t)&&r.push(t),e.fallbacks&&[i,o].forEach((function(e){"undefined"!==typeof e&&null!==e&&e!==t&&-1===r.indexOf(e)&&r.push(e)}))})),n.length||n.push("en"),r},e.pluralization={},e.pluralization.get=function(t){return this[t]||this[e.locale]||this.default},e.pluralization.default=function(t){switch(t){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},e.currentLocale=function(){return this.locale||this.defaultLocale},e.isSet=s,e.lookup=function(t,e){e=e||{};var n,r,i,o,a=this.locales.get(e.locale).slice();for(i=this.getFullScope(t,e);a.length;)if(n=a.shift(),r=i.split(e.separator||this.defaultSeparator),o=this.translations[n]){for(;r.length&&void 0!==(o=o[r.shift()])&&null!==o;);if(void 0!==o&&null!==o)return o}if(s(e.defaultValue))return d(e.defaultValue,t)},e.pluralizationLookupWithoutFallback=function(t,e,n){var r,i,a=this.pluralization.get(e)(t);if(o(n))for(;a.length;)if(r=a.shift(),s(n[r])){i=n[r];break}return i},e.pluralizationLookup=function(t,e,n){n=n||{};var r,i,a,u,l=this.locales.get(n.locale).slice();for(e=this.getFullScope(e,n);l.length;)if(r=l.shift(),i=e.split(n.separator||this.defaultSeparator),a=this.translations[r]){for(;i.length&&(a=a[i.shift()],o(a));)0===i.length&&(u=this.pluralizationLookupWithoutFallback(t,r,a));if("undefined"!==typeof u&&null!==u)break}return"undefined"!==typeof u&&null!==u||s(n.defaultValue)&&(u=o(n.defaultValue)?this.pluralizationLookupWithoutFallback(t,n.locale,n.defaultValue):n.defaultValue,a=n.defaultValue),{message:u,translations:a}},e.meridian=function(){var t=this.lookup("time"),e=this.lookup("date");return t&&t.am&&t.pm?[t.am,t.pm]:e&&e.meridian?e.meridian:g.meridian},e.prepareOptions=function(){for(var t,e=n.call(arguments),r={};e.length;)if("object"==typeof(t=e.shift()))for(var i in t)t.hasOwnProperty(i)&&(s(r[i])||(r[i]=t[i]));return r},e.createTranslationOptions=function(t,e){var n=[{scope:t}];return s(e.defaults)&&(n=n.concat(e.defaults)),s(e.defaultValue)&&n.push({message:e.defaultValue}),n},e.translate=function(t,e){e=e||{};var n,r=this.createTranslationOptions(t,e),i=t,a=this.prepareOptions(e);return delete a.defaultValue,r.some((function(e){if(s(e.scope)?(i=e.scope,n=this.lookup(i,a)):s(e.message)&&(n=d(e.message,t)),void 0!==n&&null!==n)return!0}),this)?("string"===typeof n?n=this.interpolate(n,e):u(n)?n=n.map((function(t){return"string"===typeof t?this.interpolate(t,e):t}),this):o(n)&&s(e.count)&&(n=this.pluralize(e.count,i,e)),n):this.missingTranslation(t,e)},e.interpolate=function(t,e){if(null==t)return t;e=e||{};var n,r,i,o,a=t.match(this.placeholder);if(!a)return t;for(;a.length;)i=(n=a.shift()).replace(this.placeholder,"$1"),r=s(e[i])?e[i].toString().replace(/\$/gm,"_#$#_"):i in e?this.nullPlaceholder(n,t,e):this.missingPlaceholder(n,t,e),o=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),t=t.replace(o,r);return t.replace(/_#\$#_/g,"$")},e.pluralize=function(t,e,n){var r,i;return n=this.prepareOptions({count:String(t)},n),"undefined"===typeof(i=this.pluralizationLookup(t,e,n)).translations||null==i.translations?this.missingTranslation(e,n):"undefined"!==typeof i.message&&null!=i.message?this.interpolate(i.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(e+"."+r(t)[0],n))},e.missingTranslation=function(t,e){if("guess"===this.missingBehaviour){var n=t.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(function(t,e,n){return e+" "+n.toLowerCase()}))}return'[missing "'+[null!=e&&null!=e.locale?e.locale:this.currentLocale(),this.getFullScope(t,e)].join(e.separator||this.defaultSeparator)+'" translation]'},e.missingPlaceholder=function(t,e,n){return"[missing "+t+" value]"},e.nullPlaceholder=function(){return e.missingPlaceholder.apply(e,arguments)},e.toNumber=function(t,e){e=this.prepareOptions(e,this.lookup("number.format"),y);var n,r,o=t<0,a=i(Math.abs(t),e.precision).toString().split("."),s=[],u=e.format||"%n",l=o?"-":"";for(t=a[0],n=a[1];t.length>0;)s.unshift(t.substr(Math.max(0,t.length-3),3)),t=t.substr(0,t.length-3);return r=s.join(e.delimiter),e.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),e.precision>0&&n&&(r+=e.separator+n),r=(u=e.sign_first?"%s"+u:u.replace("%n","%s%n")).replace("%u",e.unit).replace("%n",r).replace("%s",l)},e.toCurrency=function(t,e){return e=this.prepareOptions(e,this.lookup("number.currency.format",e),this.lookup("number.format",e),v),this.toNumber(t,e)},e.localize=function(t,e,n){switch(n||(n={}),t){case"currency":return this.toCurrency(e,n);case"number":return t=this.lookup("number.format",n),this.toNumber(e,t);case"percentage":return this.toPercentage(e,n);default:var r;return r=t.match(/^(date|time)/)?this.toTime(t,e,n):e.toString(),this.interpolate(r,n)}},e.parseDate=function(t){var e,n,r;if(null==t)return t;if("object"===typeof t)return t;if(e=t.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var i=1;i<=6;i++)e[i]=parseInt(e[i],10)||0;e[2]-=1,r=e[7]?1e3*("0"+e[7]):null,n=e[8]?new Date(Date.UTC(e[1],e[2],e[3],e[4],e[5],e[6],r)):new Date(e[1],e[2],e[3],e[4],e[5],e[6],r)}else"number"==typeof t?(n=new Date).setTime(t):t.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(t.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(t)));return n},e.strftime=function(t,n,i){i=this.lookup("date",i);var o=e.meridian();if(i||(i={}),i=this.prepareOptions(i,g),isNaN(t.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var a=t.getDay(),s=t.getDate(),u=t.getFullYear(),l=t.getMonth()+1,c=t.getHours(),f=c,h=c>11?1:0,p=t.getSeconds(),d=t.getMinutes(),m=t.getTimezoneOffset(),y=Math.floor(Math.abs(m/60)),v=Math.abs(m)-60*y,b=(m>0?"-":"+")+(y.toString().length<2?"0"+y:y)+(v.toString().length<2?"0"+v:v);return f>12?f-=12:0===f&&(f=12),n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace("%a",i.abbr_day_names[a])).replace("%A",i.day_names[a])).replace("%b",i.abbr_month_names[l])).replace("%B",i.month_names[l])).replace("%d",r(s))).replace("%e",s)).replace("%-d",s)).replace("%H",r(c))).replace("%-H",c)).replace("%k",c)).replace("%I",r(f))).replace("%-I",f)).replace("%l",f)).replace("%m",r(l))).replace("%-m",l)).replace("%M",r(d))).replace("%-M",d)).replace("%p",o[h])).replace("%P",o[h].toLowerCase())).replace("%S",r(p))).replace("%-S",p)).replace("%w",a)).replace("%y",r(u))).replace("%-y",r(u).replace(/^0+/,""))).replace("%Y",u)).replace("%z",b)).replace("%Z",b)},e.toTime=function(t,e,n){var r=this.parseDate(e),i=this.lookup(t,n);if(null==r)return r;var o=r.toString();return o.match(/invalid/i)?o:i?this.strftime(r,i,n):o},e.toPercentage=function(t,e){return e=this.prepareOptions(e,this.lookup("number.percentage.format",e),this.lookup("number.format",e),b),this.toNumber(t,e)},e.toHumanSize=function(t,e){for(var n,r,i,o=1024,a=t,s=0;a>=o&&s<4;)a/=o,s+=1;return 0===s?(i=this.getFullScope("number.human.storage_units.units.byte",e),n=this.t(i,{count:a}),r=0):(i=this.getFullScope("number.human.storage_units.units."+_[s],e),n=this.t(i),r=a-Math.floor(a)===0?0:1),e=this.prepareOptions(e,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(a,e)},e.getFullScope=function(t,e){return e=e||{},u(t)&&(t=t.join(e.separator||this.defaultSeparator)),e.scope&&(t=[e.scope,t].join(e.separator||this.defaultSeparator)),t},e.extend=function(t,e){return"undefined"===typeof t&&"undefined"===typeof e?{}:m(t,e)},e.t=e.translate.bind(e),e.l=e.localize.bind(e),e.p=e.pluralize.bind(e),e}(i)}.call(e,n,e,t),void 0===r||(t.exports=r)},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return o}));var r=1e-6,i="undefined"!==typeof Float32Array?Float32Array:Array,o=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)})},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return V})),n.d(e,"b",(function(){return $}));class r{constructor(t,e,n){this.eventTarget=t,this.eventName=e,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){const e=function(t){if("immediatePropagationStopped"in t)return t;{const{stopImmediatePropagation:e}=t;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}(t);for(const n of this.bindings){if(e.immediatePropagationStopped)break;n.handleEvent(e)}}get bindings(){return Array.from(this.unorderedBindings).sort(((t,e)=>{const n=t.index,r=e.index;return n<r?-1:n>r?1:0}))}}class i{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((t=>t.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((t=>t.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((t,e)=>t.concat(Array.from(e.values()))),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t){this.fetchEventListenerForBinding(t).bindingDisconnected(t)}handleError(t,e,n={}){this.application.handleError(t,`Error ${e}`,n)}fetchEventListenerForBinding(t){const{eventTarget:e,eventName:n,eventOptions:r}=t;return this.fetchEventListener(e,n,r)}fetchEventListener(t,e,n){const r=this.fetchEventListenerMapForEventTarget(t),i=this.cacheKey(e,n);let o=r.get(i);return o||(o=this.createEventListener(t,e,n),r.set(i,o)),o}createEventListener(t,e,n){const i=new r(t,e,n);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){const n=[t];return Object.keys(e).sort().forEach((t=>{n.push(`${e[t]?"":"!"}${t}`)})),n.join(":")}}const o=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;function a(t){return"window"==t?window:"document"==t?document:void 0}function s(t){return t.replace(/(?:[_-])([a-z0-9])/g,((t,e)=>e.toUpperCase()))}function u(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t){return t.replace(/([A-Z])/g,((t,e)=>`-${e.toLowerCase()}`))}const c={a:t=>"click",button:t=>"click",form:t=>"submit",details:t=>"toggle",input:t=>"submit"==t.getAttribute("type")?"click":"input",select:t=>"change",textarea:t=>"input"};function f(t){throw new Error(t)}function h(t){try{return JSON.parse(t)}catch(e){return t}}class p{constructor(t,e){this.context=t,this.action=e}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(t){this.willBeInvokedByEvent(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const t=this.controller[this.methodName];if("function"==typeof t)return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}invokeWithEvent(t){const{target:e,currentTarget:n}=t;try{const{params:r}=this.action,i=Object.assign(t,{params:r});this.method.call(this.controller,i),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:n,action:this.methodName})}catch(f){const{identifier:n,controller:r,element:i,index:o}=this,a={identifier:n,controller:r,element:i,index:o,event:t};this.context.handleError(f,`invoking action "${this.action}"`,a)}}willBeInvokedByEvent(t){const e=t.target;return this.element===e||(e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class d{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const t=new Set(this.matchElementsInTree());for(const e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(const e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){"attributes"==t.type?this.processAttributeChange(t.target,t.attributeName):"childList"==t.type&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){const n=t;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,e):this.removeElement(n):this.matchElement(n)&&this.addElement(n)}processRemovedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.processTree(t,this.removeElement)}}processAddedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.elementIsActive(t)&&this.processTree(t,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(const n of this.matchElementsInTree(t))e.call(this,n)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected==this.element.isConnected&&this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}class m{constructor(t,e,n){this.attributeName=e,this.delegate=n,this.elementObserver=new d(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(this.selector));return e.concat(n)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}class g{constructor(t,e){this.element=t,this.delegate=e,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){const e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){const n=this.delegate.getStringMapKeyForAttribute(t);if(null!=n){this.stringMap.has(t)||this.stringMapKeyAdded(n,t);const r=this.element.getAttribute(t);if(this.stringMap.get(t)!=r&&this.stringMapValueChanged(r,n,e),null==r){const e=this.stringMap.get(t);this.stringMap.delete(t),e&&this.stringMapKeyRemoved(n,t,e)}else this.stringMap.set(t,r)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,n)}stringMapKeyRemoved(t,e,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((t=>t.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}function y(t,e,n){b(t,e).add(n)}function v(t,e,n){b(t,e).delete(n),function(t,e){const n=t.get(e);null!=n&&0==n.size&&t.delete(e)}(t,e)}function b(t,e){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n}class _{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t.concat(Array.from(e))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t+e.size),0)}add(t,e){y(this.valuesByKey,t,e)}delete(t,e){v(this.valuesByKey,t,e)}has(t,e){const n=this.valuesByKey.get(t);return null!=n&&n.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some((e=>e.has(t)))}getValuesForKey(t){const e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter((([e,n])=>n.has(t))).map((([t,e])=>t))}}class A{constructor(t,e,n){this.attributeObserver=new m(t,e,this),this.delegate=n,this.tokensByElement=new _}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){const[e,n]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(n)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach((t=>this.tokenMatched(t)))}tokensUnmatched(t){t.forEach((t=>this.tokenUnmatched(t)))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){const e=this.tokensByElement.getValuesForKey(t),n=this.readTokensForElement(t),r=function(t,e){const n=Math.max(t.length,e.length);return Array.from({length:n},((n,r)=>[t[r],e[r]]))}(e,n).findIndex((([t,e])=>{return r=e,!((n=t)&&r&&n.index==r.index&&n.content==r.content);var n,r}));return-1==r?[[],[]]:[e.slice(r),n.slice(r)]}readTokensForElement(t){const e=this.attributeName;return function(t,e,n){return t.trim().split(/\s+/).filter((t=>t.length)).map(((t,r)=>({element:e,attributeName:n,content:t,index:r})))}(t.getAttribute(e)||"",t,e)}}class w{constructor(t,e,n){this.tokenListObserver=new A(t,e,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){const{element:e}=t,{value:n}=this.fetchParseResultForToken(t);n&&(this.fetchValuesByTokenForElement(e).set(t,n),this.delegate.elementMatchedValue(e,n))}tokenUnmatched(t){const{element:e}=t,{value:n}=this.fetchParseResultForToken(t);n&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,n))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(f){return{error:f}}}}class x{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new w(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(t){const e=new p(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){const e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach((t=>this.delegate.bindingDisconnected(t))),this.bindingsByAction.clear()}parseValueForToken(t){const e=class{constructor(t,e,n){this.element=t,this.index=e,this.eventTarget=n.eventTarget||t,this.eventName=n.eventName||function(t){const e=t.tagName.toLowerCase();if(e in c)return c[e](t)}(t)||f("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||f("missing identifier"),this.methodName=n.methodName||f("missing method name")}static forToken(t){return new this(t.element,t.index,function(t){const e=t.trim().match(o)||[];return{eventTarget:a(e[4]),eventName:e[2],eventOptions:e[9]?(n=e[9],n.split(":").reduce(((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)})),{})):{},identifier:e[5],methodName:e[7]};var n}(t.content))}toString(){const t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}->${this.identifier}#${this.methodName}`}get params(){return this.eventTarget instanceof Element?this.getParamsFromEventTargetAttributes(this.eventTarget):{}}getParamsFromEventTargetAttributes(t){const e={},n=new RegExp(`^data-${this.identifier}-(.+)-param$`);return Array.from(t.attributes).forEach((({name:t,value:r})=>{const i=t.match(n),o=i&&i[1];o&&Object.assign(e,{[s(o)]:h(r)})})),e}get eventTargetName(){return(t=this.eventTarget)==window?"window":t==document?"document":void 0;var t}}.forToken(t);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}}class E{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new g(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap,this.invokeChangedCallbacksForDefaultValues()}start(){this.stringMapObserver.start()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){const n=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,n.writer(this.receiver[t]),n.writer(n.defaultValue))}stringMapValueChanged(t,e,n){const r=this.valueDescriptorNameMap[e];null!==t&&(null===n&&(n=r.writer(r.defaultValue)),this.invokeChangedCallback(e,t,n))}stringMapKeyRemoved(t,e,n){const r=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,r.writer(this.receiver[t]),n):this.invokeChangedCallback(t,r.writer(r.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:t,name:e,defaultValue:n,writer:r}of this.valueDescriptors)void 0==n||this.controller.data.has(t)||this.invokeChangedCallback(e,r(n),void 0)}invokeChangedCallback(t,e,n){const r=`${t}Changed`,i=this.receiver[r];if("function"==typeof i){const r=this.valueDescriptorNameMap[t],o=r.reader(e);let a=n;n&&(a=r.reader(n)),i.call(this.receiver,o,a)}}get valueDescriptors(){const{valueDescriptorMap:t}=this;return Object.keys(t).map((e=>t[e]))}get valueDescriptorNameMap(){const t={};return Object.keys(this.valueDescriptorMap).forEach((e=>{const n=this.valueDescriptorMap[e];t[n.name]=n})),t}hasValue(t){const e=`has${u(this.valueDescriptorNameMap[t].name)}`;return this.receiver[e]}}class O{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new _}start(){this.tokenListObserver||(this.tokenListObserver=new A(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var n;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetConnected(t,e))))}disconnectTarget(t,e){var n;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetDisconnected(t,e))))}disconnectAllTargets(){for(const t of this.targetsByName.keys)for(const e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}class S{constructor(t,e){this.logDebugActivity=(t,e={})=>{const{identifier:n,controller:r,element:i}=this;e=Object.assign({identifier:n,controller:r,element:i},e),this.application.logDebugActivity(this.identifier,t,e)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new x(this,this.dispatcher),this.valueObserver=new E(this,this.controller),this.targetObserver=new O(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(f){this.handleError(f,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(f){this.handleError(f,"connecting controller")}}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(f){this.handleError(f,"disconnecting controller")}this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,n={}){const{identifier:r,controller:i,element:o}=this;n=Object.assign({identifier:r,controller:i,element:o},n),this.application.handleError(t,`Error ${e}`,n)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}invokeControllerMethod(t,...e){const n=this.controller;"function"==typeof n[t]&&n[t](...e)}}function P(t,e){const n=T(t);return Array.from(n.reduce(((t,n)=>(function(t,e){const n=t[e];return Array.isArray(n)?n:[]}(n,e).forEach((e=>t.add(e))),t)),new Set))}function C(t,e){return T(t).reduce(((t,n)=>(t.push(...function(t,e){const n=t[e];return n?Object.keys(n).map((t=>[t,n[t]])):[]}(n,e)),t)),[])}function T(t){const e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function k(t){return function(t,e){const n=L(t),r=function(t,e){return I(e).reduce(((n,r)=>{const i=function(t,e,n){const r=Object.getOwnPropertyDescriptor(t,n);if(!r||!("value"in r)){const t=Object.getOwnPropertyDescriptor(e,n).value;return r&&(t.get=r.get||t.get,t.set=r.set||t.set),t}}(t,e,r);return i&&Object.assign(n,{[r]:i}),n}),{})}(t.prototype,e);return Object.defineProperties(n.prototype,r),n}(t,function(t){return P(t,"blessings").reduce(((e,n)=>{const r=n(t);for(const t in r){const n=e[t]||{};e[t]=Object.assign(n,r[t])}return e}),{})}(t))}const I="function"==typeof Object.getOwnPropertySymbols?t=>[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)]:Object.getOwnPropertyNames,L=(()=>{function t(t){function e(){return Reflect.construct(t,arguments,new.target)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{return function(){const e=t((function(){this.a.call(this)}));e.prototype.a=function(){},new e}(),t}catch(f){return t=>class extends t{}}})();class j{constructor(t,e){this.application=t,this.definition=function(t){return{identifier:t.identifier,controllerConstructor:k(t.controllerConstructor)}}(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(t){const e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){const e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new S(this,t),this.contextsByScope.set(t,e)),e}}class M{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){const e=this.data.get(this.getDataKey(t))||"";return e.match(/[^\s]+/g)||[]}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}}class R{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){const e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){const n=this.getAttributeNameForKey(t);return this.element.setAttribute(n,e),this.get(t)}has(t){const e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){const e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${l(t)}`}}class N{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,n){let r=this.warnedKeysByObject.get(t);r||(r=new Set,this.warnedKeysByObject.set(t,r)),r.has(e)||(r.add(e),this.logger.warn(n,t))}}function D(t,e){return`[${t}~="${e}"]`}class F{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce(((t,e)=>t||this.findTarget(e)||this.findLegacyTarget(e)),void 0)}findAll(...t){return t.reduce(((t,e)=>[...t,...this.findAllTargets(e),...this.findAllLegacyTargets(e)]),[])}findTarget(t){const e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){const e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){return D(this.schema.targetAttributeForScope(this.identifier),t)}findLegacyTarget(t){const e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){const e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map((e=>this.deprecate(e,t)))}getLegacySelectorForTargetName(t){const e=`${this.identifier}.${t}`;return D(this.schema.targetAttribute,e)}deprecate(t,e){if(t){const{identifier:n}=this,r=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(n);this.guide.warn(t,`target:${e}`,`Please replace ${r}="${n}.${e}" with ${i}="${e}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}}class B{constructor(t,e,n,r){this.targets=new F(this),this.classes=new M(this),this.data=new R(this),this.containsElement=t=>t.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=n,this.guide=new N(r)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return D(this.schema.controllerAttribute,this.identifier)}}class z{constructor(t,e,n){this.element=t,this.schema=e,this.delegate=n,this.valueListObserver=new w(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(t){const{element:e,content:n}=t,r=this.fetchScopesByIdentifierForElement(e);let i=r.get(n);return i||(i=this.delegate.createScopeForElementAndIdentifier(e,n),r.set(n,i)),i}elementMatchedValue(t,e){const n=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,n),1==n&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){const n=this.scopeReferenceCounts.get(e);n&&(this.scopeReferenceCounts.set(e,n-1),1==n&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}class U{constructor(t){this.application=t,this.scopeObserver=new z(this.element,this.schema,this),this.scopesByIdentifier=new _,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((t,e)=>t.concat(e.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);const e=new j(this.application,t);this.connectModule(e)}unloadIdentifier(t){const e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){const n=this.modulesByIdentifier.get(e);if(n)return n.contexts.find((e=>e.element==t))}handleError(t,e,n){this.application.handleError(t,e,n)}createScopeForElementAndIdentifier(t,e){return new B(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.connectContextForScope(e)))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.disconnectContextForScope(e)))}}const G={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:t=>`data-${t}-target`};class V{constructor(t=document.documentElement,e=G){this.logger=console,this.debug=!1,this.logDebugActivity=(t,e,n={})=>{this.debug&&this.logFormattedMessage(t,e,n)},this.element=t,this.schema=e,this.dispatcher=new i(this),this.router=new U(this)}static start(t,e){const n=new V(t,e);return n.start(),n}async start(){await new Promise((t=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>t())):t()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(t,e){e.shouldLoad&&this.load({identifier:t,controllerConstructor:e})}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>this.router.loadDefinition(t)))}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>this.router.unloadIdentifier(t)))}get controllers(){return this.router.contexts.map((t=>t.controller))}getControllerForElementAndIdentifier(t,e){const n=this.router.getContextForElementAndIdentifier(t,e);return n?n.controller:null}handleError(t,e,n){var r;this.logger.error("%s\n\n%o\n\n%o",e,t,n),null===(r=window.onerror)||void 0===r||r.call(window,e,"",0,0,t)}logFormattedMessage(t,e,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}function q([t,e]){return function(t,e){const n=`${l(t)}-value`,r=function(t){const e=function(t){const e=H(t.type);if(e){const n=W(t.default);if(e!==n)throw new Error(`Type "${e}" must match the type of the default value. Given default value: "${t.default}" as "${n}"`);return e}}(t),n=W(t),r=H(t),i=e||n||r;if(i)return i;throw new Error(`Unknown value type "${t}"`)}(e);return{type:r,key:n,name:s(n),get defaultValue(){return function(t){const e=H(t);if(e)return X[e];const n=t.default;return void 0!==n?n:t}(e)},get hasCustomDefaultValue(){return void 0!==W(e)},reader:Y[r],writer:Z[r]||Z.default}}(t,e)}function H(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function W(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(t)?"array":"[object Object]"===Object.prototype.toString.call(t)?"object":void 0}const X={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Y={array(t){const e=JSON.parse(t);if(!Array.isArray(e))throw new TypeError("Expected array");return e},boolean:t=>!("0"==t||"false"==t),number:t=>Number(t),object(t){const e=JSON.parse(t);if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError("Expected object");return e},string:t=>t},Z={default:function(t){return`${t}`},array:K,object:K};function K(t){return JSON.stringify(t)}class ${constructor(t){this.context=t}static get shouldLoad(){return!0}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:n={},prefix:r=this.identifier,bubbles:i=!0,cancelable:o=!0}={}){const a=new CustomEvent(r?`${r}:${t}`:t,{detail:n,bubbles:i,cancelable:o});return e.dispatchEvent(a),a}}$.blessings=[function(t){return P(t,"classes").reduce(((t,e)=>{return Object.assign(t,{[`${n=e}Class`]:{get(){const{classes:t}=this;if(t.has(n))return t.get(n);{const e=t.getAttributeName(n);throw new Error(`Missing attribute "${e}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${u(n)}Class`]:{get(){return this.classes.has(n)}}});var n}),{})},function(t){return P(t,"targets").reduce(((t,e)=>Object.assign(t,function(t){return{[`${t}Target`]:{get(){const e=this.targets.find(t);if(e)return e;throw new Error(`Missing target element "${t}" for "${this.identifier}" controller`)}},[`${t}Targets`]:{get(){return this.targets.findAll(t)}},[`has${u(t)}Target`]:{get(){return this.targets.has(t)}}}}(e))),{})},function(t){const e=C(t,"values"),n={valueDescriptorMap:{get(){return e.reduce(((t,e)=>{const n=q(e),r=this.data.getAttributeNameForKey(n.key);return Object.assign(t,{[r]:n})}),{})}}};return e.reduce(((t,e)=>Object.assign(t,function(t){const e=q(t),{key:n,name:r,reader:i,writer:o}=e;return{[r]:{get(){const t=this.data.get(n);return null!==t?i(t):e.defaultValue},set(t){void 0===t?this.data.delete(n):this.data.set(n,o(t))}},[`has${u(r)}`]:{get(){return this.data.has(n)||e.hasCustomDefaultValue}}}}(e))),n)}],$.targets=[],$.values={}},function(t,e,n){"use strict";n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"l",(function(){return u})),n.d(e,"m",(function(){return l})),n.d(e,"e",(function(){return c})),n.d(e,"s",(function(){return f})),n.d(e,"r",(function(){return h})),n.d(e,"o",(function(){return p})),n.d(e,"i",(function(){return d})),n.d(e,"p",(function(){return m})),n.d(e,"h",(function(){return g})),n.d(e,"q",(function(){return y})),n.d(e,"b",(function(){return v})),n.d(e,"a",(function(){return b})),n.d(e,"c",(function(){return _})),n.d(e,"d",(function(){return A})),n.d(e,"n",(function(){return w})),n.d(e,"j",(function(){return x})),n.d(e,"k",(function(){return E})),n.d(e,"t",(function(){return O}));var r=n(181);const i=1/Math.PI*180,o=1/180*Math.PI,a={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function s(t){for(const e in t)Object(r.a)(e in a),a[e]=t[e];return a}function u(t,{precision:e=a.precision}={}){return t=function(t){return Math.round(t/a.EPSILON)*a.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function l(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function c(t){return"clone"in t?t.clone():t.slice()}function f(t){return p(t)}function h(t){return d(t)}function p(t,e){return S(t,(t=>t*o),e)}function d(t,e){return S(t,(t=>t*i),e)}function m(t,e){return S(t,(t=>Math.sin(t)),e)}function g(t,e){return S(t,(t=>Math.cos(t)),e)}function y(t,e){return S(t,(t=>Math.tan(t)),e)}function v(t,e){return S(t,(t=>Math.asin(t)),e)}function b(t,e){return S(t,(t=>Math.acos(t)),e)}function _(t,e){return S(t,(t=>Math.atan(t)),e)}function A(t,e,n){return S(t,(t=>Math.max(e,Math.min(n,t))))}function w(t,e,n){return l(t)?t.map(((t,r)=>w(t,e[r],n))):n*e+(1-n)*t}function x(t,e,n){const r=a.EPSILON;n&&(a.EPSILON=n);try{if(t===e)return!0;if(l(t)&&l(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!x(t[n],e[n]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):"number"===typeof t&&"number"===typeof e&&Math.abs(t-e)<=a.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{a.EPSILON=r}}function E(t,e){if(t===e)return!0;if(t&&"object"===typeof t&&e&&"object"===typeof e){if(t.constructor!==e.constructor)return!1;if(t.exactEquals)return t.exactEquals(e)}if(l(t)&&l(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!E(t[n],e[n]))return!1;return!0}return!1}function O(t,e){const n=a.EPSILON;let r;a.EPSILON=t;try{r=e()}finally{a.EPSILON=n}return r}function S(t,e,n){if(l(t)){const r=t;n=n||function(t){return t.clone?t.clone():new Array(t.length)}(r);for(let i=0;i<n.length&&i<r.length;++i)n[i]=e(t[i],i,n);return n}return e(t)}},function(t,e,n){"use strict";n.d(e,"q",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"h",(function(){return s})),n.d(e,"p",(function(){return u})),n.d(e,"o",(function(){return l})),n.d(e,"k",(function(){return c})),n.d(e,"l",(function(){return f})),n.d(e,"m",(function(){return h})),n.d(e,"n",(function(){return p})),n.d(e,"e",(function(){return d})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return g})),n.d(e,"j",(function(){return y})),n.d(e,"i",(function(){return v})),n.d(e,"g",(function(){return b})),n.d(e,"b",(function(){return _}));var r=n(9);function i(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=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]=a,t[14]=s}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],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],m=e[13],g=e[14],y=e[15],v=n*s-r*a,b=n*u-i*a,_=n*l-o*a,A=r*u-i*s,w=r*l-o*s,x=i*l-o*u,E=c*m-f*d,O=c*g-h*d,S=c*y-p*d,P=f*g-h*m,C=f*y-p*m,T=h*y-p*g,k=v*T-b*C+_*P+A*S-w*O+x*E;return k?(k=1/k,t[0]=(s*T-u*C+l*P)*k,t[1]=(i*C-r*T-o*P)*k,t[2]=(m*x-g*w+y*A)*k,t[3]=(h*w-f*x-p*A)*k,t[4]=(u*S-a*T-l*O)*k,t[5]=(n*T-i*S+o*O)*k,t[6]=(g*_-d*x-y*b)*k,t[7]=(c*x-h*_+p*b)*k,t[8]=(a*C-s*S+l*E)*k,t[9]=(r*S-n*C-o*E)*k,t[10]=(d*w-m*_+y*v)*k,t[11]=(f*_-c*w-p*v)*k,t[12]=(s*O-a*P-u*E)*k,t[13]=(n*P-r*O+i*E)*k,t[14]=(m*b-d*A-g*v)*k,t[15]=(c*A-f*b+h*v)*k,t):null}function a(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c=t[9],f=t[10],h=t[11],p=t[12],d=t[13],m=t[14],g=t[15];return(e*a-n*o)*(f*g-h*m)-(e*s-r*o)*(c*g-h*d)+(e*u-i*o)*(c*m-f*d)+(n*s-r*a)*(l*g-h*p)-(n*u-i*a)*(l*m-f*p)+(r*u-i*s)*(l*d-c*p)}function s(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],m=e[12],g=e[13],y=e[14],v=e[15],b=n[0],_=n[1],A=n[2],w=n[3];return t[0]=b*r+_*s+A*f+w*m,t[1]=b*i+_*u+A*h+w*g,t[2]=b*o+_*l+A*p+w*y,t[3]=b*a+_*c+A*d+w*v,b=n[4],_=n[5],A=n[6],w=n[7],t[4]=b*r+_*s+A*f+w*m,t[5]=b*i+_*u+A*h+w*g,t[6]=b*o+_*l+A*p+w*y,t[7]=b*a+_*c+A*d+w*v,b=n[8],_=n[9],A=n[10],w=n[11],t[8]=b*r+_*s+A*f+w*m,t[9]=b*i+_*u+A*h+w*g,t[10]=b*o+_*l+A*p+w*y,t[11]=b*a+_*c+A*d+w*v,b=n[12],_=n[13],A=n[14],w=n[15],t[12]=b*r+_*s+A*f+w*m,t[13]=b*i+_*u+A*h+w*g,t[14]=b*o+_*l+A*p+w*y,t[15]=b*a+_*c+A*d+w*v,t}function u(t,e,n){var r,i,o,a,s,u,l,c,f,h,p,d,m=n[0],g=n[1],y=n[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*y+e[12],t[13]=e[1]*m+e[5]*g+e[9]*y+e[13],t[14]=e[2]*m+e[6]*g+e[10]*y+e[14],t[15]=e[3]*m+e[7]*g+e[11]*y+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=r*m+s*g+f*y+e[12],t[13]=i*m+u*g+h*y+e[13],t[14]=o*m+l*g+p*y+e[14],t[15]=a*m+c*g+d*y+e[15]),t}function l(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 c(t,e,n,i){var o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_,A,w,x,E,O,S,P,C,T=i[0],k=i[1],I=i[2],L=Math.hypot(T,k,I);return L<r.b?null:(T*=L=1/L,k*=L,I*=L,o=Math.sin(n),s=1-(a=Math.cos(n)),u=e[0],l=e[1],c=e[2],f=e[3],h=e[4],p=e[5],d=e[6],m=e[7],g=e[8],y=e[9],v=e[10],b=e[11],_=T*T*s+a,A=k*T*s+I*o,w=I*T*s-k*o,x=T*k*s-I*o,E=k*k*s+a,O=I*k*s+T*o,S=T*I*s+k*o,P=k*I*s-T*o,C=I*I*s+a,t[0]=u*_+h*A+g*w,t[1]=l*_+p*A+y*w,t[2]=c*_+d*A+v*w,t[3]=f*_+m*A+b*w,t[4]=u*x+h*E+g*O,t[5]=l*x+p*E+y*O,t[6]=c*x+d*E+v*O,t[7]=f*x+m*E+b*O,t[8]=u*S+h*P+g*C,t[9]=l*S+p*P+y*C,t[10]=c*S+d*P+v*C,t[11]=f*S+m*P+b*C,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],h=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+l*r,t[5]=a*i+c*r,t[6]=s*i+f*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=f*i-s*r,t[11]=h*i-u*r,t}function h(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[8],c=e[9],f=e[10],h=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-l*r,t[1]=a*i-c*r,t[2]=s*i-f*r,t[3]=u*i-h*r,t[8]=o*r+l*i,t[9]=a*r+c*i,t[10]=s*r+f*i,t[11]=u*r+h*i,t}function p(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=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+l*r,t[1]=a*i+c*r,t[2]=s*i+f*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=f*i-s*r,t[7]=h*i-u*r,t}function d(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],l=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(u,l,c),t}function m(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,f=r*s,h=i*a,p=i*s,d=i*u,m=o*a,g=o*s,y=o*u;return t[0]=1-f-d,t[1]=c+y,t[2]=h-g,t[3]=0,t[4]=c-y,t[5]=1-l-d,t[6]=p+m,t[7]=0,t[8]=h+g,t[9]=p-m,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),l=1/(o-a);return t[0]=2*o*s,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)*s,t[9]=(i+r)*u,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t}var y=function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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};var v=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,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*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t};function b(t,e,n,i){var o,a,s,u,l,c,f,h,p,d,m=e[0],g=e[1],y=e[2],v=i[0],b=i[1],_=i[2],A=n[0],w=n[1],x=n[2];return Math.abs(m-A)<r.b&&Math.abs(g-w)<r.b&&Math.abs(y-x)<r.b?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):(f=m-A,h=g-w,p=y-x,o=b*(p*=d=1/Math.hypot(f,h,p))-_*(h*=d),a=_*(f*=d)-v*p,s=v*h-b*f,(d=Math.hypot(o,a,s))?(o*=d=1/d,a*=d,s*=d):(o=0,a=0,s=0),u=h*s-p*a,l=p*o-f*s,c=f*a-h*o,(d=Math.hypot(u,l,c))?(u*=d=1/d,l*=d,c*=d):(u=0,l=0,c=0),t[0]=o,t[1]=u,t[2]=f,t[3]=0,t[4]=a,t[5]=l,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=p,t[11]=0,t[12]=-(o*m+a*g+s*y),t[13]=-(u*m+l*g+c*y),t[14]=-(f*m+h*g+p*y),t[15]=1,t)}function _(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],f=t[8],h=t[9],p=t[10],d=t[11],m=t[12],g=t[13],y=t[14],v=t[15],b=e[0],_=e[1],A=e[2],w=e[3],x=e[4],E=e[5],O=e[6],S=e[7],P=e[8],C=e[9],T=e[10],k=e[11],I=e[12],L=e[13],j=e[14],M=e[15];return Math.abs(n-b)<=r.b*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(i-_)<=r.b*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-A)<=r.b*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(a-w)<=r.b*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-x)<=r.b*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(u-E)<=r.b*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(l-O)<=r.b*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(c-S)<=r.b*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-P)<=r.b*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(h-C)<=r.b*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(p-T)<=r.b*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(d-k)<=r.b*Math.max(1,Math.abs(d),Math.abs(k))&&Math.abs(m-I)<=r.b*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(g-L)<=r.b*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(y-j)<=r.b*Math.max(1,Math.abs(y),Math.abs(j))&&Math.abs(v-M)<=r.b*Math.max(1,Math.abs(v),Math.abs(M))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return Z})),n.d(e,"b",(function(){return F})),n.d(e,"c",(function(){return z})),n.d(e,"d",(function(){return P})),n.d(e,"e",(function(){return tt})),n.d(e,"g",(function(){return et})),n.d(e,"f",(function(){return nt}));var r=n(0),i=n.n(r),o=(n(3),n(205)),a=n.n(o),s=n(556),u=n.n(s);function l(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==t&&void 0!==t&&this.setState(t)}function c(t){this.setState(function(e){var n=this.constructor.getDerivedStateFromProps(t,e);return null!==n&&void 0!==n?n:null}.bind(this))}function f(t,e){try{var n=this.props,r=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}l.__suppressDeprecationWarning=!0,c.__suppressDeprecationWarning=!0,f.__suppressDeprecationWarning=!0;var h=function(t,e){return t.substr(0,e.length)===e},p=function(t,e){for(var n=void 0,r=void 0,i=e.split("?")[0],o=w(i),s=""===o[0],u=A(t),l=0,c=u.length;l<c;l++){var f=!1,h=u[l].route;if(h.default)r={route:h,params:{},uri:e};else{for(var p=w(h.path),d={},m=Math.max(o.length,p.length),g=0;g<m;g++){var v=p[g],_=o[g];if(b(v)){d[v.slice(1)||"*"]=o.slice(g).map(decodeURIComponent).join("/");break}if(void 0===_){f=!0;break}var x=y.exec(v);if(x&&!s){-1===E.indexOf(x[1])||a()(!1);var O=decodeURIComponent(_);d[x[1]]=O}else if(v!==_){f=!0;break}}if(!f){n={route:h,params:d,uri:"/"+o.slice(0,g).join("/")};break}}}return n||r||null},d=function(t,e){return p([{path:t}],e)},m=function(t,e){if(h(t,"/"))return t;var n=t.split("?"),r=n[0],i=n[1],o=e.split("?")[0],a=w(r),s=w(o);if(""===a[0])return x(o,i);if(!h(a[0],".")){var u=s.concat(a).join("/");return x(("/"===o?"":"/")+u,i)}for(var l=s.concat(a),c=[],f=0,p=l.length;f<p;f++){var d=l[f];".."===d?c.pop():"."!==d&&c.push(d)}return x("/"+c.join("/"),i)},g=function(t,e){var n=t.split("?"),r=n[0],i=n[1],o=void 0===i?"":i,a="/"+w(r).map((function(t){var n=y.exec(t);return n?e[n[1]]:t})).join("/"),s=e.location,u=(s=void 0===s?{}:s).search,l=(void 0===u?"":u).split("?")[1]||"";return a=x(a,o,l)},y=/^:(.+)/,v=function(t){return y.test(t)},b=function(t){return t&&"*"===t[0]},_=function(t,e){return{route:t,score:t.default?0:w(t.path).reduce((function(t,e){return t+=4,!function(t){return""===t}(e)?v(e)?t+=2:b(e)?t-=5:t+=3:t+=1,t}),0),index:e}},A=function(t){return t.map(_).sort((function(t,e){return t.score<e.score?1:t.score>e.score?-1:t.index-e.index}))},w=function(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")},x=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t+((n=n.filter((function(t){return t&&t.length>0})))&&n.length>0?"?"+n.join("&"):"")},E=["uri","path"],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},S=function(t){var e=t.location,n=e.search,r=e.hash,i=e.href,o=e.origin,a=e.protocol,s=e.host,u=e.hostname,l=e.port,c=t.location.pathname;!c&&i&&C&&(c=new URL(i).pathname);return{pathname:encodeURI(decodeURI(c)),search:n,hash:r,href:i,origin:o,protocol:a,host:s,hostname:u,port:l,state:t.history.state,key:t.history.state&&t.history.state.key||"initial"}},P=function(t,e){var n=[],r=S(t),i=!1,o=function(){};return{get location(){return r},get transitioning(){return i},_onTransitionComplete:function(){i=!1,o()},listen:function(e){n.push(e);var i=function(){r=S(t),e({location:r,action:"POP"})};return t.addEventListener("popstate",i),function(){t.removeEventListener("popstate",i),n=n.filter((function(t){return t!==e}))}},navigate:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=a.state,u=a.replace,l=void 0!==u&&u;if("number"===typeof e)t.history.go(e);else{s=O({},s,{key:Date.now()+""});try{i||l?t.history.replaceState(s,null,e):t.history.pushState(s,null,e)}catch(f){t.location[l?"replace":"assign"](e)}}r=S(t),i=!0;var c=new Promise((function(t){return o=t}));return n.forEach((function(t){return t({location:r,action:"PUSH"})})),c}}},C=!("undefined"===typeof window||!window.document||!window.document.createElement),T=P(C?window:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=t.indexOf("?"),n={pathname:e>-1?t.substr(0,e):t,search:e>-1?t.substr(e):""},r=0,i=[n],o=[null];return{get location(){return i[r]},addEventListener:function(t,e){},removeEventListener:function(t,e){},history:{get entries(){return i},get index(){return r},get state(){return o[r]},pushState:function(t,e,n){var a=n.split("?"),s=a[0],u=a[1],l=void 0===u?"":u;r++,i.push({pathname:s,search:l.length?"?"+l:l}),o.push(t)},replaceState:function(t,e,n){var a=n.split("?"),s=a[0],u=a[1],l=void 0===u?"":u;i[r]={pathname:s,search:l},o[r]=t},go:function(t){var e=r+t;e<0||e>o.length-1||(r=e)}}}}()),k=(T.navigate,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});function I(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function M(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var R=function(t,e){var n=u()(e);return n.displayName=t,n},N=R("Location"),D=function(t){var e=t.children;return i.a.createElement(N.Consumer,null,(function(t){return t?e(t):i.a.createElement(F,null,e)}))},F=function(t){function e(){var n,r;L(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=j(this,t.call.apply(t,[this].concat(o))),r.state={context:r.getContext(),refs:{unlisten:null}},j(r,n)}return M(e,t),e.prototype.getContext=function(){var t=this.props.history;return{navigate:t.navigate,location:t.location}},e.prototype.componentDidCatch=function(t,e){if(!$(t))throw t;(0,this.props.history.navigate)(t.uri,{replace:!0})},e.prototype.componentDidUpdate=function(t,e){e.context.location!==this.state.context.location&&this.props.history._onTransitionComplete()},e.prototype.componentDidMount=function(){var t=this,e=this.state.refs,n=this.props.history;n._onTransitionComplete(),e.unlisten=n.listen((function(){Promise.resolve().then((function(){requestAnimationFrame((function(){t.unmounted||t.setState((function(){return{context:t.getContext()}}))}))}))}))},e.prototype.componentWillUnmount=function(){var t=this.state.refs;this.unmounted=!0,t.unlisten()},e.prototype.render=function(){var t=this.state.context,e=this.props.children;return i.a.createElement(N.Provider,{value:t},"function"===typeof e?e(t):e||null)},e}(i.a.Component);F.defaultProps={history:T};var B=R("Base",{baseuri:"/",basepath:"/"}),z=function(t){return i.a.createElement(B.Consumer,null,(function(e){return i.a.createElement(D,null,(function(n){return i.a.createElement(U,k({},e,n,t))}))}))},U=function(t){function e(){return L(this,e),j(this,t.apply(this,arguments))}return M(e,t),e.prototype.render=function(){var t=this.props,e=t.location,n=t.navigate,r=t.basepath,o=t.primary,a=t.children,s=(t.baseuri,t.component),u=void 0===s?"div":s,l=I(t,["location","navigate","basepath","primary","children","baseuri","component"]),c=i.a.Children.toArray(a).reduce((function(t,e){var n=it(r)(e);return t.concat(n)}),[]),f=e.pathname,h=p(c,f);if(h){var d=h.params,g=h.uri,y=h.route,v=h.route.value;r=y.default?r:y.path.replace(/\*$/,"");var b=k({},d,{uri:g,location:e,navigate:function(t,e){return n(m(t,g),e)}}),_=i.a.cloneElement(v,b,v.props.children?i.a.createElement(z,{location:e,primary:o},v.props.children):void 0),A=o?V:u,w=o?k({uri:g,location:e,component:u},l):l;return i.a.createElement(B.Provider,{value:{baseuri:g,basepath:r}},i.a.createElement(A,w,_))}return null},e}(i.a.PureComponent);U.defaultProps={primary:!0};var G=R("Focus"),V=function(t){var e=t.uri,n=t.location,r=t.component,o=I(t,["uri","location","component"]);return i.a.createElement(G.Consumer,null,(function(t){return i.a.createElement(W,k({},o,{component:r,requestFocus:t,uri:e,location:n}))}))},q=!0,H=0,W=function(t){function e(){var n,r;L(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=j(this,t.call.apply(t,[this].concat(o))),r.state={},r.requestFocus=function(t){!r.state.shouldFocus&&t&&t.focus()},j(r,n)}return M(e,t),e.getDerivedStateFromProps=function(t,e){if(null==e.uri)return k({shouldFocus:!0},t);var n=t.uri!==e.uri,r=e.location.pathname!==t.location.pathname&&t.location.pathname===t.uri;return k({shouldFocus:n||r},t)},e.prototype.componentDidMount=function(){H++,this.focus()},e.prototype.componentWillUnmount=function(){0===--H&&(q=!0)},e.prototype.componentDidUpdate=function(t,e){t.location!==this.props.location&&this.state.shouldFocus&&this.focus()},e.prototype.focus=function(){var t=this.props.requestFocus;t?t(this.node):q?q=!1:this.node&&(this.node.contains(document.activeElement)||this.node.focus())},e.prototype.render=function(){var t=this,e=this.props,n=(e.children,e.style),r=(e.requestFocus,e.component),o=void 0===r?"div":r,a=(e.uri,e.location,I(e,["children","style","requestFocus","component","uri","location"]));return i.a.createElement(o,k({style:k({outline:"none"},n),tabIndex:"-1",ref:function(e){return t.node=e}},a),i.a.createElement(G.Provider,{value:this.requestFocus},this.props.children))},e}(i.a.Component);!function(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate)return t;var n=null,r=null,i=null;if("function"===typeof e.componentWillMount?n="componentWillMount":"function"===typeof e.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof e.componentWillReceiveProps?r="componentWillReceiveProps":"function"===typeof e.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"===typeof e.componentWillUpdate?i="componentWillUpdate":"function"===typeof e.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==i){var o=t.displayName||t.name,a="function"===typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+o+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==r?"\n  "+r:"")+(null!==i?"\n  "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof t.getDerivedStateFromProps&&(e.componentWillMount=l,e.componentWillReceiveProps=c),"function"===typeof e.getSnapshotBeforeUpdate){if("function"!==typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=f;var s=e.componentDidUpdate;e.componentDidUpdate=function(t,e,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,t,e,r)}}}(W);var X=function(){},Y=i.a.forwardRef;"undefined"===typeof Y&&(Y=function(t){return t});var Z=Y((function(t,e){var n=t.innerRef,r=I(t,["innerRef"]);return i.a.createElement(B.Consumer,null,(function(t){t.basepath;var o=t.baseuri;return i.a.createElement(D,null,(function(t){var a=t.location,s=t.navigate,u=r.to,l=r.state,c=r.replace,f=r.getProps,p=void 0===f?X:f,d=I(r,["to","state","replace","getProps"]),g=m(u,o),y=encodeURI(g),v=a.pathname===y,b=h(a.pathname,y);return i.a.createElement("a",k({ref:e||n,"aria-current":v?"page":void 0},d,p({isCurrent:v,isPartiallyCurrent:b,href:g,location:a}),{href:g,onClick:function(t){if(d.onClick&&d.onClick(t),ot(t)){t.preventDefault();var e=c;if("boolean"!==typeof c&&v){var n=k({},a.state),r=(n.key,I(n,["key"]));i=k({},l),o=r,e=(u=Object.keys(i)).length===Object.keys(o).length&&u.every((function(t){return o.hasOwnProperty(t)&&i[t]===o[t]}))}s(g,{state:l,replace:e})}var i,o,u}}))}))}))}));function K(t){this.uri=t}Z.displayName="Link";var $=function(t){return t instanceof K},J=function(t){function e(){return L(this,e),j(this,t.apply(this,arguments))}return M(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.navigate,n=t.to,r=(t.from,t.replace),i=void 0===r||r,o=t.state,a=(t.noThrow,t.baseuri),s=I(t,["navigate","to","from","replace","state","noThrow","baseuri"]);Promise.resolve().then((function(){var t=m(n,a);e(g(t,s),{replace:i,state:o})}))},e.prototype.render=function(){var t=this.props,e=(t.navigate,t.to),n=(t.from,t.replace,t.state,t.noThrow),r=t.baseuri,i=I(t,["navigate","to","from","replace","state","noThrow","baseuri"]),o=m(e,r);return n||function(t){throw new K(t)}(g(o,i)),null},e}(i.a.Component),Q=function(t){return i.a.createElement(B.Consumer,null,(function(e){var n=e.baseuri;return i.a.createElement(D,null,(function(e){return i.a.createElement(J,k({},e,{baseuri:n},t))}))}))},tt=function(){var t=Object(r.useContext)(N);if(!t)throw new Error("useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");return t.location},et=function(){var t=Object(r.useContext)(N);if(!t)throw new Error("useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");return t.navigate},nt=function(t){if(!t)throw new Error("useMatch(path: string) requires an argument of a string to match against");var e=Object(r.useContext)(B);if(!e)throw new Error("useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");var n=tt(),i=m(t,e.baseuri),o=d(i,n.pathname);return o?k({},o.params,{uri:o.uri,path:t}):null},rt=function(t){return t.replace(/(^\/+|\/+$)/g,"")},it=function t(e){return function(n){if(!n)return null;if(n.type===i.a.Fragment&&n.props.children)return i.a.Children.map(n.props.children,t(e));var r,o,s;if(n.props.path||n.props.default||n.type===Q||a()(!1),n.type!==Q||n.props.from&&n.props.to||a()(!1),n.type===Q&&(r=n.props.from,o=n.props.to,s=function(t){return v(t)},w(r).filter(s).sort().join("/")!==w(o).filter(s).sort().join("/"))&&a()(!1),n.props.default)return{value:n,default:!0};var u=n.type===Q?n.props.from:n.props.path,l="/"===u?e:rt(e)+"/"+rt(u);return{value:n,default:n.props.default,path:n.props.children?rt(l)+"/*":l}}},ot=function(t){return!t.defaultPrevented&&0===t.button&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return u}));var r=n(27);const i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:()=>(r.a.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")(),0)});const o={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},a={common:0,meters:1,pixels:2},s={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}},u={DRAW:"draw",MASK:"mask"}},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return En})),n.d(e,"b",(function(){return nn})),n.d(e,"c",(function(){return Ht})),n.d(e,"d",(function(){return Ct})),n.d(e,"e",(function(){return vn})),n.d(e,"f",(function(){return _e})),n.d(e,"g",(function(){return ae})),n.d(e,"h",(function(){return ut})),n.d(e,"i",(function(){return me})),n.d(e,"j",(function(){return R})),n.d(e,"k",(function(){return Te})),n.d(e,"l",(function(){return yn})),n.d(e,"m",(function(){return ye})),n.d(e,"n",(function(){return Ae})),n.d(e,"o",(function(){return xe})),n.d(e,"p",(function(){return tn})),n.d(e,"q",(function(){return Se})),n.d(e,"r",(function(){return nt})),n.d(e,"s",(function(){return Ie})),n.d(e,"t",(function(){return he})),n.d(e,"u",(function(){return se})),n.d(e,"v",(function(){return ke})),n.d(e,"w",(function(){return ne})),n.d(e,"x",(function(){return je})),n.d(e,"y",(function(){return Ce}));var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},i(t,e)};function o(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return a=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},a.apply(this,arguments)};function s(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var l=[];Object.freeze(l);var c={};Object.freeze(c);var f={};function h(){return"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:f}function p(){return++Nt.mobxGuid}function d(t){throw m(!1,t),"X"}function m(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is an production build."))}function g(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var y=function(){};function v(t){return null!==t&&"object"===typeof t}function b(t){if(null===t||"object"!==typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function _(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function A(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function w(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(t){return v(t)&&!0===t[n]}}function x(t){return void 0!==h().Map&&t instanceof h().Map}function E(t){return t instanceof Set}function O(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function S(){return"function"===typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function P(t){return null===t?null:"object"===typeof t?""+t:t}function C(){return"function"===typeof Symbol&&Symbol.iterator||"@@iterator"}function T(t,e){A(t,C(),e)}function k(t){return t[C()]=L,t}function I(){return"function"===typeof Symbol&&Symbol.toStringTag||"@@toStringTag"}function L(){return this}var j=function(){function t(t){void 0===t&&(t="Atom@"+p()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=it.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return Gt(this)},t.prototype.reportChanged=function(){zt(),function(t){if(t.lowestObserverState===it.STALE)return;t.lowestObserverState=it.STALE;var e=t.observers,n=e.length;for(;n--;){var r=e[n];r.dependenciesState===it.UP_TO_DATE&&(r.isTracing!==ot.NONE&&Vt(r,t),r.onBecomeStale()),r.dependenciesState=it.STALE}}(this),Ut()},t.prototype.toString=function(){return this.name},t}(),M=w("Atom",j);function R(t,e,n){void 0===e&&(e=y),void 0===n&&(n=y);var r,i=new j(t);return de("onBecomeObserved",i,e,r),pe(i,n),i}function N(t,e){return t===e}var D={identity:N,structural:function(t,e){return _n(t,e)},default:function(t,e){return function(t,e){return"number"===typeof t&&"number"===typeof e&&isNaN(t)&&isNaN(e)}(t,e)||N(t,e)},shallow:function(t,e){return _n(t,e,1)}},F={},B={};function z(t,e){var n=e?F:B;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return U(this),this[t]},set:function(e){U(this),this[t]=e}})}function U(t){if(!0!==t.__mobxDidRunLazyInitializers){var e=t.__mobxDecorators;if(e)for(var n in _(t,"__mobxDidRunLazyInitializers",!0),e){var r=e[n];r.propertyCreator(t,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function G(t,e){return function(){var n,r=function(r,i,o,s){if(!0===s)return e(r,i,o,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var u=r.__mobxDecorators;_(r,"__mobxDecorators",a({},u))}return r.__mobxDecorators[i]={prop:i,propertyCreator:e,descriptor:o,decoratorTarget:r,decoratorArguments:n},z(i,t)};return V(arguments)?(n=l,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function V(t){return(2===t.length||3===t.length)&&"string"===typeof t[1]||4===t.length&&!0===t[3]}function q(t,e,n){return Oe(t)?t:Array.isArray(t)?nt.array(t,{name:n}):b(t)?nt.object(t,void 0,{name:n}):x(t)?nt.map(t,{name:n}):E(t)?nt.set(t,{name:n}):t}function H(t){return t}function W(t){m(t);var e=G(!0,(function(e,n,r,i,o){fn(e,n,r?r.initializer?r.initializer.call(e):r.value:void 0,t)})),n=("undefined"!==typeof r&&r.env,e);return n.enhancer=t,n}var X={deep:!0,name:void 0,defaultDecorator:void 0},Y={deep:!1,name:void 0,defaultDecorator:void 0};function Z(t){return null===t||void 0===t?X:"string"===typeof t?{name:t,deep:!0}:t}function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?H:q}Object.freeze(X),Object.freeze(Y);var $=W(q),J=W((function(t,e,n){return void 0===t||null===t||gn(t)||tn(t)||on(t)||un(t)?t:Array.isArray(t)?nt.array(t,{name:n,deep:!1}):b(t)?nt.object(t,void 0,{name:n,deep:!1}):x(t)?nt.map(t,{name:n,deep:!1}):E(t)?nt.set(t,{name:n,deep:!1}):d(!1)})),Q=W(H),tt=W((function(t,e,n){return _n(t,e)?e:t}));var et={box:function(t,e){arguments.length>2&&rt("box");var n=Z(e);return new Tt(t,K(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&rt("shallowBox"),nt.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&rt("array");var n=Z(e);return new Ye(t,K(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&rt("shallowArray"),nt.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&rt("map");var n=Z(e);return new nn(t,K(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&rt("shallowMap"),nt.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&rt("set");var n=Z(e);return new sn(t,K(n),n.name)},object:function(t,e,n){"string"===typeof arguments[1]&&rt("object");var r=Z(n);return ge({},t,e,r)},shallowObject:function(t,e){return"string"===typeof arguments[1]&&rt("shallowObject"),nt.object(t,{},{name:e,deep:!1})},ref:Q,shallow:J,deep:$,struct:tt},nt=function(t,e,n){if("string"===typeof arguments[1])return $.apply(null,arguments);if(Oe(t))return t;var r=b(t)?nt.object(t,e,n):Array.isArray(t)?nt.array(t,e):x(t)?nt.map(t,e):E(t)?nt.set(t,e):t;if(r!==t)return r;d(!1)};function rt(t){d("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys(et).forEach((function(t){return nt[t]=et[t]}));var it,ot,at=G(!1,(function(t,e,n,r,i){var o=n.get,s=n.set,u=i[0]||{};!function(t,e,n){var r=cn(t);n.name=r.name+"."+e,n.context=t,r.values[e]=new It(n),Object.defineProperty(t,e,function(t){return pn[t]||(pn[t]={configurable:Nt.computedConfigurable,enumerable:!1,get:function(){return dn(this).read(this,t)},set:function(e){dn(this).write(this,t,e)}})}(e))}(t,e,a({get:o,set:s},u))})),st=at({equals:D.structural}),ut=function(t,e,n){if("string"===typeof e)return at.apply(null,arguments);if(null!==t&&"object"===typeof t&&1===arguments.length)return at.apply(null,arguments);var r="object"===typeof e?e:{};return r.get=t,r.set="function"===typeof e?e:r.set,r.name=r.name||t.name||"",new It(r)};ut.struct=st,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(it||(it={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(ot||(ot={}));var lt=function(t){this.cause=t};function ct(t){return t instanceof lt}function ft(t){switch(t.dependenciesState){case it.UP_TO_DATE:return!1;case it.NOT_TRACKING:case it.STALE:return!0;case it.POSSIBLY_STALE:for(var e=vt(!0),n=gt(),r=t.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(Lt(a)){if(Nt.disableErrorBoundaries)a.get();else try{a.get()}catch(s){return yt(n),bt(e),!0}if(t.dependenciesState===it.STALE)return yt(n),bt(e),!0}}return _t(t),yt(n),bt(e),!1}}function ht(t){var e=t.observers.length>0;Nt.computationDepth>0&&e&&d(!1),Nt.allowStateChanges||!e&&"strict"!==Nt.enforceActions||d(!1)}function pt(t,e,n){var r=vt(!0);_t(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Nt.runId;var i,o=Nt.trackingDerivation;if(Nt.trackingDerivation=t,!0===Nt.disableErrorBoundaries)i=e.call(n);else try{i=e.call(n)}catch(a){i=new lt(a)}return Nt.trackingDerivation=o,function(t){for(var e=t.observing,n=t.observing=t.newObserving,r=it.UP_TO_DATE,i=0,o=t.unboundDepsCount,a=0;a<o;a++){0===(s=n[a]).diffValue&&(s.diffValue=1,i!==a&&(n[i]=s),i++),s.dependenciesState>r&&(r=s.dependenciesState)}n.length=i,t.newObserving=null,o=e.length;for(;o--;){0===(s=e[o]).diffValue&&Ft(s,t),s.diffValue=0}for(;i--;){var s;1===(s=n[i]).diffValue&&(s.diffValue=0,Dt(s,t))}r!==it.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}(t),t.observing.length,bt(r),i}function dt(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)Ft(e[n],t);t.dependenciesState=it.NOT_TRACKING}function mt(t){var e=gt(),n=t();return yt(e),n}function gt(){var t=Nt.trackingDerivation;return Nt.trackingDerivation=null,t}function yt(t){Nt.trackingDerivation=t}function vt(t){var e=Nt.allowStateReads;return Nt.allowStateReads=t,e}function bt(t){Nt.allowStateReads=t}function _t(t){if(t.dependenciesState!==it.UP_TO_DATE){t.dependenciesState=it.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=it.UP_TO_DATE}}var At=0,wt=1,xt=Object.getOwnPropertyDescriptor((function(){}),"name");xt&&xt.configurable;function Et(t,e){var n=function(){return Ot(t,e,this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,n,r){var i=function(t,e,n){var r=$t()&&!!t,i=0;if(r){i=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];Qt({type:"action",name:t,object:e,arguments:a})}var u=gt();zt();var l=St(!0),c=vt(!0),f={prevDerivation:u,prevAllowStateChanges:l,prevAllowStateReads:c,notifySpy:r,startTime:i,actionId:wt++,parentActionId:At};return At=f.actionId,f}(t,n,r);try{return e.apply(n,r)}catch(o){throw i.error=o,o}finally{!function(t){At!==t.actionId&&d("invalid action stack. did you forget to finish an action?");At=t.parentActionId,void 0!==t.error&&(Nt.suppressReactionErrors=!0);Pt(t.prevAllowStateChanges),bt(t.prevAllowStateReads),Ut(),yt(t.prevDerivation),t.notifySpy&&ee({time:Date.now()-t.startTime});Nt.suppressReactionErrors=!1}(i)}}function St(t){var e=Nt.allowStateChanges;return Nt.allowStateChanges=t,e}function Pt(t){Nt.allowStateChanges=t}function Ct(t){var e,n=Nt.computationDepth;Nt.computationDepth=0;try{e=t()}finally{Nt.computationDepth=n}return e}var Tt=function(t){function e(e,n,r,i,o){void 0===r&&(r="ObservableValue@"+p()),void 0===i&&(i=!0),void 0===o&&(o=D.default);var a=t.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=o,a.hasUnreportedChange=!1,a.value=n(e,void 0,r),i&&$t()&&Jt({type:"create",name:a.name,newValue:""+a.value}),a}return o(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){var e=this.value;if((t=this.prepareNewValue(t))!==Nt.UNCHANGED){var n=$t();n&&Qt({type:"update",name:this.name,newValue:t,oldValue:e}),this.setNewValue(t),n&&ee()}},e.prototype.prepareNewValue=function(t){if(ht(this),Me(this)){var e=Ne(this,{object:this,type:"update",newValue:t});if(!e)return Nt.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Nt.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),De(this)&&Be(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return Re(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),Fe(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return P(this.get())},e}(j);Tt.prototype[S()]=Tt.prototype.valueOf;var kt=w("ObservableValue",Tt),It=function(){function t(t){this.dependenciesState=it.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=it.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+p(),this.value=new lt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ot.NONE,m(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+p(),t.set&&(this.setter=Et(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?D.structural:D.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==it.UP_TO_DATE)return;t.lowestObserverState=it.POSSIBLY_STALE;var e=t.observers,n=e.length;for(;n--;){var r=e[n];r.dependenciesState===it.UP_TO_DATE&&(r.dependenciesState=it.POSSIBLY_STALE,r.isTracing!==ot.NONE&&Vt(r,t),r.onBecomeStale())}}(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&d("Cycle detected in computation "+this.name+": "+this.derivation),0!==Nt.inBatch||0!==this.observers.length||this.keepAlive?(Gt(this),ft(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===it.STALE)return;t.lowestObserverState=it.STALE;var e=t.observers,n=e.length;for(;n--;){var r=e[n];r.dependenciesState===it.POSSIBLY_STALE?r.dependenciesState=it.STALE:r.dependenciesState===it.UP_TO_DATE&&(t.lowestObserverState=it.UP_TO_DATE)}}(this)):ft(this)&&(this.warnAboutUntrackedRead(),zt(),this.value=this.computeValue(!1),Ut());var t=this.value;if(ct(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ct(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){m(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else m(!1,!1)},t.prototype.trackAndCompute=function(){$t()&&Jt({object:this.scope,type:"compute",name:this.name});var t=this.value,e=this.dependenciesState===it.NOT_TRACKING,n=this.computeValue(!0),r=e||ct(t)||ct(n)||!this.equals(t,n);return r&&(this.value=n),r},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Nt.computationDepth++,t)e=pt(this,this.derivation,this.scope);else if(!0===Nt.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(n){e=new lt(n)}return Nt.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(dt(this),this.value=void 0)},t.prototype.observe=function(t,e){var n=this,r=!0,i=void 0;return le((function(){var o=n.get();if(!r||e){var a=gt();t({type:"update",object:n,newValue:o,oldValue:i}),yt(a)}r=!1,i=o}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return P(this.get())},t}();It.prototype[S()]=It.prototype.valueOf;var Lt=w("ComputedValue",It),jt=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Mt=!0,Rt=!1,Nt=function(){var t=h();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Mt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new jt).version&&(Mt=!1),Mt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new jt):(setTimeout((function(){Rt||d("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new jt)}();function Dt(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Ft(t,e){if(1===t.observers.length)t.observers.length=0,Bt(t);else{var n=t.observers,r=t.observersIndexes,i=n.pop();if(i!==e){var o=r[e.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[e.__mapid]}}function Bt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Nt.pendingUnobservations.push(t))}function zt(){Nt.inBatch++}function Ut(){if(0===--Nt.inBatch){Xt();for(var t=Nt.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,0===n.observers.length&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof It&&n.suspend())}Nt.pendingUnobservations=[]}}function Gt(t){var e=Nt.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.length&&Nt.inBatch>0&&Bt(t),!1)}function Vt(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===ot.BREAK){var n=[];qt(ye(t),n,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof It?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n    ")()}}function qt(t,e,n){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(n).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return qt(t,e,n+1)})))}var Ht=function(){function t(t,e,n,r){void 0===t&&(t="Reaction@"+p()),void 0===r&&(r=!1),this.name=t,this.onInvalidate=e,this.errorHandler=n,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=it.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+p(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ot.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Nt.pendingReactions.push(this),Xt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(zt(),this._isScheduled=!1,ft(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&$t()&&Jt({name:this.name,type:"scheduled-reaction"})}catch(t){this.reportExceptionInDerivation(t)}}Ut()}},t.prototype.track=function(t){zt();var e,n=$t();n&&(e=Date.now(),Qt({name:this.name,type:"reaction"})),this._isRunning=!0;var r=pt(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&dt(this),ct(r)&&this.reportExceptionInDerivation(r.cause),n&&ee({time:Date.now()-e}),Ut()},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Nt.disableErrorBoundaries)throw t;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Nt.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,t),$t()&&Jt({type:"error",name:this.name,message:n,error:""+t}),Nt.globalReactionErrorHandlers.forEach((function(n){return n(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(zt(),dt(this),Ut()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t.$mobx=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!1;"boolean"===typeof t[t.length-1]&&(n=t.pop());var r=Le(t);if(!r)return d(!1);r.isTracing===ot.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled");r.isTracing=n?ot.BREAK:ot.LOG}(this,t)},t}();var Wt=function(t){return t()};function Xt(){Nt.inBatch>0||Nt.isRunningReactions||Wt(Yt)}function Yt(){Nt.isRunningReactions=!0;for(var t=Nt.pendingReactions,e=0;t.length>0;){100===++e&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var n=t.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Nt.isRunningReactions=!1}var Zt=w("Reaction",Ht);function Kt(t){var e=Wt;Wt=function(n){return t((function(){return e(n)}))}}function $t(){return!!Nt.spyListeners.length}function Jt(t){if(Nt.spyListeners.length)for(var e=Nt.spyListeners,n=0,r=e.length;n<r;n++)e[n](t)}function Qt(t){Jt(a(a({},t),{spyReportStart:!0}))}var te={spyReportEnd:!0};function ee(t){Jt(t?a(a({},t),{spyReportEnd:!0}):te)}function ne(t){return Nt.spyListeners.push(t),g((function(){Nt.spyListeners=Nt.spyListeners.filter((function(e){return e!==t}))}))}function re(){d(!1)}function ie(t){return function(e,n,r){if(r){if(r.value)return{value:Et(t,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Et(t,i.call(this))}}}return oe(t).apply(this,arguments)}}function oe(t){return function(e,n,r){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(e){_(this,n,ae(t,e))}})}}var ae=function(t,e,n,r){return 1===arguments.length&&"function"===typeof t?Et(t.name||"<unnamed action>",t):2===arguments.length&&"function"===typeof e?Et(t,e):1===arguments.length&&"string"===typeof t?ie(t):!0!==r?ie(e).apply(null,arguments):void(t[e]=Et(t.name||e,n.value))};function se(t,e){return Ot("string"===typeof t?t:t.name||"<unnamed action>","function"===typeof t?t:e,this,void 0)}function ue(t,e,n){_(t,e,Et(e,n.bind(t)))}function le(t,e){void 0===e&&(e=c);var n,r=e&&e.name||t.name||"Autorun@"+p();if(!e.scheduler&&!e.delay)n=new Ht(r,(function(){this.track(a)}),e.onError,e.requiresObservable);else{var i=fe(e),o=!1;n=new Ht(r,(function(){o||(o=!0,i((function(){o=!1,n.isDisposed||n.track(a)})))}),e.onError,e.requiresObservable)}function a(){t(n)}return n.schedule(),n.getDisposer()}ae.bound=function(t,e,n,r){return!0===r?(ue(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return ue(this,e,n.value||n.initializer.call(this)),this[e]},set:re}:{enumerable:!1,configurable:!0,set:function(t){ue(this,e,t)},get:function(){}}};var ce=function(t){return t()};function fe(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ce}function he(t,e,n){void 0===n&&(n=c),"boolean"===typeof n&&(n={fireImmediately:n});var r,i,o,a=n.name||"Reaction@"+p(),s=ae(a,n.onError?(r=n.onError,i=e,function(){try{return i.apply(this,arguments)}catch(t){r.call(this,t)}}):e),u=!n.scheduler&&!n.delay,l=fe(n),f=!0,h=!1,d=n.compareStructural?D.structural:n.equals||D.default,m=new Ht(a,(function(){f||u?g():h||(h=!0,l(g))}),n.onError,n.requiresObservable);function g(){if(h=!1,!m.isDisposed){var e=!1;m.track((function(){var n=t(m);e=f||!d(o,n),o=n})),f&&n.fireImmediately&&s(o,m),f||!0!==e||s(o,m),f&&(f=!1)}}return m.schedule(),m.getDisposer()}function pe(t,e,n){return de("onBecomeUnobserved",t,e,n)}function de(t,e,n,r){var i="function"===typeof r?yn(e,n):yn(e),o="function"===typeof r?r:n,a=i[t];return"function"!==typeof a?d(!1):(i[t]=function(){a.call(this),o.call(this)},function(){i[t]=a})}function me(t){var e=t.enforceActions,n=t.computedRequiresReaction,r=t.computedConfigurable,i=t.disableErrorBoundaries,o=t.arrayBuffer,a=t.reactionScheduler,s=t.reactionRequiresObservable,u=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Nt.pendingReactions.length||Nt.inBatch||Nt.isRunningReactions)&&d("isolateGlobalState should be called before MobX is running any reactions"),Rt=!0,Mt&&(0===--h().__mobxInstanceCount&&(h().__mobxGlobals=void 0),Nt=new jt)),void 0!==e){var l=void 0;switch(e){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:d("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Nt.enforceActions=l,Nt.allowStateChanges=!0!==l&&"strict"!==l}void 0!==n&&(Nt.computedRequiresReaction=!!n),void 0!==s&&(Nt.reactionRequiresObservable=!!s),void 0!==u&&(Nt.observableRequiresReaction=!!u,Nt.allowStateReads=!Nt.observableRequiresReaction),void 0!==r&&(Nt.computedConfigurable=!!r),void 0!==i&&(!0===i&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."),Nt.disableErrorBoundaries=!!i),"number"===typeof o&&Je(o),a&&Kt(a)}function ge(t,e,n,r){var i=(r=Z(r)).defaultDecorator||(!1===r.deep?Q:$);U(t),cn(t,r.name,i.enhancer),zt();try{for(var o in e){var a=Object.getOwnPropertyDescriptor(e,o);0;var s=(n&&o in n?n[o]:a.get?at:i)(t,o,a,!0);s&&Object.defineProperty(t,o,s)}}finally{Ut()}return t}function ye(t,e){return ve(yn(t,e))}function ve(t){var e,n,r={name:t.name};return t.observing&&t.observing.length>0&&(r.dependencies=(e=t.observing,n=[],e.forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),n).map(ve)),r}function be(){this.message="FLOW_CANCELLED"}function _e(t,e,n){var r;if(on(t)||tn(t)||kt(t))r=vn(t);else{if(!gn(t))return d(!1);if("string"!==typeof e)return d(!1);r=vn(t,e)}return void 0!==r.dehancer?d(!1):(r.dehancer="function"===typeof e?e:n,function(){r.dehancer=void 0})}function Ae(t,e,n){return"function"===typeof n?function(t,e,n){return vn(t,e).intercept(n)}(t,e,n):function(t,e){return vn(t).intercept(e)}(t,e)}function we(t,e){if(null===t||void 0===t)return!1;if(void 0!==e){if(!1===gn(t))return!1;if(!t.$mobx.values[e])return!1;var n=yn(t,e);return Lt(n)}return Lt(t)}function xe(t,e){return"string"!==typeof e?d(!1):we(t,e)}function Ee(t,e){if(null===t||void 0===t)return!1;if(void 0!==e){if(gn(t)){var n=t.$mobx;return n.values&&!!n.values[e]}return!1}return gn(t)||!!t.$mobx||M(t)||Zt(t)||Lt(t)}function Oe(t){return 1!==arguments.length&&d(!1),Ee(t)}function Se(t,e){return"string"!==typeof e?d(!1):Ee(t,e)}function Pe(t){return gn(t)?t.$mobx.getKeys():on(t)?t._keys.slice():un(t)?O(t.keys()):tn(t)?t.map((function(t,e){return e})):d(!1)}function Ce(t){return gn(t)?Pe(t).map((function(e){return t[e]})):on(t)?Pe(t).map((function(e){return t.get(e)})):un(t)?O(t.values()):tn(t)?t.slice():d(!1)}function Te(t){return gn(t)?Pe(t).map((function(e){return[e,t[e]]})):on(t)?Pe(t).map((function(e){return[e,t.get(e)]})):un(t)?O(t.entries()):tn(t)?t.map((function(t,e){return[e,t]})):d(!1)}function ke(t,e,n){if(2!==arguments.length||un(t))if(gn(t)){var r=t.$mobx,i=r.values[e];i?r.write(t,e,n):fn(t,e,n,r.defaultEnhancer)}else if(on(t))t.set(e,n);else if(un(t))t.add(e);else{if(!tn(t))return d(!1);"number"!==typeof e&&(e=parseInt(e,10)),m(e>=0,"Not a valid index: '"+e+"'"),zt(),e>=t.length&&(t.length=e+1),t[e]=n,Ut()}else{zt();var o=e;try{for(var a in o)ke(t,a,o[a])}finally{Ut()}}}function Ie(t,e,n,r){return"function"===typeof n?function(t,e,n,r){return vn(t,e).observe(n,r)}(t,e,n,r):function(t,e,n){return vn(t).observe(e,n)}(t,e,n)}be.prototype=Object.create(Error.prototype);function Le(t){switch(t.length){case 0:return Nt.trackingDerivation;case 1:return yn(t[0]);case 2:return yn(t[0],t[1])}}function je(t,e){void 0===e&&(e=void 0),zt();try{return t.apply(e)}finally{Ut()}}function Me(t){return void 0!==t.interceptors&&t.interceptors.length>0}function Re(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),g((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function Ne(t,e){var n=gt();try{var r=t.interceptors;if(r)for(var i=0,o=r.length;i<o&&(m(!(e=r[i](e))||e.type,"Intercept handlers should return nothing or a change object"),e);i++);return e}finally{yt(n)}}function De(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function Fe(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),g((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function Be(t,e){var n=gt(),r=t.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](e);yt(n)}}var ze,Ue,Ge,Ve,qe=(ze=!1,Ue={},Object.defineProperty(Ue,"0",{set:function(){ze=!0}}),Object.create(Ue)[0]=1,!1===ze),He=0,We=function(){};Ge=We,Ve=Array.prototype,"undefined"!==typeof Object.setPrototypeOf?Object.setPrototypeOf(Ge.prototype,Ve):"undefined"!==typeof Ge.prototype.__proto__?Ge.prototype.__proto__=Ve:Ge.prototype=Ve,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach((function(t){Object.defineProperty(We.prototype,t,{configurable:!0,writable:!0,value:Array.prototype[t]})}));var Xe=function(){function t(t,e,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.atom=new j(t||"ObservableArray@"+p()),this.enhancer=function(n,r){return e(n,r,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return Re(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Fe(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!==typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var n=new Array(t-e),r=0;r<t-e;r++)n[r]=void 0;this.spliceWithArray(e,0,n)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>He&&Je(t+e+1)},t.prototype.spliceWithArray=function(t,e,n){var r=this;ht(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:void 0===e||null===e?0:Math.max(0,Math.min(e,i-t)),void 0===n&&(n=l),Me(this)){var o=Ne(this,{object:this.array,type:"splice",index:t,removedCount:e,added:n});if(!o)return l;e=o.removedCount,n=o.added}n=0===n.length?n:n.map((function(t){return r.enhancer(t,void 0)}));var a=n.length-e;this.updateArrayLength(i,a);var s=this.spliceItemsIntoValues(t,e,n);return 0===e&&0===n.length||this.notifyArraySplice(t,n,s),this.dehanceValues(s)},t.prototype.spliceItemsIntoValues=function(t,e,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,u([t,e],n));var i=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(n,this.values.slice(t+e)),i},t.prototype.notifyArrayChildUpdate=function(t,e,n){var r=!this.owned&&$t(),i=De(this),o=i||r?{object:this.array,type:"update",index:t,newValue:e,oldValue:n}:null;r&&Qt(a(a({},o),{name:this.atom.name})),this.atom.reportChanged(),i&&Be(this,o),r&&ee()},t.prototype.notifyArraySplice=function(t,e,n){var r=!this.owned&&$t(),i=De(this),o=i||r?{object:this.array,type:"splice",index:t,removed:n,added:e,removedCount:n.length,addedCount:e.length}:null;r&&Qt(a(a({},o),{name:this.atom.name})),this.atom.reportChanged(),i&&Be(this,o),r&&ee()},t}(),Ye=function(t){function e(e,n,r,i){void 0===r&&(r="ObservableArray@"+p()),void 0===i&&(i=!1);var o=t.call(this)||this,a=new Xe(r,n,o,i);if(A(o,"$mobx",a),e&&e.length){var s=St(!0);o.spliceWithArray(0,0,e),Pt(s)}return qe&&Object.defineProperty(a.array,"0",Ze),o}return o(e,t),e.prototype.intercept=function(t){return this.$mobx.intercept(t)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),t.map((function(t){return tn(t)?t.peek():t})))},e.prototype.replace=function(t){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,t)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},e.prototype.find=function(t,e,n){void 0===n&&(n=0);var r=this.findIndex.apply(this,arguments);return-1===r?void 0:this.get(r)},e.prototype.findIndex=function(t,e,n){void 0===n&&(n=0);for(var r=this.peek(),i=r.length,o=n;o<i;o++)if(t.call(e,r[o],o,this))return o;return-1},e.prototype.splice=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,e)}return this.$mobx.spliceWithArray(t,e,n)},e.prototype.spliceWithArray=function(t,e,n){return this.$mobx.spliceWithArray(t,e,n)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,t),n.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.values.length},e.prototype.reverse=function(){var t=this.slice();return t.reverse.apply(t,arguments)},e.prototype.sort=function(t){var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.dehanceValues(this.$mobx.values).indexOf(t);return e>-1&&(this.splice(e,1),!0)},e.prototype.move=function(t,e){function n(t){if(t<0)throw new Error("[mobx.array] Index out of bounds: "+t+" is negative");var e=this.$mobx.values.length;if(t>=e)throw new Error("[mobx.array] Index out of bounds: "+t+" is not smaller than "+e)}if(n.call(this,t),n.call(this,e),t!==e){var r,i=this.$mobx.values;r=t<e?u(i.slice(0,t),i.slice(t+1,e+1),[i[t]],i.slice(e+1)):u(i.slice(0,e),[i[t]],i.slice(e,t),i.slice(t+1)),this.replace(r)}},e.prototype.get=function(t){var e=this.$mobx;if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},e.prototype.set=function(t,e){var n=this.$mobx,r=n.values;if(t<r.length){ht(n.atom);var i=r[t];if(Me(n)){var o=Ne(n,{type:"update",object:this,index:t,newValue:e});if(!o)return;e=o.newValue}(e=n.enhancer(e,i))!==i&&(r[t]=e,n.notifyArrayChildUpdate(t,e,i))}else{if(t!==r.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+r.length);n.spliceWithArray(t,0,[e])}},e}(We);T(Ye.prototype,(function(){this.$mobx.atom.reportObserved();var t=this,e=0;return k({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})})),Object.defineProperty(Ye.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(t){this.$mobx.setArrayLength(t)}}),_(Ye.prototype,I(),"Array"),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach((function(t){var e=Array.prototype[t];m("function"===typeof e,"Base function not defined on Array prototype: '"+t+"'"),_(Ye.prototype,t,(function(){return e.apply(this.peek(),arguments)}))})),function(t,e){for(var n=0;n<e.length;n++)_(t,e[n],t[e[n]])}(Ye.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var Ze=Ke(0);function Ke(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(e){this.set(t,e)}}}function $e(t){Object.defineProperty(Ye.prototype,""+t,Ke(t))}function Je(t){for(var e=He;e<t;e++)$e(e);He=t}Je(1e3);var Qe=w("ObservableArrayAdministration",Xe);function tn(t){return v(t)&&Qe(t.$mobx)}var en={},nn=function(){function t(t,e,n){if(void 0===e&&(e=q),void 0===n&&(n="ObservableMap@"+p()),this.enhancer=e,this.name=n,this.$mobx=en,this._keys=new Ye(void 0,H,this.name+".keys()",!0),"function"!==typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Nt.trackingDerivation)return this._has(t);var n=this._hasMap.get(t);if(!n){var r=n=new Tt(this._has(t),H,this.name+"."+rn(t)+"?",!1);this._hasMap.set(t,r),pe(r,(function(){return e._hasMap.delete(t)}))}return n.get()},t.prototype.set=function(t,e){var n=this._has(t);if(Me(this)){var r=Ne(this,{type:n?"update":"add",object:this,newValue:e,name:t});if(!r)return this;e=r.newValue}return n?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if(Me(this)&&!(i=Ne(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var n=$t(),r=De(this),i=r||n?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return n&&Qt(a(a({},i),{name:this.name,key:t})),je((function(){e._keys.remove(t),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Be(this,i),n&&ee(),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var n=this._hasMap.get(t);n&&n.setNewValue(e)},t.prototype._updateValue=function(t,e){var n=this._data.get(t);if((e=n.prepareNewValue(e))!==Nt.UNCHANGED){var r=$t(),i=De(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:t,newValue:e}:null;r&&Qt(a(a({},o),{name:this.name,key:t})),n.setNewValue(e),i&&Be(this,o),r&&ee()}},t.prototype._addValue=function(t,e){var n=this;je((function(){var r=new Tt(e,n.enhancer,n.name+"."+rn(t),!1);n._data.set(t,r),e=r.value,n._updateHasMapEntry(t,!0),n._keys.push(t)}));var r=$t(),i=De(this),o=i||r?{type:"add",object:this,name:t,newValue:e}:null;r&&Qt(a(a({},o),{name:this.name,key:t})),i&&Be(this,o),r&&ee()},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keys[C()]()},t.prototype.values=function(){var t=this,e=0;return k({next:function(){return e<t._keys.length?{value:t.get(t._keys[e++]),done:!1}:{value:void 0,done:!0}}})},t.prototype.entries=function(){var t=this,e=0;return k({next:function(){if(e<t._keys.length){var n=t._keys[e++];return{value:[n,t.get(n)],done:!1}}return{done:!0}}})},t.prototype.forEach=function(t,e){var n=this;this._keys.forEach((function(r){return t.call(e,n.get(r),r,n)}))},t.prototype.merge=function(t){var e=this;return on(t)&&(t=t.toJS()),je((function(){b(t)?Object.keys(t).forEach((function(n){return e.set(n,t[n])})):Array.isArray(t)?t.forEach((function(t){var n=s(t,2),r=n[0],i=n[1];return e.set(r,i)})):x(t)?t.constructor!==Map?d("Cannot initialize from classes that inherit from Map: "+t.constructor.name):t.forEach((function(t,n){return e.set(n,t)})):null!==t&&void 0!==t&&d("Cannot initialize map from "+t)})),this},t.prototype.clear=function(){var t=this;je((function(){mt((function(){t._keys.slice().forEach((function(e){return t.delete(e)}))}))}))},t.prototype.replace=function(t){var e=this;return je((function(){for(var n,r=x(n=t)||on(n)?n:Array.isArray(n)?new Map(n):b(n)?new Map(Object.entries(n)):d("Cannot convert to map from '"+n+"'"),i=e._keys,o=Array.from(r.keys()),a=!1,s=0;s<i.length;s++){var u=i[s];i.length===o.length&&u!==o[s]&&(a=!0),r.has(u)||(a=!0,e.delete(u))}r.forEach((function(t,n){e._data.has(n)||(a=!0),e.set(n,t)})),a&&e._keys.replace(o)})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t=this,e={};return this._keys.forEach((function(n){return e["symbol"===typeof n?n:rn(n)]=t.get(n)})),e},t.prototype.toJS=function(){var t=this,e=new Map;return this._keys.forEach((function(n){return e.set(n,t.get(n))})),e},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+this._keys.map((function(e){return rn(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return Fe(this,t)},t.prototype.intercept=function(t){return Re(this,t)},t}();function rn(t){return t&&t.toString?t.toString():new String(t).toString()}T(nn.prototype,(function(){return this.entries()})),A(nn.prototype,I(),"Map");var on=w("ObservableMap",nn),an={},sn=function(){function t(t,e,n){if(void 0===e&&(e=q),void 0===n&&(n="ObservableSet@"+p()),this.name=n,this.$mobx=an,this._data=new Set,this._atom=R(this.name),"function"!==typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,r){return e(t,r,n)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;je((function(){mt((function(){t._data.forEach((function(e){t.delete(e)}))}))}))},t.prototype.forEach=function(t,e){var n=this;this._data.forEach((function(r){t.call(e,r,r,n)}))},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((ht(this._atom),Me(this))&&!(i=Ne(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){je((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var n=$t(),r=De(this),i=r||n?{type:"add",object:this,newValue:t}:null;0,r&&Be(this,i)}return this},t.prototype.delete=function(t){var e=this;if(Me(this)&&!(i=Ne(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var n=$t(),r=De(this),i=r||n?{type:"delete",object:this,oldValue:t}:null;return je((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Be(this,i),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=O(this.keys()),n=O(this.values());return k({next:function(){var r=t;return t+=1,r<n.length?{value:[e[r],n[r]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t,e=this,n=0;return void 0!==this._data.values?t=O(this._data.values()):(t=[],this._data.forEach((function(e){return t.push(e)}))),k({next:function(){return n<t.length?{value:e.dehanceValue(t[n++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return un(t)&&(t=t.toJS()),je((function(){Array.isArray(t)||E(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!==t&&void 0!==t&&d("Cannot initialize set from "+t)})),this},t.prototype.observe=function(t,e){return Fe(this,t)},t.prototype.intercept=function(t){return Re(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+O(this.keys()).join(", ")+" ]"},t}();T(sn.prototype,(function(){return this.values()})),A(sn.prototype,I(),"Set");var un=w("ObservableSet",sn),ln=function(){function t(t,e,n){this.target=t,this.name=e,this.defaultEnhancer=n,this.values={}}return t.prototype.read=function(t,e){if(this.target===t||(this.illegalAccess(t,e),this.values[e]))return this.values[e].get()},t.prototype.write=function(t,e,n){var r=this.target;r!==t&&this.illegalAccess(t,e);var i=this.values[e];if(i instanceof It)i.set(n);else{if(Me(this)){if(!(u=Ne(this,{type:"update",object:r,name:e,newValue:n})))return;n=u.newValue}if((n=i.prepareNewValue(n))!==Nt.UNCHANGED){var o=De(this),s=$t(),u=o||s?{type:"update",object:r,oldValue:i.value,name:e,newValue:n}:null;s&&Qt(a(a({},u),{name:this.name,key:e})),i.setNewValue(n),o&&Be(this,u),s&&ee()}}},t.prototype.remove=function(t){if(this.values[t]){var e=this.target;if(Me(this))if(!(o=Ne(this,{object:e,name:t,type:"remove"})))return;try{zt();var n=De(this),r=$t(),i=this.values[t].get();this.keys&&this.keys.remove(t),delete this.values[t],delete this.target[t];var o=n||r?{type:"remove",object:e,oldValue:i,name:t}:null;r&&Qt(a(a({},o),{name:this.name,key:t})),n&&Be(this,o),r&&ee()}finally{Ut()}}},t.prototype.illegalAccess=function(t,e){console.warn("Property '"+e+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(t,e){return Fe(this,t)},t.prototype.intercept=function(t){return Re(this,t)},t.prototype.getKeys=function(){var t=this;return void 0===this.keys&&(this.keys=new Ye(Object.keys(this.values).filter((function(e){return t.values[e]instanceof Tt})),H,"keys("+this.name+")",!0)),this.keys.slice()},t}();function cn(t,e,n){void 0===e&&(e=""),void 0===n&&(n=q);var r=t.$mobx;return r||(b(t)||(e=(t.constructor.name||"ObservableObject")+"@"+p()),e||(e="ObservableObject@"+p()),A(t,"$mobx",r=new ln(t,e,n)),r)}function fn(t,e,n,r){var i=cn(t);if(Me(i)){var o=Ne(i,{object:t,name:e,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(i.values[e]=new Tt(n,r,i.name+"."+e,!1)).value,Object.defineProperty(t,e,function(t){return hn[t]||(hn[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,t)},set:function(e){this.$mobx.write(this,t,e)}})}(e)),i.keys&&i.keys.push(e),function(t,e,n,r){var i=De(t),o=$t(),s=i||o?{type:"add",object:e,name:n,newValue:r}:null;o&&Qt(a(a({},s),{name:t.name,key:n}));i&&Be(t,s);o&&ee()}(i,t,e,n)}var hn=Object.create(null),pn=Object.create(null);function dn(t){var e=t.$mobx;return e||(U(t),t.$mobx)}var mn=w("ObservableObjectAdministration",ln);function gn(t){return!!v(t)&&(U(t),mn(t.$mobx))}function yn(t,e){if("object"===typeof t&&null!==t){if(tn(t))return void 0!==e&&d(!1),t.$mobx.atom;if(un(t))return t.$mobx;if(on(t)){var n=t;return void 0===e?yn(n._keys):((r=n._data.get(e)||n._hasMap.get(e))||d(!1),r)}var r;if(U(t),e&&!t.$mobx&&t[e],gn(t))return e?((r=t.$mobx.values[e])||d(!1),r):d(!1);if(M(t)||Lt(t)||Zt(t))return t}else if("function"===typeof t&&Zt(t.$mobx))return t.$mobx;return d(!1)}function vn(t,e){return t||d("Expecting some object"),void 0!==e?vn(yn(t,e)):M(t)||Lt(t)||Zt(t)||on(t)||un(t)?t:(U(t),t.$mobx?t.$mobx:void d(!1))}var bn=Object.prototype.toString;function _n(t,e,n){return void 0===n&&(n=-1),An(t,e,n)}function An(t,e,n,r,i){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return!1;if(t!==t)return e!==e;var o=typeof t;if("function"!==o&&"object"!==o&&"object"!=typeof e)return!1;t=wn(t),e=wn(e);var a=bn.call(t);if(a!==bn.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t===""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e;case"[object Symbol]":return"undefined"!==typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e)}var s="[object Array]"===a;if(!s){if("object"!=typeof t||"object"!=typeof e)return!1;var u=t.constructor,l=e.constructor;if(u!==l&&!("function"===typeof u&&u instanceof u&&"function"===typeof l&&l instanceof l)&&"constructor"in t&&"constructor"in e)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var c=(r=r||[]).length;c--;)if(r[c]===t)return i[c]===e;if(r.push(t),i.push(e),s){if((c=t.length)!==e.length)return!1;for(;c--;)if(!An(t[c],e[c],n-1,r,i))return!1}else{var f=Object.keys(t),h=void 0;if(c=f.length,Object.keys(e).length!==c)return!1;for(;c--;)if(!xn(e,h=f[c])||!An(t[h],e[h],n-1,r,i))return!1}return r.pop(),i.pop(),!0}function wn(t){return tn(t)?t.peek():x(t)||on(t)||E(t)||un(t)?O(t.entries()):t}function xn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var En="$mobx";"object"===typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:ne,extras:{getDebugName:function(t,e){return(void 0!==e?yn(t,e):gn(t)||on(t)||un(t)?vn(t):yn(t)).name}},$mobx:En})}).call(this,n(36),n(68))},function(t,e,n){"use strict";n.r(e),n.d(e,"rootStore",(function(){return q})),n.d(e,"StoreProvider",(function(){return J})),n.d(e,"useStore",(function(){return Q}));var r=n(0),i=n.n(r),o=n(2),a=n(102),s=n(184),u=n.n(s),l=n(8),c=n.n(l),f=n(248),h=n(992),p=n(532),d=n(999),m=n(1002),g=n(445),y=n(1004),v=n(553),b=n(139),_=n(1005),A=n(672),w=n(673),x=n(554),E=n(555),O=n(1010),S=n(675),P=n(676),C=n(21),T=n(154),k=n(171),I=n(1011),L=n(677),j=n(665),M=n(18),R=n(1012),N=n(1014);n(446);function D(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return F(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 F(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(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 B(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 z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?B(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function U(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function G(){G=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var V=o.types.model("RootModel",{mapViewport:o.types.late((function(){return h.default})),uiSettings:o.types.late((function(){return m.default})),basemaps:o.types.late((function(){return S.default})),record:o.types.maybeNull(p.default),collection:o.types.maybeNull(d.default),user:o.types.maybeNull(g.default),member:o.types.maybeNull(g.default),project:o.types.maybeNull(v.default),profile:o.types.maybeNull(y.default),recordSlug:o.types.maybeNull(o.types.string),collectionSlug:o.types.maybeNull(o.types.string),trailSlug:o.types.maybeNull(o.types.string),cardItems:x.default,searchResults:_.default,overlayGroups:E.default,introductionTrayView:o.types.maybeNull(A.default),helpTrayView:o.types.maybeNull(A.default),siteMeta:o.types.maybeNull(w.default),contentTypes:O.default,mapRefSet:o.types.boolean,pointsStack:R.PointsStack,embedMetadata:o.types.frozen({}),parentContext:N.ParentContext,internalHistory:o.types.array(P.default,[])}).volatile((function(t){return{activePinObject:null,popoverDataObject:null,isHovering:!1,loading:b.default.create({code:1}),layoutRef:null}})).actions((function(t){return{afterCreate:function(){t.introductionTrayView||t.fetchIntroductionTrayView(),t.helpTrayView||t.fetchHelpTrayView(),t.recordSlug&&t.fetchRecord(t.recordSlug),t.collectionSlug&&t.fetchCollection(t.collectionSlug),t.trailSlug&&t.fetchTrail(t.trailSlug),t.basemaps.availableBasemaps.length>0&&t.uiSettings.setBasemapsVisible(!0)},setRecordSlug:function(e){t.record&&e!==t.recordSlug&&Object(o.destroy)(t.record),t.recordSlug=e},setCollectionSlug:function(e){t.collection&&e!==t.collectionSlug&&Object(o.destroy)(t.collection),t.collectionSlug=e},setTrailSlug:function(e){t.trail&&e!==t.trailSlug&&Object(o.destroy)(t.trail),t.trailSlug=e},unlockPoints:function(){t.uiSettings.setTrayLock(!1)},setUser:function(e){t.user=e},setMember:function(e){t.member=e},setProfile:function(e){t.profile=e},pushToInternalHistory:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&t.internalHistory.pop(),e){var r=t.internalHistory.slice(-1)[0];if(r&&e===r.path)return;var i=P.default.create({path:e});t.internalHistory.push(i)}},getLastItemFromInternalHistory:function(){t.internalHistory.pop();var e=t.internalHistory.pop();return null===e||void 0===e?void 0:e.path},updateLastInternalHistoryItem:function(e){t.internalHistory[t.internalHistory.length-1].path=e},fetchRecord:Object(o.flow)(G().mark((function e(n){var r,i;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.loading.loading(),e.prev=1,!t.user||!t.user.loggedIn){e.next=9;break}return i=Object(C.buildHeaders)({"X-Hasura-User-Token":t.user.userToken}),e.next=6,Object(T.fetchFullRecordQuery)(n,i);case 6:r=e.sent,e.next=12;break;case 9:return e.next=11,Object(T.fetchRecordQuery)(n);case 11:r=e.sent;case 12:r.record&&1===r.record.length?(t.loading.done(),t.record&&Object(o.destroy)(t.record),t.adjustLayoutScroll("top"),t.record=r.record[0],t.record.fetchAttachments()):t.loading.setError(c.a.t("models.root_store.record_not_found"),b.LoadingStatesEnum.NOT_FOUND),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),t.loading.setError(e.t0.toString(),b.LoadingStatesEnum.ERROR);case 18:case"end":return e.stop()}}),e,null,[[1,15]])}))),fetchCollection:Object(o.flow)(G().mark((function e(n){var r,i,a;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading.loading(),e.prev=1,r=Object(C.buildHeaders)({"X-Hasura-User-Token":Object(M.currentUserToken)()}),e.next=5,Object(k.fetchCollectionQuery)(n,r);case 5:(i=e.sent).collection&&1===i.collection.length?(t.loading.done(),a=i.collection[0],t.collection&&Object(o.destroy)(t.collection),t.adjustLayoutScroll("top"),t.collection=a,t.collection.fetchItems()):t.loading.setError(c.a.t("models.root_store.collection_not_found"),b.LoadingStatesEnum.NOT_FOUND),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),t.loading.setError(e.t0.toString(),b.LoadingStatesEnum.ERROR);case 12:case"end":return e.stop()}}),e,null,[[1,9]])}))),fetchTrail:Object(o.flow)(G().mark((function e(n){var r,i;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading.start(),e.prev=1,e.next=4,fetchTrailQuery(n);case 4:(r=e.sent).trail&&1===r.trail.length?(t.loading.done(),i=r.trail[0],t.trail&&Object(o.destroy)(t.trail),t.adjustLayoutScroll("top"),t.trail=i):t.loading.setError(c.a.t("models.root_store.trail_not_found"),b.LoadingStatesEnum.NOT_FOUND),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t.loading.setError(e.t0.toString(),b.LoadingStatesEnum.ERROR);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),fetchIntroductionTrayView:Object(o.flow)(G().mark((function e(){var n,r;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"introduction",e.next=3,Object(L.fetchTrayViewQuery)({type:"introduction"});case 3:n=e.sent,r=n.results,t.introductionTrayView=r[0];case 6:case"end":return e.stop()}}),e)}))),fetchHelpTrayView:Object(o.flow)(G().mark((function e(){var n,r;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"help",e.next=3,Object(L.fetchTrayViewQuery)({type:"help"});case 3:n=e.sent,r=n.results,t.helpTrayView=r[0];case 6:case"end":return e.stop()}}),e)}))),fetchSiteMeta:Object(o.flow)(G().mark((function e(){var n,r;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(j.fetchSiteMetaQuery)();case 2:n=e.sent,r=n.results,n.logos,t.siteMeta=z(z({},r[0]),{},{tenant_logos:tenant_logos});case 6:case"end":return e.stop()}}),e)}))),fetchCardItemResults:Object(o.flow)(G().mark((function e(){var n;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.loading.isLoading){e.next=2;break}return e.abrupt("return");case 2:return t.cardItems.clear(),t.loading.loading(),e.prev=4,n=z(z({},t.cardItems.filter.toJSON()),{},{centroid:t.mapViewport.centroid,distance:t.mapViewport.boundingBoxDistance}),e.next=8,t.cardItems.fetch(I.fetchCardItemResultsQueryWithBounds,n);case 8:t.loading.done(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),t.loading.setError(e.t0.toString(),b.LoadingStatesEnum.ERROR);case 14:case"end":return e.stop()}}),e,null,[[4,11]])}))),fetchNextPage:Object(o.flow)(G().mark((function e(){return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.cardItems.fetchNextPage();case 2:case"end":return e.stop()}}),e)}))),reloadCardItems:function(){Object(o.getRoot)(t).uiSettings.trayLocked||(t.cardItems.filter.setSearchParameter("offset",0),t.fetchCardItemResults())},setLayoutRef:function(e){t.layoutRef=e},adjustLayoutScroll:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"bottom";if(!t.siteMeta.disable_mobile_tray_auto_popup&&t.layoutRef){var n=/mobile|smallMobile|tablet/.test(t.layoutRef.dataset.responsivecontext);setTimeout((function(){if(n){var r=.75*t.layoutRef.offsetHeight-64,i="";"bottom"===e?i=0:"top"===e&&(i=r-20),t.layoutRef.scrollTo({top:i,behavior:"smooth"})}}),100)}},setMapRef:function(e){t.mapRefSet=e},setActivePin:function(e){t.activePinObject=e},setPopoverData:function(e){t.popoverDataObject=e},setIsHovering:function(e){t.isHovering=e},setSiteMetaFromJSON:function(e){t.siteMeta=w.default.create(e),t.overlayGroups.setInitialOverlays(t.siteMeta.autoloaded_overlays),t.uiSettings.setTrayVisible(t.siteMeta.show_tray),t.uiSettings.setMarkersVisible(t.siteMeta.show_points),t.uiSettings.setDisplayHidePinsOption(t.siteMeta.display_hide_pins_option),t.mapViewport.setCenter(t.siteMeta.centroid,{updateMapProps:!1}),t.mapViewport.setZoom(t.siteMeta.zoom,{updateMapProps:!1})},setBaseMapsFromJSON:function(e){var n=e.map((function(t){return t.base_map}));n.length>0&&(t.basemaps=S.default.create({availableBasemaps:n}))},setProject:function(e){t.project=e},setEmbedMetadata:function(e){t.embedMetadata=e}}})).views((function(t){return{get mapRefIsSet(){return t.mapRefSet},get activePin(){return null!==t.activePinObject&&t.activePinObject},get popoverData(){return null!==t.popoverDataObject&&t.popoverDataObject},get getCursor(){return!1===t.isHovering?"default":"pointer"}}})),q=V.create({cardItems:{results:[],filter:{query:null,type:[],limit:C.PER_PAGE,offset:0}},searchResults:{results:[],filter:{query:"",type:[],whole_map:!0,limit:C.PER_PAGE,offset:0,start_date:null,end_date:null,taxonomies:{results:[]}}},overlayGroups:{results:[],filter:{limit:C.PER_PAGE,offset:0},sort:[],enabled:[]},introductionTrayView:null,mapRefSet:!1,mapViewport:{points:{}},uiSettings:{trayVisible:!0,trayLocked:!1,overlayToolsVisible:!1,mediaGalleryVisible:!1,mobileMenuVisible:!1,markersVisible:!0,overflowToolbarVisible:!1,basemapsVisible:!1,placeSearchVisible:!1,placeSearchResultsVisible:!1,displayHidePinsOption:!0,mapInteractions:!0,customLegendVisible:!1},pointsStack:{layers:{}},contentTypes:{defaultTypes:[{name:"record",label:"record"},{name:"collection",label:"collection"}]},basemaps:{availableBasemaps:[]},parentContext:{items:[]}});if(Object(o.onPatch)(q,(function(t){"/recordSlug"===t.path&&t.value&&q.fetchRecord(t.value),"/collectionSlug"===t.path&&t.value&&(q.uiSettings.setTrayLock(!0),q.fetchCollection(t.value)),"/trailSlug"===t.path&&t.value&&(q.uiSettings.setTrayLock(!0),q.fetchTrail(t.value))})),"object"===typeof window){window.store=q,window.getSnapshot=o.getSnapshot,window.applySnapshot=o.applySnapshot,window.onPatch=o.onPatch,window.destroy=o.destroy,window.queryString=u.a,window.writeSnapshotToURL=f.writeSnapshotToURL,window.readSnapshotFromURL=f.readSnapshotFromURL,window.getType=o.getType,window.getRoot=o.getRoot,window.getParent=o.getParent,window.getParentOfType=o.getParentOfType,window.getPath=o.getPath,window.getItemPath=a.getPath,window.getPathParts=o.getPathParts,window.mst=o,window.snapshotting={rehydrateStoreFromURL:f.rehydrateStoreFromURL,persistStoreToURL:f.persistStoreToURL,readSnapshotFromURL:f.readSnapshotFromURL,writeSnapshotToURL:f.writeSnapshotToURL};for(var H={uiSettings:q.uiSettings,mapViewport:q.mapViewport},W=0,X=Object.entries(H);W<X.length;W++){var Y=D(X[W],2),Z=Y[0],K=Y[1];Object(f.rehydrateStoreFromURL)(Z,K)}q.overlayGroups.enabled.length&&q.overlayGroups.prefetchOverlayGroups(q.overlayGroups.enabled.toJS())}var $=i.a.createContext(),J=$.Provider,Q=function(){var t=i.a.useContext($);if(null===t)throw new Error("RootStoreContext cannot be null");return t};e.default=V},function(t,e,n){"use strict";function r(t){try{var e=JSON.parse(document.querySelector("meta[name=features]").getAttribute("content"));return e.indexOf(t)>0}catch(n){return console.error(n),!1}}n.r(e),n.d(e,"hasFeature",(function(){return r})),n.d(e,"userIsSignedIn",(function(){return i})),n.d(e,"currentUserId",(function(){return o})),n.d(e,"currentUserName",(function(){return a})),n.d(e,"currentUserToken",(function(){return s})),"undefined"!==typeof window&&(window.hasFeature=r);var i=function(){return""!==document.querySelector("meta[name=user-id]").content},o=function(){return i()?parseInt(document.querySelector("meta[name=user-id]").content,10):null},a=function(){return i()?document.querySelector("meta[name=user-name]").content:null},s=function(){return i()?document.querySelector("meta[name=user-token]").content:null}},function(t,e,n){"use strict";n.d(e,"g",(function(){return r.a})),n.d(e,"h",(function(){return i.a})),n.d(e,"i",(function(){return o.a})),n.d(e,"b",(function(){return a.a})),n.d(e,"c",(function(){return s.a})),n.d(e,"e",(function(){return u.a})),n.d(e,"f",(function(){return l.a})),n.d(e,"d",(function(){return v})),n.d(e,"a",(function(){return y})),n.d(e,"k",(function(){return b.a})),n.d(e,"p",(function(){return _.a})),n.d(e,"t",(function(){return h.f})),n.d(e,"u",(function(){return h.g})),n.d(e,"z",(function(){return h.l})),n.d(e,"A",(function(){return h.m})),n.d(e,"s",(function(){return h.e})),n.d(e,"x",(function(){return h.j})),n.d(e,"y",(function(){return h.k})),n.d(e,"G",(function(){return h.s})),n.d(e,"F",(function(){return h.r})),n.d(e,"C",(function(){return h.o})),n.d(e,"w",(function(){return h.i})),n.d(e,"D",(function(){return h.p})),n.d(e,"v",(function(){return h.h})),n.d(e,"E",(function(){return h.q})),n.d(e,"o",(function(){return h.b})),n.d(e,"n",(function(){return h.a})),n.d(e,"q",(function(){return h.c})),n.d(e,"r",(function(){return h.d})),n.d(e,"B",(function(){return h.n})),n.d(e,"H",(function(){return h.t})),n.d(e,"m",(function(){return l.a})),n.d(e,"l",(function(){return v})),n.d(e,"j",(function(){return y}));var r=n(639),i=n(100),o=n(350),a=n(638),s=n(61),u=n(335),l=n(425),c=n(1),f=n(159),h=n(12),p=n(22);const d="Unknown Euler angle order",m=.99999;var g;!function(t){t[t.ZYX=0]="ZYX",t[t.YXZ=1]="YXZ",t[t.XZY=2]="XZY",t[t.ZXY=3]="ZXY",t[t.YZX=4]="YZX",t[t.XYZ=5]="XYZ"}(g||(g={}));class y extends f.a{static get ZYX(){return g.ZYX}static get YXZ(){return g.YXZ}static get XZY(){return g.XZY}static get ZXY(){return g.ZXY}static get YZX(){return g.YZX}static get XYZ(){return g.XYZ}static get RollPitchYaw(){return g.ZYX}static get DefaultOrder(){return g.ZYX}static get RotationOrders(){return g}static rotationOrder(t){return g[t]}get ELEMENTS(){return 4}constructor(t=0,e=0,n=0,r=y.DefaultOrder){super(-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])?this.fromVector3(...arguments):this.set(t,e,n,r)}fromQuaternion(t){const[e,n,r,i]=t,o=n*n,a=-2*(o+r*r)+1,s=2*(e*n+i*r);let u=-2*(e*r-i*n);const l=2*(n*r+i*e),c=-2*(e*e+o)+1;u=u>1?1:u,u=u<-1?-1:u;const f=Math.atan2(l,c),h=Math.asin(u),p=Math.atan2(s,a);return this.set(f,h,p,y.RollPitchYaw)}fromObject(t){throw new Error("not implemented")}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=Number.isFinite(t[3])||this.order,this.check()}set(t=0,e=0,n=0,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=Number.isFinite(r)?r:this[3],this.check()}validate(){return(t=this[3])>=0&&t<6&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2]);var t}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}toArray4(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}toVector3(t=[-0,-0,-0]){return t[0]=this[0],t[1]=this[1],t[2]=this[2],t}get x(){return this[0]}set x(t){this[0]=Object(p.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(p.a)(t)}get z(){return this[2]}set z(t){this[2]=Object(p.a)(t)}get alpha(){return this[0]}set alpha(t){this[0]=Object(p.a)(t)}get beta(){return this[1]}set beta(t){this[1]=Object(p.a)(t)}get gamma(){return this[2]}set gamma(t){this[2]=Object(p.a)(t)}get phi(){return this[0]}set phi(t){this[0]=Object(p.a)(t)}get theta(){return this[1]}set theta(t){this[1]=Object(p.a)(t)}get psi(){return this[2]}set psi(t){this[2]=Object(p.a)(t)}get roll(){return this[0]}set roll(t){this[0]=Object(p.a)(t)}get pitch(){return this[1]}set pitch(t){this[1]=Object(p.a)(t)}get yaw(){return this[2]}set yaw(t){this[2]=Object(p.a)(t)}get order(){return this[3]}set order(t){this[3]=function(t){if(t<0&&t>=6)throw new Error(d);return t}(t)}fromVector3(t,e){return this.set(t[0],t[1],t[2],Number.isFinite(e)?e:this[3])}fromArray(t,e=0){return this[0]=t[0+e],this[1]=t[1+e],this[2]=t[2+e],void 0!==t[3]&&(this[3]=t[3]),this.check()}fromRollPitchYaw(t,e,n){return this.set(t,e,n,g.ZYX)}fromRotationMatrix(t,e=y.DefaultOrder){return this._fromRotationMatrix(t,e),this.check()}getRotationMatrix(t){return this._getRotationMatrix(t)}getQuaternion(){const t=new u.a;switch(this[4]){case g.XYZ:return t.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case g.YXZ:return t.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case g.ZXY:return t.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case g.ZYX:return t.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case g.YZX:return t.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case g.XZY:return t.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(d)}}_fromRotationMatrix(t,e=y.DefaultOrder){const n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],u=t[2],l=t[6],c=t[10];switch(e=e||this[3]){case y.XYZ:this[1]=Math.asin(Object(h.d)(i,-1,1)),Math.abs(i)<m?(this[0]=Math.atan2(-s,c),this[2]=Math.atan2(-r,n)):(this[0]=Math.atan2(l,a),this[2]=0);break;case y.YXZ:this[0]=Math.asin(-Object(h.d)(s,-1,1)),Math.abs(s)<m?(this[1]=Math.atan2(i,c),this[2]=Math.atan2(o,a)):(this[1]=Math.atan2(-u,n),this[2]=0);break;case y.ZXY:this[0]=Math.asin(Object(h.d)(l,-1,1)),Math.abs(l)<m?(this[1]=Math.atan2(-u,c),this[2]=Math.atan2(-r,a)):(this[1]=0,this[2]=Math.atan2(o,n));break;case y.ZYX:this[1]=Math.asin(-Object(h.d)(u,-1,1)),Math.abs(u)<m?(this[0]=Math.atan2(l,c),this[2]=Math.atan2(o,n)):(this[0]=0,this[2]=Math.atan2(-r,a));break;case y.YZX:this[2]=Math.asin(Object(h.d)(o,-1,1)),Math.abs(o)<m?(this[0]=Math.atan2(-s,a),this[1]=Math.atan2(-u,n)):(this[0]=0,this[1]=Math.atan2(i,c));break;case y.XZY:this[2]=Math.asin(-Object(h.d)(r,-1,1)),Math.abs(r)<m?(this[0]=Math.atan2(l,a),this[1]=Math.atan2(i,n)):(this[0]=Math.atan2(-s,c),this[1]=0);break;default:throw new Error(d)}return this[3]=e,this}_getRotationMatrix(t){const e=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],n=this.x,r=this.y,i=this.z,o=Math.cos(n),a=Math.cos(r),s=Math.cos(i),u=Math.sin(n),l=Math.sin(r),c=Math.sin(i);switch(this[3]){case y.XYZ:{const t=o*s,n=o*c,r=u*s,i=u*c;e[0]=a*s,e[4]=-a*c,e[8]=l,e[1]=n+r*l,e[5]=t-i*l,e[9]=-u*a,e[2]=i-t*l,e[6]=r+n*l,e[10]=o*a;break}case y.YXZ:{const t=a*s,n=a*c,r=l*s,i=l*c;e[0]=t+i*u,e[4]=r*u-n,e[8]=o*l,e[1]=o*c,e[5]=o*s,e[9]=-u,e[2]=n*u-r,e[6]=i+t*u,e[10]=o*a;break}case y.ZXY:{const t=a*s,n=a*c,r=l*s,i=l*c;e[0]=t-i*u,e[4]=-o*c,e[8]=r+n*u,e[1]=n+r*u,e[5]=o*s,e[9]=i-t*u,e[2]=-o*l,e[6]=u,e[10]=o*a;break}case y.ZYX:{const t=o*s,n=o*c,r=u*s,i=u*c;e[0]=a*s,e[4]=r*l-n,e[8]=t*l+i,e[1]=a*c,e[5]=i*l+t,e[9]=n*l-r,e[2]=-l,e[6]=u*a,e[10]=o*a;break}case y.YZX:{const t=o*a,n=o*l,r=u*a,i=u*l;e[0]=a*s,e[4]=i-t*c,e[8]=r*c+n,e[1]=c,e[5]=o*s,e[9]=-u*s,e[2]=-l*s,e[6]=n*c+r,e[10]=t-i*c;break}case y.XZY:{const t=o*a,n=o*l,r=u*a,i=u*l;e[0]=a*s,e[4]=-c,e[8]=l*s,e[1]=t*c+i,e[5]=o*s,e[9]=n*c-r,e[2]=r*c-n,e[6]=u*s,e[10]=i*c+t;break}default:throw new Error(d)}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}toQuaternion(){const t=Math.cos(.5*this.yaw),e=Math.sin(.5*this.yaw),n=Math.cos(.5*this.roll),r=Math.sin(.5*this.roll),i=Math.cos(.5*this.pitch),o=Math.sin(.5*this.pitch),a=t*n*i+e*r*o,s=t*r*i-e*n*o,l=t*n*o+e*r*i,c=e*n*i-t*r*o;return new u.a(s,l,c,a)}}class v{constructor({x:t=0,y:e=0,z:n=0,roll:r=0,pitch:o=0,yaw:a=0,position:s,orientation:u}={}){Object(c.a)(this,"position",void 0),Object(c.a)(this,"orientation",void 0),Array.isArray(s)&&3===s.length?this.position=new i.a(s):this.position=new i.a(t,e,n),Array.isArray(u)&&4===u.length?this.orientation=new y(u,u[3]):this.orientation=new y(r,o,a,y.RollPitchYaw)}get x(){return this.position.x}set x(t){this.position.x=t}get y(){return this.position.y}set y(t){this.position.y=t}get z(){return this.position.z}set z(t){this.position.z=t}get roll(){return this.orientation.roll}set roll(t){this.orientation.roll=t}get pitch(){return this.orientation.pitch}set pitch(t){this.orientation.pitch=t}get yaw(){return this.orientation.yaw}set yaw(t){this.orientation.yaw=t}getPosition(){return this.position}getOrientation(){return this.orientation}equals(t){return!!t&&(this.position.equals(t.position)&&this.orientation.equals(t.orientation))}exactEquals(t){return!!t&&(this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation))}getTransformationMatrix(){const t=Math.sin(this.roll),e=Math.sin(this.pitch),n=Math.sin(this.yaw),r=Math.cos(this.roll),i=Math.cos(this.pitch),o=Math.cos(this.yaw);return(new s.a).setRowMajor(o*i,-n*r+o*e*t,n*t+o*e*r,this.x,n*i,o*r+n*e*t,-o*t+n*e*r,this.y,-e,i*t,i*r,this.z,0,0,0,1)}getTransformationMatrixFromPose(t){return(new s.a).multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}getTransformationMatrixToPose(t){return(new s.a).multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}}var b=n(640),_=n(181)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(225);function i(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,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||Object(r.a)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildHeaders",(function(){return s})),n.d(e,"PER_PAGE",(function(){return l})),n.d(e,"TRAIL_STOPS_LIMIT",(function(){return c}));var r=n(474);function i(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 o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"X-Hasura-Tenant-Id":document.querySelector("meta[name=tenant-id]").content},n=document.querySelector("meta[name=user-id]");return n&&n.content&&(e["X-Hasura-User-Id"]=n.content),o(o({},t),e)},u=new r.GraphQLClient("".concat("https://api.humap.site","/v1/graphql"),{headers:s()}),l=20,c=25;e.default=u},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(12);function i(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function o(t,e,n=""){if(r.f.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}},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"i",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"l",(function(){return u})),n.d(e,"m",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"d",(function(){return f})),n.d(e,"j",(function(){return h})),n.d(e,"t",(function(){return p})),n.d(e,"s",(function(){return d})),n.d(e,"u",(function(){return m})),n.d(e,"n",(function(){return g})),n.d(e,"o",(function(){return y})),n.d(e,"p",(function(){return v})),n.d(e,"b",(function(){return b})),n.d(e,"r",(function(){return A})),n.d(e,"k",(function(){return w})),n.d(e,"e",(function(){return x})),n.d(e,"h",(function(){return E})),n.d(e,"q",(function(){return O}));var r=n(9);function i(){var t=new r.a(3);return r.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function a(t,e,n){var i=new r.a(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 u(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function l(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 f(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function h(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function p(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function d(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 m(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],l=e[2],c=i*l-o*u,f=o*s-r*l,h=r*u-i*s,p=i*h-o*f,d=o*c-r*h,m=r*f-i*c,g=2*a;return c*=g,f*=g,h*=g,p*=2,d*=2,m*=2,t[0]=s+c+p,t[1]=u+f+d,t[2]=l+h+m,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[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 y(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 v(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 b(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),l=u&&c(t,e)/u;return Math.acos(Math.min(Math.max(l,-1),1))}var _,A=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},w=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t},x=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)},E=o,O=function(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r};_=i()},function(t,e,n){"use strict";n.d(e,"a",(function(){return F})),n.d(e,"g",(function(){return N})),n.d(e,"d",(function(){return M})),n.d(e,"n",(function(){return B})),n.d(e,"e",(function(){return G})),n.d(e,"i",(function(){return V})),n.d(e,"m",(function(){return x})),n.d(e,"p",(function(){return E})),n.d(e,"q",(function(){return L})),n.d(e,"o",(function(){return j})),n.d(e,"c",(function(){return k})),n.d(e,"f",(function(){return I})),n.d(e,"j",(function(){return O})),n.d(e,"h",(function(){return S})),n.d(e,"b",(function(){return P})),n.d(e,"l",(function(){return C})),n.d(e,"k",(function(){return T}));var r=n(1),i=n(33);function o(t,e){const n=Object(i.n)([],e,t);return Object(i.k)(n,n,1/n[3]),n}function a(t,e){const n=t%e;return n<0?e+n:n}function s(t,e,n){return t<e?e:t>n?n:t}const u=Math.log2||function(t){return Math.log(t)*Math.LOG2E};var l=n(13),c=n(26),f=n(23);function h(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}const p=Math.PI,d=p/4,m=p/180,g=180/p,y=512,v=4003e4,b=85.051129,_=1.5;function A(t){return Math.pow(2,t)}function w(t){return u(t)}function x(t){const[e,n]=t;h(Number.isFinite(e)),h(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=n*m;return[y*(e*m+p)/(2*p),y*(p+Math.log(Math.tan(d+.5*r)))/(2*p)]}function E(t){const[e,n]=t,r=e/y*(2*p)-p,i=2*(Math.atan(Math.exp(n/y*(2*p)-p))-d);return[r*g,i*g]}function O(t){const{latitude:e}=t;h(Number.isFinite(e));const n=Math.cos(e*m);return w(v*n)-9}function S(t){const{latitude:e,longitude:n,highPrecision:r=!1}=t;h(Number.isFinite(e)&&Number.isFinite(n));const i=Math.cos(e*m),o=512/360,a=o/i,s=12790407194604047e-21/i,u={unitsPerMeter:[s,s,s],metersPerUnit:[1/s,1/s,1/s],unitsPerDegree:[o,a,s],degreesPerUnit:[.703125,1/a,1/s]};if(r){const t=m*Math.tan(e*m)/i,n=o*t/2,r=12790407194604047e-21*t,l=r/a*s;u.unitsPerDegree2=[0,n,r],u.unitsPerMeter2=[l,0,l]}return u}function P(t,e){const[n,r,i]=t,[o,a,s]=e,{unitsPerMeter:u,unitsPerMeter2:l}=S({longitude:n,latitude:r,highPrecision:!0}),c=x(t);c[0]+=o*(u[0]+l[0]*a),c[1]+=a*(u[1]+l[1]*a);const f=E(c),h=(i||0)+(s||0);return Number.isFinite(i)||Number.isFinite(s)?[f[0],f[1],h]:f}function C(t){const{height:e,pitch:n,bearing:r,altitude:i,scale:o,center:a}=t,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.p(s,s,[0,0,-i]),l.l(s,s,-n*m),l.n(s,s,r*m);const u=o/e;return l.o(s,s,[u,u,u]),a&&l.p(s,s,f.l([],a)),s}function T(t){const{width:e,height:n,altitude:r,pitch:i=0,offset:o,center:a,scale:u,nearZMultiplier:l=1,farZMultiplier:c=1}=t;let{fovy:f=k(_)}=t;void 0!==r&&(f=k(r));const h=f*m,p=i*m,d=I(f);let g=d;a&&(g+=a[2]*u/Math.cos(p)/n);const y=h*(.5+(o?o[1]:0)/n),v=Math.sin(y)*g/Math.sin(s(Math.PI/2-p-y,.01,Math.PI-.01)),b=Math.sin(p)*v+g,A=10*g;return{fov:h,aspect:e/n,focalDistance:d,near:l,far:Math.min(b*c,A)}}function k(t){return 2*Math.atan(.5/t)*g}function I(t){return.5/Math.tan(.5*t*m)}function L(t,e){const[n,r,i=0]=t;return h(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),o(e,[n,r,i,1])}function j(t,e,n=0){const[r,i,a]=t;if(h(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(a)){return o(e,[r,i,a,1])}const s=o(e,[r,i,0,1]),u=o(e,[r,i,1,1]),l=s[2],f=u[2],p=l===f?0:((n||0)-l)/(f-l);return c.c([],s,u,p)}function M(t){const{width:e,height:n,bounds:r,minExtent:i=0,maxZoom:o=24,offset:a=[0,0]}=t,[[l,c],[f,p]]=r,d=function(t=0){if("number"===typeof t)return{top:t,bottom:t,left:t,right:t};return h(Number.isFinite(t.top)&&Number.isFinite(t.bottom)&&Number.isFinite(t.left)&&Number.isFinite(t.right)),t}(t.padding),m=x([l,s(p,-85.051129,b)]),g=x([f,s(c,-85.051129,b)]),y=[Math.max(Math.abs(g[0]-m[0]),i),Math.max(Math.abs(g[1]-m[1]),i)],v=[e-d.left-d.right-2*Math.abs(a[0]),n-d.top-d.bottom-2*Math.abs(a[1])];h(v[0]>0&&v[1]>0);const _=v[0]/y[0],A=v[1]/y[1],w=(d.right-d.left)/2/_,O=(d.top-d.bottom)/2/A,S=E([(g[0]+m[0])/2+w,(g[1]+m[1])/2+O]),P=Math.min(o,u(Math.abs(Math.min(_,A))));return h(Number.isFinite(P)),{longitude:S[0],latitude:S[1],zoom:P}}const R=Math.PI/180;function N(t,e=0){const{width:n,height:r,unproject:i}=t,o={targetZ:e},a=i([0,r],o),s=i([n,r],o);let u,l;return(t.fovy?.5*t.fovy*R:Math.atan(.5/t.altitude))>(90-t.pitch)*R-.01?(u=D(t,0,e),l=D(t,n,e)):(u=i([0,0],o),l=i([n,0],o)),[a,s,l,u]}function D(t,e,n){const{pixelUnprojectionMatrix:r}=t,i=o(r,[e,0,1,1]),a=o(r,[e,t.height,1,1]),s=(n*t.distanceScales.unitsPerMeter[2]-i[2])/(a[2]-i[2]),u=E(c.c([],i,a,s));return u.push(n),u}class F{constructor(t={width:1,height:1}){Object(r.a)(this,"latitude",void 0),Object(r.a)(this,"longitude",void 0),Object(r.a)(this,"zoom",void 0),Object(r.a)(this,"pitch",void 0),Object(r.a)(this,"bearing",void 0),Object(r.a)(this,"altitude",void 0),Object(r.a)(this,"fovy",void 0),Object(r.a)(this,"meterOffset",void 0),Object(r.a)(this,"center",void 0),Object(r.a)(this,"width",void 0),Object(r.a)(this,"height",void 0),Object(r.a)(this,"scale",void 0),Object(r.a)(this,"distanceScales",void 0),Object(r.a)(this,"viewMatrix",void 0),Object(r.a)(this,"projectionMatrix",void 0),Object(r.a)(this,"viewProjectionMatrix",void 0),Object(r.a)(this,"pixelProjectionMatrix",void 0),Object(r.a)(this,"pixelUnprojectionMatrix",void 0),Object(r.a)(this,"equals",(t=>t instanceof F&&(t.width===this.width&&t.height===this.height&&l.b(t.projectionMatrix,this.projectionMatrix)&&l.b(t.viewMatrix,this.viewMatrix)))),Object(r.a)(this,"project",((t,e={})=>{const{topLeft:n=!0}=e,r=L(this.projectPosition(t),this.pixelProjectionMatrix),[i,o]=r,a=n?o:this.height-o;return 2===t.length?[i,a]:[i,a,r[2]]})),Object(r.a)(this,"unproject",((t,e={})=>{const{topLeft:n=!0,targetZ:r}=e,[i,o,a]=t,s=n?o:this.height-o,u=r&&r*this.distanceScales.unitsPerMeter[2],l=j([i,s,a],this.pixelUnprojectionMatrix,u),[c,f,h]=this.unprojectPosition(l);return Number.isFinite(a)?[c,f,h]:Number.isFinite(r)?[c,f,r]:[c,f]})),Object(r.a)(this,"projectPosition",(t=>{const[e,n]=x(t);return[e,n,(t[2]||0)*this.distanceScales.unitsPerMeter[2]]})),Object(r.a)(this,"unprojectPosition",(t=>{const[e,n]=E(t);return[e,n,(t[2]||0)*this.distanceScales.metersPerUnit[2]]}));let{width:e,height:n,altitude:i=null,fovy:o=null}=t;const{latitude:a=0,longitude:s=0,zoom:u=0,pitch:c=0,bearing:h=0,position:p=null,nearZMultiplier:d=.02,farZMultiplier:m=1.01}=t;e=e||1,n=n||1,null===o&&null===i?(i=_,o=k(i)):null===o?o=k(i):null===i&&(i=I(o));const g=A(u);i=Math.max(.75,i);const y=S({longitude:s,latitude:a}),v=x([s,a]);v.push(0),p&&f.a(v,v,f.k([],p,y.unitsPerMeter)),this.projectionMatrix=function(t){const{fov:e,aspect:n,near:r,far:i}=T(t);return l.j([],e,n,r,i)}({width:e,height:n,scale:g,center:v,pitch:c,fovy:o,nearZMultiplier:d,farZMultiplier:m}),this.viewMatrix=C({height:n,scale:g,center:v,pitch:c,bearing:h,altitude:i}),this.width=e,this.height=n,this.scale=g,this.latitude=a,this.longitude=s,this.zoom=u,this.pitch=c,this.bearing=h,this.altitude=i,this.fovy=o,this.center=v,this.meterOffset=p||[0,0,0],this.distanceScales=y,this._initMatrices(),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];l.h(i,i,n),l.h(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.o(o,o,[t/2,-e/2,1]),l.p(o,o,[1,-1,0]),l.h(o,o,i);const a=l.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!a)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=a}projectFlat(t){return x(t)}unprojectFlat(t){return E(t)}getMapCenterByLngLatPosition({lngLat:t,pos:e}){const n=j(e,this.pixelUnprojectionMatrix),r=x(t),i=c.a([],r,c.d([],n));return E(c.a([],this.center,i))}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=M(Object.assign({width:n,height:r,bounds:t},e));return new F({width:n,height:r,longitude:i,latitude:o,zoom:a})}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 N(this,t.z||0)}getLocationAtPoint({lngLat:t,pos:e}){return this.getMapCenterByLngLatPosition({lngLat:t,pos:e})}}function B(t){const{width:e,height:n,pitch:r=0}=t;let{longitude:i,latitude:o,zoom:s,bearing:l=0}=t;(i<-180||i>180)&&(i=a(i+180,360)-180),(l<-180||l>180)&&(l=a(l+180,360)-180);const c=u(n/512);if(s<=c)s=c,o=0;else{const t=n/2/Math.pow(2,s),e=E([0,t])[1];if(o<e)o=e;else{const e=E([0,512-t])[1];o>e&&(o=e)}}return{width:e,height:n,longitude:i,latitude:o,zoom:s,pitch:r,bearing:l}}const z=["longitude","latitude","zoom"],U={curve:1.414,speed:1.2};function G(t,e,n,r){const{startZoom:i,startCenterXY:o,uDelta:a,w0:s,u1:u,S:l,rho:f,rho2:h,r0:p}=q(t,e,r);if(u<.01){const r={};for(const i of z){const o=t[i],a=e[i];r[i]=(d=n)*a+(1-d)*o}return r}var d;const m=n*l,g=Math.cosh(p)/Math.cosh(p+f*m),y=s*((Math.cosh(p)*Math.tanh(p+f*m)-Math.sinh(p))/h)/u,v=i+w(1/g),b=c.e([],a,y);c.a(b,b,o);const _=E(b);return{longitude:_[0],latitude:_[1],zoom:v}}function V(t,e,n){const r={...U,...n},{screenSpeed:i,speed:o,maxDuration:a}=r,{S:s,rho:u}=q(t,e,r),l=1e3*s;let c;return c=Number.isFinite(i)?l/(i/u):l/o,Number.isFinite(a)&&c>a?0:c}function q(t,e,n){const r=(n=Object.assign({},U,n)).curve,i=t.zoom,o=[t.longitude,t.latitude],a=A(i),s=e.zoom,u=[e.longitude,e.latitude],l=A(s-i),f=x(o),h=x(u),p=c.f([],h,f),d=Math.max(t.width,t.height),m=d/l,g=c.b(p)*a,y=Math.max(g,.01),v=r*r,b=(m*m-d*d+v*v*y*y)/(2*d*v*y),_=(m*m-d*d-v*v*y*y)/(2*m*v*y),w=Math.log(Math.sqrt(b*b+1)-b),E=Math.log(Math.sqrt(_*_+1)-_);return{startZoom:i,startCenterXY:f,uDelta:p,w0:d,u1:g,S:(E-w)/r,rho:r,rho2:v,r0:w,r1:E}}},function(t,e,n){"use strict";n.r(e),n.d(e,"COORDINATE_SYSTEM",(function(){return r.a})),n.d(e,"OPERATION",(function(){return r.c})),n.d(e,"UNIT",(function(){return r.e})),n.d(e,"LightingEffect",(function(){return i.a})),n.d(e,"AmbientLight",(function(){return o.a})),n.d(e,"DirectionalLight",(function(){return a.a})),n.d(e,"PointLight",(function(){return d})),n.d(e,"_CameraLight",(function(){return g})),n.d(e,"_SunLight",(function(){return L})),n.d(e,"PostProcessEffect",(function(){return B})),n.d(e,"_LayersPass",(function(){return U.a})),n.d(e,"Deck",(function(){return G.a})),n.d(e,"LayerManager",(function(){return V.a})),n.d(e,"AttributeManager",(function(){return q.a})),n.d(e,"Layer",(function(){return H.a})),n.d(e,"CompositeLayer",(function(){return W.a})),n.d(e,"DeckRenderer",(function(){return X.a})),n.d(e,"Viewport",(function(){return Y.a})),n.d(e,"WebMercatorViewport",(function(){return Z.a})),n.d(e,"_GlobeViewport",(function(){return K.a})),n.d(e,"OrbitViewport",(function(){return et})),n.d(e,"OrthographicViewport",(function(){return nt.a})),n.d(e,"FirstPersonViewport",(function(){return it})),n.d(e,"picking",(function(){return ot.a})),n.d(e,"project",(function(){return at.a})),n.d(e,"project32",(function(){return st.a})),n.d(e,"gouraudLighting",(function(){return ut.a})),n.d(e,"phongLighting",(function(){return ut.b})),n.d(e,"shadow",(function(){return lt.a})),n.d(e,"View",(function(){return ct.a})),n.d(e,"MapView",(function(){return ft.a})),n.d(e,"FirstPersonView",(function(){return _t})),n.d(e,"OrbitView",(function(){return wt})),n.d(e,"OrthographicView",(function(){return xt.a})),n.d(e,"_GlobeView",(function(){return Pt})),n.d(e,"Controller",(function(){return ht.a})),n.d(e,"MapController",(function(){return Et.b})),n.d(e,"_GlobeController",(function(){return St})),n.d(e,"FirstPersonController",(function(){return bt})),n.d(e,"OrbitController",(function(){return At.b})),n.d(e,"OrthographicController",(function(){return Ct.a})),n.d(e,"LayerExtension",(function(){return Tt.a})),n.d(e,"TRANSITION_EVENTS",(function(){return kt.a})),n.d(e,"TransitionInterpolator",(function(){return It.a})),n.d(e,"LinearInterpolator",(function(){return mt.a})),n.d(e,"FlyToInterpolator",(function(){return Mt})),n.d(e,"log",(function(){return Rt.a})),n.d(e,"assert",(function(){return Nt.a})),n.d(e,"createIterable",(function(){return Dt.a})),n.d(e,"fp64LowPart",(function(){return dt.b})),n.d(e,"Tesselator",(function(){return Ft.a})),n.d(e,"_fillArray",(function(){return Bt.a})),n.d(e,"_flatten",(function(){return Bt.b})),n.d(e,"_count",(function(){return zt.a})),n.d(e,"_memoize",(function(){return Ut.a})),n.d(e,"_mergeShaders",(function(){return Gt.a})),n.d(e,"_compareProps",(function(){return Vt.a}));var r=n(15),i=n(264),o=n(353),a=n(199),s=n(1),u=n(269);const l=[255,255,255],c=1,f=[0,0,1],h=[0,0,1];let p=0;class d{constructor(t={}){Object(s.a)(this,"id",void 0),Object(s.a)(this,"color",void 0),Object(s.a)(this,"intensity",void 0),Object(s.a)(this,"type","point"),Object(s.a)(this,"position",void 0),Object(s.a)(this,"attenuation",void 0),Object(s.a)(this,"projectedLight",void 0);const{color:e=l}=t,{intensity:n=c}=t,{position:r=h}=t;this.id=t.id||"point-".concat(p++),this.color=e,this.intensity=n,this.type="point",this.position=r,this.attenuation=function(t){if(t.attenuation)return t.attenuation;if("intensity"in t)return[0,0,t.intensity||0];return f}(t),this.projectedLight={...this}}getProjectedLight({layer:t}){const{projectedLight:e}=this,n=t.context.viewport,{coordinateSystem:i,coordinateOrigin:o}=t.props,a=Object(u.b)(this.position,{viewport:n,coordinateSystem:i,coordinateOrigin:o,fromCoordinateSystem:n.isGeospatial?r.a.LNGLAT:r.a.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return e.color=this.color,e.intensity=this.intensity,e.position=a,e}}var m=n(218);class g extends d{getProjectedLight({layer:t}){const{projectedLight:e}=this,n=t.context.viewport,{coordinateSystem:r,coordinateOrigin:i,modelMatrix:o}=t.props,{project_uCameraPosition:a}=Object(m.b)({viewport:n,modelMatrix:o,coordinateSystem:r,coordinateOrigin:i});return e.color=this.color,e.intensity=this.intensity,e.position=a,e}}const y=Math.PI/180,v=864e5,b=2440588,_=2451545,A=23.4397*y,w=357.5291,x=.98560028,E=280.147,O=360.9856235;function S(t,e,n){const r=y*-n,i=y*e,o=function(t){return function(t){return("number"===typeof t?t:t.getTime())/v-.5+b}(t)-_}(t),a=function(t){const e=function(t){const e=t,n=y*(1.9148*Math.sin(e)+.02*Math.sin(2*e)+3e-4*Math.sin(3*e));return e+n+102.9372*y+Math.PI}((n=t,y*(w+x*n)));var n;return{declination:T(e,0),rightAscension:C(e,0)}}(o),s=function(t,e){return y*(E+O*t)-e}(o,r)-a.rightAscension;return{azimuth:k(s,i,a.declination),altitude:I(s,i,a.declination)}}function P(t,e,n){const{azimuth:r,altitude:i}=S(t,e,n);return[Math.sin(r)*Math.cos(i),Math.cos(r)*Math.cos(i),-Math.sin(i)]}function C(t,e){const n=t;return Math.atan2(Math.sin(n)*Math.cos(A)-Math.tan(e)*Math.sin(A),Math.cos(n))}function T(t,e){const n=t;return Math.asin(Math.sin(e)*Math.cos(A)+Math.cos(e)*Math.sin(A)*Math.sin(n))}function k(t,e,n){const r=t,i=e,o=n;return Math.atan2(Math.sin(r),Math.cos(r)*Math.sin(i)-Math.tan(o)*Math.cos(i))}function I(t,e,n){const r=t,i=e,o=n;return Math.asin(Math.sin(i)*Math.sin(o)+Math.cos(i)*Math.cos(o)*Math.cos(r))}class L extends a.a{constructor(t){super(t),Object(s.a)(this,"timestamp",void 0),this.timestamp=t.timestamp}getProjectedLight({layer:t}){const{viewport:e}=t.context;if(e.resolution&&e.resolution>0){const[t,e,n]=P(this.timestamp,0,0);this.direction=[t,-n,e]}else{const{latitude:t,longitude:n}=e;this.direction=P(this.timestamp,t,n)}return this}}var j=n(1624),M=n(6),R=n(316),N=n(365);class D extends N.a{constructor(t,e){super(t,e),Object(s.a)(this,"model",void 0);const{module:n,fs:r,id:i}=e;this.model=new j.a(t,{id:i,fs:r,modules:[n]})}render(t){const e=this.gl;Object(M.n)(e,{viewport:[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}),Object(M.o)(e,{framebuffer:t.outputBuffer,clearColor:[0,0,0,0]},(()=>this._renderPass(e,t)))}delete(){this.model.delete(),this.model=null}_renderPass(t,e){const{inputBuffer:n}=e;Object(R.a)(t,{color:!0}),this.model.draw({moduleSettings:this.props.moduleSettings,uniforms:{texture:n,texSize:[n.width,n.height]},parameters:{depthWrite:!1,depthTest:!1}})}}var F=n(1637);class B{constructor(t,e={}){Object(s.a)(this,"id",void 0),Object(s.a)(this,"props",void 0),Object(s.a)(this,"module",void 0),Object(s.a)(this,"passes",void 0),this.id="".concat(t.name,"-pass"),this.props=e,Object(F.a)(t),this.module=t}preRender(){}postRender(t,e){const n=this.passes||function(t,e,n,r){if(!e.passes){const i=z(e);return[new D(t,{id:n,module:e,fs:i,moduleSettings:r})]}return e.passes.map(((i,o)=>{const a=z(e,i),s="".concat(n,"-").concat(o);return new D(t,{id:s,module:e,fs:a,moduleSettings:r})}))}(t,this.module,this.id,this.props);this.passes=n;const{target:r}=e;let i=e.inputBuffer,o=e.swapBuffer;for(let a=0;a<this.passes.length;a++){r&&a===this.passes.length-1&&(o=r),this.passes[a].render({inputBuffer:i,outputBuffer:o});const t=o;o=i,i=t}return i}cleanup(){if(this.passes){for(const t of this.passes)t.delete();this.passes=void 0}}}function z(t,e=t){if(e.filter){return(t=>"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n  vec2 texCoord = coordinate;\n\n  gl_FragColor = texture2D(texture, texCoord);\n  gl_FragColor = ".concat(t,"(gl_FragColor, texSize, texCoord);\n}\n"))("string"===typeof e.filter?e.filter:"".concat(t.name,"_filterColor"))}if(e.sampler){return(t=>"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n  vec2 texCoord = coordinate;\n\n  gl_FragColor = ".concat(t,"(texture, texSize, texCoord);\n}\n"))("string"===typeof e.sampler?e.sampler:"".concat(t.name,"_sampleColor"))}return null}var U=n(129),G=n(649),V=n(359),q=n(358),H=n(357),W=n(368),X=n(360),Y=n(76),Z=n(115),K=n(392),$=n(61),J=n(24);const Q=Math.PI/180;function tt({height:t,focalDistance:e,orbitAxis:n,rotationX:r,rotationOrbit:i,zoom:o}){const a="Z"===n?[0,0,1]:[0,1,0],s="Z"===n?[0,-e,0]:[0,0,e],u=(new $.a).lookAt({eye:s,up:a});u.rotateX(r*Q),"Z"===n?u.rotateZ(i*Q):u.rotateY(i*Q);const l=Math.pow(2,o)/t;return u.scale(l),u}class et extends Y.a{constructor(t){const{height:e,projectionMatrix:n,fovy:r=50,orbitAxis:i="Z",target:o=[0,0,0],rotationX:a=0,rotationOrbit:u=0,zoom:l=0}=t,c=n?n[5]/2:Object(J.f)(r);super({...t,longitude:void 0,viewMatrix:tt({height:e||1,focalDistance:c,orbitAxis:i,rotationX:a,rotationOrbit:u,zoom:l}),fovy:r,focalDistance:c,position:o,zoom:l}),Object(s.a)(this,"projectedCenter",void 0),this.projectedCenter=this.project(this.center)}unproject(t,{topLeft:e=!0}={}){const[n,r,i=this.projectedCenter[2]]=t,o=e?r:this.height-r,[a,s,u]=Object(J.o)([n,o,i],this.pixelUnprojectionMatrix);return[a,s,u]}panByPosition(t,e){const n=this.project(t),r=[this.width/2+n[0]-e[0],this.height/2+n[1]-e[1],this.projectedCenter[2]];return{target:this.unproject(r)}}}var nt=n(355),rt=n(425);class it extends Y.a{constructor(t){const{longitude:e,latitude:n,modelMatrix:r,bearing:i=0,pitch:o=0,up:a=[0,0,1]}=t,u=new rt.a({bearing:i,pitch:-90===o?1e-4:90+o}).toVector3().normalize(),l=r?new $.a(r).transformAsVector(u):u,c=Number.isFinite(n)?Object(J.j)({latitude:n}):0,f=Math.pow(2,c),h=(new $.a).lookAt({eye:[0,0,0],center:l,up:a}).scale(f);super({...t,zoom:c,viewMatrix:h}),Object(s.a)(this,"longitude",void 0),Object(s.a)(this,"latitude",void 0),this.latitude=n,this.longitude=e}}var ot=n(492),at=n(170),st=n(491),ut=n(531),lt=n(203),ct=n(121),ft=n(301),ht=n(113),pt=n(219),dt=n(55),mt=n(98),gt=n(100),yt=n(12);class vt extends pt.a{constructor(t){const{width:e,height:n,position:r=[0,0,0],bearing:i=0,pitch:o=0,longitude:a=null,latitude:s=null,maxPitch:u=90,minPitch:l=-90,startRotatePos:c,startBearing:f,startPitch:h,startZoomPosition:p}=t;super({width:e,height:n,position:r,bearing:i,pitch:o,longitude:a,latitude:s,maxPitch:u,minPitch:l},{startRotatePos:c,startBearing:f,startPitch:h,startZoomPosition:p})}panStart(){return this}pan(){return this}panEnd(){return this}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:t,deltaAngleX:e=0,deltaAngleY:n=0}){const{startRotatePos:r,startBearing:i,startPitch:o}=this.getState(),{width:a,height:s}=this.getViewportProps();if(!r||void 0===i||void 0===o)return this;let u;if(t){u={bearing:i-180*((t[0]-r[0])/a),pitch:o-90*((t[1]-r[1])/s)}}else u={bearing:i-e,pitch:o-n};return this._getUpdatedState(u)}rotateEnd(){return this._getUpdatedState({startRotatePos:null,startBearing:null,startPitch:null})}zoomStart(){return this._getUpdatedState({startZoomPosition:this.getViewportProps().position})}zoom({scale:t}){let{startZoomPosition:e}=this.getState();e||(e=this.getViewportProps().position);const n=this.getDirection();return this._move(n,20*Math.log2(t),e)}zoomEnd(){return this._getUpdatedState({startZoomPosition:null})}moveLeft(t=20){const e=this.getDirection(!0);return this._move(e.rotateZ({radians:Math.PI/2}),t)}moveRight(t=20){const e=this.getDirection(!0);return this._move(e.rotateZ({radians:-Math.PI/2}),t)}moveUp(t=20){const e=this.getDirection(!0);return this._move(e,t)}moveDown(t=20){const e=this.getDirection(!0);return this._move(e.negate(),t)}rotateLeft(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing-t})}rotateRight(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+t})}rotateUp(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+t})}rotateDown(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-t})}zoomIn(t=2){return this.zoom({scale:t})}zoomOut(t=2){return this.zoom({scale:1/t})}shortestPathFrom(t){const e=t.getViewportProps(),n={...this.getViewportProps()},{bearing:r,longitude:i}=n;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),null!==i&&null!==e.longitude&&Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}_move(t,e,n=this.getViewportProps().position){const r=t.scale(e);return this._getUpdatedState({position:new gt.a(n).add(r)})}getDirection(t=!1){return new rt.a({bearing:this.getViewportProps().bearing,pitch:t?90:90+this.getViewportProps().pitch}).toVector3().normalize()}_getUpdatedState(t){return new vt({...this.getViewportProps(),...this.getState(),...t})}applyConstraints(t){const{pitch:e,maxPitch:n,minPitch:r,longitude:i,bearing:o}=t;return t.pitch=Object(yt.d)(e,r,n),null!==i&&(i<-180||i>180)&&(t.longitude=Object(dt.e)(i+180,360)-180),(o<-180||o>180)&&(t.bearing=Object(dt.e)(o+180,360)-180),t}}class bt extends ht.a{constructor(...t){super(...t),Object(s.a)(this,"ControllerState",vt),Object(s.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new mt.a(["position","pitch","bearing"])})}}class _t extends ct.a{get ViewportType(){return it}get ControllerType(){return bt}}Object(s.a)(_t,"displayName","FirstPersonView");var At=n(240);class wt extends ct.a{constructor(t={}){super(t),this.props.orbitAxis=t.orbitAxis||"Z"}get ViewportType(){return et}get ControllerType(){return At.b}}Object(s.a)(wt,"displayName","OrbitView");var xt=n(354),Et=n(216);class Ot extends Et.a{applyConstraints(t){const{maxZoom:e,minZoom:n,zoom:r}=t;t.zoom=Object(yt.d)(r,n,e);const{longitude:i,latitude:o}=t;return(i<-180||i>180)&&(t.longitude=Object(dt.e)(i+180,360)-180),t.latitude=Object(yt.d)(o,-89,89),t}}class St extends ht.a{constructor(...t){super(...t),Object(s.a)(this,"ControllerState",Ot),Object(s.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new mt.a(["longitude","latitude","zoom"])}),Object(s.a)(this,"dragMode","pan")}setProps(t){super.setProps(t),this.dragRotate=!1,this.touchRotate=!1}}class Pt extends ct.a{get ViewportType(){return K.a}get ControllerType(){return St}}Object(s.a)(Pt,"displayName","GlobeView");var Ct=n(356),Tt=n(641),kt=n(351),It=n(239);const Lt=["bearing","pitch"],jt={speed:1.2,curve:1.414};class Mt extends It.a{constructor(t={}){super({compare:["longitude","latitude","zoom","bearing","pitch"],extract:["width","height","longitude","latitude","zoom","bearing","pitch"],required:["width","height","latitude","longitude","zoom"]}),Object(s.a)(this,"opts",void 0),this.opts={...jt,...t}}interpolateProps(t,e,n){const r=Object(J.e)(t,e,n,this.opts);for(const i of Lt)r[i]=Object(yt.n)(t[i]||0,e[i]||0,n);return r}getDuration(t,e){let{transitionDuration:n}=e;return"auto"===n&&(n=Object(J.i)(t,e,this.opts)),n}}var Rt=n(27),Nt=n(42),Dt=n(87),Ft=n(637),Bt=n(108),zt=n(348),Ut=n(131),Gt=n(349),Vt=n(263)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return f})),n.d(e,"j",(function(){return h})),n.d(e,"f",(function(){return m}));var r=n(9);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 a(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function s(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 l(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function c(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function f(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function h(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 p,d,m=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};p=new r.a(2),r.a!=Float32Array&&(p[0]=0,p[1]=0),d=p},function(t,e,n){"use strict";var r=n(1135);e.a=new r.a({id:"deck"})},function(t,e,n){"use strict";n.r(e),n.d(e,"createGLContext",(function(){return r.c})),n.d(e,"instrumentGLContext",(function(){return r.h})),n.d(e,"isWebGL",(function(){return r.i})),n.d(e,"isWebGL2",(function(){return r.j})),n.d(e,"getParameters",(function(){return r.f})),n.d(e,"setParameters",(function(){return r.n})),n.d(e,"withParameters",(function(){return r.o})),n.d(e,"resetParameters",(function(){return r.l})),n.d(e,"cssToDeviceRatio",(function(){return r.e})),n.d(e,"cssToDevicePixels",(function(){return r.d})),n.d(e,"lumaStats",(function(){return i.b})),n.d(e,"FEATURES",(function(){return o.a})),n.d(e,"hasFeature",(function(){return a.b})),n.d(e,"hasFeatures",(function(){return a.c})),n.d(e,"Buffer",(function(){return s.a})),n.d(e,"Program",(function(){return u.a})),n.d(e,"Framebuffer",(function(){return l.a})),n.d(e,"Renderbuffer",(function(){return c.a})),n.d(e,"Texture2D",(function(){return f.a})),n.d(e,"TextureCube",(function(){return h.a})),n.d(e,"VertexShader",(function(){return p.b})),n.d(e,"FragmentShader",(function(){return p.a})),n.d(e,"clear",(function(){return d.a})),n.d(e,"readPixelsToArray",(function(){return m.c})),n.d(e,"readPixelsToBuffer",(function(){return m.d})),n.d(e,"cloneTextureFrom",(function(){return g.a})),n.d(e,"copyToTexture",(function(){return m.b})),n.d(e,"Texture3D",(function(){return y.a})),n.d(e,"TransformFeedback",(function(){return v.a})),n.d(e,"AnimationLoop",(function(){return b.a})),n.d(e,"Model",(function(){return _.a})),n.d(e,"Transform",(function(){return A.a})),n.d(e,"ProgramManager",(function(){return w.a})),n.d(e,"Timeline",(function(){return x.a})),n.d(e,"Geometry",(function(){return E.a})),n.d(e,"ClipSpace",(function(){return O.a})),n.d(e,"ConeGeometry",(function(){return T})),n.d(e,"CubeGeometry",(function(){return k.a})),n.d(e,"CylinderGeometry",(function(){return I})),n.d(e,"IcoSphereGeometry",(function(){return R})),n.d(e,"PlaneGeometry",(function(){return N})),n.d(e,"SphereGeometry",(function(){return D})),n.d(e,"TruncatedConeGeometry",(function(){return C})),n.d(e,"normalizeShaderModule",(function(){return F.a})),n.d(e,"fp32",(function(){return B.a})),n.d(e,"fp64",(function(){return q})),n.d(e,"project",(function(){return Z})),n.d(e,"dirlight",(function(){return $})),n.d(e,"picking",(function(){return J.a})),n.d(e,"gouraudLighting",(function(){return Q.a})),n.d(e,"phongLighting",(function(){return Q.b})),n.d(e,"pbr",(function(){return tt.a})),n.d(e,"log",(function(){return r.k})),n.d(e,"assert",(function(){return et.a})),n.d(e,"uid",(function(){return S.c}));var r=n(6),i=n(208),o=n(315),a=n(608),s=n(50),u=n(1533),l=n(123),c=n(176),f=n(173),h=n(563),p=n(178),d=n(316),m=n(411),g=n(562),y=n(564),v=n(1431),b=n(1534),_=n(366),A=n(1531),w=n(410),x=n(1446),E=n(130),O=n(1624),S=n(73);const P={x:[2,0,1],y:[0,1,2],z:[1,2,0]};class C extends E.a{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(S.c)("truncated-code-geometry")}=t,{indices:n,attributes:r}=function(t){const{bottomRadius:e=0,topRadius:n=0,height:r=1,nradial:i=10,nvertical:o=10,verticalAxis:a="y",topCap:s=!1,bottomCap:u=!1}=t,l=(s?2:0)+(u?2:0),c=(i+1)*(o+1+l),f=Math.atan2(e-n,r),h=Math.sin,p=Math.cos,d=Math.PI,m=p(f),g=h(f),y=s?-2:0,v=o+(u?2:0),b=i+1,_=new Uint16Array(i*(o+l)*6),A=P[a],w=new Float32Array(3*c),x=new Float32Array(3*c),E=new Float32Array(2*c);let O=0,S=0;for(let P=y;P<=v;P++){let t,a=P/o,s=r*a;P<0?(s=0,a=1,t=e):P>o?(s=r,a=1,t=n):t=e+P/o*(n-e),-2!==P&&P!==o+2||(t=0,a=0),s-=r/2;for(let e=0;e<b;e++){const n=h(e*d*2/i),r=p(e*d*2/i);w[O+A[0]]=n*t,w[O+A[1]]=s,w[O+A[2]]=r*t,x[O+A[0]]=P<0||P>o?0:n*m,x[O+A[1]]=P<0?-1:P>o?1:g,x[O+A[2]]=P<0||P>o?0:r*m,E[S+0]=e/i,E[S+1]=a,S+=2,O+=3}}for(let P=0;P<o+l;P++)for(let t=0;t<i;t++){const e=6*(P*i+t);_[e+0]=b*(P+0)+0+t,_[e+1]=b*(P+0)+1+t,_[e+2]=b*(P+1)+1+t,_[e+3]=b*(P+0)+0+t,_[e+4]=b*(P+1)+1+t,_[e+5]=b*(P+1)+0+t}return{indices:_,attributes:{POSITION:{size:3,value:w},NORMAL:{size:3,value:x},TEXCOORD_0:{size:2,value:E}}}}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}class T extends C{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(S.c)("cone-geometry"),radius:n=1,cap:r=!0}=t;super({...t,id:e,topRadius:0,topCap:Boolean(r),bottomCap:Boolean(r),bottomRadius:n})}}var k=n(1434);class I extends C{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(S.c)("cylinder-geometry"),radius:n=1}=t;super({...t,id:e,bottomRadius:n,topRadius:n})}}var L=n(100);const j=[-1,0,0,0,1,0,0,0,-1,0,0,1,0,-1,0,1,0,0],M=[3,4,5,3,5,1,3,1,0,3,0,4,4,0,2,4,2,5,2,0,1,5,2,1];class R extends E.a{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(S.c)("ico-sphere-geometry")}=t,{indices:n,attributes:r}=function(t){const{iterations:e=0}=t,n=Math.PI,r=2*n,i=[...j];let o=[...M];i.push(),o.push();const a=(()=>{const t={};return(e,n)=>{const r=(e*=3)>(n*=3)?e:n,o="".concat(e<n?e:n,"|").concat(r);if(o in t)return t[o];const a=i[e],s=i[e+1],u=i[e+2];let l=(a+i[n])/2,c=(s+i[n+1])/2,f=(u+i[n+2])/2;const h=Math.sqrt(l*l+c*c+f*f);return l/=h,c/=h,f/=h,i.push(l,c,f),t[o]=i.length/3-1}})();for(let l=0;l<e;l++){const t=[];for(let e=0;e<o.length;e+=3){const n=a(o[e+0],o[e+1]),r=a(o[e+1],o[e+2]),i=a(o[e+2],o[e+0]);t.push(i,o[e+0],n,n,o[e+1],r,r,o[e+2],i,n,r,i)}o=t}const s=new Array(i.length),u=new Array(i.length/3*2);for(let l=o.length-3;l>=0;l-=3){const t=o[l+0],e=o[l+1],a=o[l+2],c=3*t,f=3*e,h=3*a,p=2*t,d=2*e,m=2*a,g=i[c+0],y=i[c+1],v=i[c+2],b=Math.acos(v/Math.sqrt(g*g+y*y+v*v))/n,_=1-(Math.atan2(y,g)+n)/r,A=i[f+0],w=i[f+1],x=i[f+2],E=Math.acos(x/Math.sqrt(A*A+w*w+x*x))/n,O=1-(Math.atan2(w,A)+n)/r,S=i[h+0],P=i[h+1],C=i[h+2],T=Math.acos(C/Math.sqrt(S*S+P*P+C*C))/n,k=1-(Math.atan2(P,S)+n)/r,I=[S-A,P-w,C-x],j=[g-A,y-w,v-x],M=new L.a(I).cross(j).normalize();let R;(0===_||0===O||0===k)&&(0===_||_>.5)&&(0===O||O>.5)&&(0===k||k>.5)&&(i.push(i[c+0],i[c+1],i[c+2]),R=i.length/3-1,o.push(R),u[2*R+0]=1,u[2*R+1]=b,s[3*R+0]=M.x,s[3*R+1]=M.y,s[3*R+2]=M.z,i.push(i[f+0],i[f+1],i[f+2]),R=i.length/3-1,o.push(R),u[2*R+0]=1,u[2*R+1]=E,s[3*R+0]=M.x,s[3*R+1]=M.y,s[3*R+2]=M.z,i.push(i[h+0],i[h+1],i[h+2]),R=i.length/3-1,o.push(R),u[2*R+0]=1,u[2*R+1]=T,s[3*R+0]=M.x,s[3*R+1]=M.y,s[3*R+2]=M.z),s[c+0]=s[f+0]=s[h+0]=M.x,s[c+1]=s[f+1]=s[h+1]=M.y,s[c+2]=s[f+2]=s[h+2]=M.z,u[p+0]=_,u[p+1]=b,u[d+0]=O,u[d+1]=E,u[m+0]=k,u[m+1]=T}return{indices:{size:1,value:new Uint16Array(o)},attributes:{POSITION:{size:3,value:new Float32Array(i)},NORMAL:{size:3,value:new Float32Array(s)},TEXCOORD_0:{size:2,value:new Float32Array(u)}}}}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}class N extends E.a{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(S.c)("plane-geometry")}=t,{indices:n,attributes:r}=function(t){const{type:e="x,y",offset:n=0,flipCull:r=!1,unpack:i=!1}=t,o=e.split(",");let a=t["".concat(o[0],"len")]||1;const s=t["".concat(o[1],"len")]||1,u=t["n".concat(o[0])]||1,l=t["n".concat(o[1])]||1,c=(u+1)*(l+1),f=new Float32Array(3*c),h=new Float32Array(3*c),p=new Float32Array(2*c);r&&(a=-a);let d=0,m=0;for(let b=0;b<=l;b++)for(let t=0;t<=u;t++){const i=t/u,o=b/l;switch(p[d+0]=r?1-i:i,p[d+1]=o,e){case"x,y":f[m+0]=a*i-.5*a,f[m+1]=s*o-.5*s,f[m+2]=n,h[m+0]=0,h[m+1]=0,h[m+2]=r?1:-1;break;case"x,z":f[m+0]=a*i-.5*a,f[m+1]=n,f[m+2]=s*o-.5*s,h[m+0]=0,h[m+1]=r?1:-1,h[m+2]=0;break;case"y,z":f[m+0]=n,f[m+1]=a*i-.5*a,f[m+2]=s*o-.5*s,h[m+0]=r?1:-1,h[m+1]=0,h[m+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}d+=2,m+=3}const g=u+1,y=new Uint16Array(u*l*6);for(let b=0;b<l;b++)for(let t=0;t<u;t++){const e=6*(b*u+t);y[e+0]=(b+0)*g+t,y[e+1]=(b+1)*g+t,y[e+2]=(b+0)*g+t+1,y[e+3]=(b+1)*g+t,y[e+4]=(b+1)*g+t+1,y[e+5]=(b+0)*g+t+1}const v={indices:{size:1,value:y},attributes:{POSITION:{size:3,value:f},NORMAL:{size:3,value:h},TEXCOORD_0:{size:2,value:p}}};return i?function(t){const{indices:e,attributes:n}=t;if(!e)return t;const r=e.value.length,i={};for(const o in n){const t=n[o],{constant:a,value:s,size:u}=t;if(a||!u)continue;const l=new s.constructor(r*u);for(let n=0;n<r;++n){const t=e.value[n];for(let e=0;e<u;e++)l[n*u+e]=s[t*u+e]}i[o]={size:u,value:l}}return{attributes:Object.assign({},n,i)}}(v):v}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}class D extends E.a{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(S.c)("sphere-geometry")}=t,{indices:n,attributes:r}=function(t){const{nlat:e=10,nlong:n=10}=t;let{radius:r=1}=t;const i=0,o=Math.PI-i,a=0,s=2*Math.PI-a,u=(e+1)*(n+1);if("number"===typeof r){const t=r;r=(e,n,r,i,o)=>t}const l=new Float32Array(3*u),c=new Float32Array(3*u),f=new Float32Array(2*u),h=new(u>65535?Uint32Array:Uint16Array)(e*n*6);for(let d=0;d<=e;d++)for(let t=0;t<=n;t++){const i=t/n,a=d/e,u=t+d*(n+1),h=2*u,p=3*u,m=s*i,g=o*a,y=Math.sin(m),v=Math.cos(m),b=Math.sin(g),_=v*b,A=Math.cos(g),w=y*b,x=r(_,A,w,i,a);l[p+0]=x*_,l[p+1]=x*A,l[p+2]=x*w,c[p+0]=_,c[p+1]=A,c[p+2]=w,f[h+0]=i,f[h+1]=1-a}const p=n+1;for(let d=0;d<n;d++)for(let t=0;t<e;t++){const n=6*(d*e+t);h[n+0]=t*p+d,h[n+1]=t*p+d+1,h[n+2]=(t+1)*p+d,h[n+3]=(t+1)*p+d,h[n+4]=t*p+d+1,h[n+5]=(t+1)*p+d+1}return{indices:{size:1,value:h},attributes:{POSITION:{size:3,value:l},NORMAL:{size:3,value:c},TEXCOORD_0:{size:2,value:f}}}}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}var F=n(1637),B=n(1432);function z(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=Math.fround(t),i=t-r;return e[n]=r,e[n+1]=i,e}function U(t){return t-Math.fround(t)}function G(t){const e=new Float32Array(32);for(let n=0;n<4;++n)for(let r=0;r<4;++r){const i=4*n+r;z(t[4*r+n],e,2*i)}return e}const V={ONE:1};const q={name:"fp64",vs:"const vec2 E_FP64 = vec2(2.7182817459106445e+00, 8.254840366817007e-08);\nconst vec2 LOG2_FP64 = vec2(0.6931471824645996e+00, -1.9046542121259336e-09);\nconst vec2 PI_FP64 = vec2(3.1415927410125732, -8.742278012618954e-8);\nconst vec2 TWO_PI_FP64 = vec2(6.2831854820251465, -1.7484556025237907e-7);\nconst vec2 PI_2_FP64 = vec2(1.5707963705062866, -4.371139006309477e-8);\nconst vec2 PI_4_FP64 = vec2(0.7853981852531433, -2.1855695031547384e-8);\nconst vec2 PI_16_FP64 = vec2(0.19634954631328583, -5.463923757886846e-9);\nconst vec2 PI_16_2_FP64 = vec2(0.39269909262657166, -1.0927847515773692e-8);\nconst vec2 PI_16_3_FP64 = vec2(0.5890486240386963, -1.4906100798128818e-9);\nconst vec2 PI_180_FP64 = vec2(0.01745329238474369, 1.3519960498364902e-10);\n\nconst vec2 SIN_TABLE_0_FP64 = vec2(0.19509032368659973, -1.6704714833615242e-9);\nconst vec2 SIN_TABLE_1_FP64 = vec2(0.3826834261417389, 6.22335089017767e-9);\nconst vec2 SIN_TABLE_2_FP64 = vec2(0.5555702447891235, -1.1769521357507529e-8);\nconst vec2 SIN_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617041793133e-8);\n\nconst vec2 COS_TABLE_0_FP64 = vec2(0.9807852506637573, 2.9739473106360492e-8);\nconst vec2 COS_TABLE_1_FP64 = vec2(0.9238795042037964, 2.8307490351764386e-8);\nconst vec2 COS_TABLE_2_FP64 = vec2(0.8314695954322815, 1.6870263741530778e-8);\nconst vec2 COS_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617152815436e-8);\n\nconst vec2 INVERSE_FACTORIAL_3_FP64 = vec2(1.666666716337204e-01, -4.967053879312289e-09);\nconst vec2 INVERSE_FACTORIAL_4_FP64 = vec2(4.16666679084301e-02, -1.2417634698280722e-09);\nconst vec2 INVERSE_FACTORIAL_5_FP64 = vec2(8.333333767950535e-03, -4.34617203337595e-10);\nconst vec2 INVERSE_FACTORIAL_6_FP64 = vec2(1.3888889225199819e-03, -3.3631094437103215e-11);\nconst vec2 INVERSE_FACTORIAL_7_FP64 = vec2(1.9841270113829523e-04,  -2.725596874933456e-12);\nconst vec2 INVERSE_FACTORIAL_8_FP64 = vec2(2.4801587642286904e-05, -3.406996025904184e-13);\nconst vec2 INVERSE_FACTORIAL_9_FP64 = vec2(2.75573188446287533e-06, 3.7935713937038186e-14);\nconst vec2 INVERSE_FACTORIAL_10_FP64 = vec2(2.755731998149713e-07, -7.575112367869873e-15);\n\nfloat nint(float d) {\n    if (d == floor(d)) return d;\n    return floor(d + 0.5);\n}\n\nvec2 nint_fp64(vec2 a) {\n    float hi = nint(a.x);\n    float lo;\n    vec2 tmp;\n    if (hi == a.x) {\n        lo = nint(a.y);\n        tmp = quickTwoSum(hi, lo);\n    } else {\n        lo = 0.0;\n        if (abs(hi - a.x) == 0.5 && a.y < 0.0) {\n            hi -= 1.0;\n        }\n        tmp = vec2(hi, lo);\n    }\n    return tmp;\n}\n\nvec2 exp_fp64(vec2 a) {\n\n  const int k_power = 4;\n  const float k = 16.0;\n\n  const float inv_k = 1.0 / k;\n\n  if (a.x <= -88.0) return vec2(0.0, 0.0);\n  if (a.x >= 88.0) return vec2(1.0 / 0.0, 1.0 / 0.0);\n  if (a.x == 0.0 && a.y == 0.0) return vec2(1.0, 0.0);\n  if (a.x == 1.0 && a.y == 0.0) return E_FP64;\n\n  float m = floor(a.x / LOG2_FP64.x + 0.5);\n  vec2 r = sub_fp64(a, mul_fp64(LOG2_FP64, vec2(m, 0.0))) * inv_k;\n  vec2 s, t, p;\n\n  p = mul_fp64(r, r);\n  s = sum_fp64(r, p * 0.5);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_3_FP64);\n\n  s = sum_fp64(s, t);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_4_FP64);\n\n  s = sum_fp64(s, t);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_5_FP64);\n\n\n\n\n\n\n  s = sum_fp64(s, t);\n  for (int i = 0; i < k_power; i++) {\n    s = sum_fp64(s * 2.0, mul_fp64(s, s));\n  }\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n  s = sum_fp64(s, vec2(ONE, 0.0));\n#else\n  s = sum_fp64(s, vec2(1.0, 0.0));\n#endif\n\n  return s * pow(2.0, m);\n}\n\nvec2 log_fp64(vec2 a)\n{\n  if (a.x == 1.0 && a.y == 0.0) return vec2(0.0, 0.0);\n  if (a.x <= 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n  vec2 x = vec2(log(a.x), 0.0);\n  vec2 s;\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n  s = vec2(ONE, 0.0);\n#else\n  s = vec2(1.0, 0.0);\n#endif\n\n  x = sub_fp64(sum_fp64(x, mul_fp64(a, exp_fp64(-x))), s);\n  return x;\n}\n\nvec2 sin_taylor_fp64(vec2 a) {\n  vec2 r, s, t, x;\n\n  if (a.x == 0.0 && a.y == 0.0) {\n    return vec2(0.0, 0.0);\n  }\n\n  x = -mul_fp64(a, a);\n  s = a;\n  r = a;\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_3_FP64);\n  s = sum_fp64(s, t);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_5_FP64);\n  s = sum_fp64(s, t);\n\n\n\n\n\n\n  return s;\n}\n\nvec2 cos_taylor_fp64(vec2 a) {\n  vec2 r, s, t, x;\n\n  if (a.x == 0.0 && a.y == 0.0) {\n    return vec2(1.0, 0.0);\n  }\n\n  x = -mul_fp64(a, a);\n  r = x;\n  s = sum_fp64(vec2(1.0, 0.0), r * 0.5);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_4_FP64);\n  s = sum_fp64(s, t);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_6_FP64);\n  s = sum_fp64(s, t);\n\n\n\n\n\n\n  return s;\n}\n\nvoid sincos_taylor_fp64(vec2 a, out vec2 sin_t, out vec2 cos_t) {\n  if (a.x == 0.0 && a.y == 0.0) {\n    sin_t = vec2(0.0, 0.0);\n    cos_t = vec2(1.0, 0.0);\n  }\n\n  sin_t = sin_taylor_fp64(a);\n  cos_t = sqrt_fp64(sub_fp64(vec2(1.0, 0.0), mul_fp64(sin_t, sin_t)));\n}\n\nvec2 sin_fp64(vec2 a) {\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(0.0, 0.0);\n    }\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n\n    if (k == 0) {\n        if (j == 0) {\n            return sin_taylor_fp64(t);\n        } else if (j == 1) {\n            return cos_taylor_fp64(t);\n        } else if (j == -1) {\n            return -cos_taylor_fp64(t);\n        } else {\n            return -sin_taylor_fp64(t);\n        }\n    }\n\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n    if (abs(float(abs_k) - 1.0) < 0.5) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs(float(abs_k) - 2.0) < 0.5) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs(float(abs_k) - 3.0) < 0.5) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs(float(abs_k) - 4.0) < 0.5) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#else\n    if (abs_k == 1) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs_k == 2) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs_k == 3) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs_k == 4) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#endif\n\n    vec2 sin_t, cos_t;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n\n\n    vec2 result = vec2(0.0, 0.0);\n    if (j == 0) {\n        if (k > 0) {\n            result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        }\n    } else if (j == 1) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    } else if (j == -1) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        } else {\n            result = -sum_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        }\n    } else {\n        if (k > 0) {\n            result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n        }\n    }\n\n    return result;\n}\n\nvec2 cos_fp64(vec2 a) {\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(1.0, 0.0);\n    }\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n\n    if (k == 0) {\n        if (j == 0) {\n            return cos_taylor_fp64(t);\n        } else if (j == 1) {\n            return -sin_taylor_fp64(t);\n        } else if (j == -1) {\n            return sin_taylor_fp64(t);\n        } else {\n            return -cos_taylor_fp64(t);\n        }\n    }\n\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n    if (abs(float(abs_k) - 1.0) < 0.5) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs(float(abs_k) - 2.0) < 0.5) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs(float(abs_k) - 3.0) < 0.5) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs(float(abs_k) - 4.0) < 0.5) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#else\n    if (abs_k == 1) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs_k == 2) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs_k == 3) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs_k == 4) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#endif\n\n    vec2 sin_t, cos_t;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n    vec2 result = vec2(0.0, 0.0);\n    if (j == 0) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    } else if (j == 1) {\n        if (k > 0) {\n            result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n        }\n    } else if (j == -1) {\n        if (k > 0) {\n            result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        }\n    } else {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        } else {\n            result = -sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    }\n\n    return result;\n}\n\nvec2 tan_fp64(vec2 a) {\n    vec2 sin_a;\n    vec2 cos_a;\n\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(0.0, 0.0);\n    }\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n    vec2 sin_t, cos_t;\n    vec2 s, c;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n    if (k == 0) {\n        s = sin_t;\n        c = cos_t;\n    } else {\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n        if (abs(float(abs_k) - 1.0) < 0.5) {\n            u = COS_TABLE_0_FP64;\n            v = SIN_TABLE_0_FP64;\n        } else if (abs(float(abs_k) - 2.0) < 0.5) {\n            u = COS_TABLE_1_FP64;\n            v = SIN_TABLE_1_FP64;\n        } else if (abs(float(abs_k) - 3.0) < 0.5) {\n            u = COS_TABLE_2_FP64;\n            v = SIN_TABLE_2_FP64;\n        } else if (abs(float(abs_k) - 4.0) < 0.5) {\n            u = COS_TABLE_3_FP64;\n            v = SIN_TABLE_3_FP64;\n        }\n#else\n        if (abs_k == 1) {\n            u = COS_TABLE_0_FP64;\n            v = SIN_TABLE_0_FP64;\n        } else if (abs_k == 2) {\n            u = COS_TABLE_1_FP64;\n            v = SIN_TABLE_1_FP64;\n        } else if (abs_k == 3) {\n            u = COS_TABLE_2_FP64;\n            v = SIN_TABLE_2_FP64;\n        } else if (abs_k == 4) {\n            u = COS_TABLE_3_FP64;\n            v = SIN_TABLE_3_FP64;\n        }\n#endif\n        if (k > 0) {\n            s = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n            c = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            s = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n            c = sum_fp64(mul_fp64(u, cos_t), mul_fp64(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 div_fp64(sin_a, cos_a);\n}\n\nvec2 radians_fp64(vec2 degree) {\n  return mul_fp64(degree, PI_180_FP64);\n}\n\nvec2 mix_fp64(vec2 a, vec2 b, float x) {\n  vec2 range = sub_fp64(b, a);\n  return sum_fp64(a, mul_fp64(range, vec2(x, 0.0)));\n}\n\nvoid vec2_sum_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = sum_fp64(a[0], b[0]);\n    out_val[1] = sum_fp64(a[1], b[1]);\n}\n\nvoid vec2_sub_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = sub_fp64(a[0], b[0]);\n    out_val[1] = sub_fp64(a[1], b[1]);\n}\n\nvoid vec2_mul_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = mul_fp64(a[0], b[0]);\n    out_val[1] = mul_fp64(a[1], b[1]);\n}\n\nvoid vec2_div_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = div_fp64(a[0], b[0]);\n    out_val[1] = div_fp64(a[1], b[1]);\n}\n\nvoid vec2_mix_fp64(vec2 x[2], vec2 y[2], float a, out vec2 out_val[2]) {\n  vec2 range[2];\n  vec2_sub_fp64(y, x, range);\n  vec2 portion[2];\n  portion[0] = range[0] * a;\n  portion[1] = range[1] * a;\n  vec2_sum_fp64(x, portion, out_val);\n}\n\nvec2 vec2_length_fp64(vec2 x[2]) {\n  return sqrt_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])));\n}\n\nvoid vec2_normalize_fp64(vec2 x[2], out vec2 out_val[2]) {\n  vec2 length = vec2_length_fp64(x);\n  vec2 length_vec2[2];\n  length_vec2[0] = length;\n  length_vec2[1] = length;\n\n  vec2_div_fp64(x, length_vec2, out_val);\n}\n\nvec2 vec2_distance_fp64(vec2 x[2], vec2 y[2]) {\n  vec2 diff[2];\n  vec2_sub_fp64(x, y, diff);\n  return vec2_length_fp64(diff);\n}\n\nvec2 vec2_dot_fp64(vec2 a[2], vec2 b[2]) {\n  vec2 v[2];\n\n  v[0] = mul_fp64(a[0], b[0]);\n  v[1] = mul_fp64(a[1], b[1]);\n\n  return sum_fp64(v[0], v[1]);\n}\nvoid vec3_sub_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n  for (int i = 0; i < 3; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvoid vec3_sum_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n  for (int i = 0; i < 3; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvec2 vec3_length_fp64(vec2 x[3]) {\n  return sqrt_fp64(sum_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])),\n    mul_fp64(x[2], x[2])));\n}\n\nvec2 vec3_distance_fp64(vec2 x[3], vec2 y[3]) {\n  vec2 diff[3];\n  vec3_sub_fp64(x, y, diff);\n  return vec3_length_fp64(diff);\n}\nvoid vec4_fp64(vec4 a, out vec2 out_val[4]) {\n  out_val[0].x = a[0];\n  out_val[0].y = 0.0;\n\n  out_val[1].x = a[1];\n  out_val[1].y = 0.0;\n\n  out_val[2].x = a[2];\n  out_val[2].y = 0.0;\n\n  out_val[3].x = a[3];\n  out_val[3].y = 0.0;\n}\n\nvoid vec4_scalar_mul_fp64(vec2 a[4], vec2 b, out vec2 out_val[4]) {\n  out_val[0] = mul_fp64(a[0], b);\n  out_val[1] = mul_fp64(a[1], b);\n  out_val[2] = mul_fp64(a[2], b);\n  out_val[3] = mul_fp64(a[3], b);\n}\n\nvoid vec4_sum_fp64(vec2 a[4], vec2 b[4], out vec2 out_val[4]) {\n  for (int i = 0; i < 4; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvoid vec4_dot_fp64(vec2 a[4], vec2 b[4], out vec2 out_val) {\n  vec2 v[4];\n\n  v[0] = mul_fp64(a[0], b[0]);\n  v[1] = mul_fp64(a[1], b[1]);\n  v[2] = mul_fp64(a[2], b[2]);\n  v[3] = mul_fp64(a[3], b[3]);\n\n  out_val = sum_fp64(sum_fp64(v[0], v[1]), sum_fp64(v[2], v[3]));\n}\n\nvoid mat4_vec4_mul_fp64(vec2 b[16], vec2 a[4], out vec2 out_val[4]) {\n  vec2 tmp[4];\n\n  for (int i = 0; i < 4; i++)\n  {\n    for (int j = 0; j < 4; j++)\n    {\n      tmp[j] = b[j + i * 4];\n    }\n    vec4_dot_fp64(a, tmp, out_val[i]);\n  }\n}\n",fs:null,dependencies:[{name:"fp64-arithmetic",vs:"uniform float ONE;\nvec2 split(float a) {\n  const float SPLIT = 4097.0;\n  float t = a * SPLIT;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float a_hi = t * ONE - (t - a);\n  float a_lo = a * ONE - a_hi;\n#else\n  float a_hi = t - (t - a);\n  float a_lo = a - a_hi;\n#endif\n  return vec2(a_hi, a_lo);\n}\nvec2 split2(vec2 a) {\n  vec2 b = split(a.x);\n  b.y += a.y;\n  return b;\n}\nvec2 quickTwoSum(float a, float b) {\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float sum = (a + b) * ONE;\n  float err = b - (sum - a) * ONE;\n#else\n  float sum = a + b;\n  float err = b - (sum - a);\n#endif\n  return vec2(sum, err);\n}\nvec2 twoSum(float a, float b) {\n  float s = (a + b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float v = (s * ONE - a) * ONE;\n  float err = (a - (s - v) * ONE) * ONE * ONE * ONE + (b - v);\n#else\n  float v = s - a;\n  float err = (a - (s - v)) + (b - v);\n#endif\n  return vec2(s, err);\n}\n\nvec2 twoSub(float a, float b) {\n  float s = (a - b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float v = (s * ONE - a) * ONE;\n  float err = (a - (s - v) * ONE) * ONE * ONE * ONE - (b + v);\n#else\n  float v = s - a;\n  float err = (a - (s - v)) - (b + v);\n#endif\n  return vec2(s, err);\n}\n\nvec2 twoSqr(float a) {\n  float prod = a * a;\n  vec2 a_fp64 = split(a);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float err = ((a_fp64.x * a_fp64.x - prod) * ONE + 2.0 * a_fp64.x *\n    a_fp64.y * ONE * ONE) + a_fp64.y * a_fp64.y * ONE * ONE * ONE;\n#else\n  float err = ((a_fp64.x * a_fp64.x - prod) + 2.0 * a_fp64.x * a_fp64.y) + a_fp64.y * a_fp64.y;\n#endif\n  return vec2(prod, err);\n}\n\nvec2 twoProd(float a, float b) {\n  float prod = a * b;\n  vec2 a_fp64 = split(a);\n  vec2 b_fp64 = split(b);\n  float err = ((a_fp64.x * b_fp64.x - prod) + a_fp64.x * b_fp64.y +\n    a_fp64.y * b_fp64.x) + a_fp64.y * b_fp64.y;\n  return vec2(prod, err);\n}\n\nvec2 sum_fp64(vec2 a, vec2 b) {\n  vec2 s, t;\n  s = twoSum(a.x, b.x);\n  t = twoSum(a.y, b.y);\n  s.y += t.x;\n  s = quickTwoSum(s.x, s.y);\n  s.y += t.y;\n  s = quickTwoSum(s.x, s.y);\n  return s;\n}\n\nvec2 sub_fp64(vec2 a, vec2 b) {\n  vec2 s, t;\n  s = twoSub(a.x, b.x);\n  t = twoSub(a.y, b.y);\n  s.y += t.x;\n  s = quickTwoSum(s.x, s.y);\n  s.y += t.y;\n  s = quickTwoSum(s.x, s.y);\n  return s;\n}\n\nvec2 mul_fp64(vec2 a, vec2 b) {\n  vec2 prod = twoProd(a.x, b.x);\n  prod.y += a.x * b.y;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  prod = split2(prod);\n#endif\n  prod = quickTwoSum(prod.x, prod.y);\n  prod.y += a.y * b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  prod = split2(prod);\n#endif\n  prod = quickTwoSum(prod.x, prod.y);\n  return prod;\n}\n\nvec2 div_fp64(vec2 a, vec2 b) {\n  float xn = 1.0 / b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  vec2 yn = mul_fp64(a, vec2(xn, 0));\n#else\n  vec2 yn = a * xn;\n#endif\n  float diff = (sub_fp64(a, mul_fp64(b, yn))).x;\n  vec2 prod = twoProd(xn, diff);\n  return sum_fp64(yn, prod);\n}\n\nvec2 sqrt_fp64(vec2 a) {\n  if (a.x == 0.0 && a.y == 0.0) return vec2(0.0, 0.0);\n  if (a.x < 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n\n  float x = 1.0 / sqrt(a.x);\n  float yn = a.x * x;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  vec2 yn_sqr = twoSqr(yn) * ONE;\n#else\n  vec2 yn_sqr = twoSqr(yn);\n#endif\n  float diff = sub_fp64(a, yn_sqr).x;\n  vec2 prod = twoProd(x * 0.5, diff);\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  return sum_fp64(split(yn), prod);\n#else\n  return sum_fp64(vec2(yn, 0.0), prod);\n#endif\n}\n",fs:null,getUniforms:function(){return V},fp64ify:z,fp64LowPart:U,fp64ifyMatrix4:G}],fp64ify:z,fp64LowPart:U,fp64ifyMatrix4:G};var H=n(61);const W=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],X={modelMatrix:W,viewMatrix:W,projectionMatrix:W,cameraPositionWorld:[0,0,0]};const Y="varying vec4 project_vPositionWorld;\nvarying vec3 project_vNormalWorld;\n\nvec4 project_getPosition_World() {\n  return project_vPositionWorld;\n}\n\nvec3 project_getNormal_World() {\n  return project_vNormalWorld;\n}\n",Z={name:"project",getUniforms:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X;const e={};return void 0!==t.modelMatrix&&(e.modelMatrix=t.modelMatrix),void 0!==t.viewMatrix&&(e.viewMatrix=t.viewMatrix),void 0!==t.projectionMatrix&&(e.projectionMatrix=t.projectionMatrix),void 0!==t.cameraPositionWorld&&(e.cameraPositionWorld=t.cameraPositionWorld),void 0===t.projectionMatrix&&void 0===t.viewMatrix||(e.viewProjectionMatrix=new H.a(t.projectionMatrix).multiplyRight(t.viewMatrix)),e},vs:"".concat(Y,"\nuniform mat4 modelMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewProjectionMatrix;\nuniform vec3 cameraPositionWorld;\n\nstruct World {\n  vec3 position;\n  vec3 normal;\n};\n\nWorld world;\n\nvoid project_setPosition(vec4 position) {\n  project_vPositionWorld = position;\n}\n\nvoid project_setNormal(vec3 normal) {\n  project_vNormalWorld = normal;\n}\n\nvoid project_setPositionAndNormal_World(vec3 position, vec3 normal) {\n  world.position = position;\n  world.normal = normal;\n}\n\nvoid project_setPositionAndNormal_Model(vec3 position, vec3 normal) {\n  world.position = (modelMatrix * vec4(position, 1.)).xyz;\n  world.normal = mat3(modelMatrix) * normal;\n}\n\nvec4 project_model_to_clipspace(vec4 position) {\n  return viewProjectionMatrix * modelMatrix * position;\n}\n\nvec4 project_model_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * modelMatrix * vec4(position, 1.);\n}\n\nvec4 project_world_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_view_to_clipspace(vec3 position) {\n  return projectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * vec4(position, 1.);\n}\n"),fs:"\n".concat(Y)},K={lightDirection:new Float32Array([1,1,2])};const $={name:"dirlight",vs:null,fs:"uniform vec3 dirlight_uLightDirection;\nvec4 dirlight_filterColor(vec4 color) {\n  vec3 normal = project_getNormal_World();\n  float d = abs(dot(normalize(normal), normalize(dirlight_uLightDirection)));\n  return vec4(color.rgb * d, color.a);\n}\n",getUniforms:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;const e={};return t.lightDirection&&(e.dirlight_uLightDirection=t.lightDirection),e},dependencies:[Z]};var J=n(1132),Q=n(531),tt=n(1535),et=n(10)},function(t,e,n){"use strict";function r(t){return r="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},r(t)}n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return l})),n.d(e,"e",(function(){return c})),n.d(e,"i",(function(){return f})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return p})),n.d(e,"h",(function(){return d}));var i=function(t){return"boolean"===typeof t},o=function(t){return"function"===typeof t},a=function(t){return null!==t&&"object"===r(t)},s=function(t){return a(t)&&t.constructor==={}.constructor},u=function(t){return t&&"function"===typeof t[Symbol.iterator]},l=function(t){return t&&"function"===typeof t[Symbol.asyncIterator]},c=function(t){return t&&o(t.next)},f=function(t){return"undefined"!==typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json},h=function(t){return"undefined"!==typeof Blob&&t instanceof Blob},p=function(t){return t&&"object"===r(t)&&t.isBuffer},d=function(t){return function(t){return"undefined"!==typeof ReadableStream&&t instanceof ReadableStream||a(t)&&o(t.tee)&&o(t.cancel)&&o(t.getReader)}(t)||function(t){return a(t)&&o(t.read)&&o(t.pipe)&&i(t.readable)}(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return vo})),n.d(e,"b",(function(){return ho})),n.d(e,"c",(function(){return mo}));var r={};n.r(r),n.d(r,"reversed",(function(){return J})),n.d(r,"mirrored",(function(){return Q})),n.d(r,"createReversedEasing",(function(){return tt})),n.d(r,"createMirroredEasing",(function(){return et})),n.d(r,"createExpoIn",(function(){return nt})),n.d(r,"createBackIn",(function(){return rt})),n.d(r,"createAnticipateEasing",(function(){return it})),n.d(r,"linear",(function(){return ot})),n.d(r,"easeIn",(function(){return at})),n.d(r,"easeOut",(function(){return st})),n.d(r,"easeInOut",(function(){return ut})),n.d(r,"circIn",(function(){return lt})),n.d(r,"circOut",(function(){return ct})),n.d(r,"circInOut",(function(){return ft})),n.d(r,"backIn",(function(){return ht})),n.d(r,"backOut",(function(){return pt})),n.d(r,"backInOut",(function(){return dt})),n.d(r,"anticipate",(function(){return mt})),n.d(r,"bounceOut",(function(){return gt})),n.d(r,"bounceIn",(function(){return yt})),n.d(r,"bounceInOut",(function(){return vt})),n.d(r,"cubicBezier",(function(){return St}));var i=n(5),o=n(0);var a=0,s="undefined"!==typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-a));a=e+n,setTimeout((function(){return t(a)}),n)},u=1/60*1e3,l=!0,c=!1,f=!1,h={delta:0,timestamp:0},p=["read","update","preRender","render","postRender"],d=function(t){return c=t},m=p.reduce((function(t,e){var n,r,i,o,a,s,u,l,c;return t[e]=(n=d,r=[],i=[],o=0,a=!1,s=0,u=new WeakSet,l=new WeakSet,c={cancel:function(t){var e=i.indexOf(t);u.add(t),-1!==e&&i.splice(e,1)},process:function(t){var e,f;if(a=!0,r=(e=[i,r])[0],(i=e[1]).length=0,o=r.length)for(s=0;s<o;s++)(f=r[s])(t),!0!==l.has(f)||u.has(f)||(c.schedule(f),n(!0));a=!1},schedule:function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var s=n&&a,c=s?r:i;u.delete(t),e&&l.add(t),-1===c.indexOf(t)&&(c.push(t),s&&(o=r.length))}}),t}),{}),g=p.reduce((function(t,e){var n=m[e];return t[e]=function(t,e,r){return void 0===e&&(e=!1),void 0===r&&(r=!1),c||_(),n.schedule(t,e,r),t},t}),{}),y=p.reduce((function(t,e){return t[e]=m[e].cancel,t}),{}),v=function(t){return m[t].process(h)},b=function(t){c=!1,h.delta=l?u:Math.max(Math.min(t-h.timestamp,40),1),l||(u=h.delta),h.timestamp=t,f=!0,p.forEach(v),f=!1,c&&(l=!1,s(b))},_=function(){c=!0,l=!0,f||s(b)},A=function(){return h},w=g,x=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},E=function(t){return t%1?Number(t.toFixed(5)):t},O=/(-)?(\d[\d\.]*)/g,S=/(#[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,P=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,C={test:function(t){return"number"===typeof t},parse:parseFloat,transform:function(t){return t}},T=Object(i.a)(Object(i.a)({},C),{transform:x(0,1)}),k=Object(i.a)(Object(i.a)({},C),{default:1}),I=function(t){return{test:function(e){return"string"===typeof e&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},L=I("deg"),j=I("%"),M=I("px"),R=I("vh"),N=I("vw"),D=Object(i.a)(Object(i.a)({},j),{parse:function(t){return j.parse(t)/100},transform:function(t){return j.transform(100*t)}}),F=x(0,255),B=function(t){return void 0!==t.red},z=function(t){return void 0!==t.hue};var U=function(t){return function(e){if("string"!==typeof e)return e;for(var n={},r=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}(e).replace(/(,|\/)/g," ").split(/ \s*/),i=0;i<4;i++)n[t[i]]=void 0!==r[i]?parseFloat(r[i]):1;return n}},G=Object(i.a)(Object(i.a)({},C),{transform:function(t){return Math.round(F(t))}});function V(t,e){return t.startsWith(e)&&P.test(t)}var q={test:function(t){return"string"===typeof t?V(t,"rgb"):B(t)},parse:U(["red","green","blue","alpha"]),transform:function(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha,o=void 0===i?1:i;return function(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha;return"rgba("+e+", "+n+", "+r+", "+(void 0===i?1:i)+")"}({red:G.transform(e),green:G.transform(n),blue:G.transform(r),alpha:E(T.transform(o))})}},H={test:function(t){return"string"===typeof t?V(t,"hsl"):z(t)},parse:U(["hue","saturation","lightness","alpha"]),transform:function(t){var e=t.hue,n=t.saturation,r=t.lightness,i=t.alpha,o=void 0===i?1:i;return function(t){var e=t.hue,n=t.saturation,r=t.lightness,i=t.alpha;return"hsla("+e+", "+n+", "+r+", "+(void 0===i?1:i)+")"}({hue:Math.round(e),saturation:j.transform(E(n)),lightness:j.transform(E(r)),alpha:E(T.transform(o))})}},W=Object(i.a)(Object(i.a)({},q),{test:function(t){return"string"===typeof t&&V(t,"#")},parse:function(t){var e="",n="",r="";return t.length>4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),X={test:function(t){return"string"===typeof t&&P.test(t)||B(t)||z(t)},parse:function(t){return q.test(t)?q.parse(t):H.test(t)?H.parse(t):W.test(t)?W.parse(t):t},transform:function(t){return B(t)?q.transform(t):z(t)?H.transform(t):t}},Y="${c}",Z="${n}",K=function(t){return"number"===typeof t?0:t},$={test:function(t){if("string"!==typeof t||!isNaN(t))return!1;var e=0,n=t.match(O),r=t.match(S);return n&&(e+=n.length),r&&(e+=r.length),e>0},parse:function(t){var e=t,n=[],r=e.match(S);r&&(e=e.replace(S,Y),n.push.apply(n,r.map(X.parse)));var i=e.match(O);return i&&n.push.apply(n,i.map(C.parse)),n},createTransformer:function(t){var e=t,n=0,r=t.match(S),i=r?r.length:0;if(r)for(var o=0;o<i;o++)e=e.replace(r[o],Y),n++;var a=e.match(O),s=a?a.length:0;if(a)for(o=0;o<s;o++)e=e.replace(a[o],Z),n++;return function(t){for(var r=e,o=0;o<n;o++)r=r.replace(o<i?Y:Z,o<i?X.transform(t[o]):E(t[o]));return r}},getAnimatableNone:function(t){var e=$.parse(t);return $.createTransformer(t)(e.map(K))}},J=function(t){return function(e){return 1-t(1-e)}},Q=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},tt=J,et=Q,nt=function(t){return function(e){return Math.pow(e,t)}},rt=function(t){return function(e){return e*e*((t+1)*e-t)}},it=function(t){var e=rt(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},ot=function(t){return t},at=nt(2),st=J(at),ut=Q(at),lt=function(t){return 1-Math.sin(Math.acos(t))},ct=J(lt),ft=Q(ct),ht=rt(1.525),pt=J(ht),dt=Q(ht),mt=it(1.525),gt=function(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},yt=function(t){return 1-gt(1-t)},vt=function(t){return t<.5?.5*(1-gt(1-2*t)):.5*gt(2*t-1)+.5},bt=.1,_t="undefined"!==typeof Float32Array,At=function(t,e){return 1-3*e+3*t},wt=function(t,e){return 3*e-6*t},xt=function(t){return 3*t},Et=function(t,e,n){return 3*At(e,n)*t*t+2*wt(e,n)*t+xt(e)},Ot=function(t,e,n){return((At(e,n)*t+wt(e,n))*t+xt(e))*t};function St(t,e,n,r){var i=_t?new Float32Array(11):new Array(11),o=function(e){for(var r,o,a,s=0,u=1;10!==u&&i[u]<=e;++u)s+=bt;return--u,r=(e-i[u])/(i[u+1]-i[u]),(a=Et(o=s+r*bt,t,n))>=.001?function(e,r){for(var i=0,o=0;i<8;++i){if(0===(o=Et(r,t,n)))return r;r-=(Ot(r,t,n)-e)/o}return r}(e,o):0===a?o:function(e,r,i){var o,a,s=0;do{(o=Ot(a=r+(i-r)/2,t,n)-e)>0?i=a:r=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,s,s+bt)};!function(){for(var e=0;e<11;++e)i[e]=Ot(e*bt,t,n)}();return function(i){return t===e&&n===r?i:0===i?0:1===i?1:Ot(o(i),e,r)}}var Pt={x:0,y:0,z:0},Ct=function(t){return"number"===typeof t},Tt=function(t){return function(e,n,r){return void 0!==r?t(e,n,r):function(r){return t(e,n,r)}}},kt=Tt((function(t,e,n){return Math.min(Math.max(n,t),e)})),It=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},Lt=function(t){return It(t)&&t.hasOwnProperty("z")},jt=function(t,e){return Math.abs(t-e)},Mt=function(t,e){if(void 0===e&&(e=Pt),Ct(t)&&Ct(e))return jt(t,e);if(It(t)&&It(e)){var n=jt(t.x,e.x),r=jt(t.y,e.y),i=Lt(t)&&Lt(e)?jt(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}return 0},Rt=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Nt=function(t,e,n){return-n*t+n*e+t},Dt=function(){return Dt=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},Dt.apply(this,arguments)},Ft=function(t,e,n){var r=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-r)+r))},Bt=[W,q,H],zt=function(t){return Bt.find((function(e){return e.test(t)}))},Ut=function(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."},Gt=function(t,e){var n=zt(t),r=zt(e);Ut(t),Ut(e),n.transform,r.transform;var i=n.parse(t),o=r.parse(e),a=Dt({},i),s=n===H?Nt:Ft;return function(t){for(var e in a)"alpha"!==e&&(a[e]=s(i[e],o[e],t));return a.alpha=Nt(i.alpha,o.alpha,t),n.transform(a)}},Vt=function(t,e){return function(n){return e(t(n))}},qt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Vt)};function Ht(t,e){return Ct(t)?function(n){return Nt(t,e,n)}:X.test(t)?Gt(t,e):Yt(t,e)}var Wt=function(t,e){var n=t.slice(),r=n.length,i=t.map((function(t,n){return Ht(t,e[n])}));return function(t){for(var e=0;e<r;e++)n[e]=i[e](t);return n}};function Xt(t){for(var e=$.parse(t),n=e.length,r=0,i=0,o=0,a=0;a<n;a++)r||"number"===typeof e[a]?r++:void 0!==e[a].hue?o++:i++;return{parsed:e,numNumbers:r,numRGB:i,numHSL:o}}var Yt=function(t,e){var n=$.createTransformer(e),r=Xt(t),i=Xt(e);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&(r.numNumbers,i.numNumbers),qt(Wt(r.parsed,i.parsed),n)};var Zt,Kt=function(t){return t},$t=function(t){return void 0===t&&(t=Kt),Tt((function(e,n,r){var i=n-r,o=-(0-e+1)*(0-t(Math.abs(i)));return i<=0?n+o:n-o}))},Jt=($t(),$t(Math.sqrt),function(t,e){return e?t*(1e3/e):0}),Qt=(Tt((function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t})),kt(0,1),function(t){var e=t.onRead,n=t.onRender,r=t.uncachedValues,o=void 0===r?new Set:r,a=t.useCache,s=void 0===a||a;return function(t){void 0===t&&(t={});var r=Object(i.c)(t,[]),a={},u=[],l=!1;function c(t,e){t.startsWith("--")&&(r.hasCSSVariable=!0);var n=a[t];a[t]=e,a[t]!==n&&(-1===u.indexOf(t)&&u.push(t),l||(l=!0,w.render(f.render)))}var f={get:function(t,n){return void 0===n&&(n=!1),!n&&s&&!o.has(t)&&void 0!==a[t]?a[t]:e(t,r)},set:function(t,e){if("string"===typeof t)c(t,e);else for(var n in t)c(n,t[n]);return this},render:function(t){return void 0===t&&(t=!1),(l||!0===t)&&(n(a,r,u),l=!1,u.length=0),this}};return f}}),te=/([a-z])([A-Z])/g,ee=function(t){return t.replace(te,"$1-$2").toLowerCase()},ne=new Map,re=new Map,ie=["Webkit","Moz","O","ms",""],oe=ie.length,ae="undefined"!==typeof document,se=function(t,e){return re.set(t,ee(e))},ue=function(t,e){void 0===e&&(e=!1);var n=e?re:ne;return n.has(t)||(ae?function(t){Zt=Zt||document.createElement("div");for(var e=0;e<oe;e++){var n=ie[e],r=""===n,i=r?t:n+t.charAt(0).toUpperCase()+t.slice(1);if(i in Zt.style||r){if(r&&"clipPath"===t&&re.has(t))return;ne.set(t,i),se(t,(r?"":"-")+ee(i))}}}(t):function(t){se(t,t)}(t)),n.get(t)||t},le=["","X","Y","Z"],ce=["translate","scale","rotate","skew","transformPerspective"].reduce((function(t,e){return le.reduce((function(t,n){return t.push(e+n),t}),t)}),["x","y","z"]),fe=ce.reduce((function(t,e){return t[e]=!0,t}),{});function he(t){return!0===fe[t]}function pe(t,e){return ce.indexOf(t)-ce.indexOf(e)}var de=new Set(["originX","originY","originZ"]);function me(t){return de.has(t)}var ge=Object(i.a)(Object(i.a)({},C),{transform:Math.round}),ye={color:X,backgroundColor:X,outlineColor:X,fill:X,stroke:X,borderColor:X,borderTopColor:X,borderRightColor:X,borderBottomColor:X,borderLeftColor:X,borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,size:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,rotate:L,rotateX:L,rotateY:L,rotateZ:L,scale:k,scaleX:k,scaleY:k,scaleZ:k,skew:L,skewX:L,skewY:L,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,opacity:T,originX:D,originY:D,originZ:M,zIndex:ge,fillOpacity:T,strokeOpacity:T,numOctaves:ge},ve=function(t){return ye[t]},be=function(t,e){return e&&"number"===typeof t?e.transform(t):t},_e="scrollLeft",Ae="scrollTop",we=new Set([_e,Ae]),xe=new Set([_e,Ae,"transform"]),Ee={x:"translateX",y:"translateY",z:"translateZ"};function Oe(t){return"function"===typeof t}function Se(t,e,n,r,i,o,a,s){void 0===e&&(e=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=[]),void 0===a&&(a=!1),void 0===s&&(s=!0);var u=!0,l=!1,c=!1;for(var f in t){var h=t[f],p=ve(f),d=be(h,p);he(f)?(l=!0,r[f]=d,o.push(f),u&&(p.default&&h!==p.default||!p.default&&0!==h)&&(u=!1)):me(f)?(i[f]=d,c=!0):xe.has(f)&&Oe(d)||(n[ue(f,a)]=d)}return(l||"function"===typeof t.transform)&&(n.transform=function(t,e,n,r,i,o){void 0===o&&(o=!0);var a="",s=!1;n.sort(pe);for(var u=n.length,l=0;l<u;l++){var c=n[l];a+=(Ee[c]||c)+"("+e[c]+") ",s="z"===c||s}return!s&&i?a+="translateZ(0)":a=a.trim(),Oe(t.transform)?a=t.transform(e,r?"":a):o&&r&&(a="none"),a}(t,r,o,u,e,s)),c&&(n.transformOrigin=(i.originX||"50%")+" "+(i.originY||"50%")+" "+(i.originZ||0)),n}function Pe(t){var e=void 0===t?{}:t,n=e.enableHardwareAcceleration,r=void 0===n||n,i=e.isDashCase,o=void 0===i||i,a=e.allowTransformNone,s=void 0===a||a,u={},l={},c={},f=[];return function(t){return f.length=0,Se(t,r,u,l,c,f,o,s),u}}var Ce=Qt({onRead:function(t,e){var n=e.element,r=e.preparseOutput,i=ve(t);if(he(t))return i&&i.default||0;if(we.has(t))return n[t];var o=window.getComputedStyle(n,null).getPropertyValue(ue(t,!0))||0;return r&&i&&i.test(o)&&i.parse?i.parse(o):o},onRender:function(t,e,n){var r=e.element,i=e.buildStyles,o=e.hasCSSVariable;if(Object.assign(r.style,i(t)),o)for(var a=n.length,s=0;s<a;s++){var u=n[s];u.startsWith("--")&&r.style.setProperty(u,t[u])}-1!==n.indexOf(_e)&&(r.scrollLeft=t.scrollLeft),-1!==n.indexOf(Ae)&&(r.scrollTop=t.scrollTop)},uncachedValues:we});var Te=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),ke=function(t,e){return M.transform(t*e)},Ie={x:0,y:0,width:0,height:0};function Le(t,e,n){return"string"===typeof t?t:M.transform(e+n*t)}var je={enableHardwareAcceleration:!1,isDashCase:!1};function Me(t,e,n,r,o,a){void 0===e&&(e=Ie),void 0===r&&(r=Pe(je)),void 0===o&&(o={style:{}}),void 0===a&&(a=!0);var s=t.attrX,u=t.attrY,l=t.originX,c=t.originY,f=t.pathLength,h=t.pathSpacing,p=void 0===h?1:h,d=t.pathOffset,m=void 0===d?0:d,g=r(Object(i.c)(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var y in g){if("transform"===y)o.style.transform=g[y];else o[a&&!Te.has(y)?ee(y):y]=g[y]}return(void 0!==l||void 0!==c||g.transform)&&(o.style.transformOrigin=function(t,e,n){return Le(e,t.x,t.width)+" "+Le(n,t.y,t.height)}(e,void 0!==l?l:.5,void 0!==c?c:.5)),void 0!==s&&(o.x=s),void 0!==u&&(o.y=u),void 0!==n&&void 0!==f&&(o[a?"stroke-dashoffset":"strokeDashoffset"]=ke(-m,n),o[a?"stroke-dasharray":"strokeDasharray"]=ke(f,n)+" "+ke(p,n)),o}function Re(t,e,n){void 0===n&&(n=!0);var r={style:{}},i=Pe(je);return function(o){return Me(o,t,e,i,r,n)}}var Ne=Qt({onRead:function(t,e){var n=e.element;if(he(t=Te.has(t)?t:ee(t))){var r=ve(t);return r&&r.default||0}return n.getAttribute(t)},onRender:function(t,e){var n=e.element,r=(0,e.buildAttrs)(t);for(var i in r)"style"===i?Object.assign(n.style,r.style):n.setAttribute(i,r[i])}}),De=Qt({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var e=t.scrollTop,n=void 0===e?0:e,r=t.scrollLeft,i=void 0===r?0:r;return window.scrollTo(i,n)}}),Fe=new WeakMap,Be=function(t,e){var n,r,o,a;return t===window?n=De(t):!function(t){return t instanceof HTMLElement||"function"===typeof t.click}(t)?function(t){return t instanceof SVGElement||"ownerSVGElement"in t}(t)&&(o=function(t){try{return function(t){return"function"===typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}(t)}catch(e){return{x:0,y:0,width:0,height:0}}}(r=t),a=function(t){return"path"===t.tagName}(r)&&r.getTotalLength?r.getTotalLength():void 0,n=Ne({element:r,buildAttrs:Re(o,a)})):n=function(t,e){void 0===e&&(e={});var n=e.enableHardwareAcceleration,r=e.allowTransformNone,o=Object(i.c)(e,["enableHardwareAcceleration","allowTransformNone"]);return Ce(Object(i.a)({element:t,buildStyles:Pe({enableHardwareAcceleration:n,allowTransformNone:r}),preparseOutput:!0},o))}(t,e),Fe.set(t,n),n};var ze=function(t,e){return function(t,e){return Fe.has(t)?Fe.get(t):Be(t,e)}("string"===typeof t?document.querySelector(t):t,e)},Ue=function(){return function(t,e){var n=this,r=t.middleware,i=t.onComplete;this.isActive=!0,this.update=function(t){n.observer.update&&n.updateObserver(t)},this.complete=function(){n.observer.complete&&n.isActive&&n.observer.complete(),n.onComplete&&n.onComplete(),n.isActive=!1},this.error=function(t){n.observer.error&&n.isActive&&n.observer.error(t),n.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=i,e.update&&r&&r.length&&r.forEach((function(t){return n.updateObserver=t(n.updateObserver,n.complete)}))}}(),Ge=function(t,e,n){var r=e.middleware;return new Ue({middleware:r,onComplete:n},"function"===typeof t?{update:t}:t)},Ve=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.create=function(e){return new t(e)},t.prototype.start=function(t){void 0===t&&(t={});var e=!1,n={stop:function(){}},r=this.props,o=r.init,a=Object(i.c)(r,["init"]),s=o(Ge(t,a,(function(){e=!0,n.stop()})));return n=s?Object(i.a)({},n,s):n,e&&n.stop(),n},t.prototype.applyMiddleware=function(t){return this.create(Object(i.a)({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=1===t.length?t[0]:qt.apply(void 0,t);return this.applyMiddleware((function(t){return function(e){return t(n(e))}}))},t}(),qe=function(t){return new Ve({init:t})},He=[M,j,L,R,N],We=function(t){return He.find((function(e){return e.test(t)}))},Xe=function(t,e){return t(e)},Ye=function(t,e){var n=e.from,r=e.to,o=Object(i.c)(e,["from","to"]),a=We(n)||We(r),s=a.transform,u=a.parse;return t(Object(i.a)({},o,{from:"string"===typeof n?u(n):n,to:"string"===typeof r?u(r):r})).pipe(s)},Ze=function(t){return function(e,n){var r=n.from,o=n.to,a=Object(i.c)(n,["from","to"]);return e(Object(i.a)({},a,{from:0,to:1})).pipe(t(r,o))}},Ke=Ze(Gt),$e=Ze(Yt),Je=function(t,e){var n=function(t){var e=Object.keys(t),n=function(e,n){return void 0!==e&&!t[n](e)};return{getVectorKeys:function(t){return e.reduce((function(e,r){return n(t[r],r)&&e.push(r),e}),[])},testVectorProps:function(t){return t&&e.some((function(e){return n(t[e],e)}))}}}(e),r=n.testVectorProps,i=n.getVectorKeys;return function(e){if(!r(e))return t(e);var n=i(e),o=e[n[0]];return Qe(o)(t,e,n)}},Qe=function(t){return"number"===typeof t?Xe:function(t){return Boolean(We(t))}(t)?Ye:X.test(t)?Ke:$.test(t)?$e:Xe},tn=Je((function(t){return void 0===t&&(t={}),qe((function(e){var n=e.complete,r=e.update,i=t.velocity,o=void 0===i?0:i,a=t.from,s=void 0===a?0:a,u=t.power,l=void 0===u?.8:u,c=t.timeConstant,f=void 0===c?350:c,h=t.restDelta,p=void 0===h?.5:h,d=t.modifyTarget,m=0,g=l*o,v=Math.round(s+g),b="undefined"===typeof d?v:d(v),_=w.update((function(t){var e=t.delta;m+=e;var i=-g*Math.exp(-m/f),o=i>p||i<-p;r(o?b+i:b),o||(y.update(_),n())}),!0);return{stop:function(){return y.update(_)}}}))}),{from:C.test,modifyTarget:function(t){return"function"===typeof t},velocity:C.test}),en=Je((function(t){return void 0===t&&(t={}),qe((function(e){var n=e.update,r=e.complete,i=t.velocity,o=void 0===i?0:i,a=t.from,s=void 0===a?0:a,u=t.to,l=void 0===u?0:u,c=t.stiffness,f=void 0===c?100:c,h=t.damping,p=void 0===h?10:h,d=t.mass,m=void 0===d?1:d,g=t.restSpeed,v=void 0===g?.01:g,b=t.restDelta,_=void 0===b?.01:b,A=o?-o/1e3:0,x=0,E=l-s,O=s,S=O,P=w.update((function(t){var e=t.delta;x+=e;var i=p/(2*Math.sqrt(f*m)),a=Math.sqrt(f/m)/1e3;if(S=O,i<1){var s=Math.exp(-i*a*x),u=a*Math.sqrt(1-i*i);O=l-s*((A+i*a*E)/u*Math.sin(u*x)+E*Math.cos(u*x))}else{s=Math.exp(-a*x);O=l-s*(E+(A+a*E)*x)}o=Jt(O-S,e);var c=Math.abs(o)<=v,h=Math.abs(l-O)<=_;c&&h?(n(O=l),y.update(P),r()):n(O)}),!0);return{stop:function(){return y.update(P)}}}))}),{from:C.test,to:C.test,stiffness:C.test,damping:C.test,mass:C.test,velocity:C.test}),nn=Je((function(t){var e=t.from,n=void 0===e?0:e,r=t.velocity,o=void 0===r?0:r,a=t.min,s=t.max,u=t.power,l=void 0===u?.8:u,c=t.timeConstant,f=void 0===c?700:c,h=t.bounceStiffness,p=void 0===h?500:h,d=t.bounceDamping,m=void 0===d?10:d,g=t.restDelta,y=void 0===g?1:g,v=t.modifyTarget;return qe((function(t){var e,r=t.update,u=t.complete,c=n,h=n,d=!1,g=function(t){return void 0!==a&&t<=a},b=function(t){return void 0!==s&&t>=s},_=function(t){return g(t)||b(t)},w=function(t){r(t),c=h,o=Jt((h=t)-c,A().delta),e&&!d&&function(t,e){return g(t)&&e<0||b(t)&&e>0}(t,o)&&E({from:t,velocity:o})},x=function(t,n){e&&e.stop(),e=t.start({update:w,complete:function(){n?n():u()}})},E=function(t){d=!0,x(en(Object(i.a)({},t,{to:g(t.from)?a:s,stiffness:p,damping:m,restDelta:y})))};if(_(n))E({from:n,velocity:o});else if(0!==o){var O=tn({from:n,velocity:o,timeConstant:f,power:l,restDelta:_(n)?20:y,modifyTarget:v});x(O,(function(){_(h)?E({from:h,velocity:o}):u()}))}else u();return{stop:function(){return e&&e.stop()}}}))}),{from:C.test,velocity:C.test,min:C.test,max:C.test,damping:C.test,stiffness:C.test,modifyTarget:function(t){return"function"===typeof t}}),rn=Je((function(t){var e=t.from,n=void 0===e?0:e,r=t.to,i=void 0===r?1:r,o=t.ease,a=void 0===o?ot:o,s=t.reverseEase;return void 0!==s&&s&&(a=tt(a)),qe((function(t){var e=t.update;return{seek:function(t){return e(t)}}})).pipe(a,(function(t){return Nt(n,i,t)}))}),{ease:function(t){return"function"===typeof t},from:C.test,to:C.test}),on=kt(0,1),an=function(t){return void 0===t&&(t={}),qe((function(e){var n,r=e.update,i=e.complete,o=t.duration,a=void 0===o?300:o,s=t.ease,u=void 0===s?st:s,l=t.flip,c=void 0===l?0:l,f=t.loop,h=void 0===f?0:f,p=t.yoyo,d=void 0===p?0:p,m=t.repeatDelay,g=void 0===m?0:m,v=t.from,b=void 0===v?0:v,_=t.to,A=void 0===_?1:_,x=t.elapsed,E=void 0===x?0:x,O=t.flipCount,S=void 0===O?0:O,P=t.yoyoCount,C=void 0===P?0:P,T=t.loopCount,k=void 0===T?0:T,I=rn({from:b,to:A,ease:u}).start(r),L=0,j=!1,M=function(t){var e;void 0===t&&(t=!1),I=rn({from:b=(e=[A,b])[0],to:A=e[1],ease:u,reverseEase:t}).start(r)},R=function(){L=on(Rt(0,a,E)),I.seek(L)},N=function(){j=!0,n=w.update((function(t){var e,r=t.delta;E+=r,R(),!(e=j&&E>a+g)||(!e||h||c||d)&&(E=E-a-g,h&&k<h?(k++,1):c&&S<c?(S++,M(),1):d&&C<d&&(C++,M(C%2!==0),1))||(y.update(n),i&&w.update(i,!1,!0))}),!0)},D=function(){j=!1,n&&y.update(n)};return N(),{isActive:function(){return j},getElapsed:function(){return kt(0,a,E)},getProgress:function(){return L},stop:function(){D()},pause:function(){return D(),this},resume:function(){return j||N(),this},seek:function(t){return E=Nt(0,a,t),w.update(R,!1,!0),this},reverse:function(){return M(),this}}}))},sn=kt(0,1),un=function(t){var e=t.easings,n=t.ease,r=void 0===n?ot:n,o=t.times,a=t.values,s=Object(i.c)(t,["easings","ease","times","values"]);e=Array.isArray(e)?e:function(t,e){return t.map((function(){return e||st})).splice(0,t.length-1)}(a,e),o=o||function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(a);var u=e.map((function(t,e){return rn({from:a[e],to:a[e+1],ease:t})}));return an(Object(i.a)({},s,{ease:r})).applyMiddleware((function(t){return function(t,e,n){var r=t.length,i=r-1,o=i-1,a=e.map((function(t){return t.start(n)}));return function(e){e<=t[0]&&a[0].seek(0),e>=t[i]&&a[o].seek(1);for(var n=1;n<r&&!(t[n]>e||n===i);n++);var s=Rt(t[n-1],t[n],e);a[n-1].seek(sn(s))}}(o,u,t)}))},ln=function(t,e,n){return qe((function(r){var i=r.update,o=e.split(" ").map((function(e){return t.addEventListener(e,i,n),e}));return{stop:function(){return o.forEach((function(e){return t.removeEventListener(e,i,n)}))}}}))},cn=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},fn=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},hn=[cn()];if("undefined"!==typeof document){ln(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(t){var e=t.touches;!0;var n=e.length;hn.length=0;for(var r=0;r<n;r++){var i=e[r];hn.push(fn(i))}}))}var pn=cn();if("undefined"!==typeof document){ln(document,"mousedown mousemove",!0).start((function(t){!0,fn(t,pn)}))}var dn=function(t){return qe((function(e){var n=e.complete,r=setTimeout(n,t);return{stop:function(){return clearTimeout(r)}}}))},mn=function(){function t(t,e){var n,r=this,i=void 0===e?{}:e,o=i.transformer,a=i.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),r.prev=r.current,r.current=r.transformer?r.transformer(t):t,r.updateSubscribers&&r.prev!==r.current&&r.updateSubscribers.forEach(r.notifySubscriber),r.children&&r.children.forEach(r.setChild),e&&r.renderSubscribers&&r.renderSubscribers.forEach(r.notifySubscriber);var n=A(),i=n.delta,o=n.timestamp;r.lastUpdated!==o&&(r.timeDelta=i,r.lastUpdated=o,w.postRender(r.scheduleVelocityCheck))},this.notifySubscriber=function(t){t(r.current)},this.scheduleVelocityCheck=function(){return w.postRender(r.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==r.lastUpdated&&(r.prev=r.current)},this.setChild=function(t){return t.set(r.current)},this.parent=a,this.transformer=o,this.set(t,!1),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return t.prototype.addChild=function(e){void 0===e&&(e={});var n=new t(this.current,Object(i.a)({parent:this},e));return this.children||(this.children=new Set),this.children.add(n),n},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.subscribeTo=function(t,e){var n=this,r=function(){return e(n.current)};return t.add(r),function(){return t.delete(r)}},t.prototype.onChange=function(t){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,t)},t.prototype.onRenderRequest=function(t){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(t),this.subscribeTo(this.renderSubscribers,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.getVelocity=function(){return this.canTrackVelocity?Jt(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.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&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},t}();function gn(t,e){return new mn(t,e)}function yn(t){var e=Object(o.useRef)(null);return null===e.current&&(e.current=t()),e.current}var vn,bn=function(t){return t instanceof mn},_n=Qt({onRead:function(){return null},onRender:function(t,e){return(0,e.onUpdate)(t)}}),An=function(){function t(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return t.prototype.has=function(t){return this.values.has(t)},t.prototype.set=function(t,e){this.values.set(t,e),this.hasMounted&&this.bindValueToOutput(t,e)},t.prototype.get=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new mn(e),this.set(t,n)),n},t.prototype.forEach=function(t){return this.values.forEach(t)},t.prototype.bindValueToOutput=function(t,e){var n=this,r=e.onRenderRequest((function(e){return n.output&&n.output(t,e)})),i=e.onChange((function(e){n.onUpdate&&n.onUpdate.set(t,e)}));this.unsubscribers.has(t)&&this.unsubscribers.get(t)(),this.unsubscribers.set(t,(function(){r(),i()}))},t.prototype.setOnUpdate=function(t){this.onUpdate=void 0,t&&(this.onUpdate=_n({onUpdate:t}))},t.prototype.setTransformTemplate=function(t){this.transformTemplate!==t&&(this.transformTemplate=t,this.updateTransformTemplate())},t.prototype.getTransformTemplate=function(){return this.transformTemplate},t.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},t.prototype.mount=function(t){var e=this;this.hasMounted=!0,t&&(this.output=t),this.values.forEach((function(t,n){return e.bindValueToOutput(n,t)})),this.updateTransformTemplate()},t.prototype.unmount=function(){var t=this;this.values.forEach((function(e,n){var r=t.unsubscribers.get(n);r&&r()}))},t}(),wn=new Set(["dragOriginX","dragOriginY"]),xn=function(t){var e=yn((function(){var e=new An;for(var n in t)bn(t[n])&&!wn.has(n)&&e.set(n,t[n]);return e}));return e.setOnUpdate(t.onUpdate),e.setTransformTemplate(t.transformTemplate),e},En=null,On=function(){return null!==En},Sn=function(){En=[]},Pn=function(){En&&En.forEach((function(t){return t.render()})),En=null},Cn=function(t){En&&En.push(t)},Tn=Object(o.memo)((function(t){var e=t.innerRef,n=t.values,r=t.isStatic;return Object(o.useEffect)((function(){e.current,Element;var t=ze(e.current,{preparseOutput:!1,enableHardwareAcceleration:!r});return n.mount((function(e,n){t.set(e,n),On()&&Cn(t)})),function(){return n.unmount()}}),[]),null})),kn=(vn=function(t){return t.get()},function(t){var e={};return t.forEach((function(t,n){return e[n]=vn(t)})),e}),In=new Set(["originX","originY","originZ"]),Ln=function(t){return In.has(t)},jn=function(t,e,n){var r=kn(t),o=t.getTransformTemplate();return o&&(r.transform=e.transform?o({},e.transform):o),Se(Object(i.a)(Object(i.a)({},e),r),!n)},Mn=function(t){return Array.isArray(t)},Rn=function(t){return Mn(t)?t[t.length-1]||0:t},Nn=[C,M,j,L,N,R,{test:function(t){return"auto"===t},parse:function(t){return t}}],Dn=Object(i.d)(Nn,[X,$]),Fn=function(t){return function(e){return e.test(t)}},Bn=function(t){return Nn.find(Fn(t))},zn=function(t){return Dn.find(Fn(t))},Un=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Gn=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},Vn=function(){return{ease:"linear",duration:.3}},qn=function(t){return{type:"keyframes",duration:.8,values:t}},Hn={x:Un,y:Un,z:Un,rotate:Un,rotateX:Un,rotateY:Un,rotateZ:Un,scaleX:Gn,scaleY:Gn,scale:Gn,opacity:Vn,backgroundColor:Vn,color:Vn,default:Gn},Wn=function(t){var e=t.to,n=t.duration;return qe((function(t){var r=t.update,i=t.complete;r(e),n?dn(n).start({complete:i}):i()}))},Xn=function(t){return Array.isArray(t)?(t.length,St(t[0],t[1],t[2],t[3])):"string"===typeof t?r[t]:t},Yn=function(t){return Array.isArray(t)&&"number"!==typeof t[0]},Zn=function(t,e){return"zIndex"!==t&&(!("number"!==typeof e&&!Array.isArray(e))||!("string"!==typeof e||!$.test(e)||e.startsWith("url(")))},Kn=function(t){return 1e3*t},$n={tween:an,spring:en,keyframes:un,inertia:nn,just:Wn},Jn={tween:function(t){if(t.ease){var e=Yn(t.ease)?t.ease[0]:t.ease;t.ease=Xn(e)}return t},keyframes:function(t){var e=t.from,n=(t.to,t.velocity,Object(i.c)(t,["from","to","velocity"]));if(n.values&&null===n.values[0]){var r=Object(i.d)(n.values);r[0]=e,n.values=r}return n.ease&&(n.easings=Yn(n.ease)?n.ease.map(Xn):Xn(n.ease)),n.ease=ot,n}},Qn=function(t,e,n){var r=n?n.delay:0;if(void 0===n||!function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection;var e=Object(i.c)(t,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(e).length}(n))return Object(i.a)({delay:r},function(t,e){var n;return n=Mn(e)?qn:Hn[t]||Hn.default,Object(i.a)({to:e},n(e))}(t,e));var o=n[t]||n.default||n;return!1===o.type?{delay:o.hasOwnProperty("delay")?o.delay:r,to:Mn(e)?e[e.length-1]:e,type:"just"}:Mn(e)?Object(i.a)(Object(i.a)({values:e,duration:.8,delay:r,ease:"linear"},o),{type:"keyframes"}):Object(i.a)({type:"tween",to:e,delay:r},o)},tr=function(t,e,n,r){var o,a=e.get(),s=Zn(t,a),u=Zn(t,n),l=Qn(t,n,r),c=l.type,f=void 0===c?"tween":c,h=Object(i.c)(l,["type"]),p=s&&u?$n[f]:Wn,d=function(t,e){return Jn[t]?Jn[t](e):e}(f,Object(i.a)({from:a,velocity:e.getVelocity()},h));return((o=d).hasOwnProperty("duration")||o.hasOwnProperty("repeatDelay"))&&(d.duration&&(d.duration=Kn(d.duration)),d.repeatDelay&&(d.repeatDelay=Kn(d.repeatDelay))),[p,d]};function er(t,e,n,r){var o=r.delay,a=void 0===o?0:o,s=Object(i.c)(r,["delay"]);return e.start((function(r){var o,u=tr(t,e,n,s),l=u[0],c=u[1],f=c.delay,h=Object(i.c)(c,["delay"]);void 0!==f&&(a=f);var p=function(){var t=l(h);o=t.start({update:function(t){return e.set(t)},complete:r})};return a?o=dn(Kn(a)).start({complete:p}):p(),function(){o&&o.stop()}}))}var nr=function(){function t(t){var e=this,n=t.values,r=t.readValueFromSource,i=t.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!e.values.has(t)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=i,this.values.forEach((function(t,n){return e.baseTarget[n]=t.get()}))}return t.prototype.setProps=function(t){this.props=t},t.prototype.setVariants=function(t){t&&(this.variants=t)},t.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},t.prototype.setValues=function(t,e){var n=this,r=void 0===e?{}:e,o=r.isActive,a=void 0===o?new Set:o,s=r.priority,u=this.resolveVariant(t),l=u.target,c=u.transitionEnd;return l=this.transformValues(Object(i.a)(Object(i.a)({},l),c)),Object.keys(l).forEach((function(t){if(!a.has(t)&&(a.add(t),l)){var e=Rn(l[t]);if(n.values.has(t)){var r=n.values.get(t);r&&r.set(e)}else n.values.set(t,gn(e));s||(n.baseTarget[t]=e)}}))},t.prototype.transformValues=function(t){var e=this.props.transformValues;return e?e(t):t},t.prototype.checkForNewValues=function(t){var e=Object.keys(t).filter(this.hasValue),n=e.length;if(n)for(var r=0;r<n;r++){var i=e[r],o=t[i],a=null;Array.isArray(o)&&(a=o[0]),null===a&&(a=this.readValueFromSource(i)),"string"===typeof a&&/^\d*\.?\d+$/.test(a)?a=parseFloat(a):!zn(a)&&$.test(o)&&(a=$.getAnimatableNone(o)),this.values.set(i,gn(a)),this.baseTarget[i]=a}},t.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var e,n;"function"===typeof t&&(t=t(this.props.custom,(e=this.values,n={},e.forEach((function(t,e){return n[e]=t.get()})),n),function(t){var e={};return t.forEach((function(t,n){return e[n]=t.getVelocity()})),e}(this.values)));var r=t.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:t.transitionEnd,target:Object(i.c)(t,["transition","transitionEnd"])}},t.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},t.prototype.setOverride=function(t,e){this.overrides[e]=t,this.children&&this.children.forEach((function(n){return n.setOverride(t,e)}))},t.prototype.startOverride=function(t){var e=this.overrides[t];if(e)return this.start(e,{priority:t})},t.prototype.clearOverride=function(t){var e=this;if(this.children&&this.children.forEach((function(e){return e.clearOverride(t)})),this.overrides[t]){this.activeOverrides.delete(t);var n=this.getHighestPriority();if(this.resetIsAnimating(),n)this.overrides[n]&&this.startOverride(n);var r=this.resolvedOverrides[t];if(r){var i={};for(var o in this.baseTarget)void 0!==r[o]&&(i[o]=this.baseTarget[o]);this.onStart(),this.animate(i).then((function(){return e.onComplete()}))}}},t.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"===typeof t?this.applyVariantLabels([t]):void this.setValues(t)},t.prototype.applyVariantLabels=function(t){var e=this,n=new Set;Object(i.d)(t).reverse().forEach((function(r){var i=e.resolveVariant(e.variants[r]),o=i.target,a=i.transitionEnd;a&&e.setValues(a,{isActive:n}),o&&e.setValues(o,{isActive:n}),e.children&&e.children.size&&e.children.forEach((function(e){return e.applyVariantLabels(t)}))}))},t.prototype.start=function(t,e){var n,r,i=this;return void 0===e&&(e={}),e.priority&&this.activeOverrides.add(e.priority),this.resetIsAnimating(e.priority),r=t,n=Array.isArray(r)?this.animateVariantLabels(t,e):"string"===typeof t?this.animateVariant(t,e):this.animate(t,e),this.onStart(),n.then((function(){return i.onComplete()}))},t.prototype.animate=function(t,e){var n=this,r=void 0===e?{}:e,o=r.delay,a=void 0===o?0:o,s=r.priority,u=void 0===s?0:s,l=r.transitionOverride,c=this.resolveVariant(t),f=c.target,h=c.transition,p=c.transitionEnd;if(l&&(h=l),!f)return Promise.resolve();if(f=this.transformValues(f),p&&(p=this.transformValues(p)),this.checkForNewValues(f),this.makeTargetAnimatable){var d=this.makeTargetAnimatable(f,p);f=d.target,p=d.transitionEnd}u&&(this.resolvedOverrides[u]=f),this.checkForNewValues(f);var m=[];for(var g in f){var y=this.values.get(g);if(y&&f&&void 0!==f[g]){var v=f[g];u||(this.baseTarget[g]=Rn(v)),this.isAnimating.has(g)||(this.isAnimating.add(g),m.push(er(g,y,v,Object(i.a)({delay:a},h))))}}var b=Promise.all(m);return p?b.then((function(){n.setValues(p,{priority:u})})):b},t.prototype.animateVariantLabels=function(t,e){var n=this,r=Object(i.d)(t).reverse().map((function(t){return n.animateVariant(t,e)}));return Promise.all(r)},t.prototype.animateVariant=function(t,e){var n=this,r=!1,i=0,o=0,a=1,s=e&&e.priority||0,u=this.variants[t],l=u?function(){return n.animate(u,e)}:function(){return Promise.resolve()},c=this.children?function(){return n.animateChildren(t,i,o,a,s)}:function(){return Promise.resolve()};if(u&&this.children){var f=this.resolveVariant(u).transition;f&&(r=f.when||r,i=f.delayChildren||i,o=f.staggerChildren||o,a=f.staggerDirection||a)}if(r){var h="beforeChildren"===r?[l,c]:[c,l],p=h[1];return(0,h[0])().then(p)}return Promise.all([l(),c()])},t.prototype.animateChildren=function(t,e,n,r,i){if(void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),!this.children)return Promise.resolve();var o=[],a=(this.children.size-1)*n,s=1===r?function(t){return t*n}:function(t){return a-t*n};return Array.from(this.children).forEach((function(n,r){var a=n.animateVariant(t,{priority:i,delay:e+s(r)});o.push(a)})),Promise.all(o)},t.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},t.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&t()},t.prototype.checkOverrideIsAnimating=function(t){for(var e=this.overrides.length,n=t+1;n<e;n++){var r=this.resolvedOverrides[n];if(r)for(var i in r)this.isAnimating.add(i)}},t.prototype.resetIsAnimating=function(t){void 0===t&&(t=0),this.isAnimating.clear(),t<this.getHighestPriority()&&this.checkOverrideIsAnimating(t),this.children&&this.children.forEach((function(e){return e.resetIsAnimating(t)}))},t.prototype.stop=function(){this.values.forEach((function(t){return t.stop()}))},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t),this.overrides.forEach((function(e,n){e&&t.setOverride(e,n)}))},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}();var rr=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return t.prototype.setVariants=function(t){this.variants=t,this.componentControls.forEach((function(e){return e.setVariants(t)}))},t.prototype.setDefaultTransition=function(t){this.defaultTransition=t,this.componentControls.forEach((function(e){return e.setDefaultTransition(t)}))},t.prototype.subscribe=function(t){var e=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return e.componentControls.delete(t)}},t.prototype.start=function(t,e){var n=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(n){var i=n.start(t,{transitionOverride:e});r.push(i)})),Promise.all(r)}return new Promise((function(r){n.pendingAnimations.push({animation:[t,e],resolve:r})}))},t.prototype.set=function(t){return this.hasMounted,this.componentControls.forEach((function(e){return e.apply(t)}))},t.prototype.stop=function(){this.componentControls.forEach((function(t){return t.stop()}))},t.prototype.mount=function(){var t=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(e){var n=e.animation,r=e.resolve;return t.start.apply(t,n).then(r)}))},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),ir=Object(o.createContext)(null),or=Object(o.createContext)({static:!1}),ar=function(t){return"string"===typeof t||Array.isArray(t)},sr=function(t){return t instanceof rr},ur=function(t,e,n,r,i){void 0===r&&(r=!1);var a,s,u=i.initial,l=i.animate,c=i.variants,f=i.whileTap,h=i.whileHover,p=Object(o.useContext)(ir);void 0!==(null===(a=p)||void 0===a?void 0:a.initial)&&(u=p.initial),!1!==u||sr(l)?"boolean"!==typeof u&&(s=u):s=l;var d=Object(o.useRef)(!1),m=c||ar(l)||ar(f)||ar(h)||sr(l),g=ar(s)?s:t.initial,y=ar(l)?l:t.animate,v=r?g:null,b=m&&ar(y)?y:null,_=Object(o.useMemo)((function(){return{controls:m?e:t.controls,initial:g,animate:y,values:n,hasMounted:d,isReducedMotion:t.isReducedMotion}}),[v,b,t.isReducedMotion]);return _.static=r,function(t,e){void 0===e&&(e=!1);var n=Object(o.useRef)(!0);(!e||e&&n.current)&&t(),n.current=!1}((function(){var n=s||t.initial;n&&e.apply(n)}),!r),Object(o.useEffect)((function(){d.current=!0}),[]),_};function lr(t,e,n){var r=e.variants,a=e.transition,s=Object(o.useContext)(or).controls,u=Object(o.useContext)(ir),l=yn((function(){return new nr(t)}));return u&&!u.isPresent||(l.resetChildren(),l.setProps(e),l.setVariants(r),l.setDefaultTransition(a)),Object(o.useEffect)((function(){n&&s&&s.addChild(l)})),Object(o.useEffect)((function(){return function(){e.onAnimationComplete;var t=Object(i.c)(e,["onAnimationComplete"]);l.setProps(t),s&&s.removeChild(l)}}),[]),l}var cr=function(t){var e=t.animate,n=t.variants,r=t.inherit;return(void 0===r||r)&&!!n&&(!e||e instanceof rr)};var fr=function(t){var e=t.getValueControlsConfig,n=t.loadFunctionalityComponents,r=t.renderComponent;return Object(o.forwardRef)((function(t,i){var a=function(t){var e=t&&"function"!==typeof t?t:Object(o.useRef)(null);return t&&"function"===typeof t&&Object(o.useEffect)((function(){return t(e.current),function(){return t(null)}}),[]),e}(i),s=Object(o.useContext)(or),u=s.static||t.static||!1,l=xn(t),c=function(t,e,n,r){void 0===e&&(e={});var i={},a=Object(o.useRef)({}).current;for(var s in e){var u=e[s];bn(u)?t.set(s,u):n||!he(s)&&!Ln(s)?i[s]=u:(t.has(s)?u!==a[s]&&t.get(s).set(u):t.set(s,gn(u)),a[s]=u)}return r?r(i):i}(l,t.style,u,t.transformValues),f=cr(t),h=lr(yn((function(){return e(a,l)})),t,f),p=ur(s,h,l,u,t),d=u?null:n(a,l,t,s,h,f),m=r(a,c,l,t,u);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(or.Provider,{value:p},m),Object(o.createElement)(o.Fragment,null,Object(o.createElement)(Tn,{innerRef:a,values:l,isStatic:u}),d))}))},hr=["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],pr=Object(o.createContext)({transformPagePoint:function(t){return t}});function dr(t){return Object(o.useEffect)((function(){return function(){return t()}}),[])}function mr(t,e,n,r){if(n)return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function gr(t){return"undefined"!==typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function yr(t){return!!t.touches}var vr={pageX:0,pageY:0};function br(t){var e=t.pageX,n=void 0===e?0:e,r=t.pageY;return{x:n,y:void 0===r?0:r}}function _r(t){return{point:yr(t)?(e=t,n=e.touches[0]||e.changedTouches[0]||vr,{x:n.pageX,y:n.pageY}):br(t)};var e,n}var Ar,wr=function(t,e){if(void 0===e&&(e=!1),t){var n=function(e){return t(e,_r(e))};return e?function(t){if(t)return function(e){var n=e instanceof MouseEvent;(!n||n&&0===e.button)&&t(e)}}(n):n}},xr="undefined"!==typeof window,Er={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Or={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Sr(t){return xr&&null===window.onpointerdown?t:xr&&null===window.ontouchstart?Or[t]:xr&&null===window.onmousedown?Er[t]:t}function Pr(t,e,n,r){return mr(t,Sr(e),wr(n,"pointerdown"===e),r)}function Cr(t,e,n,r){return function(t,e,n,r){Object(o.useEffect)((function(){var i=t.current;if(n&&i)return mr(i,e,n,r)}),[t,e,n,r])}(t,Sr(e),wr(n,"pointerdown"===e),r)}!function(t){t.subtract=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.relativeTo=function(t){var e;return function(n){var r=n.x,i=n.y,o=void 0!==e?e:e="string"===typeof t?document.getElementById(t):t;if(o){var a=o.getBoundingClientRect();return{x:r-a.left-window.scrollX,y:i-a.top-window.scrollY}}}}}(Ar||(Ar={}));var Tr=!1;"undefined"!==typeof window&&document.addEventListener("touchmove",(function(t){Tr&&t.preventDefault()}),{passive:!1});var kr=function(){return Tr=!1},Ir=function(){function t(t,e,n){var r=this,o=(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=jr(r.lastMoveEventInfo,r.history),e=null!==r.startEvent,n=Mt(t.offset,{x:0,y:0})>=3;if(e||n){var o=t.point,a=A().timestamp;r.history.push(Object(i.a)(Object(i.a)({},o),{timestamp:a}));var s=r.handlers,u=s.onStart,l=s.onMove;e||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,t)}}},!(yr(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=o;var a=Lr(_r(t),this.transformPagePoint),s=a.point,u=A().timestamp;this.history=[Object(i.a)(Object(i.a)({},s),{timestamp:u})];var l=e.onSessionStart;l&&l(t,jr(a,this.history));var c=Pr(window,"pointermove",(function(t,e){return r.handlePointerMove(t,e)})),f=Pr(window,"pointerup",(function(t,e){return r.handlePointerUp(t,e)}));this.removeListeners=function(){c&&c(),f&&f()}}}return t.prototype.handlePointerMove=function(t,e){this.lastMoveEvent=t,this.lastMoveEventInfo=Lr(e,this.transformPagePoint),gr(t)&&0===t.buttons?this.handlePointerUp(t,e):w.update(this.updatePoint,!0)},t.prototype.handlePointerUp=function(t,e){this.end();var n=this.handlers.onEnd;if(n){var r=jr(Lr(e,this.transformPagePoint),this.history);n&&n(t,r)}},t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),y.update(this.updatePoint),kr()},t}();function Lr(t,e){return e?{point:e(t.point)}:t}function jr(t,e){var n=t.point;return{point:n,delta:Ar.subtract(n,Rr(e)),offset:Ar.subtract(n,Mr(e)),velocity:Nr(e,.1)}}function Mr(t){return t[0]}function Rr(t){return t[t.length-1]}function Nr(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,i=Rr(t);n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Kn(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 a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}var Dr=function(t,e){return!!e&&(t===e||Dr(t,e.parentElement))},Fr=["whileHover","whileTap","whileDrag"],Br=function(t){return Fr.indexOf(t)+1};function zr(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Ur=zr("dragHorizontal"),Gr=zr("dragVertical");function Vr(t){var e=!1;if("y"===t)e=Gr();else if("x"===t)e=Ur();else{var n=Ur(),r=Gr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}var qr=Br("whileTap");var Hr=Br("whileHover"),Wr=function(t){return function(e,n){gr(e)&&t(e,n)}};function Xr(t,e){!function(t,e){var n=t.onPan,r=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,s=n||r||i||a,u=Object(o.useRef)(null),l=Object(o.useContext)(pr).transformPagePoint,c={onSessionStart:a,onStart:r,onMove:n,onEnd:function(t,e){u.current=null,i&&i(t,e)}};Object(o.useEffect)((function(){null!==u.current&&u.current.updateHandlers(c)})),Cr(e,"pointerdown",s&&function(t){u.current=new Ir(t,c,{transformPagePoint:l})}),dr((function(){return u.current&&u.current.end()}))}(t,e),function(t,e){var n=t.onTap,r=t.onTapStart,i=t.onTapCancel,a=t.whileTap,s=t.controls,u=n||r||i||a,l=Object(o.useRef)(!1),c=Object(o.useRef)(null);function f(){c.current&&c.current(),c.current=null}a&&s&&s.setOverride(a,qr);var h=Object(o.useRef)(null);h.current=function(t,r){var o=e.current;if(f(),l.current&&o){l.current=!1,s&&a&&s.clearOverride(qr);var u=Vr(!0);u&&(u(),Dr(o,t.target)?n&&n(t,r):i&&i(t,r))}},Cr(e,"pointerdown",u?function(t,n){f(),c.current=Pr(window,"pointerup",(function(t,e){return h.current(t,e)})),e.current&&!l.current&&(l.current=!0,r&&r(t,n),s&&a&&s.startOverride(qr))}:void 0),dr(f)}(t,e),function(t,e){var n=t.whileHover,r=t.onHoverStart,i=t.onHoverEnd,o=t.controls;n&&o&&o.setOverride(n,Hr),Cr(e,"pointerenter",Wr((function(t,e){r&&r(t,e),n&&o&&o.startOverride(Hr)}))),Cr(e,"pointerleave",Wr((function(t,e){i&&i(t,e),n&&o&&o.clearOverride(Hr)})))}(t,e)}var Yr=function(t){return function(e){return t(e),null}},Zr=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Kr={key:"gestures",shouldRender:function(t){return Zr.some((function(e){return t.hasOwnProperty(e)}))},Component:Yr((function(t){var e=t.innerRef;Xr(Object(i.c)(t,["innerRef"]),e)}))},$r=function(t){return"object"===typeof t&&t.hasOwnProperty("current")},Jr=function(t){return t},Qr=function(){function t(t){var e=t.ref,n=t.values,r=t.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Jr},this.point={},this.origin={x:gn(0),y:gn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=e,this.values=n,this.controls=r}return t.prototype.start=function(t,e){var n=this,r=(void 0===e?{}:e).snapToCursor;void 0!==r&&r&&this.snapToCursor(t);var i=this.props.transformPagePoint;this.panSession=new Ir(t,{onSessionStart:function(){Tr=!0,ti((function(t){var e=n.point[t];e&&e.stop()}))},onStart:function(t,e){if(n.constraintsNeedResolution){var r=n.props,i=r.dragConstraints,o=r.transformPagePoint;n.constraints=ii(i,n.ref,n.point,o),n.applyConstraintsToPoint()}ti((function(t){var e=n.point[t];e&&n.origin[t].set(e.get())}));var a=n.props,s=a.drag,u=a.dragPropagation;if(!s||u||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Vr(s),n.openGlobalLock)){n.isDragging=!0,n.currentDirection=null;var l=n.props.onDragStart;l&&l(t,ei(e,n.point))}},onMove:function(t,e){var r=n.props,i=r.dragPropagation,o=r.dragDirectionLock;if(i||n.openGlobalLock){var a=e.offset;if(o&&null===n.currentDirection){if(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}(a),null!==n.currentDirection){var s=n.props.onDirectionLock;s&&s(n.currentDirection)}}else{n.updatePoint("x",a),n.updatePoint("y",a);var u=n.props.onDrag;u&&u(t,ei(e,n.point))}}},onEnd:function(t,e){n.stop(t,e)}},{transformPagePoint:i})},t.prototype.cancelDrag=function(){kr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},t.prototype.stop=function(t,e){var n;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var i=this.props,o=i.dragMomentum,a=i.dragElastic,s=i.onDragEnd;if(o||a){var u=e.velocity;this.animateDragEnd(u)}else this.recordBoxInfo(this.constraints);s&&s(t,ei(e,this.point))}},t.prototype.recordBoxInfo=function(t){if(t){var e=t.right,n=t.left,r=t.bottom,i=t.top;this.prevConstraintsBox.width=(e||0)-(n||0),this.prevConstraintsBox.height=(r||0)-(i||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},t.prototype.snapToCursor=function(t){var e=this,n=this.props.transformPagePoint,r=_r(t).point,i=oi(this.ref,n),o=i.width/2+i.left+window.scrollX,a=i.height/2+i.top+window.scrollY,s={x:r.x-o,y:r.y-a};ti((function(t){var n=e.point[t];n&&e.origin[t].set(n.get())})),this.updatePoint("x",s),this.updatePoint("y",s)},t.prototype.setPoint=function(t,e){this.point[t]=e},t.prototype.updatePoint=function(t,e){var n=this.props,r=n.drag,i=n.dragElastic,o=this.point[t];if(ri(t,r,this.currentDirection)&&o){var a=si(t,this.origin[t].get()+e[t],this.constraints,i);o.set(a)}},t.prototype.updateProps=function(t){var e=this,n=t.drag,r=void 0!==n&&n,o=t.dragDirectionLock,a=void 0!==o&&o,s=t.dragPropagation,u=void 0!==s&&s,l=t.dragConstraints,c=void 0!==l&&l,f=t.dragElastic,h=void 0===f||f,p=t.dragMomentum,d=void 0===p||p,m=Object(i.c)(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(i.a)({drag:r,dragDirectionLock:a,dragPropagation:u,dragConstraints:c,dragElastic:h,dragMomentum:d},m);var g=m._dragValueX,y=m._dragValueY,v=m.dragOriginX,b=m.dragOriginY;v&&(this.origin.x=v),b&&(this.origin.y=b),ti((function(t){if(ri(t,r,e.currentDirection)){var n="x"===t?g:y;e.setPoint(t,n||e.values.get(t,0))}})),this.constraintsNeedResolution=$r(c),this.constraints=this.constraintsNeedResolution?this.constraints||!1:c},t.prototype.applyConstraintsToPoint=function(t){var e=this;return void 0===t&&(t=this.constraints),ti((function(n){var r=e.point[n];r&&!r.isAnimating()&&si(n,r,t,0)}))},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,r=n.drag,o=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,u=n._dragValueX,l=n._dragValueY,c=n._dragTransitionControls,f=ti((function(n){var f;if(ri(n,r,e.currentDirection)){var h=e.constraints?ni(n,e.constraints):{},p=a?200:1e6,d=a?40:1e7,m=c||e.controls,g=Object(i.a)(Object(i.a)({type:"inertia",velocity:o?t[n]:0,bounceStiffness:p,bounceDamping:d,timeConstant:750,restDelta:1},s),h),y="x"===n?u:l;return y?er(n,y,0,g):m.start(((f={})[n]=0,f.transition=g,f))}}));return Promise.all(f).then((function(){e.recordBoxInfo(e.constraints),e.scalePoint();var t=e.props.onDragTransitionEnd;t&&t()}))},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.dragConstraints,r=e.transformPagePoint;if($r(n)){var i=oi(n,r),o=oi(this.ref,r),a=function(e,n){var r=t.point[e];if(r){if(r.isAnimating())return r.stop(),void t.recordBoxInfo();var a=t.prevConstraintsBox[n]?(i[n]-o[n])/t.prevConstraintsBox[n]:1;r.set(t.prevConstraintsBox[e]*a)}};a("x","width"),a("y","height")}},t.prototype.mount=function(t){var e=this,n=Pr(t,"pointerdown",(function(t){var n=e.props,r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&e.start(t)})),r=mr(window,"resize",(function(){return e.scalePoint()}));if(this.constraintsNeedResolution){var i=this.props,o=i.dragConstraints,a=i.transformPagePoint,s=ii(o,this.ref,this.point,a);this.applyConstraintsToPoint(s),this.recordBoxInfo(s)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),r&&r(),e.cancelDrag()}},t}();function ti(t){return[t("x"),t("y")]}function ei(t,e){return Object(i.a)(Object(i.a)({},t),{point:{x:e.x?e.x.get():0,y:e.y?e.y.get():0}})}function ni(t,e){var n=e.top,r=e.right,i=e.bottom,o=e.left;return"x"===t?{min:o,max:r}:{min:n,max:i}}function ri(t,e,n){return(!0===e||e===t)&&(null===n||n===t)}function ii(t,e,n,r){null!==t.current&&e.current;var i=oi(t,r),o=oi(e,r),a=i.left-o.left+ai(n.x),s=i.top-o.top+ai(n.y);return{top:s,left:a,right:i.width-o.width+a,bottom:i.height-o.height+s}}function oi(t,e){var n=t.current.getBoundingClientRect(),r=e({x:n.left,y:n.top}),i=r.x,o=r.y,a=e({x:n.width,y:n.height});return{left:i,top:o,width:a.x,height:a.y}}function ai(t){return t?t.get():0}function si(t,e,n,r){var i=e instanceof mn?e.get():e;if(!n)return i;var o=ni(t,n),a=o.min,s=o.max;return void 0!==a&&i<a?i=r?ui(a,i,r):Math.max(a,i):void 0!==s&&i>s&&(i=r?ui(s,i,r):Math.min(s,i)),e instanceof mn&&e.set(i),i}function ui(t,e,n){return Nt(t,e,"number"===typeof n?n:.35)}var li={key:"drag",shouldRender:function(t){return!!t.drag},Component:Yr((function(t){var e=t.innerRef,n=t.values,r=t.controls;return function(t,e,n,r){var a=t.dragControls,s=Object(o.useContext)(pr).transformPagePoint,u=yn((function(){return new Qr({ref:e,values:n,controls:r})}));u.updateProps(Object(i.a)(Object(i.a)({},t),{transformPagePoint:s})),Object(o.useEffect)((function(){return a&&a.subscribe(u)}),[u]),Object(o.useEffect)((function(){return u.mount(e.current)}),[])}(Object(i.c)(t,["innerRef","values","controls"]),e,n,r)}))};function ci(t){return"string"===typeof t&&t.startsWith("var(--")}var fi=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function hi(t,e,n){void 0===n&&(n=1);var r=function(t){var e=fi.exec(t);return e?[e[1],e[2]]:[,]}(t),i=r[0],o=r[1];if(i){var a=window.getComputedStyle(e).getPropertyValue(i);return a||(ci(o)?hi(o,e,n+1):o)}}var pi,di=new Set(["width","height","top","left","right","bottom","x","y"]),mi=function(t){return di.has(t)},gi=function(t,e){t.set(e,!1),t.set(e)},yi=function(t){return t===C||t===M};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(pi||(pi={}));var vi=function(t,e){return parseFloat(t.split(", ")[e])},bi=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 vi(o[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?vi(a[1],t):0}},_i=new Set(["x","y","z"]),Ai=ce.filter((function(t){return!_i.has(t)}));var wi={width:function(t){return t.width},height:function(t){return t.height},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.height,r=e.top;return parseFloat(r)+n},right:function(t,e){var n=t.width,r=e.left;return parseFloat(r)+n},x:bi(4,13),y:bi(5,14)},xi=function(t,e,n,r){void 0===r&&(r={}),n=Object(i.a)({},n),r=Object(i.a)({},r);var o=e.current,a=ze(o),s=Object.keys(n).filter(mi),u=[],l=!1,c=s.reduce((function(e,i){var o=t.get(i);if(!o)return e;var s,c=o.get(),f=n[i],h=Bn(c);if(Mn(f))for(var p=f.length,d=null===f[0]?1:0;d<p;d++)s?Bn(f[d]):(s=Bn(f[d]))===h||yi(h)&&yi(s);else s=Bn(f);if(h!==s)if(yi(h)&&yi(s)){var m=o.get();"string"===typeof m&&o.set(parseFloat(m)),"string"===typeof f?n[i]=parseFloat(f):Array.isArray(f)&&s===M&&(n[i]=f.map(parseFloat))}else l||(u=function(t,e){var n=[];return Ai.forEach((function(e){var r=t.get(e);void 0!==r&&(n.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))})),n.length&&e.render(),n}(t,a),l=!0),e.push(i),r[i]=void 0!==r[i]?r[i]:n[i],gi(o,f);return e}),[]);if(c.length){var f=function(t,e,n,r,i){var o=n.getBoundingClientRect(),a=getComputedStyle(n),s=a.display,u={top:a.top,left:a.left,bottom:a.bottom,right:a.right,transform:a.transform};"none"===s&&r.set("display",t.display||"block"),r.render();var l=n.getBoundingClientRect();return i.forEach((function(n){var r=e.get(n);gi(r,wi[n](o,u)),t[n]=wi[n](l,a)})),t}(n,t,o,a,c);return u.length&&u.forEach((function(e){var n=e[0],r=e[1];t.get(n).set(r)})),a.render(),{target:f,transitionEnd:r}}return{target:n,transitionEnd:r}};function Ei(t,e,n,r){return function(t){return Object.keys(t).some(mi)}(n)?xi(t,e,n,r):{target:n,transitionEnd:r}}var Oi=function(t,e){return function(n,r){var o=function(t,e,n,r){var o=Object(i.c)(n,[]),a=e.current;if(!(a instanceof HTMLElement))return{target:o,transitionEnd:r};for(var s in r&&(r=Object(i.a)({},r)),t.forEach((function(t){var e=t.get();if(ci(e)){var n=hi(e,a);n&&t.set(n)}})),o){var u=o[s];if(ci(u)){var l=hi(u,a);l&&(o[s]=l,r&&void 0===r[s]&&(r[s]=u))}}return{target:o,transitionEnd:r}}(t,e,n,r);return n=o.target,r=o.transitionEnd,Ei(t,e,n,r)}};function Si(){var t=Object(o.useState)(0),e=t[0],n=t[1];return Object(o.useCallback)((function(){return n(e+1)}),[e])}var Pi,Ci,Ti=Object(o.createContext)(null);!function(t){t.Prepare="prepare",t.Read="read",t.Render="render"}(Ci||(Ci={}));var ki=[Ci.Prepare,Ci.Read,Ci.Render].reduce((function(t,e){return t[e]=[],t}),{}),Ii=!1;function Li(t){for(var e=t.length,n=0;n<e;n++)t[n]();t.length=0}var ji=function(t){return function(e){e&&(Ii=!0,ki[t].push(e))}},Mi=((Pi={})[Ci.Prepare]=ji(Ci.Prepare),Pi[Ci.Read]=ji(Ci.Read),Pi[Ci.Render]=ji(Ci.Render),Pi.flush=function(){Ii&&(Li(ki.prepare),Li(ki.read),Li(ki.render),Ii=!1)},Pi);var Ri={duration:.8,ease:[.45,.05,.19,1]},Ni={type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10};var Di={id:"x",size:"width",min:"left",max:"right",origin:"originX"},Fi={id:"y",size:"height",min:"top",max:"bottom",origin:"originY"};function Bi(t,e){return(t+e)/2}function zi(t,e,n){var r,i=t[n.size]-e[n.size],o=.5;return i&&(t[n.min]===e[n.min]?o=0:t[n.max]===e[n.max]&&(o=1)),(r={})[n.size]=i,r[n.origin]=o,r[n.id]=.5===o?Bi(t[n.min],t[n.max])-Bi(e[n.min],e[n.max]):0,r}var Ui={getLayout:function(t){return t.offset},measure:function(t){var e=t.offsetLeft,n=t.offsetTop,r=t.offsetWidth,i=t.offsetHeight;return{left:e,top:n,right:e+r,bottom:n+i,width:r,height:i}}},Gi={getLayout:function(t){return t.boundingBox},measure:function(t){var e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:e.width,height:e.height,right:e.right,bottom:e.bottom}}};function Vi(t){return window.getComputedStyle(t).position}function qi(t){return"width"===t||"height"===t}var Hi,Wi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.b)(e,t),e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.innerRef,n=t.positionTransition,r=t.values,o=t.controls,a=e.current;if(function(t){return t instanceof HTMLElement}(a)){var s,u,l,c=function(t){var e=t.layoutTransition,n=t.positionTransition;return e||n}(this.props),f=!!n,h=Vi(a),p={offset:Ui.measure(a),boundingBox:Gi.measure(a)};return Mi.prepare((function(){s=a.style.transform,a.style.transform=""})),Mi.read((function(){u={offset:Ui.measure(a),boundingBox:Gi.measure(a)};var t=Vi(a);l=function(t,e,n){return n&&t===e?Ui:Gi}(h,t,f)})),Mi.render((function(){var t=function(t,e){return Object(i.a)(Object(i.a)({},zi(t,e,Di)),zi(t,e,Fi))}(l.getLayout(p),l.getLayout(u));if(t.x||t.y||t.width||t.height){ze(a).set({originX:t.originX,originY:t.originY}),Sn();var e={},n={},h=function(t){return"function"===typeof t}(c)?c({delta:t}):c;d("left","x",0,t.x),d("top","y",0,t.y),f||(d("width","scaleX",1,p.boundingBox.width/u.boundingBox.width),d("height","scaleY",1,p.boundingBox.height/u.boundingBox.height)),e.transition=n,h&&o.start(e),Pn()}else s&&(a.style.transform=s);function d(o,a,s,u){var c=qi(o)?o:a;if(t[c]){var p="boolean"===typeof h?Object(i.a)({},function(t){return t?Ni:Ri}(f)):h,d=r.get(a,s),m=d.getVelocity();n[a]=p[a]?Object(i.a)({},p[a]):Object(i.a)({},p),void 0===n[a].velocity&&(n[a].velocity=m||0),e[a]=s;var g=qi(o)||l!==Ui?0:d.get();d.set(u+g)}}})),null}},e.prototype.componentDidUpdate=function(){Mi.flush()},e.prototype.render=function(){return null},e.contextType=Ti,e}(o.Component),Xi={key:"layout",shouldRender:function(t){var e=t.positionTransition,n=t.layoutTransition;return"undefined"!==typeof window&&!(!e&&!n)},Component:Wi},Yi=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","positionTransition","layoutTransition","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","_dragValueX","_dragValueY","_dragTransitionControls","dragOriginX","dragOriginY","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function Zi(t){return Yi.has(t)}!function(t){t.Target="Target",t.VariantLabel="VariantLabel",t.AnimationSubscription="AnimationSubscription"}(Hi||(Hi={}));function Ki(t,e){void 0===e&&(e=!1);t.transition;var n=t.transitionEnd,r=Object(i.c)(t,["transition","transitionEnd"]);return e?Object(i.a)(Object(i.a)({},r),n):r}var $i,Ji,Qi=function(t){var e,n=t instanceof mn?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))};var to=(($i={})[Hi.Target]=Yr((function(t){return function(t,e,n,r){var a=Object(o.useRef)(!0),s=Object(o.useRef)(null);s.current||(s.current=Ki(t,!0)),Object(o.useEffect)((function(){var o,u,l={},c=Ki(t),f=Ki(t,!0);for(var h in c){var p=a.current&&(!n.has(h)||n.get(h).get()!==f[h]),d=null!==f[h],m=(o=s.current[h],void 0!==(u=f[h])&&(Array.isArray(o)&&Array.isArray(u)?!function(t,e){if(null===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}(u,o):o!==u));d&&(m||p)&&(l[h]=c[h])}a.current=!1,s.current=Object(i.a)(Object(i.a)({},s.current),f),Object.keys(l).length&&e.start(Object(i.a)(Object(i.a)({},l),{transition:t.transition||r,transitionEnd:t.transitionEnd}))}),[t])}(t.animate,t.controls,t.values,t.transition)})),$i[Hi.VariantLabel]=Yr((function(t){var e=t.animate,n=t.inherit,r=void 0===n||n,i=t.controls;return function(t,e,n,r){var i=Qi(e),a=Object(o.useContext)(or),s=a.hasMounted&&a.hasMounted.current,u=Object(o.useRef)(!1);Object(o.useEffect)((function(){var e,o,l=!1;n?(l=!!s,i=Qi(a.animate)):l=u.current||(e=Qi(t),o=i,e.join(",")!==o.join(",")),l&&r.start(i),u.current=!0}),[i.join(",")])}(t.initial,e,r,i)})),$i[Hi.AnimationSubscription]=Yr((function(t){return function(t,e){var n=Object(o.useMemo)((function(){return t.subscribe(e)}),[t]);Object(o.useEffect)((function(){return function(){n&&n()}}),[n])}(t.animate,t.controls)})),$i),eo=function(t){return t.animate instanceof rr},no=["initial","animate","whileTap","whileHover"],ro=((Ji={})[Hi.Target]=function(t){return void 0!==t.animate&&(e=t.animate,!(Array.isArray(e)||"string"===typeof e))&&!eo(t);var e},Ji[Hi.VariantLabel]=function(t){return void 0!==t.variants||no.some((function(e){return"string"===typeof t[e]}))},Ji[Hi.AnimationSubscription]=eo,Ji);var io={key:"exit",shouldRender:function(t){return!!t.exit&&!cr(t)},Component:Yr((function(t){var e,n=t.animate,r=t.controls,a=t.exit,s=function(){var t=Object(o.useContext)(ir);if(null===t)return[!0];var e=t.isPresent,n=t.onExitComplete,r=t.register;return Object(o.useEffect)(r,[]),!e&&n?[!1,n]:[!0]}(),u=s[0],l=s[1],c=Object(o.useContext)(ir),f=Object(o.useRef)(!1),h=void 0!==(null===(e=c)||void 0===e?void 0:e.custom)?c.custom:t.custom;Object(o.useEffect)((function(){u?!f.current||!n||n instanceof rr||r.start(n):(!f.current&&a&&(r.setProps(Object(i.a)(Object(i.a)({},t),{custom:h})),r.start(a).then(l)),f.current=!0),u&&(f.current=!1)}),[u])}))},oo=function(t){return!Zi(t)};try{var ao=n(383).default;oo=function(t){return t.startsWith("on")?!Zi(t):ao(t)}}catch(wo){}var so=[Xi,li,Kr,io],uo=so.length;function lo(t){var e="string"===typeof t,n=e&&-1!==hr.indexOf(t);return{renderComponent:function(r,a,s,u,l){var c=e?function(t){var e={};for(var n in t)oo(n)&&(e[n]=t[n]);return e}(u):u,f=n?function(t,e){var n=Me(kn(t),void 0,void 0,void 0,void 0,!1);return n.style=Object(i.a)(Object(i.a)({},e),n.style),n}(s,a):function(t,e,n,r){var i={style:jn(t,e,n)};return r&&(i.style.userSelect="none",i.draggable=!1),i}(s,a,l,!!u.drag);return Object(o.createElement)(t,Object(i.a)(Object(i.a)(Object(i.a)({},c),{ref:r}),f))},loadFunctionalityComponents:function(t,e,n,r,a,s){var u=[],l=function(t){var e=void 0;for(var n in Hi)ro[n](t)&&(e=n);return e?to[e]:void 0}(n);l&&u.push(Object(o.createElement)(l,{key:"animation",initial:n.initial,animate:n.animate,variants:n.variants,transition:n.transition,controls:a,inherit:s,values:e}));for(var c=0;c<uo;c++){var f=so[c],h=f.shouldRender,p=f.key,d=f.Component;h(n,r)&&u.push(Object(o.createElement)(d,Object(i.a)({key:p},n,{parentContext:r,values:e,controls:a,innerRef:t})))}return u},getValueControlsConfig:function(t,e){return{values:e,readValueFromSource:function(e){return ze(t.current).get(e)},makeTargetAnimatable:Oi(e,t)}}}}var co=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","webview"].reduce((function(t,e){var n=lo(e);return t[e]=fr(n),t}),{}),fo=hr.reduce((function(t,e){return t[e]=fr(lo(e)),t}),{}),ho=Object(i.a)(Object(i.a)({custom:function(t){return fr(lo(t))}},co),fo);function po(){return{scrollX:gn(0),scrollY:gn(0),scrollXProgress:gn(0),scrollYProgress:gn(0)}}"undefined"!==typeof window?o.useLayoutEffect:o.useEffect;po();function mo(){var t=yn((function(){return new rr}));return Object(o.useEffect)((function(){return t.mount(),function(){return t.unmount()}}),[]),t}!function(){function t(){this.componentControls=new Set}t.prototype.subscribe=function(t){var e=this;return this.componentControls.add(t),function(){return e.componentControls.delete(t)}},t.prototype.start=function(t,e){this.componentControls.forEach((function(n){n.start(t.nativeEvent||t,e)}))}}();var go=function(t){var e=t.children,n=t.initial,r=t.isPresent,a=t.onExitComplete,s=t.custom,u=Object(o.useRef)(0),l=Object(o.useRef)(0),c={initial:n,isPresent:r,custom:s,onExitComplete:function(){l.current++;var t=l.current>=u.current;a&&t&&a()}},f=Object(o.useMemo)((function(){return l.current=0,function(){return u.current++,function(){return u.current--}}}),[r]);return Object(o.createElement)(ir.Provider,{value:Object(i.a)(Object(i.a)({},c),{register:f})},e)};function yo(t){return t.key||""}var vo=function(t){var e=t.children,n=t.custom,r=t.initial,a=void 0===r||r,s=t.onExitComplete,u=t.exitBeforeEnter,l=Si(),c=Object(o.useContext)(Ti)||l,f=Object(o.useRef)(!0),h=function(t){var e=[];return o.Children.forEach(t,(function(t){Object(o.isValidElement)(t)&&e.push(t)})),e}(e),p=Object(o.useRef)(h),d=Object(o.useRef)(new Map).current,m=Object(o.useRef)(new Set).current;if(function(t,e){t.forEach((function(t){var n=yo(t);e.set(n,t)}))}(h,d),f.current)return f.current=!1,Object(o.createElement)(o.Fragment,null,h.map((function(t){return Object(o.createElement)(go,{key:yo(t),isPresent:!0,initial:!!a&&void 0},t)})));for(var g=Object(i.d)(h),y=p.current.map(yo),v=h.map(yo),b=y.length,_=0;_<b;_++){var A=y[_];-1===v.indexOf(A)?m.add(A):m.delete(A)}return u&&m.size&&(g=[]),m.forEach((function(t){if(-1===v.indexOf(t)){var e=d.get(t);if(e){var r=y.indexOf(t);g.splice(r,0,Object(o.createElement)(go,{key:yo(e),isPresent:!1,onExitComplete:function(){m.delete(t);var e=p.current.findIndex((function(e){return e.key===t}));p.current.splice(e,1),m.size||(p.current=h,c(),s&&s())},custom:n},e))}}})),g=g.map((function(t){var e=t.key;return m.has(e)?t:Object(o.createElement)(go,{key:yo(t),isPresent:!0},t)})),p.current=g,Object(o.createElement)(o.Fragment,null,m.size?g:g.map((function(t){return Object(o.cloneElement)(t)})))},bo=gn(null);if("undefined"!==typeof window)if(window.matchMedia){var _o=window.matchMedia("(prefers-reduced-motion)"),Ao=function(){return bo.set(_o.matches)};_o.addListener(Ao),Ao()}else bo.set(!1)},function(t,e,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s}));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=Symbol.for("component"),o=Symbol.for("asyncPropDefaults"),a=Symbol.for("asyncPropOriginal"),s=Symbol.for("asyncPropResolved")},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n(284);var r=n(590),i={theme:r.a}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"g",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"l",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"k",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"m",(function(){return f})),n.d(e,"j",(function(){return h})),n.d(e,"d",(function(){return p})),n.d(e,"i",(function(){return d})),n.d(e,"n",(function(){return m})),n.d(e,"o",(function(){return g})),n.d(e,"f",(function(){return y})),n.d(e,"e",(function(){return v}));var r=n(9);function i(t){var e=new r.a(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.a(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function s(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 l(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 c(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function f(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function h(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function d(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function m(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function g(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],l=n[3],c=l*r+s*o-u*i,f=l*i+u*r-a*o,h=l*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=c*l+p*-a+f*-u-h*-s,t[1]=f*l+p*-s+h*-a-c*-u,t[2]=h*l+p*-u+c*-s-f*-a,t[3]=e[3],t}function y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function v(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=e[0],u=e[1],l=e[2],c=e[3];return Math.abs(n-s)<=r.b*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=r.b*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-l)<=r.b*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(a-c)<=r.b*Math.max(1,Math.abs(a),Math.abs(c))}var b,_;b=new r.a(4),r.a!=Float32Array&&(b[0]=0,b[1]=0,b[2]=0,b[3]=0),_=b},function(t,e,n){"use strict";n.r(e),n.d(e,"earthRadius",(function(){return r})),n.d(e,"factors",(function(){return i})),n.d(e,"unitsFactors",(function(){return o})),n.d(e,"areaFactors",(function(){return a})),n.d(e,"feature",(function(){return s})),n.d(e,"geometry",(function(){return u})),n.d(e,"point",(function(){return l})),n.d(e,"points",(function(){return c})),n.d(e,"polygon",(function(){return f})),n.d(e,"polygons",(function(){return h})),n.d(e,"lineString",(function(){return p})),n.d(e,"lineStrings",(function(){return d})),n.d(e,"featureCollection",(function(){return m})),n.d(e,"multiLineString",(function(){return g})),n.d(e,"multiPoint",(function(){return y})),n.d(e,"multiPolygon",(function(){return v})),n.d(e,"geometryCollection",(function(){return b})),n.d(e,"round",(function(){return _})),n.d(e,"radiansToLength",(function(){return A})),n.d(e,"lengthToRadians",(function(){return w})),n.d(e,"lengthToDegrees",(function(){return x})),n.d(e,"bearingToAzimuth",(function(){return E})),n.d(e,"radiansToDegrees",(function(){return O})),n.d(e,"degreesToRadians",(function(){return S})),n.d(e,"convertLength",(function(){return P})),n.d(e,"convertArea",(function(){return C})),n.d(e,"isNumber",(function(){return T})),n.d(e,"isObject",(function(){return k})),n.d(e,"validateBBox",(function(){return I})),n.d(e,"validateId",(function(){return L}));var r=6371008.8,i={centimeters:100*r,centimetres:100*r,degrees:r/111325,feet:3.28084*r,inches:39.37*r,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:1e3*r,millimetres:1e3*r,nauticalmiles:r/1852,radians:1,yards:r/1.0936},o={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r,yards:1/1.0936},a={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function u(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return l(e).geometry;case"LineString":return p(e).geometry;case"Polygon":return f(e).geometry;case"MultiPoint":return y(e).geometry;case"MultiLineString":return g(e).geometry;case"MultiPolygon":return v(e).geometry;default:throw new Error(t+" is invalid")}}function l(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!T(t[0])||!T(t[1]))throw new Error("coordinates must contain numbers");return s({type:"Point",coordinates:t},e,n)}function c(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return l(t,e)})),n)}function f(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return s({type:"Polygon",coordinates:t},e,n)}function h(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return f(t,e)})),n)}function p(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return s({type:"LineString",coordinates:t},e,n)}function d(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return p(t,e)})),n)}function m(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function g(t,e,n){return void 0===n&&(n={}),s({type:"MultiLineString",coordinates:t},e,n)}function y(t,e,n){return void 0===n&&(n={}),s({type:"MultiPoint",coordinates:t},e,n)}function v(t,e,n){return void 0===n&&(n={}),s({type:"MultiPolygon",coordinates:t},e,n)}function b(t,e,n){return void 0===n&&(n={}),s({type:"GeometryCollection",geometries:t},e,n)}function _(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function A(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}function w(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function x(t,e){return O(w(t,e))}function E(t){var e=t%360;return e<0&&(e+=360),e}function O(t){return 180*(t%(2*Math.PI))/Math.PI}function S(t){return t%360*Math.PI/180}function P(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return A(w(t,e),n)}function C(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=a[e];if(!r)throw new Error("invalid original units");var i=a[n];if(!i)throw new Error("invalid final units");return t/r*i}function T(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function k(t){return!!t&&t.constructor===Object}function I(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!T(t))throw new Error("bbox must only contain numbers")}))}function L(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},function(t,e,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():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},r.apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r={};function i(t){var e=t&&t.lastIndexOf("/");return e>=0?t.substr(e+1):""}function o(t){var e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function a(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r="/";return(e=e.map((function(t,n){return n&&(t=t.replace(new RegExp("^".concat(r)),"")),n!==e.length-1&&(t=t.replace(new RegExp("".concat(r,"$")),"")),t}))).join(r)}n.r(r),n.d(r,"filename",(function(){return i})),n.d(r,"dirname",(function(){return o})),n.d(r,"join",(function(){return a}));n(289),n(490)},function(t,e,n){"use strict";n.r(e),n.d(e,"CacheProvider",(function(){return i.a})),n.d(e,"ThemeContext",(function(){return i.c})),n.d(e,"ThemeProvider",(function(){return i.e})),n.d(e,"__unsafe_useEmotionCache",(function(){return i.d})),n.d(e,"useTheme",(function(){return i.i})),n.d(e,"withEmotionCache",(function(){return i.j})),n.d(e,"withTheme",(function(){return i.f})),n.d(e,"ClassNames",(function(){return d})),n.d(e,"Global",(function(){return l})),n.d(e,"createElement",(function(){return u})),n.d(e,"css",(function(){return c})),n.d(e,"jsx",(function(){return u})),n.d(e,"keyframes",(function(){return f}));var r=n(0),i=(n(587),n(158)),o=(n(1449),n(393),n(179),n(414)),a=n(466);var s=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(r){0}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),u=function(t,e){var n=arguments;if(null==e||!i.h.call(e,"css"))return r.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=i.b,a[1]=Object(i.g)(t,e);for(var s=2;s<o;s++)a[s]=n[s];return r.createElement.apply(null,a)},l=Object(i.j)((function(t,e){var n=t.styles,u=Object(a.a)([n],void 0,Object(r.useContext)(i.c)),l=Object(r.useRef)();return Object(r.useLayoutEffect)((function(){var t=e.key+"-global",n=new s({key:t,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+t+" "+u.name+'"]');return e.sheet.tags.length&&(n.before=e.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",t),n.hydrate([i])),l.current=[n,r],function(){n.flush()}}),[e]),Object(r.useLayoutEffect)((function(){var t=l.current,n=t[0];if(t[1])t[1]=!1;else{if(void 0!==u.next&&Object(o.b)(e,u.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}e.insert("",u,n,!1)}}),[e,u.name]),null}));function c(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Object(a.a)(e)}var f=function(){var t=c.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},h=function t(e){for(var n=e.length,r=0,i="";r<n;r++){var o=e[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=t(o);else for(var s in a="",o)o[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=o}a&&(i&&(i+=" "),i+=a)}}return i};function p(t,e,n){var r=[],i=Object(o.a)(t,r,n);return r.length<2?n:i+e(r)}var d=Object(i.j)((function(t,e){var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Object(a.a)(n,e.registered);return Object(o.b)(e,i,!1),e.key+"-"+i.name},s={css:n,cx:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return p(e.registered,n,h(r))},theme:Object(r.useContext)(i.c)},u=t.children(s);return!0,u}))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(228);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Object(r.a)(i.key),i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}},function(t,e,n){"use strict";n.r(e),n.d(e,"ArcLayer",(function(){return r.a})),n.d(e,"BitmapLayer",(function(){return i.a})),n.d(e,"IconLayer",(function(){return o.a})),n.d(e,"LineLayer",(function(){return d})),n.d(e,"PointCloudLayer",(function(){return m.a})),n.d(e,"ScatterplotLayer",(function(){return g.a})),n.d(e,"ColumnLayer",(function(){return y.a})),n.d(e,"GridCellLayer",(function(){return b})),n.d(e,"PathLayer",(function(){return _.a})),n.d(e,"PolygonLayer",(function(){return A.a})),n.d(e,"GeoJsonLayer",(function(){return w.a})),n.d(e,"TextLayer",(function(){return x.a})),n.d(e,"SolidPolygonLayer",(function(){return E.a})),n.d(e,"_MultiIconLayer",(function(){return O.a})),n.d(e,"_TextBackgroundLayer",(function(){return S.a}));var r=n(529),i=n(363),o=n(146),a=n(1),s=n(357),u=n(491),l=n(492),c=n(15),f=n(366),h=n(130);const p={getSourcePosition:{type:"accessor",value:t=>t.sourcePosition},getTargetPosition:{type:"accessor",value:t=>t.targetPosition},getColor:{type:"accessor",value:[0,0,0,255]},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class d extends s.a{getShaders(){return super.getShaders({vs:"#define SHADER_NAME line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\n\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float useShortestPath;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n  // normalized direction of the line\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  // rotate by 90 degrees\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvec3 splitLine(vec3 a, vec3 b, float x) {\n  float t = (x - a.x) / (b.x - a.x);\n  return vec3(x, mix(a.yz, b.yz, t));\n}\n\nvoid main(void) {\n  geometry.worldPosition = instanceSourcePositions;\n  geometry.worldPositionAlt = instanceTargetPositions;\n\n  vec3 source_world = instanceSourcePositions;\n  vec3 target_world = instanceTargetPositions;\n  vec3 source_world_64low = instanceSourcePositions64Low;\n  vec3 target_world_64low = instanceTargetPositions64Low;\n\n  if (useShortestPath > 0.5 || useShortestPath < -0.5) {\n    source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n    target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n    float deltaLng = target_world.x - source_world.x;\n\n    if (deltaLng * useShortestPath > 180.) {\n      source_world.x += 360. * useShortestPath;\n      source_world = splitLine(source_world, target_world, 180. * useShortestPath);\n      source_world_64low = vec3(0.0);\n    } else if (deltaLng * useShortestPath < -180.) {\n      target_world.x += 360. * useShortestPath;\n      target_world = splitLine(source_world, target_world, 180. * useShortestPath);\n      target_world_64low = vec3(0.0);\n    } else if (useShortestPath < 0.) {\n      // Line is not split, abort\n      gl_Position = vec4(0.);\n      return;\n    }\n  }\n\n  // Position\n  vec4 source_commonspace;\n  vec4 target_commonspace;\n  vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\n  vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\n  \n  // linear interpolation of source & target to pick right coord\n  float segmentIndex = positions.x;\n  vec4 p = mix(source, target, segmentIndex);\n  geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n  uv = positions.xy;\n  geometry.uv = uv;\n  geometry.pickingColor = instancePickingColors;\n\n  // Multiply out width and clamp to limits\n  float widthPixels = clamp(\n    project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n    widthMinPixels, widthMaxPixels\n  );\n\n  // extrude\n  vec3 offset = vec3(\n    getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n    0.0);\n  DECKGL_FILTER_SIZE(offset, geometry);\n  gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  // Color\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n  geometry.uv = uv;\n\n  gl_FragColor = vColor;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[u.a,l.a]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}updateState(t){if(super.updateState(t),t.changeFlags.extensionsChanged){var e;const{gl:t}=this.context;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}){const{widthUnits:e,widthScale:n,widthMinPixels:r,widthMaxPixels:i,wrapLongitude:o}=this.props;this.state.model.setUniforms(t).setUniforms({widthUnits:c.e[e],widthScale:n,widthMinPixels:r,widthMaxPixels:i,useShortestPath:o?1:0}).draw(),o&&this.state.model.setUniforms({useShortestPath:-1}).draw()}_getModel(t){return new f.a(t,{...this.getShaders(),id:this.props.id,geometry:new h.a({drawMode:5,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0})}}Object(a.a)(d,"layerName","LineLayer"),Object(a.a)(d,"defaultProps",p);var m=n(530),g=n(243),y=n(298),v=n(1434);class b extends y.a{getGeometry(t){return new v.a}draw({uniforms:t}){const{elevationScale:e,extruded:n,offset:r,coverage:i,cellSize:o,angle:a,radiusUnits:s}=this.props;this.state.model.setUniforms(t).setUniforms({radius:o/2,radiusUnits:c.e[s],angle:a,offset:r,extruded:n,coverage:i,elevationScale:e,edgeDistance:1,isWireframe:!1}).draw()}}Object(a.a)(b,"layerName","GridCellLayer"),Object(a.a)(b,"defaultProps",{cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}});var _=n(198),A=n(494),w=n(126),x=n(261),E=n(197),O=n(300),S=n(299)},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"deck.gl: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.r(e),n.d(e,"rootStore",(function(){return c})),n.d(e,"StoreProvider",(function(){return h})),n.d(e,"useStore",(function(){return p}));var r=n(0),i=n.n(r),o=n(2),a=n(1082),s=n(1083),u=n(1087),l=o.types.model("PlacemakerRootModel",{viewport:a.default,place:o.types.maybeNull(s.default),drawingMode:u.default,mapRefSet:!1,embedMetadata:o.types.frozen(),isAdminMode:o.types.optional(o.types.boolean,!1)}).volatile((function(t){return{annotationDataConflict:null,cursorPosition:null,annotationDataClipboard:null,showChangeSquareStateDialog:!1,updateRecencySquareInfo:null}})).actions((function(t){return{afterCreate:function(){var e=document.querySelector("meta[name=deeptime-admin-token]");e&&e.content&&t.setIsAdminMode(!0)},setPlace:function(e){t.place=e},setMapRef:function(e){t.mapRefSet=e},setEmbedMetadata:function(e){t.embedMetadata=e},setIsAdminMode:function(e){t.isAdminMode=e},raiseConflict:function(e,n){t.annotationDataConflict={features:e,callback:n}},resolveConflict:function(e){t.annotationDataConflict.callback(e),t.annotationDataConflict=null},setCursorPosition:function(e){t.cursorPosition=e},setUpdateRecencySquareInfo:function(e){var n=t.place.grid.getGridSquareById(e);t.updateRecencySquareInfo=n?n.stalenessSummary:null},putAnnotationDataOnClipboard:function(e){t.annotationDataClipboard=e,console.log("saved",t.annotationDataClipboard)},toggleChangeSquareStateDialog:function(){t.showChangeSquareStateDialog=!t.showChangeSquareStateDialog}}})).views((function(t){return{get mapRefIsSet(){return t.mapRefSet}}})),c=l.create({place:null,mapRefSet:!1,viewport:{points:{},mode:"polygon"},drawingMode:{activeTool:"inspect"}});Object(o.onPatch)(c,(function(t){/^\/place\/featureLayers/.test(t.path)&&c.place&&c.place.currentFeatureLayer&&c.place.currentGridSquare&&("todo"===c.place.currentGridSquare.state&&c.place.currentFeatureLayer.features.length>0?c.place.currentGridSquare.updateState("in_progress"):/^\/place\/featureLayers\/\d+\/features\/\d+/.test(t.path)&&"remove"===t.op&&c.place.currentFeatureLayer.features.length),/^\/drawingMode\/activeTool\/\d+/.test(t.path)&&c.place&&(c.place.currentFeatureLayer&&c.place.currentFeatureLayer.setActiveFeature(null),c.place.referenceLayers&&c.place.referenceLayers.setActiveFeature(null))}));var f=i.a.createContext(),h=f.Provider,p=function(){var t=i.a.useContext(f);if(null===t)throw new Error("RootStoreContext cannot be null");return t};"object"===typeof window&&(window.store=c),e.default=l},,function(t,e,n){(function(t){!function(e){"use strict";var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n,yards:1.0936133},o={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function a(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n){switch(t){case"Point":return u(e).geometry;case"LineString":return h(e).geometry;case"Polygon":return c(e).geometry;case"MultiPoint":return g(e).geometry;case"MultiLineString":return m(e).geometry;case"MultiPolygon":return y(e).geometry;default:throw new Error(t+" is invalid")}}function u(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!C(t[0])||!C(t[1]))throw new Error("coordinates must contain numbers");return a({type:"Point",coordinates:t},e,n)}function l(t,e,n){return void 0===n&&(n={}),d(t.map((function(t){return u(t,e)})),n)}function c(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return a({type:"Polygon",coordinates:t},e,n)}function f(t,e,n){return void 0===n&&(n={}),d(t.map((function(t){return c(t,e)})),n)}function h(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return a({type:"LineString",coordinates:t},e,n)}function p(t,e,n){return void 0===n&&(n={}),d(t.map((function(t){return h(t,e)})),n)}function d(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function m(t,e,n){return void 0===n&&(n={}),a({type:"MultiLineString",coordinates:t},e,n)}function g(t,e,n){return void 0===n&&(n={}),a({type:"MultiPoint",coordinates:t},e,n)}function y(t,e,n){return void 0===n&&(n={}),a({type:"MultiPolygon",coordinates:t},e,n)}function v(t,e,n){return void 0===n&&(n={}),a({type:"GeometryCollection",geometries:t},e,n)}function b(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function _(t,e){void 0===e&&(e="kilometers");var n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function A(t,e){void 0===e&&(e="kilometers");var n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function w(t,e){return E(A(t,e))}function x(t){var e=t%360;return e<0&&(e+=360),e}function E(t){return t%(2*Math.PI)*180/Math.PI}function O(t){return t%360*Math.PI/180}function S(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return _(A(t,e),n)}function P(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=o[e];if(!r)throw new Error("invalid original units");var i=o[n];if(!i)throw new Error("invalid final units");return t/r*i}function C(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function T(t){return!!t&&t.constructor===Object}function k(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!C(t))throw new Error("bbox must only contain numbers")}))}function I(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}var L=Object.freeze({__proto__:null,earthRadius:n,factors:r,unitsFactors:i,areaFactors:o,feature:a,geometry:s,point:u,points:l,polygon:c,polygons:f,lineString:h,lineStrings:p,featureCollection:d,multiLineString:m,multiPoint:g,multiPolygon:y,geometryCollection:v,round:b,radiansToLength:_,lengthToRadians:A,lengthToDegrees:w,bearingToAzimuth:x,radiansToDegrees:E,degreesToRadians:O,convertLength:S,convertArea:P,isNumber:C,isObject:T,validateBBox:k,validateId:I});function j(t,e,n){if(null!==t)for(var r,i,o,a,s,u,l,c,f=0,h=0,p=t.type,d="FeatureCollection"===p,m="Feature"===p,g=d?t.features.length:1,y=0;y<g;y++){s=(c=!!(l=d?t.features[y].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var v=0;v<s;v++){var b=0,_=0;if(null!==(a=c?l.geometries[v]:l)){u=a.coordinates;var A=a.type;switch(f=!n||"Polygon"!==A&&"MultiPolygon"!==A?0:1,A){case null:break;case"Point":if(!1===e(u,h,y,b,_))return!1;h++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],h,y,b,_))return!1;h++,"MultiPoint"===A&&b++}"LineString"===A&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===e(u[r][i],h,y,b,_))return!1;h++}"MultiLineString"===A&&b++,"Polygon"===A&&_++}"Polygon"===A&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(_=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-f;o++){if(!1===e(u[r][i][o],h,y,b,_))return!1;h++}_++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===j(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function M(t,e,n,r){var i=n;return j(t,(function(t,r,o,a,s){i=0===r&&void 0===n?t:e(i,t,r,o,a,s)}),r),i}function R(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function N(t,e,n){var r=n;return R(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function D(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function F(t,e,n){var r=n;return D(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function B(t){var e=[];return j(t,(function(t){e.push(t)})),e}function z(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function U(t,e,n){var r=n;return z(t,(function(t,i,o,a,s){r=0===i&&void 0===n?t:e(r,t,i,o,a,s)})),r}function G(t,e){z(t,(function(t,n,r,i,o){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(a(t,r,{bbox:i,id:o}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l];if(!1===e(a({type:s,coordinates:c},r),n,l))return!1}}))}function V(t,e,n){var r=n;return G(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r}function q(t,e){G(t,(function(t,n,r){var i=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,u=0,l=0;return!1!==j(t,(function(o,c,f,p,d){if(void 0===a||n>s||p>u||d>l)return a=o,s=n,u=p,l=d,void(i=0);var m=h([a,o],t.properties);if(!1===e(m,n,r,d,i))return!1;i++,a=o}))&&void 0}}}))}function H(t,e,n){var r=n,i=!1;return q(t,(function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0})),r}function W(t,e){if(!t)throw new Error("geojson is required");G(t,(function(t,n,r){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===e(h(o[a],t.properties),n,r,a))return!1}}}))}function X(t,e,n){var r=n;return W(t,(function(t,i,o,a){r=0===i&&void 0===n?t:e(r,t,i,o,a)})),r}function Y(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n,r=e.featureIndex||0,i=e.multiFeatureIndex||0,o=e.geometryIndex||0,a=e.segmentIndex||0,s=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),s=s||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":s=s||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),h([u[a],u[a+1]],s,e);case"Polygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),h([u[o][a],u[o][a+1]],s,e);case"MultiLineString":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a-1),h([u[i][a],u[i][a+1]],s,e);case"MultiPolygon":return i<0&&(i=u.length+i),o<0&&(o=u[i].length+o),a<0&&(a=u[i][o].length-a-1),h([u[i][o][a],u[i][o][a+1]],s,e)}throw new Error("geojson is invalid")}function Z(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n,r=e.featureIndex||0,i=e.multiFeatureIndex||0,o=e.geometryIndex||0,a=e.coordIndex||0,s=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),s=s||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":s=s||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return u(l,s,e);case"MultiPoint":return i<0&&(i=l.length+i),u(l[i],s,e);case"LineString":return a<0&&(a=l.length+a),u(l[a],s,e);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),u(l[o][a],s,e);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),u(l[i][a],s,e);case"MultiPolygon":return i<0&&(i=l.length+i),o<0&&(o=l[i].length+o),a<0&&(a=l[i][o].length-a),u(l[i][o][a],s,e)}throw new Error("geojson is invalid")}var K=Object.freeze({__proto__:null,coordAll:B,coordEach:j,coordReduce:M,featureEach:D,featureReduce:F,findPoint:Z,findSegment:Y,flattenEach:G,flattenReduce:V,geomEach:z,geomReduce:U,lineEach:W,lineReduce:X,propEach:R,propReduce:N,segmentEach:q,segmentReduce:H});function $(t){var e=[1/0,1/0,-1/0,-1/0];return j(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}function J(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")}function Q(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function tt(t){if(t.length>1&&C(t[0])&&C(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return tt(t[0]);throw new Error("coordinates must only contain numbers")}function et(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}function nt(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function rt(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=t.features;r<i.length;r++){var o=i[r];if(!o||"Feature"!==o.type||!o.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!o.geometry||o.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+o.geometry.type)}}function it(t){return"Feature"===t.type?t.geometry:t}function ot(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}$.default=$;var at=Object.freeze({__proto__:null,getCoord:J,getCoords:Q,containsNumber:tt,geojsonType:et,featureOf:nt,collectionOf:rt,getGeom:it,getType:ot}),st=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;function ct(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var ft=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,i=ct(t),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))ut.call(n,a)&&(i[a]=n[a]);if(st){r=st(n);for(var s=0;s<r.length;s++)lt.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},ht={successCallback:null,verbose:!1},pt={};function dt(t,e,n){n=n||{};for(var r=Object.keys(ht),i=0;i<r.length;i++){var o=r[i],a=n[o];a=null!=a?a:ht[o],pt[o]=a}pt.verbose&&console.log("MarchingSquaresJS-isoContours: computing isocontour for "+e);var s=function(t){var e=[],n=0,r=1e-7;return t.cells.forEach((function(i,o){i.forEach((function(i,a){if(void 0!==i&&5!==(p=i).cval&&10!==p.cval&&!gt(i)){var s=function(t,e,n){var r,i,o=t.length,a=[],s=[0,0,1,1,0,0,0,0,-1,0,1,1,-1,0,-1,0],u=[0,-1,0,0,1,1,1,1,0,-1,0,0,0,-1,0,0],l=["none","left","bottom","left","right","none","bottom","left","top","top","none","top","right","right","bottom","none"],c=["none","bottom","right","right","top","top","top","top","left","bottom","right","right","left","bottom","left","none"],f=t[e][n],h=f.cval,p=l[h],d=vt(f,p);a.push([n+d[0],e+d[1]]),d=vt(f,p=c[h]),a.push([n+d[0],e+d[1]]),yt(f);for(var m=n+s[h],g=e+u[h],y=h;m>=0&&g>=0&&g<o&&(m!=n||g!=e)&&void 0!==(f=t[g][m]);){if(0===(h=f.cval)||15===h)return{path:a,info:"mergeable"};p=c[h],r=s[h],i=u[h],5!==h&&10!==h||(5===h?f.flipped?-1===u[y]?(p="left",r=-1,i=0):(p="right",r=1,i=0):-1===s[y]&&(p="bottom",r=0,i=-1):10===h&&(f.flipped?-1===s[y]?(p="top",r=0,i=1):(p="bottom",r=0,i=-1):1===u[y]&&(p="left",r=-1,i=0))),d=vt(f,p),a.push([m+d[0],g+d[1]]),yt(f),m+=r,g+=i,y=h}return{path:a,info:"closed"}}(t.cells,o,a),u=!1;if("mergeable"===s.info)for(var l=s.path[s.path.length-1][0],c=s.path[s.path.length-1][1],f=n-1;f>=0;f--)if(Math.abs(e[f][0][0]-l)<=r&&Math.abs(e[f][0][1]-c)<=r){for(var h=s.path.length-2;h>=0;--h)e[f].unshift(s.path[h]);u=!0;break}u||(e[n++]=s.path)}var p}))})),e}(function(t,e){for(var n=t.length-1,r=t[0].length-1,i={rows:n,cols:r,cells:[]},o=0;o<n;++o){i.cells[o]=[];for(var a=0;a<r;++a){var s=0,u=t[o+1][a],l=t[o+1][a+1],c=t[o][a+1],f=t[o][a];if(!(isNaN(u)||isNaN(l)||isNaN(c)||isNaN(f))){s|=u>=e?8:0,s|=l>=e?4:0,s|=c>=e?2:0;var h,p,d,m,g=!1;if(5===(s|=f>=e?1:0)||10===s){var y=(u+l+c+f)/4;5===s&&y<e?(s=10,g=!0):10===s&&y<e&&(s=5,g=!0)}0!==s&&15!==s&&(h=p=d=m=.5,1===s?(d=1-mt(e,u,f),p=1-mt(e,c,f)):2===s?(p=mt(e,f,c),m=1-mt(e,l,c)):3===s?(d=1-mt(e,u,f),m=1-mt(e,l,c)):4===s?(h=mt(e,u,l),m=mt(e,c,l)):5===s?(h=mt(e,u,l),m=mt(e,c,l),p=1-mt(e,c,f),d=1-mt(e,u,f)):6===s?(p=mt(e,f,c),h=mt(e,u,l)):7===s?(d=1-mt(e,u,f),h=mt(e,u,l)):8===s?(d=mt(e,f,u),h=1-mt(e,l,u)):9===s?(p=1-mt(e,c,f),h=1-mt(e,l,u)):10===s?(h=1-mt(e,l,u),m=1-mt(e,l,c),p=mt(e,f,c),d=mt(e,f,u)):11===s?(h=1-mt(e,l,u),m=1-mt(e,l,c)):12===s?(d=mt(e,f,u),m=mt(e,c,l)):13===s?(p=1-mt(e,c,f),m=mt(e,c,l)):14===s?(d=mt(e,f,u),p=mt(e,f,c)):console.log("MarchingSquaresJS-isoContours: Illegal cval detected: "+s),i.cells[o][a]={cval:s,flipped:g,top:h,right:m,bottom:p,left:d})}}}return i}(t,e));return"function"==typeof pt.successCallback&&pt.successCallback(s),s}function mt(t,e,n){return(t-e)/(n-e)}function gt(t){return 0===t.cval||15===t.cval}function yt(t){gt(t)||5===t.cval||10===t.cval||(t.cval=15)}function vt(t,e){return"top"===e?[t.top,1]:"bottom"===e?[t.bottom,0]:"right"===e?[1,t.right]:"left"===e?[0,t.left]:void 0}function bt(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=e.zProperty||"elevation",r=e.flip,i=e.flags;rt(t,"Point","input must contain Points");for(var o=function(t,e){var n={};return D(t,(function(t){var e=Q(t)[1];n[e]||(n[e]=[]),n[e].push(t)})),Object.keys(n).map((function(t){return n[t].sort((function(t,e){return Q(t)[0]-Q(e)[0]}))})).sort((function(t,n){return e?Q(t[0])[1]-Q(n[0])[1]:Q(n[0])[1]-Q(t[0])[1]}))}(t,r),a=[],s=0;s<o.length;s++){for(var u=o[s],l=[],c=0;c<u.length;c++){var f=u[c];f.properties[n]?l.push(f.properties[n]):l.push(0),!0===i&&(f.properties.matrixPosition=[s,c])}a.push(l)}return a}var _t=wt,At=wt;function wt(t,e,n,r,i){xt(t,e,n||0,r||t.length-1,i||Ot)}function xt(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=e-n+1,s=Math.log(o),u=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*u*(o-u)/o)*(a-o/2<0?-1:1);xt(t,e,Math.max(n,Math.floor(e-a*u/o+l)),Math.min(r,Math.floor(e+(o-a)*u/o+l)),i)}var c=t[e],f=n,h=r;for(Et(t,n,e),i(t[r],c)>0&&Et(t,n,r);f<h;){for(Et(t,f,h),f++,h--;i(t[f],c)<0;)f++;for(;i(t[h],c)>0;)h--}0===i(t[n],c)?Et(t,n,h):Et(t,++h,r),h<=e&&(n=h+1),e<=h&&(r=h-1)}}function Et(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Ot(t,e){return t<e?-1:t>e?1:0}_t.default=At;var St=Ct,Pt=Ct;function Ct(t,e){if(!(this instanceof Ct))return new Ct(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function Tt(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function kt(t,e){It(t,0,t.children.length,e,t)}function It(t,e,n,r,i){i||(i=Bt(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,a=e;a<n;a++)o=t.children[a],Lt(i,t.leaf?r(o):o);return i}function Lt(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function jt(t,e){return t.minX-e.minX}function Mt(t,e){return t.minY-e.minY}function Rt(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Nt(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Dt(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function Ft(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function Bt(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function zt(t,e,n,r,i){for(var o,a=[e,n];a.length;)(n=a.pop())-(e=a.pop())<=r||(o=e+Math.ceil((n-e)/r/2)*r,_t(t,o,e,n,i),a.push(e,o,o,n))}function Ut(t){var e={exports:{}};return t(e,e.exports),e.exports}Ct.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!Ft(t,e))return n;for(var i,o,a,s,u=[];e;){for(i=0,o=e.children.length;i<o;i++)a=e.children[i],Ft(t,s=e.leaf?r(a):a)&&(e.leaf?n.push(a):Dt(t,s)?this._all(a,n):u.push(a));e=u.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!Ft(t,e))return!1;for(var r,i,o,a,s=[];e;){for(r=0,i=e.children.length;r<i;r++)if(o=e.children[r],Ft(t,a=e.leaf?n(o):o)){if(e.leaf||Dt(t,a))return!0;s.push(o)}e=s.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=Bt([]),this},remove:function(t,e){if(!t)return this;for(var n,r,i,o,a=this.data,s=this.toBBox(t),u=[],l=[];a||u.length;){if(a||(a=u.pop(),r=u[u.length-1],n=l.pop(),o=!0),a.leaf&&-1!==(i=Tt(t,a.children,e)))return a.children.splice(i,1),u.push(a),this._condense(u),this;o||a.leaf||!Dt(a,s)?r?(n++,a=r.children[n],o=!1):a=null:(u.push(a),l.push(n),n=0,r=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:jt,compareMinY:Mt,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,r){var i,o=n-e+1,a=this._maxEntries;if(o<=a)return kt(i=Bt(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,r-1))),(i=Bt([])).leaf=!1,i.height=r;var s,u,l,c,f=Math.ceil(o/a),h=f*Math.ceil(Math.sqrt(a));for(zt(t,e,n,h,this.compareMinX),s=e;s<=n;s+=h)for(zt(t,s,l=Math.min(s+h-1,n),f,this.compareMinY),u=s;u<=l;u+=f)c=Math.min(u+f-1,l),i.children.push(this._build(t,u,c,r-1));return kt(i,this.toBBox),i},_chooseSubtree:function(t,e,n,r){for(var i,o,a,s,u,l,c,f,h,p;r.push(e),!e.leaf&&r.length-1!==n;){for(c=f=1/0,i=0,o=e.children.length;i<o;i++)u=Rt(a=e.children[i]),h=t,p=a,(l=(Math.max(p.maxX,h.maxX)-Math.min(p.minX,h.minX))*(Math.max(p.maxY,h.maxY)-Math.min(p.minY,h.minY))-u)<f?(f=l,c=u<c?u:c,s=a):l===f&&u<c&&(c=u,s=a);e=s||e.children[0]}return e},_insert:function(t,e,n){var r=this.toBBox,i=n?t:r(t),o=[],a=this._chooseSubtree(i,this.data,e,o);for(a.children.push(t),Lt(a,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),a=Bt(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,kt(n,this.toBBox),kt(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=Bt([t,e]),this.data.height=t.height+1,this.data.leaf=!1,kt(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,a,s,u,l,c,f,h,p,d,m,g;for(u=l=1/0,r=e;r<=n-e;r++)f=i=It(t,0,r,this.toBBox),h=o=It(t,r,n,this.toBBox),p=void 0,d=void 0,m=void 0,g=void 0,p=Math.max(f.minX,h.minX),d=Math.max(f.minY,h.minY),m=Math.min(f.maxX,h.maxX),g=Math.min(f.maxY,h.maxY),a=Math.max(0,m-p)*Math.max(0,g-d),s=Rt(i)+Rt(o),a<u?(u=a,c=r,l=s<l?s:l):a===u&&s<l&&(l=s,c=r);return c},_chooseSplitAxis:function(t,e,n){var r=t.leaf?this.compareMinX:jt,i=t.leaf?this.compareMinY:Mt;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},_allDistMargin:function(t,e,n,r){t.children.sort(r);var i,o,a=this.toBBox,s=It(t,0,e,a),u=It(t,n-e,n,a),l=Nt(s)+Nt(u);for(i=e;i<n-e;i++)o=t.children[i],Lt(s,t.leaf?a(o):o),l+=Nt(s);for(i=n-e-1;i>=e;i--)o=t.children[i],Lt(u,t.leaf?a(o):o),l+=Nt(u);return l},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)Lt(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():kt(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},St.default=Pt;var Gt=function(t,e,n){var r=t*e,i=Vt*t,o=i-(i-t),a=t-o,s=Vt*e,u=s-(s-e),l=e-u,c=a*l-(r-o*u-a*u-o*l);return n?(n[0]=c,n[1]=r,n):[c,r]},Vt=+(Math.pow(2,27)+1),qt=function(t,e){var n=0|t.length,r=0|e.length;if(1===n&&1===r)return function(t,e){var n=t+e,r=n-t,i=t-(n-r)+(e-r);return i?[i,n]:[n]}(t[0],e[0]);var i,o,a=new Array(n+r),s=0,u=0,l=0,c=Math.abs,f=t[u],h=c(f),p=e[l],d=c(p);h<d?(o=f,(u+=1)<n&&(h=c(f=t[u]))):(o=p,(l+=1)<r&&(d=c(p=e[l]))),u<n&&h<d||l>=r?(i=f,(u+=1)<n&&(h=c(f=t[u]))):(i=p,(l+=1)<r&&(d=c(p=e[l])));for(var m,g,y=i+o,v=y-i,b=o-v,_=b,A=y;u<n&&l<r;)h<d?(i=f,(u+=1)<n&&(h=c(f=t[u]))):(i=p,(l+=1)<r&&(d=c(p=e[l]))),(b=(o=_)-(v=(y=i+o)-i))&&(a[s++]=b),_=A-((m=A+y)-(g=m-A))+(y-g),A=m;for(;u<n;)(b=(o=_)-(v=(y=(i=f)+o)-i))&&(a[s++]=b),_=A-((m=A+y)-(g=m-A))+(y-g),A=m,(u+=1)<n&&(f=t[u]);for(;l<r;)(b=(o=_)-(v=(y=(i=p)+o)-i))&&(a[s++]=b),_=A-((m=A+y)-(g=m-A))+(y-g),A=m,(l+=1)<r&&(p=e[l]);return _&&(a[s++]=_),A&&(a[s++]=A),s||(a[s++]=0),a.length=s,a},Ht=function(t,e,n){var r=t+e,i=r-t,o=e-i,a=t-(r-i);return n?(n[0]=a+o,n[1]=r,n):[a+o,r]},Wt=function(t,e){var n=t.length;if(1===n){var r=Gt(t[0],e);return r[0]?r:[r[1]]}var i=new Array(2*n),o=[.1,.1],a=[.1,.1],s=0;Gt(t[0],e,o),o[0]&&(i[s++]=o[0]);for(var u=1;u<n;++u){Gt(t[u],e,a);var l=o[1];Ht(l,a[0],o),o[0]&&(i[s++]=o[0]);var c=a[1],f=o[1],h=c+f,p=f-(h-c);o[1]=h,p&&(i[s++]=p)}return o[1]&&(i[s++]=o[1]),0===s&&(i[s++]=0),i.length=s,i},Xt=function(t,e){var n=0|t.length,r=0|e.length;if(1===n&&1===r)return function(t,e){var n=t+e,r=n-t,i=t-(n-r)+(e-r);return i?[i,n]:[n]}(t[0],-e[0]);var i,o,a=new Array(n+r),s=0,u=0,l=0,c=Math.abs,f=t[u],h=c(f),p=-e[l],d=c(p);h<d?(o=f,(u+=1)<n&&(h=c(f=t[u]))):(o=p,(l+=1)<r&&(d=c(p=-e[l]))),u<n&&h<d||l>=r?(i=f,(u+=1)<n&&(h=c(f=t[u]))):(i=p,(l+=1)<r&&(d=c(p=-e[l])));for(var m,g,y=i+o,v=y-i,b=o-v,_=b,A=y;u<n&&l<r;)h<d?(i=f,(u+=1)<n&&(h=c(f=t[u]))):(i=p,(l+=1)<r&&(d=c(p=-e[l]))),(b=(o=_)-(v=(y=i+o)-i))&&(a[s++]=b),_=A-((m=A+y)-(g=m-A))+(y-g),A=m;for(;u<n;)(b=(o=_)-(v=(y=(i=f)+o)-i))&&(a[s++]=b),_=A-((m=A+y)-(g=m-A))+(y-g),A=m,(u+=1)<n&&(f=t[u]);for(;l<r;)(b=(o=_)-(v=(y=(i=p)+o)-i))&&(a[s++]=b),_=A-((m=A+y)-(g=m-A))+(y-g),A=m,(l+=1)<r&&(p=-e[l]);return _&&(a[s++]=_),A&&(a[s++]=A),s||(a[s++]=0),a.length=s,a},Yt=Ut((function(t){function e(t,e){for(var n=new Array(t.length-1),r=1;r<t.length;++r)for(var i=n[r-1]=new Array(t.length-1),o=0,a=0;o<t.length;++o)o!==e&&(i[a++]=t[r][o]);return n}function n(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var e=t.length>>1;return["sum(",n(t.slice(0,e)),",",n(t.slice(e)),")"].join("")}function r(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var i=[],o=0;o<t.length;++o)i.push(["scale(",n(r(e(t,o))),",",(a=o,1&a?"-":""),t[0][o],")"].join(""));return i;var a}function i(t){for(var i=[],o=[],a=function(t){for(var e=new Array(t),n=0;n<t;++n){e[n]=new Array(t);for(var r=0;r<t;++r)e[n][r]=["m",r,"[",t-n-1,"]"].join("")}return e}(t),s=[],u=0;u<t;++u)0==(1&u)?i.push.apply(i,r(e(a,u))):o.push.apply(o,r(e(a,u))),s.push("m"+u);var l=n(i),c=n(o),f="orientation"+t+"Exact",h=["function ",f,"(",s.join(),"){var p=",l,",n=",c,",d=sub(p,n);return d[d.length-1];};return ",f].join("");return new Function("sum","prod","scale","sub",h)(qt,Gt,Wt,Xt)}var o=i(3),a=i(4),s=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,n){var r,i=(t[1]-n[1])*(e[0]-n[0]),a=(t[0]-n[0])*(e[1]-n[1]),s=i-a;if(i>0){if(a<=0)return s;r=i+a}else{if(!(i<0))return s;if(a>=0)return s;r=-(i+a)}var u=33306690738754716e-32*r;return s>=u||s<=-u?s:o(t,e,n)},function(t,e,n,r){var i=t[0]-r[0],o=e[0]-r[0],s=n[0]-r[0],u=t[1]-r[1],l=e[1]-r[1],c=n[1]-r[1],f=t[2]-r[2],h=e[2]-r[2],p=n[2]-r[2],d=o*c,m=s*l,g=s*u,y=i*c,v=i*l,b=o*u,_=f*(d-m)+h*(g-y)+p*(v-b),A=7771561172376103e-31*((Math.abs(d)+Math.abs(m))*Math.abs(f)+(Math.abs(g)+Math.abs(y))*Math.abs(h)+(Math.abs(v)+Math.abs(b))*Math.abs(p));return _>A||-_>A?_:a(t,e,n,r)}];function u(t){var e=s[t.length];return e||(e=s[t.length]=i(t.length)),e.apply(void 0,t)}!function(){for(;s.length<=5;)s.push(i(s.length));for(var e=[],n=["slow"],r=0;r<=5;++r)e.push("a"+r),n.push("o"+r);var o=["function getOrientation(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(r=2;r<=5;++r)o.push("case ",r,":return o",r,"(",e.slice(0,r).join(),");");o.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),n.push(o.join(""));var a=Function.apply(void 0,n);for(t.exports=a.apply(void 0,[u].concat(s)),r=0;r<=5;++r)t.exports[r]=s[r]}()})),Zt=function(t){var e=t.length;if(e<3){for(var n=new Array(e),r=0;r<e;++r)n[r]=r;return 2===e&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:n}var i=new Array(e);for(r=0;r<e;++r)i[r]=r;i.sort((function(e,n){return t[e][0]-t[n][0]||t[e][1]-t[n][1]}));var o=[i[0],i[1]],a=[i[0],i[1]];for(r=2;r<e;++r){for(var s=i[r],u=t[s],l=o.length;l>1&&Kt(t[o[l-2]],t[o[l-1]],u)<=0;)l-=1,o.pop();for(o.push(s),l=a.length;l>1&&Kt(t[a[l-2]],t[a[l-1]],u)>=0;)l-=1,a.pop();a.push(s)}n=new Array(a.length+o.length-2);for(var c=0,f=(r=0,o.length);r<f;++r)n[c++]=o[r];for(var h=a.length-2;h>0;--h)n[c++]=a[h];return n},Kt=Yt[3],$t=Qt,Jt=Qt;function Qt(t,e){if(!(this instanceof Qt))return new Qt(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||te,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function te(t,e){return t<e?-1:t>e?1:0}Qt.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},_down:function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t<r;){var o=1+(t<<1),a=o+1,s=e[o];if(a<this.length&&n(e[a],s)<0&&(o=a,s=e[a]),n(s,i)>=0)break;e[t]=s,t=o}e[t]=i}},$t.default=Jt;var ee=function(t,e){for(var n=t[0],r=t[1],i=!1,o=0,a=e.length-1;o<e.length;a=o++){var s=e[o][0],u=e[o][1],l=e[a][0],c=e[a][1];u>r!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i},ne=Yt[3],re=oe,ie=oe;function oe(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;for(var r,i=function(t){for(var e=t[0],n=t[0],r=t[0],i=t[0],o=0;o<t.length;o++){var a=t[o];a[0]<e[0]&&(e=a),a[0]>r[0]&&(r=a),a[1]<n[1]&&(n=a),a[1]>i[1]&&(i=a)}var s=[e,n,r,i],u=s.slice();for(o=0;o<t.length;o++)ee(t[o],s)||u.push(t[o]);var l=Zt(u),c=[];for(o=0;o<l.length;o++)c.push(u[l[o]]);return c}(t),o=St(16,["[0]","[1]","[0]","[1]"]).load(t),a=[],s=0;s<i.length;s++){var u=i[s];o.remove(u),r=he(u,r),a.push(r)}var l=St(16);for(s=0;s<a.length;s++)l.insert(fe(a[s]));for(var c=e*e,f=n*n;a.length;){var h=a.shift(),p=h.p,d=h.next.p,m=pe(p,d);if(!(m<f)){var g=m/c;(u=ae(o,h.prev.p,p,d,h.next.next.p,g,l))&&Math.min(pe(u,p),pe(u,d))<=g&&(a.push(h),a.push(he(u,h)),o.remove(u),l.remove(h),l.insert(fe(h)),l.insert(fe(h.next)))}}h=r;var y=[];do{y.push(h.p),h=h.next}while(h!==r);return y.push(h.p),y}function ae(t,e,n,r,i,o,a){for(var s=new $t(null,se),u=t.data;u;){for(var l=0;l<u.children.length;l++){var c=u.children[l],f=u.leaf?de(c,n,r):ue(n,r,c);f>o||s.push({node:c,dist:f})}for(;s.length&&!s.peek().node.children;){var h=s.pop(),p=h.node,d=de(p,e,n),m=de(p,r,i);if(h.dist<d&&h.dist<m&&ce(n,p,a)&&ce(r,p,a))return p}(u=s.pop())&&(u=u.node)}return null}function se(t,e){return t.dist-e.dist}function ue(t,e,n){if(le(t,n)||le(e,n))return 0;var r=me(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===r)return 0;var i=me(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===i)return 0;var o=me(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var a=me(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===a?0:Math.min(r,i,o,a)}function le(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function ce(t,e,n){for(var r,i,o,a,s=Math.min(t[0],e[0]),u=Math.min(t[1],e[1]),l=Math.max(t[0],e[0]),c=Math.max(t[1],e[1]),f=n.search({minX:s,minY:u,maxX:l,maxY:c}),h=0;h<f.length;h++)if(r=f[h].p,i=f[h].next.p,o=t,r!==(a=e)&&i!==o&&ne(r,i,o)>0!=ne(r,i,a)>0&&ne(o,a,r)>0!=ne(o,a,i)>0)return!1;return!0}function fe(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function he(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function pe(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function de(t,e,n){var r=e[0],i=e[1],o=n[0]-r,a=n[1]-i;if(0!==o||0!==a){var s=((t[0]-r)*o+(t[1]-i)*a)/(o*o+a*a);s>1?(r=n[0],i=n[1]):s>0&&(r+=o*s,i+=a*s)}return(o=t[0]-r)*o+(a=t[1]-i)*a}function me(t,e,n,r,i,o,a,s){var u,l,c,f,h=n-t,p=r-e,d=a-i,m=s-o,g=t-i,y=e-o,v=h*h+p*p,b=h*d+p*m,_=d*d+m*m,A=h*g+p*y,w=d*g+m*y,x=v*_-b*b,E=x,O=x;0===x?(l=0,E=1,f=w,O=_):(f=v*w-b*A,(l=b*w-_*A)<0?(l=0,f=w,O=_):l>E&&(l=E,f=w+b,O=_)),f<0?(f=0,-A<0?l=0:-A>v?l=E:(l=-A,E=v)):f>O&&(f=O,-A+b<0?l=0:-A+b>v?l=E:(l=-A+b,E=v));var S=(1-(c=0===f?0:f/O))*i+c*a-((1-(u=0===l?0:l/E))*t+u*n),P=(1-c)*o+c*s-((1-u)*e+u*r);return S*S+P*P}function ge(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(j(t,(function(t){n.push([t[0],t[1]])})),!n.length)return null;var r=re(n,e.concavity);return r.length>3?c([r]):null}function ye(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=J(t),i=it(e),o=i.type,a=e.bbox,s=i.coordinates;if(a&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,a))return!1;"Polygon"===o&&(s=[s]);for(var u=!1,l=0;l<s.length&&!u;l++)if(ve(r,s[l][0],n.ignoreBoundary)){for(var c=!1,f=1;f<s[l].length&&!c;)ve(r,s[l][f],!n.ignoreBoundary)&&(c=!0),f++;c||(u=!0)}return u}function ve(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],u=e[o][0],l=e[o][1];if(t[1]*(a-u)+s*(u-t[0])+l*(t[0]-a)==0&&(a-t[0])*(u-t[0])<=0&&(s-t[1])*(l-t[1])<=0)return!n;s>t[1]!=l>t[1]&&t[0]<(u-a)*(t[1]-s)/(l-s)+a&&(r=!r)}return r}function be(t,e){var n=[];return D(t,(function(t){var r=!1;if("Point"===t.geometry.type)z(e,(function(e){ye(t,e)&&(r=!0)})),r&&n.push(t);else{if("MultiPoint"!==t.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var i=[];z(e,(function(e){j(t,(function(t){ye(t,e)&&(r=!0,i.push(t))}))})),r&&n.push(g(i))}})),d(n)}function _e(t,e,n){void 0===n&&(n={});var r=J(t),i=J(e),o=O(i[1]-r[1]),a=O(i[0]-r[0]),s=O(r[1]),u=O(i[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(u);return _(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),n.units)}function Ae(t,e){var n=!1;return d(function(t){if(t.length<3)return[];t.sort(xe);for(var e,n,r,i,o,a,s=t.length-1,u=t[s].x,l=t[0].x,c=t[s].y,f=c,h=1e-12;s--;)t[s].y<c&&(c=t[s].y),t[s].y>f&&(f=t[s].y);var p,d=l-u,m=f-c,g=d>m?d:m,y=.5*(l+u),v=.5*(f+c),b=[new we({__sentinel:!0,x:y-20*g,y:v-g},{__sentinel:!0,x:y,y:v+20*g},{__sentinel:!0,x:y+20*g,y:v-g})],_=[],A=[];for(s=t.length;s--;){for(A.length=0,p=b.length;p--;)(d=t[s].x-b[p].x)>0&&d*d>b[p].r?(_.push(b[p]),b.splice(p,1)):d*d+(m=t[s].y-b[p].y)*m>b[p].r||(A.push(b[p].a,b[p].b,b[p].b,b[p].c,b[p].c,b[p].a),b.splice(p,1));for(Ee(A),p=A.length;p;)n=A[--p],e=A[--p],r=t[s],i=n.x-e.x,o=n.y-e.y,a=2*(i*(r.y-n.y)-o*(r.x-n.x)),Math.abs(a)>h&&b.push(new we(e,n,r))}for(Array.prototype.push.apply(_,b),s=_.length;s--;)(_[s].a.__sentinel||_[s].b.__sentinel||_[s].c.__sentinel)&&_.splice(s,1);return _}(t.features.map((function(t){var r={x:t.geometry.coordinates[0],y:t.geometry.coordinates[1]};return e?r.z=t.properties[e]:3===t.geometry.coordinates.length&&(n=!0,r.z=t.geometry.coordinates[2]),r}))).map((function(t){var e=[t.a.x,t.a.y],r=[t.b.x,t.b.y],i=[t.c.x,t.c.y],o={};return n?(e.push(t.a.z),r.push(t.b.z),i.push(t.c.z)):o={a:t.a.z,b:t.b.z,c:t.c.z},c([[e,r,i,e]],o)})))}re.default=ie;var we=function(t,e,n){this.a=t,this.b=e,this.c=n;var r,i,o=e.x-t.x,a=e.y-t.y,s=n.x-t.x,u=n.y-t.y,l=o*(t.x+e.x)+a*(t.y+e.y),c=s*(t.x+n.x)+u*(t.y+n.y),f=2*(o*(n.y-e.y)-a*(n.x-e.x));this.x=(u*l-a*c)/f,this.y=(o*c-s*l)/f,r=this.x-t.x,i=this.y-t.y,this.r=r*r+i*i};function xe(t,e){return e.x-t.x}function Ee(t){var e,n,r,i,o,a=t.length;t:for(;a;)for(n=t[--a],e=t[--a],r=a;r;)if(o=t[--r],e===(i=t[--r])&&n===o||e===o&&n===i){t.splice(a,2),t.splice(r,2),a-=2;continue t}}function Oe(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return Se(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return Se(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Ce(t);default:throw new Error("unknown GeoJSON type")}}function Se(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=Pe(t.properties),e.geometry=Ce(t.geometry),e}function Pe(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"==typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=Pe(r):e[n]=r})),e):e}function Ce(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return Ce(t)})),e):(e.coordinates=Te(t.coordinates),e)}function Te(t){var e=t;return"object"!=typeof e[0]?e.slice():e.map((function(t){return Te(t)}))}function ke(t,e){if(void 0===e&&(e={}),!T(e=e||{}))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==ot(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=Oe(t));var r=[],i=X(t,(function(t,e){var n=function(t,e){var n,r=t.geometry.coordinates,i=e.geometry.coordinates,o=Ie(r[0]),a=Ie(r[r.length-1]),s=Ie(i[0]),u=Ie(i[i.length-1]);if(o===u)n=i.concat(r.slice(1));else if(s===a)n=r.concat(i.slice(1));else if(o===s)n=r.slice(1).reverse().concat(i);else{if(a!==u)return null;n=r.concat(i.reverse().slice(1))}return h(n)}(t,e);return n||(r.push(t),e)}));return i&&r.push(i),r.length?1===r.length?r[0]:m(r.map((function(t){return t.coordinates}))):null}function Ie(t){return t[0].toString()+","+t[1].toString()}function Le(t){return t}function je(t,e){var n=function(t){if(null==t)return Le;var e,n,r=t.scale[0],i=t.scale[1],o=t.translate[0],a=t.translate[1];return function(t,s){s||(e=n=0);var u=2,l=t.length,c=new Array(l);for(c[0]=(e+=t[0])*r+o,c[1]=(n+=t[1])*i+a;u<l;)c[u]=t[u],++u;return c}}(t.transform),r=t.arcs;function i(t,e){e.length&&e.pop();for(var i=r[t<0?~t:t],o=0,a=i.length;o<a;++o)e.push(n(i[o],o));t<0&&function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}(e,a)}function o(t){return n(t)}function a(t){for(var e=[],n=0,r=t.length;n<r;++n)i(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function u(t){return t.map(s)}return function t(e){var n,r=e.type;switch(r){case"GeometryCollection":return{type:r,geometries:e.geometries.map(t)};case"Point":n=o(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(o);break;case"LineString":n=a(e.arcs);break;case"MultiLineString":n=e.arcs.map(a);break;case"Polygon":n=u(e.arcs);break;case"MultiPolygon":n=e.arcs.map(u);break;default:return null}return{type:r,coordinates:n}}(e)}function Me(t,e){var n={},r={},i={},o=[],a=-1;function s(t,e){for(var r in t){var i=t[r];delete e[i.start],delete i.start,delete i.end,i.forEach((function(t){n[t<0?~t:t]=1})),o.push(i)}}return e.forEach((function(n,r){var i,o=t.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(i=e[++a],e[a]=n,e[r]=i)})),e.forEach((function(e){var n,o,a=function(e){var n,r=t.arcs[e<0?~e:e],i=r[0];return t.transform?(n=[0,0],r.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=r[r.length-1],e<0?[n,i]:[i,n]}(e),s=a[0],u=a[1];if(n=i[s])if(delete i[n.end],n.push(e),n.end=u,o=r[u]){delete r[o.start];var l=o===n?n:n.concat(o);r[l.start=n.start]=i[l.end=o.end]=l}else r[n.start]=i[n.end]=n;else if(n=r[u])if(delete r[n.start],n.unshift(e),n.start=s,o=i[s]){delete i[o.end];var c=o===n?n:o.concat(n);r[c.start=o.start]=i[c.end=n.end]=c}else r[n.start]=i[n.end]=n;else r[(n=[e]).start=s]=i[n.end=u]=n})),s(i,r),s(r,i),e.forEach((function(t){n[t<0?~t:t]||o.push([t])})),o}function Re(t,e){var n={},r=[],i=[];function o(t){t.forEach((function(e){e.forEach((function(e){(n[e=e<0?~e:e]||(n[e]=[])).push(t)}))})),r.push(t)}function a(e){return function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[0]*i[1]-e[1]*i[0];return Math.abs(o)}(je(t,{type:"Polygon",arcs:[e]}).coordinates[0])}return e.forEach((function t(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"Polygon":o(e.arcs);break;case"MultiPolygon":e.arcs.forEach(o)}})),r.forEach((function(t){if(!t._){var e=[],r=[t];for(t._=1,i.push(e);t=r.pop();)e.push(t),t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].forEach((function(t){t._||(t._=1,r.push(t))}))}))}))}})),r.forEach((function(t){delete t._})),{type:"MultiPolygon",arcs:i.map((function(e){var r,i=[];if(e.forEach((function(t){t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].length<2&&i.push(t)}))}))})),(r=(i=Me(t,i)).length)>1)for(var o,s,u=1,l=a(i[0]);u<r;++u)(o=a(i[u]))>l&&(s=i[0],i[0]=i[u],i[u]=s,l=o);return i})).filter((function(t){return t.length>0}))}}var Ne=Object.prototype.hasOwnProperty;function De(t,e,n,r,i,o){3===arguments.length&&(r=o=Array,i=null);for(var a=new r(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),s=new o(t),u=t-1,l=0;l<t;++l)a[l]=i;function c(r,o){for(var l=e(r)&u,c=a[l],f=0;c!=i;){if(n(c,r))return s[l]=o;if(++f>=t)throw new Error("full hashmap");c=a[l=l+1&u]}return a[l]=r,s[l]=o,o}function f(r,o){for(var l=e(r)&u,c=a[l],f=0;c!=i;){if(n(c,r))return s[l];if(++f>=t)throw new Error("full hashmap");c=a[l=l+1&u]}return a[l]=r,s[l]=o,o}function h(r,o){for(var l=e(r)&u,c=a[l],f=0;c!=i;){if(n(c,r))return s[l];if(++f>=t)break;c=a[l=l+1&u]}return o}function p(){for(var t=[],e=0,n=a.length;e<n;++e){var r=a[e];r!=i&&t.push(r)}return t}return{set:c,maybeSet:f,get:h,keys:p}}function Fe(t,e){return t[0]===e[0]&&t[1]===e[1]}var Be=new ArrayBuffer(16),ze=new Float64Array(Be),Ue=new Uint32Array(Be);function Ge(t){ze[0]=t[0],ze[1]=t[1];var e=Ue[0]^Ue[1];return 2147483647&(e<<5^e>>7^Ue[2]^Ue[3])}function Ve(t){var e,n,r,i,o=t.coordinates,a=t.lines,s=t.rings,u=function(){for(var t=De(1.4*o.length,A,w,Int32Array,-1,Int32Array),e=new Int32Array(o.length),n=0,r=o.length;n<r;++n)e[n]=t.maybeSet(n,n);return e}(),l=new Int32Array(o.length),c=new Int32Array(o.length),f=new Int32Array(o.length),h=new Int8Array(o.length),p=0;for(e=0,n=o.length;e<n;++e)l[e]=c[e]=f[e]=-1;for(e=0,n=a.length;e<n;++e){var d=a[e],m=d[0],g=d[1];for(r=u[m],i=u[++m],++p,h[r]=1;++m<=g;)_(e,r,r=i,i=u[m]);++p,h[i]=1}for(e=0,n=o.length;e<n;++e)l[e]=-1;for(e=0,n=s.length;e<n;++e){var y=s[e],v=y[0]+1,b=y[1];for(_(e,u[b-1],r=u[v-1],i=u[v]);++v<=b;)_(e,r,r=i,i=u[v])}function _(t,e,n,r){if(l[n]!==t){l[n]=t;var i=c[n];if(i>=0){var o=f[n];i===e&&o===r||i===r&&o===e||(++p,h[n]=1)}else c[n]=e,f[n]=r}}function A(t){return Ge(o[t])}function w(t,e){return Fe(o[t],o[e])}l=c=f=null;var x,E=function(t,e,n,r,i){3===arguments.length&&(r=Array,i=null);for(var o=new r(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),a=t-1,s=0;s<t;++s)o[s]=i;function u(r){for(var s=e(r)&a,u=o[s],l=0;u!=i;){if(n(u,r))return!0;if(++l>=t)throw new Error("full hashset");u=o[s=s+1&a]}return o[s]=r,!0}function l(r){for(var s=e(r)&a,u=o[s],l=0;u!=i;){if(n(u,r))return!0;if(++l>=t)break;u=o[s=s+1&a]}return!1}function c(){for(var t=[],e=0,n=o.length;e<n;++e){var r=o[e];r!=i&&t.push(r)}return t}return{add:u,has:l,values:c}}(1.4*p,Ge,Fe);for(e=0,n=o.length;e<n;++e)h[x=u[e]]&&E.add(o[x]);return E}function qe(t,e,n,r){He(t,e,n),He(t,e,e+r),He(t,e+r,n)}function He(t,e,n){for(var r,i=e+(n---e>>1);e<i;++e,--n)r=t[e],t[e]=t[n],t[n]=r}function We(t){var e,n,r={};for(e in t)r[e]=null==(n=t[e])?{type:null}:("FeatureCollection"===n.type?Xe:"Feature"===n.type?Ye:Ze)(n);return r}function Xe(t){var e={type:"GeometryCollection",geometries:t.features.map(Ye)};return null!=t.bbox&&(e.bbox=t.bbox),e}function Ye(t){var e,n=Ze(t.geometry);for(e in null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),t.properties){n.properties=t.properties;break}return n}function Ze(t){if(null==t)return{type:null};var e="GeometryCollection"===t.type?{type:"GeometryCollection",geometries:t.geometries.map(Ze)}:"Point"===t.type||"MultiPoint"===t.type?{type:t.type,coordinates:t.coordinates}:{type:t.type,arcs:t.coordinates};return null!=t.bbox&&(e.bbox=t.bbox),e}function Ke(t,e){var n=function(t){var e=1/0,n=1/0,r=-1/0,i=-1/0;function o(t){null!=t&&Ne.call(a,t.type)&&a[t.type](t)}var a={GeometryCollection:function(t){t.geometries.forEach(o)},Point:function(t){s(t.coordinates)},MultiPoint:function(t){t.coordinates.forEach(s)},LineString:function(t){u(t.arcs)},MultiLineString:function(t){t.arcs.forEach(u)},Polygon:function(t){t.arcs.forEach(u)},MultiPolygon:function(t){t.arcs.forEach(l)}};function s(t){var o=t[0],a=t[1];o<e&&(e=o),o>r&&(r=o),a<n&&(n=a),a>i&&(i=a)}function u(t){t.forEach(s)}function l(t){t.forEach(u)}for(var c in t)o(t[c]);return r>=e&&i>=n?[e,n,r,i]:void 0}(t=We(t)),r=e>0&&n&&function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=o-r?(n-1)/(o-r):1,u=a-i?(n-1)/(a-i):1;function l(t){return[Math.round((t[0]-r)*s),Math.round((t[1]-i)*u)]}function c(t,e){for(var n,o,a,l,c,f=-1,h=0,p=t.length,d=new Array(p);++f<p;)n=t[f],l=Math.round((n[0]-r)*s),c=Math.round((n[1]-i)*u),l===o&&c===a||(d[h++]=[o=l,a=c]);for(d.length=h;h<e;)h=d.push([d[0][0],d[0][1]]);return d}function f(t){return c(t,2)}function h(t){return c(t,4)}function p(t){return t.map(h)}function d(t){null!=t&&Ne.call(m,t.type)&&m[t.type](t)}var m={GeometryCollection:function(t){t.geometries.forEach(d)},Point:function(t){t.coordinates=l(t.coordinates)},MultiPoint:function(t){t.coordinates=t.coordinates.map(l)},LineString:function(t){t.arcs=f(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(f)},Polygon:function(t){t.arcs=p(t.arcs)},MultiPolygon:function(t){t.arcs=t.arcs.map(p)}};for(var g in t)d(t[g]);return{scale:[1/s,1/u],translate:[r,i]}}(t,n,e),i=function(t){var e,n,r,i,o=t.coordinates,a=t.lines,s=t.rings,u=a.length+s.length;for(delete t.lines,delete t.rings,r=0,i=a.length;r<i;++r)for(e=a[r];e=e.next;)++u;for(r=0,i=s.length;r<i;++r)for(n=s[r];n=n.next;)++u;var l=De(2*u*1.4,Ge,Fe),c=t.arcs=[];for(r=0,i=a.length;r<i;++r){e=a[r];do{f(e)}while(e=e.next)}for(r=0,i=s.length;r<i;++r)if((n=s[r]).next)do{f(n)}while(n=n.next);else h(n);function f(t){var e,n,r,i,a,s,u,f;if(r=l.get(e=o[t[0]]))for(u=0,f=r.length;u<f;++u)if(p(i=r[u],t))return t[0]=i[0],void(t[1]=i[1]);if(a=l.get(n=o[t[1]]))for(u=0,f=a.length;u<f;++u)if(d(s=a[u],t))return t[1]=s[0],void(t[0]=s[1]);r?r.push(t):l.set(e,[t]),a?a.push(t):l.set(n,[t]),c.push(t)}function h(t){var e,n,r,i,a;if(n=l.get(o[t[0]]))for(i=0,a=n.length;i<a;++i){if(m(r=n[i],t))return t[0]=r[0],void(t[1]=r[1]);if(g(r,t))return t[0]=r[1],void(t[1]=r[0])}if(n=l.get(e=o[t[0]+y(t)]))for(i=0,a=n.length;i<a;++i){if(m(r=n[i],t))return t[0]=r[0],void(t[1]=r[1]);if(g(r,t))return t[0]=r[1],void(t[1]=r[0])}n?n.push(t):l.set(e,[t]),c.push(t)}function p(t,e){var n=t[0],r=e[0],i=t[1];if(n-i!=r-e[1])return!1;for(;n<=i;++n,++r)if(!Fe(o[n],o[r]))return!1;return!0}function d(t,e){var n=t[0],r=e[0],i=t[1],a=e[1];if(n-i!=r-a)return!1;for(;n<=i;++n,--a)if(!Fe(o[n],o[a]))return!1;return!0}function m(t,e){var n=t[0],r=e[0],i=t[1]-n;if(i!==e[1]-r)return!1;for(var a=y(t),s=y(e),u=0;u<i;++u)if(!Fe(o[n+(u+a)%i],o[r+(u+s)%i]))return!1;return!0}function g(t,e){var n=t[0],r=e[0],i=t[1],a=e[1],s=i-n;if(s!==a-r)return!1;for(var u=y(t),l=s-y(e),c=0;c<s;++c)if(!Fe(o[n+(c+u)%s],o[a-(c+l)%s]))return!1;return!0}function y(t){for(var e=t[0],n=t[1],r=e,i=r,a=o[r];++r<n;){var s=o[r];(s[0]<a[0]||s[0]===a[0]&&s[1]<a[1])&&(i=r,a=s)}return i-e}return t}(function(t){var e,n,r,i=Ve(t),o=t.coordinates,a=t.lines,s=t.rings;for(n=0,r=a.length;n<r;++n)for(var u=a[n],l=u[0],c=u[1];++l<c;)i.has(o[l])&&(e={0:l,1:u[1]},u[1]=l,u=u.next=e);for(n=0,r=s.length;n<r;++n)for(var f=s[n],h=f[0],p=h,d=f[1],m=i.has(o[h]);++p<d;)i.has(o[p])&&(m?(e={0:p,1:f[1]},f[1]=p,f=f.next=e):(qe(o,h,d,d-p),o[d]=o[h],m=!0,p=h));return t}(function(t){var e=-1,n=[],r=[],i=[];function o(t){t&&Ne.call(a,t.type)&&a[t.type](t)}var a={GeometryCollection:function(t){t.geometries.forEach(o)},LineString:function(t){t.arcs=s(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(s)},Polygon:function(t){t.arcs=t.arcs.map(u)},MultiPolygon:function(t){t.arcs=t.arcs.map(l)}};function s(t){for(var r=0,o=t.length;r<o;++r)i[++e]=t[r];var a={0:e-o+1,1:e};return n.push(a),a}function u(t){for(var n=0,o=t.length;n<o;++n)i[++e]=t[n];var a={0:e-o+1,1:e};return r.push(a),a}function l(t){return t.map(u)}for(var c in t)o(t[c]);return{type:"Topology",coordinates:i,lines:n,rings:r,objects:t}}(t))),o=i.coordinates,a=De(1.4*i.arcs.length,$e,Je);function s(t){t&&Ne.call(u,t.type)&&u[t.type](t)}t=i.objects,i.bbox=n,i.arcs=i.arcs.map((function(t,e){return a.set(t,e),o.slice(t[0],t[1]+1)})),delete i.coordinates,o=null;var u={GeometryCollection:function(t){t.geometries.forEach(s)},LineString:function(t){t.arcs=l(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(l)},Polygon:function(t){t.arcs=t.arcs.map(l)},MultiPolygon:function(t){t.arcs=t.arcs.map(c)}};function l(t){var e=[];do{var n=a.get(t);e.push(t[0]<t[1]?n:~n)}while(t=t.next);return e}function c(t){return t.map(l)}for(var f in t)s(t[f]);return r&&(i.transform=r,i.arcs=function(t){for(var e=-1,n=t.length;++e<n;){for(var r,i,o=t[e],a=0,s=1,u=o.length,l=o[0],c=l[0],f=l[1];++a<u;)r=(l=o[a])[0],i=l[1],r===c&&i===f||(o[s++]=[r-c,i-f],c=r,f=i);1===s&&(o[s++]=[0,0]),o.length=s}return t}(i.arcs)),i}function $e(t){var e,n=t[0],r=t[1];return r<n&&(e=n,n=r,r=e),n+31*r}function Je(t,e){var n,r=t[0],i=t[1],o=e[0],a=e[1];return i<r&&(n=r,r=i,i=n),a<o&&(n=o,o=a,a=n),r===o&&i===a}function Qe(t,e){if(void 0===e&&(e={}),"FeatureCollection"!==ot(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==e.mutate&&void 0!==e.mutate||(t=Oe(t));var n=[];G(t,(function(t){n.push(t.geometry)}));var r=Ke({geoms:v(n).geometry});return function(t){return je(t,Re.apply(this,arguments))}(r,r.objects.geoms.geometries)}function tn(t,e){if(void 0===e&&(e={}),!T(e=e||{}))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==ot(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=Oe(t));var r=function(t){var e={};G(t,(function(t){e[t.geometry.type]=!0}));var n=Object.keys(e);return 1===n.length?n[0]:null}(t);if(!r)throw new Error("geojson must be homogenous");var i=t;switch(r){case"LineString":return ke(i,e);case"Polygon":return Qe(i,e);default:throw new Error(r+" is not supported")}}function en(t,e){void 0===e&&(e={});var n="object"==typeof e?e.mutate:e;if(!t)throw new Error("geojson is required");var r=ot(t),i=[];switch(r){case"LineString":i=nn(t);break;case"MultiLineString":case"Polygon":Q(t).forEach((function(t){i.push(nn(t))}));break;case"MultiPolygon":Q(t).forEach((function(t){var e=[];t.forEach((function(t){e.push(nn(t))})),i.push(e)}));break;case"Point":return t;case"MultiPoint":var o={};Q(t).forEach((function(t){var e=t.join("-");Object.prototype.hasOwnProperty.call(o,e)||(i.push(t),o[e]=!0)}));break;default:throw new Error(r+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=i,t):{type:r,coordinates:i}:!0===n?(t.geometry.coordinates=i,t):a({type:r,coordinates:i},t.properties,{bbox:t.bbox,id:t.id})}function nn(t){var e=Q(t);if(2===e.length&&!rn(e[0],e[1]))return e;var n=[],r=e.length-1,i=n.length;n.push(e[0]);for(var o=1;o<r;o++){var a=n[n.length-1];e[o][0]===a[0]&&e[o][1]===a[1]||(n.push(e[o]),(i=n.length)>2&&on(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),i=n.length,rn(e[0],e[e.length-1])&&i<4)throw new Error("invalid polygon");return on(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1),n}function rn(t,e){return t[0]===e[0]&&t[1]===e[1]}function on(t,e,n){var r=n[0],i=n[1],o=t[0],a=t[1],s=e[0],u=e[1],l=s-o,c=u-a;return 0===(r-o)*c-(i-a)*l&&(Math.abs(l)>=Math.abs(c)?l>0?o<=r&&r<=s:s<=r&&r<=o:c>0?a<=i&&i<=u:u<=i&&i<=a)}function an(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=t.x-r)*o+(a=t.y-i)*a}function sn(t,e,n,r,i){for(var o,a=r,s=e+1;s<n;s++){var u=an(t[s],t[e],t[n]);u>a&&(o=s,a=u)}a>r&&(o-e>1&&sn(t,e,o,r,i),i.push(t[o]),n-o>1&&sn(t,o,n,r,i))}function un(t,e){var n=t.length-1,r=[t[0]];return sn(t,0,n,e,r),r.push(t[n]),r}function ln(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return un(t=n?t:function(t,e){for(var n,r,i,o,a,s=t[0],u=[s],l=1,c=t.length;l<c;l++)i=s,o=void 0,a=void 0,(o=(r=n=t[l]).x-i.x)*o+(a=r.y-i.y)*a>e&&(u.push(n),s=n);return s!==n&&u.push(n),u}(t,r),r)}function cn(t,e,n){return ln(t.map((function(t){return{x:t[0],y:t[1],z:t[2]}})),e,n).map((function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]}))}function fn(t,e,n){return t.map((function(t){var r=t.map((function(t){return{x:t[0],y:t[1]}}));if(r.length<4)throw new Error("invalid polygon");for(var i=ln(r,e,n).map((function(t){return[t.x,t.y]}));!hn(i);)i=ln(r,e-=.01*e,n).map((function(t){return[t.x,t.y]}));return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i}))}function hn(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var pn=function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(e=0;e<this.length-1;e++){var n=this.points[e],r=this.points[e+1];this.centers.push({x:(n.x+r.x)/2,y:(n.y+r.y)/2,z:(n.z+r.z)/2})}for(this.controls.push([this.points[0],this.points[0]]),e=0;e<this.centers.length-1;e++){var i=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,o=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,a=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+a)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+a)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}return t.prototype.cacheSteps=function(t){var e=[],n=this.pos(0);e.push(0);for(var r=0;r<this.duration;r+=10){var i=this.pos(r);Math.sqrt((i.x-n.x)*(i.x-n.x)+(i.y-n.y)*(i.y-n.y)+(i.z-n.z)*(i.z-n.z))>t&&(e.push(r),n=i)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(n>=1)return this.points[this.length-1];var r=Math.floor((this.points.length-1)*n);return function(t,e,n,r,i){var o=function(t){var e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}(t);return{x:i.x*o[0]+r.x*o[1]+n.x*o[2]+e.x*o[3],y:i.y*o[0]+r.y*o[1]+n.y*o[2]+e.y*o[3],z:i.z*o[0]+r.z*o[1]+n.z*o[2]+e.z*o[3]}}((this.length-1)*n-r,this.points[r],this.controls[r][1],this.controls[r+1][0],this.points[r+1])},t}();function dn(t,e){void 0===e&&(e={});for(var n=e.resolution||1e4,r=e.sharpness||.85,i=[],o=it(t).coordinates.map((function(t){return{x:t[0],y:t[1]}})),a=new pn({duration:n,points:o,sharpness:r}),s=function(t){var e=a.pos(t);Math.floor(t/100)%2==0&&i.push([e.x,e.y])},u=0;u<a.duration;u+=10)s(u);return s(a.duration),h(i,e.properties)}function mn(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),i=Number(t[2]),o=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[n,r];return c([[a,[i,r],[i,o],[n,o],a]],e.properties,{bbox:t,id:e.id})}function gn(t){return mn($(t))}function yn(t){var e=t[0],n=t[1],r=t[2],i=t[3];if(_e(t.slice(0,2),[r,n])>=_e(t.slice(0,2),[e,i])){var o=(n+i)/2;return[e,o-(r-e)/2,r,o+(r-e)/2]}var a=(e+r)/2;return[a-(i-n)/2,n,a+(i-n)/2,i]}function vn(t,e,n,r){void 0===r&&(r={});var i=J(t),o=O(i[0]),a=O(i[1]),s=O(n),l=A(e,r.units),c=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return u([E(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(c))),E(c)],r.properties)}function bn(t,e,n){void 0===n&&(n={});for(var r=n.steps||64,i=n.properties?n.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},o=[],a=0;a<r;a++)o.push(vn(t,e,-360*a/r,n).geometry.coordinates);return o.push(o[0]),c([o],i)}function _n(t,e,n){if(void 0===n&&(n={}),!0===n.final)return function(t,e){var n=_n(e,t);return(n+180)%360}(t,e);var r=J(t),i=J(e),o=O(r[0]),a=O(i[0]),s=O(r[1]),u=O(i[1]),l=Math.sin(a-o)*Math.cos(u),c=Math.cos(s)*Math.sin(u)-Math.sin(s)*Math.cos(u)*Math.cos(a-o);return E(Math.atan2(l,c))}function An(t,e){void 0===e&&(e={});var n=$(t);return u([(n[0]+n[2])/2,(n[1]+n[3])/2],e.properties,e)}function wn(t,e){void 0===e&&(e={});var n=0,r=0,i=0;return j(t,(function(t){n+=t[0],r+=t[1],i++}),!0),u([n/i,r/i],e.properties)}function xn(t){var e=[];return"FeatureCollection"===t.type?D(t,(function(t){j(t,(function(n){e.push(u(n,t.properties))}))})):j(t,(function(n){e.push(u(n,t.properties))})),d(e)}var En=Sn,On=Sn;function Sn(t,e,n){n=n||2;var r,i,o,a,s,u,l,c=e&&e.length,f=c?e[0]*n:t.length,h=Pn(t,0,f,n,!0),p=[];if(!h)return p;if(c&&(h=function(t,e,n,r){var i,o,a,s=[];for(i=0,o=e.length;i<o;i++)(a=Pn(t,e[i]*r,i<o-1?e[i+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),s.push(Dn(a));for(s.sort(Mn),i=0;i<s.length;i++)Rn(s[i],n),n=Cn(n,n.next);return n}(t,e,h,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var d=n;d<f;d+=n)(s=t[d])<r&&(r=s),(u=t[d+1])<i&&(i=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-r,a-i))?1/l:0}return Tn(h,p,n,r,i,l),p}function Pn(t,e,n,r,i){var o,a;if(i===Yn(t,e,n,r)>0)for(o=e;o<n;o+=r)a=Hn(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=Hn(o,t[o],t[o+1],a);return a&&Un(a,a.next)&&(Wn(a),a=a.next),a}function Cn(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Un(r,r.next)&&0!==zn(r.prev,r,r.next))r=r.next;else{if(Wn(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Tn(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Nn(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,o);for(var s,u,l=t;t.prev!==t.next;)if(s=t.prev,u=t.next,o?In(t,r,i,o):kn(t))e.push(s.i/n),e.push(t.i/n),e.push(u.i/n),Wn(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?Tn(t=Ln(t,e,n),e,n,r,i,o,2):2===a&&jn(t,e,n,r,i,o):Tn(Cn(t),e,n,r,i,o,1);break}}}function kn(t){var e=t.prev,n=t,r=t.next;if(zn(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fn(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&zn(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function In(t,e,n,r){var i=t.prev,o=t,a=t.next;if(zn(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=Nn(s,u,e,n,r),h=Nn(l,c,e,n,r),p=t.prevZ,d=t.nextZ;p&&p.z>=f&&d&&d.z<=h;){if(p!==t.prev&&p!==t.next&&Fn(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&zn(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Fn(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&zn(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Fn(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&zn(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Fn(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&zn(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ln(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Un(i,o)&&Gn(i,r,r.next,o)&&Vn(i,o)&&Vn(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Wn(r),Wn(r.next),r=t=o),r=r.next}while(r!==t);return r}function jn(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Bn(a,s)){var u=qn(a,s);return a=Cn(a,a.next),u=Cn(u,u.next),Tn(a,e,n,r,i,o),void Tn(u,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function Mn(t,e){return t.x-e.x}function Rn(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var u,l=n,c=n.x,f=n.y,h=1/0;for(r=n.next;r!==l;)i>=r.x&&r.x>=c&&i!==r.x&&Fn(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&((u=Math.abs(o-r.y)/(i-r.x))<h||u===h&&r.x>n.x)&&Vn(r,t)&&(n=r,h=u),r=r.next;return n}(t,e)){var n=qn(e,t);Cn(n,n.next)}}function Nn(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Dn(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fn(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Bn(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Gn(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&Vn(t,e)&&Vn(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function zn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Un(t,e){return t.x===e.x&&t.y===e.y}function Gn(t,e,n,r){return!!(Un(t,e)&&Un(n,r)||Un(t,r)&&Un(n,e))||zn(t,e,n)>0!=zn(t,e,r)>0&&zn(n,r,t)>0!=zn(n,r,e)>0}function Vn(t,e){return zn(t.prev,t,t.next)<0?zn(t,e,t.next)>=0&&zn(t,t.prev,e)>=0:zn(t,e,t.prev)<0||zn(t,t.next,e)<0}function qn(t,e){var n=new Xn(t.i,t.x,t.y),r=new Xn(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Hn(t,e,n,r){var i=new Xn(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Wn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Xn(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Yn(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}function Zn(t){var e=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}(t),n=En(e.vertices,e.holes,2),r=[],i=[];n.forEach((function(t,r){var o=n[r];i.push([e.vertices[2*o],e.vertices[2*o+1]])}));for(var o=0;o<i.length;o+=3){var a=i.slice(o,o+3);a.push(i[o]),r.push(c([a]))}return r}function Kn(t,e){if(!t)throw new Error("targetPoint is required");if(!e)throw new Error("points is required");var n,r=1/0,i=0;return D(e,(function(e,n){var o=_e(t,e);o<r&&(i=n,r=o)})),(n=Oe(e.features[i])).properties.featureIndex=i,n.properties.distanceToPoint=r,n}function $n(t){if(!t)throw new Error("geojson is required");var e=[];return G(t,(function(t){!function(t,e){var n=[],r=t.geometry;if(null!==r){switch(r.type){case"Polygon":n=Q(r);break;case"LineString":n=[Q(r)]}n.forEach((function(n){(function(t,e){var n=[];return t.reduce((function(t,r){var i=h([t,r],e);return i.bbox=function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}(t,r),n.push(i),r})),n})(n,t.properties).forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),d(e)}Sn.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(Yn(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(Yn(t,l,c,n))}var f=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,p=r[s+1]*n,d=r[s+2]*n;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},Sn.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n},En.default=On;var Jn=Ut((function(t,e){function n(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function r(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function i(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:t},e,r)}function o(t,e,r){if(void 0===r&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:t},e,r)}function a(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function s(t,e,r){return void 0===r&&(r={}),n({type:"MultiLineString",coordinates:t},e,r)}function u(t,e,r){return void 0===r&&(r={}),n({type:"MultiPoint",coordinates:t},e,r)}function l(t,e,r){return void 0===r&&(r={}),n({type:"MultiPolygon",coordinates:t},e,r)}function c(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function f(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function h(t){return t%(2*Math.PI)*180/Math.PI}function p(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=n,e.geometry=function(t,e,n){switch(t){case"Point":return r(e).geometry;case"LineString":return o(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return u(e).geometry;case"MultiLineString":return s(e).geometry;case"MultiPolygon":return l(e).geometry;default:throw new Error(t+" is invalid")}},e.point=r,e.points=function(t,e,n){return void 0===n&&(n={}),a(t.map((function(t){return r(t,e)})),n)},e.polygon=i,e.polygons=function(t,e,n){return void 0===n&&(n={}),a(t.map((function(t){return i(t,e)})),n)},e.lineString=o,e.lineStrings=function(t,e,n){return void 0===n&&(n={}),a(t.map((function(t){return o(t,e)})),n)},e.featureCollection=a,e.multiLineString=s,e.multiPoint=u,e.multiPolygon=l,e.geometryCollection=function(t,e,r){return void 0===r&&(r={}),n({type:"GeometryCollection",geometries:t},e,r)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},e.radiansToLength=c,e.lengthToRadians=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(f(t,e),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}}));function Qn(t,e,n){if(null!==t)for(var r,i,o,a,s,u,l,c,f=0,h=0,p=t.type,d="FeatureCollection"===p,m="Feature"===p,g=d?t.features.length:1,y=0;y<g;y++){s=(c=!!(l=d?t.features[y].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var v=0;v<s;v++){var b=0,_=0;if(null!==(a=c?l.geometries[v]:l)){u=a.coordinates;var A=a.type;switch(f=!n||"Polygon"!==A&&"MultiPolygon"!==A?0:1,A){case null:break;case"Point":if(!1===e(u,h,y,b,_))return!1;h++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],h,y,b,_))return!1;h++,"MultiPoint"===A&&b++}"LineString"===A&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===e(u[r][i],h,y,b,_))return!1;h++}"MultiLineString"===A&&b++,"Polygon"===A&&_++}"Polygon"===A&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(_=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-f;o++){if(!1===e(u[r][i][o],h,y,b,_))return!1;h++}_++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Qn(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function tr(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function er(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function nr(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function rr(t,e){nr(t,(function(t,n,r,i,o){var a,s=null===t?null:t.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Jn.feature(t,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<t.coordinates.length;u++){var l={type:a,coordinates:t.coordinates[u]};if(!1===e(Jn.feature(l,r),n,u))return!1}}))}function ir(t,e){rr(t,(function(t,n,r){var i=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,u=0,l=0;return!1!==Qn(t,(function(o,c,f,h,p){if(void 0===a||n>s||h>u||p>l)return a=o,s=n,u=h,l=p,void(i=0);var d=Jn.lineString([a,o],t.properties);if(!1===e(d,n,r,p,i))return!1;i++,a=o}))&&void 0}}}))}function or(t,e){if(!t)throw new Error("geojson is required");rr(t,(function(t,n,r){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===e(Jn.lineString(o[a],t.properties),n,r,a))return!1}}}))}var ar=function(t){var e=[];return Qn(t,(function(t){e.push(t)})),e},sr=Qn,ur=function(t,e,n,r){var i=n;return Qn(t,(function(t,r,o,a,s){i=0===r&&void 0===n?t:e(i,t,r,o,a,s)}),r),i},lr=er,cr=function(t,e,n){var r=n;return er(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r},fr=function(t,e){if(e=e||{},!Jn.isObject(e))throw new Error("options is invalid");var n,r=e.featureIndex||0,i=e.multiFeatureIndex||0,o=e.geometryIndex||0,a=e.coordIndex||0,s=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),s=s||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":s=s||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":return Jn.point(u,s,e);case"MultiPoint":return i<0&&(i=u.length+i),Jn.point(u[i],s,e);case"LineString":return a<0&&(a=u.length+a),Jn.point(u[a],s,e);case"Polygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),Jn.point(u[o][a],s,e);case"MultiLineString":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a),Jn.point(u[i][a],s,e);case"MultiPolygon":return i<0&&(i=u.length+i),o<0&&(o=u[i].length+o),a<0&&(a=u[i][o].length-a),Jn.point(u[i][o][a],s,e)}throw new Error("geojson is invalid")},hr=function(t,e){if(e=e||{},!Jn.isObject(e))throw new Error("options is invalid");var n,r=e.featureIndex||0,i=e.multiFeatureIndex||0,o=e.geometryIndex||0,a=e.segmentIndex||0,s=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),s=s||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":s=s||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),Jn.lineString([u[a],u[a+1]],s,e);case"Polygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),Jn.lineString([u[o][a],u[o][a+1]],s,e);case"MultiLineString":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a-1),Jn.lineString([u[i][a],u[i][a+1]],s,e);case"MultiPolygon":return i<0&&(i=u.length+i),o<0&&(o=u[i].length+o),a<0&&(a=u[i][o].length-a-1),Jn.lineString([u[i][o][a],u[i][o][a+1]],s,e)}throw new Error("geojson is invalid")},pr=rr,dr=function(t,e,n){var r=n;return rr(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r},mr=nr,gr=function(t,e,n){var r=n;return nr(t,(function(t,i,o,a,s){r=0===i&&void 0===n?t:e(r,t,i,o,a,s)})),r},yr=or,vr=function(t,e,n){var r=n;return or(t,(function(t,i,o,a){r=0===i&&void 0===n?t:e(r,t,i,o,a)})),r},br=tr,_r=function(t,e,n){var r=n;return tr(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r},Ar=ir,wr=function(t,e,n){var r=n,i=!1;return ir(t,(function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0})),r},xr=Object.defineProperty({coordAll:ar,coordEach:sr,coordReduce:ur,featureEach:lr,featureReduce:cr,findPoint:fr,findSegment:hr,flattenEach:pr,flattenReduce:dr,geomEach:mr,geomReduce:gr,lineEach:yr,lineReduce:vr,propEach:br,propReduce:_r,segmentEach:Ar,segmentReduce:wr},"__esModule",{value:!0});function Er(t){var e=[1/0,1/0,-1/0,-1/0];return xr.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}Er.default=Er;var Or=Er,Sr=Object.defineProperty({default:Or},"__esModule",{value:!0}).default,Pr=xr.featureEach,Cr=(xr.coordEach,Jn.polygon,Jn.featureCollection);function Tr(t){var e=St(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:Sr(t),St.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:Sr(t),e.push(t)})):Pr(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:Sr(t),e.push(t)})),St.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:Sr(t),St.prototype.remove.call(this,t,e)},e.clear=function(){return St.prototype.clear.call(this)},e.search=function(t){var e=St.prototype.search.call(this,this.toBBox(t));return Cr(e)},e.collides=function(t){return St.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=St.prototype.all.call(this);return Cr(t)},e.toJSON=function(){return St.prototype.toJSON.call(this)},e.fromJSON=function(t){return St.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=Sr(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=Sr(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}var kr=Tr,Ir=Tr;function Lr(t,e){var n={},r=[];if("LineString"===t.type&&(t=a(t)),"LineString"===e.type&&(e=a(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var i=jr(t,e);return i&&r.push(i),d(r)}var o=kr();return o.load($n(e)),D($n(t),(function(t){D(o.search(t),(function(e){var i=jr(t,e);if(i){var o=Q(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),d(r)}function jr(t,e){var n=Q(t),r=Q(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],a=n[1][0],s=n[1][1],l=r[0][0],c=r[0][1],f=r[1][0],h=r[1][1],p=(h-c)*(a-i)-(f-l)*(s-o);if(0===p)return null;var d=((f-l)*(o-c)-(h-c)*(i-l))/p,m=((a-i)*(o-c)-(s-o)*(i-l))/p;return d>=0&&d<=1&&m>=0&&m<=1?u([i+d*(a-i),o+d*(s-o)]):null}function Mr(t,e,n){void 0===n&&(n={});var r=u([1/0,1/0],{dist:1/0}),i=0;return G(t,(function(t){for(var o=Q(t),a=0;a<o.length-1;a++){var s=u(o[a]);s.properties.dist=_e(e,s,n);var l=u(o[a+1]);l.properties.dist=_e(e,l,n);var c=_e(s,l,n),f=Math.max(s.properties.dist,l.properties.dist),p=_n(s,l),d=vn(e,f,p+90,n),m=vn(e,f,p-90,n),g=Lr(h([d.geometry.coordinates,m.geometry.coordinates]),h([s.geometry.coordinates,l.geometry.coordinates])),y=null;g.features.length>0&&((y=g.features[0]).properties.dist=_e(e,y,n),y.properties.location=i+_e(s,y,n)),s.properties.dist<r.properties.dist&&((r=s).properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=a+1,r.properties.location=i+c),y&&y.properties.dist<r.properties.dist&&((r=y).properties.index=a),i+=c}})),r}function Rr(t,e,r){void 0===r&&(r={});var i=J(t),o=J(e);return o[0]+=o[0]-i[0]>180?-360:i[0]-o[0]>180?360:0,S(function(t,e,r){var i=r=void 0===r?n:Number(r),o=t[1]*Math.PI/180,a=e[1]*Math.PI/180,s=a-o,u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var l=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?s/l:Math.cos(o);return Math.sqrt(s*s+c*c*u*u)*i}(i,o),"meters",r.units)}function Nr(t,e,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=u(t):"Point"===t.type?t=a(t):nt(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=h(e):"LineString"===e.type?e=a(e):nt(e,"LineString","line");var r=1/0,i=t.geometry.coordinates;return q(e,(function(t){var e=t.geometry.coordinates[0],o=t.geometry.coordinates[1],a=function(t,e,n,r){var i=[n[0]-e[0],n[1]-e[1]],o=Dr([t[0]-e[0],t[1]-e[1]],i);if(o<=0)return Fr(t,e,{method:r.method,units:"degrees"});var a=Dr(i,i);if(a<=o)return Fr(t,n,{method:r.method,units:"degrees"});var s=o/a;return Fr(t,[e[0]+s*i[0],e[1]+s*i[1]],{method:r.method,units:"degrees"})}(i,e,o,n);a<r&&(r=a)})),S(r,"degrees",n.units)}function Dr(t,e){return t[0]*e[0]+t[1]*e[1]}function Fr(t,e,n){return"planar"===n.method?Rr(t,e,n):_e(t,e,n)}function Br(t,e,n,r,i,o,a,s){var u,l,c,f,h={x:null,y:null,onLine1:!1,onLine2:!1};return 0===(u=(s-o)*(n-t)-(a-i)*(r-e))?null!==h.x&&null!==h.y&&h:(f=(n-t)*(l=e-o)-(r-e)*(c=t-i),l=((a-i)*l-(s-o)*c)/u,c=f/u,h.x=t+l*(n-t),h.y=e+l*(r-e),l>=0&&l<=1&&(h.onLine1=!0),c>=0&&c<=1&&(h.onLine2=!0),!(!h.onLine1||!h.onLine2)&&[h.x,h.y])}function zr(t){for(var e=function(t){return"FeatureCollection"!==t.type?"Feature"!==t.type?d([a(t)]):d([t]):t}(t),n=An(e),r=!1,i=0;!r&&i<e.features.length;){var o,s=e.features[i].geometry,l=!1;if("Point"===s.type)n.geometry.coordinates[0]===s.coordinates[0]&&n.geometry.coordinates[1]===s.coordinates[1]&&(r=!0);else if("MultiPoint"===s.type){var c=!1;for(o=0;!c&&o<s.coordinates.length;)n.geometry.coordinates[0]===s.coordinates[o][0]&&n.geometry.coordinates[1]===s.coordinates[o][1]&&(r=!0,c=!0),o++}else if("LineString"===s.type)for(o=0;!l&&o<s.coordinates.length-1;)Ur(n.geometry.coordinates[0],n.geometry.coordinates[1],s.coordinates[o][0],s.coordinates[o][1],s.coordinates[o+1][0],s.coordinates[o+1][1])&&(l=!0,r=!0),o++;else if("MultiLineString"===s.type)for(var f=0;f<s.coordinates.length;){l=!1,o=0;for(var h=s.coordinates[f];!l&&o<h.length-1;)Ur(n.geometry.coordinates[0],n.geometry.coordinates[1],h[o][0],h[o][1],h[o+1][0],h[o+1][1])&&(l=!0,r=!0),o++;f++}else"Polygon"!==s.type&&"MultiPolygon"!==s.type||ye(n,s)&&(r=!0);i++}if(r)return n;var p=d([]);for(i=0;i<e.features.length;i++)p.features=p.features.concat(xn(e.features[i]).features);return u(Kn(n,p).geometry.coordinates)}function Ur(t,e,n,r,i,o){return Math.sqrt((i-n)*(i-n)+(o-r)*(o-r))===Math.sqrt((t-n)*(t-n)+(e-r)*(e-r))+Math.sqrt((i-t)*(i-t)+(o-e)*(o-e))}kr.default=Ir;var Gr=6378137;function Vr(t){return U(t,(function(t,e){return t+function(t){var e,n=0;switch(t.type){case"Polygon":return qr(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)n+=qr(t.coordinates[e]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(e)}),0)}function qr(t){var e=0;if(t&&t.length>0){e+=Math.abs(Hr(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(Hr(t[n]))}return e}function Hr(t){var e,n,r,i,o,a,s=0,u=t.length;if(u>2){for(a=0;a<u;a++)a===u-2?(r=u-2,i=u-1,o=0):a===u-1?(r=u-1,i=0,o=1):(r=a,i=a+1,o=a+2),e=t[r],n=t[i],s+=(Wr(t[o][0])-Wr(e[0]))*Math.sin(Wr(n[1]));s=s*Gr*Gr/2}return s}function Wr(t){return t*Math.PI/180}function Xr(t,e){return void 0===e&&(e={}),H(t,(function(t,n){var r=n.geometry.coordinates;return t+_e(r[0],r[1],e)}),0)}function Yr(t,e,n,r){if(!T(r=r||{}))throw new Error("options is invalid");var i,o=[];if("Feature"===t.type)i=t.geometry.coordinates;else{if("LineString"!==t.type)throw new Error("input must be a LineString Feature or Geometry");i=t.coordinates}for(var a,s,u,l=i.length,c=0,f=0;f<i.length&&!(e>=c&&f===i.length-1);f++){if(c>e&&0===o.length){if(!(a=e-c))return o.push(i[f]),h(o);s=_n(i[f],i[f-1])-180,u=vn(i[f],a,s,r),o.push(u.geometry.coordinates)}if(c>=n)return(a=n-c)?(s=_n(i[f],i[f-1])-180,u=vn(i[f],a,s,r),o.push(u.geometry.coordinates),h(o)):(o.push(i[f]),h(o));if(c>=e&&o.push(i[f]),f===i.length-1)return h(o);c+=_e(i[f],i[f+1],r)}if(c<e&&i.length===l)throw new Error("Start position is beyond line");var p=i[i.length-1];return h([p,p])}function Zr(t,e,n){void 0===n&&(n={});for(var r=J(t),i=Q(e),o=0;o<i.length-1;o++){var a=!1;if(n.ignoreEndVertices&&(0===o&&(a="start"),o===i.length-2&&(a="end"),0===o&&o+1===i.length-1&&(a="both")),Kr(i[o],i[o+1],r,a,void 0===n.epsilon?null:n.epsilon))return!0}return!1}function Kr(t,e,n,r,i){var o=n[0],a=n[1],s=t[0],u=t[1],l=e[0],c=e[1],f=l-s,h=c-u,p=(n[0]-s)*h-(n[1]-u)*f;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(f)>=Math.abs(h)?f>0?s<o&&o<=l:l<=o&&o<s:h>0?u<a&&a<=c:c<=a&&a<u:"end"===r?Math.abs(f)>=Math.abs(h)?f>0?s<=o&&o<l:l<o&&o<=s:h>0?u<=a&&a<c:c<a&&a<=u:"both"===r&&(Math.abs(f)>=Math.abs(h)?f>0?s<o&&o<l:l<o&&o<s:h>0?u<a&&a<c:c<a&&a<u):Math.abs(f)>=Math.abs(h)?f>0?s<=o&&o<=l:l<=o&&o<=s:h>0?u<=a&&a<=c:c<=a&&a<=u}function $r(t,e){var n=it(t),r=it(e),i=n.type,o=r.type;switch(i){case"Point":switch(o){case"MultiPoint":return function(t,e){var n,r=!1;for(n=0;n<e.coordinates.length;n++)if(Qr(e.coordinates[n],t.coordinates)){r=!0;break}return r}(n,r);case"LineString":return Zr(n,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return ye(n,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return function(t,e){for(var n=0;n<t.coordinates.length;n++){for(var r=!1,i=0;i<e.coordinates.length;i++)Qr(t.coordinates[n],e.coordinates[i])&&(r=!0);if(!r)return!1}return!0}(n,r);case"LineString":return function(t,e){for(var n=!1,r=0;r<t.coordinates.length;r++){if(!Zr(t.coordinates[r],e))return!1;n||(n=Zr(t.coordinates[r],e,{ignoreEndVertices:!0}))}return n}(n,r);case"Polygon":case"MultiPolygon":return function(t,e){for(var n=!0,r=!1,i=0;i<t.coordinates.length;i++){if(!(r=ye(t.coordinates[1],e))){n=!1;break}r=ye(t.coordinates[1],e,{ignoreBoundary:!0})}return n&&r}(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return function(t,e){for(var n=0;n<t.coordinates.length;n++)if(!Zr(t.coordinates[n],e))return!1;return!0}(n,r);case"Polygon":case"MultiPolygon":return function(t,e){if(!Jr($(e),$(t)))return!1;for(var n=!1,r=0;r<t.coordinates.length-1;r++){if(!ye(t.coordinates[r],e))return!1;n||(n=ye(t.coordinates[r],e,{ignoreBoundary:!0})),n||(n=ye(ti(t.coordinates[r],t.coordinates[r+1]),e,{ignoreBoundary:!0}))}return n}(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return function(t,e){var n=$(t);if(!Jr($(e),n))return!1;for(var r=0;r<t.coordinates[0].length;r++)if(!ye(t.coordinates[0][r],e))return!1;return!0}(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Jr(t,e){return!(t[0]>e[0])&&!(t[2]<e[2])&&!(t[1]>e[1])&&!(t[3]<e[3])}function Qr(t,e){return t[0]===e[0]&&t[1]===e[1]}function ti(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}function ei(t,e,n){void 0===n&&(n={}),n.mask&&!n.units&&(n.units="kilometers");for(var r=[],i=t[0],o=t[1],a=t[2],s=t[3],l=e/_e([i,o],[a,o],n)*(a-i),c=e/_e([i,o],[i,s],n)*(s-o),f=a-i,h=s-o,p=Math.floor(f/l),m=(h-Math.floor(h/c)*c)/2,g=i+(f-p*l)/2;g<=a;){for(var y=o+m;y<=s;){var v=u([g,y],n.properties);n.mask?$r(v,n.mask)&&r.push(v):r.push(v),y+=c}g+=l}return d(r)}function ni(t,e){void 0===e&&(e={});var n=e.precision,r=e.coordinates,i=e.mutate;if(n=null==n||isNaN(n)?6:n,r=null==r||isNaN(r)?3:r,!t)throw new Error("<geojson> is required");if("number"!=typeof n)throw new Error("<precision> must be a number");if("number"!=typeof r)throw new Error("<coordinates> must be a number");!1!==i&&void 0!==i||(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,n);return j(t,(function(t){!function(t,e,n){t.length>n&&t.splice(n,t.length);for(var r=0;r<t.length;r++)t[r]=Math.round(t[r]*e)/e}(t,o,r)})),t}function ri(t){if(!t)throw new Error("geojson is required");var e=[];return G(t,(function(t){e.push(t)})),d(e)}function ii(t,e,n){if("Polygon"!==t.geometry.type)throw new Error("The input feature must be a Polygon");void 0===n&&(n=1);var r=t.geometry.coordinates,i=[],o={};if(n){for(var a=[],s=0;s<r.length;s++)for(var u=0;u<r[s].length-1;u++)a.push(m(s,u));var l=St();l.load(a)}for(var c=0;c<r.length;c++)for(var f=0;f<r[c].length-1;f++)if(n)l.search(m(c,f)).forEach((function(t){var e=t.ring,n=t.edge;d(c,f,e,n)}));else for(var h=0;h<r.length;h++)for(var p=0;p<r[h].length-1;p++)d(c,f,h,p);return e||(i={type:"Feature",geometry:{type:"MultiPoint",coordinates:i}}),i;function d(t,n,a,s){var u,l,c=r[t][n],f=r[t][n+1],h=r[a][s],p=r[a][s+1],d=function(t,e,n,r){if(oi(t,n)||oi(t,r)||oi(e,n)||oi(r,n))return null;var i=t[0],o=t[1],a=e[0],s=e[1],u=n[0],l=n[1],c=r[0],f=r[1],h=(i-a)*(l-f)-(o-s)*(u-c);return 0===h?null:[((i*s-o*a)*(u-c)-(i-a)*(u*f-l*c))/h,((i*s-o*a)*(l-f)-(o-s)*(u*f-l*c))/h]}(c,f,h,p);if(null!==d&&(u=f[0]!==c[0]?(d[0]-c[0])/(f[0]-c[0]):(d[1]-c[1])/(f[1]-c[1]),l=p[0]!==h[0]?(d[0]-h[0])/(p[0]-h[0]):(d[1]-h[1])/(p[1]-h[1]),!(u>=1||u<=0||l>=1||l<=0))){var m=d,g=!o[m];g&&(o[m]=!0),e?i.push(e(d,t,n,c,f,u,a,s,h,p,l,g)):i.push(d)}}function m(t,e){var n,i,o,a,s=r[t][e],u=r[t][e+1];return s[0]<u[0]?(n=s[0],i=u[0]):(n=u[0],i=s[0]),s[1]<u[1]?(o=s[1],a=u[1]):(o=u[1],a=s[1]),{minX:n,minY:o,maxX:i,maxY:a,ring:t,edge:e}}}function oi(t,e){if(!t||!e)return!1;if(t.length!==e.length)return!1;for(var n=0,r=t.length;n<r;n++)if(t[n]instanceof Array&&e[n]instanceof Array){if(!oi(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function ai(t){if("Feature"!=t.type)throw new Error("The input must a geojson object of type Feature");if(void 0===t.geometry||null==t.geometry)throw new Error("The input must a geojson object with a non-empty geometry");if("Polygon"!=t.geometry.type)throw new Error("The input must be a geojson Polygon");for(var e=t.geometry.coordinates.length,n=[],r=0;r<e;r++){var i=t.geometry.coordinates[r];fi(i[0],i[i.length-1])||i.push(i[0]),n.push.apply(n,i.slice(0,i.length-1))}if(!function(t){for(var e={},n=1,r=0,i=t.length;r<i;++r){if(Object.prototype.hasOwnProperty.call(e,t[r])){n=0;break}e[t[r]]=1}return n}(n))throw new Error("The input polygon may not have duplicate vertices (except for the first and last vertex of each ring)");var o=n.length,a=ii(t,(function(t,e,n,r,i,o,a,s,u,l,c,f){return[t,e,n,r,i,o,a,s,u,l,c,f]})),s=a.length;if(0==s){var u=[];for(r=0;r<e;r++)u.push(c([t.geometry.coordinates[r]],{parent:-1,winding:ci(t.geometry.coordinates[r])}));var l=d(u);return F(),B(),l}var f=[],h=[];for(r=0;r<e;r++){f.push([]);for(var p=0;p<t.geometry.coordinates[r].length-1;p++)f[r].push([new si(t.geometry.coordinates[r][hi(p+1,t.geometry.coordinates[r].length-1)],1,[r,p],[r,hi(p+1,t.geometry.coordinates[r].length-1)],void 0)]),h.push(new ui(t.geometry.coordinates[r][p],[r,hi(p-1,t.geometry.coordinates[r].length-1)],[r,p],void 0,void 0,!1,!0))}for(r=0;r<s;r++)f[a[r][1]][a[r][2]].push(new si(a[r][0],a[r][5],[a[r][1],a[r][2]],[a[r][6],a[r][7]],void 0)),a[r][11]&&h.push(new ui(a[r][0],[a[r][1],a[r][2]],[a[r][6],a[r][7]],void 0,void 0,!0,!0));var m=h.length;for(r=0;r<f.length;r++)for(p=0;p<f[r].length;p++)f[r][p].sort((function(t,e){return t.param<e.param?-1:1}));var g=[];for(r=0;r<m;r++)g.push({minX:h[r].coord[0],minY:h[r].coord[1],maxX:h[r].coord[0],maxY:h[r].coord[1],index:r});var y=St();for(y.load(g),r=0;r<f.length;r++)for(p=0;p<f[r].length;p++)for(var v=0;v<f[r][p].length;v++){_=v==f[r][p].length-1?f[r][hi(p+1,t.geometry.coordinates[r].length-1)][0].coord:f[r][p][v+1].coord;var b=y.search({minX:_[0],minY:_[1],maxX:_[0],maxY:_[1]})[0];f[r][p][v].nxtIsectAlongEdgeIn=b.index}for(r=0;r<f.length;r++)for(p=0;p<f[r].length;p++)for(v=0;v<f[r][p].length;v++){var _=f[r][p][v].coord,A=(b=y.search({minX:_[0],minY:_[1],maxX:_[0],maxY:_[1]})[0]).index;A<o?h[A].nxtIsectAlongRingAndEdge2=f[r][p][v].nxtIsectAlongEdgeIn:fi(h[A].ringAndEdge1,f[r][p][v].ringAndEdgeIn)?h[A].nxtIsectAlongRingAndEdge1=f[r][p][v].nxtIsectAlongEdgeIn:h[A].nxtIsectAlongRingAndEdge2=f[r][p][v].nxtIsectAlongEdgeIn}var w=[];for(r=0,p=0;p<e;p++){var x=r;for(v=0;v<t.geometry.coordinates[p].length-1;v++)h[r].coord[0]<h[x].coord[0]&&(x=r),r++;var E=h[x].nxtIsectAlongRingAndEdge2;for(v=0;v<h.length;v++)if(h[v].nxtIsectAlongRingAndEdge1==x||h[v].nxtIsectAlongRingAndEdge2==x){var O=v;break}var S=li([h[O].coord,h[x].coord,h[E].coord],!0)?1:-1;w.push({isect:x,parent:-1,winding:S})}for(w.sort((function(t,e){return h[t.isect].coord>h[e.isect].coord?-1:1})),u=[];w.length>0;){var P=w.pop(),C=P.isect,T=P.parent,k=P.winding,I=u.length,L=[h[C].coord],j=C;if(h[C].ringAndEdge1Walkable)var M=h[C].ringAndEdge1,R=h[C].nxtIsectAlongRingAndEdge1;else M=h[C].ringAndEdge2,R=h[C].nxtIsectAlongRingAndEdge2;for(;!fi(h[C].coord,h[R].coord);){L.push(h[R].coord);var N=void 0;for(r=0;r<w.length;r++)if(w[r].isect==R){N=r;break}if(null!=N&&w.splice(N,1),fi(M,h[R].ringAndEdge1)){if(M=h[R].ringAndEdge2,h[R].ringAndEdge2Walkable=!1,h[R].ringAndEdge1Walkable){var D={isect:R};li([h[j].coord,h[R].coord,h[h[R].nxtIsectAlongRingAndEdge2].coord],1==k)?(D.parent=T,D.winding=-k):(D.parent=I,D.winding=k),w.push(D)}j=R,R=h[R].nxtIsectAlongRingAndEdge2}else M=h[R].ringAndEdge1,h[R].ringAndEdge1Walkable=!1,h[R].ringAndEdge2Walkable&&(D={isect:R},li([h[j].coord,h[R].coord,h[h[R].nxtIsectAlongRingAndEdge1].coord],1==k)?(D.parent=T,D.winding=-k):(D.parent=I,D.winding=k),w.push(D)),j=R,R=h[R].nxtIsectAlongRingAndEdge1}L.push(h[R].coord),u.push(c([L],{index:I,parent:T,winding:k,netWinding:void 0}))}function F(){for(var t=[],e=0;e<l.features.length;e++)-1==l.features[e].properties.parent&&t.push(e);if(t.length>1)for(e=0;e<t.length;e++){for(var n=-1,r=0;r<l.features.length;r++)t[e]!=r&&ye(l.features[t[e]].geometry.coordinates[0][0],l.features[r],{ignoreBoundary:!0})&&Vr(l.features[r])<1/0&&(n=r);l.features[t[e]].properties.parent=n}}function B(){for(var t=0;t<l.features.length;t++)if(-1==l.features[t].properties.parent){var e=l.features[t].properties.winding;l.features[t].properties.netWinding=e,z(t,e)}}function z(t,e){for(var n=0;n<l.features.length;n++)if(l.features[n].properties.parent==t){var r=e+l.features[n].properties.winding;l.features[n].properties.netWinding=r,z(n,r)}}return l=d(u),F(),B(),l}var si=function(t,e,n,r,i){this.coord=t,this.param=e,this.ringAndEdgeIn=n,this.ringAndEdgeOut=r,this.nxtIsectAlongEdgeIn=i},ui=function(t,e,n,r,i,o,a){this.coord=t,this.ringAndEdge1=e,this.ringAndEdge2=n,this.nxtIsectAlongRingAndEdge1=r,this.nxtIsectAlongRingAndEdge2=i,this.ringAndEdge1Walkable=o,this.ringAndEdge2Walkable=a};function li(t,e){if(void 0===e&&(e=!0),3!=t.length)throw new Error("This function requires an array of three points [x,y]");return(t[1][0]-t[0][0])*(t[2][1]-t[0][1])-(t[1][1]-t[0][1])*(t[2][0]-t[0][0])>=0==e}function ci(t){for(var e=0,n=0;n<t.length-1;n++)t[n][0]<t[e][0]&&(e=n);if(li([t[hi(e-1,t.length-1)],t[e],t[hi(e+1,t.length-1)]],!0))var r=1;else r=-1;return r}function fi(t,e){if(!t||!e)return!1;if(t.length!=e.length)return!1;for(var n=0,r=t.length;n<r;n++)if(t[n]instanceof Array&&e[n]instanceof Array){if(!fi(t[n],e[n]))return!1}else if(t[n]!=e[n])return!1;return!0}function hi(t,e){return(t%e+e)%e}var pi=Math.PI/180,di=180/Math.PI,mi=function(t,e){this.lon=t,this.lat=e,this.x=pi*t,this.y=pi*e};mi.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},mi.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new mi(e,t)};var gi=function(){this.coords=[],this.length=0};gi.prototype.move_to=function(t){this.length++,this.coords.push(t)};var yi=function(t){this.properties=t||{},this.geometries=[]};yi.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},yi.prototype.wkt=function(){for(var t="",e="LINESTRING(",n=function(t){e+=t[0]+" "+t[1]+","},r=0;r<this.geometries.length;r++){if(0===this.geometries[r].coords.length)return"LINESTRING(empty)";this.geometries[r].coords.forEach(n),t+=e.substring(0,e.length-1)+")"}return t};var vi=function(t,e,n){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new mi(t.x,t.y),this.end=new mi(e.x,e.y),this.properties=n||{};var r=this.start.x-this.end.x,i=this.start.y-this.end.y,o=Math.pow(Math.sin(i/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(r/2),2);if(this.g=2*Math.asin(Math.sqrt(o)),this.g===Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)};function bi(t,e){var n=[],r=kr();return G(e,(function(e){if(n.forEach((function(t,e){t.id=e})),n.length){var i=r.search(e);if(i.features.length){var o=Ai(e,i);n=n.filter((function(t){return t.id!==o.id})),r.remove(o),D(_i(o,e),(function(t){n.push(t),r.insert(t)}))}}else(n=_i(t,e).features).forEach((function(t){t.bbox||(t.bbox=yn($(t)))})),r.load(d(n))})),d(n)}function _i(t,e){var n=[],r=Q(t)[0],i=Q(t)[t.geometry.coordinates.length-1];if(wi(r,J(e))||wi(i,J(e)))return d([t]);var o=kr(),a=$n(t);o.load(a);var s=o.search(e);if(!s.features.length)return d([t]);var u=Ai(e,s),l=F(a,(function(t,r,i){var o=Q(r)[1],a=J(e);return i===u.id?(t.push(a),n.push(h(t)),wi(a,o)?[a]:[a,o]):(t.push(o),t)}),[r]);return l.length>1&&n.push(h(l)),d(n)}function Ai(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var n,r=1/0;return D(e,(function(e){var i=Mr(e,t).properties.dist;i<r&&(n=e,r=i)})),n}function wi(t,e){return t[0]===e[0]&&t[1]===e[1]}function xi(t,e,n,r,i){void 0===i&&(i={});var o=i.steps||64,a=Ei(n),s=Ei(r),u=Array.isArray(t)||"Feature"!==t.type?{}:t.properties;if(a===s)return h(bn(t,e,i).geometry.coordinates[0],u);for(var l=a,c=a<s?s:s+360,f=l,p=[],d=0;f<c;)p.push(vn(t,e,f,i).geometry.coordinates),f=l+360*++d/o;return f>c&&p.push(vn(t,e,c,i).geometry.coordinates),h(p,u)}function Ei(t){var e=t%360;return e<0&&(e+=360),e}function Oi(t,e){void 0===e&&(e={});var n=it(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return Si(n,e);case"MultiPolygon":return function(t,e){void 0===e&&(e={});var n=it(t).coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{},i=[];return n.forEach((function(t){i.push(Pi(t,r))})),d(i)}(n,e);default:throw new Error("invalid poly")}}function Si(t,e){return void 0===e&&(e={}),Pi(it(t).coordinates,e.properties?e.properties:"Feature"===t.type?t.properties:{})}function Pi(t,e){return t.length>1?m(t,e):h(t[0],e)}function Ci(t,e){var n,r,i;void 0===e&&(e={});var o=e.properties,a=null===(n=e.autoComplete)||void 0===n||n,s=null===(r=e.orderCoords)||void 0===r||r;if("FeatureCollection"===(null!==(i=e.mutate)&&void 0!==i&&i||(t=Oe(t)),t.type)){var u=[];return t.features.forEach((function(t){u.push(Q(Ti(t,{},a,s)))})),y(u,o)}return Ti(t,o,a,s)}function Ti(t,e,n,r){e=e||("Feature"===t.type?t.properties:{});var i=it(t),o=i.coordinates,a=i.type;if(!o.length)throw new Error("line must contain coordinates");switch(a){case"LineString":return n&&(o=ki(o)),c([o],e);case"MultiLineString":var s=[],u=0;return o.forEach((function(t){if(n&&(t=ki(t)),r){var e=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.abs(e-r)*Math.abs(n-i)}($(h(t)));e>u?(s.unshift(t),u=e):s.push(t)}else s.push(t)})),c(s,e);default:throw new Error("geometry type "+a+" is not supported")}}function ki(t){var e=t[0],n=e[0],r=e[1],i=t[t.length-1],o=i[0],a=i[1];return n===o&&r===a||t.push(e),t}function Ii(t,e){var n,r,i,o,a,s,u;for(r=1;r<=8;r*=2){for(n=[],o=!(ji(i=t[t.length-1],e)&r),a=0;a<t.length;a++)(u=!(ji(s=t[a],e)&r))!==o&&n.push(Li(i,s,r,e)),u&&n.push(s),i=s,o=u;if(!(t=n).length)break}return n}function Li(t,e,n,r){return 8&n?[t[0]+(e[0]-t[0])*(r[3]-t[1])/(e[1]-t[1]),r[3]]:4&n?[t[0]+(e[0]-t[0])*(r[1]-t[1])/(e[1]-t[1]),r[1]]:2&n?[r[2],t[1]+(e[1]-t[1])*(r[2]-t[0])/(e[0]-t[0])]:1&n?[r[0],t[1]+(e[1]-t[1])*(r[0]-t[0])/(e[0]-t[0])]:null}function ji(t,e){var 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 Mi(t,e){for(var n=[],r=0,i=t;r<i.length;r++){var o=Ii(i[r],e);o.length>0&&(o[0][0]===o[o.length-1][0]&&o[0][1]===o[o.length-1][1]||o.push(o[0]),o.length>=4&&n.push(o))}return n}vi.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),n=Math.sin(t*this.g)/Math.sin(this.g),r=e*Math.cos(this.start.y)*Math.cos(this.start.x)+n*Math.cos(this.end.y)*Math.cos(this.end.x),i=e*Math.cos(this.start.y)*Math.sin(this.start.x)+n*Math.cos(this.end.y)*Math.sin(this.end.x),o=e*Math.sin(this.start.y)+n*Math.sin(this.end.y),a=di*Math.atan2(o,Math.sqrt(Math.pow(r,2)+Math.pow(i,2)));return[di*Math.atan2(i,r),a]},vi.prototype.Arc=function(t,e){var n=[];if(!t||t<=2)n.push([this.start.lon,this.start.lat]),n.push([this.end.lon,this.end.lat]);else for(var r=1/(t-1),i=0;i<t;++i){var o=r*i,a=this.interpolate(o);n.push(a)}for(var s=!1,u=0,l=e&&e.offset?e.offset:10,c=180-l,f=-180+l,h=360-l,p=1;p<n.length;++p){var d=n[p-1][0],m=n[p][0],g=Math.abs(m-d);g>h&&(m>c&&d<f||d>c&&m<f)?s=!0:g>u&&(u=g)}var y=[];if(s&&u<l){var v=[];y.push(v);for(var b=0;b<n.length;++b){var _=parseFloat(n[b][0]);if(b>0&&Math.abs(_-n[b-1][0])>h){var A=parseFloat(n[b-1][0]),w=parseFloat(n[b-1][1]),x=parseFloat(n[b][0]),E=parseFloat(n[b][1]);if(A>-180&&A<f&&180===x&&b+1<n.length&&n[b-1][0]>-180&&n[b-1][0]<f){v.push([-180,n[b][1]]),b++,v.push([n[b][0],n[b][1]]);continue}if(A>c&&A<180&&-180===x&&b+1<n.length&&n[b-1][0]>c&&n[b-1][0]<180){v.push([180,n[b][1]]),b++,v.push([n[b][0],n[b][1]]);continue}if(A<f&&x>c){var O=A;A=x,x=O;var S=w;w=E,E=S}if(A>c&&x<f&&(x+=360),A<=180&&x>=180&&A<x){var P=(180-A)/(x-A),C=P*E+(1-P)*w;v.push([n[b-1][0]>c?180:-180,C]),(v=[]).push([n[b-1][0]>c?-180:180,C]),y.push(v)}else v=[],y.push(v);v.push([_,n[b][1]])}else v.push([n[b][0],n[b][1]])}}else{var T=[];y.push(T);for(var k=0;k<n.length;++k)T.push([n[k][0],n[k][1]])}for(var I=new yi(this.properties),L=0;L<y.length;++L){var j=new gi;I.geometries.push(j);for(var M=y[L],R=0;R<M.length;++R)j.move_to(M[R])}return I};var Ri=Ut((function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n})),Ni=Ut((function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function i(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?r:i).supported=r,e.unsupported=i})),Di=Ut((function(t){var e=Array.prototype.slice,n=t.exports=function(t,o,a){return a||(a={}),t===o||(t instanceof Date&&o instanceof Date?t.getTime()===o.getTime():!t||!o||"object"!=typeof t&&"object"!=typeof o?a.strict?t===o:t==o:function(t,o,a){var s,u;if(r(t)||r(o))return!1;if(t.prototype!==o.prototype)return!1;if(Ni(t))return!!Ni(o)&&(t=e.call(t),o=e.call(o),n(t,o,a));if(i(t)){if(!i(o))return!1;if(t.length!==o.length)return!1;for(s=0;s<t.length;s++)if(t[s]!==o[s])return!1;return!0}try{var l=Ri(t),c=Ri(o)}catch(t){return!1}if(l.length!=c.length)return!1;for(l.sort(),c.sort(),s=l.length-1;s>=0;s--)if(l[s]!=c[s])return!1;for(s=l.length-1;s>=0;s--)if(u=l[s],!n(t[u],o[u],a))return!1;return typeof t==typeof o}(t,o,a))};function r(t){return null==t}function i(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&"function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0])}}));function Fi(t,e,n){if(void 0===n&&(n={}),!T(n=n||{}))throw new Error("options is invalid");var r,i=n.tolerance||0,o=[],a=kr(),s=$n(t);return a.load(s),q(e,(function(t){var e=!1;t&&(D(a.search(t),(function(n){if(!1===e){var o=Q(t).sort(),a=Q(n).sort();Di(o,a)||(0===i?Zr(o[0],n)&&Zr(o[1],n):Mr(n,o[0]).properties.dist<=i&&Mr(n,o[1]).properties.dist<=i)?(e=!0,r=r?Bi(r,t):t):(0===i?Zr(a[0],t)&&Zr(a[1],t):Mr(t,a[0]).properties.dist<=i&&Mr(t,a[1]).properties.dist<=i)&&(r=r?Bi(r,n):n)}})),!1===e&&r&&(o.push(r),r=void 0))})),r&&o.push(r),d(o)}function Bi(t,e){var n=Q(e),r=Q(t),i=r[0],o=r[r.length-1],a=t.geometry.coordinates;return Di(n[0],i)?a.unshift(n[1]):Di(n[0],o)?a.push(n[1]):Di(n[1],i)?a.unshift(n[0]):Di(n[1],o)&&a.push(n[0]),t}function zi(t){var e=t%360;return e<0&&(e+=360),e}function Ui(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?Gi(J(e),J(t)):Gi(J(t),J(e)))>180?-(360-r):r}function Gi(t,e){var n=O(t[1]),r=O(e[1]),i=O(e[0]-t[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(E(Math.atan2(i,o))+360)%360}function Vi(t,e,r,i){void 0===i&&(i={});var o=e<0,a=S(Math.abs(e),i.units,"meters");o&&(a=-Math.abs(a));var s=J(t),l=function(t,e,r,i){var o=e/(i=void 0===i?n:Number(i)),a=t[0]*Math.PI/180,s=O(t[1]),u=O(r),l=o*Math.cos(u),c=s+l;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var f=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),h=Math.abs(f)>1e-11?l/f:Math.cos(s);return[(180*(a+o*Math.sin(u)/h)/Math.PI+540)%360-180,180*c/Math.PI]}(s,a,r);return l[0]+=l[0]-s[0]>180?-360:s[0]-l[0]>180?360:0,u(l,i.properties)}function qi(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],u=t[a+1];a===t.length-1&&(u=t[0]),r=Wi(s,u,e),n<=0&&r>0?Wi(e,s,i)<0||(i=s):n>0&&r<=0&&(Hi(e,s,o)||(o=s)),n=r}return[i,o]}function Hi(t,e,n){return Wi(t,e,n)>0}function Wi(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}function Xi(t){for(var e,n,r=Q(t),i=0,o=1;o<r.length;)e=n||r[0],i+=((n=r[o])[0]-e[0])*(n[1]+e[1]),o++;return i>0}function Yi(t,e){switch("Feature"===t.type?t.geometry.type:t.type){case"GeometryCollection":return z(t,(function(t){Yi(t,e)})),t;case"LineString":return Zi(Q(t),e),t;case"Polygon":return Ki(Q(t),e),t;case"MultiLineString":return Q(t).forEach((function(t){Zi(t,e)})),t;case"MultiPolygon":return Q(t).forEach((function(t){Ki(t,e)})),t;case"Point":case"MultiPoint":return t}}function Zi(t,e){Xi(t)===e&&t.reverse()}function Ki(t,e){Xi(t[0])!==e&&t[0].reverse();for(var n=1;n<t.length;n++)Xi(t[n])===e&&t[n].reverse()}function $i(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=e.zProperty||"elevation",r=e.flip,i=e.flags;rt(t,"Point","input must contain Points");for(var o=function(t,e){var n={};return D(t,(function(t){var e=Q(t)[1];n[e]||(n[e]=[]),n[e].push(t)})),Object.keys(n).map((function(t){return n[t].sort((function(t,e){return Q(t)[0]-Q(e)[0]}))})).sort((function(t,n){return e?Q(t[0])[1]-Q(n[0])[1]:Q(n[0])[1]-Q(t[0])[1]}))}(t,r),a=[],s=0;s<o.length;s++){for(var u=o[s],l=[],c=0;c<u.length;c++){var f=u[c];f.properties[n]?l.push(f.properties[n]):l.push(0),!0===i&&(f.properties.matrixPosition=[s,c])}a.push(l)}return a}var Ji={successCallback:null,verbose:!1,polygons:!1},Qi={};function to(t,e,n,r){r=r||{};for(var i=Object.keys(Ji),o=0;o<i.length;o++){var a=i[o],s=r[a];s=null!=s?s:Ji[a],Qi[a]=s}Qi.verbose&&console.log("MarchingSquaresJS-isoBands: computing isobands for ["+e+":"+(e+n)+"]");var u,l=function(t,e,n){for(var r=t.length-1,i=t[0].length-1,o={rows:r,cols:i,cells:[]},a=e+Math.abs(n),s=0;s<r;++s){o.cells[s]=[];for(var u=0;u<i;++u){var l=0,c=t[s+1][u],f=t[s+1][u+1],h=t[s][u+1],p=t[s][u];if(!(isNaN(c)||isNaN(f)||isNaN(h)||isNaN(p))){l|=c<e?0:c>a?128:64,l|=f<e?0:f>a?32:16,l|=h<e?0:h>a?8:4;var d=+(l|=p<e?0:p>a?2:1),m=0;if(17===l||18===l||33===l||34===l||38===l||68===l||72===l||98===l||102===l||132===l||136===l||137===l||152===l||153===l){var g=(c+f+h+p)/4;m=g>a?2:g<e?0:1,34===l?1===m?l=35:0===m&&(l=136):136===l?1===m?(l=35,m=4):0===m&&(l=34):17===l?1===m?(l=155,m=4):0===m&&(l=153):68===l?1===m?(l=103,m=4):0===m&&(l=102):153===l?1===m&&(l=155):102===l?1===m&&(l=103):152===l?m<2&&(l=156,m=1):137===l?m<2&&(l=139,m=1):98===l?m<2&&(l=99,m=1):38===l?m<2&&(l=39,m=1):18===l?m>0?(l=156,m=4):l=152:33===l?m>0?(l=139,m=4):l=137:72===l?m>0?(l=99,m=4):l=98:132===l&&(m>0?(l=39,m=4):l=38)}if(0!=l&&170!=l){var y,v,b,_,A,w,x,E;y=v=b=_=A=w=x=E=.5;var O=[];1===l?(b=1-Ho(e,h,p),E=1-Ho(e,c,p),O.push(Bo[l])):169===l?(b=Ho(a,p,h),E=Ho(a,p,c),O.push(Bo[l])):4===l?(w=1-Ho(e,f,h),_=Ho(e,p,h),O.push(Do[l])):166===l?(w=Ho(a,h,f),_=1-Ho(a,h,p),O.push(Do[l])):16===l?(A=Ho(e,h,f),v=Ho(e,c,f),O.push(No[l])):154===l?(A=1-Ho(a,f,h),v=1-Ho(a,f,c),O.push(No[l])):64===l?(x=Ho(e,p,c),y=1-Ho(e,f,c),O.push(Uo[l])):106===l?(x=1-Ho(a,c,p),y=Ho(a,c,f),O.push(Uo[l])):168===l?(_=Ho(a,p,h),b=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),O.push(Fo[l]),O.push(Bo[l])):2===l?(_=1-Ho(e,h,p),b=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),O.push(Fo[l]),O.push(Bo[l])):162===l?(A=Ho(a,h,f),w=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),O.push(Fo[l]),O.push(Bo[l])):8===l?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),O.push(No[l]),O.push(Do[l])):138===l?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),y=1-Ho(a,f,c),v=1-Ho(e,f,c),O.push(No[l]),O.push(Do[l])):32===l?(A=Ho(a,h,f),w=Ho(e,h,f),y=Ho(e,c,f),v=Ho(a,c,f),O.push(No[l]),O.push(Do[l])):42===l?(E=1-Ho(a,c,p),x=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f),O.push(zo[l]),O.push(Uo[l])):128===l&&(E=Ho(e,p,c),x=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c),O.push(zo[l]),O.push(Uo[l])),5===l?(w=1-Ho(e,f,h),E=1-Ho(e,c,p),O.push(Do[l])):165===l?(w=Ho(a,h,f),E=Ho(a,p,c),O.push(Do[l])):20===l?(_=Ho(e,p,h),v=Ho(e,c,f),O.push(Fo[l])):150===l?(_=1-Ho(a,h,p),v=1-Ho(a,f,c),O.push(Fo[l])):80===l?(A=Ho(e,h,f),x=Ho(e,p,c),O.push(No[l])):90===l?(A=1-Ho(a,f,h),x=1-Ho(a,c,p),O.push(No[l])):65===l?(b=1-Ho(e,h,p),y=1-Ho(e,f,c),O.push(Bo[l])):105===l?(b=Ho(a,p,h),y=Ho(a,c,f),O.push(Bo[l])):160===l?(A=Ho(a,h,f),w=Ho(e,h,f),E=Ho(e,p,c),x=Ho(a,p,c),O.push(No[l]),O.push(Do[l])):10===l?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),E=1-Ho(a,c,p),x=1-Ho(e,c,p),O.push(No[l]),O.push(Do[l])):130===l?(_=1-Ho(e,h,p),b=1-Ho(a,h,p),y=1-Ho(a,f,c),v=1-Ho(e,f,c),O.push(Fo[l]),O.push(Bo[l])):40===l?(_=Ho(a,p,h),b=Ho(e,p,h),y=Ho(e,c,f),v=Ho(a,c,f),O.push(Fo[l]),O.push(Bo[l])):101===l?(w=Ho(a,h,f),y=Ho(a,c,f),O.push(Do[l])):69===l?(w=1-Ho(e,f,h),y=1-Ho(e,f,c),O.push(Do[l])):149===l?(E=Ho(a,p,c),v=1-Ho(a,f,c),O.push(zo[l])):21===l?(E=1-Ho(e,c,p),v=Ho(e,c,f),O.push(zo[l])):86===l?(_=1-Ho(a,h,p),x=1-Ho(a,c,p),O.push(Fo[l])):84===l?(_=Ho(e,p,h),x=Ho(e,p,c),O.push(Fo[l])):89===l?(A=1-Ho(a,f,h),b=Ho(a,p,h),O.push(Bo[l])):81===l?(A=Ho(e,h,f),b=1-Ho(e,h,p),O.push(Bo[l])):96===l?(A=Ho(a,h,f),w=Ho(e,h,f),x=Ho(e,p,c),y=Ho(a,c,f),O.push(No[l]),O.push(Do[l])):74===l?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),x=1-Ho(a,c,p),y=1-Ho(e,f,c),O.push(No[l]),O.push(Do[l])):24===l?(A=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),v=Ho(e,c,f),O.push(No[l]),O.push(Bo[l])):146===l?(A=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),v=1-Ho(a,f,c),O.push(No[l]),O.push(Bo[l])):6===l?(w=1-Ho(e,f,h),_=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),O.push(Do[l]),O.push(Fo[l])):164===l?(w=Ho(a,h,f),_=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),O.push(Do[l]),O.push(Fo[l])):129===l?(b=1-Ho(e,h,p),E=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c),O.push(Bo[l]),O.push(zo[l])):41===l?(b=Ho(a,p,h),E=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f),O.push(Bo[l]),O.push(zo[l])):66===l?(_=1-Ho(e,h,p),b=1-Ho(a,h,p),x=1-Ho(a,c,p),y=1-Ho(e,f,c),O.push(Fo[l]),O.push(Bo[l])):104===l?(_=Ho(a,p,h),b=Ho(e,p,h),x=Ho(e,p,c),y=Ho(a,c,f),O.push(Bo[l]),O.push(Go[l])):144===l?(A=Ho(e,h,f),E=Ho(e,p,c),x=Ho(a,p,c),v=1-Ho(a,f,c),O.push(No[l]),O.push(Uo[l])):26===l?(A=1-Ho(a,f,h),E=1-Ho(a,c,p),x=1-Ho(e,c,p),v=Ho(e,c,f),O.push(No[l]),O.push(Uo[l])):36===l?(w=Ho(a,h,f),_=Ho(e,p,h),y=Ho(e,c,f),v=Ho(a,c,f),O.push(Do[l]),O.push(Fo[l])):134===l?(w=1-Ho(e,f,h),_=1-Ho(a,h,p),y=1-Ho(a,f,c),v=1-Ho(e,f,c),O.push(Do[l]),O.push(Fo[l])):9===l?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),b=Ho(a,p,h),E=1-Ho(e,c,p),O.push(No[l]),O.push(Do[l])):161===l?(A=Ho(a,h,f),w=Ho(e,h,f),b=1-Ho(e,h,p),E=Ho(a,p,c),O.push(No[l]),O.push(Do[l])):37===l?(w=Ho(a,h,f),E=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f),O.push(Do[l]),O.push(zo[l])):133===l?(w=1-Ho(e,f,h),E=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c),O.push(Do[l]),O.push(zo[l])):148===l?(_=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),v=1-Ho(a,f,c),O.push(Fo[l]),O.push(Uo[l])):22===l?(_=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),v=Ho(e,c,f),O.push(Fo[l]),O.push(Uo[l])):82===l?(A=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),x=1-Ho(a,c,p),O.push(No[l]),O.push(Bo[l])):88===l?(A=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),x=Ho(e,p,c),O.push(No[l]),O.push(Bo[l])):73===l?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),b=Ho(a,p,h),y=1-Ho(e,f,c),O.push(No[l]),O.push(Do[l])):97===l?(A=Ho(a,h,f),w=Ho(e,h,f),b=1-Ho(e,h,p),y=Ho(a,c,f),O.push(No[l]),O.push(Do[l])):145===l?(A=Ho(e,h,f),b=1-Ho(e,h,p),E=Ho(a,p,c),v=1-Ho(a,f,c),O.push(No[l]),O.push(zo[l])):25===l?(A=1-Ho(a,f,h),b=Ho(a,p,h),E=1-Ho(e,c,p),v=Ho(e,c,f),O.push(No[l]),O.push(zo[l])):70===l?(w=1-Ho(e,f,h),_=1-Ho(a,h,p),x=1-Ho(a,c,p),y=1-Ho(e,f,c),O.push(Do[l]),O.push(Fo[l])):100===l?(w=Ho(a,h,f),_=Ho(e,p,h),x=Ho(e,p,c),y=Ho(a,c,f),O.push(Do[l]),O.push(Fo[l])):34===l?(0===m?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c)):(A=Ho(a,h,f),w=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f)),O.push(No[l]),O.push(Do[l]),O.push(zo[l]),O.push(Uo[l])):35===l?(4===m?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c)):(A=Ho(a,h,f),w=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f)),O.push(No[l]),O.push(Do[l]),O.push(Bo[l]),O.push(Uo[l])):136===l?(0===m?(A=Ho(a,h,f),w=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f)):(A=1-Ho(e,f,h),w=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c)),O.push(No[l]),O.push(Do[l]),O.push(zo[l]),O.push(Uo[l])):153===l?(0===m?(A=Ho(e,h,f),b=1-Ho(e,h,p),E=1-Ho(e,c,p),v=Ho(e,c,f)):(A=1-Ho(a,f,h),b=Ho(a,p,h),E=Ho(a,p,c),v=1-Ho(a,f,c)),O.push(No[l]),O.push(Bo[l])):102===l?(0===m?(w=1-Ho(e,f,h),_=Ho(e,p,h),x=Ho(e,p,c),y=1-Ho(e,f,c)):(w=Ho(a,h,f),_=1-Ho(a,h,p),x=1-Ho(a,c,p),y=Ho(a,c,f)),O.push(Do[l]),O.push(Uo[l])):155===l?(4===m?(A=Ho(e,h,f),b=1-Ho(e,h,p),E=1-Ho(e,c,p),v=Ho(e,c,f)):(A=1-Ho(a,f,h),b=Ho(a,p,h),E=Ho(a,p,c),v=1-Ho(a,f,c)),O.push(No[l]),O.push(zo[l])):103===l?(4===m?(w=1-Ho(e,f,h),_=Ho(e,p,h),x=Ho(e,p,c),y=1-Ho(e,f,c)):(w=Ho(a,h,f),_=1-Ho(a,h,p),x=1-Ho(a,c,p),y=Ho(a,c,f)),O.push(Do[l]),O.push(Fo[l])):152===l?(0===m?(A=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),v=Ho(e,c,f)):(A=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),v=1-Ho(a,f,c)),O.push(No[l]),O.push(Fo[l]),O.push(Bo[l])):156===l?(4===m?(A=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),v=Ho(e,c,f)):(A=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),v=1-Ho(a,f,c)),O.push(No[l]),O.push(Bo[l]),O.push(Uo[l])):137===l?(0===m?(A=Ho(a,h,f),w=Ho(e,h,f),b=1-Ho(e,h,p),E=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f)):(A=1-Ho(e,f,h),w=1-Ho(a,f,h),b=Ho(a,p,h),E=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c)),O.push(No[l]),O.push(Do[l]),O.push(Bo[l])):139===l?(4===m?(A=Ho(a,h,f),w=Ho(e,h,f),b=1-Ho(e,h,p),E=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f)):(A=1-Ho(e,f,h),w=1-Ho(a,f,h),b=Ho(a,p,h),E=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c)),O.push(No[l]),O.push(Do[l]),O.push(zo[l])):98===l?(0===m?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),x=Ho(e,p,c),y=1-Ho(e,f,c)):(A=Ho(a,h,f),w=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),x=1-Ho(a,c,p),y=Ho(a,c,f)),O.push(No[l]),O.push(Do[l]),O.push(Uo[l])):99===l?(4===m?(A=1-Ho(e,f,h),w=1-Ho(a,f,h),_=Ho(a,p,h),b=Ho(e,p,h),x=Ho(e,p,c),y=1-Ho(e,f,c)):(A=Ho(a,h,f),w=Ho(e,h,f),_=1-Ho(e,h,p),b=1-Ho(a,h,p),x=1-Ho(a,c,p),y=Ho(a,c,f)),O.push(No[l]),O.push(Do[l]),O.push(Bo[l])):38===l?(0===m?(w=1-Ho(e,f,h),_=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c)):(w=Ho(a,h,f),_=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f)),O.push(Do[l]),O.push(zo[l]),O.push(Uo[l])):39===l?(4===m?(w=1-Ho(e,f,h),_=Ho(e,p,h),E=Ho(e,p,c),x=Ho(a,p,c),y=1-Ho(a,f,c),v=1-Ho(e,f,c)):(w=Ho(a,h,f),_=1-Ho(a,h,p),E=1-Ho(a,c,p),x=1-Ho(e,c,p),y=Ho(e,c,f),v=Ho(a,c,f)),O.push(Do[l]),O.push(Fo[l]),O.push(Uo[l])):85===l&&(A=1,w=0,_=1,b=0,E=0,x=1,y=0,v=1),(y<0||y>1||v<0||v>1||A<0||A>1||_<0||_>1||E<0||E>1||x<0||x>1)&&console.log("MarchingSquaresJS-isoBands: "+l+" "+d+" "+c+","+f+","+h+","+p+" "+m+" "+y+" "+v+" "+A+" "+w+" "+_+" "+b+" "+E+" "+x),o.cells[s][u]={cval:l,cval_real:d,flipped:m,topleft:y,topright:v,righttop:A,rightbottom:w,bottomright:_,bottomleft:b,leftbottom:E,lefttop:x,edges:O}}}}}return o}(t,e,n);return Qi.polygons?(Qi.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),u=function(t){var e=[],n=0;return t.cells.forEach((function(t,r){t.forEach((function(t,i){if(void 0!==t){var o=qo[t.cval](t);"object"==typeof o&&Wo(o)?"object"==typeof o[0]&&Wo(o[0])?"object"==typeof o[0][0]&&Wo(o[0][0])?o.forEach((function(t){t.forEach((function(t){t[0]+=i,t[1]+=r})),e[n++]=t})):(o.forEach((function(t){t[0]+=i,t[1]+=r})),e[n++]=o):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}}))})),e}(l)):(Qi.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),u=function(t){for(var e=[],n=t.rows,r=t.cols,i=[],o=0;o<n;o++)for(var a=0;a<r;a++)if(void 0!==t.cells[o][a]&&t.cells[o][a].edges.length>0){var s=Yo(t.cells[o][a]),u=null,l=a,c=o;null!==s&&i.push([s.p[0]+l,s.p[1]+c]);do{if(null===(u=Zo(t.cells[c][l],s.x,s.y,s.o)))break;if(i.push([u.p[0]+l,u.p[1]+c]),l+=u.x,s=u,(c+=u.y)<0||c>=n||l<0||l>=r||void 0===t.cells[c][l]){var f=Xo(t,l-=u.x,c-=u.y,u.x,u.y,u.o);if(null===f)break;f.path.forEach((function(t){i.push(t)})),l=f.i,c=f.j,s=f}}while(void 0!==t.cells[c][l]&&t.cells[c][l].edges.length>0);e.push(i),i=[],t.cells[o][a].edges.length>0&&a--}return e}(l)),"function"==typeof Qi.successCallback&&Qi.successCallback(u),u}var eo=64,no=16,ro=[],io=[],oo=[],ao=[],so=[],uo=[],lo=[],co=[],fo=[],ho=[],po=[],mo=[],go=[],yo=[],vo=[],bo=[],_o=[],Ao=[],wo=[],xo=[],Eo=[],Oo=[],So=[],Po=[];lo[85]=ho[85]=-1,co[85]=po[85]=0,fo[85]=mo[85]=1,wo[85]=Oo[85]=1,xo[85]=So[85]=0,Eo[85]=Po[85]=1,ro[85]=ao[85]=0,io[85]=so[85]=-1,oo[85]=vo[85]=0,bo[85]=go[85]=0,_o[85]=yo[85]=1,uo[85]=Ao[85]=1,Oo[1]=Oo[169]=0,So[1]=So[169]=-1,Po[1]=Po[169]=0,go[1]=go[169]=-1,yo[1]=yo[169]=0,vo[1]=vo[169]=0,ho[4]=ho[166]=0,po[4]=po[166]=-1,mo[4]=mo[166]=1,bo[4]=bo[166]=1,_o[4]=_o[166]=0,Ao[4]=Ao[166]=0,lo[16]=lo[154]=0,co[16]=co[154]=1,fo[16]=fo[154]=1,ao[16]=ao[154]=1,so[16]=so[154]=0,uo[16]=uo[154]=1,wo[64]=wo[106]=0,xo[64]=xo[106]=1,Eo[64]=Eo[106]=0,ro[64]=ro[106]=-1,io[64]=io[106]=0,oo[64]=oo[106]=1,wo[2]=wo[168]=0,xo[2]=xo[168]=-1,Eo[2]=Eo[168]=1,Oo[2]=Oo[168]=0,So[2]=So[168]=-1,Po[2]=Po[168]=0,go[2]=go[168]=-1,yo[2]=yo[168]=0,vo[2]=vo[168]=0,bo[2]=bo[168]=-1,_o[2]=_o[168]=0,Ao[2]=Ao[168]=1,lo[8]=lo[162]=0,co[8]=co[162]=-1,fo[8]=fo[162]=0,ho[8]=ho[162]=0,po[8]=po[162]=-1,mo[8]=mo[162]=1,go[8]=go[162]=1,yo[8]=yo[162]=0,vo[8]=vo[162]=1,bo[8]=bo[162]=1,_o[8]=_o[162]=0,Ao[8]=Ao[162]=0,lo[32]=lo[138]=0,co[32]=co[138]=1,fo[32]=fo[138]=1,ho[32]=ho[138]=0,po[32]=po[138]=1,mo[32]=mo[138]=0,ro[32]=ro[138]=1,io[32]=io[138]=0,oo[32]=oo[138]=0,ao[32]=ao[138]=1,so[32]=so[138]=0,uo[32]=uo[138]=1,Oo[128]=Oo[42]=0,So[128]=So[42]=1,Po[128]=Po[42]=1,wo[128]=wo[42]=0,xo[128]=xo[42]=1,Eo[128]=Eo[42]=0,ro[128]=ro[42]=-1,io[128]=io[42]=0,oo[128]=oo[42]=1,ao[128]=ao[42]=-1,so[128]=so[42]=0,uo[128]=uo[42]=0,ho[5]=ho[165]=-1,po[5]=po[165]=0,mo[5]=mo[165]=0,Oo[5]=Oo[165]=1,So[5]=So[165]=0,Po[5]=Po[165]=0,bo[20]=bo[150]=0,_o[20]=_o[150]=1,Ao[20]=Ao[150]=1,ao[20]=ao[150]=0,so[20]=so[150]=-1,uo[20]=uo[150]=1,lo[80]=lo[90]=-1,co[80]=co[90]=0,fo[80]=fo[90]=1,wo[80]=wo[90]=1,xo[80]=xo[90]=0,Eo[80]=Eo[90]=1,go[65]=go[105]=0,yo[65]=yo[105]=1,vo[65]=vo[105]=0,ro[65]=ro[105]=0,io[65]=io[105]=-1,oo[65]=oo[105]=0,lo[160]=lo[10]=-1,co[160]=co[10]=0,fo[160]=fo[10]=1,ho[160]=ho[10]=-1,po[160]=po[10]=0,mo[160]=mo[10]=0,Oo[160]=Oo[10]=1,So[160]=So[10]=0,Po[160]=Po[10]=0,wo[160]=wo[10]=1,xo[160]=xo[10]=0,Eo[160]=Eo[10]=1,bo[130]=bo[40]=0,_o[130]=_o[40]=1,Ao[130]=Ao[40]=1,go[130]=go[40]=0,yo[130]=yo[40]=1,vo[130]=vo[40]=0,ro[130]=ro[40]=0,io[130]=io[40]=-1,oo[130]=oo[40]=0,ao[130]=ao[40]=0,so[130]=so[40]=-1,uo[130]=uo[40]=1,ho[37]=ho[133]=0,po[37]=po[133]=1,mo[37]=mo[133]=1,Oo[37]=Oo[133]=0,So[37]=So[133]=1,Po[37]=Po[133]=0,ro[37]=ro[133]=-1,io[37]=io[133]=0,oo[37]=oo[133]=0,ao[37]=ao[133]=1,so[37]=so[133]=0,uo[37]=uo[133]=0,bo[148]=bo[22]=-1,_o[148]=_o[22]=0,Ao[148]=Ao[22]=0,Oo[148]=Oo[22]=0,So[148]=So[22]=-1,Po[148]=Po[22]=1,wo[148]=wo[22]=0,xo[148]=xo[22]=1,Eo[148]=Eo[22]=1,ao[148]=ao[22]=-1,so[148]=so[22]=0,uo[148]=uo[22]=1,lo[82]=lo[88]=0,co[82]=co[88]=-1,fo[82]=fo[88]=1,bo[82]=bo[88]=1,_o[82]=_o[88]=0,Ao[82]=Ao[88]=1,go[82]=go[88]=-1,yo[82]=yo[88]=0,vo[82]=vo[88]=1,wo[82]=wo[88]=0,xo[82]=xo[88]=-1,Eo[82]=Eo[88]=0,lo[73]=lo[97]=0,co[73]=co[97]=1,fo[73]=fo[97]=0,ho[73]=ho[97]=0,po[73]=po[97]=-1,mo[73]=mo[97]=0,go[73]=go[97]=1,yo[73]=yo[97]=0,vo[73]=vo[97]=0,ro[73]=ro[97]=1,io[73]=io[97]=0,oo[73]=oo[97]=1,lo[145]=lo[25]=0,co[145]=co[25]=-1,fo[145]=fo[25]=0,go[145]=go[25]=1,yo[145]=yo[25]=0,vo[145]=vo[25]=1,Oo[145]=Oo[25]=0,So[145]=So[25]=1,Po[145]=Po[25]=1,ao[145]=ao[25]=-1,so[145]=so[25]=0,uo[145]=uo[25]=0,ho[70]=ho[100]=0,po[70]=po[100]=1,mo[70]=mo[100]=0,bo[70]=bo[100]=-1,_o[70]=_o[100]=0,Ao[70]=Ao[100]=1,wo[70]=wo[100]=0,xo[70]=xo[100]=-1,Eo[70]=Eo[100]=1,ro[70]=ro[100]=1,io[70]=io[100]=0,oo[70]=oo[100]=0,ho[101]=ho[69]=0,po[101]=po[69]=1,mo[101]=mo[69]=0,ro[101]=ro[69]=1,io[101]=io[69]=0,oo[101]=oo[69]=0,Oo[149]=Oo[21]=0,So[149]=So[21]=1,Po[149]=Po[21]=1,ao[149]=ao[21]=-1,so[149]=so[21]=0,uo[149]=uo[21]=0,bo[86]=bo[84]=-1,_o[86]=_o[84]=0,Ao[86]=Ao[84]=1,wo[86]=wo[84]=0,xo[86]=xo[84]=-1,Eo[86]=Eo[84]=1,lo[89]=lo[81]=0,co[89]=co[81]=-1,fo[89]=fo[81]=0,go[89]=go[81]=1,yo[89]=yo[81]=0,vo[89]=vo[81]=1,lo[96]=lo[74]=0,co[96]=co[74]=1,fo[96]=fo[74]=0,ho[96]=ho[74]=-1,po[96]=po[74]=0,mo[96]=mo[74]=1,wo[96]=wo[74]=1,xo[96]=xo[74]=0,Eo[96]=Eo[74]=0,ro[96]=ro[74]=1,io[96]=io[74]=0,oo[96]=oo[74]=1,lo[24]=lo[146]=0,co[24]=co[146]=-1,fo[24]=fo[146]=1,bo[24]=bo[146]=1,_o[24]=_o[146]=0,Ao[24]=Ao[146]=1,go[24]=go[146]=0,yo[24]=yo[146]=1,vo[24]=vo[146]=1,ao[24]=ao[146]=0,so[24]=so[146]=-1,uo[24]=uo[146]=0,ho[6]=ho[164]=-1,po[6]=po[164]=0,mo[6]=mo[164]=1,bo[6]=bo[164]=-1,_o[6]=_o[164]=0,Ao[6]=Ao[164]=0,Oo[6]=Oo[164]=0,So[6]=So[164]=-1,Po[6]=Po[164]=1,wo[6]=wo[164]=1,xo[6]=xo[164]=0,Eo[6]=Eo[164]=0,go[129]=go[41]=0,yo[129]=yo[41]=1,vo[129]=vo[41]=1,Oo[129]=Oo[41]=0,So[129]=So[41]=1,Po[129]=Po[41]=0,ro[129]=ro[41]=-1,io[129]=io[41]=0,oo[129]=oo[41]=0,ao[129]=ao[41]=0,so[129]=so[41]=-1,uo[129]=uo[41]=0,bo[66]=bo[104]=0,_o[66]=_o[104]=1,Ao[66]=Ao[104]=0,go[66]=go[104]=-1,yo[66]=yo[104]=0,vo[66]=vo[104]=1,wo[66]=wo[104]=0,xo[66]=xo[104]=-1,Eo[66]=Eo[104]=0,ro[66]=ro[104]=0,io[66]=io[104]=-1,oo[66]=oo[104]=1,lo[144]=lo[26]=-1,co[144]=co[26]=0,fo[144]=fo[26]=0,Oo[144]=Oo[26]=1,So[144]=So[26]=0,Po[144]=Po[26]=1,wo[144]=wo[26]=0,xo[144]=xo[26]=1,Eo[144]=Eo[26]=1,ao[144]=ao[26]=-1,so[144]=so[26]=0,uo[144]=uo[26]=1,ho[36]=ho[134]=0,po[36]=po[134]=1,mo[36]=mo[134]=1,bo[36]=bo[134]=0,_o[36]=_o[134]=1,Ao[36]=Ao[134]=0,ro[36]=ro[134]=0,io[36]=io[134]=-1,oo[36]=oo[134]=1,ao[36]=ao[134]=1,so[36]=so[134]=0,uo[36]=uo[134]=0,lo[9]=lo[161]=-1,co[9]=co[161]=0,fo[9]=fo[161]=0,ho[9]=ho[161]=0,po[9]=po[161]=-1,mo[9]=mo[161]=0,go[9]=go[161]=1,yo[9]=yo[161]=0,vo[9]=vo[161]=0,Oo[9]=Oo[161]=1,So[9]=So[161]=0,Po[9]=Po[161]=1,lo[136]=0,co[136]=1,fo[136]=1,ho[136]=0,po[136]=1,mo[136]=0,bo[136]=-1,_o[136]=0,Ao[136]=1,go[136]=-1,yo[136]=0,vo[136]=0,Oo[136]=0,So[136]=-1,Po[136]=0,wo[136]=0,xo[136]=-1,Eo[136]=1,ro[136]=1,io[136]=0,oo[136]=0,ao[136]=1,so[136]=0,uo[136]=1,lo[34]=0,co[34]=-1,fo[34]=0,ho[34]=0,po[34]=-1,mo[34]=1,bo[34]=1,_o[34]=0,Ao[34]=0,go[34]=1,yo[34]=0,vo[34]=1,Oo[34]=0,So[34]=1,Po[34]=1,wo[34]=0,xo[34]=1,Eo[34]=0,ro[34]=-1,io[34]=0,oo[34]=1,ao[34]=-1,so[34]=0,uo[34]=0,lo[35]=0,co[35]=1,fo[35]=1,ho[35]=0,po[35]=-1,mo[35]=1,bo[35]=1,_o[35]=0,Ao[35]=0,go[35]=-1,yo[35]=0,vo[35]=0,Oo[35]=0,So[35]=-1,Po[35]=0,wo[35]=0,xo[35]=1,Eo[35]=0,ro[35]=-1,io[35]=0,oo[35]=1,ao[35]=1,so[35]=0,uo[35]=1,lo[153]=0,co[153]=1,fo[153]=1,go[153]=-1,yo[153]=0,vo[153]=0,Oo[153]=0,So[153]=-1,Po[153]=0,ao[153]=1,so[153]=0,uo[153]=1,ho[102]=0,po[102]=-1,mo[102]=1,bo[102]=1,_o[102]=0,Ao[102]=0,wo[102]=0,xo[102]=1,Eo[102]=0,ro[102]=-1,io[102]=0,oo[102]=1,lo[155]=0,co[155]=-1,fo[155]=0,go[155]=1,yo[155]=0,vo[155]=1,Oo[155]=0,So[155]=1,Po[155]=1,ao[155]=-1,so[155]=0,uo[155]=0,ho[103]=0,po[103]=1,mo[103]=0,bo[103]=-1,_o[103]=0,Ao[103]=1,wo[103]=0,xo[103]=-1,Eo[103]=1,ro[103]=1,io[103]=0,oo[103]=0,lo[152]=0,co[152]=1,fo[152]=1,bo[152]=-1,_o[152]=0,Ao[152]=1,go[152]=-1,yo[152]=0,vo[152]=0,Oo[152]=0,So[152]=-1,Po[152]=0,wo[152]=0,xo[152]=-1,Eo[152]=1,ao[152]=1,so[152]=0,uo[152]=1,lo[156]=0,co[156]=-1,fo[156]=1,bo[156]=1,_o[156]=0,Ao[156]=1,go[156]=-1,yo[156]=0,vo[156]=0,Oo[156]=0,So[156]=-1,Po[156]=0,wo[156]=0,xo[156]=1,Eo[156]=1,ao[156]=-1,so[156]=0,uo[156]=1,lo[137]=0,co[137]=1,fo[137]=1,ho[137]=0,po[137]=1,mo[137]=0,go[137]=-1,yo[137]=0,vo[137]=0,Oo[137]=0,So[137]=-1,Po[137]=0,ro[137]=1,io[137]=0,oo[137]=0,ao[137]=1,so[137]=0,uo[137]=1,lo[139]=0,co[139]=1,fo[139]=1,ho[139]=0,po[139]=-1,mo[139]=0,go[139]=1,yo[139]=0,vo[139]=0,Oo[139]=0,So[139]=1,Po[139]=0,ro[139]=-1,io[139]=0,oo[139]=0,ao[139]=1,so[139]=0,uo[139]=1,lo[98]=0,co[98]=-1,fo[98]=0,ho[98]=0,po[98]=-1,mo[98]=1,bo[98]=1,_o[98]=0,Ao[98]=0,go[98]=1,yo[98]=0,vo[98]=1,wo[98]=0,xo[98]=1,Eo[98]=0,ro[98]=-1,io[98]=0,oo[98]=1,lo[99]=0,co[99]=1,fo[99]=0,ho[99]=0,po[99]=-1,mo[99]=1,bo[99]=1,_o[99]=0,Ao[99]=0,go[99]=-1,yo[99]=0,vo[99]=1,wo[99]=0,xo[99]=-1,Eo[99]=0,ro[99]=1,io[99]=0,oo[99]=1,ho[38]=0,po[38]=-1,mo[38]=1,bo[38]=1,_o[38]=0,Ao[38]=0,Oo[38]=0,So[38]=1,Po[38]=1,wo[38]=0,xo[38]=1,Eo[38]=0,ro[38]=-1,io[38]=0,oo[38]=1,ao[38]=-1,so[38]=0,uo[38]=0,ho[39]=0,po[39]=1,mo[39]=1,bo[39]=-1,_o[39]=0,Ao[39]=0,Oo[39]=0,So[39]=-1,Po[39]=1,wo[39]=0,xo[39]=1,Eo[39]=0,ro[39]=-1,io[39]=0,oo[39]=1,ao[39]=1,so[39]=0,uo[39]=0;var Co=function(t){return[[t.bottomleft,0],[0,0],[0,t.leftbottom]]},To=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0]]},ko=function(t){return[[t.topright,1],[1,1],[1,t.righttop]]},Io=function(t){return[[0,t.lefttop],[0,1],[t.topleft,1]]},Lo=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop]]},jo=function(t){return[[t.bottomright,0],[t.bottomleft,0],[1,t.righttop],[1,t.rightbottom]]},Mo=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.topleft,1],[t.topright,1]]},Ro=function(t){return[[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},No=[],Do=[],Fo=[],Bo=[],zo=[],Uo=[],Go=[],Vo=[];Bo[1]=zo[1]=18,Bo[169]=zo[169]=18,Fo[4]=Do[4]=12,Fo[166]=Do[166]=12,No[16]=Vo[16]=4,No[154]=Vo[154]=4,Uo[64]=Go[64]=22,Uo[106]=Go[106]=22,Fo[2]=Uo[2]=17,Bo[2]=zo[2]=18,Fo[168]=Uo[168]=17,Bo[168]=zo[168]=18,No[8]=Bo[8]=9,Do[8]=Fo[8]=12,No[162]=Bo[162]=9,Do[162]=Fo[162]=12,No[32]=Vo[32]=4,Do[32]=Go[32]=1,No[138]=Vo[138]=4,Do[138]=Go[138]=1,zo[128]=Vo[128]=21,Uo[128]=Go[128]=22,zo[42]=Vo[42]=21,Uo[42]=Go[42]=22,Do[5]=zo[5]=14,Do[165]=zo[165]=14,Fo[20]=Vo[20]=6,Fo[150]=Vo[150]=6,No[80]=Uo[80]=11,No[90]=Uo[90]=11,Bo[65]=Go[65]=3,Bo[105]=Go[105]=3,No[160]=Uo[160]=11,Do[160]=zo[160]=14,No[10]=Uo[10]=11,Do[10]=zo[10]=14,Fo[130]=Vo[130]=6,Bo[130]=Go[130]=3,Fo[40]=Vo[40]=6,Bo[40]=Go[40]=3,Do[101]=Go[101]=1,Do[69]=Go[69]=1,zo[149]=Vo[149]=21,zo[21]=Vo[21]=21,Fo[86]=Uo[86]=17,Fo[84]=Uo[84]=17,No[89]=Bo[89]=9,No[81]=Bo[81]=9,No[96]=Go[96]=0,Do[96]=Uo[96]=15,No[74]=Go[74]=0,Do[74]=Uo[74]=15,No[24]=Fo[24]=8,Bo[24]=Vo[24]=7,No[146]=Fo[146]=8,Bo[146]=Vo[146]=7,Do[6]=Uo[6]=15,Fo[6]=zo[6]=16,Do[164]=Uo[164]=15,Fo[164]=zo[164]=16,Bo[129]=Vo[129]=7,zo[129]=Go[129]=20,Bo[41]=Vo[41]=7,zo[41]=Go[41]=20,Fo[66]=Go[66]=2,Bo[66]=Uo[66]=19,Fo[104]=Go[104]=2,Bo[104]=Uo[104]=19,No[144]=zo[144]=10,Uo[144]=Vo[144]=23,No[26]=zo[26]=10,Uo[26]=Vo[26]=23,Do[36]=Vo[36]=5,Fo[36]=Go[36]=2,Do[134]=Vo[134]=5,Fo[134]=Go[134]=2,No[9]=zo[9]=10,Do[9]=Bo[9]=13,No[161]=zo[161]=10,Do[161]=Bo[161]=13,Do[37]=Vo[37]=5,zo[37]=Go[37]=20,Do[133]=Vo[133]=5,zo[133]=Go[133]=20,Fo[148]=zo[148]=16,Uo[148]=Vo[148]=23,Fo[22]=zo[22]=16,Uo[22]=Vo[22]=23,No[82]=Fo[82]=8,Bo[82]=Uo[82]=19,No[88]=Fo[88]=8,Bo[88]=Uo[88]=19,No[73]=Go[73]=0,Do[73]=Bo[73]=13,No[97]=Go[97]=0,Do[97]=Bo[97]=13,No[145]=Bo[145]=9,zo[145]=Vo[145]=21,No[25]=Bo[25]=9,zo[25]=Vo[25]=21,Do[70]=Go[70]=1,Fo[70]=Uo[70]=17,Do[100]=Go[100]=1,Fo[100]=Uo[100]=17,No[34]=Bo[34]=9,Do[34]=Fo[34]=12,zo[34]=Vo[34]=21,Uo[34]=Go[34]=22,No[136]=Vo[136]=4,Do[136]=Go[136]=1,Fo[136]=Uo[136]=17,Bo[136]=zo[136]=18,No[35]=Vo[35]=4,Do[35]=Fo[35]=12,Bo[35]=zo[35]=18,Uo[35]=Go[35]=22,No[153]=Vo[153]=4,Bo[153]=zo[153]=18,Do[102]=Fo[102]=12,Uo[102]=Go[102]=22,No[155]=Bo[155]=9,zo[155]=Vo[155]=23,Do[103]=Go[103]=1,Fo[103]=Uo[103]=17,No[152]=Vo[152]=4,Fo[152]=Uo[152]=17,Bo[152]=zo[152]=18,No[156]=Fo[156]=8,Bo[156]=zo[156]=18,Uo[156]=Vo[156]=23,No[137]=Vo[137]=4,Do[137]=Go[137]=1,Bo[137]=zo[137]=18,No[139]=Vo[139]=4,Do[139]=Bo[139]=13,zo[139]=Go[139]=20,No[98]=Bo[98]=9,Do[98]=Fo[98]=12,Uo[98]=Go[98]=22,No[99]=Go[99]=0,Do[99]=Fo[99]=12,Bo[99]=Uo[99]=19,Do[38]=Fo[38]=12,zo[38]=Vo[38]=21,Uo[38]=Go[38]=22,Do[39]=Vo[39]=5,Fo[39]=zo[39]=16,Uo[39]=Go[39]=22;var qo=[];function Ho(t,e,n){return(t-e)/(n-e)}function Wo(t){return t.constructor.toString().indexOf("Array")>-1}function Xo(t,e,n,r,i,o){for(var a=t.cells[n][e],s=a.cval_real,u=e+r,l=n+i,c=[],f=!1;!f;){if(void 0===t.cells[l]||void 0===t.cells[l][u])if(l-=i,u-=r,s=(a=t.cells[l][u]).cval_real,-1===i)if(0===o)if(1&s)c.push([u,l]),r=-1,i=0,o=0;else{if(!(4&s)){c.push([u+a.bottomright,l]),r=0,i=1,o=1,f=!0;break}c.push([u+1,l]),r=1,i=0,o=0}else{if(!(1&s)){if(4&s){c.push([u+a.bottomright,l]),r=0,i=1,o=1,f=!0;break}c.push([u+a.bottomleft,l]),r=0,i=1,o=0,f=!0;break}c.push([u,l]),r=-1,i=0,o=0}else if(1===i)if(0===o){if(!(s&no)){if(s&eo){c.push([u+a.topleft,l+1]),r=0,i=-1,o=0,f=!0;break}c.push([u+a.topright,l+1]),r=0,i=-1,o=1,f=!0;break}c.push([u+1,l+1]),r=1,i=0,o=1}else c.push([u+1,l+1]),r=1,i=0,o=1;else if(-1===r)if(0===o){if(!(s&eo)){if(1&s){c.push([u,l+a.leftbottom]),r=1,i=0,o=0,f=!0;break}c.push([u,l+a.lefttop]),r=1,i=0,o=1,f=!0;break}c.push([u,l+1]),r=0,i=1,o=0}else{if(!(s&eo)){console.log("MarchingSquaresJS-isoBands: wtf");break}c.push([u,l+1]),r=0,i=1,o=0}else{if(1!==r){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(0===o){if(!(4&s)){c.push([u+1,l+a.rightbottom]),r=-1,i=0,o=0,f=!0;break}c.push([u+1,l]),r=0,i=-1,o=1}else{if(!(4&s)){if(s&no){c.push([u+1,l+a.righttop]),r=-1,i=0,o=1;break}c.push([u+1,l+a.rightbottom]),r=-1,i=0,o=0,f=!0;break}c.push([u+1,l]),r=0,i=-1,o=1}}else if(s=(a=t.cells[l][u]).cval_real,-1===r)if(0===o)if(void 0!==t.cells[l-1]&&void 0!==t.cells[l-1][u])r=0,i=-1,o=1;else{if(!(1&s)){c.push([u+a.bottomright,l]),r=0,i=1,o=1,f=!0;break}c.push([u,l])}else{if(!(s&eo)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+u+","+l);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(1===r){if(0===o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[l+1]&&void 0!==t.cells[l+1][u])r=0,i=1,o=0;else{if(!(s&no)){c.push([u+a.topleft,l+1]),r=0,i=-1,o=0,f=!0;break}c.push([u+1,l+1]),r=1,i=0,o=1}}else if(-1===i){if(1!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[l][u+1])r=1,i=0,o=1;else{if(!(4&s)){c.push([u+1,l+a.righttop]),r=-1,i=0,o=1,f=!0;break}c.push([u+1,l]),r=0,i=-1,o=1}}else{if(1!==i){console.log("MarchingSquaresJS-isoBands: where did we came from???");break}if(0!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[l][u-1])r=-1,i=0,o=0;else{if(!(s&eo)){c.push([u,l+a.leftbottom]),r=1,i=0,o=0,f=!0;break}c.push([u,l+1]),r=0,i=1,o=0}}if(l+=i,(u+=r)===e&&l===n)break}return{path:c,i:u,j:l,x:r,y:i,o:o}}function Yo(t){if(t.edges.length>0){var e=t.edges[t.edges.length-1],n=t.cval_real;switch(e){case 0:return n&no?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 1:return 4&n?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 2:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 3:return 1&n?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 4:return n&no?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 5:return 4&n?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 6:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 7:return 1&n?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 8:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.righttop],x:-1,y:0,o:1};case 9:return 1&n?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 10:return 1&n?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.righttop],x:-1,y:0,o:1};case 11:return n&eo?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 12:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 13:return 1&n?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 14:return 1&n?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 15:return n&eo?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 16:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 17:return n&eo?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 18:return 1&n?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 19:return n&eo?{p:[t.bottomleft,0],x:0,y:1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 20:return n&eo?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 21:return n&no?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.topright,1],x:0,y:-1,o:1};case 22:return n&eo?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 23:return n&no?{p:[0,t.lefttop],x:1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(t)}}return null}function Zo(t,e,n,r){var i,o,a,s,u,l=t.cval;switch(e){case-1:0===r?(i=Do[l],a=ho[l],s=po[l],u=mo[l]):(i=No[l],a=lo[l],s=co[l],u=fo[l]);break;case 1:0===r?(i=zo[l],a=Oo[l],s=So[l],u=Po[l]):(i=Uo[l],a=wo[l],s=xo[l],u=Eo[l]);break;default:switch(n){case-1:0===r?(i=Go[l],a=ro[l],s=io[l],u=oo[l]):(i=Vo[l],a=ao[l],s=so[l],u=uo[l]);break;case 1:0===r?(i=Bo[l],a=go[l],s=yo[l],u=vo[l]):(i=Fo[l],a=bo[l],s=_o[l],u=Ao[l])}}if(o=t.edges.indexOf(i),void 0===t.edges[o])return null;switch(function(t,e){delete t.edges[e];for(var n=e+1;n<t.edges.length;n++)t.edges[n-1]=t.edges[n];t.edges.pop()}(t,o),l=t.cval_real,i){case 0:l&no?(e=t.topleft,n=1):(e=1,n=t.righttop);break;case 1:4&l?(e=1,n=t.rightbottom):(e=t.topleft,n=1);break;case 2:4&l?(e=t.topleft,n=1):(e=t.bottomright,n=0);break;case 3:1&l?(e=t.bottomleft,n=0):(e=t.topleft,n=1);break;case 4:l&no?(e=t.topright,n=1):(e=1,n=t.righttop);break;case 5:4&l?(e=1,n=t.rightbottom):(e=t.topright,n=1);break;case 6:4&l?(e=t.topright,n=1):(e=t.bottomright,n=0);break;case 7:1&l?(e=t.bottomleft,n=0):(e=t.topright,n=1);break;case 8:4&l?(e=1,n=t.righttop):(e=t.bottomright,n=0);break;case 9:1&l?(e=t.bottomleft,n=0):(e=1,n=t.righttop);break;case 10:1&l?(e=1,n=t.righttop):(e=0,n=t.leftbottom);break;case 11:l&eo?(e=0,n=t.lefttop):(e=1,n=t.righttop);break;case 12:4&l?(e=1,n=t.rightbottom):(e=t.bottomright,n=0);break;case 13:1&l?(e=t.bottomleft,n=0):(e=1,n=t.rightbottom);break;case 14:1&l?(e=1,n=t.rightbottom):(e=0,n=t.leftbottom);break;case 15:l&eo?(e=0,n=t.lefttop):(e=1,n=t.rightbottom);break;case 16:4&l?(e=0,n=t.leftbottom):(e=t.bottomright,n=0);break;case 17:l&eo?(e=0,n=t.lefttop):(e=t.bottomright,n=0);break;case 18:1&l?(e=t.bottomleft,n=0):(e=0,n=t.leftbottom);break;case 19:l&eo?(e=0,n=t.lefttop):(e=t.bottomleft,n=0);break;case 20:l&eo?(e=0,n=t.leftbottom):(e=t.topleft,n=1);break;case 21:l&no?(e=t.topright,n=1):(e=0,n=t.leftbottom);break;case 22:l&eo?(e=0,n=t.lefttop):(e=t.topleft,n=1);break;case 23:l&no?(e=t.topright,n=1):(e=0,n=t.lefttop);break;default:return console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(t),null}return void 0!==e&&void 0!==n&&void 0!==a&&void 0!==s&&void 0!==u||(console.log("MarchingSquaresJS-isoBands: undefined value!"),console.log(t),console.log(e+" "+n+" "+a+" "+s+" "+u)),{p:[e,n],x:a,y:s,o:u}}function Ko(t){var e=[],n=[];t.forEach((function(t){var r=Vr(c([t]));n.push(r),e.push({ring:t,area:r})})),n.sort((function(t,e){return e-t}));var r=[];return n.forEach((function(t){for(var n=0;n<e.length;n++)if(e[n].area===t){r.push(e[n].ring),e.splice(n,1);break}})),r}function $o(t){for(var e=t.map((function(t){return{lrCoordinates:t,grouped:!1}})),n=[];!Qo(e);)for(var r=0;r<e.length;r++)if(!e[r].grouped){var i=[];i.push(e[r].lrCoordinates),e[r].grouped=!0;for(var o=c([e[r].lrCoordinates]),a=r+1;a<e.length;a++)e[a].grouped||Jo(c([e[a].lrCoordinates]),o)&&(i.push(e[a].lrCoordinates),e[a].grouped=!0);n.push(i)}return n}function Jo(t,e){for(var n=xn(t),r=0;r<n.features.length;r++)if(!ye(n.features[r],e))return!1;return!0}function Qo(t){for(var e=0;e<t.length;e++)if(!1===t[e].grouped)return!1;return!0}function ta(t,e,n){if(!T(n=n||{}))throw new Error("options is invalid");var r=n.pivot,i=n.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("angle is required");return 0===e||(r||(r=wn(t)),!1!==i&&void 0!==i||(t=Oe(t)),j(t,(function(t){var n=Ui(r,t)+e,i=Rr(r,t),o=Q(Vi(r,i,n));t[0]=o[0],t[1]=o[1]}))),t}function ea(t,e,n){if(!T(n=n||{}))throw new Error("options is invalid");var r=n.origin,i=n.mutate;if(!t)throw new Error("geojson required");if("number"!=typeof e||0===e)throw new Error("invalid factor");var o=Array.isArray(r)||"object"==typeof r;return!0!==i&&(t=Oe(t)),"FeatureCollection"!==t.type||o?na(t,e,r):(D(t,(function(n,i){t.features[i]=na(n,e,r)})),t)}function na(t,e,n){var r="Point"===ot(t);return n=function(t,e){if(null==e&&(e="centroid"),Array.isArray(e)||"object"==typeof e)return J(e);var n=t.bbox?t.bbox:$(t),r=n[0],i=n[1],o=n[2],a=n[3];switch(e){case"sw":case"southwest":case"westsouth":case"bottomleft":return u([r,i]);case"se":case"southeast":case"eastsouth":case"bottomright":return u([o,i]);case"nw":case"northwest":case"westnorth":case"topleft":return u([r,a]);case"ne":case"northeast":case"eastnorth":case"topright":return u([o,a]);case"center":return An(t);case void 0:case null:case"centroid":return wn(t);default:throw new Error("invalid origin")}}(t,n),1===e||r||j(t,(function(t){var r=Rr(n,t),i=Ui(n,t),o=Q(Vi(n,r*e,i));t[0]=o[0],t[1]=o[1],3===t.length&&(t[2]*=e)})),t}function ra(t){var e=t[0],n=t[1];return[n[0]-e[0],n[1]-e[1]]}function ia(t,e){return t[0]*e[1]-e[0]*t[1]}function oa(t,e){return!function(t,e){return 0===ia(ra(t),ra(e))}(t,e)&&function(t,e){var n,r,i=t[0],o=ra(t),a=e[0],s=ra(e),u=ia(o,s);return function(t,e){return[t[0]+e[0],t[1]+e[1]]}(i,function(t,e){return[t*e[0],t*e[1]]}(ia((r=i,[(n=a)[0]-r[0],n[1]-r[1]]),s)/u,o))}(t,e)}function aa(t,e,n){var r=[],i=w(e,n),o=Q(t),a=[];return o.forEach((function(t,e){if(e!==o.length-1){var n=(l=t,c=o[e+1],f=i,h=Math.sqrt((l[0]-c[0])*(l[0]-c[0])+(l[1]-c[1])*(l[1]-c[1])),p=l[0]+f*(c[1]-l[1])/h,d=c[0]+f*(c[1]-l[1])/h,[[p,l[1]+f*(l[0]-c[0])/h],[d,c[1]+f*(l[0]-c[0])/h]]);if(r.push(n),e>0){var s=r[e-1],u=oa(n,s);!1!==u&&(s[1]=u,n[0]=u),a.push(s[0]),e===o.length-2&&(a.push(n[0]),a.push(n[1]))}2===o.length&&(a.push(n[0]),a.push(n[1]))}var l,c,f,h,p,d})),h(a,t.properties)}function sa(t,e,n){var r=e[0]-t[0],i=e[1]-t[1],o=n[0]-e[0];return function(t){return(t>0)-(t<0)||+t}(r*(n[1]-e[1])-o*i)}function ua(t,e){return e.geometry.coordinates[0].every((function(e){return ye(u(e),t)}))}qo[1]=qo[169]=Co,qo[4]=qo[166]=To,qo[16]=qo[154]=ko,qo[64]=qo[106]=Io,qo[168]=qo[2]=Lo,qo[162]=qo[8]=jo,qo[138]=qo[32]=Mo,qo[42]=qo[128]=Ro,qo[5]=qo[165]=function(t){return[[0,0],[0,t.leftbottom],[1,t.rightbottom],[1,0]]},qo[20]=qo[150]=function(t){return[[1,0],[t.bottomright,0],[t.topright,1],[1,1]]},qo[80]=qo[90]=function(t){return[[1,1],[1,t.righttop],[0,t.lefttop],[0,1]]},qo[65]=qo[105]=function(t){return[[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},qo[160]=qo[10]=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.leftbottom],[0,t.lefttop]]},qo[130]=qo[40]=function(t){return[[t.topleft,1],[t.topright,1],[t.bottomright,0],[t.bottomleft,0]]},qo[85]=function(){return[[0,0],[0,1],[1,1],[1,0]]},qo[101]=qo[69]=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,1],[t.topleft,1]]},qo[149]=qo[21]=function(t){return[[t.topright,1],[1,1],[1,0],[0,0],[0,t.leftbottom]]},qo[86]=qo[84]=function(t){return[[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[1,1]]},qo[89]=qo[81]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,1]]},qo[96]=qo[74]=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.lefttop],[0,1],[t.topleft,1]]},qo[24]=qo[146]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[t.topright,1]]},qo[6]=qo[164]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop]]},qo[129]=qo[41]=function(t){return[[t.topright,1],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1]]},qo[66]=qo[104]=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},qo[144]=qo[26]=function(t){return[[1,1],[1,t.righttop],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},qo[36]=qo[134]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[t.topleft,1],[t.topright,1]]},qo[9]=qo[161]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom]]},qo[37]=qo[133]=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},qo[148]=qo[22]=function(t){return[[1,1],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},qo[82]=qo[88]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1]]},qo[73]=qo[97]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},qo[145]=qo[25]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},qo[70]=qo[100]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},qo[34]=function(t){return[Ro(t),jo(t)]},qo[35]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},qo[136]=function(t){return[Mo(t),Lo(t)]},qo[153]=function(t){return[ko(t),Co(t)]},qo[102]=function(t){return[To(t),Io(t)]},qo[155]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},qo[103]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},qo[152]=function(t){return[ko(t),Lo(t)]},qo[156]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},qo[137]=function(t){return[Mo(t),Co(t)]},qo[139]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},qo[98]=function(t){return[jo(t),Io(t)]},qo[99]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},qo[38]=function(t){return[To(t),Ro(t)]},qo[39]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]};var la=function(){function t(e){this.id=t.buildId(e),this.coordinates=e,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return t.buildId=function(t){return t.join(",")},t.prototype.removeInnerEdge=function(t){this.innerEdges=this.innerEdges.filter((function(e){return e.from.id!==t.from.id}))},t.prototype.removeOuterEdge=function(t){this.outerEdges=this.outerEdges.filter((function(e){return e.to.id!==t.to.id}))},t.prototype.addOuterEdge=function(t){this.outerEdges.push(t),this.outerEdgesSorted=!1},t.prototype.sortOuterEdges=function(){var t=this;this.outerEdgesSorted||(this.outerEdges.sort((function(e,n){var r=e.to,i=n.to;if(r.coordinates[0]-t.coordinates[0]>=0&&i.coordinates[0]-t.coordinates[0]<0)return 1;if(r.coordinates[0]-t.coordinates[0]<0&&i.coordinates[0]-t.coordinates[0]>=0)return-1;if(r.coordinates[0]-t.coordinates[0]==0&&i.coordinates[0]-t.coordinates[0]==0)return r.coordinates[1]-t.coordinates[1]>=0||i.coordinates[1]-t.coordinates[1]>=0?r.coordinates[1]-i.coordinates[1]:i.coordinates[1]-r.coordinates[1];var o=sa(t.coordinates,r.coordinates,i.coordinates);return o<0?1:o>0?-1:Math.pow(r.coordinates[0]-t.coordinates[0],2)+Math.pow(r.coordinates[1]-t.coordinates[1],2)-(Math.pow(i.coordinates[0]-t.coordinates[0],2)+Math.pow(i.coordinates[1]-t.coordinates[1],2))})),this.outerEdgesSorted=!0)},t.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},t.prototype.getOuterEdge=function(t){return this.sortOuterEdges(),this.outerEdges[t]},t.prototype.addInnerEdge=function(t){this.innerEdges.push(t)},t}(),ca=function(){function t(t,e){this.from=t,this.to=e,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return t.prototype.getSymetric=function(){return this.symetric||(this.symetric=new t(this.to,this.from),this.symetric.symetric=this),this.symetric},t.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},t.prototype.isEqual=function(t){return this.from.id===t.from.id&&this.to.id===t.to.id},t.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},t.prototype.toLineString=function(){return h([this.from.coordinates,this.to.coordinates])},t.prototype.compareTo=function(t){return sa(t.from.coordinates,t.to.coordinates,this.to.coordinates)},t}(),fa=function(){function t(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return t.prototype.push=function(t){this.edges.push(t),this.polygon=this.envelope=void 0},t.prototype.get=function(t){return this.edges[t]},Object.defineProperty(t.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.edges.forEach(t)},t.prototype.map=function(t){return this.edges.map(t)},t.prototype.some=function(t){return this.edges.some(t)},t.prototype.isValid=function(){return!0},t.prototype.isHole=function(){var t=this,e=this.edges.reduce((function(e,n,r){return n.from.coordinates[1]>t.edges[e].from.coordinates[1]&&(e=r),e}),0),n=(0===e?this.length:e)-1,r=(e+1)%this.length,i=sa(this.edges[n].from.coordinates,this.edges[e].from.coordinates,this.edges[r].from.coordinates);return 0===i?this.edges[n].from.coordinates[0]>this.edges[r].from.coordinates[0]:i>0},t.prototype.toMultiPoint=function(){return g(this.edges.map((function(t){return t.from.coordinates})))},t.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map((function(t){return t.from.coordinates}));return t.push(this.edges[0].from.coordinates),this.polygon=c([t])},t.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=gn(this.toPolygon())},t.findEdgeRingContaining=function(t,e){var n,r,i=t.getEnvelope();return e.forEach((function(e){var o,a,s,l,c,f,h=e.getEnvelope();if(r&&(n=r.getEnvelope()),a=i,s=(o=h).geometry.coordinates[0].map((function(t){return t[0]})),l=o.geometry.coordinates[0].map((function(t){return t[1]})),c=a.geometry.coordinates[0].map((function(t){return t[0]})),f=a.geometry.coordinates[0].map((function(t){return t[1]})),(Math.max.apply(null,s)!==Math.max.apply(null,c)||Math.max.apply(null,l)!==Math.max.apply(null,f)||Math.min.apply(null,s)!==Math.min.apply(null,c)||Math.min.apply(null,l)!==Math.min.apply(null,f))&&ua(h,i)){for(var p=t.map((function(t){return t.from.coordinates})),d=void 0,m=function(t){e.some((function(e){return n=t,r=e.from.coordinates,n[0]===r[0]&&n[1]===r[1];var n,r}))||(d=t)},g=0,y=p;g<y.length;g++)m(y[g]);d&&e.inside(u(d))&&(r&&!ua(n,h)||(r=e))}})),r},t.prototype.inside=function(t){return ye(t,this.toPolygon())},t}(),ha=function(){function t(){this.edges=[],this.nodes={}}return t.fromGeoJson=function(e){!function(t){if(!t)throw new Error("No geojson passed");if("FeatureCollection"!==t.type&&"GeometryCollection"!==t.type&&"MultiLineString"!==t.type&&"LineString"!==t.type&&"Feature"!==t.type)throw new Error("Invalid input type '"+t.type+"'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature")}(e);var n=new t;return G(e,(function(t){nt(t,"LineString","Graph::fromGeoJson"),M(t,(function(t,e){if(t){var r=n.getNode(t),i=n.getNode(e);n.addEdge(r,i)}return e}))})),n},t.prototype.getNode=function(t){var e=la.buildId(t),n=this.nodes[e];return n||(n=this.nodes[e]=new la(t)),n},t.prototype.addEdge=function(t,e){var n=new ca(t,e),r=n.getSymetric();this.edges.push(n),this.edges.push(r)},t.prototype.deleteDangles=function(){var t=this;Object.keys(this.nodes).map((function(e){return t.nodes[e]})).forEach((function(e){return t._removeIfDangle(e)}))},t.prototype._removeIfDangle=function(t){var e=this;if(t.innerEdges.length<=1){var n=t.getOuterEdges().map((function(t){return t.to}));this.removeNode(t),n.forEach((function(t){return e._removeIfDangle(t)}))}},t.prototype.deleteCutEdges=function(){var t=this;this._computeNextCWEdges(),this._findLabeledEdgeRings(),this.edges.forEach((function(e){e.label===e.symetric.label&&(t.removeEdge(e.symetric),t.removeEdge(e))}))},t.prototype._computeNextCWEdges=function(t){var e=this;void 0===t?Object.keys(this.nodes).forEach((function(t){return e._computeNextCWEdges(e.nodes[t])})):t.getOuterEdges().forEach((function(e,n){t.getOuterEdge((0===n?t.getOuterEdges().length:n)-1).symetric.next=e}))},t.prototype._computeNextCCWEdges=function(t,e){for(var n,r,i=t.getOuterEdges(),o=i.length-1;o>=0;--o){var a=i[o],s=a.symetric,u=void 0,l=void 0;a.label===e&&(u=a),s.label===e&&(l=s),u&&l&&(l&&(r=l),u&&(r&&(r.next=u,r=void 0),n||(n=u)))}r&&(r.next=n)},t.prototype._findLabeledEdgeRings=function(){var t=[],e=0;return this.edges.forEach((function(n){if(!(n.label>=0)){t.push(n);var r=n;do{r.label=e,r=r.next}while(!n.isEqual(r));e++}})),t},t.prototype.getEdgeRings=function(){var t=this;this._computeNextCWEdges(),this.edges.forEach((function(t){t.label=void 0})),this._findLabeledEdgeRings().forEach((function(e){t._findIntersectionNodes(e).forEach((function(n){t._computeNextCCWEdges(n,e.label)}))}));var e=[];return this.edges.forEach((function(n){n.ring||e.push(t._findEdgeRing(n))})),e},t.prototype._findIntersectionNodes=function(t){var e=[],n=t,r=function(){var r=0;n.from.getOuterEdges().forEach((function(e){e.label===t.label&&++r})),r>1&&e.push(n.from),n=n.next};do{r()}while(!t.isEqual(n));return e},t.prototype._findEdgeRing=function(t){var e=t,n=new fa;do{n.push(e),e.ring=n,e=e.next}while(!t.isEqual(e));return n},t.prototype.removeNode=function(t){var e=this;t.getOuterEdges().forEach((function(t){return e.removeEdge(t)})),t.innerEdges.forEach((function(t){return e.removeEdge(t)})),delete this.nodes[t.id]},t.prototype.removeEdge=function(t){this.edges=this.edges.filter((function(e){return!e.isEqual(t)})),t.deleteEdge()},t}();function pa(t,e){var n=!0;return G(t,(function(t){G(e,(function(e){if(!1===n)return!1;n=function(t,e){switch(t.type){case"Point":switch(e.type){case"Point":return n=t.coordinates,r=e.coordinates,!(n[0]===r[0]&&n[1]===r[1]);case"LineString":return!da(e,t);case"Polygon":return!ye(t,e)}break;case"LineString":switch(e.type){case"Point":return!da(t,e);case"LineString":return!function(t,e){return Lr(t,e).features.length>0}(t,e);case"Polygon":return!ma(e,t)}break;case"Polygon":switch(e.type){case"Point":return!ye(e,t);case"LineString":return!ma(t,e);case"Polygon":return!function(t,e){for(var n=0,r=t.coordinates[0];n<r.length;n++)if(ye(r[n],e))return!0;for(var i=0,o=e.coordinates[0];i<o.length;i++)if(ye(o[i],t))return!0;return Lr(Oi(t),Oi(e)).features.length>0}(e,t)}}var n,r;return!1}(t.geometry,e.geometry)}))})),n}function da(t,e){for(var n=0;n<t.coordinates.length-1;n++)if(ga(t.coordinates[n],t.coordinates[n+1],e.coordinates))return!0;return!1}function ma(t,e){for(var n=0,r=e.coordinates;n<r.length;n++)if(ye(r[n],t))return!0;return Lr(e,Oi(t)).features.length>0}function ga(t,e,n){var r=n[0]-t[0],i=n[1]-t[1],o=e[0]-t[0],a=e[1]-t[1];return 0==r*a-i*o&&(Math.abs(o)>=Math.abs(a)?o>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:a>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1])}function ya(t,e){return!(t[0]>e[0])&&!(t[2]<e[2])&&!(t[1]>e[1])&&!(t[3]<e[3])}function va(t,e){return t[0]===e[0]&&t[1]===e[1]}function ba(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}function _a(t,e){for(var n=!1,r=!1,i=t.coordinates.length,o=0;o<i&&!n&&!r;){for(var a=0;a<e.coordinates.length-1;a++){var s=!0;0!==a&&a!==e.coordinates.length-2||(s=!1),xa(e.coordinates[a],e.coordinates[a+1],t.coordinates[o],s)?n=!0:r=!0}o++}return n&&r}function Aa(t,e){return Lr(t,Si(e)).features.length>0}function wa(t,e){for(var n=!1,r=!1,i=t.coordinates.length,o=0;o<i&&(!n||!r);o++)ye(u(t.coordinates[o]),e)?n=!0:r=!0;return r&&n}function xa(t,e,n,r){var i=n[0]-t[0],o=n[1]-t[1],a=e[0]-t[0],s=e[1]-t[1];return 0==i*s-o*a&&(r?Math.abs(a)>=Math.abs(s)?a>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:s>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1]:Math.abs(a)>=Math.abs(s)?a>0?t[0]<n[0]&&n[0]<e[0]:e[0]<n[0]&&n[0]<t[0]:s>0?t[1]<n[1]&&n[1]<e[1]:e[1]<n[1]&&n[1]<t[1])}var Ea=function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:Pa};function Oa(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function Sa(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function Pa(t,e){return Di(t,e,{strict:!0})}Ea.prototype.compare=function(t,e){if(t.type!==e.type||!Sa(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates,0,!1);case"Polygon":return this.comparePolygon(t,e);case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var n=this,r=Oa(t),i=Oa(e);return r.every((function(t){return this.some((function(e){return n.compare(t,e)}))}),i)}}return!1},Ea.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n].toFixed(this.precision)!==e[n].toFixed(this.precision))return!1;return!0},Ea.prototype.compareLine=function(t,e,n,r){if(!Sa(t,e))return!1;var i=this.pseudoNode?t:this.removePseudo(t),o=this.pseudoNode?e:this.removePseudo(e);if(!r||this.compareCoord(i[0],o[0])||(o=this.fixStartIndex(o,i))){var a=this.compareCoord(i[n],o[n]);return this.direction||a?this.comparePath(i,o):!!this.compareCoord(i[n],o[o.length-(1+n)])&&this.comparePath(i.slice().reverse(),o)}},Ea.prototype.fixStartIndex=function(t,e){for(var n,r=-1,i=0;i<t.length;i++)if(this.compareCoord(t[i],e[0])){r=i;break}return r>=0&&(n=[].concat(t.slice(r,t.length),t.slice(1,r+1))),n},Ea.prototype.comparePath=function(t,e){var n=this;return t.every((function(t,e){return n.compareCoord(t,this[e])}),e)},Ea.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var n=t.coordinates.slice(1,t.coordinates.length),r=e.coordinates.slice(1,e.coordinates.length),i=this;return n.every((function(t){return this.some((function(e){return i.compareLine(t,e,1,!0)}))}),r)}return!1},Ea.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},Ea.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},Ea.prototype.removePseudo=function(t){return t};var Ca=Ea;function Ta(t,e){var n=!1;return G(t,(function(t){G(e,(function(e){if(!0===n)return!0;n=!pa(t.geometry,e.geometry)}))})),n}var ka=Ut((function(t){function e(t,e,n,r){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,n,r)}e.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var i=0;i<this._datasetLength;i++)if(1!==this._visited[i]){this._visited[i]=1;var o=this._regionQuery(i);if(o.length<this.minPts)this.noise.push(i);else{var a=this.clusters.length;this.clusters.push([]),this._addToCluster(i,a),this._expandCluster(a,o)}}return this.clusters},e.prototype._init=function(t,e,n,r){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this.noise=[],this._datasetLength=t.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}e&&(this.epsilon=e),n&&(this.minPts=n),r&&(this.distance=r)},e.prototype._expandCluster=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(1!==this._visited[r]){this._visited[r]=1;var i=this._regionQuery(r);i.length>=this.minPts&&(e=this._mergeArrays(e,i))}1!==this._assigned[r]&&this._addToCluster(r,t)}},e.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},e.prototype._regionQuery=function(t){for(var e=[],n=0;n<this._datasetLength;n++)this.distance(this.dataset[t],this.dataset[n])<this.epsilon&&e.push(n);return e},e.prototype._mergeArrays=function(t,e){for(var n=e.length,r=0;r<n;r++){var i=e[r];t.indexOf(i)<0&&t.push(i)}return t},e.prototype._euclideanDistance=function(t,e){for(var n=0,r=Math.min(t.length,e.length);r--;)n+=(t[r]-e[r])*(t[r]-e[r]);return Math.sqrt(n)},t.exports&&(t.exports=e)})),Ia=Ut((function(t){function e(t,e,n){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(t,e,n)}e.prototype.init=function(t,e,n){this.assignments=[],this.centroids=[],void 0!==t&&(this.dataset=t),void 0!==e&&(this.k=e),void 0!==n&&(this.distance=n)},e.prototype.run=function(t,e){this.init(t,e);for(var n=this.dataset.length,r=0;r<this.k;r++)this.centroids[r]=this.randomCentroid();for(var i=!0;i;){i=this.assign();for(var o=0;o<this.k;o++){for(var a=new Array(c),s=0,u=0;u<c;u++)a[u]=0;for(var l=0;l<n;l++){var c=this.dataset[l].length;if(o===this.assignments[l]){for(u=0;u<c;u++)a[u]+=this.dataset[l][u];s++}}if(s>0){for(u=0;u<c;u++)a[u]/=s;this.centroids[o]=a}else this.centroids[o]=this.randomCentroid(),i=!0}}return this.getClusters()},e.prototype.randomCentroid=function(){var t,e,n=this.dataset.length-1;do{e=Math.round(Math.random()*n),t=this.dataset[e]}while(this.centroids.indexOf(t)>=0);return t},e.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,r=0;r<n;r++)(t=this.argmin(this.dataset[r],this.centroids,this.distance))!=this.assignments[r]&&(this.assignments[r]=t,e=!0);return e},e.prototype.getClusters=function(){for(var t,e=new Array(this.k),n=0;n<this.assignments.length;n++)void 0===e[t=this.assignments[n]]&&(e[t]=[]),e[t].push(n);return e},e.prototype.argmin=function(t,e,n){for(var r,i=Number.MAX_VALUE,o=0,a=e.length,s=0;s<a;s++)(r=n(t,e[s]))<i&&(i=r,o=s);return o},e.prototype.distance=function(t,e){for(var n=0,r=Math.min(t.length,e.length);r--;){var i=t[r]-e[r];n+=i*i}return Math.sqrt(n)},t.exports&&(t.exports=e)})),La=Ut((function(t){function e(t,e,n){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,n)}e.prototype.insert=function(t,e){for(var n=this._queue.length,r=n;r--;){var i=this._priorities[r];"desc"===this._sorting?e>i&&(n=r):e<i&&(n=r)}this._insertAt(t,e,n)},e.prototype.remove=function(t){for(var e=this._queue.length;e--;)if(t===this._queue[e]){this._queue.splice(e,1),this._priorities.splice(e,1);break}},e.prototype.forEach=function(t){this._queue.forEach(t)},e.prototype.getElements=function(){return this._queue},e.prototype.getElementPriority=function(t){return this._priorities[t]},e.prototype.getPriorities=function(){return this._priorities},e.prototype.getElementsWithPriorities=function(){for(var t=[],e=0,n=this._queue.length;e<n;e++)t.push([this._queue[e],this._priorities[e]]);return t},e.prototype._init=function(t,e,n){if(t&&e){if(this._queue=[],this._priorities=[],t.length!==e.length)throw new Error("Arrays must have the same length");for(var r=0;r<t.length;r++)this.insert(t[r],e[r])}n&&(this._sorting=n)},e.prototype._insertAt=function(t,e,n){this._queue.length===n?(this._queue.push(t),this._priorities.push(e)):(this._queue.splice(n,0,t),this._priorities.splice(n,0,e))},t.exports&&(t.exports=e)})),ja=Ut((function(t){if(t.exports)var e=La;function n(t,e,n,r){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(t,e,n,r)}n.prototype.run=function(t,n,r,i){this._init(t,n,r,i);for(var o=0,a=this.dataset.length;o<a;o++)if(1!==this._processed[o]){this._processed[o]=1,this.clusters.push([o]);var s=this.clusters.length-1;this._orderedList.push(o);var u=new e(null,null,"asc"),l=this._regionQuery(o);void 0!==this._distanceToCore(o)&&(this._updateQueue(o,l,u),this._expandCluster(s,u))}return this.clusters},n.prototype.getReachabilityPlot=function(){for(var t=[],e=0,n=this._orderedList.length;e<n;e++){var r=this._orderedList[e],i=this._reachability[r];t.push([r,i])}return t},n.prototype._init=function(t,e,n,r){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}e&&(this.epsilon=e),n&&(this.minPts=n),r&&(this.distance=r)},n.prototype._updateQueue=function(t,e,n){var r=this;this._coreDistance=this._distanceToCore(t),e.forEach((function(e){if(void 0===r._processed[e]){var i=r.distance(r.dataset[t],r.dataset[e]),o=Math.max(r._coreDistance,i);void 0===r._reachability[e]?(r._reachability[e]=o,n.insert(e,o)):o<r._reachability[e]&&(r._reachability[e]=o,n.remove(e),n.insert(e,o))}}))},n.prototype._expandCluster=function(t,e){for(var n=e.getElements(),r=0,i=n.length;r<i;r++){var o=n[r];if(void 0===this._processed[o]){var a=this._regionQuery(o);this._processed[o]=1,this.clusters[t].push(o),this._orderedList.push(o),void 0!==this._distanceToCore(o)&&(this._updateQueue(o,a,e),this._expandCluster(t,e))}}},n.prototype._distanceToCore=function(t){for(var e=this.epsilon,n=0;n<e;n++)if(this._regionQuery(t,n).length>=this.minPts)return n},n.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],r=0,i=this.dataset.length;r<i;r++)this.distance(this.dataset[t],this.dataset[r])<e&&n.push(r);return n},n.prototype._euclideanDistance=function(t,e){for(var n=0,r=Math.min(t.length,e.length);r--;)n+=(t[r]-e[r])*(t[r]-e[r]);return Math.sqrt(n)},t.exports&&(t.exports=n)})),Ma=Ut((function(t){t.exports&&(t.exports={DBSCAN:ka,KMEANS:Ia,OPTICS:ja,PriorityQueue:La})})),Ra=function(t,e,n){for(var r=t.length,i=0,o=0;o<r;o++){var a=(t[o]||0)-(e[o]||0);i+=a*a}return n?Math.sqrt(i):i},Na=Ra,Da=function(t,e,n){var r=Math.abs(t-e);return n?r:r*r},Fa=Ra,Ba=function(t,e){for(var n={},r=[],i=e<<2,o=t.length,a=t[0].length>0;r.length<e&&i-- >0;){var s=t[Math.floor(Math.random()*o)],u=a?s.join("_"):""+s;n[u]||(n[u]=!0,r.push(s))}if(r.length<e)throw new Error("Error initializating clusters");return r},za=function(t,e){var n=t[0].length?Na:Da,r=[],i=t.length,o=t[0].length>0,a=t[Math.floor(Math.random()*i)];for(o&&a.join("_"),r.push(a);r.length<e;){for(var s=[],u=r.length,l=0,c=[],f=0;f<i;f++){for(var h=1/0,p=0;p<u;p++){var d=n(t[f],r[p]);d<=h&&(h=d)}s[f]=h}for(var m=0;m<i;m++)l+=s[m];for(var g=0;g<i;g++)c[g]={i:g,v:t[g],pr:s[g]/l,cs:0};c.sort((function(t,e){return t.pr-e.pr})),c[0].cs=c[0].pr;for(var y=1;y<i;y++)c[y].cs=c[y-1].cs+c[y].pr;for(var v=Math.random(),b=0;b<i-1&&c[b++].cs<v;);r.push(c[b-1].v)}return r};function Ua(t,e,n){n=n||[];for(var r=0;r<t;r++)n[r]=e;return n}var Ga=function(t,e,n,r){var i=[],o=[],a=[],s=[],u=!1,l=r||1e4,c=t.length,f=t[0].length,h=f>0,p=[];if(n)i="kmrand"==n?Ba(t,e):"kmpp"==n?za(t,e):n;else for(var d={};i.length<e;){var m=Math.floor(Math.random()*c);d[m]||(d[m]=!0,i.push(t[m]))}do{Ua(e,0,p);for(var g=0;g<c;g++){for(var y=1/0,v=0,b=0;b<e;b++)(s=h?Fa(t[g],i[b]):Math.abs(t[g]-i[b]))<=y&&(y=s,v=b);a[g]=v,p[v]++}for(var _=[],A=(o=[],0);A<e;A++)_[A]=h?Ua(f,0,_[A]):0,o[A]=i[A];if(h){for(var w=0;w<e;w++)i[w]=[];for(var x=0;x<c;x++)for(var E=_[a[x]],O=t[x],S=0;S<f;S++)E[S]+=O[S];u=!0;for(var P=0;P<e;P++){for(var C=i[P],T=_[P],k=o[P],I=p[P],L=0;L<f;L++)C[L]=T[L]/I||0;if(u)for(var j=0;j<f;j++)if(k[j]!=C[j]){u=!1;break}}}else{for(var M=0;M<c;M++)_[a[M]]+=t[M];for(var R=0;R<e;R++)i[R]=_[R]/p[R]||0;u=!0;for(var N=0;N<e;N++)if(o[N]!=i[N]){u=!1;break}}u=u||--l<=0}while(!u);return{it:1e4-l,k:e,idxs:a,centroids:i}};function Va(t,e){return x(Ui(t[0],t[1]))===x(Ui(e[0],e[1]))}function qa(t,e){if(t.geometry&&t.geometry.type)return t.geometry.type;if(t.type)return t.type;throw new Error("Invalid GeoJSON object for "+e)}function Ha(t){for(var e=t,n=[];e.parent;)n.unshift(e),e=e.parent;return n}var Wa={search:function(t,e,n,r){t.cleanDirty();var i=(r=r||{}).heuristic||Wa.heuristics.manhattan,o=r.closest||!1,a=new Za((function(t){return t.f})),s=e;for(e.h=i(e,n),a.push(e);a.size()>0;){var u=a.pop();if(u===n)return Ha(u);u.closed=!0;for(var l=t.neighbors(u),c=0,f=l.length;c<f;++c){var h=l[c];if(!h.closed&&!h.isWall()){var p=u.g+h.getCost(u),d=h.visited;(!d||p<h.g)&&(h.visited=!0,h.parent=u,h.h=h.h||i(h,n),h.g=p,h.f=h.g+h.h,t.markDirty(h),o&&(h.h<s.h||h.h===s.h&&h.g<s.g)&&(s=h),d?a.rescoreElement(h):a.push(h))}}}return o?Ha(s):[]},heuristics:{manhattan:function(t,e){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},diagonal:function(t,e){var n=Math.sqrt(2),r=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return 1*(r+i)+(n-2)*Math.min(r,i)}},cleanNode:function(t){t.f=0,t.g=0,t.h=0,t.visited=!1,t.closed=!1,t.parent=null}};function Xa(t,e){e=e||{},this.nodes=[],this.diagonal=!!e.diagonal,this.grid=[];for(var n=0;n<t.length;n++){this.grid[n]=[];for(var r=0,i=t[n];r<i.length;r++){var o=new Ya(n,r,i[r]);this.grid[n][r]=o,this.nodes.push(o)}}this.init()}function Ya(t,e,n){this.x=t,this.y=e,this.weight=n}function Za(t){this.content=[],this.scoreFunction=t}function Ka(t,e){for(var n=0;n<e.features.length;n++)if(ye(t,e.features[n]))return!0;return!1}function $a(t){return function(){return t}}function Ja(t){return t[0]}function Qa(t){return t[1]}function ts(){this._=null}function es(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ns(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function rs(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function is(t){for(;t.L;)t=t.L;return t}function os(t,e,n,r){var i=[null,null],o=Ts.push(i)-1;return i.left=t,i.right=e,n&&ss(i,t,e,n),r&&ss(i,e,t,r),Ps[t.index].halfedges.push(o),Ps[e.index].halfedges.push(o),i}function as(t,e,n){var r=[e,n];return r.left=t,r}function ss(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function us(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],l=a[1],c=0,f=1,h=s[0]-u,p=s[1]-l;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<f&&(f=o)}if(o=n-l,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>c&&(c=o)}if(o=i-l,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<f&&(f=o)}return!(c>0||f<1)||(c>0&&(t[0]=[u+c*h,l+c*p]),f<1&&(t[1]=[u+f*h,l+f*p]),!0)}}}}}function ls(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],l=t.left,c=t.right,f=l[0],h=l[1],p=c[0],d=c[1],m=(f+p)/2,g=(h+d)/2;if(d===h){if(m<e||m>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[m,n];o=[m,i]}else{if(u){if(u[1]<n)return}else u=[m,i];o=[m,n]}}else if(s=g-(a=(f-p)/(d-h))*m,a<-1||a>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/a,i];o=[(n-s)/a,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]<e)return}else u=[r,a*r+s];o=[e,a*e+s]}return t[0]=u,t[1]=o,!0}function cs(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function fs(t,e){return e[+(e.left!==t.site)]}function hs(t,e){return e[+(e.left===t.site)]}Xa.prototype.init=function(){this.dirtyNodes=[];for(var t=0;t<this.nodes.length;t++)Wa.cleanNode(this.nodes[t])},Xa.prototype.cleanDirty=function(){for(var t=0;t<this.dirtyNodes.length;t++)Wa.cleanNode(this.dirtyNodes[t]);this.dirtyNodes=[]},Xa.prototype.markDirty=function(t){this.dirtyNodes.push(t)},Xa.prototype.neighbors=function(t){var e=[],n=t.x,r=t.y,i=this.grid;return i[n-1]&&i[n-1][r]&&e.push(i[n-1][r]),i[n+1]&&i[n+1][r]&&e.push(i[n+1][r]),i[n]&&i[n][r-1]&&e.push(i[n][r-1]),i[n]&&i[n][r+1]&&e.push(i[n][r+1]),this.diagonal&&(i[n-1]&&i[n-1][r-1]&&e.push(i[n-1][r-1]),i[n+1]&&i[n+1][r-1]&&e.push(i[n+1][r-1]),i[n-1]&&i[n-1][r+1]&&e.push(i[n-1][r+1]),i[n+1]&&i[n+1][r+1]&&e.push(i[n+1][r+1])),e},Xa.prototype.toString=function(){for(var t,e,n,r,i=[],o=this.grid,a=0,s=o.length;a<s;a++){for(t=[],n=0,r=(e=o[a]).length;n<r;n++)t.push(e[n].weight);i.push(t.join(" "))}return i.join("\n")},Ya.prototype.toString=function(){return"["+this.x+" "+this.y+"]"},Ya.prototype.getCost=function(t){return t&&t.x!==this.x&&t.y!==this.y?1.41421*this.weight:this.weight},Ya.prototype.isWall=function(){return 0===this.weight},Za.prototype={push:function(t){this.content.push(t),this.sinkDown(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.bubbleUp(0)),t},remove:function(t){var e=this.content.indexOf(t),n=this.content.pop();e!==this.content.length-1&&(this.content[e]=n,this.scoreFunction(n)<this.scoreFunction(t)?this.sinkDown(e):this.bubbleUp(e))},size:function(){return this.content.length},rescoreElement:function(t){this.sinkDown(this.content.indexOf(t))},sinkDown:function(t){for(var e=this.content[t];t>0;){var n=(t+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(e)<this.scoreFunction(r)))break;this.content[n]=e,this.content[t]=r,t=n}},bubbleUp:function(t){for(var e=this.content.length,n=this.content[t],r=this.scoreFunction(n);;){var i,o=t+1<<1,a=o-1,s=null;if(a<e){var u=this.content[a];(i=this.scoreFunction(u))<r&&(s=a)}if(o<e){var l=this.content[o];this.scoreFunction(l)<(null===s?r:i)&&(s=o)}if(null===s)break;this.content[t]=this.content[s],this.content[s]=n,t=s}}},ts.prototype={constructor:ts,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=is(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(ns(this,n),n=(t=n).U),n.C=!1,r.C=!0,rs(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(rs(this,n),n=(t=n).U),n.C=!1,r.C=!0,ns(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?is(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,ns(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,rs(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,ns(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,rs(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,ns(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,rs(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var ps,ds=[];function ms(){es(this),this.x=this.y=this.arc=this.site=this.cy=null}function gs(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],s=i[1],u=r[0]-a,l=r[1]-s,c=o[0]-a,f=o[1]-s,h=2*(u*f-l*c);if(!(h>=-Is)){var p=u*u+l*l,d=c*c+f*f,m=(f*p-l*d)/h,g=(u*d-c*p)/h,y=ds.pop()||new ms;y.arc=t,y.site=i,y.x=m+a,y.y=(y.cy=g+s)+Math.sqrt(m*m+g*g),t.circle=y;for(var v=null,b=Cs._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}Cs.insert(v,y),v||(ps=y)}}}}function ys(t){var e=t.circle;e&&(e.P||(ps=e.N),Cs.remove(e),ds.push(e),es(e),t.circle=null)}var vs=[];function bs(){es(this),this.edge=this.site=this.circle=null}function _s(t){var e=vs.pop()||new bs;return e.site=t,e}function As(t){ys(t),Ss.remove(t),vs.push(t),es(t)}function ws(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,s=[t];As(t);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<ks&&Math.abs(r-u.circle.cy)<ks;)o=u.P,s.unshift(u),As(u),u=o;s.unshift(u),ys(u);for(var l=a;l.circle&&Math.abs(n-l.circle.x)<ks&&Math.abs(r-l.circle.cy)<ks;)a=l.N,s.push(l),As(l),l=a;s.push(l),ys(l);var c,f=s.length;for(c=1;c<f;++c)l=s[c],u=s[c-1],ss(l.edge,u.site,l.site,i);u=s[0],(l=s[f-1]).edge=os(u.site,l.site,null,i),gs(u),gs(l)}function xs(t){for(var e,n,r,i,o=t[0],a=t[1],s=Ss._;s;)if((r=Es(s,a)-o)>ks)s=s.L;else{if(!((i=o-Os(s,a))>ks)){r>-ks?(e=s.P,n=s):i>-ks?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){Ps[t.index]={site:t,halfedges:[]}}(t);var u=_s(t);if(Ss.insert(e,u),e||n){if(e===n)return ys(e),n=_s(e.site),Ss.insert(u,n),u.edge=n.edge=os(e.site,u.site),gs(e),void gs(n);if(n){ys(e),ys(n);var l=e.site,c=l[0],f=l[1],h=t[0]-c,p=t[1]-f,d=n.site,m=d[0]-c,g=d[1]-f,y=2*(h*g-p*m),v=h*h+p*p,b=m*m+g*g,_=[(g*v-p*b)/y+c,(h*b-m*v)/y+f];ss(n.edge,l,d,_),u.edge=os(l,t,null,_),n.edge=os(t,d,null,_),gs(e),gs(n)}else u.edge=os(e.site,u.site)}}function Es(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],u=n[1],l=u-e;if(!l)return s;var c=s-r,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-u+l/2+i-o/2)))/f+r:(r+s)/2}function Os(t,e){var n=t.N;if(n)return Es(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Ss,Ps,Cs,Ts,ks=1e-6,Is=1e-12;function Ls(t,e){return e[1]-t[1]||e[0]-t[0]}function js(t,e){var n,r,i,o=t.sort(Ls).pop();for(Ts=[],Ps=new Array(t.length),Ss=new ts,Cs=new ts;;)if(i=ps,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||(xs(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;ws(i.arc)}if(function(){for(var t,e,n,r,i=0,o=Ps.length;i<o;++i)if((t=Ps[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),s=new Array(r);for(n=0;n<r;++n)a[n]=n,s[n]=cs(t,Ts[e[n]]);for(a.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[a[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var a=+e[0][0],s=+e[0][1],u=+e[1][0],l=+e[1][1];!function(t,e,n,r){for(var i,o=Ts.length;o--;)ls(i=Ts[o],t,e,n,r)&&us(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>ks||Math.abs(i[0][1]-i[1][1])>ks)||delete Ts[o]}(a,s,u,l),function(t,e,n,r){var i,o,a,s,u,l,c,f,h,p,d,m,g=Ps.length,y=!0;for(i=0;i<g;++i)if(o=Ps[i]){for(a=o.site,s=(u=o.halfedges).length;s--;)Ts[u[s]]||u.splice(s,1);for(s=0,l=u.length;s<l;)d=(p=hs(o,Ts[u[s]]))[0],m=p[1],f=(c=fs(o,Ts[u[++s%l]]))[0],h=c[1],(Math.abs(d-f)>ks||Math.abs(m-h)>ks)&&(u.splice(s,0,Ts.push(as(a,p,Math.abs(d-t)<ks&&r-m>ks?[t,Math.abs(f-t)<ks?h:r]:Math.abs(m-r)<ks&&n-d>ks?[Math.abs(h-r)<ks?f:n,r]:Math.abs(d-n)<ks&&m-e>ks?[n,Math.abs(f-n)<ks?h:e]:Math.abs(m-e)<ks&&d-t>ks?[Math.abs(h-e)<ks?f:t,e]:null))-1),++l);l&&(y=!1)}if(y){var v,b,_,A=1/0;for(i=0,y=null;i<g;++i)(o=Ps[i])&&(_=(v=(a=o.site)[0]-t)*v+(b=a[1]-e)*b)<A&&(A=_,y=o);if(y){var w=[t,e],x=[t,r],E=[n,r],O=[n,e];y.halfedges.push(Ts.push(as(a=y.site,w,x))-1,Ts.push(as(a,x,E))-1,Ts.push(as(a,E,O))-1,Ts.push(as(a,O,w))-1)}}for(i=0;i<g;++i)(o=Ps[i])&&(o.halfedges.length||delete Ps[i])}(a,s,u,l)}this.edges=Ts,this.cells=Ps,Ss=Cs=Ts=Ps=null}function Ms(t){return(t=t.slice()).push(t[0]),c([t])}function Rs(t,e,n,r){var i=(r=r||{}).steps||64,o=r.units||"kilometers",a=r.angle||0,s=r.pivot||t,u=r.properties||t.properties||{};if(!t)throw new Error("center is required");if(!e)throw new Error("xSemiAxis is required");if(!n)throw new Error("ySemiAxis is required");if(!T(r))throw new Error("options must be an object");if(!C(i))throw new Error("steps must be a number");if(!C(a))throw new Error("angle must be a number");var l=J(t);if("degrees"===o)var f=O(a);else e=Vi(t,e,90,{units:o}),n=Vi(t,n,0,{units:o}),e=J(e)[0]-l[0],n=J(n)[1]-l[1];for(var h=[],p=0;p<i;p+=1){var d=-360*p/i,m=e*n/Math.sqrt(Math.pow(n,2)+Math.pow(e,2)*Math.pow(Ns(d),2)),g=e*n/Math.sqrt(Math.pow(e,2)+Math.pow(n,2)/Math.pow(Ns(d),2));if(d<-90&&d>=-270&&(m=-m),d<-180&&d>=-360&&(g=-g),"degrees"===o){var y=m*Math.cos(f)+g*Math.sin(f),v=g*Math.cos(f)-m*Math.sin(f);m=y,g=v}h.push([m+l[0],g+l[1]])}return h.push(h[0]),"degrees"===o?c([h],u):ta(c([h],u),a,{pivot:s})}function Ns(t){var e=t*Math.PI/180;return Math.tan(e)}function Ds(t,e){void 0===e&&(e={});var n=0,r=0,i=0;return z(t,(function(t,o,a){var s=e.weight?null==a?void 0:a[e.weight]:void 0;if(!C(s=null==s?1:s))throw new Error("weight value must be a number for feature index "+o);(s=Number(s))>0&&j(t,(function(t){n+=t[0]*s,r+=t[1]*s,i+=s}))})),u([n/i,r/i],e.properties,e)}function Fs(t,e,n,r,i){var o=r.tolerance||.001,a=0,s=0,l=0,c=0;if(D(n,(function(e){var n,r=null===(n=e.properties)||void 0===n?void 0:n.weight,i=null==r?1:r;if(!C(i=Number(i)))throw new Error("weight value must be a number");if(i>0){c+=1;var o=i*_e(e,t);0===o&&(o=1);var u=i/o;a+=e.geometry.coordinates[0]*u,s+=e.geometry.coordinates[1]*u,l+=u}})),c<1)throw new Error("no features to measure");var f=a/l,h=s/l;return 1===c||0===i||Math.abs(f-e[0])<o&&Math.abs(h-e[1])<o?u([f,h],{medianCandidates:r.medianCandidates}):(r.medianCandidates.push([f,h]),Fs([f,h],t,n,r,i-1))}function Bs(t,e){return{x:t[0]-e[0],y:t[1]-e[1]}}function zs(t,e){var n=0,r=0;j(t,(function(i,o,a,s,u){u>n&&(n=u,r=o,e.push([]));var l=o-r,c=t.coordinates[u][l+1],f=i[0],h=i[1],p=c[0],d=c[1];e[u].push([.75*f+.25*p,.75*h+.25*d]),e[u].push([.25*f+.75*p,.25*h+.75*d])}),!0),e.forEach((function(t){t.push(t[0])}))}function Us(t,e){var n=0,r=0,i=0;j(t,(function(o,a,s,u,l){u>i&&(i=u,r=a,e.push([[]])),l>n&&(n=l,r=a,e[u].push([]));var c=a-r,f=t.coordinates[u][l][c+1],h=o[0],p=o[1],d=f[0],m=f[1];e[u][l].push([.75*h+.25*d,.75*p+.25*m]),e[u][l].push([.25*h+.75*d,.25*p+.75*m])}),!0),e.forEach((function(t){t.forEach((function(t){t.push(t[0])}))}))}function Gs(t,e,n){void 0===n&&(n=2);var r=J(t),i=J(e),o=r[0]-i[0],a=r[1]-i[1];return 1===n?Math.abs(o)+Math.abs(a):Math.pow(Math.pow(o,n)+Math.pow(a,n),1/n)}function Vs(t,e){var n=(e=e||{}).threshold||1e4,r=e.p||2,i=e.binary||!1,o=e.alpha||-1,a=e.standardization||!1,s=[];D(t,(function(t){s.push(wn(t))}));for(var u=[],l=0;l<s.length;l++)u[l]=[];for(l=0;l<s.length;l++)for(var c=l;c<s.length;c++){l===c&&(u[l][c]=0);var f=Gs(s[l],s[c],r);u[l][c]=f,u[c][l]=f}for(l=0;l<s.length;l++)for(c=0;c<s.length;c++)0!==(f=u[l][c])&&(u[l][c]=i?f<=n?1:0:f<=n?Math.pow(f,o):0);if(a)for(l=0;l<s.length;l++){var h=u[l].reduce((function(t,e){return t+e}),0);for(c=0;c<s.length;c++)u[l][c]=u[l][c]/h}return u}function qs(t){for(var e=0,n=0,r=t;n<r.length;n++)e+=r[n];return e/t.length}function Hs(t,e){return void 0===e&&(e={}),Xs(t,"mercator",e)}function Ws(t,e){return void 0===e&&(e={}),Xs(t,"wgs84",e)}function Xs(t,e,n){void 0===n&&(n={});var r=(n=n||{}).mutate;if(!t)throw new Error("geojson is required");return Array.isArray(t)&&C(t[0])?t="mercator"===e?Ys(t):Zs(t):(!0!==r&&(t=Oe(t)),j(t,(function(t){var n="mercator"===e?Ys(t):Zs(t);t[0]=n[0],t[1]=n[1]}))),t}function Ys(t){var e=Math.PI/180,n=6378137,r=20037508.342789244,i=[n*(Math.abs(t[0])<=180?t[0]:t[0]-360*function(t){return t<0?-1:t>0?1:0}(t[0]))*e,n*Math.log(Math.tan(.25*Math.PI+.5*t[1]*e))];return i[0]>r&&(i[0]=r),i[0]<-r&&(i[0]=-r),i[1]>r&&(i[1]=r),i[1]<-r&&(i[1]=-r),i}function Zs(t){var e=180/Math.PI,n=6378137;return[t[0]*e/n,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/n)))*e]}js.prototype={constructor:js,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return fs(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,s,u,l,c=n.site,f=-1,h=e[i[o-1]],p=h.left===c?h.right:h.left;++f<o;)a=p,p=(h=e[i[f]]).left===c?h.right:h.left,a&&p&&r<a.index&&r<p.index&&(u=a,l=p,((s=c)[0]-l[0])*(u[1]-s[1])-(s[0]-u[0])*(l[1]-s[1])<0)&&t.push([c.data,a.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=t-i.site[0],l=e-i.site[1],c=u*u+l*l;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],l=e-s[1],f=u*u+l*l;f<c&&(c=f,a=s.index)}}))}while(null!==a);return o._found=r,null==n||c<=n*n?i.site:null}};var Ks=Object.freeze({__proto__:null,toMercator:Hs,toWgs84:Ws}),$s=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};function Js(t){return Array.isArray(t)?ru(t):t&&t.bbox?ru(t.bbox):[360*nu(),180*nu()]}function Qs(t,e){void 0===e&&(e={}),null==t&&(t=1);for(var n=[],r=0;r<t;r++)n.push(u(Js(e.bbox)));return d(n)}function tu(t,e){void 0===e&&(e={}),null==t&&(t=1),C(e.num_vertices)&&void 0!==e.num_vertices||(e.num_vertices=10),C(e.max_radial_length)&&void 0!==e.max_radial_length||(e.max_radial_length=10);for(var n=[],r=function(t){var r,i=[],o=$s(Array(e.num_vertices+1)).map(Math.random);o.forEach((function(t,e,n){n[e]=e>0?t+n[e-1]:t})),o.forEach((function(t){t=2*t*Math.PI/o[o.length-1];var n=Math.random();i.push([n*(e.max_radial_length||10)*Math.sin(t),n*(e.max_radial_length||10)*Math.cos(t)])})),i[i.length-1]=i[0],i=i.map((r=Js(e.bbox),function(t){return[t[0]+r[0],t[1]+r[1]]})),n.push(c([i]))},i=0;i<t;i++)r();return d(n)}function eu(t,e){if(void 0===e&&(e={}),!T(e=e||{}))throw new Error("options is invalid");var n=e.bbox,r=e.num_vertices,i=e.max_length,o=e.max_rotation;null==t&&(t=1),(!C(r)||void 0===r||r<2)&&(r=10),C(i)&&void 0!==i||(i=1e-4),C(o)&&void 0!==o||(o=Math.PI/8);for(var a=[],s=0;s<t;s++){for(var u=[Js(n)],l=0;l<r-1;l++){var c=(0===l?2*Math.random()*Math.PI:Math.tan((u[l][1]-u[l-1][1])/(u[l][0]-u[l-1][0])))+(Math.random()-.5)*o*2,f=Math.random()*i;u.push([u[l][0]+f*Math.cos(c),u[l][1]+f*Math.sin(c)])}a.push(h(u))}return d(a)}function nu(){return Math.random()-.5}function ru(t){return[Math.random()*(t[2]-t[0])+t[0],Math.random()*(t[3]-t[1])+t[1]]}var iu=Object.freeze({__proto__:null,randomPosition:Js,randomPoint:Qs,randomPolygon:tu,randomLineString:eu});function ou(t,e){if(!t)throw new Error("geojson is required");if("FeatureCollection"!==t.type)throw new Error("geojson must be a FeatureCollection");if(null==e)throw new Error("filter is required");var n=[];return D(t,(function(t){lu(t.properties,e)&&n.push(t)})),d(n)}function au(t,e,n){if(!t)throw new Error("geojson is required");if("FeatureCollection"!==t.type)throw new Error("geojson must be a FeatureCollection");if(null==e)throw new Error("property is required");for(var r=uu(t,e),i=Object.keys(r),o=0;o<i.length;o++){for(var a=i[o],s=r[a],u=[],l=0;l<s.length;l++)u.push(t.features[s[l]]);n(d(u),a,o)}}function su(t,e,n,r){var i=r;return au(t,e,(function(t,e,o){i=0===o&&void 0===r?t:n(i,t,e,o)})),i}function uu(t,e){var n={};return D(t,(function(t,r){var i=t.properties||{};if(Object.prototype.hasOwnProperty.call(i,String(e))){var o=i[e];Object.prototype.hasOwnProperty.call(n,o)?n[o].push(r):n[o]=[r]}})),n}function lu(t,e){if(void 0===t)return!1;var n=typeof e;if("number"===n||"string"===n)return Object.prototype.hasOwnProperty.call(t,e);if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(!lu(t,e[r]))return!1;return!0}return cu(t,e)}function cu(t,e){for(var n=Object.keys(e),r=0;r<n.length;r++){var i=n[r];if(t[i]!==e[i])return!1}return!0}function fu(t,e){if(!e)return{};if(!e.length)return{};for(var n={},r=0;r<e.length;r++){var i=e[r];Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n}var hu=Object.freeze({__proto__:null,getCluster:ou,clusterEach:au,clusterReduce:su,createBins:uu,applyFilter:lu,propertiesContainsFilter:cu,filterProperties:fu}),pu=function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null};function du(t,e){return t>e?1:t<e?-1:0}function mu(t,e,n){for(var r=new pu(null,null),i=r,o=r;;){var a=n(t,e.key);if(a<0){if(null===e.left)break;if(n(t,e.left.key)<0){var s=e.left;if(e.left=s.right,s.right=e,null===(e=s).left)break}o.left=e,o=e,e=e.left}else{if(!(a>0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(s=e.right,e.right=s.left,s.left=e,null===(e=s).right))break;i.right=e,i=e,e=e.right}}return i.right=e.left,o.left=e.right,e.left=r.right,e.right=r.left,e}function gu(t,e,n,r){var i=new pu(t,e);if(null===n)return i.left=i.right=null,i;var o=r(t,(n=mu(t,n,r)).key);return o<0?(i.left=n.left,i.right=n,n.left=null):o>=0&&(i.right=n.right,i.left=n,n.right=null),i}function yu(t,e,n){var r=null,i=null;if(e){var o=n((e=mu(t,e,n)).key,t);0===o?(r=e.left,i=e.right):o<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function vu(t,e,n,r,i){if(t){r(e+(n?"\u2514\u2500\u2500 ":"\u251c\u2500\u2500 ")+i(t)+"\n");var o=e+(n?"    ":"\u2502   ");t.left&&vu(t.left,o,!1,r,i),t.right&&vu(t.right,o,!0,r,i)}}var bu=function(){function t(t){void 0===t&&(t=du),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=gu(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new pu(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,i=mu(t,this._root,r),o=r(t,i.key);return 0===o?this._root=i:(o<0?(n.left=i.left,n.right=i,i.left=null):o>0&&(n.right=i.right,n.left=i,i.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=mu(t,e,n)).key)?(null===e.left?r=e.right:(r=mu(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=mu(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=mu(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.left;else{if(o((a=i.pop()).key,e)>0)break;if(o(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return function(t){for(var e=t,n=[],r=!1,i=new pu(null,null),o=i;!r;)e?(n.push(e),e=e.left):n.length>0?e=(e=o=o.next=n.pop()).right:r=!0;return o.next=null,i.next}(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,i=this._comparator;if(n&&wu(t,e,0,r-1,i),null===this._root)this._root=_u(t,e,0,r),this._size=r;else{var o=function(t,e,n){for(var r=new pu(null,null),i=r,o=t,a=e;null!==o&&null!==a;)n(o.key,a.key)<0?(i.next=o,o=o.next):(i.next=a,a=a.next),i=i.next;return null!==o?i.next=o:null!==a&&(i.next=a),r.next}(this.toList(),function(t,e){for(var n=new pu(null,null),r=n,i=0;i<t.length;i++)r=r.next=new pu(t[i],e[i]);return r.next=null,n.next}(t,e),i);r=this._size+r,this._root=Au({head:o},0,r)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return vu(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var r=this._comparator,i=yu(t,this._root,r),o=i.left,a=i.right;r(t,e)<0?a=gu(e,n,a,r):o=gu(e,n,o,r),this._root=function(t,e,n){return null===e?t:(null===t||((e=mu(t.key,e,n)).left=t),e)}(o,a,r)},t.prototype.split=function(t){return yu(t,this._root,this._comparator)},t}();function _u(t,e,n,r){var i=r-n;if(i>0){var o=n+Math.floor(i/2),a=t[o],s=e[o],u=new pu(a,s);return u.left=_u(t,e,n,o),u.right=_u(t,e,o+1,r),u}return null}function Au(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=Au(t,e,i),a=t.head;return a.left=o,t.head=t.head.next,a.right=Au(t,i+1,n),a}return null}function wu(t,e,n,r,i){if(!(n>=r)){for(var o=t[n+r>>1],a=n-1,s=r+1;;){do{a++}while(i(t[a],o)<0);do{s--}while(i(t[s],o)>0);if(a>=s)break;var u=t[a];t[a]=t[s],t[s]=u,u=e[a],e[a]=e[s],e[s]=u}wu(t,e,n,s,i),wu(t,e,s+1,r,i)}}function xu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eu(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 Ou(t,e,n){return e&&Eu(t.prototype,e),n&&Eu(t,n),t}var Su=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},Pu=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}},Cu=Number.EPSILON;void 0===Cu&&(Cu=Math.pow(2,-52));var Tu=Cu*Cu,ku=function(t,e){if(-Cu<t&&t<Cu&&-Cu<e&&e<Cu)return 0;var n=t-e;return n*n<Tu*t*e?0:t<e?-1:1},Iu=function(){function t(){xu(this,t),this.reset()}return Ou(t,[{key:"reset",value:function(){this.xRounder=new Lu,this.yRounder=new Lu}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),t}(),Lu=function(){function t(){xu(this,t),this.tree=new bu,this.round(0)}return Ou(t,[{key:"round",value:function(t){var e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===ku(e.key,n.key))return this.tree.remove(t),n.key;var r=this.tree.next(e);return null!==r&&0===ku(e.key,r.key)?(this.tree.remove(t),r.key):t}}]),t}(),ju=new Iu,Mu=function(t,e){return t.x*e.y-t.y*e.x},Ru=function(t,e){return t.x*e.x+t.y*e.y},Nu=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y},o=Mu(r,i);return ku(o,0)},Du=function(t){return Math.sqrt(Ru(t,t))},Fu=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return Ru(i,r)/Du(i)/Du(r)},Bu=function(t,e,n){return 0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},zu=function(t,e,n){return 0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Uu=function(){function t(e,n){xu(this,t),void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return Ou(t,null,[{key:"compare",value:function(e,n){var r=t.comparePoints(e.point,n.point);return 0!==r?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Vu.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),Ou(t,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n<r;n++){var i=e[n];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var r=e+1;r<t;r++){var i=this.point.events[r];void 0===i.consumedBy&&n.otherSE.point.events===i.otherSE.point.events&&n.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var r=this.point.events[e];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&t.push(r)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,n=new Map,r=function(r){var i,o,a,s,u,l=r.otherSE;n.set(r,{sine:(i=e.point,o=t.point,a=l.point,s={x:o.x-i.x,y:o.y-i.y},u={x:a.x-i.x,y:a.y-i.y},Mu(u,s)/Du(u)/Du(s)),cosine:Fu(e.point,t.point,l.point)})};return function(t,e){n.has(t)||r(t),n.has(e)||r(e);var i=n.get(t),o=i.sine,a=i.cosine,s=n.get(e),u=s.sine,l=s.cosine;return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}]),t}(),Gu=0,Vu=function(){function t(e,n,r,i){xu(this,t),this.id=++Gu,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return Ou(t,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(i<r)return-1;var a=t.leftSE.point.y,s=e.leftSE.point.y,u=t.rightSE.point.y,l=e.rightSE.point.y;if(n<r){if(s<a&&s<u)return 1;if(s>a&&s>u)return-1;var c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=e.comparePoint(t.rightSE.point);return 0!==f?f:-1}if(n>r){if(a<s&&a<l)return-1;if(a>s&&a>l)return 1;var h=e.comparePoint(t.leftSE.point);if(0!==h)return h;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(a<s)return-1;if(a>s)return 1;if(i<o){var d=e.comparePoint(t.rightSE.point);if(0!==d)return d}if(i>o){var m=t.comparePoint(e.rightSE.point);if(m<0)return 1;if(m>0)return-1}if(i!==o){var g=u-a,y=i-n,v=l-s,b=o-r;if(g>y&&v<b)return 1;if(g<y&&v>b)return-1}return i>o?1:i<o||u<l?-1:u>l?1:t.id<e.id?-1:t.id>e.id?1:0}}]),Ou(t,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;var i=(t.y-e.y)/r.y,o=e.x+i*r.x;if(t.x===o)return 0;var a=(t.x-e.x)/r.x,s=e.y+a*r.y;return t.y===s?0:t.y<s?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),n=t.bbox(),r=Pu(e,n);if(null===r)return null;var i=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,s=t.rightSE.point,u=Su(e,a)&&0===this.comparePoint(a),l=Su(n,i)&&0===t.comparePoint(i),c=Su(e,s)&&0===this.comparePoint(s),f=Su(n,o)&&0===t.comparePoint(o);if(l&&u)return f&&!c?o:!f&&c?s:null;if(l)return c&&i.x===s.x&&i.y===s.y?null:i;if(u)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&c)return null;if(f)return o;if(c)return s;var h=function(t,e,n,r){if(0===e.x)return zu(n,r,t.x);if(0===r.x)return zu(t,e,n.x);if(0===e.y)return Bu(n,r,t.y);if(0===r.y)return Bu(t,e,n.y);var i=Mu(e,r);if(0==i)return null;var o={x:n.x-t.x,y:n.y-t.y},a=Mu(o,e)/i,s=Mu(o,r)/i;return{x:(t.x+s*e.x+(n.x+a*r.x))/2,y:(t.y+s*e.y+(n.y+a*r.y))/2}}(i,this.vector(),a,t.vector());return null===h?null:Su(r,h)?ju.round(h.x,h.y):null}},{key:"split",value:function(e){var n=[],r=void 0!==e.events,i=new Uu(e,!0),o=new Uu(e,!1),a=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(i);var s=new t(i,a,this.rings.slice(),this.windings.slice());return Uu.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),Uu.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}},{key:"consume",value:function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var i=t.compare(n,r);if(0!==i){if(i>0){var o=n;n=r,r=o}if(n.prev===r){var a=n;n=r,r=a}for(var s=0,u=r.rings.length;s<u;s++){var l=r.rings[s],c=r.windings[s],f=n.rings.indexOf(l);-1===f?(n.rings.push(l),n.windings.push(c)):n.windings[f]+=c}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var a=this.rings[i],s=this.windings[i],u=e.indexOf(a);-1===u?(e.push(a),n.push(s)):n[u]+=s}for(var l=[],c=[],f=0,h=e.length;f<h;f++)if(0!==n[f]){var p=e[f],d=p.poly;if(-1===c.indexOf(d))if(p.isExterior)l.push(d);else{-1===c.indexOf(d)&&c.push(d);var m=l.indexOf(p.poly);-1!==m&&l.splice(m,1)}}for(var g=0,y=l.length;g<y;g++){var v=l[g].multiPoly;-1===r.indexOf(v)&&r.push(v)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(Qu.type){case"union":var n=0===t.length,r=0===e.length;this._isInResult=n!==r;break;case"intersection":var i,o;t.length<e.length?(i=t.length,o=e.length):(i=e.length,o=t.length),this._isInResult=o===Qu.numMultiPolys&&i<o;break;case"xor":var a=Math.abs(t.length-e.length);this._isInResult=a%2==1;break;case"difference":var s=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=s(t)!==s(e);break;default:throw new Error("Unrecognized operation type found ".concat(Qu.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,r){var i,o,a,s=Uu.comparePoints(e,n);if(s<0)i=e,o=n,a=1;else{if(!(s>0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));i=n,o=e,a=-1}return new t(new Uu(i,!0),new Uu(o,!1),[r],[a])}}]),t}(),qu=function(){function t(e,n,r){if(xu(this,t),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=ju.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var o=i,a=1,s=e.length;a<s;a++){if("number"!=typeof e[a][0]||"number"!=typeof e[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var u=ju.round(e[a][0],e[a][1]);u.x===o.x&&u.y===o.y||(this.segments.push(Vu.fromRing(o,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),o=u)}i.x===o.x&&i.y===o.y||this.segments.push(Vu.fromRing(o,i,this))}return Ou(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var r=this.segments[e];t.push(r.leftSE),t.push(r.rightSE)}return t}}]),t}(),Hu=function(){function t(e,n){if(xu(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new qu(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var r=1,i=e.length;r<i;r++){var o=new qu(e[r],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=n}return Ou(t,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var r=this.interiorRings[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),t}(),Wu=function(){function t(e,n){if(xu(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof e[0][0][0]&&(e=[e])}catch(t){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var r=0,i=e.length;r<i;r++){var o=new Hu(e[r],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=n}return Ou(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var r=this.polys[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),t}(),Xu=function(){function t(e){xu(this,t),this.events=e;for(var n=0,r=e.length;n<r;n++)e[n].segment.ringOut=this;this.poly=null}return Ou(t,null,[{key:"factory",value:function(e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];if(o.isInResult()&&!o.ringOut){for(var a=null,s=o.leftSE,u=o.rightSE,l=[s],c=s.point,f=[];a=s,s=u,l.push(s),s.point!==c;)for(;;){var h=s.getAvailableLinkedEvents();if(0===h.length){var p=l[0].point,d=l[l.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(p.x,",")+" ".concat(p.y,"]. Last matching segment found ends at")+" [".concat(d.x,", ").concat(d.y,"]."))}if(1===h.length){u=h[0].otherSE;break}for(var m=null,g=0,y=f.length;g<y;g++)if(f[g].point===s.point){m=g;break}if(null===m){f.push({index:l.length,point:s.point});var v=s.getLeftmostComparator(a);u=h.sort(v)[0].otherSE;break}var b=f.splice(m)[0],_=l.splice(b.index);_.unshift(_[0].otherSE),n.push(new t(_.reverse()))}n.push(new t(l))}}return n}}]),Ou(t,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],n=1,r=this.events.length-1;n<r;n++){var i=this.events[n].point,o=this.events[n+1].point;0!==Nu(i,t,o)&&(e.push(i),t=i)}if(1===e.length)return null;var a=e[0],s=e[1];0===Nu(a,t,s)&&e.shift(),e.push(e[0]);for(var u=this.isExteriorRing()?1:-1,l=this.isExteriorRing()?0:e.length-1,c=this.isExteriorRing()?e.length:-1,f=[],h=l;h!=c;h+=u)f.push([e[h].x,e[h].y]);return f}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var r=this.events[e];Uu.compare(t,r)>0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),t}(),Yu=function(){function t(e){xu(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return Ou(t,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e<n;e++){var r=this.interiorRings[e].getGeom();null!==r&&t.push(r)}return t}}]),t}(),Zu=function(){function t(e){xu(this,t),this.rings=e,this.polys=this._composePolys(e)}return Ou(t,[{key:"getGeom",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var r=this.polys[e].getGeom();null!==r&&t.push(r)}return t}},{key:"_composePolys",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(!i.poly)if(i.isExteriorRing())e.push(new Yu(i));else{var o=i.enclosingRing();o.poly||e.push(new Yu(o)),o.poly.addInterior(i)}}return e}}]),t}(),Ku=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vu.compare;xu(this,t),this.queue=e,this.tree=new bu(n),this.segments=[]}return Ou(t,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,a=void 0,s=void 0;void 0===a;)null===(i=this.tree.prev(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);for(;void 0===s;)null===(o=this.tree.next(o))?s=null:void 0===o.key.consumedBy&&(s=o.key);if(t.isLeft){var u=null;if(a){var l=a.getIntersection(e);if(null!==l&&(e.isAnEndpoint(l)||(u=l),!a.isAnEndpoint(l)))for(var c=this._splitSafely(a,l),f=0,h=c.length;f<h;f++)n.push(c[f])}var p=null;if(s){var d=s.getIntersection(e);if(null!==d&&(e.isAnEndpoint(d)||(p=d),!s.isAnEndpoint(d)))for(var m=this._splitSafely(s,d),g=0,y=m.length;g<y;g++)n.push(m[g])}if(null!==u||null!==p){var v=null;v=null===u?p:null===p||Uu.comparePoints(u,p)<=0?u:p,this.queue.remove(e.rightSE),n.push(e.rightSE);for(var b=e.split(v),_=0,A=b.length;_<A;_++)n.push(b[_])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&s){var w=a.getIntersection(s);if(null!==w){if(!a.isAnEndpoint(w))for(var x=this._splitSafely(a,w),E=0,O=x.length;E<O;E++)n.push(x[E]);if(!s.isAnEndpoint(w))for(var S=this._splitSafely(s,w),P=0,C=S.length;P<C;P++)n.push(S[P])}}this.tree.remove(e)}return n}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.insert(t),r}}]),t}(),$u="undefined"!=typeof t&&t.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Ju="undefined"!=typeof t&&t.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Qu=new(function(){function t(){xu(this,t)}return Ou(t,[{key:"run",value:function(t,e,n){Qu.type=t,ju.reset();for(var r=[new Wu(e,!0)],i=0,o=n.length;i<o;i++)r.push(new Wu(n[i],!1));if(Qu.numMultiPolys=r.length,"difference"===Qu.type)for(var a=r[0],s=1;s<r.length;)null!==Pu(r[s].bbox,a.bbox)?s++:r.splice(s,1);if("intersection"===Qu.type)for(var u=0,l=r.length;u<l;u++)for(var c=r[u],f=u+1,h=r.length;f<h;f++)if(null===Pu(c.bbox,r[f].bbox))return[];for(var p=new bu(Uu.compare),d=0,m=r.length;d<m;d++)for(var g=r[d].getSweepEvents(),y=0,v=g.length;y<v;y++)if(p.insert(g[y]),p.size>$u)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var b=new Ku(p),_=p.size,A=p.pop();A;){var w=A.key;if(p.size===_){var x=w.segment;throw new Error("Unable to pop() ".concat(w.isLeft?"left":"right"," SweepEvent ")+"[".concat(w.point.x,", ").concat(w.point.y,"] from segment #").concat(x.id," ")+"[".concat(x.leftSE.point.x,", ").concat(x.leftSE.point.y,"] -> ")+"[".concat(x.rightSE.point.x,", ").concat(x.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(p.size>$u)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(b.segments.length>Ju)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var E=b.process(w),O=0,S=E.length;O<S;O++){var P=E[O];void 0===P.consumedBy&&p.insert(P)}_=p.size,A=p.pop()}ju.reset();var C=Xu.factory(b.segments);return new Zu(C).getGeom()}}]),t}()),tl={union:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Qu.run("union",t,n)},intersection:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Qu.run("intersection",t,n)},xor:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Qu.run("xor",t,n)},difference:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Qu.run("difference",t,n)}};"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(null==this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);r<i;)e[r]=t,++r;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var el=function(){};el.prototype.interfaces_=function(){return[]},el.prototype.getClass=function(){return el},el.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var nl=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),rl=function(){},il={MAX_VALUE:{configurable:!0}};rl.isNaN=function(t){return Number.isNaN(t)},rl.doubleToLongBits=function(t){return t},rl.longBitsToDouble=function(t){return t},rl.isInfinite=function(t){return!Number.isFinite(t)},il.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(rl,il);var ol=function(){},al=function(){},sl=function(){};function ul(){}var ll=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},cl={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};ll.prototype.setOrdinate=function(t,e){switch(t){case ll.X:this.x=e;break;case ll.Y:this.y=e;break;case ll.Z:this.z=e;break;default:throw new nl("Invalid ordinate index: "+t)}},ll.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!el.equalsWithTolerance(this.x,e.x,n)&&!!el.equalsWithTolerance(this.y,e.y,n)}},ll.prototype.getOrdinate=function(t){switch(t){case ll.X:return this.x;case ll.Y:return this.y;case ll.Z:return this.z}throw new nl("Invalid ordinate index: "+t)},ll.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||rl.isNaN(this.z))&&rl.isNaN(t.z)},ll.prototype.equals=function(t){return t instanceof ll&&this.equals2D(t)},ll.prototype.equalInZ=function(t,e){return el.equalsWithTolerance(this.z,t.z,e)},ll.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},ll.prototype.clone=function(){},ll.prototype.copy=function(){return new ll(this)},ll.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},ll.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},ll.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},ll.prototype.hashCode=function(){var t=17;return 37*(t=37*t+ll.hashCode(this.x))+ll.hashCode(this.y)},ll.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},ll.prototype.interfaces_=function(){return[ol,al,ul]},ll.prototype.getClass=function(){return ll},ll.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=rl.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},cl.DimensionalComparator.get=function(){return fl},cl.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},cl.NULL_ORDINATE.get=function(){return rl.NaN},cl.X.get=function(){return 0},cl.Y.get=function(){return 1},cl.Z.get=function(){return 2},Object.defineProperties(ll,cl);var fl=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new nl("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};fl.prototype.compare=function(t,e){var n=t,r=e,i=fl.compare(n.x,r.x);if(0!==i)return i;var o=fl.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:fl.compare(n.z,r.z)},fl.prototype.interfaces_=function(){return[sl]},fl.prototype.getClass=function(){return fl},fl.compare=function(t,e){return t<e?-1:t>e?1:rl.isNaN(t)?rl.isNaN(e)?0:-1:rl.isNaN(e)?1:0};var hl=function(){};hl.prototype.create=function(){},hl.prototype.interfaces_=function(){return[]},hl.prototype.getClass=function(){return hl};var pl=function(){},dl={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};pl.prototype.interfaces_=function(){return[]},pl.prototype.getClass=function(){return pl},pl.toLocationSymbol=function(t){switch(t){case pl.EXTERIOR:return"e";case pl.BOUNDARY:return"b";case pl.INTERIOR:return"i";case pl.NONE:return"-"}throw new nl("Unknown location value: "+t)},dl.INTERIOR.get=function(){return 0},dl.BOUNDARY.get=function(){return 1},dl.EXTERIOR.get=function(){return 2},dl.NONE.get=function(){return-1},Object.defineProperties(pl,dl);var ml=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},gl=function(){},yl={LOG_10:{configurable:!0}};gl.prototype.interfaces_=function(){return[]},gl.prototype.getClass=function(){return gl},gl.log10=function(t){var e=Math.log(t);return rl.isInfinite(e)||rl.isNaN(e)?e:e/gl.LOG_10},gl.min=function(t,e,n,r){var i=t;return e<i&&(i=e),n<i&&(i=n),r<i&&(i=r),i},gl.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return r<i?i:r>o?o:r}},gl.wrap=function(t,e){return t<0?e- -t%e:t%e},gl.max=function(){if(3===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[0];return t>n&&(n=t),e>n&&(n=e),n}if(4===arguments.length){var r=arguments[1],i=arguments[2],o=arguments[3],a=arguments[0];return r>a&&(a=r),i>a&&(a=i),o>a&&(a=o),a}},gl.average=function(t,e){return(t+e)/2},yl.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(gl,yl);var vl=function(t){this.str=t};vl.prototype.append=function(t){this.str+=t},vl.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},vl.prototype.toString=function(t){return this.str};var bl=function(t){this.value=t};bl.prototype.intValue=function(){return this.value},bl.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},bl.isNaN=function(t){return Number.isNaN(t)};var _l=function(){};_l.isWhitespace=function(t){return t<=32&&t>=0||127===t},_l.toUpperCase=function(t){return t.toUpperCase()};var Al=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length)if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else"string"==typeof arguments[0]&&t.call(this,t.parse(arguments[0]));else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r,i)}},wl={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};Al.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},Al.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),r=Al.magnitude(n._hi),i=Al.TEN.pow(r);(n=n.divide(i)).gt(Al.TEN)?(n=n.divide(Al.TEN),r+=1):n.lt(Al.ONE)&&(n=n.multiply(Al.TEN),r-=1);for(var o=r+1,a=new vl,s=Al.MAX_PRINT_DIGITS-1,u=0;u<=s;u++){t&&u===o&&a.append(".");var l=Math.trunc(n._hi);if(l<0)break;var c=!1,f=0;l>9?(c=!0,f="9"):f="0"+l,a.append(f),n=n.subtract(Al.valueOf(l)).multiply(Al.TEN),c&&n.selfAdd(Al.TEN);var h=!0,p=Al.magnitude(n._hi);if(p<0&&Math.abs(p)>=s-u&&(h=!1),!h)break}return e[0]=r,a.toString()},Al.prototype.sqr=function(){return this.multiply(this)},Al.prototype.doubleValue=function(){return this._hi+this._lo},Al.prototype.subtract=function(){if(arguments[0]instanceof Al){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},Al.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},Al.prototype.isZero=function(){return 0===this._hi&&0===this._lo},Al.prototype.selfSubtract=function(){if(arguments[0]instanceof Al){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},Al.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},Al.prototype.min=function(t){return this.le(t)?this:t},Al.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof Al){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null,c=null,f=null;return u=this._hi/n,f=(i=(l=Al.SPLIT*u)-(i=l-u))*(a=(f=Al.SPLIT*n)-(a=f-n))-(c=u*n)+i*(s=n-a)+(o=u-i)*a+o*s,f=u+(l=(this._hi-c-f+this._lo-u*r)/n),this._hi=f,this._lo=u-f+l,this}},Al.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},Al.prototype.divide=function(){if(arguments[0]instanceof Al){var t=arguments[0],e=null,n=null,r=null,i=null,o=null,a=null,s=null,u=null;n=(o=this._hi/t._hi)-(e=(a=Al.SPLIT*o)-(e=a-o)),u=e*(r=(u=Al.SPLIT*t._hi)-(r=u-t._hi))-(s=o*t._hi)+e*(i=t._hi-r)+n*r+n*i;var l=u=o+(a=(this._hi-s-u+this._lo-o*t._lo)/t._hi);return new Al(l,o-u+a)}if("number"==typeof arguments[0]){var c=arguments[0];return rl.isNaN(c)?Al.createNaN():Al.copy(this).selfDivide(c,0)}},Al.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},Al.prototype.pow=function(t){if(0===t)return Al.valueOf(1);var e=new Al(this),n=Al.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},Al.prototype.ceil=function(){if(this.isNaN())return Al.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new Al(t,e)},Al.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},Al.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},Al.prototype.setValue=function(){if(arguments[0]instanceof Al){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},Al.prototype.max=function(t){return this.ge(t)?this:t},Al.prototype.sqrt=function(){if(this.isZero())return Al.valueOf(0);if(this.isNegative())return Al.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=Al.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},Al.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof Al){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,r=null,i=null,o=null,a=null,s=null;return o=(i=this._hi+e)-(a=i-this._hi),r=(s=(o=e-a+(this._hi-o))+this._lo)+(i-(n=i+s)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,f=null,h=null,p=null,d=null,m=null,g=null;p=this._hi+u,f=this._lo+l,d=p-(m=p-this._hi),h=f-(g=f-this._lo);var y=(c=p+(m=(d=u-m+(this._hi-d))+f))+(m=(h=l-g+(this._lo-h))+(m+(p-c))),v=m+(c-y);return this._hi=y,this._lo=v,this}},Al.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof Al){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null;i=(u=Al.SPLIT*this._hi)-this._hi,l=Al.SPLIT*n,i=u-i,o=this._hi-i,a=l-n;var c=(u=this._hi*n)+(l=i*(a=l-a)-u+i*(s=n-a)+o*a+o*s+(this._hi*r+this._lo*n)),f=l+(i=u-c);return this._hi=c,this._lo=f,this}},Al.prototype.selfSqr=function(){return this.selfMultiply(this)},Al.prototype.floor=function(){if(this.isNaN())return Al.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new Al(t,e)},Al.prototype.negate=function(){return this.isNaN()?this:new Al(-this._hi,-this._lo)},Al.prototype.clone=function(){},Al.prototype.multiply=function(){if(arguments[0]instanceof Al){var t=arguments[0];return t.isNaN()?Al.createNaN():Al.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return rl.isNaN(e)?Al.createNaN():Al.copy(this).selfMultiply(e,0)}},Al.prototype.isNaN=function(){return rl.isNaN(this._hi)},Al.prototype.intValue=function(){return Math.trunc(this._hi)},Al.prototype.toString=function(){var t=Al.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},Al.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+Al.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+Al.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},Al.prototype.reciprocal=function(){var t,e,n,r,i=null,o=null,a=null,s=null;t=(n=1/this._hi)-(i=(a=Al.SPLIT*n)-(i=a-n)),o=(s=Al.SPLIT*this._hi)-this._hi;var u=n+(a=(1-(r=n*this._hi)-(s=i*(o=s-o)-r+i*(e=this._hi-o)+t*o+t*e)-n*this._lo)/this._hi);return new Al(u,n-u+a)},Al.prototype.toSciNotation=function(){if(this.isZero())return Al.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=Al.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},Al.prototype.abs=function(){return this.isNaN()?Al.NaN:this.isNegative()?this.negate():new Al(this)},Al.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},Al.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},Al.prototype.add=function(){if(arguments[0]instanceof Al){var t=arguments[0];return Al.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return Al.copy(this).selfAdd(e)}},Al.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof Al){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._hi=n,this._lo=r}},Al.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},Al.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},Al.prototype.trunc=function(){return this.isNaN()?Al.NaN:this.isPositive()?this.floor():this.ceil()},Al.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},Al.prototype.interfaces_=function(){return[ul,ol,al]},Al.prototype.getClass=function(){return Al},Al.sqr=function(t){return Al.valueOf(t).selfMultiply(t)},Al.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return Al.parse(t)}if("number"==typeof arguments[0])return new Al(arguments[0])},Al.sqrt=function(t){return Al.valueOf(t).sqrt()},Al.parse=function(t){for(var e=0,n=t.length;_l.isWhitespace(t.charAt(e));)e++;var r=!1;if(e<n){var i=t.charAt(e);"-"!==i&&"+"!==i||(e++,"-"===i&&(r=!0))}for(var o=new Al,a=0,s=0,u=0;!(e>=n);){var l=t.charAt(e);if(e++,_l.isDigit(l)){var c=l-"0";o.selfMultiply(Al.TEN),o.selfAdd(c),a++}else{if("."!==l){if("e"===l||"E"===l){var f=t.substring(e);try{u=bl.parseInt(f)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+f+" in string "+t):e}break}throw new Error("Unexpected character '"+l+"' at position "+e+" in string "+t)}s=a}}var h=o,p=a-s-u;if(0===p)h=o;else if(p>0){var d=Al.TEN.pow(p);h=o.divide(d)}else if(p<0){var m=Al.TEN.pow(-p);h=o.multiply(m)}return r?h.negate():h},Al.createNaN=function(){return new Al(rl.NaN,rl.NaN)},Al.copy=function(t){return new Al(t)},Al.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r},Al.stringOfChar=function(t,e){for(var n=new vl,r=0;r<e;r++)n.append(t);return n.toString()},wl.PI.get=function(){return new Al(3.141592653589793,12246467991473532e-32)},wl.TWO_PI.get=function(){return new Al(6.283185307179586,24492935982947064e-32)},wl.PI_2.get=function(){return new Al(1.5707963267948966,6123233995736766e-32)},wl.E.get=function(){return new Al(2.718281828459045,14456468917292502e-32)},wl.NaN.get=function(){return new Al(rl.NaN,rl.NaN)},wl.EPS.get=function(){return 123259516440783e-46},wl.SPLIT.get=function(){return 134217729},wl.MAX_PRINT_DIGITS.get=function(){return 32},wl.TEN.get=function(){return Al.valueOf(10)},wl.ONE.get=function(){return Al.valueOf(1)},wl.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},wl.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(Al,wl);var xl=function(){},El={DP_SAFE_EPSILON:{configurable:!0}};xl.prototype.interfaces_=function(){return[]},xl.prototype.getClass=function(){return xl},xl.orientationIndex=function(t,e,n){var r=xl.orientationIndexFilter(t,e,n);if(r<=1)return r;var i=Al.valueOf(e.x).selfAdd(-t.x),o=Al.valueOf(e.y).selfAdd(-t.y),a=Al.valueOf(n.x).selfAdd(-e.x),s=Al.valueOf(n.y).selfAdd(-e.y);return i.selfMultiply(s).selfSubtract(o.selfMultiply(a)).signum()},xl.signOfDet2x2=function(t,e,n,r){return t.multiply(r).selfSubtract(e.multiply(n)).signum()},xl.intersection=function(t,e,n,r){var i=Al.valueOf(r.y).selfSubtract(n.y).selfMultiply(Al.valueOf(e.x).selfSubtract(t.x)),o=Al.valueOf(r.x).selfSubtract(n.x).selfMultiply(Al.valueOf(e.y).selfSubtract(t.y)),a=i.subtract(o),s=Al.valueOf(r.x).selfSubtract(n.x).selfMultiply(Al.valueOf(t.y).selfSubtract(n.y)),u=Al.valueOf(r.y).selfSubtract(n.y).selfMultiply(Al.valueOf(t.x).selfSubtract(n.x)),l=s.subtract(u).selfDivide(a).doubleValue(),c=Al.valueOf(t.x).selfAdd(Al.valueOf(e.x).selfSubtract(t.x).selfMultiply(l)).doubleValue(),f=Al.valueOf(e.x).selfSubtract(t.x).selfMultiply(Al.valueOf(t.y).selfSubtract(n.y)),h=Al.valueOf(e.y).selfSubtract(t.y).selfMultiply(Al.valueOf(t.x).selfSubtract(n.x)),p=f.subtract(h).selfDivide(a).doubleValue(),d=Al.valueOf(n.y).selfAdd(Al.valueOf(r.y).selfSubtract(n.y).selfMultiply(p)).doubleValue();return new ll(c,d)},xl.orientationIndexFilter=function(t,e,n){var r=null,i=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),a=i-o;if(i>0){if(o<=0)return xl.signum(a);r=i+o}else{if(!(i<0))return xl.signum(a);if(o>=0)return xl.signum(a);r=-i-o}var s=xl.DP_SAFE_EPSILON*r;return a>=s||-a>=s?xl.signum(a):2},xl.signum=function(t){return t>0?1:t<0?-1:0},El.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(xl,El);var Ol=function(){},Sl={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Sl.X.get=function(){return 0},Sl.Y.get=function(){return 1},Sl.Z.get=function(){return 2},Sl.M.get=function(){return 3},Ol.prototype.setOrdinate=function(t,e,n){},Ol.prototype.size=function(){},Ol.prototype.getOrdinate=function(t,e){},Ol.prototype.getCoordinate=function(){},Ol.prototype.getCoordinateCopy=function(t){},Ol.prototype.getDimension=function(){},Ol.prototype.getX=function(t){},Ol.prototype.clone=function(){},Ol.prototype.expandEnvelope=function(t){},Ol.prototype.copy=function(){},Ol.prototype.getY=function(t){},Ol.prototype.toCoordinateArray=function(){},Ol.prototype.interfaces_=function(){return[al]},Ol.prototype.getClass=function(){return Ol},Object.defineProperties(Ol,Sl);var Pl=function(){},Cl=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Pl),Tl=function(){};Tl.arraycopy=function(t,e,n,r,i){for(var o=0,a=e;a<e+i;a++)n[r+o]=t[a],o++},Tl.getProperty=function(t){return{"line.separator":"\n"}[t]};var kl=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof ll&&arguments[1]instanceof ll){var a=arguments[0],s=arguments[1];this.x=a.y-s.y,this.y=s.x-a.x,this.w=a.x*s.y-s.x*a.y}}else if(3===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(4===arguments.length){var f=arguments[0],h=arguments[1],p=arguments[2],d=arguments[3],m=f.y-h.y,g=h.x-f.x,y=f.x*h.y-h.x*f.y,v=p.y-d.y,b=d.x-p.x,_=p.x*d.y-d.x*p.y;this.x=g*_-b*y,this.y=v*y-m*_,this.w=m*b-v*g}};kl.prototype.getY=function(){var t=this.y/this.w;if(rl.isNaN(t)||rl.isInfinite(t))throw new Cl;return t},kl.prototype.getX=function(){var t=this.x/this.w;if(rl.isNaN(t)||rl.isInfinite(t))throw new Cl;return t},kl.prototype.getCoordinate=function(){var t=new ll;return t.x=this.getX(),t.y=this.getY(),t},kl.prototype.interfaces_=function(){return[]},kl.prototype.getClass=function(){return kl},kl.intersection=function(t,e,n,r){var i=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,s=n.y-r.y,u=r.x-n.x,l=n.x*r.y-r.x*n.y,c=i*u-s*o,f=(o*l-u*a)/c,h=(s*a-i*l)/c;if(rl.isNaN(f)||rl.isInfinite(f)||rl.isNaN(h)||rl.isInfinite(h))throw new Cl;return new ll(f,h)};var Il=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof ll){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=arguments[3];this.init(o,a,s,u)}},Ll={serialVersionUID:{configurable:!0}};Il.prototype.getArea=function(){return this.getWidth()*this.getHeight()},Il.prototype.equals=function(t){if(!(t instanceof Il))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},Il.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new Il;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx<t._maxx?this._maxx:t._maxx,i=this._maxy<t._maxy?this._maxy:t._maxy;return new Il(e,r,n,i)},Il.prototype.isNull=function(){return this._maxx<this._minx},Il.prototype.getMaxX=function(){return this._maxx},Il.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof ll){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof Il){var e=arguments[0];return!this.isNull()&&!e.isNull()&&e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},Il.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Il){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof ll){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||r>this._maxy||r<this._miny)}},Il.prototype.getMinY=function(){return this._miny},Il.prototype.getMinX=function(){return this._minx},Il.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof ll){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof Il){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),r<this._miny&&(this._miny=r),r>this._maxy&&(this._maxy=r))}},Il.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},Il.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},Il.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},Il.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},Il.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Il.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Il.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Il.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},Il.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Il.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Il){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof ll){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},Il.prototype.centre=function(){return this.isNull()?null:new ll((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Il.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof ll){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Il){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];i<o?(this._minx=i,this._maxx=o):(this._minx=o,this._maxx=i),a<s?(this._miny=a,this._maxy=s):(this._miny=s,this._maxy=a)}},Il.prototype.getMaxY=function(){return this._maxy},Il.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},Il.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+ll.hashCode(this._minx))+ll.hashCode(this._maxx))+ll.hashCode(this._miny))+ll.hashCode(this._maxy)},Il.prototype.interfaces_=function(){return[ol,ul]},Il.prototype.getClass=function(){return Il},Il.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),u=Math.max(o.x,a.x),l=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(l>u)&&!(c<s)&&(s=Math.min(o.y,a.y),u=Math.max(o.y,a.y),l=Math.min(r.y,i.y),c=Math.max(r.y,i.y),!(l>u)&&!(c<s))}},Ll.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(Il,Ll);var jl={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},Ml=function(t){this.geometryFactory=t||new _f};Ml.prototype.read=function(t){var e,n,r;t=t.replace(/[\n\r]/g," ");var i=jl.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((i=jl.emptyTypeStr.exec(t))[2]=void 0),i&&(n=i[1].toLowerCase(),r=i[2],Nl[n]&&(e=Nl[n].apply(this,[r]))),void 0===e)throw new Error("Could not parse WKT "+t);return e},Ml.prototype.write=function(t){return this.extractGeometry(t)},Ml.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Rl[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+Rl[e].apply(this,[t])+")"};var Rl={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Rl.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+Rl.point.apply(this,[t._geometries[n]])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(Rl.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},linearring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(Rl.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+Rl.linestring.apply(this,[t._geometries[n]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+Rl.linestring.apply(this,[t._shell])+")");for(var n=0,r=t._holes.length;n<r;++n)e.push("("+Rl.linestring.apply(this,[t._holes[n]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+Rl.polygon.apply(this,[t._geometries[n]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}},Nl={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(jl.spaces);return this.geometryFactory.createPoint(new ll(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e;if(void 0===t)return this.geometryFactory.createMultiPoint();for(var n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(jl.trimParens,"$1"),r.push(Nl.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(r)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(jl.spaces),r.push(new ll(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(jl.spaces),r.push(new ll(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){var e;if(void 0===t)return this.geometryFactory.createMultiLineString();for(var n=t.trim().split(jl.parenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(jl.trimParens,"$1"),r.push(Nl.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(r)},polygon:function(t){var e,n,r;if(void 0===t)return this.geometryFactory.createPolygon();for(var i,o=t.trim().split(jl.parenComma),a=[],s=0,u=o.length;s<u;++s)e=o[s].replace(jl.trimParens,"$1"),n=Nl.linestring.apply(this,[e]),r=this.geometryFactory.createLinearRing(n._points),0===s?i=r:a.push(r);return this.geometryFactory.createPolygon(i,a)},multipolygon:function(t){var e;if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var n=t.trim().split(jl.doubleParenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(jl.trimParens,"$1"),r.push(Nl.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(r)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],r=0,i=e.length;r<i;++r)n.push(this.read(e[r]));return this.geometryFactory.createGeometryCollection(n)}},Dl=function(t){this.parser=new Ml(t)};Dl.prototype.write=function(t){return this.parser.write(t)},Dl.toLineString=function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Fl=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Bl=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fl),zl=function(){};zl.prototype.interfaces_=function(){return[]},zl.prototype.getClass=function(){return zl},zl.shouldNeverReachHere=function(){if(0===arguments.length)zl.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new Bl("Should never reach here"+(null!==t?": "+t:""))}},zl.isTrue=function(){var t;if(1===arguments.length)zl.isTrue(arguments[0],null);else if(2===arguments.length&&(t=arguments[1],!arguments[0]))throw null===t?new Bl:new Bl(t)},zl.equals=function(){var t,e,n;if(2===arguments.length)zl.equals(t=arguments[0],e=arguments[1],null);else if(3===arguments.length&&(t=arguments[0],n=arguments[2],!(e=arguments[1]).equals(t)))throw new Bl("Expected "+t+" but encountered "+e+(null!==n?": "+n:""))};var Ul=function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new ll,this._intPt[1]=new ll,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Gl={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Ul.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},Ul.prototype.getTopologySummary=function(){var t=new vl;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},Ul.prototype.computeIntersection=function(t,e,n,r){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=r,this._result=this.computeIntersect(t,e,n,r)},Ul.prototype.getIntersectionNum=function(){return this._result},Ul.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},Ul.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Ul.prototype.setPrecisionModel=function(t){this._precisionModel=t},Ul.prototype.isInteriorIntersection=function(){var t=this;if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var e=arguments[0],n=0;n<this._result;n++)if(!t._intPt[n].equals2D(t._inputLines[e][0])&&!t._intPt[n].equals2D(t._inputLines[e][1]))return!0;return!1}},Ul.prototype.getIntersection=function(t){return this._intPt[t]},Ul.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},Ul.prototype.hasIntersection=function(){return this._result!==Ul.NO_INTERSECTION},Ul.prototype.getEdgeDistance=function(t,e){return Ul.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},Ul.prototype.isCollinear=function(){return this._result===Ul.COLLINEAR_INTERSECTION},Ul.prototype.toString=function(){return Dl.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Dl.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},Ul.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},Ul.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},Ul.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},Ul.prototype.interfaces_=function(){return[]},Ul.prototype.getClass=function(){return Ul},Ul.computeEdgeDistance=function(t,e,n){var r=Math.abs(n.x-e.x),i=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=r>i?r:i;else{var a=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);0!==(o=r>i?a:s)||t.equals(e)||(o=Math.max(a,s))}return zl.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},Ul.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return zl.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},Gl.DONT_INTERSECT.get=function(){return 0},Gl.DO_INTERSECT.get=function(){return 1},Gl.COLLINEAR.get=function(){return 2},Gl.NO_INTERSECTION.get=function(){return 0},Gl.POINT_INTERSECTION.get=function(){return 1},Gl.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Ul,Gl);var Vl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new Il(this._inputLines[0][0],this._inputLines[0][1]),n=new Il(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,Il.intersects(n,r,e)&&0===Wl.orientationIndex(n,r,e)&&0===Wl.orientationIndex(r,n,e))return this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,n,r,i){var o=null;try{o=kl.intersection(t,n,r,i)}catch(s){if(!(s instanceof Cl))throw s;o=e.nearestEndpoint(t,n,r,i)}return o},e.prototype.intersection=function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new ll(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)<o&&(i=e,o=Math.abs(e)),Math.abs(n)<o&&(i=n,o=Math.abs(n)),Math.abs(r)<o&&(i=r),i},e.prototype.checkDD=function(t,e,n,r,i){var o=xl.intersection(t,e,n,r),a=this.isInSegmentEnvelopes(o);Tl.out.println("DD in env = "+a+"  --------------------- "+o),i.distance(o)>1e-4&&Tl.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,r){var i=new ll(t),o=new ll(e),a=new ll(n),s=new ll(r),u=new ll;this.normalizeToEnvCentre(i,o,a,s,u);var l=this.safeHCoordinateIntersection(i,o,a,s);return l.x+=u.x,l.y+=u.y,l},e.prototype.computeCollinearIntersection=function(e,n,r,i){var o=Il.intersects(e,n,r),a=Il.intersects(e,n,i),s=Il.intersects(r,i,e),u=Il.intersects(r,i,n);return o&&a?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||a||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||a||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,r,i){var o=t.x<e.x?t.x:e.x,a=t.y<e.y?t.y:e.y,s=t.x>e.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.x<r.x?n.x:r.x,c=n.y<r.y?n.y:r.y,f=n.x>r.x?n.x:r.x,h=n.y>r.y?n.y:r.y,p=((o>l?o:l)+(s<f?s:f))/2,d=((a>c?a:c)+(u<h?u:h))/2;i.x=p,i.y=d,t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.computeIntersect=function(e,n,r,i){if(this._isProper=!1,!Il.intersects(e,n,r,i))return t.NO_INTERSECTION;var o=Wl.orientationIndex(e,n,r),a=Wl.orientationIndex(e,n,i);if(o>0&&a>0||o<0&&a<0)return t.NO_INTERSECTION;var s=Wl.orientationIndex(r,i,e),u=Wl.orientationIndex(r,i,n);return s>0&&u>0||s<0&&u<0?t.NO_INTERSECTION:0===o&&0===a&&0===s&&0===u?this.computeCollinearIntersection(e,n,r,i):(0===o||0===a||0===s||0===u?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new ll(r):0===a?this._intPt[0]=new ll(i):0===s?this._intPt[0]=new ll(e):0===u&&(this._intPt[0]=new ll(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,r){var i=t,o=Wl.distancePointLine(t,n,r),a=Wl.distancePointLine(e,n,r);return a<o&&(o=a,i=e),(a=Wl.distancePointLine(n,t,e))<o&&(o=a,i=n),(a=Wl.distancePointLine(r,t,e))<o&&(o=a,i=r),i},e}(Ul),ql=function(){};ql.prototype.interfaces_=function(){return[]},ql.prototype.getClass=function(){return ql},ql.orientationIndex=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=n.x-e.x,a=n.y-e.y;return ql.signOfDet2x2(r,i,o,a)},ql.signOfDet2x2=function(t,e,n,r){var i=null,o=null,a=null;if(i=1,0===t||0===r)return 0===e||0===n?0:e>0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if((r-=(a=Math.floor(n/t))*e)<0)return-i;if(r>e)return i;if(t>(n-=a*t)+n){if(e<r+r)return i}else{if(e>r+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if((e-=(a=Math.floor(t/n))*r)<0)return i;if(e>r)return-i;if(n>(t-=a*n)+t){if(r<e+e)return-i}else{if(r>e+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};var Hl=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Hl.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,r=e.x;return n>r&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,s=e.y-this._p.y,u=ql.signOfDet2x2(i,o,a,s);if(0===u)return this._isPointOnSegment=!0,null;s<o&&(u=-u),u>0&&this._crossingCount++}},Hl.prototype.isPointInPolygon=function(){return this.getLocation()!==pl.EXTERIOR},Hl.prototype.getLocation=function(){return this._isPointOnSegment?pl.BOUNDARY:this._crossingCount%2==1?pl.INTERIOR:pl.EXTERIOR},Hl.prototype.isOnSegment=function(){return this._isPointOnSegment},Hl.prototype.interfaces_=function(){return[]},Hl.prototype.getClass=function(){return Hl},Hl.locatePointInRing=function(){if(arguments[0]instanceof ll&&ml(arguments[1],Ol)){for(var t=arguments[1],e=new Hl(arguments[0]),n=new ll,r=new ll,i=1;i<t.size();i++)if(t.getCoordinate(i,n),t.getCoordinate(i-1,r),e.countSegment(n,r),e.isOnSegment())return e.getLocation();return e.getLocation()}if(arguments[0]instanceof ll&&arguments[1]instanceof Array){for(var o=arguments[1],a=new Hl(arguments[0]),s=1;s<o.length;s++){var u=o[s],l=o[s-1];if(a.countSegment(u,l),a.isOnSegment())return a.getLocation()}return a.getLocation()}};var Wl=function(){},Xl={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};Wl.prototype.interfaces_=function(){return[]},Wl.prototype.getClass=function(){return Wl},Wl.orientationIndex=function(t,e,n){return xl.orientationIndex(t,e,n)},Wl.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,r=1;r<t.length-1;r++){var i=t[r].x-n,o=t[r+1].y;e+=i*(t[r-1].y-o)}return e/2}if(ml(arguments[0],Ol)){var a=arguments[0],s=a.size();if(s<3)return 0;var u=new ll,l=new ll,c=new ll;a.getCoordinate(0,l),a.getCoordinate(1,c);var f=l.x;c.x-=f;for(var h=0,p=1;p<s-1;p++)u.y=l.y,l.x=c.x,l.y=c.y,a.getCoordinate(p+1,c),c.x-=f,h+=l.x*(u.y-c.y);return h/2}},Wl.distanceLineLine=function(t,e,n,r){if(t.equals(e))return Wl.distancePointLine(t,n,r);if(n.equals(r))return Wl.distancePointLine(r,t,e);var i=!1;if(Il.intersects(t,e,n,r)){var o=(e.x-t.x)*(r.y-n.y)-(e.y-t.y)*(r.x-n.x);if(0===o)i=!0;else{var a=(t.y-n.y)*(r.x-n.x)-(t.x-n.x)*(r.y-n.y),s=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,u=a/o;(u<0||u>1||s<0||s>1)&&(i=!0)}}else i=!0;return i?gl.min(Wl.distancePointLine(t,n,r),Wl.distancePointLine(e,n,r),Wl.distancePointLine(n,t,e),Wl.distancePointLine(r,t,e)):0},Wl.isPointInRing=function(t,e){return Wl.locatePointInRing(t,e)!==pl.EXTERIOR},Wl.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new ll;t.getCoordinate(0,r);for(var i=r.x,o=r.y,a=1;a<e;a++){t.getCoordinate(a,r);var s=r.x,u=r.y,l=s-i,c=u-o;n+=Math.sqrt(l*l+c*c),i=s,o=u}return n},Wl.isCCW=function(t){var e=t.length-1;if(e<3)throw new nl("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],r=0,i=1;i<=e;i++){var o=t[i];o.y>n.y&&(n=o,r=i)}var a=r;do{(a-=1)<0&&(a=e)}while(t[a].equals2D(n)&&a!==r);var s=r;do{s=(s+1)%e}while(t[s].equals2D(n)&&s!==r);var u=t[a],l=t[s];if(u.equals2D(n)||l.equals2D(n)||u.equals2D(l))return!1;var c=Wl.computeOrientation(u,n,l);return 0===c?u.x>l.x:c>0},Wl.locatePointInRing=function(t,e){return Hl.locatePointInRing(t,e)},Wl.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)},Wl.computeOrientation=function(t,e,n){return Wl.orientationIndex(t,e,n)},Wl.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new nl("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r<e.length-1;r++){var i=Wl.distancePointLine(t,e[r],e[r+1]);i<n&&(n=i)}return n}if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];if(a.x===s.x&&a.y===s.y)return o.distance(a);var u=(s.x-a.x)*(s.x-a.x)+(s.y-a.y)*(s.y-a.y),l=((o.x-a.x)*(s.x-a.x)+(o.y-a.y)*(s.y-a.y))/u;if(l<=0)return o.distance(a);if(l>=1)return o.distance(s);var c=((a.y-o.y)*(s.x-a.x)-(a.x-o.x)*(s.y-a.y))/u;return Math.abs(c)*Math.sqrt(u)}},Wl.isOnLine=function(t,e){for(var n=new Vl,r=1;r<e.length;r++){var i=e[r-1],o=e[r];if(n.computeIntersection(t,i,o),n.hasIntersection())return!0}return!1},Xl.CLOCKWISE.get=function(){return-1},Xl.RIGHT.get=function(){return Wl.CLOCKWISE},Xl.COUNTERCLOCKWISE.get=function(){return 1},Xl.LEFT.get=function(){return Wl.COUNTERCLOCKWISE},Xl.COLLINEAR.get=function(){return 0},Xl.STRAIGHT.get=function(){return Wl.COLLINEAR},Object.defineProperties(Wl,Xl);var Yl=function(){};Yl.prototype.filter=function(t){},Yl.prototype.interfaces_=function(){return[]},Yl.prototype.getClass=function(){return Yl};var Zl=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},Kl={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};Zl.prototype.isGeometryCollection=function(){return this.getSortIndex()===Zl.SORTINDEX_GEOMETRYCOLLECTION},Zl.prototype.getFactory=function(){return this._factory},Zl.prototype.getGeometryN=function(t){return this},Zl.prototype.getArea=function(){return 0},Zl.prototype.isRectangle=function(){return!1},Zl.prototype.equals=function(){if(arguments[0]instanceof Zl){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof Zl))return!1;var n=e;return this.equalsExact(n)}},Zl.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},Zl.prototype.geometryChanged=function(){this.apply(Zl.geometryChangedFilter)},Zl.prototype.geometryChangedAction=function(){this._envelope=null},Zl.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},Zl.prototype.getLength=function(){return 0},Zl.prototype.getNumGeometries=function(){return 1},Zl.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,r)}},Zl.prototype.getUserData=function(){return this._userData},Zl.prototype.getSRID=function(){return this._SRID},Zl.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},Zl.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===Zl.SORTINDEX_GEOMETRYCOLLECTION)throw new nl("This method does not support GeometryCollection arguments")},Zl.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},Zl.prototype.norm=function(){var t=this.copy();return t.normalize(),t},Zl.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},Zl.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new Il(this._envelope)},Zl.prototype.setSRID=function(t){this._SRID=t},Zl.prototype.setUserData=function(t){this._userData=t},Zl.prototype.compare=function(t,e){for(var n=t.iterator(),r=e.iterator();n.hasNext()&&r.hasNext();){var i=n.next(),o=r.next(),a=i.compareTo(o);if(0!==a)return a}return n.hasNext()?1:r.hasNext()?-1:0},Zl.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},Zl.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===Zl.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===Zl.SORTINDEX_MULTIPOINT||this.getSortIndex()===Zl.SORTINDEX_MULTILINESTRING||this.getSortIndex()===Zl.SORTINDEX_MULTIPOLYGON},Zl.prototype.interfaces_=function(){return[al,ol,ul]},Zl.prototype.getClass=function(){return Zl},Zl.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},Zl.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},Kl.serialVersionUID.get=function(){return 0x799ea46522854c00},Kl.SORTINDEX_POINT.get=function(){return 0},Kl.SORTINDEX_MULTIPOINT.get=function(){return 1},Kl.SORTINDEX_LINESTRING.get=function(){return 2},Kl.SORTINDEX_LINEARRING.get=function(){return 3},Kl.SORTINDEX_MULTILINESTRING.get=function(){return 4},Kl.SORTINDEX_POLYGON.get=function(){return 5},Kl.SORTINDEX_MULTIPOLYGON.get=function(){return 6},Kl.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},Kl.geometryChangedFilter.get=function(){return $l},Object.defineProperties(Zl,Kl);var $l=function(){};$l.interfaces_=function(){return[Yl]},$l.filter=function(t){t.geometryChangedAction()};var Jl=function(){};Jl.prototype.filter=function(t){},Jl.prototype.interfaces_=function(){return[]},Jl.prototype.getClass=function(){return Jl};var Ql=function(){},tc={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};Ql.prototype.isInBoundary=function(t){},Ql.prototype.interfaces_=function(){return[]},Ql.prototype.getClass=function(){return Ql},tc.Mod2BoundaryNodeRule.get=function(){return ec},tc.EndPointBoundaryNodeRule.get=function(){return nc},tc.MultiValentEndPointBoundaryNodeRule.get=function(){return rc},tc.MonoValentEndPointBoundaryNodeRule.get=function(){return ic},tc.MOD2_BOUNDARY_RULE.get=function(){return new ec},tc.ENDPOINT_BOUNDARY_RULE.get=function(){return new nc},tc.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new rc},tc.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ic},tc.OGC_SFS_BOUNDARY_RULE.get=function(){return Ql.MOD2_BOUNDARY_RULE},Object.defineProperties(Ql,tc);var ec=function(){};ec.prototype.isInBoundary=function(t){return t%2==1},ec.prototype.interfaces_=function(){return[Ql]},ec.prototype.getClass=function(){return ec};var nc=function(){};nc.prototype.isInBoundary=function(t){return t>0},nc.prototype.interfaces_=function(){return[Ql]},nc.prototype.getClass=function(){return nc};var rc=function(){};rc.prototype.isInBoundary=function(t){return t>1},rc.prototype.interfaces_=function(){return[Ql]},rc.prototype.getClass=function(){return rc};var ic=function(){};ic.prototype.isInBoundary=function(t){return 1===t},ic.prototype.interfaces_=function(){return[Ql]},ic.prototype.getClass=function(){return ic};var oc=function(){};function ac(t){this.message=t||""}oc.prototype.add=function(){},oc.prototype.addAll=function(){},oc.prototype.isEmpty=function(){},oc.prototype.iterator=function(){},oc.prototype.size=function(){},oc.prototype.toArray=function(){},oc.prototype.remove=function(){},ac.prototype=new Error,ac.prototype.name="IndexOutOfBoundsException";var sc=function(){};sc.prototype.hasNext=function(){},sc.prototype.next=function(){},sc.prototype.remove=function(){};var uc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(oc);function lc(t){this.message=t||""}lc.prototype=new Error,lc.prototype.name="NoSuchElementException";var cc=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof oc&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,oc]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new fc(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new ac;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,r=this.array_.length;n<r;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(uc),fc=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new lc;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(sc),hc=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.ensureCapacity(n.length),this.add(n,r)}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){var e=this;if(2===arguments.length){for(var n=arguments[1],r=!1,i=arguments[0].iterator();i.hasNext();)e.add(i.next(),n),r=!0;return r}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){var e=this;if(1===arguments.length){var n=arguments[0];t.prototype.add.call(this,n)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var r=arguments[0],i=arguments[1];return this.add(r,i,!0),!0}if(arguments[0]instanceof ll&&"boolean"==typeof arguments[1]){var o=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(o))return null;t.prototype.add.call(this,o)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var a=arguments[0],s=arguments[1];return this.add(a,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var u=arguments[0],l=arguments[1];if(arguments[2])for(var c=0;c<u.length;c++)e.add(u[c],l);else for(var f=u.length-1;f>=0;f--)e.add(u[f],l);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof ll){var h=arguments[0],p=arguments[1];if(!arguments[2]){var d=this.size();if(d>0){if(h>0&&this.get(h-1).equals2D(p))return null;if(h<d&&this.get(h).equals2D(p))return null}}t.prototype.add.call(this,h,p)}}else if(4===arguments.length){var m=arguments[0],g=arguments[1],y=arguments[2],v=arguments[3],b=1;y>v&&(b=-1);for(var _=y;_!==v;_+=b)e.add(m[_],g);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new ll(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(cc),pc=function(){},dc={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};dc.ForwardComparator.get=function(){return mc},dc.BidirectionalComparator.get=function(){return gc},dc.coordArrayType.get=function(){return new Array(0).fill(null)},pc.prototype.interfaces_=function(){return[]},pc.prototype.getClass=function(){return pc},pc.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},pc.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(pc.indexOf(r,e)<0)return r}return null},pc.scroll=function(t,e){var n=pc.indexOf(e,t);if(n<0)return null;var r=new Array(t.length).fill(null);Tl.arraycopy(t,n,r,0,t.length-n),Tl.arraycopy(t,0,r,t.length-n,n),Tl.arraycopy(r,0,t,0,t.length)},pc.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(r===i)return!0;if(null===r||null===i)return!1;if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(0!==o.compare(r[a],i[a]))return!1;return!0}},pc.intersection=function(t,e){for(var n=new hc,r=0;r<t.length;r++)e.intersects(t[r])&&n.add(t[r],!0);return n.toCoordinateArray()},pc.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},pc.removeRepeatedPoints=function(t){return pc.hasRepeatedPoints(t)?new hc(t,!1).toCoordinateArray():t},pc.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),r=0;r<=n;r++){var i=t[r];t[r]=t[e-r],t[e-r]=i}},pc.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var r=new Array(e).fill(null);if(0===e)return r;for(var i=0,o=0;o<t.length;o++)null!==t[o]&&(r[i++]=t[o]);return r},pc.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new ll(t[n]);return e}if(5===arguments.length)for(var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],u=0;u<s;u++)o[a+u]=new ll(r[i+u])},pc.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e[t.length-n-1];if(0!==r.compareTo(i))return!1}return!0},pc.envelope=function(t){for(var e=new Il,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},pc.toCoordinateArray=function(t){return t.toArray(pc.coordArrayType)},pc.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},pc.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},pc.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,r=t[e].compareTo(t[n]);if(0!==r)return r}return 1},pc.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var r=t[n].compareTo(e[n]);if(0!==r)return r;n++}return n<e.length?-1:n<t.length?1:0},pc.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},pc.extract=function(t,e,n){e=gl.clamp(e,0,t.length);var r=(n=gl.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),n<e&&(r=0);var i=new Array(r).fill(null);if(0===r)return i;for(var o=0,a=e;a<=n;a++)i[o++]=t[a];return i},Object.defineProperties(pc,dc);var mc=function(){};mc.prototype.compare=function(t,e){return pc.compare(t,e)},mc.prototype.interfaces_=function(){return[sl]},mc.prototype.getClass=function(){return mc};var gc=function(){};gc.prototype.compare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;var i=pc.compare(n,r);return pc.isEqualReversed(n,r)?0:i},gc.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;for(var i=pc.increasingDirection(n),o=pc.increasingDirection(r),a=i>0?0:n.length-1,s=o>0?0:n.length-1,u=0;u<n.length;u++){var l=n[a].compareTo(r[s]);if(0!==l)return l;a+=i,s+=o}return 0},gc.prototype.interfaces_=function(){return[sl]},gc.prototype.getClass=function(){return gc};var yc=function(){};yc.prototype.get=function(){},yc.prototype.put=function(){},yc.prototype.size=function(){},yc.prototype.values=function(){},yc.prototype.entrySet=function(){};var vc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(yc);function bc(t){this.message=t||""}function _c(){}bc.prototype=new Error,bc.prototype.name="OperationNotSupported",_c.prototype=new oc,_c.prototype.contains=function(){};var Ac=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof oc&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(this.array_[e]===t)return!0;return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new wc(this)},e}(_c),wc=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new lc;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new bc},e}(sc);function xc(t){return null===t?0:t.color}function Ec(t){return null===t?null:t.parent}function Oc(t,e){null!==t&&(t.color=e)}function Sc(t){return null===t?null:t.left}function Pc(t){return null===t?null:t.right}function Cc(){this.root_=null,this.size_=0}Cc.prototype=new vc,Cc.prototype.get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},Cc.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var a={key:t,left:null,right:null,value:e,parent:n,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},Cc.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(Ec(t)===Sc(Ec(Ec(t)))){var n=Pc(Ec(Ec(t)));1===xc(n)?(Oc(Ec(t),0),Oc(n,0),Oc(Ec(Ec(t)),1),t=Ec(Ec(t))):(t===Pc(Ec(t))&&(t=Ec(t),e.rotateLeft(t)),Oc(Ec(t),0),Oc(Ec(Ec(t)),1),e.rotateRight(Ec(Ec(t))))}else{var r=Sc(Ec(Ec(t)));1===xc(r)?(Oc(Ec(t),0),Oc(r,0),Oc(Ec(Ec(t)),1),t=Ec(Ec(t))):(t===Sc(Ec(t))&&(t=Ec(t),e.rotateRight(t)),Oc(Ec(t),0),Oc(Ec(Ec(t)),1),e.rotateLeft(Ec(Ec(t))))}this.root_.color=0},Cc.prototype.values=function(){var t=new cc,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=Cc.successor(e));)t.add(e.value);return t},Cc.prototype.entrySet=function(){var t=new Ac,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=Cc.successor(e));)t.add(e);return t},Cc.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},Cc.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},Cc.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},Cc.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,r=t;null!==n&&r===n.right;)r=n,n=n.parent;return n},Cc.prototype.size=function(){return this.size_};var Tc=function(){};function kc(){}function Ic(){this.array_=[],arguments[0]instanceof oc&&this.addAll(arguments[0])}Tc.prototype.interfaces_=function(){return[]},Tc.prototype.getClass=function(){return Tc},kc.prototype=new _c,Ic.prototype=new kc,Ic.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(0===this.array_[e].compareTo(t))return!0;return!1},Ic.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++)if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0;return this.array_.push(t),!0},Ic.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},Ic.prototype.remove=function(t){throw new bc},Ic.prototype.size=function(){return this.array_.length},Ic.prototype.isEmpty=function(){return 0===this.array_.length},Ic.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},Ic.prototype.iterator=function(){return new Lc(this)};var Lc=function(t){this.treeSet_=t,this.position_=0};Lc.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new lc;return this.treeSet_.array_[this.position_++]},Lc.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Lc.prototype.remove=function(){throw new bc};var jc=function(){};jc.sort=function(){var t,e,n,r,i=arguments[0];if(1===arguments.length)r=function(t,e){return t.compareTo(e)},i.sort(r);else if(2===arguments.length)n=arguments[1],r=function(t,e){return n.compare(t,e)},i.sort(r);else if(3===arguments.length){(e=i.slice(arguments[1],arguments[2])).sort();var o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length));for(i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])}else if(4===arguments.length)for(e=i.slice(arguments[1],arguments[2]),n=arguments[3],r=function(t,e){return n.compare(t,e)},e.sort(r),o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length)),i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])},jc.asList=function(t){for(var e=new cc,n=0,r=t.length;n<r;n++)e.add(t[n]);return e};var Mc=function(){},Rc={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Rc.P.get=function(){return 0},Rc.L.get=function(){return 1},Rc.A.get=function(){return 2},Rc.FALSE.get=function(){return-1},Rc.TRUE.get=function(){return-2},Rc.DONTCARE.get=function(){return-3},Rc.SYM_FALSE.get=function(){return"F"},Rc.SYM_TRUE.get=function(){return"T"},Rc.SYM_DONTCARE.get=function(){return"*"},Rc.SYM_P.get=function(){return"0"},Rc.SYM_L.get=function(){return"1"},Rc.SYM_A.get=function(){return"2"},Mc.prototype.interfaces_=function(){return[]},Mc.prototype.getClass=function(){return Mc},Mc.toDimensionSymbol=function(t){switch(t){case Mc.FALSE:return Mc.SYM_FALSE;case Mc.TRUE:return Mc.SYM_TRUE;case Mc.DONTCARE:return Mc.SYM_DONTCARE;case Mc.P:return Mc.SYM_P;case Mc.L:return Mc.SYM_L;case Mc.A:return Mc.SYM_A}throw new nl("Unknown dimension value: "+t)},Mc.toDimensionValue=function(t){switch(_l.toUpperCase(t)){case Mc.SYM_FALSE:return Mc.FALSE;case Mc.SYM_TRUE:return Mc.TRUE;case Mc.SYM_DONTCARE:return Mc.DONTCARE;case Mc.SYM_P:return Mc.P;case Mc.SYM_L:return Mc.L;case Mc.SYM_A:return Mc.A}throw new nl("Unknown dimension symbol: "+t)},Object.defineProperties(Mc,Rc);var Nc=function(){};Nc.prototype.filter=function(t){},Nc.prototype.interfaces_=function(){return[]},Nc.prototype.getClass=function(){return Nc};var Dc=function(){};Dc.prototype.filter=function(t,e){},Dc.prototype.isDone=function(){},Dc.prototype.isGeometryChanged=function(){},Dc.prototype.interfaces_=function(){return[]},Dc.prototype.getClass=function(){return Dc};var Fc=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new nl("geometries must not contain null elements")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new Il,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var r=this._geometries[n].getCoordinates(),i=0;i<r.length;i++)t[++e]=r[i];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){var e=this;if(2===arguments.length){var n=arguments[0],r=arguments[1];if(!this.isEquivalentClass(n))return!1;var i=n;if(this._geometries.length!==i._geometries.length)return!1;for(var o=0;o<this._geometries.length;o++)if(!e._geometries[o].equalsExact(i._geometries[o],r))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();jc.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=Mc.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=Mc.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){var t=this;if(1===arguments.length){var e=arguments[0],n=new Ic(jc.asList(this._geometries)),r=new Ic(jc.asList(e._geometries));return this.compare(n,r)}if(2===arguments.length){for(var i=arguments[1],o=arguments[0],a=this.getNumGeometries(),s=o.getNumGeometries(),u=0;u<a&&u<s;){var l=t.getGeometryN(u),c=o.getGeometryN(u),f=l.compareToSameClass(c,i);if(0!==f)return f;u++}return u<a?1:u<s?-1:0}},e.prototype.apply=function(){var t=this;if(ml(arguments[0],Jl))for(var e=arguments[0],n=0;n<this._geometries.length;n++)t._geometries[n].apply(e);else if(ml(arguments[0],Dc)){var r=arguments[0];if(0===this._geometries.length)return null;for(var i=0;i<this._geometries.length&&(t._geometries[i].apply(r),!r.isDone());i++);r.isGeometryChanged()&&this.geometryChanged()}else if(ml(arguments[0],Nc)){var o=arguments[0];o.filter(this);for(var a=0;a<this._geometries.length;a++)t._geometries[a].apply(o)}else if(ml(arguments[0],Yl)){var s=arguments[0];s.filter(this);for(var u=0;u<this._geometries.length;u++)t._geometries[u].apply(s)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),zl.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(Zl),Bc=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return Zl.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Mc.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new zc(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Tc]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(Fc),zc=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=Ql.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=r}};zc.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},zc.prototype.getBoundary=function(){return this._geom instanceof $c?this.boundaryLineString(this._geom):this._geom instanceof Bc?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},zc.prototype.boundaryLineString=function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},zc.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},zc.prototype.computeBoundaryCoordinates=function(t){var e=this,n=new cc;this._endpointMap=new Cc;for(var r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);0!==i.getNumPoints()&&(e.addEndpoint(i.getCoordinateN(0)),e.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),s=a.getValue().count;e._bnRule.isInBoundary(s)&&n.add(a.getKey())}return pc.toCoordinateArray(n)},zc.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new Uc,this._endpointMap.put(t,e)),e.count++},zc.prototype.interfaces_=function(){return[]},zc.prototype.getClass=function(){return zc},zc.getBoundary=function(){return 1===arguments.length?new zc(arguments[0]).getBoundary():2===arguments.length?new zc(arguments[0],arguments[1]).getBoundary():void 0};var Uc=function(){this.count=null};function Gc(){}function Vc(){}Uc.prototype.interfaces_=function(){return[]},Uc.prototype.getClass=function(){return Uc};var qc=function(){};function Hc(){}function Wc(){}function Xc(){}var Yc=function(){},Zc={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Yc.prototype.interfaces_=function(){return[]},Yc.prototype.getClass=function(){return Yc},Yc.chars=function(t,e){for(var n=new Array(e).fill(null),r=0;r<e;r++)n[r]=t;return String(n)},Yc.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new Hc,n=new Gc(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],o="",a=new Xc(new Vc(Yc.getStackTrace(r))),s=0;s<i;s++)try{o+=a.readLine()+Yc.NEWLINE}catch(t){if(!(t instanceof Wc))throw t;zl.shouldNeverReachHere()}return o}},Yc.split=function(t,e){for(var n=e.length,r=new cc,i=""+t,o=i.indexOf(e);o>=0;){var a=i.substring(0,o);r.add(a),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),u=0;u<s.length;u++)s[u]=r.get(u);return s},Yc.toString=function(){if(1===arguments.length){var t=arguments[0];return Yc.SIMPLE_ORDINATE_FORMAT.format(t)}},Yc.spaces=function(t){return Yc.chars(" ",t)},Zc.NEWLINE.get=function(){return Tl.getProperty("line.separator")},Zc.SIMPLE_ORDINATE_FORMAT.get=function(){return new qc("0.#")},Object.defineProperties(Yc,Zc);var Kc=function(){};Kc.prototype.interfaces_=function(){return[]},Kc.prototype.getClass=function(){return Kc},Kc.copyCoord=function(t,e,n,r){for(var i=Math.min(t.getDimension(),n.getDimension()),o=0;o<i;o++)n.setOrdinate(r,o,t.getOrdinate(e,o))},Kc.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&t.getOrdinate(0,Ol.X)===t.getOrdinate(e-1,Ol.X)&&t.getOrdinate(0,Ol.Y)===t.getOrdinate(e-1,Ol.Y)},Kc.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var r=Math.min(t.getDimension(),e.getDimension()),i=0;i<n;i++)for(var o=0;o<r;o++){var a=t.getOrdinate(i,o),s=e.getOrdinate(i,o);if(t.getOrdinate(i,o)!==e.getOrdinate(i,o)&&(!rl.isNaN(a)||!rl.isNaN(s)))return!1}return!0},Kc.extend=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();if(Kc.copy(e,0,r,0,i),i>0)for(var o=i;o<n;o++)Kc.copy(e,i-1,r,o,1);return r},Kc.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),r=0;r<=n;r++)Kc.swap(t,r,e-r)},Kc.swap=function(t,e,n){if(e===n)return null;for(var r=0;r<t.getDimension();r++){var i=t.getOrdinate(e,r);t.setOrdinate(e,r,t.getOrdinate(n,r)),t.setOrdinate(n,r,i)}},Kc.copy=function(t,e,n,r,i){for(var o=0;o<i;o++)Kc.copyCoord(t,e+o,n,r+o)},Kc.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),r=new vl;r.append("(");for(var i=0;i<e;i++){i>0&&r.append(" ");for(var o=0;o<n;o++)o>0&&r.append(","),r.append(Yc.toString(t.getOrdinate(i,o)))}return r.append(")"),r.toString()}},Kc.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Kc.createClosedRing(t,e,4):e.getOrdinate(0,Ol.X)===e.getOrdinate(n-1,Ol.X)&&e.getOrdinate(0,Ol.Y)===e.getOrdinate(n-1,Ol.Y)?e:Kc.createClosedRing(t,e,n+1)},Kc.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();Kc.copy(e,0,r,0,i);for(var o=i;o<n;o++)Kc.copy(e,0,r,o,1);return r};var $c=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Il:this._points.expandEnvelope(new Il)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){var e=this;if(2===arguments.length){var n=arguments[0],r=arguments[1];if(!this.isEquivalentClass(n))return!1;var i=n;if(this._points.size()!==i._points.size())return!1;for(var o=0;o<this._points.size();o++)if(!e.equal(e._points.getCoordinate(o),i._points.getCoordinate(o),r))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=this,e=0;e<Math.trunc(this._points.size()/2);e++){var n=t._points.size()-1-e;if(!t._points.getCoordinate(e).equals(t._points.getCoordinate(n)))return t._points.getCoordinate(e).compareTo(t._points.getCoordinate(n))>0&&Kc.reverse(t._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Mc.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return Wl.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Kc.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){var t=this;if(1===arguments.length){for(var e=arguments[0],n=0,r=0;n<this._points.size()&&r<e._points.size();){var i=t._points.getCoordinate(n).compareTo(e._points.getCoordinate(r));if(0!==i)return i;n++,r++}return n<this._points.size()?1:r<e._points.size()?-1:0}if(2===arguments.length){var o=arguments[0];return arguments[1].compare(this._points,o._points)}},e.prototype.apply=function(){var t=this;if(ml(arguments[0],Jl))for(var e=arguments[0],n=0;n<this._points.size();n++)e.filter(t._points.getCoordinate(n));else if(ml(arguments[0],Dc)){var r=arguments[0];if(0===this._points.size())return null;for(var i=0;i<this._points.size()&&(r.filter(t._points,i),!r.isDone());i++);r.isGeometryChanged()&&this.geometryChanged()}else(ml(arguments[0],Nc)||ml(arguments[0],Yl))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return new zc(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new nl("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[Tc]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(Zl),Jc=function(){};Jc.prototype.interfaces_=function(){return[]},Jc.prototype.getClass=function(){return Jc};var Qc=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Il;var t=new Il;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Mc.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(ml(arguments[0],Jl)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(ml(arguments[0],Dc)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else(ml(arguments[0],Nc)||ml(arguments[0],Yl))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),zl.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Jc]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(Zl),tf=function(){};tf.prototype.interfaces_=function(){return[]},tf.prototype.getClass=function(){return tf};var ef=function(t){function e(e,n,r){if(t.call(this,r),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new nl("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new nl("shell is empty but holes are not");this._shell=e,this._holes=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),r=0;r<n.length;r++)t[++e]=n[r];for(var i=0;i<this._holes.length;i++)for(var o=this._holes[i].getCoordinates(),a=0;a<o.length;a++)t[++e]=o[a];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(Wl.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(Wl.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var r=t.getX(n);if(r!==e.getMinX()&&r!==e.getMaxX())return!1;var i=t.getY(n);if(i!==e.getMinY()&&i!==e.getMaxY())return!1}for(var o=t.getX(0),a=t.getY(0),s=1;s<=4;s++){var u=t.getX(s),l=t.getY(s);if(u!==o===(l!==a))return!1;o=u,a=l}return!0},e.prototype.equalsExact=function(){var e=this;if(2===arguments.length){var n=arguments[0],r=arguments[1];if(!this.isEquivalentClass(n))return!1;var i=n,o=this._shell,a=i._shell;if(!o.equalsExact(a,r))return!1;if(this._holes.length!==i._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!e._holes[s].equalsExact(i._holes[s],r))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){var t=this;if(0===arguments.length){this.normalize(this._shell,!0);for(var e=0;e<this._holes.length;e++)t.normalize(t._holes[e],!1);jc.sort(this._holes)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];if(n.isEmpty())return null;var i=new Array(n.getCoordinates().length-1).fill(null);Tl.arraycopy(n.getCoordinates(),0,i,0,i.length);var o=pc.minCoordinate(n.getCoordinates());pc.scroll(i,o),Tl.arraycopy(i,0,n.getCoordinates(),0,i.length),n.getCoordinates()[i.length]=i[0],Wl.isCCW(n.getCoordinates())===r&&pc.reverse(n.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){var t=this;if(1===arguments.length){var e=arguments[0],n=this._shell,r=e._shell;return n.compareToSameClass(r)}if(2===arguments.length){var i=arguments[1],o=arguments[0],a=this._shell,s=o._shell,u=a.compareToSameClass(s,i);if(0!==u)return u;for(var l=this.getNumInteriorRing(),c=o.getNumInteriorRing(),f=0;f<l&&f<c;){var h=t.getInteriorRingN(f),p=o.getInteriorRingN(f),d=h.compareToSameClass(p,i);if(0!==d)return d;f++}return f<l?1:f<c?-1:0}},e.prototype.apply=function(t){var e=this;if(ml(t,Jl)){this._shell.apply(t);for(var n=0;n<this._holes.length;n++)e._holes[n].apply(t)}else if(ml(t,Dc)){if(this._shell.apply(t),!t.isDone())for(var r=0;r<this._holes.length&&(e._holes[r].apply(t),!t.isDone());r++);t.isGeometryChanged()&&this.geometryChanged()}else if(ml(t,Nc))t.filter(this);else if(ml(t,Yl)){t.filter(this),this._shell.apply(t);for(var i=0;i<this._holes.length;i++)e._holes[i].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),r=0;r<n.length;r++)n[r]=this._holes[r].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[tf]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(Zl),nf=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return Zl.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Mc.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Jc]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(Fc),rf=function(t){function e(e,n){e instanceof ll&&n instanceof _f&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return Zl.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Mc.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();return Kc.reverse(t),this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new nl("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new nl("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}($c),of=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return Zl.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new cc,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),r=0;r<n.getNumGeometries();r++)t.add(n.getGeometryN(r));var i=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(i))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[tf]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(Fc),af=function(t){this._factory=t||null,this._isUserDataCopied=!1},sf={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};af.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},af.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},af.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Fc?this.editGeometryCollection(t,e):t instanceof ef?this.editPolygon(t,e):t instanceof Qc||t instanceof $c?e.edit(t,this._factory):(zl.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},af.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),r=new cc,i=0;i<n.getNumGeometries();i++){var o=this.edit(n.getGeometryN(i),e);null===o||o.isEmpty()||r.add(o)}return n.getClass()===nf?this._factory.createMultiPoint(r.toArray([])):n.getClass()===Bc?this._factory.createMultiLineString(r.toArray([])):n.getClass()===of?this._factory.createMultiPolygon(r.toArray([])):this._factory.createGeometryCollection(r.toArray([]))},af.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var r=this.edit(n.getExteriorRing(),e);if(null===r||r.isEmpty())return this._factory.createPolygon();for(var i=new cc,o=0;o<n.getNumInteriorRing();o++){var a=this.edit(n.getInteriorRingN(o),e);null===a||a.isEmpty()||i.add(a)}return this._factory.createPolygon(r,i.toArray([]))},af.prototype.interfaces_=function(){return[]},af.prototype.getClass=function(){return af},af.GeometryEditorOperation=function(){},sf.NoOpGeometryOperation.get=function(){return uf},sf.CoordinateOperation.get=function(){return lf},sf.CoordinateSequenceOperation.get=function(){return cf},Object.defineProperties(af,sf);var uf=function(){};uf.prototype.edit=function(t,e){return t},uf.prototype.interfaces_=function(){return[af.GeometryEditorOperation]},uf.prototype.getClass=function(){return uf};var lf=function(){};lf.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof rf?e.createLinearRing(n):t instanceof $c?e.createLineString(n):t instanceof Qc?n.length>0?e.createPoint(n[0]):e.createPoint():t},lf.prototype.interfaces_=function(){return[af.GeometryEditorOperation]},lf.prototype.getClass=function(){return lf};var cf=function(){};cf.prototype.edit=function(t,e){return t instanceof rf?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof $c?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Qc?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},cf.prototype.interfaces_=function(){return[af.GeometryEditorOperation]},cf.prototype.getClass=function(){return cf};var ff=function(){var t=this;if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n<e;n++)t._coordinates[n]=new ll}else if(ml(arguments[0],Ol)){var r=arguments[0];if(null===r)return this._coordinates=new Array(0).fill(null),null;this._dimension=r.getDimension(),this._coordinates=new Array(r.size()).fill(null);for(var i=0;i<this._coordinates.length;i++)t._coordinates[i]=r.getCoordinateCopy(i)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,null===o&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],u=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=u;for(var l=0;l<s;l++)t._coordinates[l]=new ll}},hf={serialVersionUID:{configurable:!0}};ff.prototype.setOrdinate=function(t,e,n){switch(e){case Ol.X:this._coordinates[t].x=n;break;case Ol.Y:this._coordinates[t].y=n;break;case Ol.Z:this._coordinates[t].z=n;break;default:throw new nl("invalid ordinateIndex")}},ff.prototype.size=function(){return this._coordinates.length},ff.prototype.getOrdinate=function(t,e){switch(e){case Ol.X:return this._coordinates[t].x;case Ol.Y:return this._coordinates[t].y;case Ol.Z:return this._coordinates[t].z}return rl.NaN},ff.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ff.prototype.getCoordinateCopy=function(t){return new ll(this._coordinates[t])},ff.prototype.getDimension=function(){return this._dimension},ff.prototype.getX=function(t){return this._coordinates[t].x},ff.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new ff(t,this._dimension)},ff.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},ff.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new ff(t,this._dimension)},ff.prototype.toString=function(){if(this._coordinates.length>0){var t=new vl(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},ff.prototype.getY=function(t){return this._coordinates[t].y},ff.prototype.toCoordinateArray=function(){return this._coordinates},ff.prototype.interfaces_=function(){return[Ol,ul]},ff.prototype.getClass=function(){return ff},hf.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ff,hf);var pf=function(){},df={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};pf.prototype.readResolve=function(){return pf.instance()},pf.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array)return new ff(arguments[0]);if(ml(arguments[0],Ol))return new ff(arguments[0])}else if(2===arguments.length){var t=arguments[0],e=arguments[1];return e>3&&(e=3),e<2?new ff(t):new ff(t,e)}},pf.prototype.interfaces_=function(){return[hl,ul]},pf.prototype.getClass=function(){return pf},pf.instance=function(){return pf.instanceObject},df.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},df.instanceObject.get=function(){return new pf},Object.defineProperties(pf,df);var mf=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new cc,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Ac;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(yc),gf=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof vf){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},yf={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};gf.prototype.equals=function(t){if(!(t instanceof gf))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},gf.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new bl(n).compareTo(new bl(r))},gf.prototype.getScale=function(){return this._scale},gf.prototype.isFloating=function(){return this._modelType===gf.FLOATING||this._modelType===gf.FLOATING_SINGLE},gf.prototype.getType=function(){return this._modelType},gf.prototype.toString=function(){var t="UNKNOWN";return this._modelType===gf.FLOATING?t="Floating":this._modelType===gf.FLOATING_SINGLE?t="Floating-Single":this._modelType===gf.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},gf.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return rl.isNaN(t)||this._modelType===gf.FLOATING_SINGLE?t:this._modelType===gf.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof ll){var e=arguments[0];if(this._modelType===gf.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},gf.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===gf.FLOATING?t=16:this._modelType===gf.FLOATING_SINGLE?t=6:this._modelType===gf.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},gf.prototype.setScale=function(t){this._scale=Math.abs(t)},gf.prototype.interfaces_=function(){return[ul,ol]},gf.prototype.getClass=function(){return gf},gf.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},yf.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},yf.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(gf,yf);var vf=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},bf={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};vf.prototype.readResolve=function(){return vf.nameToTypeMap.get(this._name)},vf.prototype.toString=function(){return this._name},vf.prototype.interfaces_=function(){return[ul]},vf.prototype.getClass=function(){return vf},bf.serialVersionUID.get=function(){return-552860263173159e4},bf.nameToTypeMap.get=function(){return new mf},Object.defineProperties(vf,bf),gf.Type=vf,gf.FIXED=new vf("FIXED"),gf.FLOATING=new vf("FLOATING"),gf.FLOATING_SINGLE=new vf("FLOATING SINGLE");var _f=function t(){this._precisionModel=new gf,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?ml(arguments[0],hl)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof gf&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},Af={serialVersionUID:{configurable:!0}};_f.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new ll(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new ll(t.getMinX(),t.getMinY()),new ll(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new ll(t.getMinX(),t.getMinY()),new ll(t.getMinX(),t.getMaxY()),new ll(t.getMaxX(),t.getMaxY()),new ll(t.getMaxX(),t.getMinY()),new ll(t.getMinX(),t.getMinY())]),null)},_f.prototype.createLineString=function(t){return t?t instanceof Array?new $c(this.getCoordinateSequenceFactory().create(t),this):ml(t,Ol)?new $c(t,this):void 0:new $c(this.getCoordinateSequenceFactory().create([]),this)},_f.prototype.createMultiLineString=function(){return 0===arguments.length?new Bc(null,this):1===arguments.length?new Bc(arguments[0],this):void 0},_f.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===e&&(e=a),a!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(_f.toGeometryArray(t));var s=t.iterator().next();if(t.size()>1){if(s instanceof ef)return this.createMultiPolygon(_f.toPolygonArray(t));if(s instanceof $c)return this.createMultiLineString(_f.toLineStringArray(t));if(s instanceof Qc)return this.createMultiPoint(_f.toPointArray(t));zl.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},_f.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},_f.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof ll){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(ml(arguments[0],Ol))return new Qc(arguments[0],this)}},_f.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},_f.prototype.createPolygon=function(){if(0===arguments.length)return new ef(null,null,this);if(1===arguments.length){if(ml(arguments[0],Ol)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof rf){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length)return new ef(arguments[0],arguments[1],this)},_f.prototype.getSRID=function(){return this._SRID},_f.prototype.createGeometryCollection=function(){return 0===arguments.length?new Fc(null,this):1===arguments.length?new Fc(arguments[0],this):void 0},_f.prototype.createGeometry=function(t){return new af(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},_f.prototype.getPrecisionModel=function(){return this._precisionModel},_f.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(ml(arguments[0],Ol))return new rf(arguments[0],this)}},_f.prototype.createMultiPolygon=function(){return 0===arguments.length?new of(null,this):1===arguments.length?new of(arguments[0],this):void 0},_f.prototype.createMultiPoint=function(){var t=this;if(0===arguments.length)return new nf(null,this);if(1===arguments.length){if(arguments[0]instanceof Array)return new nf(arguments[0],this);if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(ml(arguments[0],Ol)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),i=0;i<n.size();i++){var o=t.getCoordinateSequenceFactory().create(1,n.getDimension());Kc.copy(n,i,o,0,1),r[i]=t.createPoint(o)}return this.createMultiPoint(r)}}},_f.prototype.interfaces_=function(){return[ul]},_f.prototype.getClass=function(){return _f},_f.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.getDefaultCoordinateSequenceFactory=function(){return pf.instance()},_f.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_f.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},Af.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(_f,Af);var wf=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],xf=function(t){this.geometryFactory=t||new _f};xf.prototype.read=function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!Ef[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==wf.indexOf(n)?Ef[n].apply(this,[e.coordinates]):"GeometryCollection"===n?Ef[n].apply(this,[e.geometries]):Ef[n].apply(this,[e])},xf.prototype.write=function(t){var e=t.getGeometryType();if(!Of[e])throw new Error("Geometry is not supported");return Of[e].apply(this,[t])};var Ef={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!Ef[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=Ef.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(new ll(r[0],r[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new ll(t[0],t[1]),new ll(t[2],t[1]),new ll(t[2],t[3]),new ll(t[0],t[3]),new ll(t[0],t[1])])},Point:function(t){var e=new ll(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ef.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=Ef.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ef.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=Ef.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),r=[],i=1;i<t.length;++i){var o=t[i],a=Ef.coordinates.apply(this,[o]),s=this.geometryFactory.createLinearRing(a);r.push(s)}return this.geometryFactory.createPolygon(n,r)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(Ef.Polygon.apply(this,[r]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(this.read(r))}return this.geometryFactory.createGeometryCollection(e)}},Of={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:Of.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Of.Point.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),r=0;r<n.length;++r){var i=n[r];e.push(Of.coordinate.apply(this,[i]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Of.LineString.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=Of.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var r=0;r<t._holes.length;++r){var i=t._holes[r],o=Of.LineString.apply(this,[i]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Of.Polygon.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=r.getGeometryType();e.push(Of[i].apply(this,[r]))}return{type:"GeometryCollection",geometries:e}}},Sf=function(t){this.geometryFactory=t||new _f,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new xf(this.geometryFactory)};Sf.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===gf.FIXED&&this.reducePrecision(e),e},Sf.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Pf=function(){this.parser=new xf(this.geometryFactory)};Pf.prototype.write=function(t){return this.parser.write(t)};var Cf=function(){},Tf={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};function kf(t){this.message=t||""}function If(){this.array_=[]}Cf.prototype.interfaces_=function(){return[]},Cf.prototype.getClass=function(){return Cf},Cf.opposite=function(t){return t===Cf.LEFT?Cf.RIGHT:t===Cf.RIGHT?Cf.LEFT:t},Tf.ON.get=function(){return 0},Tf.LEFT.get=function(){return 1},Tf.RIGHT.get=function(){return 2},Object.defineProperties(Cf,Tf),kf.prototype=new Error,kf.prototype.name="EmptyStackException",If.prototype=new uc,If.prototype.add=function(t){return this.array_.push(t),!0},If.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},If.prototype.push=function(t){return this.array_.push(t),t},If.prototype.pop=function(t){if(0===this.array_.length)throw new kf;return this.array_.pop()},If.prototype.peek=function(){if(0===this.array_.length)throw new kf;return this.array_[this.array_.length-1]},If.prototype.empty=function(){return 0===this.array_.length},If.prototype.isEmpty=function(){return this.empty()},If.prototype.search=function(t){return this.array_.indexOf(t)},If.prototype.size=function(){return this.array_.length},If.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var Lf=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Lf.prototype.getCoordinate=function(){return this._minCoord},Lf.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Lf.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();zl.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],r=Wl.computeOrientation(this._minCoord,n,e),i=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&r===Wl.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&r===Wl.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Lf.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var r=Cf.LEFT;return n[e].y<n[e+1].y&&(r=Cf.RIGHT),r},Lf.prototype.getEdge=function(){return this._orientedDe},Lf.prototype.checkForRightmostCoordinate=function(t){for(var e=this,n=t.getEdge().getCoordinates(),r=0;r<n.length-1;r++)(null===e._minCoord||n[r].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=n[r])},Lf.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Lf.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}zl.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Cf.LEFT&&(this._orientedDe=this._minDe.getSym())},Lf.prototype.interfaces_=function(){return[]},Lf.prototype.getClass=function(){return Lf};var jf=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new ll(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}(Fl),Mf=function(){this.array_=[]};Mf.prototype.addLast=function(t){this.array_.push(t)},Mf.prototype.removeFirst=function(){return this.array_.shift()},Mf.prototype.isEmpty=function(){return 0===this.array_.length};var Rf=function(){this._finder=null,this._dirEdgeList=new cc,this._nodes=new cc,this._rightMostCoord=null,this._env=null,this._finder=new Lf};Rf.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Rf.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Rf.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new jf("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Rf.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Cf.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Rf.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Rf.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Cf.RIGHT)>=1&&e.getDepth(Cf.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Rf.prototype.computeDepths=function(t){var e=new Ac,n=new Mf,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();e.contains(s)||(n.addLast(s),e.add(s))}}}},Rf.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Rf.prototype.getEnvelope=function(){if(null===this._env){for(var t=new Il,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;r<n.length-1;r++)t.expandToInclude(n[r]);this._env=t}return this._env},Rf.prototype.addReachable=function(t){var e=new If;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},Rf.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Cf.LEFT,t.getDepth(Cf.RIGHT)),e.setDepth(Cf.RIGHT,t.getDepth(Cf.LEFT))},Rf.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var r=n.next();this._dirEdgeList.add(r);var i=r.getSym().getNode();i.isVisited()||e.push(i)}},Rf.prototype.getNodes=function(){return this._nodes},Rf.prototype.getDirectedEdges=function(){return this._dirEdgeList},Rf.prototype.interfaces_=function(){return[ol]},Rf.prototype.getClass=function(){return Rf};var Nf=function t(){var e=this;if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var n=arguments[0];this.init(n.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[Cf.ON]=r}else if(arguments[0]instanceof t){var i=arguments[0];if(this.init(i.location.length),null!==i)for(var o=0;o<this.location.length;o++)e.location[o]=i.location[o]}}else if(3===arguments.length){var a=arguments[0],s=arguments[1],u=arguments[2];this.init(3),this.location[Cf.ON]=a,this.location[Cf.LEFT]=s,this.location[Cf.RIGHT]=u}};Nf.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Nf.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==pl.NONE)return!1;return!0},Nf.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===pl.NONE&&(this.location[e]=t)},Nf.prototype.isLine=function(){return 1===this.location.length},Nf.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Cf.ON]=this.location[Cf.ON],e[Cf.LEFT]=pl.NONE,e[Cf.RIGHT]=pl.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===pl.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Nf.prototype.getLocations=function(){return this.location},Nf.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Cf.LEFT];this.location[Cf.LEFT]=this.location[Cf.RIGHT],this.location[Cf.RIGHT]=t},Nf.prototype.toString=function(){var t=new vl;return this.location.length>1&&t.append(pl.toLocationSymbol(this.location[Cf.LEFT])),t.append(pl.toLocationSymbol(this.location[Cf.ON])),this.location.length>1&&t.append(pl.toLocationSymbol(this.location[Cf.RIGHT])),t.toString()},Nf.prototype.setLocations=function(t,e,n){this.location[Cf.ON]=t,this.location[Cf.LEFT]=e,this.location[Cf.RIGHT]=n},Nf.prototype.get=function(t){return t<this.location.length?this.location[t]:pl.NONE},Nf.prototype.isArea=function(){return this.location.length>1},Nf.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===pl.NONE)return!0;return!1},Nf.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Cf.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Nf.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(pl.NONE)},Nf.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Nf.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Nf.prototype.interfaces_=function(){return[]},Nf.prototype.getClass=function(){return Nf};var Df=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Nf(e),this.elt[1]=new Nf(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Nf(n.elt[0]),this.elt[1]=new Nf(n.elt[1])}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.elt[0]=new Nf(pl.NONE),this.elt[1]=new Nf(pl.NONE),this.elt[r].setLocation(i)}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.elt[0]=new Nf(o,a,s),this.elt[1]=new Nf(o,a,s)}else if(4===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2],f=arguments[3];this.elt[0]=new Nf(pl.NONE,pl.NONE,pl.NONE),this.elt[1]=new Nf(pl.NONE,pl.NONE,pl.NONE),this.elt[u].setLocations(l,c,f)}};Df.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Df.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Df.prototype.isNull=function(t){return this.elt[t].isNull()},Df.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Df.prototype.isLine=function(t){return this.elt[t].isLine()},Df.prototype.merge=function(t){for(var e=this,n=0;n<2;n++)null===e.elt[n]&&null!==t.elt[n]?e.elt[n]=new Nf(t.elt[n]):e.elt[n].merge(t.elt[n])},Df.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Df.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Cf.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Df.prototype.toString=function(){var t=new vl;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Df.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Df.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Df.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Cf.ON,e)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this.elt[n].setLocation(r,i)}},Df.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Df.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Df.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Nf(this.elt[t].location[0]))},Df.prototype.interfaces_=function(){return[]},Df.prototype.getClass=function(){return Df},Df.toLineLabel=function(t){for(var e=new Df(pl.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var Ff=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new cc,this._pts=new cc,this._label=new Df(pl.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new cc,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Ff.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=Wl.isCCW(this._ring.getCoordinates())},Ff.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Ff.prototype.computePoints=function(t){var e=this;this._startDe=t;var n=t,r=!0;do{if(null===n)throw new jf("Found null DirectedEdge");if(n.getEdgeRing()===e)throw new jf("Directed Edge visited twice during ring-building at "+n.getCoordinate());e._edges.add(n);var i=n.getLabel();zl.isTrue(i.isArea()),e.mergeLabel(i),e.addPoints(n.getEdge(),n.isForward(),r),r=!1,e.setEdgeRing(n,e),n=e.getNext(n)}while(n!==this._startDe)},Ff.prototype.getLinearRing=function(){return this._ring},Ff.prototype.getCoordinate=function(t){return this._pts.get(t)},Ff.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var n=e.getNode().getEdges().getOutgoingDegree(t);n>t._maxNodeDegree&&(t._maxNodeDegree=n),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Ff.prototype.addPoints=function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o<r.length;o++)this._pts.add(r[o])}else{var a=r.length-2;n&&(a=r.length-1);for(var s=a;s>=0;s--)this._pts.add(r[s])}},Ff.prototype.isHole=function(){return this._isHole},Ff.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Ff.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!Wl.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Ff.prototype.addHole=function(t){this._holes.add(t)},Ff.prototype.isShell=function(){return null===this._shell},Ff.prototype.getLabel=function(){return this._label},Ff.prototype.getEdges=function(){return this._edges},Ff.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Ff.prototype.getShell=function(){return this._shell},Ff.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[1],n=arguments[0].getLocation(e,Cf.RIGHT);if(n===pl.NONE)return null;if(this._label.getLocation(e)===pl.NONE)return this._label.setLocation(e,n),null}},Ff.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Ff.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},Ff.prototype.interfaces_=function(){return[]},Ff.prototype.getClass=function(){return Ff};var Bf=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ff),zf=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new cc,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Bf(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ff),Uf=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};Uf.prototype.setVisited=function(t){this._isVisited=t},Uf.prototype.setInResult=function(t){this._isInResult=t},Uf.prototype.isCovered=function(){return this._isCovered},Uf.prototype.isCoveredSet=function(){return this._isCoveredSet},Uf.prototype.setLabel=function(t){this._label=t},Uf.prototype.getLabel=function(){return this._label},Uf.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Uf.prototype.updateIM=function(t){zl.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Uf.prototype.isInResult=function(){return this._isInResult},Uf.prototype.isVisited=function(){return this._isVisited},Uf.prototype.interfaces_=function(){return[]},Uf.prototype.getClass=function(){return Uf};var Gf=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Df(0,pl.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=pl.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==pl.BOUNDARY&&(n=r)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Df(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var t=this;if(arguments[0]instanceof e){var n=arguments[0];this.mergeLabel(n._label)}else if(arguments[0]instanceof Df)for(var r=arguments[0],i=0;i<2;i++){var o=t.computeMergedLocation(r,i);t._label.getLocation(i)===pl.NONE&&t._label.setLocation(i,o)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=pl.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case pl.BOUNDARY:n=pl.INTERIOR;break;case pl.INTERIOR:default:n=pl.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Uf),Vf=function(){this.nodeMap=new Cc,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Vf.prototype.find=function(t){return this.nodeMap.get(t)},Vf.prototype.addNode=function(){if(arguments[0]instanceof ll){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Gf){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},Vf.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Vf.prototype.iterator=function(){return this.nodeMap.values().iterator()},Vf.prototype.values=function(){return this.nodeMap.values()},Vf.prototype.getBoundaryNodes=function(t){for(var e=new cc,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===pl.BOUNDARY&&e.add(r)}return e},Vf.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Vf.prototype.interfaces_=function(){return[]},Vf.prototype.getClass=function(){return Vf};var qf=function(){},Hf={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};qf.prototype.interfaces_=function(){return[]},qf.prototype.getClass=function(){return qf},qf.isNorthern=function(t){return t===qf.NE||t===qf.NW},qf.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},qf.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},qf.isInHalfPlane=function(t,e){return e===qf.SE?t===qf.SE||t===qf.SW:t===e||t===e+1},qf.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new nl("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?qf.NE:qf.SE:e>=0?qf.NW:qf.SW}if(arguments[0]instanceof ll&&arguments[1]instanceof ll){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new nl("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?qf.NE:qf.SE:r.y>=n.y?qf.NW:qf.SW}},Hf.NE.get=function(){return 0},Hf.NW.get=function(){return 1},Hf.SW.get=function(){return 2},Hf.SE.get=function(){return 3},Object.defineProperties(qf,Hf);var Wf=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=e,this.init(n,r),this._label=i}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=arguments[3];this._edge=o,this.init(a,s),this._label=u}};Wf.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:Wl.computeOrientation(t._p0,t._p1,this._p1)},Wf.prototype.getDy=function(){return this._dy},Wf.prototype.getCoordinate=function(){return this._p0},Wf.prototype.setNode=function(t){this._node=t},Wf.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);t.print("  "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+"   "+this._label)},Wf.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Wf.prototype.getDirectedCoordinate=function(){return this._p1},Wf.prototype.getDx=function(){return this._dx},Wf.prototype.getLabel=function(){return this._label},Wf.prototype.getEdge=function(){return this._edge},Wf.prototype.getQuadrant=function(){return this._quadrant},Wf.prototype.getNode=function(){return this._node},Wf.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return"  "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+"   "+this._label},Wf.prototype.computeLabel=function(t){},Wf.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=qf.quadrant(this._dx,this._dy),zl.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},Wf.prototype.interfaces_=function(){return[ol]},Wf.prototype.getClass=function(){return Wf};var Xf=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var r=e.getNumPoints()-1;this.init(e.getCoordinate(r),e.getCoordinate(r-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Df(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new jf("assigned depths do not match",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=this,e=!0,n=0;n<2;n++)t._label.isArea(n)&&t._label.getLocation(n,Cf.LEFT)===pl.INTERIOR&&t._label.getLocation(n,Cf.RIGHT)===pl.INTERIOR||(e=!1);return e},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[Cf.LEFT]+"/"+this._depth[Cf.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,pl.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,pl.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var r=1;t===Cf.LEFT&&(r=-1);var i=Cf.opposite(t),o=e+n*r;this.setDepth(t,e),this.setDepth(i,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===pl.EXTERIOR&&e===pl.INTERIOR?1:t===pl.INTERIOR&&e===pl.EXTERIOR?-1:0},e}(Wf),Yf=function(){};Yf.prototype.createNode=function(t){return new Gf(t,null)},Yf.prototype.interfaces_=function(){return[]},Yf.prototype.getClass=function(){return Yf};var Zf=function(){if(this._edges=new cc,this._nodes=null,this._edgeEndList=new cc,0===arguments.length)this._nodes=new Vf(new Yf);else if(1===arguments.length){var t=arguments[0];this._nodes=new Vf(t)}};Zf.prototype.printEdges=function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},Zf.prototype.find=function(t){return this._nodes.find(t)},Zf.prototype.addNode=function(){if(arguments[0]instanceof Gf){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof ll){var e=arguments[0];return this._nodes.addNode(e)}},Zf.prototype.getNodeIterator=function(){return this._nodes.iterator()},Zf.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()},Zf.prototype.debugPrintln=function(t){Tl.out.println(t)},Zf.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var r=n.getLabel();return null!==r&&r.getLocation(t)===pl.BOUNDARY},Zf.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()},Zf.prototype.matchInSameDirection=function(t,e,n,r){return!!t.equals(n)&&Wl.computeOrientation(t,e,r)===Wl.COLLINEAR&&qf.quadrant(t,e)===qf.quadrant(n,r)},Zf.prototype.getEdgeEnds=function(){return this._edgeEndList},Zf.prototype.debugPrint=function(t){Tl.out.print(t)},Zf.prototype.getEdgeIterator=function(){return this._edges.iterator()},Zf.prototype.findEdgeInSameDirection=function(t,e){for(var n=this,r=0;r<this._edges.size();r++){var i=n._edges.get(r),o=i.getCoordinates();if(n.matchInSameDirection(t,e,o[0],o[1]))return i;if(n.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return i}return null},Zf.prototype.insertEdge=function(t){this._edges.add(t)},Zf.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},Zf.prototype.addEdges=function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next();e._edges.add(r);var i=new Xf(r,!0),o=new Xf(r,!1);i.setSym(o),o.setSym(i),e.add(i),e.add(o)}},Zf.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Zf.prototype.getNodes=function(){return this._nodes.values()},Zf.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(t.equals(i[0])&&e.equals(i[1]))return r}return null},Zf.prototype.interfaces_=function(){return[]},Zf.prototype.getClass=function(){return Zf},Zf.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()};var Kf=function(){this._geometryFactory=null,this._shellList=new cc;var t=arguments[0];this._geometryFactory=t};Kf.prototype.sortShellsAndHoles=function(t,e,n){for(var r=t.iterator();r.hasNext();){var i=r.next();i.isHole()?n.add(i):e.add(i)}},Kf.prototype.computePolygons=function(t){for(var e=new cc,n=t.iterator();n.hasNext();){var r=n.next().toPolygon(this._geometryFactory);e.add(r)}return e},Kf.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(null===r.getShell()){var i=this.findEdgeRingContaining(r,t);if(null===i)throw new jf("unable to assign hole to a shell",r.getCoordinate(0));r.setShell(i)}}},Kf.prototype.buildMinimalEdgeRings=function(t,e,n){for(var r=new cc,i=t.iterator();i.hasNext();){var o=i.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),e.add(s)):n.addAll(a)}else r.add(o)}return r},Kf.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},Kf.prototype.buildMaximalEdgeRings=function(t){for(var e=new cc,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new zf(r,this._geometryFactory);e.add(i),i.setInResult()}}return e},Kf.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},Kf.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Kf.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,a=null,s=e.iterator();s.hasNext();){var u=s.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;c.contains(r)&&Wl.isPointInRing(i,l.getCoordinates())&&(f=!0),f&&(null===o||a.contains(c))&&(o=u)}return o},Kf.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return zl.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},Kf.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Zf.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new cc,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},Kf.prototype.interfaces_=function(){return[]},Kf.prototype.getClass=function(){return Kf};var $f=function(){};$f.prototype.getBounds=function(){},$f.prototype.interfaces_=function(){return[]},$f.prototype.getClass=function(){return $f};var Jf=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Jf.prototype.getItem=function(){return this._item},Jf.prototype.getBounds=function(){return this._bounds},Jf.prototype.interfaces_=function(){return[$f,ul]},Jf.prototype.getClass=function(){return Jf};var Qf=function(){this._size=null,this._items=null,this._size=0,this._items=new cc,this._items.add(null)};Qf.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Qf.prototype.size=function(){return this._size},Qf.prototype.reorder=function(t){for(var e=this,n=null,r=this._items.get(t);2*t<=this._size&&((n=2*t)!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(r)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,r)},Qf.prototype.clear=function(){this._size=0,this._items.clear()},Qf.prototype.isEmpty=function(){return 0===this._size},Qf.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},Qf.prototype.interfaces_=function(){return[]},Qf.prototype.getClass=function(){return Qf};var th=function(){};th.prototype.visitItem=function(t){},th.prototype.interfaces_=function(){return[]},th.prototype.getClass=function(){return th};var eh=function(){};eh.prototype.insert=function(t,e){},eh.prototype.remove=function(t,e){},eh.prototype.query=function(){},eh.prototype.interfaces_=function(){return[]},eh.prototype.getClass=function(){return eh};var nh=function(){if(this._childBoundables=new cc,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},rh={serialVersionUID:{configurable:!0}};nh.prototype.getLevel=function(){return this._level},nh.prototype.size=function(){return this._childBoundables.size()},nh.prototype.getChildBoundables=function(){return this._childBoundables},nh.prototype.addChildBoundable=function(t){zl.isTrue(null===this._bounds),this._childBoundables.add(t)},nh.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},nh.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},nh.prototype.interfaces_=function(){return[$f,ul]},nh.prototype.getClass=function(){return nh},rh.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(nh,rh);var ih=function(){};ih.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},ih.min=function(t){return ih.sort(t),t.get(0)},ih.sort=function(t,e){var n=t.toArray();e?jc.sort(n,e):jc.sort(n);for(var r=t.iterator(),i=0,o=n.length;i<o;i++)r.next(),r.set(n[i])},ih.singletonList=function(t){var e=new cc;return e.add(t),e};var oh=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};oh.prototype.expandToQueue=function(t,e){var n=oh.isComposite(this._boundable1),r=oh.isComposite(this._boundable2);if(n&&r)return oh.area(this._boundable1)>oh.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new nl("neither boundable is composite")},oh.prototype.isLeaves=function(){return!(oh.isComposite(this._boundable1)||oh.isComposite(this._boundable2))},oh.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},oh.prototype.expand=function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new oh(o,e,this._itemDistance);a.getDistance()<r&&n.add(a)}},oh.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},oh.prototype.getDistance=function(){return this._distance},oh.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},oh.prototype.interfaces_=function(){return[ol]},oh.prototype.getClass=function(){return oh},oh.area=function(t){return t.getBounds().getArea()},oh.isComposite=function(t){return t instanceof nh};var ah=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new cc,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];zl.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},sh={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};ah.prototype.getNodeCapacity=function(){return this._nodeCapacity},ah.prototype.lastNode=function(t){return t.get(t.size()-1)},ah.prototype.size=function(){var t=this;if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var e=0,n=arguments[0].getChildBoundables().iterator();n.hasNext();){var r=n.next();r instanceof nh?e+=t.size(r):r instanceof Jf&&(e+=1)}return e}},ah.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Jf&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)},ah.prototype.itemsTree=function(){var t=this;if(0===arguments.length){this.build();var e=this.itemsTree(this._root);return null===e?new cc:e}if(1===arguments.length){for(var n=arguments[0],r=new cc,i=n.getChildBoundables().iterator();i.hasNext();){var o=i.next();if(o instanceof nh){var a=t.itemsTree(o);null!==a&&r.add(a)}else o instanceof Jf?r.add(o.getItem()):zl.shouldNeverReachHere()}return r.size()<=0?null:r}},ah.prototype.insert=function(t,e){zl.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Jf(t,e))},ah.prototype.boundablesAtLevel=function(){var t=this;if(1===arguments.length){var e=arguments[0],n=new cc;return this.boundablesAtLevel(e,this._root,n),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(zl.isTrue(r>-2),i.getLevel()===r)return o.add(i),null;for(var a=i.getChildBoundables().iterator();a.hasNext();){var s=a.next();s instanceof nh?t.boundablesAtLevel(r,s,o):(zl.isTrue(s instanceof Jf),-1===r&&o.add(s))}return null}},ah.prototype.query=function(){var t=this;if(1===arguments.length){var e=arguments[0];this.build();var n=new cc;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}if(2===arguments.length){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(3===arguments.length)if(ml(arguments[2],th)&&arguments[0]instanceof Object&&arguments[1]instanceof nh)for(var o=arguments[0],a=arguments[2],s=arguments[1].getChildBoundables(),u=0;u<s.size();u++){var l=s.get(u);t.getIntersectsOp().intersects(l.getBounds(),o)&&(l instanceof nh?t.query(o,l,a):l instanceof Jf?a.visitItem(l.getItem()):zl.shouldNeverReachHere())}else if(ml(arguments[2],uc)&&arguments[0]instanceof Object&&arguments[1]instanceof nh)for(var c=arguments[0],f=arguments[2],h=arguments[1].getChildBoundables(),p=0;p<h.size();p++){var d=h.get(p);t.getIntersectsOp().intersects(d.getBounds(),c)&&(d instanceof nh?t.query(c,d,f):d instanceof Jf?f.add(d.getItem()):zl.shouldNeverReachHere())}},ah.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},ah.prototype.getRoot=function(){return this.build(),this._root},ah.prototype.remove=function(){var t=this;if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.remove(e,this._root,n)}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=this.removeItem(i,o);if(a)return!0;for(var s=null,u=i.getChildBoundables().iterator();u.hasNext();){var l=u.next();if(t.getIntersectsOp().intersects(l.getBounds(),r)&&l instanceof nh&&(a=t.remove(r,l,o))){s=l;break}}return null!==s&&s.getChildBoundables().isEmpty()&&i.getChildBoundables().remove(s),a}},ah.prototype.createHigherLevels=function(t,e){zl.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},ah.prototype.depth=function(){var t=this;if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var e=0,n=arguments[0].getChildBoundables().iterator();n.hasNext();){var r=n.next();if(r instanceof nh){var i=t.depth(r);i>e&&(e=i)}}return e+1}},ah.prototype.createParentBoundables=function(t,e){var n=this;zl.isTrue(!t.isEmpty());var r=new cc;r.add(this.createNode(e));var i=new cc(t);ih.sort(i,this.getComparator());for(var o=i.iterator();o.hasNext();){var a=o.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(e)),n.lastNode(r).addChildBoundable(a)}return r},ah.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},ah.prototype.interfaces_=function(){return[ul]},ah.prototype.getClass=function(){return ah},ah.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},sh.IntersectsOp.get=function(){return uh},sh.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},sh.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(ah,sh);var uh=function(){},lh=function(){};lh.prototype.distance=function(t,e){},lh.prototype.interfaces_=function(){return[]},lh.prototype.getClass=function(){return lh};var ch=function(t){function e(n){n=n||e.DEFAULT_NODE_CAPACITY,t.call(this,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return e.prototype.createParentBoundablesFromVerticalSlices=function(t,e){zl.isTrue(t.length>0);for(var n=new cc,r=0;r<t.length;r++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[r],e));return n},e.prototype.createNode=function(t){return new fh(t)},e.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},e.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},e.prototype.getIntersectsOp=function(){return e.intersectsOp},e.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),r=new Array(e).fill(null),i=t.iterator(),o=0;o<e;o++){r[o]=new cc;for(var a=0;i.hasNext()&&a<n;){var s=i.next();r[o].add(s),a++}}return r},e.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];t.prototype.query.call(this,n,r)}else if(3===arguments.length)if(ml(arguments[2],th)&&arguments[0]instanceof Object&&arguments[1]instanceof nh){var i=arguments[0],o=arguments[1],a=arguments[2];t.prototype.query.call(this,i,o,a)}else if(ml(arguments[2],uc)&&arguments[0]instanceof Object&&arguments[1]instanceof nh){var s=arguments[0],u=arguments[1],l=arguments[2];t.prototype.query.call(this,s,u,l)}},e.prototype.getComparator=function(){return e.yComparator},e.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},e.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},e.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},e.prototype.createParentBoundables=function(t,n){zl.isTrue(!t.isEmpty());var r=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),i=new cc(t);ih.sort(i,e.xComparator);var o=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(r))));return this.createParentBoundablesFromVerticalSlices(o,n)},e.prototype.nearestNeighbour=function(){if(1===arguments.length){if(ml(arguments[0],lh)){var t=arguments[0],n=new oh(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(n)}if(arguments[0]instanceof oh){var r=arguments[0];return this.nearestNeighbour(r,rl.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof e&&ml(arguments[1],lh)){var i=arguments[0],o=arguments[1],a=new oh(this.getRoot(),i.getRoot(),o);return this.nearestNeighbour(a)}if(arguments[0]instanceof oh&&"number"==typeof arguments[1]){var s=arguments[0],u=arguments[1],l=null,c=new Qf;for(c.add(s);!c.isEmpty()&&u>0;){var f=c.poll(),h=f.getDistance();if(h>=u)break;f.isLeaves()?(u=h,l=f):f.expandToQueue(c,u)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var p=arguments[2],d=new Jf(arguments[0],arguments[1]),m=new oh(this.getRoot(),d,p);return this.nearestNeighbour(m)[0]}},e.prototype.interfaces_=function(){return[eh,ul]},e.prototype.getClass=function(){return e},e.centreX=function(t){return e.avg(t.getMinX(),t.getMaxX())},e.avg=function(t,e){return(t+e)/2},e.centreY=function(t){return e.avg(t.getMinY(),t.getMaxY())},n.STRtreeNode.get=function(){return fh},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[sl]},compare:function(n,r){return t.compareDoubles(e.centreX(n.getBounds()),e.centreX(r.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[sl]},compare:function(n,r){return t.compareDoubles(e.centreY(n.getBounds()),e.centreY(r.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(ah),fh=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new Il(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(nh),hh=function(){};hh.prototype.interfaces_=function(){return[]},hh.prototype.getClass=function(){return hh},hh.relativeSign=function(t,e){return t<e?-1:t>e?1:0},hh.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=hh.relativeSign(e.x,n.x),i=hh.relativeSign(e.y,n.y);switch(t){case 0:return hh.compareValue(r,i);case 1:return hh.compareValue(i,r);case 2:return hh.compareValue(i,-r);case 3:return hh.compareValue(-r,i);case 4:return hh.compareValue(-r,-i);case 5:return hh.compareValue(-i,-r);case 6:return hh.compareValue(-i,r);case 7:return hh.compareValue(r,-i)}return zl.shouldNeverReachHere("invalid octant value"),0},hh.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ph=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new ll(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};ph.prototype.getCoordinate=function(){return this.coord},ph.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ph.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:hh.compare(this._segmentOctant,this.coord,e.coord)},ph.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ph.prototype.isInterior=function(){return this._isInterior},ph.prototype.interfaces_=function(){return[ol]},ph.prototype.getClass=function(){return ph};var dh=function(){this._nodeMap=new Cc,this._edge=null;var t=arguments[0];this._edge=t};dh.prototype.getSplitCoordinates=function(){var t=new hc;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},dh.prototype.addCollapsedNodes=function(){var t=new cc;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},dh.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},dh.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),r=this._edge.getCoordinate(e+2);n.equals2D(r)&&t.add(new bl(e+1))}},dh.prototype.addEdgeCoordinates=function(t,e,n){var r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);n.add(new ll(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));i&&n.add(new ll(e.coord))},dh.prototype.iterator=function(){return this._nodeMap.values().iterator()},dh.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},dh.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var r=e.segmentIndex-t.segmentIndex;return e.isInterior()||r--,1===r&&(n[0]=t.segmentIndex+1,!0)},dh.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();this.findCollapseIndex(r,i,e)&&t.add(new bl(e[0])),r=i}},dh.prototype.getEdge=function(){return this._edge},dh.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},dh.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new ll(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this._edge.getCoordinate(s);return i&&(o[a]=new ll(e.coord)),new vh(o,this._edge.getData())},dh.prototype.add=function(t,e){var n=new ph(this._edge,t,e,this._edge.getSegmentOctant(e)),r=this._nodeMap.get(n);return null!==r?(zl.isTrue(r.coord.equals2D(t),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(n,n),n)},dh.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new Fl("bad split edge start point at "+n);var r=t.get(t.size()-1).getCoordinates(),i=r[r.length-1];if(!i.equals2D(e[e.length-1]))throw new Fl("bad split edge end point at "+i)},dh.prototype.interfaces_=function(){return[]},dh.prototype.getClass=function(){return dh};var mh=function(){};mh.prototype.interfaces_=function(){return[]},mh.prototype.getClass=function(){return mh},mh.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new nl("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),r=Math.abs(e);return t>=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof ll&&arguments[1]instanceof ll){var i=arguments[0],o=arguments[1],a=o.x-i.x,s=o.y-i.y;if(0===a&&0===s)throw new nl("Cannot compute the octant for two identical points "+i);return mh.octant(a,s)}};var gh=function(){};gh.prototype.getCoordinates=function(){},gh.prototype.size=function(){},gh.prototype.getCoordinate=function(t){},gh.prototype.isClosed=function(){},gh.prototype.setData=function(t){},gh.prototype.getData=function(){},gh.prototype.interfaces_=function(){return[]},gh.prototype.getClass=function(){return gh};var yh=function(){};yh.prototype.addIntersection=function(t,e){},yh.prototype.interfaces_=function(){return[gh]},yh.prototype.getClass=function(){return yh};var vh=function(){this._nodeList=new dh(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};vh.prototype.getCoordinates=function(){return this._pts},vh.prototype.size=function(){return this._pts.length},vh.prototype.getCoordinate=function(t){return this._pts[t]},vh.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},vh.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},vh.prototype.setData=function(t){this._data=t},vh.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:mh.octant(t,e)},vh.prototype.getData=function(){return this._data},vh.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[1],r=arguments[3],i=new ll(arguments[0].getIntersection(r));this.addIntersection(i,n)}},vh.prototype.toString=function(){return Dl.toLineString(new ff(this._pts))},vh.prototype.getNodeList=function(){return this._nodeList},vh.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r<this._pts.length){var i=this._pts[r];t.equals2D(i)&&(n=r)}return this._nodeList.add(t,n)},vh.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},vh.prototype.interfaces_=function(){return[yh]},vh.prototype.getClass=function(){return vh},vh.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new cc;return vh.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[1],r=arguments[0].iterator();r.hasNext();)r.next().getNodeList().addSplitEdges(n)};var bh=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new ll,this.p1=new ll;else if(1===arguments.length){var t=arguments[0];this.p0=new ll(t.p0),this.p1=new ll(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this.p0=new ll(e,n),this.p1=new ll(r,i)}},_h={serialVersionUID:{configurable:!0}};bh.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},bh.prototype.orientationIndex=function(){if(arguments[0]instanceof bh){var t=arguments[0],e=Wl.orientationIndex(this.p0,this.p1,t.p0),n=Wl.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof ll){var r=arguments[0];return Wl.orientationIndex(this.p0,this.p1,r)}},bh.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},bh.prototype.isVertical=function(){return this.p0.x===this.p1.x},bh.prototype.equals=function(t){if(!(t instanceof bh))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},bh.prototype.intersection=function(t){var e=new Vl;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},bh.prototype.project=function(){if(arguments[0]instanceof ll){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new ll(t);var e=this.projectionFactor(t),n=new ll;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof bh){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(r.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(r.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new bh(a,s)}},bh.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},bh.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},bh.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},bh.prototype.distancePerpendicular=function(t){return Wl.distancePointLinePerpendicular(t,this.p0,this.p1)},bh.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},bh.prototype.midPoint=function(){return bh.midPoint(this.p0,this.p1)},bh.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;return r<=0?rl.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r},bh.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=rl.MAX_VALUE,i=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var a=this.closestPoint(t.p1);(i=a.distance(t.p1))<r&&(r=i,n[0]=a,n[1]=t.p1);var s=t.closestPoint(this.p0);(i=s.distance(this.p0))<r&&(r=i,n[0]=this.p0,n[1]=s);var u=t.closestPoint(this.p1);return(i=u.distance(this.p1))<r&&(r=i,n[0]=this.p1,n[1]=u),n},bh.prototype.closestPoint=function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},bh.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},bh.prototype.getLength=function(){return this.p0.distance(this.p1)},bh.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},bh.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},bh.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},bh.prototype.lineIntersection=function(t){try{return kl.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof Cl))throw t}return null},bh.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},bh.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),r=this.p0.y+t*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(i*i+o*o),s=0,u=0;if(0!==e){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");s=e*i/a,u=e*o/a}return new ll(n-u,r+s)},bh.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},bh.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||rl.isNaN(e))&&(e=1),e},bh.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},bh.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},bh.prototype.distance=function(){if(arguments[0]instanceof bh){var t=arguments[0];return Wl.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof ll){var e=arguments[0];return Wl.distancePointLine(e,this.p0,this.p1)}},bh.prototype.pointAlong=function(t){var e=new ll;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},bh.prototype.hashCode=function(){var t=rl.doubleToLongBits(this.p0.x);t^=31*rl.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=rl.doubleToLongBits(this.p1.x);return n^=31*rl.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},bh.prototype.interfaces_=function(){return[ol,ul]},bh.prototype.getClass=function(){return bh},bh.midPoint=function(t,e){return new ll((t.x+e.x)/2,(t.y+e.y)/2)},_h.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(bh,_h);var Ah=function(){this.tempEnv1=new Il,this.tempEnv2=new Il,this._overlapSeg1=new bh,this._overlapSeg2=new bh};Ah.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[3];arguments[0].getLineSegment(t,this._overlapSeg1),e.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},Ah.prototype.interfaces_=function(){return[]},Ah.prototype.getClass=function(){return Ah};var wh=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};wh.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},wh.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var a=Math.trunc((e+n)/2);e<a&&this.computeSelect(t,e,a,r),a<n&&this.computeSelect(t,a,n,r)},wh.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},wh.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},wh.prototype.setId=function(t){this._id=t},wh.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},wh.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new Il(t,e)}return this._env},wh.prototype.getEndIndex=function(){return this._end},wh.prototype.getStartIndex=function(){return this._start},wh.prototype.getContext=function(){return this._context},wh.prototype.getId=function(){return this._id},wh.prototype.computeOverlapsInternal=function(t,e,n,r,i,o){var a=this._pts[t],s=this._pts[e],u=n._pts[r],l=n._pts[i];if(e-t==1&&i-r==1)return o.overlap(this,t,n,r),null;if(o.tempEnv1.init(a,s),o.tempEnv2.init(u,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),f=Math.trunc((r+i)/2);t<c&&(r<f&&this.computeOverlapsInternal(t,c,n,r,f,o),f<i&&this.computeOverlapsInternal(t,c,n,f,i,o)),c<e&&(r<f&&this.computeOverlapsInternal(c,e,n,r,f,o),f<i&&this.computeOverlapsInternal(c,e,n,f,i,o))},wh.prototype.interfaces_=function(){return[]},wh.prototype.getClass=function(){return wh};var xh=function(){};xh.prototype.interfaces_=function(){return[]},xh.prototype.getClass=function(){return xh},xh.getChainStartIndices=function(t){var e=0,n=new cc;n.add(new bl(e));do{var r=xh.findChainEnd(t,e);n.add(new bl(r)),e=r}while(e<t.length-1);return xh.toIntArray(n)},xh.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var r=qf.quadrant(t[n],t[n+1]),i=e+1;i<t.length&&(t[i-1].equals2D(t[i])||qf.quadrant(t[i-1],t[i])===r);)i++;return i-1},xh.getChains=function(){if(1===arguments.length){var t=arguments[0];return xh.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],r=new cc,i=xh.getChainStartIndices(e),o=0;o<i.length-1;o++){var a=new wh(e,i[o],i[o+1],n);r.add(a)}return r}},xh.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Eh=function(){};Eh.prototype.computeNodes=function(t){},Eh.prototype.getNodedSubstrings=function(){},Eh.prototype.interfaces_=function(){return[]},Eh.prototype.getClass=function(){return Eh};var Oh=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};Oh.prototype.setSegmentIntersector=function(t){this._segInt=t},Oh.prototype.interfaces_=function(){return[Eh]},Oh.prototype.getClass=function(){return Oh};var Sh=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new cc,this._index=new ch,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return vh.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=this,n=xh.getChains(t.getCoordinates(),t).iterator();n.hasNext();){var r=n.next();r.setId(e._idCounter++),e._index.insert(r.getEnvelope(),r),e._monoChains.add(r)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=this,e=new Ph(this._segInt),n=this._monoChains.iterator();n.hasNext();)for(var r=n.next(),i=t._index.query(r.getEnvelope()).iterator();i.hasNext();){var o=i.next();if(o.getId()>r.getId()&&(r.computeOverlaps(o,e),t._nOverlaps++),t._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return Ph},Object.defineProperties(e,n),e}(Oh),Ph=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[1],n=arguments[2],r=arguments[3],i=arguments[0].getContext(),o=n.getContext();this._si.processIntersections(i,e,o,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ah),Ch=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}},Th={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Ch.prototype.getEndCapStyle=function(){return this._endCapStyle},Ch.prototype.isSingleSided=function(){return this._isSingleSided},Ch.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Ch.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Ch.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Ch.JOIN_ROUND&&(this._quadrantSegments=Ch.DEFAULT_QUADRANT_SEGMENTS)},Ch.prototype.getJoinStyle=function(){return this._joinStyle},Ch.prototype.setJoinStyle=function(t){this._joinStyle=t},Ch.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Ch.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Ch.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Ch.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Ch.prototype.getMitreLimit=function(){return this._mitreLimit},Ch.prototype.setMitreLimit=function(t){this._mitreLimit=t},Ch.prototype.setSingleSided=function(t){this._isSingleSided=t},Ch.prototype.interfaces_=function(){return[]},Ch.prototype.getClass=function(){return Ch},Ch.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Th.CAP_ROUND.get=function(){return 1},Th.CAP_FLAT.get=function(){return 2},Th.CAP_SQUARE.get=function(){return 3},Th.JOIN_ROUND.get=function(){return 1},Th.JOIN_MITRE.get=function(){return 2},Th.JOIN_BEVEL.get=function(){return 3},Th.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Th.DEFAULT_MITRE_LIMIT.get=function(){return 5},Th.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Ch,Th);var kh=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Wl.COUNTERCLOCKWISE,this._inputLine=t||null},Ih={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};kh.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!!this.isConcave(i,o,a)&&!!this.isShallow(i,o,a,r)&&this.isShallowSampled(i,o,t,n,r)},kh.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r<this._inputLine.length;){var o=!1;t.isDeletable(e,n,r,t._distanceTol)&&(t._isDeleted[n]=kh.DELETE,o=!0,i=!0),e=o?r:n,n=t.findNextNonDeletedIndex(e),r=t.findNextNonDeletedIndex(n)}return i},kh.prototype.isShallowConcavity=function(t,e,n,r){return Wl.computeOrientation(t,e,n)===this._angleOrientation&&Wl.distancePointLine(e,t,n)<r},kh.prototype.isShallowSampled=function(t,e,n,r,i){var o=Math.trunc((r-n)/kh.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var a=n;a<r;a+=o)if(!this.isShallow(t,e,this._inputLine[a],i))return!1;return!0},kh.prototype.isConcave=function(t,e,n){return Wl.computeOrientation(t,e,n)===this._angleOrientation},kh.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=Wl.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},kh.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===kh.DELETE;)e++;return e},kh.prototype.isShallow=function(t,e,n,r){return Wl.distancePointLine(e,t,n)<r},kh.prototype.collapseLine=function(){for(var t=new hc,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==kh.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},kh.prototype.interfaces_=function(){return[]},kh.prototype.getClass=function(){return kh},kh.simplify=function(t,e){return new kh(t).simplify(e)},Ih.INIT.get=function(){return 0},Ih.DELETE.get=function(){return 1},Ih.KEEP.get=function(){return 1},Ih.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(kh,Ih);var Lh=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new cc},jh={COORDINATE_ARRAY_TYPE:{configurable:!0}};Lh.prototype.getCoordinates=function(){return this._ptList.toArray(Lh.COORDINATE_ARRAY_TYPE)},Lh.prototype.setPrecisionModel=function(t){this._precisionModel=t},Lh.prototype.addPt=function(t){var e=new ll(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Lh.prototype.revere=function(){},Lh.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var r=t.length-1;r>=0;r--)this.addPt(t[r])},Lh.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},Lh.prototype.toString=function(){return(new _f).createLineString(this.getCoordinates()).toString()},Lh.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new ll(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Lh.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Lh.prototype.interfaces_=function(){return[]},Lh.prototype.getClass=function(){return Lh},jh.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Lh,jh);var Mh=function(){},Rh={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Mh.prototype.interfaces_=function(){return[]},Mh.prototype.getClass=function(){return Mh},Mh.toDegrees=function(t){return 180*t/Math.PI},Mh.normalize=function(t){for(;t>Math.PI;)t-=Mh.PI_TIMES_2;for(;t<=-Math.PI;)t+=Mh.PI_TIMES_2;return t},Mh.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},Mh.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0},Mh.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0},Mh.interiorAngle=function(t,e,n){var r=Mh.angle(e,t),i=Mh.angle(e,n);return Math.abs(i-r)},Mh.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Mh.PI_TIMES_2;t>=Mh.PI_TIMES_2&&(t=0)}else{for(;t>=Mh.PI_TIMES_2;)t-=Mh.PI_TIMES_2;t<0&&(t=0)}return t},Mh.angleBetween=function(t,e,n){var r=Mh.angle(e,t),i=Mh.angle(e,n);return Mh.diff(r,i)},Mh.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},Mh.toRadians=function(t){return t*Math.PI/180},Mh.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Mh.COUNTERCLOCKWISE:n<0?Mh.CLOCKWISE:Mh.NONE},Mh.angleBetweenOriented=function(t,e,n){var r=Mh.angle(e,t),i=Mh.angle(e,n)-r;return i<=-Math.PI?i+Mh.PI_TIMES_2:i>Math.PI?i-Mh.PI_TIMES_2:i},Rh.PI_TIMES_2.get=function(){return 2*Math.PI},Rh.PI_OVER_2.get=function(){return Math.PI/2},Rh.PI_OVER_4.get=function(){return Math.PI/4},Rh.COUNTERCLOCKWISE.get=function(){return Wl.COUNTERCLOCKWISE},Rh.CLOCKWISE.get=function(){return Wl.CLOCKWISE},Rh.NONE.get=function(){return Wl.COLLINEAR},Object.defineProperties(Mh,Rh);var Nh=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new bh,this._seg1=new bh,this._offset0=new bh,this._offset1=new bh,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new Vl,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Ch.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Dh={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Nh.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=Wl.computeOrientation(this._s0,this._s1,this._s2),r=n===Wl.CLOCKWISE&&this._side===Cf.LEFT||n===Wl.COUNTERCLOCKWISE&&this._side===Cf.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Nh.prototype.addLineEndCap=function(t,e){var n=new bh(t,e),r=new bh;this.computeOffsetSegment(n,Cf.LEFT,this._distance,r);var i=new bh;this.computeOffsetSegment(n,Cf.RIGHT,this._distance,i);var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Ch.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,s+Math.PI/2,s-Math.PI/2,Wl.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Ch.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Ch.CAP_SQUARE:var u=new ll;u.x=Math.abs(this._distance)*Math.cos(s),u.y=Math.abs(this._distance)*Math.sin(s);var l=new ll(r.p1.x+u.x,r.p1.y+u.y),c=new ll(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Nh.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Nh.prototype.addMitreJoin=function(t,e,n,r){var i=!0,o=null;try{o=kl.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof Cl))throw t;o=new ll(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},Nh.prototype.addFilletCorner=function(t,e,n,r,i){var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);r===Wl.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,s,c,r,i),this._segList.addPt(n)},Nh.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Nh.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Ch.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Ch.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Nh.prototype.createSquare=function(t){this._segList.addPt(new ll(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new ll(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new ll(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new ll(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Nh.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Nh.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Nh.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Nh.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Nh.prototype.addLimitedMitreJoin=function(t,e,n,r){var i=this._seg0.p1,o=Mh.angle(i,this._seg0.p0),a=Mh.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,s=Mh.normalize(o+a),u=Mh.normalize(s+Math.PI),l=r*n,c=n-l*Math.abs(Math.sin(a)),f=i.x+l*Math.cos(u),h=i.y+l*Math.sin(u),p=new ll(f,h),d=new bh(i,p),m=d.pointAlongOffset(1,c),g=d.pointAlongOffset(1,-c);this._side===Cf.LEFT?(this._segList.addPt(m),this._segList.addPt(g)):(this._segList.addPt(g),this._segList.addPt(m))},Nh.prototype.computeOffsetSegment=function(t,e,n,r){var i=e===Cf.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,s=Math.sqrt(o*o+a*a),u=i*n*o/s,l=i*n*a/s;r.p0.x=t.p0.x-l,r.p0.y=t.p0.y+u,r.p1.x=t.p1.x-l,r.p1.y=t.p1.y+u},Nh.prototype.addFilletArc=function(t,e,n,r,i){var o=r===Wl.CLOCKWISE?-1:1,a=Math.abs(e-n),s=Math.trunc(a/this._filletAngleQuantum+.5);if(s<1)return null;for(var u=a/s,l=0,c=new ll;l<a;){var f=e+o*l;c.x=t.x+i*Math.cos(f),c.y=t.y+i*Math.sin(f),this._segList.addPt(c),l+=u}},Nh.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Nh.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new ll((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new ll((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Nh.prototype.createCircle=function(t){var e=new ll(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Nh.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Nh.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Lh,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Nh.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Nh.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Ch.JOIN_BEVEL||this._bufParams.getJoinStyle()===Ch.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Wl.CLOCKWISE,this._distance))},Nh.prototype.closeRing=function(){this._segList.closeRing()},Nh.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Nh.prototype.interfaces_=function(){return[]},Nh.prototype.getClass=function(){return Nh},Dh.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Dh.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Dh.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Dh.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Nh,Dh);var Fh=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Fh.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&pc.reverse(o),o},Fh.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=kh.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Cf.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{n.addSegments(t,!1);var s=kh.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Cf.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(s[l],!0)}n.addLastSegment(),n.closeRing()},Fh.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Cf.RIGHT&&(r=-r);var i=kh.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var a=1;a<=o;a++){var s=1!==a;n.addNextSegment(i[a],s)}n.closeRing()},Fh.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=kh.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Cf.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var a=kh.simplify(t,-n),s=a.length-1;e.initSideSegments(a[s],a[s-1],Cf.LEFT);for(var u=s-2;u>=0;u--)e.addNextSegment(a[u],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Fh.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Ch.CAP_ROUND:e.createCircle(t);break;case Ch.CAP_SQUARE:e.createSquare(t)}},Fh.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()},Fh.prototype.getBufferParameters=function(){return this._bufParams},Fh.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Fh.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Fh.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},Fh.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=kh.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Cf.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{var s=kh.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Cf.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(s[l],!0)}n.addLastSegment()},Fh.prototype.getSegGen=function(t){return new Nh(this._precisionModel,this._bufParams,t)},Fh.prototype.interfaces_=function(){return[]},Fh.prototype.getClass=function(){return Fh},Fh.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new ll(t[n]);return e};var Bh=function(){this._subgraphs=null,this._seg=new bh,this._cga=new Wl;var t=arguments[0];this._subgraphs=t},zh={DepthSegment:{configurable:!0}};Bh.prototype.findStabbedSegments=function(){var t=this;if(1===arguments.length){for(var e=arguments[0],n=new cc,r=this._subgraphs.iterator();r.hasNext();){var i=r.next(),o=i.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,i.getDirectedEdges(),n)}return n}if(3===arguments.length)if(ml(arguments[2],uc)&&arguments[0]instanceof ll&&arguments[1]instanceof Xf){for(var a=arguments[0],s=arguments[1],u=arguments[2],l=s.getEdge().getCoordinates(),c=0;c<l.length-1;c++)if(t._seg.p0=l[c],t._seg.p1=l[c+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse(),!(Math.max(t._seg.p0.x,t._seg.p1.x)<a.x)&&!(t._seg.isHorizontal()||a.y<t._seg.p0.y||a.y>t._seg.p1.y||Wl.computeOrientation(t._seg.p0,t._seg.p1,a)===Wl.RIGHT)){var f=s.getDepth(Cf.LEFT);t._seg.p0.equals(l[c])||(f=s.getDepth(Cf.RIGHT));var h=new Uh(t._seg,f);u.add(h)}}else if(ml(arguments[2],uc)&&arguments[0]instanceof ll&&ml(arguments[1],uc))for(var p=arguments[0],d=arguments[2],m=arguments[1].iterator();m.hasNext();){var g=m.next();g.isForward()&&t.findStabbedSegments(p,g,d)}},Bh.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:ih.min(e)._leftDepth},Bh.prototype.interfaces_=function(){return[]},Bh.prototype.getClass=function(){return Bh},zh.DepthSegment.get=function(){return Uh},Object.defineProperties(Bh,zh);var Uh=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new bh(t),this._leftDepth=e};Uh.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!==(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Uh.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Uh.prototype.toString=function(){return this._upwardSeg.toString()},Uh.prototype.interfaces_=function(){return[ol]},Uh.prototype.getClass=function(){return Uh};var Gh=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Gh.prototype.area=function(){return Gh.area(this.p0,this.p1,this.p2)},Gh.prototype.signedArea=function(){return Gh.signedArea(this.p0,this.p1,this.p2)},Gh.prototype.interpolateZ=function(t){if(null===t)throw new nl("Supplied point is null.");return Gh.interpolateZ(t,this.p0,this.p1,this.p2)},Gh.prototype.longestSideLength=function(){return Gh.longestSideLength(this.p0,this.p1,this.p2)},Gh.prototype.isAcute=function(){return Gh.isAcute(this.p0,this.p1,this.p2)},Gh.prototype.circumcentre=function(){return Gh.circumcentre(this.p0,this.p1,this.p2)},Gh.prototype.area3D=function(){return Gh.area3D(this.p0,this.p1,this.p2)},Gh.prototype.centroid=function(){return Gh.centroid(this.p0,this.p1,this.p2)},Gh.prototype.inCentre=function(){return Gh.inCentre(this.p0,this.p1,this.p2)},Gh.prototype.interfaces_=function(){return[]},Gh.prototype.getClass=function(){return Gh},Gh.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Gh.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Gh.det=function(t,e,n,r){return t*r-e*n},Gh.interpolateZ=function(t,e,n,r){var i=e.x,o=e.y,a=n.x-i,s=r.x-i,u=n.y-o,l=r.y-o,c=a*l-s*u,f=t.x-i,h=t.y-o,p=(l*f-s*h)/c,d=(-u*f+a*h)/c;return e.z+p*(n.z-e.z)+d*(r.z-e.z)},Gh.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),a=r;return i>a&&(a=i),o>a&&(a=o),a},Gh.isAcute=function(t,e,n){return!!Mh.isAcute(t,e,n)&&!!Mh.isAcute(e,n,t)&&!!Mh.isAcute(n,t,e)},Gh.circumcentre=function(t,e,n){var r=n.x,i=n.y,o=t.x-r,a=t.y-i,s=e.x-r,u=e.y-i,l=2*Gh.det(o,a,s,u),c=Gh.det(a,o*o+a*a,u,s*s+u*u),f=Gh.det(o,o*o+a*a,s,s*s+u*u);return new ll(r-c/l,i+f/l)},Gh.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new kl(t.x+n/2,t.y+r/2,1),o=new kl(t.x-r+n/2,t.y+n+r/2,1);return new kl(i,o)},Gh.angleBisector=function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,a=n.y-t.y;return new ll(t.x+i*o,t.y+i*a)},Gh.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,a=n.x-t.x,s=n.y-t.y,u=n.z-t.z,l=i*u-o*s,c=o*a-r*u,f=r*s-i*a,h=l*l+c*c+f*f;return Math.sqrt(h)/2},Gh.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new ll(r,i)},Gh.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),a=r+i+o,s=(r*t.x+i*e.x+o*n.x)/a,u=(r*t.y+i*e.y+o*n.y)/a;return new ll(s,u)};var Vh=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new cc;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Vh.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,pl.EXTERIOR,pl.INTERIOR)},Vh.prototype.addPolygon=function(t){var e=this,n=this._distance,r=Cf.LEFT;this._distance<0&&(n=-this._distance,r=Cf.RIGHT);var i=t.getExteriorRing(),o=pc.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,n,r,pl.EXTERIOR,pl.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var s=t.getInteriorRingN(a),u=pc.removeRepeatedPoints(s.getCoordinates());e._distance>0&&e.isErodedCompletely(s,-e._distance)||e.addPolygonRing(u,n,Cf.opposite(r),pl.INTERIOR,pl.EXTERIOR)}},Vh.prototype.isTriangleErodedCompletely=function(t,e){var n=new Gh(t[0],t[1],t[2]),r=n.inCentre();return Wl.distancePointLine(r,n.p0,n.p1)<Math.abs(e)},Vh.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=pc.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,pl.EXTERIOR,pl.INTERIOR)},Vh.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var r=new vh(t,new Df(0,pl.BOUNDARY,e,n));this._curveList.add(r)},Vh.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Vh.prototype.addPolygonRing=function(t,e,n,r,i){if(0===e&&t.length<rf.MINIMUM_VALID_SIZE)return null;var o=r,a=i;t.length>=rf.MINIMUM_VALID_SIZE&&Wl.isCCW(t)&&(o=i,a=r,n=Cf.opposite(n));var s=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(s,o,a)},Vh.prototype.add=function(t){if(t.isEmpty())return null;t instanceof ef?this.addPolygon(t):t instanceof $c?this.addLineString(t):t instanceof Qc?this.addPoint(t):(t instanceof nf||t instanceof Bc||t instanceof of||t instanceof Fc)&&this.addCollection(t)},Vh.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},Vh.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},Vh.prototype.interfaces_=function(){return[]},Vh.prototype.getClass=function(){return Vh};var qh=function(){};qh.prototype.locate=function(t){},qh.prototype.interfaces_=function(){return[]},qh.prototype.getClass=function(){return qh};var Hh=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Hh.prototype.next=function(){if(this._atStart)return this._atStart=!1,Hh.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new lc;var t=this._parent.getGeometryN(this._index++);return t instanceof Fc?(this._subcollectionIterator=new Hh(t),this._subcollectionIterator.next()):t},Hh.prototype.remove=function(){throw new Error(this.getClass().getName())},Hh.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Hh.prototype.interfaces_=function(){return[sc]},Hh.prototype.getClass=function(){return Hh},Hh.isAtomic=function(t){return!(t instanceof Fc)};var Wh=function(){this._geom=null;var t=arguments[0];this._geom=t};Wh.prototype.locate=function(t){return Wh.locate(t,this._geom)},Wh.prototype.interfaces_=function(){return[qh]},Wh.prototype.getClass=function(){return Wh},Wh.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&Wl.isPointInRing(t,e.getCoordinates())},Wh.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Wh.isPointInRing(t,n))return!1;for(var r=0;r<e.getNumInteriorRing();r++){var i=e.getInteriorRingN(r);if(Wh.isPointInRing(t,i))return!1}return!0},Wh.containsPoint=function(t,e){if(e instanceof ef)return Wh.containsPointInPolygon(t,e);if(e instanceof Fc)for(var n=new Hh(e);n.hasNext();){var r=n.next();if(r!==e&&Wh.containsPoint(t,r))return!0}return!1},Wh.locate=function(t,e){return e.isEmpty()?pl.EXTERIOR:Wh.containsPoint(t,e)?pl.INTERIOR:pl.EXTERIOR};var Xh=function(){this._edgeMap=new Cc,this._edgeList=null,this._ptInAreaLocation=[pl.NONE,pl.NONE]};Xh.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Xh.prototype.propagateSideLabels=function(t){for(var e=pl.NONE,n=this.iterator();n.hasNext();){var r=n.next().getLabel();r.isArea(t)&&r.getLocation(t,Cf.LEFT)!==pl.NONE&&(e=r.getLocation(t,Cf.LEFT))}if(e===pl.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getLabel();if(s.getLocation(t,Cf.ON)===pl.NONE&&s.setLocation(t,Cf.ON,i),s.isArea(t)){var u=s.getLocation(t,Cf.LEFT),l=s.getLocation(t,Cf.RIGHT);if(l!==pl.NONE){if(l!==i)throw new jf("side location conflict",a.getCoordinate());u===pl.NONE&&zl.shouldNeverReachHere("found single null side (at "+a.getCoordinate()+")"),i=u}else zl.isTrue(s.getLocation(t,Cf.LEFT)===pl.NONE,"found single null side"),s.setLocation(t,Cf.RIGHT,i),s.setLocation(t,Cf.LEFT,i)}}},Xh.prototype.getCoordinate=function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},Xh.prototype.print=function(t){Tl.out.println("EdgeEndStar:   "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)},Xh.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Xh.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,r=e.get(n).getLabel().getLocation(t,Cf.LEFT);zl.isTrue(r!==pl.NONE,"Found unlabelled area edge");for(var i=r,o=this.iterator();o.hasNext();){var a=o.next().getLabel();zl.isTrue(a.isArea(t),"Found non-area edge");var s=a.getLocation(t,Cf.LEFT),u=a.getLocation(t,Cf.RIGHT);if(s===u)return!1;if(u!==i)return!1;i=s}return!0},Xh.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1},Xh.prototype.iterator=function(){return this.getEdges().iterator()},Xh.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new cc(this._edgeMap.values())),this._edgeList},Xh.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===pl.NONE&&(this._ptInAreaLocation[t]=Wh.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Xh.prototype.toString=function(){var t=new vl;t.append("EdgeEndStar:   "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()},Xh.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)},Xh.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var r=n.next().getLabel(),i=0;i<2;i++)r.isLine(i)&&r.getLocation(i)===pl.BOUNDARY&&(e[i]=!0);for(var o=this.iterator();o.hasNext();)for(var a=o.next(),s=a.getLabel(),u=0;u<2;u++)if(s.isAnyNull(u)){var l=pl.NONE;if(e[u])l=pl.EXTERIOR;else{var c=a.getCoordinate();l=this.getLocation(u,c,t)}s.setAllLocationsIfNull(u,l)}},Xh.prototype.getDegree=function(){return this._edgeMap.size()},Xh.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Xh.prototype.interfaces_=function(){return[]},Xh.prototype.getClass=function(){return Xh};var Yh=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){var t=this;this.getResultAreaEdges();for(var e=null,n=null,r=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var o=t._resultAreaEdgeList.get(i),a=o.getSym();if(o.getLabel().isArea())switch(null===e&&o.isInResult()&&(e=o),r){case t._SCANNING_FOR_INCOMING:if(!a.isInResult())continue;n=a,r=t._LINKING_TO_OUTGOING;break;case t._LINKING_TO_OUTGOING:if(!o.isInResult())continue;n.setNext(o),r=t._SCANNING_FOR_INCOMING}}if(r===this._LINKING_TO_OUTGOING){if(null===e)throw new jf("no outgoing dirEdge found",this.getCoordinate());zl.isTrue(e.isInResult(),"unable to link last incoming dirEdge"),n.setNext(e)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var r=t.get(e-1),i=n.getQuadrant(),o=r.getQuadrant();return qf.isNorthern(i)&&qf.isNorthern(o)?n:qf.isNorthern(i)||qf.isNorthern(o)?0!==n.getDy()?n:0!==r.getDy()?r:(zl.shouldNeverReachHere("found two horizontal edges incident on node"),null):r},e.prototype.print=function(t){Tl.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new cc;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)},e.prototype.computeDepths=function(){var t=this;if(1===arguments.length){var e=arguments[0],n=this.findIndex(e),r=e.getDepth(Cf.LEFT),i=e.getDepth(Cf.RIGHT),o=this.computeDepths(n+1,this._edgeList.size(),r);if(this.computeDepths(0,n,o)!==i)throw new jf("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){for(var a=arguments[1],s=arguments[2],u=arguments[0];u<a;u++){var l=t._edgeList.get(u);l.setEdgeDepths(Cf.RIGHT,s),s=l.getDepth(Cf.LEFT)}return s}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=this,n=null,r=null,i=this._SCANNING_FOR_INCOMING,o=this._resultAreaEdgeList.size()-1;o>=0;o--){var a=e._resultAreaEdgeList.get(o),s=a.getSym();switch(null===n&&a.getEdgeRing()===t&&(n=a),i){case e._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;r=s,i=e._LINKING_TO_OUTGOING;break;case e._LINKING_TO_OUTGOING:if(a.getEdgeRing()!==t)continue;r.setNextMin(a),i=e._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(zl.isTrue(null!==n,"found null for first outgoing dirEdge"),zl.isTrue(n.getEdgeRing()===t,"unable to link last incoming dirEdge"),r.setNextMin(n))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=pl.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=pl.INTERIOR;break}if(r.isInResult()){t=pl.EXTERIOR;break}}}if(t===pl.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===pl.INTERIOR):(a.isInResult()&&(i=pl.EXTERIOR),s.isInResult()&&(i=pl.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Df(pl.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==pl.INTERIOR&&o!==pl.BOUNDARY||this._label.setLocation(i,pl.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xh),Zh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Gf(t,new Yh)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Yf),Kh=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Kh.prototype.compareTo=function(t){var e=t;return Kh.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Kh.prototype.interfaces_=function(){return[ol]},Kh.prototype.getClass=function(){return Kh},Kh.orientation=function(t){return 1===pc.increasingDirection(t)},Kh.compareOriented=function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,a=e?t.length:-1,s=r?n.length:-1,u=e?0:t.length-1,l=r?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var f=(u+=i)===a,h=(l+=o)===s;if(f&&!h)return-1;if(!f&&h)return 1;if(f&&h)return 0}};var $h=function(){this._edges=new cc,this._ocaMap=new Cc};$h.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i<r.length;i++)i>0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(")  ")},$h.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},$h.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},$h.prototype.iterator=function(){return this._edges.iterator()},$h.prototype.getEdges=function(){return this._edges},$h.prototype.get=function(t){return this._edges.get(t)},$h.prototype.findEqualEdge=function(t){var e=new Kh(t.getCoordinates());return this._ocaMap.get(e)},$h.prototype.add=function(t){this._edges.add(t);var e=new Kh(t.getCoordinates());this._ocaMap.put(e,t)},$h.prototype.interfaces_=function(){return[]},$h.prototype.getClass=function(){return $h};var Jh=function(){};Jh.prototype.processIntersections=function(t,e,n,r){},Jh.prototype.isDone=function(){},Jh.prototype.interfaces_=function(){return[]},Jh.prototype.getClass=function(){return Jh};var Qh=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Qh.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(Qh.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.size()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},Qh.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Qh.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Qh.prototype.getLineIntersector=function(){return this._li},Qh.prototype.hasProperIntersection=function(){return this._hasProper},Qh.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Qh.prototype.hasIntersection=function(){return this._hasIntersection},Qh.prototype.isDone=function(){return!1},Qh.prototype.hasInteriorIntersection=function(){return this._hasInterior},Qh.prototype.interfaces_=function(){return[Jh]},Qh.prototype.getClass=function(){return Qh},Qh.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var tp=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new ll(t),this.segmentIndex=e,this.dist=n};tp.prototype.getSegmentIndex=function(){return this.segmentIndex},tp.prototype.getCoordinate=function(){return this.coord},tp.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},tp.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},tp.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},tp.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},tp.prototype.getDistance=function(){return this.dist},tp.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},tp.prototype.interfaces_=function(){return[ol]},tp.prototype.getClass=function(){return tp};var ep=function(){this._nodeMap=new Cc,this.edge=null;var t=arguments[0];this.edge=t};ep.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},ep.prototype.iterator=function(){return this._nodeMap.values().iterator()},ep.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},ep.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},ep.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this.edge.pts[e.segmentIndex],i=e.dist>0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new ll(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=e.coord),new ap(o,new Df(this.edge._label))},ep.prototype.add=function(t,e,n){var r=new tp(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},ep.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},ep.prototype.interfaces_=function(){return[]},ep.prototype.getClass=function(){return ep};var np=function(){};np.prototype.getChainStartIndices=function(t){var e=0,n=new cc;n.add(new bl(e));do{var r=this.findChainEnd(t,e);n.add(new bl(r)),e=r}while(e<t.length-1);return np.toIntArray(n)},np.prototype.findChainEnd=function(t,e){for(var n=qf.quadrant(t[e],t[e+1]),r=e+1;r<t.length&&qf.quadrant(t[r-1],t[r])===n;)r++;return r-1},np.prototype.interfaces_=function(){return[]},np.prototype.getClass=function(){return np},np.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var rp=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Il,this.env2=new Il;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new np;this.startIndex=e.getChainStartIndices(this.pts)};rp.prototype.getCoordinates=function(){return this.pts},rp.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},rp.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},rp.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],r)}else if(6===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],u=arguments[4],l=arguments[5],c=this.pts[i],f=this.pts[o],h=a.pts[s],p=a.pts[u];if(o-i==1&&u-s==1)return l.addIntersections(this.e,i,a.e,s),null;if(this.env1.init(c,f),this.env2.init(h,p),!this.env1.intersects(this.env2))return null;var d=Math.trunc((i+o)/2),m=Math.trunc((s+u)/2);i<d&&(s<m&&this.computeIntersectsForChain(i,d,a,s,m,l),m<u&&this.computeIntersectsForChain(i,d,a,m,u,l)),d<o&&(s<m&&this.computeIntersectsForChain(d,o,a,s,m,l),m<u&&this.computeIntersectsForChain(d,o,a,m,u,l))}},rp.prototype.getStartIndexes=function(){return this.startIndex},rp.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var r=0;r<t.startIndex.length-1;r++)this.computeIntersectsForChain(n,t,r,e)},rp.prototype.interfaces_=function(){return[]},rp.prototype.getClass=function(){return rp};var ip=function t(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},op={NULL_VALUE:{configurable:!0}};ip.prototype.getDepth=function(t,e){return this._depth[t][e]},ip.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},ip.prototype.isNull=function(){var t=this;if(0===arguments.length){for(var e=0;e<2;e++)for(var n=0;n<3;n++)if(t._depth[e][n]!==ip.NULL_VALUE)return!1;return!0}if(1===arguments.length){var r=arguments[0];return this._depth[r][1]===ip.NULL_VALUE}if(2===arguments.length){var i=arguments[0],o=arguments[1];return this._depth[i][o]===ip.NULL_VALUE}},ip.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var n=t._depth[e][1];t._depth[e][2]<n&&(n=t._depth[e][2]),n<0&&(n=0);for(var r=1;r<3;r++){var i=0;t._depth[e][r]>n&&(i=1),t._depth[e][r]=i}}},ip.prototype.getDelta=function(t){return this._depth[t][Cf.RIGHT]-this._depth[t][Cf.LEFT]},ip.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?pl.EXTERIOR:pl.INTERIOR},ip.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ip.prototype.add=function(){var t=this;if(1===arguments.length)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);i!==pl.EXTERIOR&&i!==pl.INTERIOR||(t.isNull(n,r)?t._depth[n][r]=ip.depthAtLocation(i):t._depth[n][r]+=ip.depthAtLocation(i))}else if(3===arguments.length){var o=arguments[0],a=arguments[1];arguments[2]===pl.INTERIOR&&this._depth[o][a]++}},ip.prototype.interfaces_=function(){return[]},ip.prototype.getClass=function(){return ip},ip.depthAtLocation=function(t){return t===pl.EXTERIOR?0:t===pl.INTERIOR?1:ip.NULL_VALUE},op.NULL_VALUE.get=function(){return-1},Object.defineProperties(ip,op);var ap=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new ep(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ip,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Df.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,a=0;a<this.pts.length;a++)if(this.pts[a].equals2D(n.pts[a])||(r=!1),this.pts[a].equals2D(n.pts[--o])||(i=!1),!r&&!i)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(")  "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new rp(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new Il;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,r){var i=new ll(t.getIntersection(r)),o=e,a=t.getEdgeDistance(n,r),s=o+1;if(s<this.pts.length){var u=this.pts[s];i.equals2D(u)&&(o=s,a=0)}this.eiList.add(i,o,a)},e.prototype.toString=function(){var t=new vl;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(")  "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Cf.ON),e.getLocation(1,Cf.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Cf.LEFT),e.getLocation(1,Cf.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Cf.RIGHT),e.getLocation(1,Cf.RIGHT),2))},e}(Uf),sp=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new $h,this._bufParams=t||null};sp.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},sp.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Df(t.getLabel())).flip(),n.merge(r);var i=sp.depthDelta(r),o=e.getDepthDelta()+i;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(sp.depthDelta(t.getLabel()))},sp.prototype.buildSubgraphs=function(t,e){for(var n=new cc,r=t.iterator();r.hasNext();){var i=r.next(),o=i.getRightmostCoordinate(),a=new Bh(n).getDepth(o);i.computeDepth(a),i.findResultEdges(),n.add(i),e.add(i.getDirectedEdges(),i.getNodes())}},sp.prototype.createSubgraphs=function(t){for(var e=new cc,n=t.getNodes().iterator();n.hasNext();){var r=n.next();if(!r.isVisited()){var i=new Rf;i.create(r),e.add(i)}}return ih.sort(e,ih.reverseOrder()),e},sp.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},sp.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new Sh,n=new Vl;return n.setPrecisionModel(t),e.setSegmentIntersector(new Qh(n)),e},sp.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var r=new Fh(n,this._bufParams),i=new Vh(t,e,r).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new Zf(new Zh),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),a=new Kf(this._geomFact);this.buildSubgraphs(o,a);var s=a.getPolygons();return s.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(s)},sp.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var r=n.getNodedSubstrings().iterator();r.hasNext();){var i=r.next(),o=i.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var a=i.getData(),s=new ap(i.getCoordinates(),new Df(a));this.insertUniqueEdge(s)}}},sp.prototype.setNoder=function(t){this._workingNoder=t},sp.prototype.interfaces_=function(){return[]},sp.prototype.getClass=function(){return sp},sp.depthDelta=function(t){var e=t.getLocation(0,Cf.LEFT),n=t.getLocation(0,Cf.RIGHT);return e===pl.INTERIOR&&n===pl.EXTERIOR?1:e===pl.EXTERIOR&&n===pl.INTERIOR?-1:0},sp.convertSegStrings=function(t){for(var e=new _f,n=new cc;t.hasNext();){var r=t.next(),i=e.createLineString(r.getCoordinates());n.add(i)}return e.buildGeometry(n)};var up=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=r,this._offsetX=i,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};up.prototype.rescale=function(){var t=this;if(ml(arguments[0],oc))for(var e=arguments[0].iterator();e.hasNext();){var n=e.next();t.rescale(n.getCoordinates())}else if(arguments[0]instanceof Array){for(var r=arguments[0],i=0;i<r.length;i++)r[i].x=r[i].x/t._scaleFactor+t._offsetX,r[i].y=r[i].y/t._scaleFactor+t._offsetY;2===r.length&&r[0].equals2D(r[1])&&Tl.out.println(r)}},up.prototype.scale=function(){var t=this;if(ml(arguments[0],oc)){for(var e=arguments[0],n=new cc,r=e.iterator();r.hasNext();){var i=r.next();n.add(new vh(t.scale(i.getCoordinates()),i.getData()))}return n}if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),s=0;s<o.length;s++)a[s]=new ll(Math.round((o[s].x-t._offsetX)*t._scaleFactor),Math.round((o[s].y-t._offsetY)*t._scaleFactor),o[s].z);return pc.removeRepeatedPoints(a)}},up.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},up.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},up.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},up.prototype.interfaces_=function(){return[Eh]},up.prototype.getClass=function(){return up};var lp=function(){this._li=new Vl,this._segStrings=null;var t=arguments[0];this._segStrings=t},cp={fact:{configurable:!0}};lp.prototype.checkEndPtVertexIntersections=function(){var t=this;if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next().getCoordinates();t.checkEndPtVertexIntersections(n[0],t._segStrings),t.checkEndPtVertexIntersections(n[n.length-1],t._segStrings)}else if(2===arguments.length)for(var r=arguments[0],i=arguments[1].iterator();i.hasNext();)for(var o=i.next().getCoordinates(),a=1;a<o.length-1;a++)if(o[a].equals(r))throw new Fl("found endpt/interior pt intersection at index "+a+" :pt "+r)},lp.prototype.checkInteriorIntersections=function(){var t=this;if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();)for(var n=e.next(),r=this._segStrings.iterator();r.hasNext();){var i=r.next();t.checkInteriorIntersections(n,i)}else if(2===arguments.length)for(var o=arguments[0],a=arguments[1],s=o.getCoordinates(),u=a.getCoordinates(),l=0;l<s.length-1;l++)for(var c=0;c<u.length-1;c++)t.checkInteriorIntersections(o,l,a,c);else if(4===arguments.length){var f=arguments[0],h=arguments[1],p=arguments[2],d=arguments[3];if(f===p&&h===d)return null;var m=f.getCoordinates()[h],g=f.getCoordinates()[h+1],y=p.getCoordinates()[d],v=p.getCoordinates()[d+1];if(this._li.computeIntersection(m,g,y,v),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,m,g)||this.hasInteriorIntersection(this._li,y,v)))throw new Fl("found non-noded intersection at "+m+"-"+g+" and "+y+"-"+v)}},lp.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},lp.prototype.checkCollapses=function(){var t=this;if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next();t.checkCollapses(n)}else if(1===arguments.length)for(var r=arguments[0].getCoordinates(),i=0;i<r.length-2;i++)t.checkCollapse(r[i],r[i+1],r[i+2])},lp.prototype.hasInteriorIntersection=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++){var i=t.getIntersection(r);if(!i.equals(e)&&!i.equals(n))return!0}return!1},lp.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new Fl("found non-noded collapse at "+lp.fact.createLineString([t,e,n]))},lp.prototype.interfaces_=function(){return[]},lp.prototype.getClass=function(){return lp},cp.fact.get=function(){return new _f},Object.defineProperties(lp,cp);var fp=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new nl("Scale factor must be non-zero");1!==e&&(this._pt=new ll(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new ll,this._p1Scaled=new ll),this.initCorners(this._pt)},hp={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};fp.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<n||this._minx>r||this._maxy<i||this._miny>o;if(a)return!1;var s=this.intersectsToleranceSquare(t,e);return zl.isTrue(!(a&&s),"Found bad envelope test"),s},fp.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new ll(this._maxx,this._maxy),this._corner[1]=new ll(this._minx,this._maxy),this._corner[2]=new ll(this._minx,this._miny),this._corner[3]=new ll(this._maxx,this._miny)},fp.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},fp.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},fp.prototype.getCoordinate=function(){return this._originalPt},fp.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},fp.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=fp.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Il(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},fp.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},fp.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!r)||!!t.equals(this._pt)||!!e.equals(this._pt))))},fp.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},fp.prototype.interfaces_=function(){return[]},fp.prototype.getClass=function(){return fp},hp.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(fp,hp);var pp=function(){this.tempEnv1=new Il,this.selectedSegment=new bh};pp.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[1];arguments[0].getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},pp.prototype.interfaces_=function(){return[]},pp.prototype.getClass=function(){return pp};var dp=function(){this._index=null;var t=arguments[0];this._index=t},mp={HotPixelSnapAction:{configurable:!0}};dp.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),o=new gp(e,n,r);return this._index.query(i,{interfaces_:function(){return[th]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}},dp.prototype.interfaces_=function(){return[]},dp.prototype.getClass=function(){return dp},mp.HotPixelSnapAction.get=function(){return gp},Object.defineProperties(dp,mp);var gp=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[1],n=arguments[0].getContext();if(null!==this._parentEdge&&n===this._parentEdge&&e===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,e)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(pp),yp=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new cc};yp.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)}},yp.prototype.isDone=function(){return!1},yp.prototype.getInteriorIntersections=function(){return this._interiorIntersections},yp.prototype.interfaces_=function(){return[Jh]},yp.prototype.getClass=function(){return yp};var vp=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new Vl,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};vp.prototype.checkCorrectness=function(t){var e=vh.getNodedSubstrings(t),n=new lp(e);try{n.checkValid()}catch(t){if(!(t instanceof Pl))throw t;t.printStackTrace()}},vp.prototype.getNodedSubstrings=function(){return vh.getNodedSubstrings(this._nodedSegStrings)},vp.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},vp.prototype.findInteriorIntersections=function(t,e){var n=new yp(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},vp.prototype.computeVertexSnaps=function(){var t=this;if(ml(arguments[0],oc))for(var e=arguments[0].iterator();e.hasNext();){var n=e.next();t.computeVertexSnaps(n)}else if(arguments[0]instanceof vh)for(var r=arguments[0],i=r.getCoordinates(),o=0;o<i.length;o++){var a=new fp(i[o],t._scaleFactor,t._li);t._pointSnapper.snap(a,r,o)&&r.addIntersection(i[o],o)}},vp.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Sh,this._pointSnapper=new dp(this._noder.getIndex()),this.snapRound(t,this._li)},vp.prototype.computeIntersectionSnaps=function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next(),i=new fp(r,e._scaleFactor,e._li);e._pointSnapper.snap(i)}},vp.prototype.interfaces_=function(){return[Eh]},vp.prototype.getClass=function(){return vp};var bp=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Ch,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},_p={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};bp.prototype.bufferFixedPrecision=function(t){var e=new up(new vp(new gf(1)),t.getScale()),n=new sp(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},bp.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=bp.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof jf))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=bp.precisionScaleFactor(this._argGeom,this._distance,n),i=new gf(r);this.bufferFixedPrecision(i)}},bp.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===gf.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},bp.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},bp.prototype.bufferOriginalPrecision=function(){try{var t=new sp(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof Fl))throw t;this._saveException=t}},bp.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},bp.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},bp.prototype.interfaces_=function(){return[]},bp.prototype.getClass=function(){return bp},bp.bufferOp=function(){if(2===arguments.length){var t=arguments[1];return new bp(arguments[0]).getResultGeometry(t)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Zl&&"number"==typeof arguments[1]){var e=arguments[1],n=arguments[2],r=new bp(arguments[0]);return r.setQuadrantSegments(n),r.getResultGeometry(e)}if(arguments[2]instanceof Ch&&arguments[0]instanceof Zl&&"number"==typeof arguments[1]){var i=arguments[1];return new bp(arguments[0],arguments[2]).getResultGeometry(i)}}else if(4===arguments.length){var o=arguments[1],a=arguments[2],s=arguments[3],u=new bp(arguments[0]);return u.setQuadrantSegments(a),u.setEndCapStyle(s),u.getResultGeometry(o)}},bp.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=gl.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},_p.CAP_ROUND.get=function(){return Ch.CAP_ROUND},_p.CAP_BUTT.get=function(){return Ch.CAP_FLAT},_p.CAP_FLAT.get=function(){return Ch.CAP_FLAT},_p.CAP_SQUARE.get=function(){return Ch.CAP_SQUARE},_p.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(bp,_p);var Ap=function(){this._pt=[new ll,new ll],this._distance=rl.NaN,this._isNull=!0};Ap.prototype.getCoordinates=function(){return this._pt},Ap.prototype.getCoordinate=function(t){return this._pt[t]},Ap.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},Ap.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},Ap.prototype.getDistance=function(){return this._distance},Ap.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},Ap.prototype.interfaces_=function(){return[]},Ap.prototype.getClass=function(){return Ap};var wp=function(){};wp.prototype.interfaces_=function(){return[]},wp.prototype.getClass=function(){return wp},wp.computeDistance=function(){if(arguments[2]instanceof Ap&&arguments[0]instanceof $c&&arguments[1]instanceof ll)for(var t=arguments[1],e=arguments[2],n=arguments[0].getCoordinates(),r=new bh,i=0;i<n.length-1;i++){r.setCoordinates(n[i],n[i+1]);var o=r.closestPoint(t);e.setMinimum(o,t)}else if(arguments[2]instanceof Ap&&arguments[0]instanceof ef&&arguments[1]instanceof ll){var a=arguments[0],s=arguments[1],u=arguments[2];wp.computeDistance(a.getExteriorRing(),s,u);for(var l=0;l<a.getNumInteriorRing();l++)wp.computeDistance(a.getInteriorRingN(l),s,u)}else if(arguments[2]instanceof Ap&&arguments[0]instanceof Zl&&arguments[1]instanceof ll){var c=arguments[0],f=arguments[1],h=arguments[2];if(c instanceof $c)wp.computeDistance(c,f,h);else if(c instanceof ef)wp.computeDistance(c,f,h);else if(c instanceof Fc)for(var p=c,d=0;d<p.getNumGeometries();d++){var m=p.getGeometryN(d);wp.computeDistance(m,f,h)}else h.setMinimum(c.getCoordinate(),f)}else if(arguments[2]instanceof Ap&&arguments[0]instanceof bh&&arguments[1]instanceof ll){var g=arguments[1],y=arguments[2],v=arguments[0].closestPoint(g);y.setMinimum(v,g)}};var xp=function(t){this._maxPtDist=new Ap,this._inputGeom=t||null},Ep={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};xp.prototype.computeMaxMidpointDistance=function(t){var e=new Sp(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},xp.prototype.computeMaxVertexDistance=function(t){var e=new Op(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},xp.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},xp.prototype.getDistancePoints=function(){return this._maxPtDist},xp.prototype.interfaces_=function(){return[]},xp.prototype.getClass=function(){return xp},Ep.MaxPointDistanceFilter.get=function(){return Op},Ep.MaxMidpointDistanceFilter.get=function(){return Sp},Object.defineProperties(xp,Ep);var Op=function(t){this._maxPtDist=new Ap,this._minPtDist=new Ap,this._geom=t||null};Op.prototype.filter=function(t){this._minPtDist.initialize(),wp.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Op.prototype.getMaxPointDistance=function(){return this._maxPtDist},Op.prototype.interfaces_=function(){return[Jl]},Op.prototype.getClass=function(){return Op};var Sp=function(t){this._maxPtDist=new Ap,this._minPtDist=new Ap,this._geom=t||null};Sp.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=new ll((n.x+r.x)/2,(n.y+r.y)/2);this._minPtDist.initialize(),wp.computeDistance(this._geom,i,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Sp.prototype.isDone=function(){return!1},Sp.prototype.isGeometryChanged=function(){return!1},Sp.prototype.getMaxPointDistance=function(){return this._maxPtDist},Sp.prototype.interfaces_=function(){return[Dc]},Sp.prototype.getClass=function(){return Sp};var Pp=function(t){this._comps=t||null};Pp.prototype.filter=function(t){t instanceof ef&&this._comps.add(t)},Pp.prototype.interfaces_=function(){return[Nc]},Pp.prototype.getClass=function(){return Pp},Pp.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return Pp.getPolygons(t,new cc)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof ef?n.add(e):e instanceof Fc&&e.apply(new Pp(n)),n}};var Cp=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Cp.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof rf){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof $c&&this._lines.add(t)},Cp.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Cp.prototype.interfaces_=function(){return[Yl]},Cp.prototype.getClass=function(){return Cp},Cp.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Cp.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Cp.getLines(e,n))}},Cp.getLines=function(){if(1===arguments.length){var t=arguments[0];return Cp.getLines(t,!1)}if(2===arguments.length){if(ml(arguments[0],oc)&&ml(arguments[1],oc)){for(var e=arguments[1],n=arguments[0].iterator();n.hasNext();){var r=n.next();Cp.getLines(r,e)}return e}if(arguments[0]instanceof Zl&&"boolean"==typeof arguments[1]){var i=arguments[0],o=arguments[1],a=new cc;return i.apply(new Cp(a,o)),a}if(arguments[0]instanceof Zl&&ml(arguments[1],oc)){var s=arguments[0],u=arguments[1];return s instanceof $c?u.add(s):s.apply(new Cp(u)),u}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&ml(arguments[0],oc)&&ml(arguments[1],oc)){for(var l=arguments[1],c=arguments[2],f=arguments[0].iterator();f.hasNext();){var h=f.next();Cp.getLines(h,l,c)}return l}if("boolean"==typeof arguments[2]&&arguments[0]instanceof Zl&&ml(arguments[1],oc)){var p=arguments[1],d=arguments[2];return arguments[0].apply(new Cp(p,d)),p}}};var Tp=function(){if(this._boundaryRule=Ql.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new nl("Rule must be non-null");this._boundaryRule=t}};Tp.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof ll&&arguments[1]instanceof ef){var e=arguments[0],n=arguments[1];if(n.isEmpty())return pl.EXTERIOR;var r=n.getExteriorRing(),i=this.locateInPolygonRing(e,r);if(i===pl.EXTERIOR)return pl.EXTERIOR;if(i===pl.BOUNDARY)return pl.BOUNDARY;for(var o=0;o<n.getNumInteriorRing();o++){var a=n.getInteriorRingN(o),s=t.locateInPolygonRing(e,a);if(s===pl.INTERIOR)return pl.EXTERIOR;if(s===pl.BOUNDARY)return pl.BOUNDARY}return pl.INTERIOR}if(arguments[0]instanceof ll&&arguments[1]instanceof $c){var u=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(u))return pl.EXTERIOR;var c=l.getCoordinates();return l.isClosed()||!u.equals(c[0])&&!u.equals(c[c.length-1])?Wl.isOnLine(u,c)?pl.INTERIOR:pl.EXTERIOR:pl.BOUNDARY}if(arguments[0]instanceof ll&&arguments[1]instanceof Qc){var f=arguments[0];return arguments[1].getCoordinate().equals2D(f)?pl.INTERIOR:pl.EXTERIOR}},Tp.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?Wl.locatePointInRing(t,e.getCoordinates()):pl.EXTERIOR},Tp.prototype.intersects=function(t,e){return this.locate(t,e)!==pl.EXTERIOR},Tp.prototype.updateLocationInfo=function(t){t===pl.INTERIOR&&(this._isIn=!0),t===pl.BOUNDARY&&this._numBoundaries++},Tp.prototype.computeLocation=function(t,e){var n=this;if(e instanceof Qc&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof $c)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof ef)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Bc)for(var r=e,i=0;i<r.getNumGeometries();i++){var o=r.getGeometryN(i);n.updateLocationInfo(n.locateInternal(t,o))}else if(e instanceof of)for(var a=e,s=0;s<a.getNumGeometries();s++){var u=a.getGeometryN(s);n.updateLocationInfo(n.locateInternal(t,u))}else if(e instanceof Fc)for(var l=new Hh(e);l.hasNext();){var c=l.next();c!==e&&n.computeLocation(t,c)}},Tp.prototype.locate=function(t,e){return e.isEmpty()?pl.EXTERIOR:e instanceof $c||e instanceof ef?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?pl.BOUNDARY:this._numBoundaries>0||this._isIn?pl.INTERIOR:pl.EXTERIOR)},Tp.prototype.interfaces_=function(){return[]},Tp.prototype.getClass=function(){return Tp};var kp=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length)t.call(this,arguments[0],t.INSIDE_AREA,arguments[1]);else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];this._component=e,this._segIndex=n,this._pt=r}},Ip={INSIDE_AREA:{configurable:!0}};kp.prototype.isInsideArea=function(){return this._segIndex===kp.INSIDE_AREA},kp.prototype.getCoordinate=function(){return this._pt},kp.prototype.getGeometryComponent=function(){return this._component},kp.prototype.getSegmentIndex=function(){return this._segIndex},kp.prototype.interfaces_=function(){return[]},kp.prototype.getClass=function(){return kp},Ip.INSIDE_AREA.get=function(){return-1},Object.defineProperties(kp,Ip);var Lp=function(t){this._pts=t||null};Lp.prototype.filter=function(t){t instanceof Qc&&this._pts.add(t)},Lp.prototype.interfaces_=function(){return[Nc]},Lp.prototype.getClass=function(){return Lp},Lp.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Qc?ih.singletonList(t):Lp.getPoints(t,new cc)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Qc?n.add(e):e instanceof Fc&&e.apply(new Lp(n)),n}};var jp=function(){this._locations=null;var t=arguments[0];this._locations=t};jp.prototype.filter=function(t){(t instanceof Qc||t instanceof $c||t instanceof ef)&&this._locations.add(new kp(t,0,t.getCoordinate()))},jp.prototype.interfaces_=function(){return[Nc]},jp.prototype.getClass=function(){return jp},jp.getLocations=function(t){var e=new cc;return t.apply(new jp(e)),e};var Mp=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Tp,this._minDistanceLocation=null,this._minDistance=rl.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Mp.prototype.computeContainmentDistance=function(){var t=this;if(0===arguments.length){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=1-n,o=Pp.getPolygons(this._geom[n]);if(o.size()>0){var a=jp.getLocations(this._geom[i]);if(this.computeContainmentDistance(a,o,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&ml(arguments[0],uc)&&ml(arguments[1],uc)){for(var s=arguments[0],u=arguments[1],l=arguments[2],c=0;c<s.size();c++)for(var f=s.get(c),h=0;h<u.size();h++)if(t.computeContainmentDistance(f,u.get(h),l),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof kp&&arguments[1]instanceof ef){var p=arguments[0],d=arguments[1],m=arguments[2],g=p.getCoordinate();if(pl.EXTERIOR!==this._ptLocator.locate(g,d))return this._minDistance=0,m[0]=p,m[1]=new kp(d,g),null}},Mp.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var r=this,i=0;i<t.size();i++)for(var o=t.get(i),a=0;a<e.size();a++){var s=e.get(a);if(r.computeMinDistance(o,s,n),r._minDistance<=r._terminateDistance)return null}},Mp.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Cp.getLines(this._geom[0]),n=Cp.getLines(this._geom[1]),r=Lp.getPoints(this._geom[0]),i=Lp.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,i,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,r,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(r,i,t),void this.updateMinDistance(t,!1))))},Mp.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Mp.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Mp.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Mp.prototype.computeMinDistance=function(){var t=this;if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof $c&&arguments[1]instanceof Qc){var e=arguments[0],n=arguments[1],r=arguments[2];if(e.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var i=e.getCoordinates(),o=n.getCoordinate(),a=0;a<i.length-1;a++){var s=Wl.distancePointLine(o,i[a],i[a+1]);if(s<t._minDistance){t._minDistance=s;var u=new bh(i[a],i[a+1]).closestPoint(o);r[0]=new kp(e,a,u),r[1]=new kp(n,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof $c&&arguments[1]instanceof $c){var l=arguments[0],c=arguments[1],f=arguments[2];if(l.getEnvelopeInternal().distance(c.getEnvelopeInternal())>this._minDistance)return null;for(var h=l.getCoordinates(),p=c.getCoordinates(),d=0;d<h.length-1;d++)for(var m=0;m<p.length-1;m++){var g=Wl.distanceLineLine(h[d],h[d+1],p[m],p[m+1]);if(g<t._minDistance){t._minDistance=g;var y=new bh(h[d],h[d+1]),v=new bh(p[m],p[m+1]),b=y.closestPoints(v);f[0]=new kp(l,d,b[0]),f[1]=new kp(c,m,b[1])}if(t._minDistance<=t._terminateDistance)return null}}},Mp.prototype.computeMinDistancePoints=function(t,e,n){for(var r=this,i=0;i<t.size();i++)for(var o=t.get(i),a=0;a<e.size();a++){var s=e.get(a),u=o.getCoordinate().distance(s.getCoordinate());if(u<r._minDistance&&(r._minDistance=u,n[0]=new kp(o,0,o.getCoordinate()),n[1]=new kp(s,0,s.getCoordinate())),r._minDistance<=r._terminateDistance)return null}},Mp.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new nl("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Mp.prototype.computeMinDistanceLines=function(t,e,n){for(var r=this,i=0;i<t.size();i++)for(var o=t.get(i),a=0;a<e.size();a++){var s=e.get(a);if(r.computeMinDistance(o,s,n),r._minDistance<=r._terminateDistance)return null}},Mp.prototype.interfaces_=function(){return[]},Mp.prototype.getClass=function(){return Mp},Mp.distance=function(t,e){return new Mp(t,e).distance()},Mp.isWithinDistance=function(t,e,n){return new Mp(t,e,n).distance()<=n},Mp.nearestPoints=function(t,e){return new Mp(t,e).nearestPoints()};var Rp=function(){this._pt=[new ll,new ll],this._distance=rl.NaN,this._isNull=!0};Rp.prototype.getCoordinates=function(){return this._pt},Rp.prototype.getCoordinate=function(t){return this._pt[t]},Rp.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},Rp.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},Rp.prototype.toString=function(){return Dl.toLineString(this._pt[0],this._pt[1])},Rp.prototype.getDistance=function(){return this._distance},Rp.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},Rp.prototype.interfaces_=function(){return[]},Rp.prototype.getClass=function(){return Rp};var Np=function(){};Np.prototype.interfaces_=function(){return[]},Np.prototype.getClass=function(){return Np},Np.computeDistance=function(){if(arguments[2]instanceof Rp&&arguments[0]instanceof $c&&arguments[1]instanceof ll)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new bh,i=t.getCoordinates(),o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var a=r.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof Rp&&arguments[0]instanceof ef&&arguments[1]instanceof ll){var s=arguments[0],u=arguments[1],l=arguments[2];Np.computeDistance(s.getExteriorRing(),u,l);for(var c=0;c<s.getNumInteriorRing();c++)Np.computeDistance(s.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof Rp&&arguments[0]instanceof Zl&&arguments[1]instanceof ll){var f=arguments[0],h=arguments[1],p=arguments[2];if(f instanceof $c)Np.computeDistance(f,h,p);else if(f instanceof ef)Np.computeDistance(f,h,p);else if(f instanceof Fc)for(var d=f,m=0;m<d.getNumGeometries();m++){var g=d.getGeometryN(m);Np.computeDistance(g,h,p)}else p.setMinimum(f.getCoordinate(),h)}else if(arguments[2]instanceof Rp&&arguments[0]instanceof bh&&arguments[1]instanceof ll){var y=arguments[1],v=arguments[2],b=arguments[0].closestPoint(y);v.setMinimum(b,y)}};var Dp=function(){this._g0=null,this._g1=null,this._ptDist=new Rp,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Fp={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Dp.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Dp.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new nl("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Dp.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Dp.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Dp.prototype.computeOrientedDistance=function(t,e,n){var r=new Bp(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new zp(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}},Dp.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Dp.prototype.interfaces_=function(){return[]},Dp.prototype.getClass=function(){return Dp},Dp.distance=function(){if(2===arguments.length)return new Dp(arguments[0],arguments[1]).distance();if(3===arguments.length){var t=arguments[2],e=new Dp(arguments[0],arguments[1]);return e.setDensifyFraction(t),e.distance()}},Fp.MaxPointDistanceFilter.get=function(){return Bp},Fp.MaxDensifiedByFractionDistanceFilter.get=function(){return zp},Object.defineProperties(Dp,Fp);var Bp=function(){this._maxPtDist=new Rp,this._minPtDist=new Rp,this._euclideanDist=new Np,this._geom=null;var t=arguments[0];this._geom=t};Bp.prototype.filter=function(t){this._minPtDist.initialize(),Np.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Bp.prototype.getMaxPointDistance=function(){return this._maxPtDist},Bp.prototype.interfaces_=function(){return[Jl]},Bp.prototype.getClass=function(){return Bp};var zp=function(){this._maxPtDist=new Rp,this._minPtDist=new Rp,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};zp.prototype.filter=function(t,e){var n=this;if(0===e)return null;for(var r=t.getCoordinate(e-1),i=t.getCoordinate(e),o=(i.x-r.x)/this._numSubSegs,a=(i.y-r.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var u=r.x+s*o,l=r.y+s*a,c=new ll(u,l);n._minPtDist.initialize(),Np.computeDistance(n._geom,c,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},zp.prototype.isDone=function(){return!1},zp.prototype.isGeometryChanged=function(){return!1},zp.prototype.getMaxPointDistance=function(){return this._maxPtDist},zp.prototype.interfaces_=function(){return[Dc]},zp.prototype.getClass=function(){return zp};var Up=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Gp={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Up.prototype.checkMaximumDistance=function(t,e,n){var r=new Dp(e,t);if(r.setDensifyFraction(.25),this._maxDistanceFound=r.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Dl.toLineString(i[0],i[1])+")"}},Up.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Up.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Up.VERBOSE&&Tl.out.println("Min Dist= "+this._minDistanceFound+"  err= "+(1-this._minDistanceFound/this._bufDistance)+"  Max Dist= "+this._maxDistanceFound+"  err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Up.prototype.checkNegativeValid=function(){if(!(this._input instanceof ef||this._input instanceof of||this._input instanceof Fc))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Up.prototype.getErrorIndicator=function(){return this._errorIndicator},Up.prototype.checkMinimumDistance=function(t,e,n){var r=new Mp(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound<n){this._isValid=!1;var i=r.nearestPoints();this._errorLocation=r.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Dl.toLineString(i[0],i[1])+" )"}},Up.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Up.prototype.getErrorLocation=function(){return this._errorLocation},Up.prototype.getPolygonLines=function(t){for(var e=new cc,n=new Cp(e),r=Pp.getPolygons(t).iterator();r.hasNext();)r.next().apply(n);return t.getFactory().buildGeometry(e)},Up.prototype.getErrorMessage=function(){return this._errMsg},Up.prototype.interfaces_=function(){return[]},Up.prototype.getClass=function(){return Up},Gp.VERBOSE.get=function(){return!1},Gp.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Up,Gp);var Vp=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},qp={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Vp.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Vp.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Vp.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new Il(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new Il(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Vp.prototype.checkDistance=function(){var t=new Up(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Vp.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Vp.prototype.checkPolygonal=function(){this._result instanceof ef||this._result instanceof of||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Vp.prototype.getErrorIndicator=function(){return this._errorIndicator},Vp.prototype.getErrorLocation=function(){return this._errorLocation},Vp.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Vp.prototype.report=function(t){if(!Vp.VERBOSE)return null;Tl.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Vp.prototype.getErrorMessage=function(){return this._errorMsg},Vp.prototype.interfaces_=function(){return[]},Vp.prototype.getClass=function(){return Vp},Vp.isValidMsg=function(t,e,n){var r=new Vp(t,e,n);return r.isValid()?null:r.getErrorMessage()},Vp.isValid=function(t,e,n){return!!new Vp(t,e,n).isValid()},qp.VERBOSE.get=function(){return!1},qp.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Vp,qp);var Hp=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Hp.prototype.getCoordinates=function(){return this._pts},Hp.prototype.size=function(){return this._pts.length},Hp.prototype.getCoordinate=function(t){return this._pts[t]},Hp.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Hp.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:mh.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Hp.prototype.setData=function(t){this._data=t},Hp.prototype.getData=function(){return this._data},Hp.prototype.toString=function(){return Dl.toLineString(new ff(this._pts))},Hp.prototype.interfaces_=function(){return[gh]},Hp.prototype.getClass=function(){return Hp};var Wp=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new cc,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Wp.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Wp.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Wp.prototype.getIntersectionSegments=function(){return this._intSegments},Wp.prototype.count=function(){return this._intersectionCount},Wp.prototype.getIntersections=function(){return this._intersections},Wp.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Wp.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Wp.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,r))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=a,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Wp.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},Wp.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Wp.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Wp.prototype.interfaces_=function(){return[Jh]},Wp.prototype.getClass=function(){return Wp},Wp.createAllIntersectionsFinder=function(t){var e=new Wp(t);return e.setFindAllIntersections(!0),e},Wp.createAnyIntersectionFinder=function(t){return new Wp(t)},Wp.createIntersectionCounter=function(t){var e=new Wp(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Xp=function(){this._li=new Vl,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Xp.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Xp.prototype.getIntersections=function(){return this._segInt.getIntersections()},Xp.prototype.isValid=function(){return this.execute(),this._isValid},Xp.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Xp.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Wp(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Sh;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Xp.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new jf(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Xp.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Dl.toLineString(t[0],t[1])+" and "+Dl.toLineString(t[2],t[3])},Xp.prototype.interfaces_=function(){return[]},Xp.prototype.getClass=function(){return Xp},Xp.computeIntersections=function(t){var e=new Xp(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yp=function t(){this._nv=null;var e=arguments[0];this._nv=new Xp(t.toSegmentStrings(e))};Yp.prototype.checkValid=function(){this._nv.checkValid()},Yp.prototype.interfaces_=function(){return[]},Yp.prototype.getClass=function(){return Yp},Yp.toSegmentStrings=function(t){for(var e=new cc,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Hp(r.getCoordinates(),r))}return e},Yp.checkValid=function(t){new Yp(t).checkValid()};var Zp=function(t){this._mapOp=t};Zp.prototype.map=function(t){for(var e=new cc,n=0;n<t.getNumGeometries();n++){var r=this._mapOp.map(t.getGeometryN(n));r.isEmpty()||e.add(r)}return t.getFactory().createGeometryCollection(_f.toGeometryArray(e))},Zp.prototype.interfaces_=function(){return[]},Zp.prototype.getClass=function(){return Zp},Zp.map=function(t,e){return new Zp(e).map(t)};var Kp=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new cc,this._resultLineList=new cc;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Kp.prototype.collectLines=function(t){for(var e=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var r=n.next();e.collectLineEdge(r,t,e._lineEdgesList),e.collectBoundaryTouchEdge(r,t,e._lineEdgesList)}},Kp.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Kp.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Kp.prototype.collectLineEdge=function(t,e,n){var r=t.getLabel(),i=t.getEdge();t.isLineEdge()&&(t.isVisited()||!kd.isResultOfOp(r,e)||i.isCovered()||(n.add(i),t.setVisitedEdge(!0)))},Kp.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();)t.next().getEdges().findCoveredLineEdges();for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),r=n.getEdge();if(n.isLineEdge()&&!r.isCoveredSet()){var i=this._op.isCoveredByA(n.getCoordinate());r.setCovered(i)}}},Kp.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getLabel();n.isIsolated()&&(r.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},Kp.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),r=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(r),n.setInResult(!0)}},Kp.prototype.collectBoundaryTouchEdge=function(t,e,n){var r=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(zl.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(kd.isResultOfOp(r,e)&&e===kd.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},Kp.prototype.interfaces_=function(){return[]},Kp.prototype.getClass=function(){return Kp};var $p=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new cc;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};$p.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},$p.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===kd.INTERSECTION)){var r=n.getLabel();kd.isResultOfOp(r,t)&&this.filterCoveredNodeToPoint(n)}}},$p.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},$p.prototype.interfaces_=function(){return[]},$p.prototype.getClass=function(){return $p};var Jp=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Jp.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Jp.prototype.transformPolygon=function(t,e){var n=!0,r=this.transformLinearRing(t.getExteriorRing(),t);null!==r&&r instanceof rf&&!r.isEmpty()||(n=!1);for(var i=new cc,o=0;o<t.getNumInteriorRing();o++){var a=this.transformLinearRing(t.getInteriorRingN(o),t);null===a||a.isEmpty()||(a instanceof rf||(n=!1),i.add(a))}if(n)return this._factory.createPolygon(r,i.toArray([]));var s=new cc;return null!==r&&s.add(r),s.addAll(i),this._factory.buildGeometry(s)},Jp.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Jp.prototype.getInputGeometry=function(){return this._inputGeom},Jp.prototype.transformMultiLineString=function(t,e){for(var n=new cc,r=0;r<t.getNumGeometries();r++){var i=this.transformLineString(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Jp.prototype.transformCoordinates=function(t,e){return this.copy(t)},Jp.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Jp.prototype.transformMultiPoint=function(t,e){for(var n=new cc,r=0;r<t.getNumGeometries();r++){var i=this.transformPoint(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Jp.prototype.transformMultiPolygon=function(t,e){for(var n=new cc,r=0;r<t.getNumGeometries();r++){var i=this.transformPolygon(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Jp.prototype.copy=function(t){return t.copy()},Jp.prototype.transformGeometryCollection=function(t,e){for(var n=new cc,r=0;r<t.getNumGeometries();r++){var i=this.transform(t.getGeometryN(r));null!==i&&(this._pruneEmptyGeometry&&i.isEmpty()||n.add(i))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(_f.toGeometryArray(n)):this._factory.buildGeometry(n)},Jp.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Qc)return this.transformPoint(t,null);if(t instanceof nf)return this.transformMultiPoint(t,null);if(t instanceof rf)return this.transformLinearRing(t,null);if(t instanceof $c)return this.transformLineString(t,null);if(t instanceof Bc)return this.transformMultiLineString(t,null);if(t instanceof ef)return this.transformPolygon(t,null);if(t instanceof of)return this.transformMultiPolygon(t,null);if(t instanceof Fc)return this.transformGeometryCollection(t,null);throw new nl("Unknown Geometry subtype: "+t.getClass().getName())},Jp.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var r=n.size();return r>0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Jp.prototype.interfaces_=function(){return[]},Jp.prototype.getClass=function(){return Jp};var Qp=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new bh,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof $c&&"number"==typeof arguments[1]){var e=arguments[1];t.call(this,arguments[0].getCoordinates(),e)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this._srcPts=n,this._isClosed=t.isClosed(n),this._snapTolerance=r}};Qp.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r<n;r++){var i=t.get(r),o=this.findSnapForVertex(i,e);null!==o&&(t.set(r,new ll(o)),0===r&&this._isClosed&&t.set(t.size()-1,new ll(o)))}},Qp.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Qp.prototype.snapTo=function(t){var e=new hc(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},Qp.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var r=0;r<n;r++){var i=e[r],o=this.findSegmentIndexToSnap(i,t);o>=0&&t.add(o+1,new ll(i),!1)}},Qp.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,r=rl.MAX_VALUE,i=-1,o=0;o<e.size()-1;o++){if(n._seg.p0=e.get(o),n._seg.p1=e.get(o+1),n._seg.p0.equals2D(t)||n._seg.p1.equals2D(t)){if(n._allowSnappingToSourceVertices)continue;return-1}var a=n._seg.distance(t);a<n._snapTolerance&&a<r&&(r=a,i=o)}return i},Qp.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Qp.prototype.interfaces_=function(){return[]},Qp.prototype.getClass=function(){return Qp},Qp.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var td=function(t){this._srcGeom=t||null},ed={SNAP_PRECISION_FACTOR:{configurable:!0}};td.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new nd(e,n).transform(this._srcGeom)},td.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),r=new nd(t,n,!0).transform(this._srcGeom),i=r;return e&&ml(i,tf)&&(i=r.buffer(0)),i},td.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},td.prototype.extractTargetCoordinates=function(t){for(var e=new Ic,n=t.getCoordinates(),r=0;r<n.length;r++)e.add(n[r]);return e.toArray(new Array(0).fill(null))},td.prototype.computeMinimumSegmentLength=function(t){for(var e=rl.MAX_VALUE,n=0;n<t.length-1;n++){var r=t[n].distance(t[n+1]);r<e&&(e=r)}return e},td.prototype.interfaces_=function(){return[]},td.prototype.getClass=function(){return td},td.snap=function(t,e,n){var r=new Array(2).fill(null),i=new td(t);r[0]=i.snapTo(e,n);var o=new td(e);return r[1]=o.snapTo(r[0],n),r},td.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=td.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===gf.FIXED){var r=1/n.getScale()*2/1.415;r>e&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(td.computeOverlaySnapTolerance(i),td.computeOverlaySnapTolerance(o))}},td.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*td.SNAP_PRECISION_FACTOR},td.snapToSelf=function(t,e,n){return new td(t).snapToSelf(e,n)},ed.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(td,ed);var nd=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Qp(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Jp),rd=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};rd.prototype.getCommon=function(){return rl.longBitsToDouble(this._commonBits)},rd.prototype.add=function(t){var e=rl.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=rd.signExpBits(this._commonBits),this._isFirst=!1,null):rd.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=rd.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=rd.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},rd.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=rl.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+rl.toBinaryString(t),r=n.substring(n.length-64);return r.substring(0,1)+"  "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+e+" ]"}},rd.prototype.interfaces_=function(){return[]},rd.prototype.getClass=function(){return rd},rd.getBit=function(t,e){return 0!=(t&1<<e)?1:0},rd.signExpBits=function(t){return t>>52},rd.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},rd.numCommonMostSigMantissaBits=function(t,e){for(var n=0,r=52;r>=0;r--){if(rd.getBit(t,r)!==rd.getBit(e,r))return n;n++}return 52};var id=function(){this._commonCoord=null,this._ccFilter=new ad},od={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};id.prototype.addCommonBits=function(t){var e=new sd(this._commonCoord);t.apply(e),t.geometryChanged()},id.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new ll(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new sd(e);return t.apply(n),t.geometryChanged(),t},id.prototype.getCommonCoordinate=function(){return this._commonCoord},id.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},id.prototype.interfaces_=function(){return[]},id.prototype.getClass=function(){return id},od.CommonCoordinateFilter.get=function(){return ad},od.Translater.get=function(){return sd},Object.defineProperties(id,od);var ad=function(){this._commonBitsX=new rd,this._commonBitsY=new rd};ad.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},ad.prototype.getCommonCoordinate=function(){return new ll(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ad.prototype.interfaces_=function(){return[Jl]},ad.prototype.getClass=function(){return ad};var sd=function(){this.trans=null;var t=arguments[0];this.trans=t};sd.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},sd.prototype.isDone=function(){return!1},sd.prototype.isGeometryChanged=function(){return!0},sd.prototype.interfaces_=function(){return[Dc]},sd.prototype.getClass=function(){return sd};var ud=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ud.prototype.selfSnap=function(t){return new td(t).snapTo(t,this._snapTolerance)},ud.prototype.removeCommonBits=function(t){this._cbr=new id,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ud.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ud.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=kd.overlayOp(e[0],e[1],t);return this.prepareResult(n)},ud.prototype.checkValid=function(t){t.isValid()||Tl.out.println("Snapped geometry is invalid")},ud.prototype.computeSnapTolerance=function(){this._snapTolerance=td.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ud.prototype.snap=function(t){var e=this.removeCommonBits(t);return td.snap(e[0],e[1],this._snapTolerance)},ud.prototype.interfaces_=function(){return[]},ud.prototype.getClass=function(){return ud},ud.overlayOp=function(t,e,n){return new ud(t,e).getResultGeometry(n)},ud.union=function(t,e){return ud.overlayOp(t,e,kd.UNION)},ud.intersection=function(t,e){return ud.overlayOp(t,e,kd.INTERSECTION)},ud.symDifference=function(t,e){return ud.overlayOp(t,e,kd.SYMDIFFERENCE)},ud.difference=function(t,e){return ud.overlayOp(t,e,kd.DIFFERENCE)};var ld=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};ld.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=kd.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof Fl))throw t;r=t}if(!n)try{e=ud.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof Fl?r:t}return e},ld.prototype.interfaces_=function(){return[]},ld.prototype.getClass=function(){return ld},ld.overlayOp=function(t,e,n){return new ld(t,e).getResultGeometry(n)},ld.union=function(t,e){return ld.overlayOp(t,e,kd.UNION)},ld.intersection=function(t,e){return ld.overlayOp(t,e,kd.INTERSECTION)},ld.symDifference=function(t,e){return ld.overlayOp(t,e,kd.SYMDIFFERENCE)},ld.difference=function(t,e){return ld.overlayOp(t,e,kd.DIFFERENCE)};var cd=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};cd.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},cd.prototype.interfaces_=function(){return[]},cd.prototype.getClass=function(){return cd};var fd=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}},hd={INSERT:{configurable:!0},DELETE:{configurable:!0}};fd.prototype.isDelete=function(){return this._eventType===fd.DELETE},fd.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},fd.prototype.getObject=function(){return this._obj},fd.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},fd.prototype.getInsertEvent=function(){return this._insertEvent},fd.prototype.isInsert=function(){return this._eventType===fd.INSERT},fd.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},fd.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},fd.prototype.interfaces_=function(){return[ol]},fd.prototype.getClass=function(){return fd},hd.INSERT.get=function(){return 1},hd.DELETE.get=function(){return 2},Object.defineProperties(fd,hd);var pd=function(){};pd.prototype.interfaces_=function(){return[]},pd.prototype.getClass=function(){return pd};var dd=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};dd.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(dd.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},dd.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},dd.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},dd.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},dd.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},dd.prototype.hasProperIntersection=function(){return this._hasProper},dd.prototype.hasIntersection=function(){return this._hasIntersection},dd.prototype.isDone=function(){return this._isDone},dd.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},dd.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},dd.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},dd.prototype.interfaces_=function(){return[]},dd.prototype.getClass=function(){return dd},dd.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var md=function(t){function e(){t.call(this),this.events=new cc,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){ih.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){var t=this;if(1===arguments.length){var e=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var n=0;n<this.events.size();n++){var r=t.events.get(n);if(r.isInsert()&&t.processOverlaps(n,r.getDeleteEventIndex(),r,e),e.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof dd&&ml(arguments[0],uc)&&ml(arguments[1],uc)){var i=arguments[0],o=arguments[1],a=arguments[2];this.addEdges(i,i),this.addEdges(o,o),this.computeIntersections(a)}else if("boolean"==typeof arguments[2]&&ml(arguments[0],uc)&&arguments[1]instanceof dd){var s=arguments[0],u=arguments[1];arguments[2]?this.addEdges(s,null):this.addEdges(s),this.computeIntersections(u)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),r=n.getStartIndexes(),i=0;i<r.length-1;i++){var o=new cd(n,i),a=new fd(e,n.getMinX(i),o);this.events.add(a),this.events.add(new fd(n.getMaxX(i),a))}},e.prototype.processOverlaps=function(t,e,n,r){for(var i=n.getObject(),o=t;o<e;o++){var a=this.events.get(o);if(a.isInsert()){var s=a.getObject();n.isSameLabel(a)||(i.computeIntersections(s,r),this.nOverlaps++)}}},e.prototype.addEdges=function(){var t=this;if(1===arguments.length)for(var e=arguments[0].iterator();e.hasNext();){var n=e.next();t.addEdge(n,n)}else if(2===arguments.length)for(var r=arguments[1],i=arguments[0].iterator();i.hasNext();){var o=i.next();t.addEdge(o,r)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(pd),gd=function(){this._min=rl.POSITIVE_INFINITY,this._max=rl.NEGATIVE_INFINITY},yd={NodeComparator:{configurable:!0}};gd.prototype.getMin=function(){return this._min},gd.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},gd.prototype.getMax=function(){return this._max},gd.prototype.toString=function(){return Dl.toLineString(new ll(this._min,0),new ll(this._max,0))},gd.prototype.interfaces_=function(){return[]},gd.prototype.getClass=function(){return gd},yd.NodeComparator.get=function(){return vd},Object.defineProperties(gd,yd);var vd=function(){};vd.prototype.compare=function(t,e){var n=t,r=e,i=(n._min+n._max)/2,o=(r._min+r._max)/2;return i<o?-1:i>o?1:0},vd.prototype.interfaces_=function(){return[sl]},vd.prototype.getClass=function(){return vd};var bd=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(gd),_d=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(gd),Ad=function(){this._leaves=new cc,this._root=null,this._level=0};Ad.prototype.buildTree=function(){ih.sort(this._leaves,new gd.NodeComparator);for(var t=this._leaves,e=null,n=new cc;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},Ad.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new bd(t,e,n))},Ad.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},Ad.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},Ad.prototype.printNode=function(t){Tl.out.println(Dl.toLineString(new ll(t._min,this._level),new ll(t._max,this._level)))},Ad.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},Ad.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var r=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(r);else{var i=new _d(t.get(n),t.get(n+1));e.add(i)}}},Ad.prototype.interfaces_=function(){return[]},Ad.prototype.getClass=function(){return Ad};var wd=function(){this._items=new cc};wd.prototype.visitItem=function(t){this._items.add(t)},wd.prototype.getItems=function(){return this._items},wd.prototype.interfaces_=function(){return[th]},wd.prototype.getClass=function(){return wd};var xd=function(){this._index=null;var t=arguments[0];if(!ml(t,tf))throw new nl("Argument must be Polygonal");this._index=new Sd(t)},Ed={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};xd.prototype.locate=function(t){var e=new Hl(t),n=new Od(e);return this._index.query(t.y,t.y,n),e.getLocation()},xd.prototype.interfaces_=function(){return[qh]},xd.prototype.getClass=function(){return xd},Ed.SegmentVisitor.get=function(){return Od},Ed.IntervalIndexedGeometry.get=function(){return Sd},Object.defineProperties(xd,Ed);var Od=function(){this._counter=null;var t=arguments[0];this._counter=t};Od.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Od.prototype.interfaces_=function(){return[th]},Od.prototype.getClass=function(){return Od};var Sd=function(){this._index=new Ad;var t=arguments[0];this.init(t)};Sd.prototype.init=function(t){for(var e=Cp.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},Sd.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new bh(t[e-1],t[e]),r=Math.min(n.p0.y,n.p1.y),i=Math.max(n.p0.y,n.p1.y);this._index.insert(r,i,n)}},Sd.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new wd;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._index.query(r,i,o)}},Sd.prototype.interfaces_=function(){return[]},Sd.prototype.getClass=function(){return Sd};var Pd=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new mf,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Tp,2===arguments.length){var e=arguments[0],n=arguments[1],r=Ql.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=r,null!==n&&this.add(n)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=i,this._parentGeom=o,this._boundaryNodeRule=a,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var r=this._nodes.addNode(n).getLabel(),i=1;r.getLocation(t,Cf.ON)===pl.BOUNDARY&&i++;var o=e.determineBoundary(this._boundaryNodeRule,i);r.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[1],r=arguments[2],i=new dd(arguments[0],!0,!1);i.setIsDoneIfProperInt(r);var o=this.createEdgeSetIntersector(),a=this._parentGeom instanceof rf||this._parentGeom instanceof ef||this._parentGeom instanceof of,s=n||!a;return o.computeIntersections(this._edges,i,s),this.addSelfIntersectionNodes(this._argIndex),i}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();)e.next().eiList.addSplitEdges(t)},e.prototype.computeEdgeIntersections=function(t,e,n){var r=new dd(e,n,!0);return r.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,r),r},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Qc){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,pl.INTERIOR)}else if(arguments[0]instanceof ll){var e=arguments[0];this.insertPoint(this._argIndex,e,pl.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),pl.EXTERIOR,pl.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,pl.INTERIOR,pl.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],pl.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],pl.BOUNDARY)},e.prototype.addLineString=function(t){var e=pc.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new ap(e,new Df(this._argIndex,pl.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),zl.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===pl.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var r=pc.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;Wl.isCCW(r)&&(i=n,o=e);var a=new ap(r,new Df(this._argIndex,pl.BOUNDARY,i,o));this._lineEdgeMap.put(t,a),this.insertEdge(a),this.insertPoint(this._argIndex,r[0],pl.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new Df(t,n):i.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new md},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof of&&(this._useBoundaryDeterminationRule=!1),e instanceof ef)this.addPolygon(e);else if(e instanceof $c)this.addLineString(e);else if(e instanceof Qc)this.addPoint(e);else if(e instanceof nf)this.addCollection(e);else if(e instanceof Bc)this.addCollection(e);else if(e instanceof of)this.addCollection(e);else{if(!(e instanceof Fc))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return ml(this._parentGeom,tf)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new xd(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?pl.BOUNDARY:pl.INTERIOR},e}(Zf),Cd=function(){if(this._li=new Vl,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Pd(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=Ql.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Pd(0,e,r),this._arg[1]=new Pd(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Pd(0,i,a),this._arg[1]=new Pd(1,o,a)}};Cd.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Cd.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Cd.prototype.interfaces_=function(){return[]},Cd.prototype.getClass=function(){return Cd};var Td=function(){};Td.prototype.interfaces_=function(){return[]},Td.prototype.getClass=function(){return Td},Td.map=function(){if(arguments[0]instanceof Zl&&ml(arguments[1],Td.MapOp)){for(var t=arguments[0],e=arguments[1],n=new cc,r=0;r<t.getNumGeometries();r++){var i=e.map(t.getGeometryN(r));null!==i&&n.add(i)}return t.getFactory().buildGeometry(n)}if(ml(arguments[0],oc)&&ml(arguments[1],Td.MapOp)){for(var o=arguments[0],a=arguments[1],s=new cc,u=o.iterator();u.hasNext();){var l=u.next(),c=a.map(l);null!==c&&s.add(c)}return s}},Td.MapOp=function(){};var kd=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Tp,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new $h,this._resultPolyList=new cc,this._resultLineList=new cc,this._resultPointList=new cc,this._graph=new Zf(new Zh),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Df(t.getLabel())).flip();var i=e.getDepth();i.isNull()&&i.add(n),i.add(r),n.merge(r)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,r,i){var o=new cc;return o.addAll(t),o.addAll(n),o.addAll(r),o.isEmpty()?e.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().mergeSymLabels()},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(this._ptLocator.locate(t,r)!==pl.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new cc,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new cc;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Yp.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new Kf(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var r=new Kp(this,this._geomFact,this._ptLocator);this._resultLineList=r.build(t);var i=new $p(this,this._geomFact,this._ptLocator);this._resultPointList=i.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var r=n.next(),i=r.getLabel();i.isArea()&&!r.isInteriorAreaEdge()&&e.isResultOfOp(i.getLocation(0,Cf.RIGHT),i.getLocation(1,Cf.RIGHT),t)&&r.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),r=e.getDepth();if(!r.isNull()){r.normalize();for(var i=0;i<2;i++)n.isNull(i)||!n.isArea()||r.isNull(i)||(0===r.getDelta(i)?n.toLine(i):(zl.isTrue(!r.isNull(i,Cf.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(i,Cf.LEFT,r.getLocation(i,Cf.LEFT)),zl.isTrue(!r.isNull(i,Cf.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(i,Cf.RIGHT,r.getLocation(i,Cf.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Cd);kd.overlayOp=function(t,e,n){return new kd(t,e).getResultGeometry(n)},kd.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return kd.createEmptyResult(kd.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return Zp.map(t,{interfaces_:function(){return[Td.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ld.overlayOp(t,e,kd.INTERSECTION)},kd.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return kd.createEmptyResult(kd.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ld.overlayOp(t,e,kd.SYMDIFFERENCE)},kd.resultDimension=function(t,e,n){var r=e.getDimension(),i=n.getDimension(),o=-1;switch(t){case kd.INTERSECTION:o=Math.min(r,i);break;case kd.UNION:o=Math.max(r,i);break;case kd.DIFFERENCE:o=r;break;case kd.SYMDIFFERENCE:o=Math.max(r,i)}return o},kd.createEmptyResult=function(t,e,n,r){var i=null;switch(kd.resultDimension(t,e,n)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon()}return i},kd.difference=function(t,e){return t.isEmpty()?kd.createEmptyResult(kd.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ld.overlayOp(t,e,kd.DIFFERENCE))},kd.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),r=t.getLocation(1);return kd.isResultOfOp(n,r,e)}if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];switch(i===pl.BOUNDARY&&(i=pl.INTERIOR),o===pl.BOUNDARY&&(o=pl.INTERIOR),a){case kd.INTERSECTION:return i===pl.INTERIOR&&o===pl.INTERIOR;case kd.UNION:return i===pl.INTERIOR||o===pl.INTERIOR;case kd.DIFFERENCE:return i===pl.INTERIOR&&o!==pl.INTERIOR;case kd.SYMDIFFERENCE:return i===pl.INTERIOR&&o!==pl.INTERIOR||i!==pl.INTERIOR&&o===pl.INTERIOR}return!1}},kd.INTERSECTION=1,kd.UNION=2,kd.DIFFERENCE=3,kd.SYMDIFFERENCE=4;var Id=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Tp,this._seg=new bh;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Id.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,n=0;n<this._linework.getNumGeometries();n++)for(var r=e._linework.getGeometryN(n).getCoordinateSequence(),i=0;i<r.size()-1;i++)if(r.getCoordinate(i,e._seg.p0),r.getCoordinate(i+1,e._seg.p1),e._seg.distance(t)<=e._boundaryDistanceTolerance)return!0;return!1},Id.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?pl.BOUNDARY:this._ptLocator.locate(t,this._g)},Id.prototype.extractLinework=function(t){var e=new Ld;t.apply(e);var n=e.getLinework(),r=_f.toLineStringArray(n);return t.getFactory().createMultiLineString(r)},Id.prototype.interfaces_=function(){return[]},Id.prototype.getClass=function(){return Id};var Ld=function(){this._linework=null,this._linework=new cc};Ld.prototype.getLinework=function(){return this._linework},Ld.prototype.filter=function(t){if(t instanceof ef){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},Ld.prototype.interfaces_=function(){return[Nc]},Ld.prototype.getClass=function(){return Ld};var jd=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};jd.prototype.extractPoints=function(t,e,n){for(var r=t.getCoordinates(),i=0;i<r.length-1;i++)this.computeOffsetPoints(r[i],r[i+1],e,n)},jd.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},jd.prototype.getPoints=function(t){for(var e=new cc,n=Cp.getLines(this._g).iterator();n.hasNext();){var r=n.next();this.extractPoints(r,t,e)}return e},jd.prototype.computeOffsetPoints=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=Math.sqrt(i*i+o*o),s=n*i/a,u=n*o/a,l=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var f=new ll(l-u,c+s);r.add(f)}if(this._doRight){var h=new ll(l+u,c-s);r.add(h)}},jd.prototype.interfaces_=function(){return[]},jd.prototype.getClass=function(){return jd};var Md=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new cc;var e=arguments[0],n=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,r],this._locFinder=[new Id(this._geom[0],this._boundaryDistanceTolerance),new Id(this._geom[1],this._boundaryDistanceTolerance),new Id(this._geom[2],this._boundaryDistanceTolerance)]},Rd={TOLERANCE:{configurable:!0}};Md.prototype.reportResult=function(t,e,n){Tl.out.println("Overlay result invalid - A:"+pl.toLocationSymbol(e[0])+" B:"+pl.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+pl.toLocationSymbol(e[2]))},Md.prototype.isValid=function(t){return this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]),this.checkValid(t)},Md.prototype.checkValid=function(){var t=this;if(1===arguments.length){for(var e=arguments[0],n=0;n<this._testCoords.size();n++){var r=t._testCoords.get(n);if(!t.checkValid(e,r))return t._invalidLocation=r,!1}return!0}if(2===arguments.length){var i=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),!!Md.hasLocation(this._location,pl.BOUNDARY)||this.isValidResult(i,this._location)}},Md.prototype.addTestPts=function(t){var e=new jd(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Md.prototype.isValidResult=function(t,e){var n=kd.isResultOfOp(e[0],e[1],t),r=!(n^e[2]===pl.INTERIOR);return r||this.reportResult(t,e,n),r},Md.prototype.getInvalidLocation=function(){return this._invalidLocation},Md.prototype.interfaces_=function(){return[]},Md.prototype.getClass=function(){return Md},Md.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Md.computeBoundaryDistanceTolerance=function(t,e){return Math.min(td.computeSizeBasedSnapTolerance(t),td.computeSizeBasedSnapTolerance(e))},Md.isValid=function(t,e,n,r){return new Md(t,e,r).isValid(n)},Rd.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Md,Rd);var Nd=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Nd.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);this._skipEmpty&&r.isEmpty()||e.add(r)}},Nd.prototype.combine=function(){for(var t=new cc,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Nd.prototype.interfaces_=function(){return[]},Nd.prototype.getClass=function(){return Nd},Nd.combine=function(){if(1===arguments.length)return new Nd(arguments[0]).combine();if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Nd(Nd.createList(t,e)).combine()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];return new Nd(Nd.createList(n,r,i)).combine()}},Nd.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Nd.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new cc;return n.add(t),n.add(e),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=new cc;return a.add(r),a.add(i),a.add(o),a}};var Dd=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new cc)},Fd={STRTREE_NODE_CAPACITY:{configurable:!0}};Dd.prototype.reduceToGeometries=function(t){for(var e=new cc,n=t.iterator();n.hasNext();){var r=n.next(),i=null;ml(r,uc)?i=this.unionTree(r):r instanceof Zl&&(i=r),e.add(i)}return e},Dd.prototype.extractByEnvelope=function(t,e,n){for(var r=new cc,i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);o.getEnvelopeInternal().intersects(t)?r.add(o):n.add(o)}return this._geomFactory.buildGeometry(r)},Dd.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),r=e.getEnvelopeInternal();if(!n.intersects(r))return Nd.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var i=n.intersection(r);return this.unionUsingEnvelopeIntersection(t,e,i)},Dd.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new ch(Dd.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var r=t.itemsTree();return this.unionTree(r)},Dd.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];if(r-n<=1){var i=Dd.getGeometry(e,n);return this.unionSafe(i,null)}if(r-n==2)return this.unionSafe(Dd.getGeometry(e,n),Dd.getGeometry(e,n+1));var o=Math.trunc((r+n)/2),a=this.binaryUnion(e,n,o),s=this.binaryUnion(e,o,r);return this.unionSafe(a,s)}},Dd.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var r=n.next();e=null===e?r.copy():e.union(r)}return e},Dd.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Dd.prototype.unionActual=function(t,e){return Dd.restrictToPolygons(t.union(e))},Dd.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Dd.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var r=new cc,i=this.extractByEnvelope(n,t,r),o=this.extractByEnvelope(n,e,r),a=this.unionActual(i,o);return r.add(a),Nd.combine(r)},Dd.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},Dd.prototype.interfaces_=function(){return[]},Dd.prototype.getClass=function(){return Dd},Dd.restrictToPolygons=function(t){if(ml(t,tf))return t;var e=Pp.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(_f.toPolygonArray(e))},Dd.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Dd.union=function(t){return new Dd(t).union()},Fd.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Dd,Fd);var Bd=function(){};function zd(){return new Ud}function Ud(){this.reset()}Bd.prototype.interfaces_=function(){return[]},Bd.prototype.getClass=function(){return Bd},Bd.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return kd.createEmptyResult(kd.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ld.overlayOp(t,e,kd.UNION)},Ud.prototype={constructor:Ud,reset:function(){this.s=this.t=0},add:function(t){Vd(Gd,t,this.t),Vd(this,Gd.s,this.s),this.s?this.t+=Gd.t:this.s=Gd.t},valueOf:function(){return this.s}};var Gd=new Ud;function Vd(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var qd=1e-6,Hd=Math.PI,Wd=Hd/2,Xd=Hd/4,Yd=2*Hd,Zd=180/Hd,Kd=Hd/180,$d=Math.abs,Jd=Math.atan,Qd=Math.atan2,tm=Math.cos,em=Math.sin,nm=Math.sqrt;function rm(t){return t>1?0:t<-1?Hd:Math.acos(t)}function im(t){return t>1?Wd:t<-1?-Wd:Math.asin(t)}function om(){}function am(t,e){t&&cm.hasOwnProperty(t.type)&&cm[t.type](t,e)}var sm,um,lm={Feature:function(t,e){am(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)am(n[r].geometry,e)}},cm={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){fm(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)fm(n[r],e,0)},Polygon:function(t,e){hm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)hm(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)am(n[r],e)}};function fm(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function hm(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)fm(t[n],e,1);e.polygonEnd()}function pm(t){return[Qd(t[1],t[0]),im(t[2])]}function dm(t){var e=t[0],n=t[1],r=tm(n);return[r*tm(e),r*em(e),em(n)]}function mm(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function gm(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ym(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vm(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function bm(t){var e=nm(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function _m(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Am(t,e){return[t>Hd?t-Yd:t<-Hd?t+Yd:t,e]}function wm(t){return function(e,n){return[(e+=t)>Hd?e-Yd:e<-Hd?e+Yd:e,n]}}function xm(t){var e=wm(t);return e.invert=wm(-t),e}function Em(t,e){var n=tm(t),r=em(t),i=tm(e),o=em(e);function a(t,e){var a=tm(e),s=tm(t)*a,u=em(t)*a,l=em(e),c=l*n+s*r;return[Qd(u*i-c*o,s*n-l*r),im(c*i+u*o)]}return a.invert=function(t,e){var a=tm(e),s=tm(t)*a,u=em(t)*a,l=em(e),c=l*i-u*o;return[Qd(u*i+l*o,s*n+c*r),im(c*n-s*r)]},a}function Om(t,e){(e=dm(e))[0]-=t,bm(e);var n=rm(-e[1]);return((-e[2]<0?-n:n)+Yd-qd)%Yd}function Sm(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:om,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Pm(t,e){return $d(t[0]-e[0])<qd&&$d(t[1]-e[1])<qd}function Cm(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Tm(t,e,n,r,i){var o,a,s=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(Pm(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else s.push(n=new Cm(r,t,null,!0)),u.push(n.o=new Cm(r,null,n,!1)),s.push(n=new Cm(a,t,null,!1)),u.push(n.o=new Cm(a,null,n,!0))}})),s.length){for(u.sort(e),km(s),km(u),o=0,a=u.length;o<a;++o)u[o].e=n=!n;for(var l,c,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=l.length;o<a;++o)i.point((c=l[o])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((c=l[o])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function km(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function Im(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Lm(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n}zd(),zd(),zd(),Am.invert=Am,1===(sm=Im).length&&(um=sm,sm=function(t,e){return Im(um(t),e)});var jm=1e9,Mm=-jm;function Rm(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,l){var c=0,f=0;if(null==i||(c=a(i,s))!==(f=a(o,s))||u(i,o)<0^s>0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+s+4)%4)!==f);else l.point(o[0],o[1])}function a(r,i){return $d(r[0]-t)<qd?i>0?0:3:$d(r[0]-n)<qd?i>0?2:1:$d(r[1]-e)<qd?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var u,l,c,f,h,p,d,m,g,y,v,b=a,_=Sm(),A={point:w,lineStart:function(){A.point=x,l&&l.push(c=[]),y=!0,g=!1,d=m=NaN},lineEnd:function(){u&&(x(f,h),p&&g&&_.rejoin(),u.push(_.result())),A.point=w,g&&b.lineEnd()},polygonStart:function(){b=_,u=[],l=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var o,a,s=l[n],u=1,c=s.length,f=s[0],h=f[0],p=f[1];u<c;++u)o=h,a=p,h=(f=s[u])[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=v&&e,i=(u=Lm(u)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&Tm(u,s,e,o,a),a.polygonEnd()),b=a,u=l=c=null}};function w(t,e){i(t,e)&&b.point(t,e)}function x(o,a){var s=i(o,a);if(l&&c.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&g)b.point(o,a);else{var u=[d=Math.max(Mm,Math.min(jm,d)),m=Math.max(Mm,Math.min(jm,m))],_=[o=Math.max(Mm,Math.min(jm,o)),a=Math.max(Mm,Math.min(jm,a))];!function(t,e,n,r,i,o){var a,s=t[0],u=t[1],l=0,c=1,f=e[0]-s,h=e[1]-u;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<c&&(c=a)}else if(f>0){if(a>c)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<c&&(c=a)}if(a=r-u,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>l&&(l=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<c&&(c=a)}return l>0&&(t[0]=s+l*f,t[1]=u+l*h),c<1&&(e[0]=s+c*f,e[1]=u+c*h),!0}}}}}(u,_,t,e,n,r)?s&&(b.lineStart(),b.point(o,a),v=!1):(g||(b.lineStart(),b.point(u[0],u[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}d=o,m=a,g=s}return A}}var Nm=zd();function Dm(t){return t}zd(),zd(),zd();var Fm=1/0,Bm=Fm,zm=-Fm,Um=zm,Gm={point:function(t,e){t<Fm&&(Fm=t),t>zm&&(zm=t),e<Bm&&(Bm=e),e>Um&&(Um=e)},lineStart:om,lineEnd:om,polygonStart:om,polygonEnd:om,result:function(){var t=[[Fm,Bm],[zm,Um]];return zm=Um=-(Bm=Fm=1/0),t}};function Vm(t,e,n,r){return function(i,o){var a,s,u,l=e(o),c=i.invert(r[0],r[1]),f=Sm(),h=e(f),p=!1,d={point:m,lineStart:y,lineEnd:v,polygonStart:function(){d.point=b,d.lineStart=_,d.lineEnd=A,s=[],a=[]},polygonEnd:function(){d.point=m,d.lineStart=y,d.lineEnd=v,s=Lm(s);var t=function(t,e){var n=e[0],r=e[1],i=[em(n),-tm(n),0],o=0,a=0;Nm.reset();for(var s=0,u=t.length;s<u;++s)if(c=(l=t[s]).length)for(var l,c,f=l[c-1],h=f[0],p=f[1]/2+Xd,d=em(p),m=tm(p),g=0;g<c;++g,h=v,d=_,m=A,f=y){var y=l[g],v=y[0],b=y[1]/2+Xd,_=em(b),A=tm(b),w=v-h,x=w>=0?1:-1,E=x*w,O=E>Hd,S=d*_;if(Nm.add(Qd(S*x*em(E),m*A+S*tm(E))),o+=O?w+x*Yd:w,O^h>=n^v>=n){var P=gm(dm(f),dm(y));bm(P);var C=gm(i,P);bm(C);var T=(O^w>=0?-1:1)*im(C[2]);(r>T||r===T&&(P[0]||P[1]))&&(a+=O^w>=0?1:-1)}}return(o<-1e-6||o<qd&&Nm<-1e-6)^1&a}(a,c);s.length?(p||(o.polygonStart(),p=!0),Tm(s,Hm,t,n,o)):t&&(p||(o.polygonStart(),p=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),p&&(o.polygonEnd(),p=!1),s=a=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function m(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function g(t,e){var n=i(t,e);l.point(n[0],n[1])}function y(){d.point=g,l.lineStart()}function v(){d.point=m,l.lineEnd()}function b(t,e){u.push([t,e]);var n=i(t,e);h.point(n[0],n[1])}function _(){h.lineStart(),u=[]}function A(){b(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),l=f.result(),c=l.length;if(u.pop(),a.push(u),u=null,c)if(1&i){if((e=(n=l[0]).length-1)>0){for(p||(o.polygonStart(),p=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else c>1&&2&i&&l.push(l.pop().concat(l.shift())),s.push(l.filter(qm))}return d}}function qm(t){return t.length>1}function Hm(t,e){return((t=t.x)[0]<0?t[1]-Wd-qd:Wd-t[1])-((e=e.x)[0]<0?e[1]-Wd-qd:Wd-e[1])}zd();var Wm=Vm((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?Hd:-Hd,u=$d(o-n);$d(u-Hd)<qd?(t.point(n,r=(r+a)/2>0?Wd:-Wd),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=Hd&&($d(n-i)<qd&&(n-=i*qd),$d(o-s)<qd&&(o-=s*qd),r=function(t,e,n,r){var i,o,a=em(t-n);return $d(a)>qd?Jd((em(e)*(o=tm(r))*em(n)-em(r)*(i=tm(e))*em(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Wd,r.point(-Hd,i),r.point(0,i),r.point(Hd,i),r.point(Hd,0),r.point(Hd,-i),r.point(0,-i),r.point(-Hd,-i),r.point(-Hd,0),r.point(-Hd,i);else if($d(t[0]-e[0])>qd){var o=t[0]<e[0]?Hd:-Hd;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-Hd,-Wd]);function Xm(t,e){var n=tm(t),r=n>0,i=$d(n)>qd;function o(t,e){return tm(t)*tm(e)>n}function a(t,e,r){var i=[1,0,0],o=gm(dm(t),dm(e)),a=mm(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var l=n*a/u,c=-n*s/u,f=gm(i,o),h=vm(i,l);ym(h,vm(o,c));var p=f,d=mm(h,p),m=mm(p,p),g=d*d-m*(mm(h,h)-1);if(!(g<0)){var y=nm(g),v=vm(p,(-d-y)/m);if(ym(v,h),v=pm(v),!r)return v;var b,_=t[0],A=e[0],w=t[1],x=e[1];A<_&&(b=_,_=A,A=b);var E=A-_,O=$d(E-Hd)<qd;if(!O&&x<w&&(b=w,w=x,x=b),O||E<qd?O?w+x>0^v[1]<($d(v[0]-_)<qd?w:x):w<=v[1]&&v[1]<=x:E>Hd^(_<=v[0]&&v[0]<=A)){var S=vm(p,(-d+y)/m);return ym(S,h),[v,pm(S)]}}}function s(e,n){var i=r?t:Hd-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Vm(o,(function(t){var e,n,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var p,d=[f,h],m=o(f,h),g=r?m?0:s(f,h):m?s(f+(f<0?Hd:-Hd),h):0;if(!e&&(l=u=m)&&t.lineStart(),m!==u&&(!(p=a(e,d))||Pm(e,p)||Pm(d,p))&&(d[0]+=qd,d[1]+=qd,m=o(d[0],d[1])),m!==u)c=0,m?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^m){var y;g&n||!(y=a(d,e,!0))||(c=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!m||e&&Pm(e,d)||t.point(d[0],d[1]),e=d,u=m,n=g},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return c|(l&&u)<<1}}}),(function(n,r,i,o){!function(t,e,n,r,i,o){if(n){var a=tm(e),s=em(e),u=r*n;null==i?(i=e+r*Yd,o=e-u/2):(i=Om(a,i),o=Om(a,o),(r>0?i<o:i>o)&&(i+=r*Yd));for(var l,c=i;r>0?c>o:c<o;c-=u)l=pm([a,-s*tm(c),-s*em(c)]),t.point(l[0],l[1])}}(o,t,e,i,n,r)}),r?[0,-t]:[-Hd,t-Hd])}function Ym(t){return function(e){var n=new Zm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Zm(){}function Km(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),function(t,e){t&&lm.hasOwnProperty(t.type)?lm[t.type](t,e):am(t,e)}(n,t.stream(Gm));var a=Gm.result(),s=Math.min(r/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),u=+e[0][0]+(r-s*(a[1][0]+a[0][0]))/2,l=+e[0][1]+(i-s*(a[1][1]+a[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*s).translate([u,l])}Zm.prototype={constructor:Zm,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var $m=tm(30*Kd);function Jm(t,e){return+e?function(t,e){function n(r,i,o,a,s,u,l,c,f,h,p,d,m,g){var y=l-r,v=c-i,b=y*y+v*v;if(b>4*e&&m--){var _=a+h,A=s+p,w=u+d,x=nm(_*_+A*A+w*w),E=im(w/=x),O=$d($d(w)-1)<qd||$d(o-f)<qd?(o+f)/2:Qd(A,_),S=t(O,E),P=S[0],C=S[1],T=P-r,k=C-i,I=v*T-y*k;(I*I/b>e||$d((y*T+v*k)/b-.5)>.3||a*h+s*p+u*d<$m)&&(n(r,i,o,a,s,u,P,C,O,_/=x,A/=x,w,m,g),g.point(P,C),n(P,C,O,_,A,w,l,c,f,h,p,d,m,g))}}return function(e){var r,i,o,a,s,u,l,c,f,h,p,d,m={point:g,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),m.lineStart=_},polygonEnd:function(){e.polygonEnd(),m.lineStart=y}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){c=NaN,m.point=v,e.lineStart()}function v(r,i){var o=dm([r,i]),a=t(r,i);n(c,f,l,h,p,d,c=a[0],f=a[1],l=r,h=o[0],p=o[1],d=o[2],16,e),e.point(c,f)}function b(){m.point=g,e.lineEnd()}function _(){y(),m.point=A,m.lineEnd=w}function A(t,e){v(r=t,e),i=c,o=f,a=h,s=p,u=d,m.point=v}function w(){n(c,f,l,h,p,d,i,o,r,a,s,u,16,e),m.lineEnd=b,b()}return m}}(t,e):function(t){return Ym({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Qm=Ym({point:function(t,e){this.stream.point(t*Kd,e*Kd)}});function tg(t){return function(t){var e,n,r,i,o,a,s,u,l,c,f=150,h=480,p=250,d=0,m=0,g=0,y=0,v=0,b=null,_=Wm,A=null,w=Dm,x=.5,E=Jm(P,x);function O(t){return[(t=o(t[0]*Kd,t[1]*Kd))[0]*f+n,r-t[1]*f]}function S(t){return(t=o.invert((t[0]-n)/f,(r-t[1])/f))&&[t[0]*Zd,t[1]*Zd]}function P(t,i){return[(t=e(t,i))[0]*f+n,r-t[1]*f]}function C(){o=_m(i=function(t,e,n){return(t%=Yd)?e||n?_m(xm(t),Em(e,n)):xm(t):e||n?Em(e,n):Am}(g,y,v),e);var t=e(d,m);return n=h-t[0]*f,r=p+t[1]*f,T()}function T(){return l=c=null,O}return O.stream=function(t){return l&&c===t?l:l=Qm(_(i,E(w(c=t))))},O.clipAngle=function(t){return arguments.length?(_=+t?Xm(b=t*Kd,6*Kd):(b=null,Wm),T()):b*Zd},O.clipExtent=function(t){return arguments.length?(w=null==t?(A=a=s=u=null,Dm):Rm(A=+t[0][0],a=+t[0][1],s=+t[1][0],u=+t[1][1]),T()):null==A?null:[[A,a],[s,u]]},O.scale=function(t){return arguments.length?(f=+t,C()):f},O.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],C()):[h,p]},O.center=function(t){return arguments.length?(d=t[0]%360*Kd,m=t[1]%360*Kd,C()):[d*Zd,m*Zd]},O.rotate=function(t){return arguments.length?(g=t[0]%360*Kd,y=t[1]%360*Kd,v=t.length>2?t[2]%360*Kd:0,C()):[g*Zd,y*Zd,v*Zd]},O.precision=function(t){return arguments.length?(E=Jm(P,x=t*t),T()):nm(x)},O.fitExtent=function(t,e){return Km(O,t,e)},O.fitSize=function(t,e){return function(t,e,n){return Km(t,[[0,0],e],n)}(O,t,e)},function(){return e=t.apply(this,arguments),O.invert=e.invert&&S,C()}}((function(){return t}))()}var eg=function(t){return function(e,n){var r=tm(e),i=tm(n),o=t(r*i);return[o*i*em(e),o*em(n)]}}((function(t){return(t=rm(t))&&t/em(t)}));function ng(){return tg(eg).scale(79.4188).clipAngle(179.999)}function rg(t,e,r,i){var o=t.properties||{},s="Feature"===t.type?t.geometry:t;if("GeometryCollection"===s.type){var u=[];return z(t,(function(t){var n=rg(t,e,r,i);n&&u.push(n)})),d(u)}var l=function(t){var e=An(t).geometry.coordinates,r=[-e[0],-e[1]];return ng().rotate(r).scale(n)}(s),c={type:s.type,coordinates:og(s.coordinates,l)},f=(new Sf).read(c),h=_(A(e,r),"meters"),p=bp.bufferOp(f,h,i);if(!ig((p=(new Pf).write(p)).coordinates))return a({type:p.type,coordinates:ag(p.coordinates,l)},o)}function ig(t){return Array.isArray(t[0])?ig(t[0]):isNaN(t[0])}function og(t,e){return"object"!=typeof t[0]?e(t):t.map((function(t){return og(t,e)}))}function ag(t,e){return"object"!=typeof t[0]?e.invert(t):t.map((function(t){return ag(t,e)}))}function sg(t,e,n){void 0===n&&(n={});var r=it(t),i=it(e),o=tl.intersection(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?c(o[0],n.properties):y(o,n.properties)}function ug(t,e,n){void 0===n&&(n={});var r=JSON.stringify(n.properties||{}),i=t[0],o=t[1],a=t[2],s=t[3],u=(o+s)/2,l=(i+a)/2,c=2*e/_e([i,u],[a,u],n)*(a-i),f=2*e/_e([l,o],[l,s],n)*(s-o),h=c/2,p=2*h,m=Math.sqrt(3)/2*f,g=a-i,y=s-o,v=3/4*p,b=m,_=(g-p)/(p-h/2),A=Math.floor(_),w=(A*v-h/2-g)/2-h/2+v/2,x=Math.floor((y-m)/m),E=(y-x*m)/2,O=x*m-y>m/2;O&&(E-=m/4);for(var S=[],P=[],C=0;C<6;C++){var T=2*Math.PI/6*C;S.push(Math.cos(T)),P.push(Math.sin(T))}for(var k=[],I=0;I<=A;I++)for(var L=0;L<=x;L++){var j=I%2==1;if((0!==L||!j)&&(0!==L||!O)){var M=I*v+i-w,R=L*b+o+E;if(j&&(R-=m/2),!0===n.triangles)cg([M,R],c/2,f/2,JSON.parse(r),S,P).forEach((function(t){n.mask?sg(n.mask,t)&&k.push(t):k.push(t)}));else{var N=lg([M,R],c/2,f/2,JSON.parse(r),S,P);n.mask?sg(n.mask,N)&&k.push(N):k.push(N)}}}return d(k)}function lg(t,e,n,r,i,o){for(var a=[],s=0;s<6;s++){var u=t[0]+e*i[s],l=t[1]+n*o[s];a.push([u,l])}return a.push(a[0].slice()),c([a],r)}function cg(t,e,n,r,i,o){for(var a=[],s=0;s<6;s++){var u=[];u.push(t),u.push([t[0]+e*i[s],t[1]+n*o[s]]),u.push([t[0]+e*i[(s+1)%6],t[1]+n*o[(s+1)%6]]),u.push(t),a.push(c([u],r))}return a}function fg(t){return y(t)}function hg(t){return c(t&&t.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]])}function pg(t,e,n){return void 0===n&&(n={}),function(t,e,n,r){void 0===r&&(r={});for(var i=[],o=t[0],a=t[1],s=t[2],u=t[3],l=e/_e([o,a],[s,a],r)*(s-o),f=n/_e([o,a],[o,u],r)*(u-a),h=s-o,p=u-a,m=Math.floor(h/l),g=Math.floor(p/f),y=(p-g*f)/2,v=o+(h-m*l)/2,b=0;b<m;b++){for(var _=a+y,A=0;A<g;A++){var w=c([[[v,_],[v,_+f],[v+l,_+f],[v+l,_],[v,_]]],r.properties);r.mask?Ta(r.mask,w)&&i.push(w):i.push(w),_+=f}v+=l}return d(i)}(t,e,e,n)}function dg(t,e,n){void 0===n&&(n={});for(var r=[],i=e/_e([t[0],t[1]],[t[2],t[1]],n)*(t[2]-t[0]),o=e/_e([t[0],t[1]],[t[0],t[3]],n)*(t[3]-t[1]),a=0,s=t[0];s<=t[2];){for(var u=0,l=t[1];l<=t[3];){var f=null,h=null;a%2==0&&u%2==0?(f=c([[[s,l],[s,l+o],[s+i,l],[s,l]]],n.properties),h=c([[[s,l+o],[s+i,l+o],[s+i,l],[s,l+o]]],n.properties)):a%2==0&&u%2==1?(f=c([[[s,l],[s+i,l+o],[s+i,l],[s,l]]],n.properties),h=c([[[s,l],[s,l+o],[s+i,l+o],[s,l]]],n.properties)):u%2==0&&a%2==1?(f=c([[[s,l],[s,l+o],[s+i,l+o],[s,l]]],n.properties),h=c([[[s,l],[s+i,l+o],[s+i,l],[s,l]]],n.properties)):u%2==1&&a%2==1&&(f=c([[[s,l],[s,l+o],[s+i,l],[s,l]]],n.properties),h=c([[[s,l+o],[s+i,l+o],[s+i,l],[s,l+o]]],n.properties)),n.mask?(sg(n.mask,f)&&r.push(f),sg(n.mask,h)&&r.push(h)):(r.push(f),r.push(h)),l+=o,u++}a++,s+=i}return d(r)}eg.invert=function(t){return function(e,n){var r=nm(e*e+n*n),i=t(r),o=em(i),a=tm(i);return[Qd(e*o,r*a),im(r&&n*o/r)]}}((function(t){return t})),e.along=function(t,e,n){void 0===n&&(n={});for(var r=it(t).coordinates,i=0,o=0;o<r.length&&!(e>=i&&o===r.length-1);o++){if(i>=e){var a=e-i;if(a){var s=_n(r[o],r[o-1])-180;return vn(r[o],a,s,n)}return u(r[o])}i+=_e(r[o],r[o+1],n)}return u(r[r.length-1])},e.angle=function(t,e,n,r){if(void 0===r&&(r={}),!T(r))throw new Error("options is invalid");if(!t)throw new Error("startPoint is required");if(!e)throw new Error("midPoint is required");if(!n)throw new Error("endPoint is required");var i=t,o=e,a=n,s=x(!0!==r.mercator?_n(i,o):Ui(i,o)),u=x(!0!==r.mercator?_n(a,o):Ui(a,o)),l=Math.abs(s-u);return!0===r.explementary?360-l:l},e.applyFilter=lu,e.area=Vr,e.areaFactors=o,e.bbox=$,e.bboxClip=function(t,e){var n=it(t),r=n.type,i="Feature"===t.type?t.properties:{},o=n.coordinates;switch(r){case"LineString":case"MultiLineString":var a=[];return"LineString"===r&&(o=[o]),o.forEach((function(t){!function(t,e,n){var r,i,o,a,s,u=t.length,l=ji(t[0],e),c=[];for(n||(n=[]),r=1;r<u;r++){for(a=t[r-1],i=o=ji(s=t[r],e);;){if(!(l|i)){c.push(a),i!==o?(c.push(s),r<u-1&&(n.push(c),c=[])):r===u-1&&c.push(s);break}if(l&i)break;l?l=ji(a=Li(a,s,l,e),e):i=ji(s=Li(a,s,i,e),e)}l=o}c.length&&n.push(c)}(t,e,a)})),1===a.length?h(a[0],i):m(a,i);case"Polygon":return c(Mi(o,e),i);case"MultiPolygon":return y(o.map((function(t){return Mi(t,e)})),i);default:throw new Error("geometry "+r+" not supported")}},e.bboxPolygon=mn,e.bearing=_n,e.bearingToAngle=x,e.bearingToAzimuth=x,e.bezier=dn,e.bezierSpline=dn,e.booleanClockwise=Xi,e.booleanContains=function(t,e){var n=it(t),r=it(e),i=n.type,o=r.type,a=n.coordinates,s=r.coordinates;switch(i){case"Point":if("Point"===o)return va(a,s);throw new Error("feature2 "+o+" geometry not supported");case"MultiPoint":switch(o){case"Point":return function(t,e){var n,r=!1;for(n=0;n<t.coordinates.length;n++)if(va(t.coordinates[n],e.coordinates)){r=!0;break}return r}(n,r);case"MultiPoint":return function(t,e){for(var n=0,r=e.coordinates;n<r.length;n++){for(var i=r[n],o=!1,a=0,s=t.coordinates;a<s.length;a++)if(va(i,s[a])){o=!0;break}if(!o)return!1}return!0}(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"Point":return Zr(r,n,{ignoreEndVertices:!0});case"LineString":return function(t,e){for(var n=!1,r=0,i=e.coordinates;r<i.length;r++){var o=i[r];if(Zr({type:"Point",coordinates:o},t,{ignoreEndVertices:!0})&&(n=!0),!Zr({type:"Point",coordinates:o},t,{ignoreEndVertices:!1}))return!1}return n}(n,r);case"MultiPoint":return function(t,e){for(var n=!1,r=0,i=e.coordinates;r<i.length;r++){var o=i[r];if(Zr(o,t,{ignoreEndVertices:!0})&&(n=!0),!Zr(o,t))return!1}return!!n}(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Point":return ye(r,n,{ignoreBoundary:!0});case"LineString":return function(t,e){var n=!1,r=0;if(!ya($(t),$(e)))return!1;for(;r<e.coordinates.length-1;r++)if(ye({type:"Point",coordinates:ba(e.coordinates[r],e.coordinates[r+1])},t,{ignoreBoundary:!0})){n=!0;break}return n}(n,r);case"Polygon":return function(t,e){if("Feature"===t.type&&null===t.geometry)return!1;if("Feature"===e.type&&null===e.geometry)return!1;if(!ya($(t),$(e)))return!1;for(var n=0,r=it(e).coordinates;n<r.length;n++)for(var i=0,o=r[n];i<o.length;i++)if(!ye(o[i],t))return!1;return!0}(n,r);case"MultiPoint":return function(t,e){for(var n=0,r=e.coordinates;n<r.length;n++)if(!ye(r[n],t,{ignoreBoundary:!0}))return!1;return!0}(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}},e.booleanCrosses=function(t,e){var n=it(t),r=it(e),i=n.type,o=r.type;switch(i){case"MultiPoint":switch(o){case"LineString":return _a(n,r);case"Polygon":return wa(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"MultiPoint":return _a(r,n);case"LineString":return function(t,e){if(Lr(t,e).features.length>0)for(var n=0;n<t.coordinates.length-1;n++)for(var r=0;r<e.coordinates.length-1;r++){var i=!0;if(0!==r&&r!==e.coordinates.length-2||(i=!1),xa(t.coordinates[n],t.coordinates[n+1],e.coordinates[r],i))return!0}return!1}(n,r);case"Polygon":return Aa(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"MultiPoint":return wa(r,n);case"LineString":return Aa(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}},e.booleanDisjoint=pa,e.booleanEqual=function(t,e){return it(t).type===it(e).type&&new Ca({precision:6}).compare(en(t),en(e))},e.booleanIntersects=Ta,e.booleanOverlap=function(t,e){var n=it(t),r=it(e),i=n.type,o=r.type;if("MultiPoint"===i&&"MultiPoint"!==o||("LineString"===i||"MultiLineString"===i)&&"LineString"!==o&&"MultiLineString"!==o||("Polygon"===i||"MultiPolygon"===i)&&"Polygon"!==o&&"MultiPolygon"!==o)throw new Error("features must be of the same type");if("Point"===i)throw new Error("Point geometry not supported");if(new Ca({precision:6}).compare(t,e))return!1;var a=0;switch(i){case"MultiPoint":for(var s=0;s<n.coordinates.length;s++)for(var u=0;u<r.coordinates.length;u++){var l=n.coordinates[s],c=r.coordinates[u];if(l[0]===c[0]&&l[1]===c[1])return!0}return!1;case"LineString":case"MultiLineString":q(t,(function(t){q(e,(function(e){Fi(t,e).features.length&&a++}))}));break;case"Polygon":case"MultiPolygon":q(t,(function(t){q(e,(function(e){Lr(t,e).features.length&&a++}))}))}return a>0},e.booleanParallel=function(t,e){if(!t)throw new Error("line1 is required");if(!e)throw new Error("line2 is required");if("LineString"!==qa(t,"line1"))throw new Error("line1 must be a LineString");if("LineString"!==qa(e,"line2"))throw new Error("line2 must be a LineString");for(var n=$n(en(t)).features,r=$n(en(e)).features,i=0;i<n.length;i++){var o=n[i].geometry.coordinates;if(!r[i])break;if(!Va(o,r[i].geometry.coordinates))return!1}return!0},e.booleanPointInPolygon=ye,e.booleanPointOnLine=Zr,e.booleanWithin=$r,e.buffer=function(t,e,n){var r=(n=n||{}).units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!=typeof n)throw new Error("options must be an object");if("number"!=typeof i)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var o=[];switch(t.type){case"GeometryCollection":return z(t,(function(t){var n=rg(t,e,r,i);n&&o.push(n)})),d(o);case"FeatureCollection":return D(t,(function(t){var n=rg(t,e,r,i);n&&D(n,(function(t){t&&o.push(t)}))})),d(o)}return rg(t,e,r,i)},e.center=An,e.centerMean=Ds,e.centerMedian=function(t,e){if(void 0===e&&(e={}),!T(e=e||{}))throw new Error("options is invalid");var n=e.counter||10;if(!C(n))throw new Error("counter must be a number");var r=e.weight,i=Ds(t,{weight:e.weight}),o=d([]);D(t,(function(t){var e;o.features.push(wn(t,{properties:{weight:null===(e=t.properties)||void 0===e?void 0:e[r]}}))}));var a={tolerance:e.tolerance,medianCandidates:[]};return Fs(i.geometry.coordinates,[0,0],o,a,n)},e.centerOfMass=function t(e,n){switch(void 0===n&&(n={}),ot(e)){case"Point":return u(J(e),n.properties);case"Polygon":var r=[];j(e,(function(t){r.push(t)}));var i,o,a,s,l,c,f,h,p=wn(e,{properties:n.properties}),d=p.geometry.coordinates,m=0,g=0,y=0,v=r.map((function(t){return[t[0]-d[0],t[1]-d[1]]}));for(i=0;i<r.length-1;i++)s=(o=v[i])[0],c=o[1],l=(a=v[i+1])[0],y+=h=s*(f=a[1])-l*c,m+=(s+l)*h,g+=(c+f)*h;if(0===y)return p;var b=1/(.5*y*6);return u([d[0]+b*m,d[1]+b*g],n.properties);default:var _=ge(e);return _?t(_,{properties:n.properties}):wn(e,{properties:n.properties})}},e.centroid=wn,e.circle=bn,e.cleanCoords=en,e.clone=Oe,e.clusterEach=au,e.clusterReduce=su,e.clusters=hu,e.clustersDbscan=function(t,e,n){void 0===n&&(n={}),!0!==n.mutate&&(t=Oe(t)),n.minPoints=n.minPoints||3;var r=new Ma.DBSCAN,i=r.run(B(t),S(e,n.units),n.minPoints,_e),o=-1;return i.forEach((function(e){o++,e.forEach((function(e){var n=t.features[e];n.properties||(n.properties={}),n.properties.cluster=o,n.properties.dbscan="core"}))})),r.noise.forEach((function(e){var n=t.features[e];n.properties||(n.properties={}),n.properties.cluster?n.properties.dbscan="edge":n.properties.dbscan="noise"})),t},e.clustersKmeans=function(t,e){void 0===e&&(e={});var n=t.features.length;e.numberOfClusters=e.numberOfClusters||Math.round(Math.sqrt(n/2)),e.numberOfClusters>n&&(e.numberOfClusters=n),!0!==e.mutate&&(t=Oe(t));var r=B(t),i=r.slice(0,e.numberOfClusters),o=Ga(r,e.numberOfClusters,i),a={};return o.centroids.forEach((function(t,e){a[e]=t})),D(t,(function(t,e){var n=o.idxs[e];t.properties.cluster=n,t.properties.centroid=a[n]})),t},e.collect=function(t,e,n,r){var i=St(6),o=e.features.map((function(t){var e;return{minX:t.geometry.coordinates[0],minY:t.geometry.coordinates[1],maxX:t.geometry.coordinates[0],maxY:t.geometry.coordinates[1],property:null===(e=t.properties)||void 0===e?void 0:e[n]}}));return i.load(o),t.features.forEach((function(t){t.properties||(t.properties={});var e=$(t),n=i.search({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}),o=[];n.forEach((function(e){ye([e.minX,e.minY],t)&&o.push(e.property)})),t.properties[r]=o})),t},e.collectionOf=rt,e.combine=function(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return D(t,(function(t){var n,r,i,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(r=e.MultiLineString.coordinates).push.apply(r,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(i=e.MultiPolygon.coordinates).push.apply(i,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties)}})),d(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){return a({type:t,coordinates:e[t].coordinates},{collectedProperties:e[t].properties})})))},e.concave=function(t,e){void 0===e&&(e={});var n=e.maxEdge||1/0,r=Ae(function(t){var e=[],n={};return D(t,(function(t){if(t.geometry){var r=t.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(n,r)||(e.push(t),n[r]=!0)}})),d(e)}(t));if(r.features=r.features.filter((function(t){var r=t.geometry.coordinates[0][0],i=t.geometry.coordinates[0][1],o=t.geometry.coordinates[0][2],a=_e(r,i,e),s=_e(i,o,e),u=_e(r,o,e);return a<=n&&s<=n&&u<=n})),r.features.length<1)return null;var i=tn(r);return 1===i.coordinates.length&&(i.coordinates=i.coordinates[0],i.type="Polygon"),a(i)},e.containsNumber=tt,e.convertArea=P,e.convertDistance=S,e.convertLength=S,e.convex=ge,e.coordAll=B,e.coordEach=j,e.coordReduce=M,e.createBins=uu,e.degrees2radians=O,e.degreesToRadians=O,e.destination=vn,e.difference=function(t,e){var n=it(t),r=it(e),i=t.properties||{},o=tl.difference(n.coordinates,r.coordinates);return 0===o.length?null:1===o.length?c(o[0],i):y(o,i)},e.dissolve=function(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=e.propertyName;rt(t,"Polygon","dissolve");var r=[];if(!e.propertyName)return ri(y(tl.union.apply(null,t.features.map((function(t){return t.geometry.coordinates})))));var i={};D(t,(function(t){Object.prototype.hasOwnProperty.call(i,t.properties[n])||(i[t.properties[n]]=[]),i[t.properties[n]].push(t)}));for(var o=Object.keys(i),a=0;a<o.length;a++){var s=y(tl.union.apply(null,i[o[a]].map((function(t){return t.geometry.coordinates}))));s.properties[n]=o[a],r.push(s)}return ri(d(r))},e.distance=_e,e.distanceToDegrees=w,e.distanceToRadians=A,e.distanceWeight=Vs,e.earthRadius=n,e.ellipse=Rs,e.envelope=gn,e.explode=xn,e.factors=r,e.feature=a,e.featureCollection=d,e.featureEach=D,e.featureOf=nt,e.featureReduce=F,e.filterProperties=fu,e.findPoint=Z,e.findSegment=Y,e.flatten=ri,e.flattenEach=G,e.flattenReduce=V,e.flip=function(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=e.mutate;if(!t)throw new Error("geojson is required");return!1!==n&&void 0!==n||(t=Oe(t)),j(t,(function(t){var e=t[0],n=t[1];t[0]=n,t[1]=e})),t},e.geojsonType=et,e.geomEach=z,e.geomReduce=U,e.geometry=s,e.geometryCollection=v,e.getCluster=ou,e.getCoord=J,e.getCoords=Q,e.getGeom=it,e.getType=ot,e.greatCircle=function(t,e,n){if("object"!=typeof(n=n||{}))throw new Error("options is invalid");var r=n.properties,i=n.npoints,o=n.offset;return t=J(t),e=J(e),r=r||{},i=i||100,o=o||10,new vi({x:t[0],y:t[1]},{x:e[0],y:e[1]},r).Arc(i,{offset:o}).json()},e.helpers=L,e.hexGrid=ug,e.inside=ye,e.interpolate=function(t,e,n){if("object"!=typeof(n=n||{}))throw new Error("options is invalid");var r=n.gridType,i=n.property,o=n.weight;if(!t)throw new Error("points is required");if(rt(t,"Point","input must contain Points"),!e)throw new Error("cellSize is required");if(void 0!==o&&"number"!=typeof o)throw new Error("weight must be a number");i=i||"elevation",r=r||"square",o=o||1;var a,s=$(t);switch(r){case"point":case"points":a=ei(s,e,n);break;case"square":case"squares":a=pg(s,e,n);break;case"hex":case"hexes":a=ug(s,e,n);break;case"triangle":case"triangles":a=dg(s,e,n);break;default:throw new Error("invalid gridType")}var u=[];return D(a,(function(e){var a=0,s=0;D(t,(function(t){var u,l=_e("point"===r?e:wn(e),t,n);if(void 0!==i&&(u=t.properties[i]),void 0===u&&(u=t.geometry.coordinates[2]),void 0===u)throw new Error("zValue is missing");0===l&&(a=u);var c=1/Math.pow(l,o);s+=c,a+=c*u}));var l=Oe(e);l.properties[i]=a/s,u.push(l)})),d(u)},e.intersect=sg,e.invariant=at,e.isNumber=C,e.isObject=T,e.isobands=function(t,e,n){if(!T(n=n||{}))throw new Error("options is invalid");var r=n.zProperty||"elevation",i=n.commonProperties||{},o=n.breaksProperties||[];if(rt(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks is not an Array");if(!T(i))throw new Error("commonProperties is not an Object");if(!Array.isArray(o))throw new Error("breaksProperties is not an Array");var a=$i(t,{zProperty:r,flip:!0}),s=function(t,e,n){for(var r=[],i=1;i<e.length;i++){var o=+e[i-1],a=+e[i],s=$o(Ko(to(t,o,a-o))),u={};u.groupedRings=s,u[n]=o+"-"+a,r.push(u)}return r}(a,e,r);return d((s=function(t,e,n){var r=$(n),i=r[2]-r[0],o=r[3]-r[1],a=r[0],s=r[1],u=e[0].length-1,l=e.length-1,c=i/u,f=o/l,h=function(t){t[0]=t[0]*c+a,t[1]=t[1]*f+s};return t.forEach((function(t){t.groupedRings.forEach((function(t){t.forEach((function(t){t.forEach(h)}))}))})),t}(s,a,t)).map((function(t,e){if(o[e]&&!T(o[e]))throw new Error("Each mappedProperty is required to be an Object");var n=ft({},i,o[e]);return n[r]=t[r],y(t.groupedRings,n)})))},e.isolines=function(t,e,n){if(!T(n=n||{}))throw new Error("options is invalid");var r=n.zProperty||"elevation",i=n.commonProperties||{},o=n.breaksProperties||[];if(rt(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks must be an Array");if(!T(i))throw new Error("commonProperties must be an Object");if(!Array.isArray(o))throw new Error("breaksProperties must be an Array");var a=bt(t,{zProperty:r,flip:!0});return d(function(t,e,n){var r=$(n),i=r[2]-r[0],o=r[3]-r[1],a=r[0],s=r[1],u=e[0].length-1,l=e.length-1,c=i/u,f=o/l,h=function(t){t[0]=t[0]*c+a,t[1]=t[1]*f+s};return t.forEach((function(t){j(t,h)})),t}(function(t,e,n,r,i){for(var o=[],a=1;a<e.length;a++){var s=+e[a],u=ft({},r,i[a]);u[n]=s;var l=m(dt(t,s),u);o.push(l)}return o}(a,e,r,i,o),a,t))},e.kinks=function(t){var e,n,r={type:"FeatureCollection",features:[]};if("LineString"===(n="Feature"===t.type?t.geometry:t).type)e=[n.coordinates];else if("MultiLineString"===n.type)e=n.coordinates;else if("MultiPolygon"===n.type)e=[].concat.apply([],n.coordinates);else{if("Polygon"!==n.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=n.coordinates}return e.forEach((function(t){e.forEach((function(e){for(var n=0;n<t.length-1;n++)for(var i=n;i<e.length-1;i++){if(t===e){if(1===Math.abs(n-i))continue;if(0===n&&i===t.length-2&&t[n][0]===t[t.length-1][0]&&t[n][1]===t[t.length-1][1])continue}var o=Br(t[n][0],t[n][1],t[n+1][0],t[n+1][1],e[i][0],e[i][1],e[i+1][0],e[i+1][1]);o&&r.features.push(u([o[0],o[1]]))}}))})),r},e.length=Xr,e.lengthToDegrees=w,e.lengthToRadians=A,e.lineArc=xi,e.lineChunk=function(t,e,n){if(!T(n=n||{}))throw new Error("options is invalid");var r=n.units,i=n.reverse;if(!t)throw new Error("geojson is required");if(e<=0)throw new Error("segmentLength must be greater than 0");var o=[];return G(t,(function(t){i&&(t.geometry.coordinates=t.geometry.coordinates.reverse()),function(t,e,n,r){var i=Xr(t,{units:n});if(i<=e)return r(t);var o=i/e;Number.isInteger(o)||(o=Math.floor(o)+1);for(var a=0;a<o;a++)r(Yr(t,e*a,e*(a+1),{units:n}),a)}(t,e,r,(function(t){o.push(t)}))})),d(o)},e.lineDistance=Xr,e.lineEach=W,e.lineIntersect=Lr,e.lineOffset=function(t,e,n){if(!T(n=n||{}))throw new Error("options is invalid");var r=n.units;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");var i=ot(t),o=t.properties;switch(i){case"LineString":return aa(t,e,r);case"MultiLineString":var a=[];return G(t,(function(t){a.push(aa(t,e,r).geometry.coordinates)})),m(a,o);default:throw new Error("geometry "+i+" is not supported")}},e.lineOverlap=Fi,e.lineReduce=X,e.lineSegment=$n,e.lineSlice=function(t,e,n){var r=Q(n);if("LineString"!==ot(n))throw new Error("line must be a LineString");for(var i,o=Mr(n,t),a=Mr(n,e),s=[(i=o.properties.index<=a.properties.index?[o,a]:[a,o])[0].geometry.coordinates],u=i[0].properties.index+1;u<i[1].properties.index+1;u++)s.push(r[u]);return s.push(i[1].geometry.coordinates),h(s,n.properties)},e.lineSliceAlong=Yr,e.lineSplit=function(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var n=ot(t),r=ot(e);if("LineString"!==n)throw new Error("line must be LineString");if("FeatureCollection"===r)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===r)throw new Error("splitter cannot be a GeometryCollection");var i=ni(e,{precision:7});switch(r){case"Point":return _i(t,i);case"MultiPoint":return bi(t,i);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return bi(t,Lr(t,i))}},e.lineString=h,e.lineStringToPolygon=Ci,e.lineStrings=p,e.lineToPolygon=Ci,e.mask=function(t,e){var n,r=hg(e);return("FeatureCollection"===t.type?fg(2===(n=t).features.length?tl.union(n.features[0].geometry.coordinates,n.features[1].geometry.coordinates):tl.union.apply(tl,n.features.map((function(t){return t.geometry.coordinates})))):fg(tl.union(t.geometry.coordinates))).geometry.coordinates.forEach((function(t){r.geometry.coordinates.push(t[0])})),r},e.meta=K,e.midpoint=function(t,e){return vn(t,_e(t,e)/2,_n(t,e))},e.moranIndex=function(t,e){var n=e.inputField,r=e.threshold||1e5,i=e.p||2,o=e.binary||!1,a=Vs(t,{alpha:e.alpha||-1,binary:o,p:i,standardization:e.standardization||!0,threshold:r}),s=[];D(t,(function(t){var e=t.properties||{};s.push(e[n])}));for(var u=qs(s),l=function(t){for(var e=qs(t),n=0,r=0,i=t;r<i.length;r++){var o=i[r];n+=Math.pow(o-e,2)}return n/t.length}(s),c=0,f=0,h=0,p=0,d=a.length,m=0;m<d;m++){for(var g=0,y=0;y<d;y++)c+=a[m][y]*(s[m]-u)*(s[y]-u),f+=a[m][y],h+=Math.pow(a[m][y]+a[y][m],2),g+=a[m][y]+a[y][m];p+=Math.pow(g,2)}var v=c/f/l,b=-1/(d-1),_=(d*d*(h*=.5)-d*p+f*f*3)/((d-1)*(d+1)*(f*f))-b*b,A=Math.sqrt(_);return{expectedMoranIndex:b,moranIndex:v,stdNorm:A,zNorm:(v-b)/A}},e.multiLineString=m,e.multiPoint=g,e.multiPolygon=y,e.nearest=Kn,e.nearestPoint=Kn,e.nearestPointOnLine=Mr,e.nearestPointToLine=function(t,e,n){void 0===n&&(n={});var r=n.units,i=n.properties||{},o=function(t){var e=[];switch(t.geometry?t.geometry.type:t.type){case"GeometryCollection":return z(t,(function(t){"Point"===t.type&&e.push({type:"Feature",properties:{},geometry:t})})),{type:"FeatureCollection",features:e};case"FeatureCollection":return t.features=t.features.filter((function(t){return"Point"===t.geometry.type})),t;default:throw new Error("points must be a Point Collection")}}(t);if(!o.features.length)throw new Error("points must contain features");if(!e)throw new Error("line is required");if("LineString"!==ot(e))throw new Error("line must be a LineString");var a=1/0,s=null;return D(o,(function(t){var n=Nr(t,e,{units:r});n<a&&(a=n,s=t)})),s&&(s.properties=ft({dist:a},s.properties,i)),s},e.planepoint=function(t,e){var n=J(t),r=it(e).coordinates[0];if(r.length<4)throw new Error("OuterRing of a Polygon must have 4 or more Positions.");var i=e.properties||{},o=i.a,a=i.b,s=i.c,u=n[0],l=n[1],c=r[0][0],f=r[0][1],h=void 0!==o?o:r[0][2],p=r[1][0],d=r[1][1],m=void 0!==a?a:r[1][2],g=r[2][0],y=r[2][1],v=void 0!==s?s:r[2][2];return(v*(u-c)*(l-d)+h*(u-p)*(l-y)+m*(u-g)*(l-f)-m*(u-c)*(l-y)-v*(u-p)*(l-f)-h*(u-g)*(l-d))/((u-c)*(l-d)+(u-p)*(l-y)+(u-g)*(l-f)-(u-c)*(l-y)-(u-p)*(l-f)-(u-g)*(l-d))},e.point=u,e.pointGrid=ei,e.pointOnFeature=zr,e.pointOnLine=Mr,e.pointOnSurface=zr,e.pointToLineDistance=Nr,e.points=l,e.pointsWithinPolygon=be,e.polygon=c,e.polygonSmooth=function(t,e){var n=[],r=e.iterations||1;if(!t)throw new Error("inputPolys is required");return z(t,(function(t,e,i){var o,a,s;switch(t.type){case"Polygon":o=[[]];for(var u=0;u<r;u++)s=[[]],a=t,u>0&&(a=c(o).geometry),zs(a,s),o=s.slice(0);n.push(c(o,i));break;case"MultiPolygon":o=[[[]]];for(var l=0;l<r;l++)s=[[[]]],a=t,l>0&&(a=y(o).geometry),Us(a,s),o=s.slice(0);n.push(y(o,i));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}})),d(n)},e.polygonTangents=function(t,e){var n,r,i,o,a=Q(t),s=Q(e),l=$(e),c=0,f=null;switch(a[0]>l[0]&&a[0]<l[2]&&a[1]>l[1]&&a[1]<l[3]&&(c=(f=Kn(t,xn(e))).properties.featureIndex),ot(e)){case"Polygon":n=s[0][c],r=s[0][0],null!==f&&f.geometry.coordinates[1]<a[1]&&(r=s[0][c]),o=Wi(s[0][0],s[0][s[0].length-1],a);var h=qi(s[0],a,o,i,n,r);n=h[0],r=h[1];break;case"MultiPolygon":for(var p=0,m=0,g=0,y=0;y<s[0].length;y++){p=y;for(var v=!1,b=0;b<s[0][y].length;b++){if(m=b,g===c){v=!0;break}g++}if(v)break}n=s[0][p][m],r=s[0][p][m],o=Wi(s[0][0][0],s[0][0][s[0][0].length-1],a),s.forEach((function(t){var e=qi(t[0],a,o,i,n,r);n=e[0],r=e[1]}))}return d([u(n),u(r)])},e.polygonToLine=Oi,e.polygonToLineString=Oi,e.polygonize=function(t){var e=ha.fromGeoJson(t);e.deleteDangles(),e.deleteCutEdges();var n=[],r=[];return e.getEdgeRings().filter((function(t){return t.isValid()})).forEach((function(t){t.isHole()?n.push(t):r.push(t)})),n.forEach((function(t){fa.findEdgeRingContaining(t,r)&&r.push(t)})),d(r.map((function(t){return t.toPolygon()})))},e.polygons=f,e.projection=Ks,e.propEach=R,e.propReduce=N,e.propertiesContainsFilter=cu,e.radians2degrees=E,e.radiansToDegrees=E,e.radiansToDistance=_,e.radiansToLength=_,e.random=iu,e.randomLineString=eu,e.randomPoint=Qs,e.randomPolygon=tu,e.randomPosition=Js,e.rewind=function(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=e.reverse||!1,r=e.mutate||!1;if(!t)throw new Error("<geojson> is required");if("boolean"!=typeof n)throw new Error("<reverse> must be a boolean");if("boolean"!=typeof r)throw new Error("<mutate> must be a boolean");!1===r&&(t=Oe(t));var i=[];switch(t.type){case"GeometryCollection":return z(t,(function(t){Yi(t,n)})),t;case"FeatureCollection":return D(t,(function(t){D(Yi(t,n),(function(t){i.push(t)}))})),d(i)}return Yi(t,n)},e.rhumbBearing=Ui,e.rhumbDestination=Vi,e.rhumbDistance=Rr,e.round=b,e.sample=function(t,e){if(!t)throw new Error("featurecollection is required");if(null==e)throw new Error("num is required");if("number"!=typeof e)throw new Error("num must be a number");return d(function(t,e){for(var n,r,i=t.slice(0),o=t.length,a=o-e;o-- >a;)n=i[r=Math.floor((o+1)*Math.random())],i[r]=i[o],i[o]=n;return i.slice(a)}(t.features,e))},e.sector=function(t,e,n,r,i){if(!T(i=i||{}))throw new Error("options is invalid");var o=i.properties;if(!t)throw new Error("center is required");if(null==n)throw new Error("bearing1 is required");if(null==r)throw new Error("bearing2 is required");if(!e)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");if(zi(n)===zi(r))return bn(t,e,i);var a=Q(t),s=xi(t,e,n,r,i),u=[[a]];return j(s,(function(t){u[0].push(t)})),u[0].push(a),c(u,o)},e.segmentEach=q,e.segmentReduce=H,e.shortestPath=function(t,e,n){if(!T(n=n||{}))throw new Error("options is invalid");var r=n.resolution,i=n.minDistance,o=n.obstacles||d([]);if(!t)throw new Error("start is required");if(!e)throw new Error("end is required");if(r&&!C(r)||r<=0)throw new Error("options.resolution must be a number, greater than 0");if(i)throw new Error("options.minDistance is not yet implemented");var s=J(t),l=J(e);switch(t=u(s),e=u(l),ot(o)){case"FeatureCollection":if(0===o.features.length)return h([s,l]);break;case"Polygon":o=d([a(it(o))]);break;default:throw new Error("invalid obstacles")}var c=o;c.features.push(t),c.features.push(e);var f=$(ea(mn($(c)),1.15));r||(r=_e([f[0],f[1]],[f[2],f[1]],n)/100),c.features.pop(),c.features.pop();for(var p=f[0],m=f[1],g=f[2],y=f[3],v=r/_e([p,m],[g,m],n)*(g-p),b=r/_e([p,m],[p,y],n)*(y-m),_=g-p,A=y-m,w=Math.floor(_/v),x=Math.floor(A/b),E=(_-w*v)/2,O=[],S=[],P=[],k=[],I=1/0,L=1/0,j=y-(A-x*b)/2,M=0;j>=m;){for(var R=[],N=[],D=p+E,F=0;D<=g;){var B=u([D,j]),z=Ka(B,o);R.push(z?0:1),N.push(D+"|"+j);var U=_e(B,t);!z&&U<I&&(I=U,P={x:F,y:M});var G=_e(B,e);!z&&G<L&&(L=G,k={x:F,y:M}),D+=v,F++}S.push(R),O.push(N),j-=b,M++}var V=new Xa(S,{diagonal:!0}),q=V.grid[P.y][P.x],H=V.grid[k.y][k.x],W=Wa.search(V,q,H),X=[s];return W.forEach((function(t){var e=O[t.x][t.y].split("|");X.push([+e[0],+e[1]])})),X.push(l),en(h(X))},e.simplify=function(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,r=e.highQuality||!1,i=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==i&&(t=Oe(t)),z(t,(function(t){!function(t,e,n){var r=t.type;if("Point"===r||"MultiPoint"===r)return t;en(t,!0);var i=t.coordinates;switch(r){case"LineString":t.coordinates=cn(i,e,n);break;case"MultiLineString":t.coordinates=i.map((function(t){return cn(t,e,n)}));break;case"Polygon":t.coordinates=fn(i,e,n);break;case"MultiPolygon":t.coordinates=i.map((function(t){return fn(t,e,n)}))}}(t,n,r)})),t},e.square=yn,e.squareGrid=pg,e.standardDeviationalEllipse=function(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=e.steps||64,r=e.weight,i=e.properties||{};if(!C(n))throw new Error("steps must be a number");if(!T(i))throw new Error("properties must be a number");var o=B(t).length,a=Ds(t,{weight:r}),s=0,u=0,l=0;D(t,(function(t){var e=t.properties[r]||1,n=Bs(Q(t),Q(a));s+=Math.pow(n.x,2)*e,u+=Math.pow(n.y,2)*e,l+=n.x*n.y*e}));var c=s-u,f=Math.sqrt(Math.pow(c,2)+4*Math.pow(l,2)),h=2*l,p=Math.atan((c+f)/h),m=180*p/Math.PI,g=0,y=0,v=0;D(t,(function(t){var e=t.properties[r]||1,n=Bs(Q(t),Q(a));g+=Math.pow(n.x*Math.cos(p)-n.y*Math.sin(p),2)*e,y+=Math.pow(n.x*Math.sin(p)+n.y*Math.cos(p),2)*e,v+=e}));var b=Math.sqrt(2*g/v),_=Math.sqrt(2*y/v),A=Rs(a,b,_,{units:"degrees",angle:m,steps:n,properties:i}),w=be(t,d([A])),x={meanCenterCoordinates:Q(a),semiMajorAxis:b,semiMinorAxis:_,numberOfFeatures:o,angle:m,percentageWithinEllipse:100*B(w).length/o};return A.properties.standardDeviationalEllipse=x,A},e.tag=function(t,e,n,r){return t=Oe(t),e=Oe(e),D(t,(function(t){t.properties||(t.properties={}),D(e,(function(e){void 0===t.properties[r]&&ye(t,e)&&(t.properties[r]=e.properties[n])}))})),t},e.tesselate=function(t){if(!t.geometry||"Polygon"!==t.geometry.type&&"MultiPolygon"!==t.geometry.type)throw new Error("input must be a Polygon or MultiPolygon");var e={type:"FeatureCollection",features:[]};return"Polygon"===t.geometry.type?e.features=Zn(t.geometry.coordinates):t.geometry.coordinates.forEach((function(t){e.features=e.features.concat(Zn(t))})),e},e.tin=Ae,e.toMercator=Hs,e.toWgs84=Ws,e.transformRotate=ta,e.transformScale=ea,e.transformTranslate=function(t,e,n,r){if(!T(r=r||{}))throw new Error("options is invalid");var i=r.units,o=r.zTranslation,a=r.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");if(o&&"number"!=typeof o&&isNaN(o))throw new Error("zTranslation is not a number");if(o=void 0!==o?o:0,0===e&&0===o)return t;if(null==n||isNaN(n))throw new Error("direction is required");return e<0&&(e=-e,n+=180),!1!==a&&void 0!==a||(t=Oe(t)),j(t,(function(t){var r=Q(Vi(t,e,n,{units:i}));t[0]=r[0],t[1]=r[1],o&&3===t.length&&(t[2]+=o)})),t},e.triangleGrid=dg,e.truncate=ni,e.union=function(t,e,n){void 0===n&&(n={});var r=it(t),i=it(e),o=tl.union(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?c(o[0],n.properties):y(o,n.properties)},e.unitsFactors=i,e.unkinkPolygon=function(t){var e=[];return G(t,(function(t){"Polygon"===t.geometry.type&&D(ai(t),(function(n){e.push(c(n.geometry.coordinates,t.properties))}))})),d(e)},e.validateBBox=k,e.validateId=I,e.voronoi=function(t,e){if(!T(e=e||{}))throw new Error("options is invalid");var n=e.bbox||[-180,-85,180,85];if(!t)throw new Error("points is required");if(!Array.isArray(n))throw new Error("bbox is invalid");return rt(t,"Point","points"),d(function(){var t=Ja,e=Qa,n=null;function r(r){return new js(r.map((function(n,i){var o=[Math.round(t(n,i,r)/ks)*ks,Math.round(e(n,i,r)/ks)*ks];return o.index=i,o.data=n,o})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:$a(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:$a(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}().x((function(t){return t.geometry.coordinates[0]})).y((function(t){return t.geometry.coordinates[1]})).extent([[n[0],n[1]],[n[2],n[3]]]).polygons(t.features).map(Ms))},e.within=be,Object.defineProperty(e,"__esModule",{value:!0})}(e)}).call(this,n(68))},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(27);let i={};function o(t){i=t}function a(t,e,n,o){r.a.level>0&&i[t]&&i[t].call(null,e,n,o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return d})),n.d(e,"d",(function(){return j})),n.d(e,"c",(function(){return G})),n.d(e,"e",(function(){return F})),n.d(e,"f",(function(){return st}));const r=-1,i=0,o=1;var a=n(1),s=n(100);const u=new s.a,l=new s.a;class c{constructor(t=[0,0,0],e=[0,0,0],n){Object(a.a)(this,"center",void 0),Object(a.a)(this,"halfDiagonal",void 0),Object(a.a)(this,"minimum",void 0),Object(a.a)(this,"maximum",void 0),n=n||u.copy(t).add(e).scale(.5),this.center=new s.a(n),this.halfDiagonal=new s.a(e).subtract(this.center),this.minimum=new s.a(t),this.maximum=new s.a(e)}clone(){return new c(this.minimum,this.maximum,this.center)}equals(t){return this===t||Boolean(t)&&this.minimum.equals(t.minimum)&&this.maximum.equals(t.maximum)}transform(t){return this.center.transformAsPoint(t),this.halfDiagonal.transform(t),this.minimum.transform(t),this.maximum.transform(t),this}intersectPlane(t){const{halfDiagonal:e}=this,n=l.from(t.normal),a=e.x*Math.abs(n.x)+e.y*Math.abs(n.y)+e.z*Math.abs(n.z),s=this.center.dot(n)+t.distance;return s-a>0?o:s+a<0?r:i}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}distanceSquaredTo(t){const e=u.from(t).subtract(this.center),{halfDiagonal:n}=this;let r,i=0;return r=Math.abs(e.x)-n.x,r>0&&(i+=r*r),r=Math.abs(e.y)-n.y,r>0&&(i+=r*r),r=Math.abs(e.z)-n.z,r>0&&(i+=r*r),i}}var f=n(13);const h=new s.a,p=new s.a;class d{constructor(t=[0,0,0],e=0){Object(a.a)(this,"center",void 0),Object(a.a)(this,"radius",void 0),this.radius=-0,this.center=new s.a,this.fromCenterRadius(t,e)}fromCenterRadius(t,e){return this.center.from(t),this.radius=e,this}fromCornerPoints(t,e){return e=h.from(e),this.center=(new s.a).from(t).add(e).scale(.5),this.radius=this.center.distance(e),this}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.radius===t.radius}clone(){return new d(this.center,this.radius)}union(t){const e=this.center,n=this.radius,r=t.center,i=t.radius,o=h.copy(r).subtract(e),a=o.magnitude();if(n>=a+i)return this.clone();if(i>=a+n)return t.clone();const s=.5*(n+a+i);return p.copy(o).scale((-n+s)/a).add(e),this.center.copy(p),this.radius=s,this}expand(t){const e=h.from(t).subtract(this.center).magnitude();return e>this.radius&&(this.radius=e),this}transform(t){this.center.transform(t);const e=f.e(h,t);return this.radius=Math.max(e[0],Math.max(e[1],e[2]))*this.radius,this}distanceSquaredTo(t){const e=this.distanceTo(t);return e*e}distanceTo(t){const e=h.from(t).subtract(this.center);return Math.max(0,e.len()-this.radius)}intersectPlane(t){const e=this.center,n=this.radius,a=t.normal.dot(e)+t.distance;return a<-n?r:a<n?i:o}}var m=n(638),g=n(335);const y=new s.a,v=new s.a,b=new s.a,_=new s.a,A=new s.a,w=new s.a,x=new s.a,E=0,O=1,S=2,P=3,C=4,T=5,k=6,I=7,L=8;class j{constructor(t=[0,0,0],e=[0,0,0,0,0,0,0,0,0]){Object(a.a)(this,"center",void 0),Object(a.a)(this,"halfAxes",void 0),this.center=(new s.a).from(t),this.halfAxes=new m.a(e)}get halfSize(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2);return[new s.a(t).len(),new s.a(e).len(),new s.a(n).len()]}get quaternion(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2),r=new s.a(t).normalize(),i=new s.a(e).normalize(),o=new s.a(n).normalize();return(new g.a).fromMatrix3(new m.a([...r,...i,...o]))}fromCenterHalfSizeQuaternion(t,e,n){const r=new g.a(n),i=(new m.a).fromQuaternion(r);return i[0]=i[0]*e[0],i[1]=i[1]*e[0],i[2]=i[2]*e[0],i[3]=i[3]*e[1],i[4]=i[4]*e[1],i[5]=i[5]*e[1],i[6]=i[6]*e[2],i[7]=i[7]*e[2],i[8]=i[8]*e[2],this.center=(new s.a).from(t),this.halfAxes=i,this}clone(){return new j(this.center,this.halfAxes)}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.halfAxes.equals(t.halfAxes)}getBoundingSphere(t=new d){const e=this.halfAxes,n=e.getColumn(0,b),r=e.getColumn(1,_),i=e.getColumn(2,A),o=y.copy(n).add(r).add(i);return t.center.copy(this.center),t.radius=o.magnitude(),t}intersectPlane(t){const e=this.center,n=t.normal,a=this.halfAxes,s=n.x,u=n.y,l=n.z,c=Math.abs(s*a[E]+u*a[O]+l*a[S])+Math.abs(s*a[P]+u*a[C]+l*a[T])+Math.abs(s*a[k]+u*a[I]+l*a[L]),f=n.dot(e)+t.distance;return f<=-c?r:f>=c?o:i}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}distanceSquaredTo(t){const e=v.from(t).subtract(this.center),n=this.halfAxes,r=n.getColumn(0,b),i=n.getColumn(1,_),o=n.getColumn(2,A),a=r.magnitude(),s=i.magnitude(),u=o.magnitude();r.normalize(),i.normalize(),o.normalize();let l,c=0;return l=Math.abs(e.dot(r))-a,l>0&&(c+=l*l),l=Math.abs(e.dot(i))-s,l>0&&(c+=l*l),l=Math.abs(e.dot(o))-u,l>0&&(c+=l*l),c}computePlaneDistances(t,e,n=[-0,-0]){let r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,a=this.halfAxes,s=a.getColumn(0,b),u=a.getColumn(1,_),l=a.getColumn(2,A),c=w.copy(s).add(u).add(l).add(o),f=x.copy(c).subtract(t);let h=e.dot(f);return r=Math.min(h,r),i=Math.max(h,i),c.copy(o).add(s).add(u).subtract(l),f.copy(c).subtract(t),h=e.dot(f),r=Math.min(h,r),i=Math.max(h,i),c.copy(o).add(s).subtract(u).add(l),f.copy(c).subtract(t),h=e.dot(f),r=Math.min(h,r),i=Math.max(h,i),c.copy(o).add(s).subtract(u).subtract(l),f.copy(c).subtract(t),h=e.dot(f),r=Math.min(h,r),i=Math.max(h,i),o.copy(c).subtract(s).add(u).add(l),f.copy(c).subtract(t),h=e.dot(f),r=Math.min(h,r),i=Math.max(h,i),o.copy(c).subtract(s).add(u).subtract(l),f.copy(c).subtract(t),h=e.dot(f),r=Math.min(h,r),i=Math.max(h,i),o.copy(c).subtract(s).subtract(u).add(l),f.copy(c).subtract(t),h=e.dot(f),r=Math.min(h,r),i=Math.max(h,i),o.copy(c).subtract(s).subtract(u).subtract(l),f.copy(c).subtract(t),h=e.dot(f),r=Math.min(h,r),i=Math.max(h,i),n[0]=r,n[1]=i,n}transform(t){this.center.transformAsPoint(t);const e=this.halfAxes.getColumn(0,b);e.transformAsPoint(t);const n=this.halfAxes.getColumn(1,_);n.transformAsPoint(t);const r=this.halfAxes.getColumn(2,A);return r.transformAsPoint(t),this.halfAxes=new m.a([...e,...n,...r]),this}getTransform(){throw new Error("not implemented")}}var M=n(181),R=n(12);const N=new s.a,D=new s.a;class F{constructor(t=[0,0,1],e=0){Object(a.a)(this,"normal",void 0),Object(a.a)(this,"distance",void 0),this.normal=new s.a,this.distance=-0,this.fromNormalDistance(t,e)}fromNormalDistance(t,e){return Object(M.a)(Number.isFinite(e)),this.normal.from(t).normalize(),this.distance=e,this}fromPointNormal(t,e){t=N.from(t),this.normal.from(e).normalize();const n=-this.normal.dot(t);return this.distance=n,this}fromCoefficients(t,e,n,r){return this.normal.set(t,e,n),Object(M.a)(Object(R.j)(this.normal.len(),1)),this.distance=r,this}clone(){return new F(this.normal,this.distance)}equals(t){return Object(R.j)(this.distance,t.distance)&&Object(R.j)(this.normal,t.normal)}getPointDistance(t){return this.normal.dot(t)+this.distance}transform(t){const e=D.copy(this.normal).transformAsVector(t).normalize(),n=this.normal.scale(-this.distance).transform(t);return this.fromPointNormal(n,e)}projectPointOntoPlane(t,e=[0,0,0]){t=N.from(t);const n=this.getPointDistance(t),r=D.copy(this.normal).scale(n);return t.subtract(r).to(e)}}const B=[new s.a([1,0,0]),new s.a([0,1,0]),new s.a([0,0,1])],z=new s.a,U=new s.a;new F(new s.a(1,0,0),0);class G{constructor(t=[]){Object(a.a)(this,"planes",void 0),this.planes=t}fromBoundingSphere(t){this.planes.length=2*B.length;const e=t.center,n=t.radius;let r=0;for(const i of B){let t=this.planes[r],o=this.planes[r+1];t||(t=this.planes[r]=new F),o||(o=this.planes[r+1]=new F);const a=z.copy(i).scale(-n).add(e);i.dot(a);t.fromPointNormal(a,i);const s=z.copy(i).scale(n).add(e),u=U.copy(i).negate();u.dot(s);o.fromPointNormal(s,u),r+=2}return this}computeVisibility(t){let e=o;for(const n of this.planes){switch(t.intersectPlane(n)){case r:return r;case i:e=i}}return e}computeVisibilityWithPlaneMask(t,e){if(Object(M.a)(Number.isFinite(e),"parentPlaneMask is required."),e===G.MASK_OUTSIDE||e===G.MASK_INSIDE)return e;let n=G.MASK_INSIDE;const o=this.planes;for(let a=0;a<this.planes.length;++a){const s=a<31?1<<a:0;if(a<31&&0===(e&s))continue;const u=o[a],l=t.intersectPlane(u);if(l===r)return G.MASK_OUTSIDE;l===i&&(n|=s)}return n}}Object(a.a)(G,"MASK_OUTSIDE",4294967295),Object(a.a)(G,"MASK_INSIDE",0),Object(a.a)(G,"MASK_INDETERMINATE",2147483647);n(61);new s.a,new s.a,new s.a,new s.a,new s.a;n(639);new s.a,new s.a,new s.a,new s.a,new s.a,new s.a,new s.a,new s.a,new s.a,new s.a,new s.a,new s.a,Math.PI;var V=n(640);const q=new m.a,H=new m.a,W=new m.a,X=new m.a,Y=new m.a;function Z(t,e={}){const n=V.a.EPSILON20;let r=0,i=0;const o=H,a=W;o.identity(),a.copy(t);const s=n*function(t){let e=0;for(let n=0;n<9;++n){const r=t[n];e+=r*r}return Math.sqrt(e)}(a);for(;i<10&&J(a)>s;)Q(a,X),Y.copy(X).transpose(),a.multiplyRight(X),a.multiplyLeft(Y),o.multiplyRight(X),++r>2&&(++i,r=0);return e.unitary=o.toTarget(e.unitary),e.diagonal=a.toTarget(e.diagonal),e}const K=[1,0,0],$=[2,2,1];function J(t){let e=0;for(let n=0;n<3;++n){const r=t[q.getElementIndex($[n],K[n])];e+=2*r*r}return Math.sqrt(e)}function Q(t,e){const n=V.a.EPSILON15;let r=0,i=1;for(let l=0;l<3;++l){const e=Math.abs(t[q.getElementIndex($[l],K[l])]);e>r&&(i=l,r=e)}const o=K[i],a=$[i];let s=1,u=0;if(Math.abs(t[q.getElementIndex(a,o)])>n){const e=(t[q.getElementIndex(a,a)]-t[q.getElementIndex(o,o)])/2/t[q.getElementIndex(a,o)];let n;n=e<0?-1/(-e+Math.sqrt(1+e*e)):1/(e+Math.sqrt(1+e*e)),s=1/Math.sqrt(1+n*n),u=n*s}return m.a.IDENTITY.to(e),e[q.getElementIndex(o,o)]=e[q.getElementIndex(a,a)]=s,e[q.getElementIndex(a,o)]=u,e[q.getElementIndex(o,a)]=-u,e}const tt=new s.a,et=new s.a,nt=new s.a,rt=new s.a,it=new s.a,ot=new m.a,at={diagonal:new m.a,unitary:new m.a};function st(t,e=new j){if(!t||0===t.length)return e.halfAxes=new m.a([0,0,0,0,0,0,0,0,0]),e.center=new s.a,e;const n=t.length,r=new s.a(0,0,0);for(const s of t)r.add(s);const i=1/n;r.multiplyByScalar(i);let o=0,a=0,u=0,l=0,c=0,f=0;for(const s of t){const t=tt.copy(s).subtract(r);o+=t.x*t.x,a+=t.x*t.y,u+=t.x*t.z,l+=t.y*t.y,c+=t.y*t.z,f+=t.z*t.z}o*=i,a*=i,u*=i,l*=i,c*=i,f*=i;const h=ot;h[0]=o,h[1]=a,h[2]=u,h[3]=a,h[4]=l,h[5]=c,h[6]=u,h[7]=c,h[8]=f;const{unitary:p}=Z(h,at),d=e.halfAxes.copy(p);let g=d.getColumn(0,nt),y=d.getColumn(1,rt),v=d.getColumn(2,it),b=-Number.MAX_VALUE,_=-Number.MAX_VALUE,A=-Number.MAX_VALUE,w=Number.MAX_VALUE,x=Number.MAX_VALUE,E=Number.MAX_VALUE;for(const s of t)tt.copy(s),b=Math.max(tt.dot(g),b),_=Math.max(tt.dot(y),_),A=Math.max(tt.dot(v),A),w=Math.min(tt.dot(g),w),x=Math.min(tt.dot(y),x),E=Math.min(tt.dot(v),E);g=g.multiplyByScalar(.5*(w+b)),y=y.multiplyByScalar(.5*(x+_)),v=v.multiplyByScalar(.5*(E+A)),e.center.copy(g).add(y).add(v);const O=et.set(b-w,_-x,A-E).multiplyByScalar(.5),S=new m.a([O[0],0,0,0,O[1],0,0,0,O[2]]);return e.halfAxes.multiplyRight(S),e}},function(t,e,n){t.exports={OverlayCreatorLayerManager:"OverlayCreatorLayerManager-module__OverlayCreatorLayerManager___3zRiS",panel:"OverlayCreatorLayerManager-module__panel___1BPKm",scrollPane:"OverlayCreatorLayerManager-module__scrollPane___silPi",layer:"OverlayCreatorLayerManager-module__layer___2zvb_",isProcessing:"OverlayCreatorLayerManager-module__isProcessing___27bfS",barberpole:"OverlayCreatorLayerManager-module__barberpole___33mf2",editName:"OverlayCreatorLayerManager-module__editName___2Khd5",expand:"OverlayCreatorLayerManager-module__expand___1B0So",errorFlag:"OverlayCreatorLayerManager-module__errorFlag___3yecj",nameEditor:"OverlayCreatorLayerManager-module__nameEditor___2HLO0",type:"OverlayCreatorLayerManager-module__type___2HBy9",moreActions:"OverlayCreatorLayerManager-module__moreActions___1ojWJ",settings:"OverlayCreatorLayerManager-module__settings___WIlBF",settingsRow:"OverlayCreatorLayerManager-module__settingsRow___1935j",color:"OverlayCreatorLayerManager-module__color___3_6oq",fillPolygons:"OverlayCreatorLayerManager-module__fillPolygons___23H-a",setting:"OverlayCreatorLayerManager-module__setting___GV62D",settingFullWidthInputs:"OverlayCreatorLayerManager-module__settingFullWidthInputs___3OFX-",rangeWithNumericInput:"OverlayCreatorLayerManager-module__rangeWithNumericInput___3pRSa",unit:"OverlayCreatorLayerManager-module__unit___1BEgX",labelLike:"OverlayCreatorLayerManager-module__labelLike___3YrmM",inputLike:"OverlayCreatorLayerManager-module__inputLike___2OuIz",isNotValid:"OverlayCreatorLayerManager-module__isNotValid___2JNR_",numericalLabel:"OverlayCreatorLayerManager-module__numericalLabel___16RT9",drawRectangleButton:"OverlayCreatorLayerManager-module__drawRectangleButton___1zYfL",upload:"OverlayCreatorLayerManager-module__upload___36fBP",progress:"OverlayCreatorLayerManager-module__progress___7ZUKU",moveBackground:"OverlayCreatorLayerManager-module__moveBackground___3ThIn",cancelUpload:"OverlayCreatorLayerManager-module__cancelUpload___oHGW1",tabs:"OverlayCreatorLayerManager-module__tabs___3PQbp",current:"OverlayCreatorLayerManager-module__current___2R2RZ",errorMessage:"OverlayCreatorLayerManager-module__errorMessage___3ygvf"}},function(t,e,n){"use strict";n.d(e,"l",(function(){return Yt})),n.d(e,"j",(function(){return H})),n.d(e,"i",(function(){return ne})),n.d(e,"c",(function(){return ce})),n.d(e,"e",(function(){return je})),n.d(e,"g",(function(){return ze})),n.d(e,"b",(function(){return rn})),n.d(e,"f",(function(){return pn})),n.d(e,"h",(function(){return vn})),n.d(e,"d",(function(){return dt})),n.d(e,"a",(function(){return lt})),n.d(e,"k",(function(){return j}));var r=n(35),i=n(282),o=n(1),a=n(0),s=n(3),u=n(20),l=n(24),c=n(332),f=n(229),h=n(276),p=n.n(h),d=n(39),m=n(40);function g(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function y(t,e){if(t===e)return!0;if(g(t)&&g(e)){if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(!y(t[n],e[n]))return!1;return!0}return Math.abs(t-e)<=1e-7}function v(t,e,n){return Math.max(e,Math.min(n,t))}function b(t,e,n){return g(t)?t.map((function(t,r){return b(t,e[r],n)})):n*e+(1-n)*t}function _(t,e){if(!t)throw new Error(e||"react-map-gl: assertion failed.")}function A(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 w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x={minZoom:0,maxZoom:24,minPitch:0,maxPitch:85},E=0,O=0,S=1.5,P=function(){function t(e){var n=e.width,r=e.height,i=e.latitude,o=e.longitude,a=e.zoom,s=e.bearing,u=void 0===s?O:s,l=e.pitch,c=void 0===l?E:l,f=e.altitude,h=void 0===f?S:f,p=e.maxZoom,m=void 0===p?x.maxZoom:p,g=e.minZoom,y=void 0===g?x.minZoom:g,v=e.maxPitch,b=void 0===v?x.maxPitch:v,A=e.minPitch,w=void 0===A?x.minPitch:A,P=e.transitionDuration,C=e.transitionEasing,T=e.transitionInterpolator,k=e.transitionInterruption,I=e.startPanLngLat,L=e.startZoomLngLat,j=e.startRotatePos,M=e.startBearing,R=e.startPitch,N=e.startZoom;Object(d.a)(this,t),_(Number.isFinite(n),"`width` must be supplied"),_(Number.isFinite(r),"`height` must be supplied"),_(Number.isFinite(o),"`longitude` must be supplied"),_(Number.isFinite(i),"`latitude` must be supplied"),_(Number.isFinite(a),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:i,longitude:o,zoom:a,bearing:u,pitch:c,altitude:h,maxZoom:m,minZoom:y,maxPitch:b,minPitch:w,transitionDuration:P,transitionEasing:C,transitionInterpolator:T,transitionInterruption:k}),this._state={startPanLngLat:I,startZoomLngLat:L,startRotatePos:j,startBearing:M,startPitch:R,startZoom:N}}return Object(m.a)(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=this._calculateNewLngLat({startPanLngLat:r,pos:e}),o=Object(u.a)(i,2),a=o[0],s=o[1];return this._getUpdatedMapState({longitude:a,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,a=void 0===o?0:o,s=this._state,u=s.startRotatePos,l=s.startBearing,c=s.startPitch;return Number.isFinite(l)&&Number.isFinite(c)?(e=n?this._calculateNewPitchAndBearing(w(w({},this._getRotationParams(n,u)),{},{startBearing:l,startPitch:c})):{bearing:l+i,pitch:c+a},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;_(r>0,"`scale` must be a positive number");var i=this._state,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(n)||this._unproject(e)),_(a,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var s=this._calculateNewZoom({scale:r,startZoom:o||0}),c=new l.a(Object.assign({},this._viewportProps,{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:e}),f=Object(u.a)(c,2),h=f[0],p=f[1];return this._getUpdatedMapState({zoom:s,longitude:h,latitude:p})}},{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=v(r,n,e);var i=t.maxPitch,o=t.minPitch,a=t.pitch;return t.pitch=v(a,o,i),Object.assign(t,Object(l.n)(t)),t}},{key:"_unproject",value:function(t){var e=new l.a(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,n=t.pos;return new l.a(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 v(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=v(n,-1,1);var o=this._viewportProps,a=o.minPitch,s=o.maxPitch,u=i;return n>0?u=i+n*(s-i):n<0&&(u=i-n*(a-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],a=this._viewportProps,s=a.width,u=a.height,l=n/s,c=0;return r>0?Math.abs(u-o)>5&&(c=r/(o-u)*1.2):r<0&&o>5&&(c=1-i/o),{deltaScaleX:l,deltaScaleY:c=Math.min(1,Math.max(-1,c))}}}]),t}();function C(t){return t[0].toLowerCase()+t.slice(1)}function T(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 k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var I=Object(a.createContext)({viewport:null,map:null,container:null,onViewportChange:null,onViewStateChange:null,eventManager:null}),L=I.Provider;I.Provider=function(t){var e=t.value,n=t.children,r=Object(a.useState)(null),i=Object(u.a)(r,2),o=i[0],s=i[1],l=Object(a.useContext)(I);return e=k(k({setMap:s},l),{},{map:l&&l.map||o},e),a.createElement(L,{value:e},n)};var j=I,M="undefined"!==typeof window?a.useLayoutEffect:a.useEffect;function R(t,e){var n=e.longitude,r=e.latitude;return t&&t.queryTerrainElevation&&t.queryTerrainElevation([n,r])||0}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}function D(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){Object(o.a)(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}var F="A valid API access token is required to use Mapbox data";function B(t){var e=t.map,n=t.props,r=t.width,i=t.height,o=D(D(D({},n),n.viewState),{},{width:r,height:i});return o.position=[0,0,R(e,o)],new l.a(o)}var z={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},U=Object.assign({},f.a.propTypes,{width:s.oneOfType([s.number,s.string]),height:s.oneOfType([s.number,s.string]),onResize:s.func,disableTokenWarning:s.bool,visible:s.bool,className:s.string,style:s.object,visibilityConstraints:s.object}),G=Object.assign({},f.a.defaultProps,{disableTokenWarning:!1,visible:!0,onResize:function(){},className:"",style:null,visibilityConstraints:x});function V(){return a.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},a.createElement("h3",{key:"header"},F),a.createElement("div",{key:"text"},"For information on setting up your basemap, read"),a.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}var q=Object(a.forwardRef)((function(t,e){var n=Object(a.useState)(!0),r=Object(u.a)(n,2),i=r[0],o=r[1],s=Object(a.useState)({width:0,height:0}),l=Object(u.a)(s,2),h=l[0],d=l[1],m=Object(a.useRef)(null),g=Object(a.useRef)(null),y=Object(a.useRef)(null),v=Object(a.useRef)(null),b=Object(a.useContext)(j);M((function(){if(q.supported()){var e=new f.a(D(D(D({},t),h),{},{mapboxgl:p.a,container:g.current,onError:function(e){401===(e.error&&e.error.status||e.status)&&i&&(console.error(F),o(!1)),t.onError(e)}}));m.current=e,b&&b.setMap&&b.setMap(e.getMap());var n=new c.default((function(e){if(e[0].contentRect){var n=e[0].contentRect,r=n.width,i=n.height;d({width:r,height:i}),t.onResize({width:r,height:i})}}));return n.observe(y.current),function(){e.finalize(),m.current=null,n.disconnect()}}}),[]),M((function(){m.current&&m.current.setProps(D(D({},t),h))}));var _=m.current&&m.current.getMap();Object(a.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)}}}(m)}),[]);var A=Object(a.useCallback)((function(t){var e=t.target;e===v.current&&e.scrollTo(0,0)}),[]),w=_&&a.createElement(L,{value:D(D({},b),{},{viewport:b.viewport||B(D({map:_,props:t},h)),map:_,container:b.container||y.current})},a.createElement("div",{key:"map-overlays",className:"overlays",ref:v,style:z,onScroll:A},t.children)),E=t.className,O=t.width,S=t.height,P=t.style,T=t.visibilityConstraints,k=Object.assign({position:"relative"},P,{width:O,height:S}),I=t.visible&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x;for(var n in e){var r=n.slice(0,3),i=C(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,T),R=Object.assign({},z,{visibility:I?"inherit":"hidden"});return a.createElement("div",{key:"map-container",ref:y,style:k},a.createElement("div",{key:"map-mapbox",ref:g,style:R,className:E}),w,!i&&!t.disableTokenWarning&&a.createElement(V,null))}));q.supported=function(){return p.a&&p.a.supported()},q.propTypes=U,q.defaultProps=G;var H=q;function W(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 X(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 X(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,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function X(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 Y=function(){function t(){Object(d.a)(this,t),Object(o.a)(this,"propNames",[])}return Object(m.a)(t,[{key:"arePropsEqual",value:function(t,e){var n,r=W(this.propNames||[]);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!y(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){_(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(t,e){return e.transitionDuration}}]),t}(),Z=n(58),K=n(84),$=n(134),J=n(94),Q={longitude:1,bearing:1};function tt(t){return Number.isFinite(t)||Array.isArray(t)}function et(t,e,n){return function(t){return t in Q}(t)&&Math.abs(n-e)>180&&(n=n<0?n+360:n-360),n}function nt(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 rt(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 rt(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,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function rt(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 it(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=Object(J.a)(t);if(e){var i=Object(J.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object($.a)(this,n)}}var ot=["longitude","latitude","zoom","bearing","pitch"],at=["latitude","longitude","zoom","width","height"],st=["bearing","pitch"],ut={speed:1.2,curve:1.414},lt=function(t){Object(K.a)(n,t);var e=it(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(d.a)(this,n),t=e.call(this),Object(o.a)(Object(Z.a)(t),"propNames",ot),t.props=Object.assign({},ut,r),t}return Object(m.a)(n,[{key:"initializeProps",value:function(t,e){var n,r={},i={},o=nt(at);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=t[a],u=e[a];_(tt(s)&&tt(u),"".concat(a," must be supplied for transition")),r[a]=s,i[a]=et(a,s,u)}}catch(d){o.e(d)}finally{o.f()}var l,c=nt(st);try{for(c.s();!(l=c.n()).done;){var f=l.value,h=t[f]||0,p=e[f]||0;r[f]=h,i[f]=et(f,h,p)}}catch(d){c.e(d)}finally{c.f()}return{start:r,end:i}}},{key:"interpolateProps",value:function(t,e,n){var r,i=Object(l.e)(t,e,n,this.props),o=nt(st);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=b(t[a],e[a],n)}}catch(s){o.e(s)}finally{o.f()}return i}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=Object(l.i)(t,e,this.props)),n}}]),n}(Y);function ct(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 ft(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 ft(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,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ft(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 ht(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=Object(J.a)(t);if(e){var i=Object(J.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object($.a)(this,n)}}var pt=["longitude","latitude","zoom","bearing","pitch"],dt=function(t){Object(K.a)(n,t);var e=ht(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(d.a)(this,n),t=e.call(this),Array.isArray(r)&&(r={transitionProps:r}),t.propNames=r.transitionProps||pt,r.around&&(t.around=r.around),t}return Object(m.a)(n,[{key:"initializeProps",value:function(t,e){var n={},r={};if(this.around){n.around=this.around;var i=new l.a(t).unproject(this.around);Object.assign(r,e,{around:new l.a(e).project(i),aroundLngLat:i})}var o,a=ct(this.propNames);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=t[s],c=e[s];_(tt(u)&&tt(c),"".concat(s," must be supplied for transition")),n[s]=u,r[s]=et(s,u,c)}}catch(f){a.e(f)}finally{a.f()}return{start:n,end:r}}},{key:"interpolateProps",value:function(t,e,n){var r,i={},o=ct(this.propNames);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=b(t[a],e[a],n)}}catch(p){o.e(p)}finally{o.f()}if(e.around){var s=new l.a(Object.assign({},e,i)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:b(t.around,e.around,n)}),c=Object(u.a)(s,2),f=c[0],h=c[1];i.longitude=f,i.latitude=h}return i}}]),n}(Y),mt=function(){};var gt=1,yt=2,vt=3,bt=4,_t={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new dt,transitionInterruption:gt,onTransitionStart:mt,onTransitionInterrupt:mt,onTransitionEnd:mt},At=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(d.a)(this,t),Object(o.a)(this,"_animationFrame",null),Object(o.a)(this,"_onTransitionFrame",(function(){e._animationFrame=requestAnimationFrame(e._onTransitionFrame),e._updateViewport()})),this.props=null,this.onViewportChange=n.onViewportChange||mt,this.onStateChange=n.onStateChange||mt,this.time=n.getTime||Date.now}return Object(m.a)(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===yt?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===bt)){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===vt||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e))}},{key:"_triggerTransition",value:function(t,e){_(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,a=e.startProps,s=e.endProps,u=!1,l=(t-n)/r;l>=1&&(l=1,u=!0),l=i(l);var c=o.interpolateProps(a,s,l),f=new P(Object.assign({},this.props,c));this.state.propsInTransition=f.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),u&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();Object(o.a)(At,"defaultProps",_t);var wt=n(251);function xt(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 Et(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Ot={transitionDuration:0},St={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new dt,transitionInterruption:gt},Pt=300,Ct=function(t){return 1-(1-t)*(1-t)},Tt=["wheel"],kt=["panstart","panmove","panend"],It=["pinchstart","pinchmove","pinchend"],Lt=["tripanstart","tripanmove","tripanend"],jt=["doubletap"],Mt=["keydown"],Rt=function(){function t(){var e=this;Object(d.a)(this,t),Object(o.a)(this,"events",[]),Object(o.a)(this,"scrollZoom",!0),Object(o.a)(this,"dragPan",!0),Object(o.a)(this,"dragRotate",!0),Object(o.a)(this,"doubleClickZoom",!0),Object(o.a)(this,"touchZoom",!0),Object(o.a)(this,"touchRotate",!1),Object(o.a)(this,"keyboard",!0),Object(o.a)(this,"_interactionState",{isDragging:!1}),Object(o.a)(this,"_events",{}),Object(o.a)(this,"_setInteractionState",(function(t){Object.assign(e._interactionState,t),e.onStateChange&&e.onStateChange(e._interactionState)})),Object(o.a)(this,"_onTransition",(function(t,n){e.onViewportChange(t,e._interactionState,n)})),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new At({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return Object(m.a)(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 P?this.mapState.getViewportProps():this.mapState,i=Et(Et({},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 P(Et(Et(Et({},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,a=void 0===o||o,s=t.scrollZoom,u=void 0===s?this.scrollZoom:s,l=t.dragPan,c=void 0===l?this.dragPan:l,f=t.dragRotate,h=void 0===f?this.dragRotate:f,p=t.doubleClickZoom,d=void 0===p?this.doubleClickZoom:p,m=t.touchZoom,g=void 0===m?this.touchZoom:m,y=t.touchRotate,v=void 0===y?this.touchRotate:y,b=t.keyboard,_=void 0===b?this.keyboard:b;this.onViewportChange=e,this.onStateChange=n;var A=this.mapStateProps||{},w=A.height!==t.height||A.width!==t.width;this.mapStateProps=t,w&&(this.mapState=A,this.updateViewport(new P(t))),this._transitionManager.processViewportChange(t),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(Tt,a&&Boolean(u)),this.toggleEvents(kt,a&&Boolean(c||h)),this.toggleEvents(It,a&&Boolean(g||v)),this.toggleEvents(Lt,a&&Boolean(v)),this.toggleEvents(jt,a&&Boolean(d)),this.toggleEvents(Mt,a&&Boolean(_)),this.scrollZoom=u,this.dragPan=c,this.dragRotate=h,this.doubleClickZoom=d,this.touchZoom=g,this.touchRotate=v,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,Ot,{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,Ot,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(t){if(this.dragPan){var e=this.dragPan.inertia,n=void 0===e?Pt: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,Et(Et({},St),{},{transitionDuration:n,transitionEasing:Ct}),{isDragging:!1,isPanning:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,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,Ot,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(t){if(this.dragRotate){var e=this.dragRotate.inertia,n=void 0===e?Pt: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,Et(Et({},St),{},{transitionDuration:n,transitionEasing:Ct}),{isDragging:!1,isRotating:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,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 a=this.getCenter(t),s=t.delta,u=2/(1+Math.exp(-Math.abs(s*r)));s<0&&0!==u&&(u=1/u);var l=this.mapState.zoom({pos:a,scale:u});return l.getViewportProps().zoom!==this.mapStateProps.zoom&&(this.updateViewport(l,Et(Et({},St),{},{transitionInterpolator:new dt({around:a}),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,Ot,{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,Ot,{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?Pt:e,r=this._lastPinchEvent;if(n&&r&&t.scale!==r.scale){var i=this.getCenter(t),o=this.mapState.rotateEnd(),a=Math.log2(t.scale),s=(a-Math.log2(r.scale))/(t.deltaTime-r.deltaTime),u=Math.pow(2,a+s*n/2);return o=o.zoom({pos:i,scale:u}).zoomEnd(),this.updateViewport(o,Et(Et({},St),{},{transitionInterpolator:new dt({around:i}),transitionDuration:n,transitionEasing:Ct}),{isDragging:!1,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:!1}),this.blockEvents(n),!0}}var l=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(l,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,Ot,{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,Ot,{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?Pt: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,Et(Et({},St),{},{transitionDuration:n,transitionEasing:Ct}),{isDragging:!1,isRotating:!0}),this.blockEvents(n),!1}}var a=this.mapState.rotateEnd();return this.updateViewport(a,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({},St,{transitionInterpolator:new dt({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,a=r.moveSpeed,s=void 0===a?100:a,u=r.rotateSpeedX,l=void 0===u?15:u,c=r.rotateSpeedY,f=void 0===c?10:c,h=this.mapStateProps;switch(t.srcEvent.keyCode){case 189:e=n?this.getMapState({zoom:h.zoom-Math.log2(o)-1}):this.getMapState({zoom:h.zoom-Math.log2(o)});break;case 187:e=n?this.getMapState({zoom:h.zoom+Math.log2(o)+1}):this.getMapState({zoom:h.zoom+Math.log2(o)});break;case 37:e=n?this.getMapState({bearing:h.bearing-l}):this.mapState.pan({pos:[s,0],startPos:[0,0]});break;case 39:e=n?this.getMapState({bearing:h.bearing+l}):this.mapState.pan({pos:[-s,0],startPos:[0,0]});break;case 38:e=n?this.getMapState({pitch:h.pitch+f}):this.mapState.pan({pos:[0,s],startPos:[0,0]});break;case 40:e=n?this.getMapState({pitch:h.pitch-f}):this.mapState.pan({pos:[0,-s],startPos:[0,0]});break;default:return!1}return this.updateViewport(e,St)}}]),t}();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 Dt(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){Object(o.a)(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 Ft=Object.assign({},H.propTypes,{maxZoom:s.number,minZoom:s.number,maxPitch:s.number,minPitch:s.number,onViewStateChange:s.func,onViewportChange:s.func,onInteractionStateChange:s.func,transitionDuration:s.oneOfType([s.number,s.string]),transitionInterpolator:s.object,transitionInterruption:s.number,transitionEasing:s.func,onTransitionStart:s.func,onTransitionInterrupt:s.func,onTransitionEnd:s.func,scrollZoom:s.oneOfType([s.bool,s.object]),dragPan:s.oneOfType([s.bool,s.object]),dragRotate:s.oneOfType([s.bool,s.object]),doubleClickZoom:s.bool,touchZoom:s.oneOfType([s.bool,s.object]),touchRotate:s.oneOfType([s.bool,s.object]),keyboard:s.oneOfType([s.bool,s.object]),onHover:s.func,onClick:s.func,onDblClick:s.func,onContextMenu:s.func,onMouseDown:s.func,onMouseMove:s.func,onMouseUp:s.func,onTouchStart:s.func,onTouchMove:s.func,onTouchEnd:s.func,onMouseEnter:s.func,onMouseLeave:s.func,onMouseOut:s.func,onWheel:s.func,touchAction:s.string,eventRecognizerOptions:s.object,clickRadius:s.number,interactiveLayerIds:s.array,getCursor:s.func,controller:s.instanceOf(Rt)}),Bt=Object.assign({},H.defaultProps,x,At.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 zt(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];if(t.point=i,this.map){var o=this.map.unproject(i);t.lngLat=[o.lng,o.lat]}return t}function Ut(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 Gt(t,e){var n=this.props[t];n&&n(zt.call(this,e))}function Vt(t){Gt.call(this,"touch"===t.pointerType?"onTouchStart":"onMouseDown",t)}function qt(t){Gt.call(this,"touch"===t.pointerType?"onTouchEnd":"onMouseUp",t)}function Ht(t){if(Gt.call(this,"touch"===t.pointerType?"onTouchMove":"onMouseMove",t),!this.state.isDragging){var e,n=this.props,r=n.onHover,i=n.interactiveLayerIds;t=zt.call(this,t),(i||r)&&(e=Ut.call(this,t.point));var o=Boolean(i&&e&&e.length>0),a=o&&!this.state.isHovering,s=!o&&this.state.isHovering;(r||a)&&(t.features=e,r&&r(t)),a&&Gt.call(this,"onMouseEnter",t),s&&Gt.call(this,"onMouseLeave",t),(a||s)&&this.setState({isHovering:o})}}function Wt(t){var e=this.props,n=e.onClick,r=e.onNativeClick,i=e.onDblClick,o=e.doubleClickZoom,a=[],s=i||o;switch(t.type){case"anyclick":a.push(r),s||a.push(n);break;case"click":s&&a.push(n)}(a=a.filter(Boolean)).length&&((t=zt.call(this,t)).features=Ut.call(this,t.point),a.forEach((function(e){return e(t)})))}var Xt=Object(a.forwardRef)((function(t,e){var n=Object(a.useContext)(j),o=Object(a.useMemo)((function(){return t.controller||new Rt}),[]),s=Object(a.useMemo)((function(){return new wt.a(null,{touchAction:t.touchAction,recognizerOptions:t.eventRecognizerOptions})}),[]),u=Object(a.useRef)(null),l=Object(a.useRef)(null),c=Object(a.useRef)({width:0,height:0,state:{isHovering:!1,isDragging:!1}}).current;c.props=t,c.map=l.current&&l.current.getMap(),c.setState=function(e){c.state=Dt(Dt({},c.state),e),u.current.style.cursor=t.getCursor(c.state)};var f,h,p=!0,d=function(t,e,n){if(p)f=[t,e,n];else{var r=c.props,i=r.onViewStateChange,o=r.onViewportChange;Object.defineProperty(t,"position",{get:function(){return[0,0,R(c.map,t)]}}),i&&i({viewState:t,interactionState:e,oldViewState:n}),o&&o(t,e,n)}};Object(a.useImperativeHandle)(e,(function(){return function(t){return{getMap:t.current&&t.current.getMap,queryRenderedFeatures:t.current&&t.current.queryRenderedFeatures}}(l)}),[]);var m=Object(a.useMemo)((function(){return Dt(Dt({},n),{},{eventManager:s,container:n.container||u.current})}),[n,u.current]);m.onViewportChange=d,m.viewport=n.viewport||B(c),c.viewport=m.viewport;var g=function(t){var e=t.isDragging,n=void 0!==e&&e;if(n!==c.state.isDragging&&c.setState({isDragging:n}),p)h=t;else{var r=c.props.onInteractionStateChange;r&&r(t)}},y=function(){c.width&&c.height&&o.setOptions(Dt(Dt(Dt({},c.props),c.props.viewState),{},{isInteractive:Boolean(c.props.onViewStateChange||c.props.onViewportChange),onViewportChange:d,onStateChange:g,eventManager:s,width:c.width,height:c.height}))};Object(a.useEffect)((function(){return s.setElement(u.current),s.on({pointerdown:Vt.bind(c),pointermove:Ht.bind(c),pointerup:qt.bind(c),pointerleave:Gt.bind(c,"onMouseOut"),click:Wt.bind(c),anyclick:Wt.bind(c),dblclick:Gt.bind(c,"onDblClick"),wheel:Gt.bind(c,"onWheel"),contextmenu:Gt.bind(c,"onContextMenu")}),function(){s.destroy()}}),[]),M((function(){f&&d.apply(void 0,Object(i.a)(f)),h&&g(h)})),y();var v=t.width,b=t.height,_=t.style,A=t.getCursor,w=Object(a.useMemo)((function(){return Dt(Dt({position:"relative"},_),{},{width:v,height:b,cursor:A(c.state)})}),[_,v,b,A,c.state]);return f&&c._child||(c._child=a.createElement(L,{value:m},a.createElement("div",{key:"event-canvas",ref:u,style:w},a.createElement(H,Object(r.a)({},t,{width:"100%",height:"100%",style:null,onResize:function(t){var e=t.width,n=t.height;c.width=e,c.height=n,y(),c.props.onResize({width:e,height:n})},ref:l}))))),p=!1,c._child}));Xt.supported=H.supported,Xt.propTypes=Ft,Xt.defaultProps=Bt;var Yt=Xt,Zt=n(85);function Kt(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(!Kt(t[n],e[n]))return!1;return!0}if(Array.isArray(e))return!1;if("object"===Object(Zt.a)(t)&&"object"===Object(Zt.a)(e)){var r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(var o=0,a=r;o<a.length;o++){var s=a[o];if(!e.hasOwnProperty(s))return!1;if(!Kt(t[s],e[s]))return!1}return!0}return!1}function $t(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 Jt={type:s.string.isRequired,id:s.string},Qt=0;function te(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?$t(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$t(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 ee(t){var e=Object(a.useContext)(j),n=Object(a.useRef)({id:t.id,type:t.type}),r=Object(a.useState)(0),i=Object(u.a)(r,2)[1],o=Object(a.useMemo)((function(){return t.id||"jsx-source-".concat(Qt++)}),[]),s=e.map;Object(a.useEffect)((function(){if(s){var t=function(){return i((function(t){return t+1}))};return s.on("styledata",t),function(){s.off("styledata",t),requestAnimationFrame((function(){s.style&&s.style._loaded&&s.getSource(o)&&s.removeSource(o)}))}}}),[s,o]);var l=s&&s.style&&s.getSource(o);return l?function(t,e,n){_(e.id===n.id,"source id changed"),_(e.type===n.type,"source type changed");var r="",i=0;for(var o in e)"children"===o||"id"===o||Kt(n[o],e[o])||(r=o,i++);if(i){var a=e.type;if("geojson"===a)t.setData(e.data);else if("image"===a)t.updateImage({url:e.url,coordinates:e.coordinates});else if("canvas"!==a&&"video"!==a||1!==i||"coordinates"!==r)if("vector"===a&&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)}}(l,t,n.current):l=te(s,o,t),n.current=t,l&&a.Children.map(t.children,(function(t){return t&&Object(a.cloneElement)(t,{source:o})}))||null}ee.propTypes=Jt;var ne=ee,re=n(162);function ie(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 oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ae={type:s.oneOf(["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade","sky"]).isRequired,id:s.string,source:s.string,beforeId:s.string};function se(t,e,n,r){_(n.id===r.id,"layer id changed"),_(n.type===r.type,"layer type changed");try{!function(t,e,n,r){var i=n.layout,o=void 0===i?{}:i,a=n.paint,s=void 0===a?{}:a,u=n.filter,l=n.minzoom,c=n.maxzoom,f=n.beforeId,h=Object(re.a)(n,["layout","paint","filter","minzoom","maxzoom","beforeId"]);if(f!==r.beforeId&&t.moveLayer(e,f),o!==r.layout){var p=r.layout||{};for(var d in o)Kt(o[d],p[d])||t.setLayoutProperty(e,d,o[d]);for(var m in p)o.hasOwnProperty(m)||t.setLayoutProperty(e,m,void 0)}if(s!==r.paint){var g=r.paint||{};for(var y in s)Kt(s[y],g[y])||t.setPaintProperty(e,y,s[y]);for(var v in g)s.hasOwnProperty(v)||t.setPaintProperty(e,v,void 0)}for(var b in Kt(u,r.filter)||t.setFilter(e,u),l===r.minzoom&&c===r.maxzoom||t.setLayerZoomRange(e,l,c),h)Kt(h[b],r[b])||t.setLayerProperty(e,b,h[b])}(t,e,n,r)}catch(i){console.warn(i)}}var ue=0;function le(t){var e=Object(a.useContext)(j),n=Object(a.useRef)({id:t.id,type:t.type}),r=Object(a.useState)(0),i=Object(u.a)(r,2)[1],o=Object(a.useMemo)((function(){return t.id||"jsx-layer-".concat(ue++)}),[]),s=e.map;return Object(a.useEffect)((function(){if(s){var t=function(){return i((function(t){return t+1}))};return s.on("styledata",t),function(){s.off("styledata",t),s.style&&s.style._loaded&&s.removeLayer(o)}}}),[s]),s&&s.style&&s.getLayer(o)?se(s,o,t,n.current):function(t,e,n){if(t.style&&t.style._loaded){var r=oe(oe({},n),{},{id:e});delete r.beforeId,t.addLayer(r,n.beforeId)}}(s,o,t),n.current=t,null}le.propTypes=ae;var ce=le,fe={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},he={captureScroll:s.bool,captureDrag:s.bool,captureClick:s.bool,captureDoubleClick:s.bool,capturePointerMove:s.bool};function pe(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 de(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(a.useContext)(j),n=Object(a.useRef)(null),r=Object(a.useRef)({props:t,state:{},context:e,containerRef:n}),i=r.current;return i.props=t,i.context=e,Object(a.useEffect)((function(){return pe(i)}),[e.eventManager]),i}function me(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=Object(J.a)(t);if(e){var i=Object(J.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object($.a)(this,n)}}function ge(t){var e=t.instance,n=de(t),r=n.context,i=n.containerRef;return e._context=r,e._containerRef=i,e._render()}var ye=function(t){Object(K.a)(n,t);var e=me(n);function n(){var t;Object(d.a)(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return t=e.call.apply(e,[this].concat(i)),Object(o.a)(Object(Z.a)(t),"_context",{}),Object(o.a)(Object(Z.a)(t),"_containerRef",Object(a.createRef)()),Object(o.a)(Object(Z.a)(t),"_onScroll",(function(t){})),Object(o.a)(Object(Z.a)(t),"_onDragStart",(function(t){})),Object(o.a)(Object(Z.a)(t),"_onDblClick",(function(t){})),Object(o.a)(Object(Z.a)(t),"_onClick",(function(t){})),Object(o.a)(Object(Z.a)(t),"_onPointerMove",(function(t){})),t}return Object(m.a)(n,[{key:"_render",value:function(){throw new Error("_render() not implemented")}},{key:"render",value:function(){return a.createElement(ge,Object(r.a)({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),n}(a.PureComponent);function ve(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?ve(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}Object(o.a)(ye,"propTypes",he),Object(o.a)(ye,"defaultProps",fe);var _e=Object.assign({},he,{draggable:s.bool,onDrag:s.func,onDragEnd:s.func,onDragStart:s.func,offsetLeft:s.number,offsetTop:s.number}),Ae=Object.assign({},fe,{draggable:!1,offsetLeft:0,offsetTop:0});function we(t){var e=t.offsetCenter;return[e.x,e.y]}function xe(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 Ee(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context,a=e.containerRef;if(n.draggable){t.stopPropagation();var s=we(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,a.current);if(i.setDragPos(s),i.setDragOffset(u),r.onDragStart&&u){var l=Object.assign({},t);l.lngLat=xe(s,u,n,o),r.onDragStart(l)}}}function Oe(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 a=we(t);i.setDragPos(a);var s=i.dragOffset;if(r.onDrag&&s){var u=Object.assign({},t);u.lngLat=xe(a,s,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 a=i.dragPos,s=i.dragOffset;if(i.setDragPos(null),i.setDragOffset(null),r.onDragEnd&&a&&s){var u=Object.assign({},t);u.lngLat=xe(a,s,n,o),r.onDragEnd(u)}}(e,t)},pancancel:function(e){return n=e,r=t.state,n.stopPropagation(),r.setDragPos(null),void r.setDragOffset(null);var n,r}};return e.watch(n),function(){e.off(n)}}}var Se="undefined"!==typeof window&&window.devicePixelRatio||1,Pe=function(t){return Math.round(t*Se)/Se},Ce=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 Pe(e/100*r)/r*100};function Te(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=Object.assign({},_e,{className:s.string,longitude:s.number.isRequired,latitude:s.number.isRequired,style:s.object}),Ie=Object.assign({},Ae,{className:""});function Le(t){var e=function(t){var e=Object(a.useState)(null),n=Object(u.a)(e,2),r=n[0],i=n[1],o=Object(a.useState)(null),s=Object(u.a)(o,2),l=s[0],c=s[1],f=de(be(be({},t),{},{onDragStart:Ee}));return f.callbacks=t,f.state.dragPos=r,f.state.setDragPos=i,f.state.dragOffset=l,f.state.setDragOffset=c,Object(a.useEffect)((function(){return Oe(f)}),[f.context.eventManager,Boolean(r)]),f}(t),n=e.state,r=e.containerRef,i=t.children,s=t.className,l=t.draggable,c=t.style,f=n.dragPos,h=function(t){var e=t.props,n=t.state,r=t.context,i=e.longitude,o=e.latitude,a=e.offsetLeft,s=e.offsetTop,l=n.dragPos,c=n.dragOffset,f=r.viewport,h=r.map;if(l&&c)return[l[0]+c[0],l[1]+c[1]];var p=R(h,{longitude:i,latitude:o}),d=f.project([i,o,p]),m=Object(u.a)(d,2),g=m[0],y=m[1];return[g+=a,y+=s]}(e),p=Object(u.a)(h,2),d=p[0],m=p[1],g="translate(".concat(Pe(d),"px, ").concat(Pe(m),"px)"),y=l?f?"grabbing":"grab":"auto",v=Object(a.useMemo)((function(){var t=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute",left:0,top:0,transform:g,cursor:y},c);return a.createElement("div",{className:"mapboxgl-marker ".concat(s),ref:e.containerRef,style:t},i)}),[i,s]),b=r.current;return b&&(b.style.transform=g,b.style.cursor=y),v}Le.defaultProps=Ie,Le.propTypes=ke;var je=a.memo(Le),Me={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},left:{x:0,y:.5},right:{x:1,y:.5}},Re=Object.keys(Me);var Ne=Object.assign({},he,{className:s.string,longitude:s.number.isRequired,latitude:s.number.isRequired,altitude:s.number,offsetLeft:s.number,offsetTop:s.number,tipSize:s.number,closeButton:s.bool,closeOnClick:s.bool,anchor:s.oneOf(Object.keys(Me)),dynamicPosition:s.bool,sortByDepth:s.bool,onClose:s.func}),De=Object.assign({},fe,{className:"",offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function Fe(t,e,n,r){var i=Object(u.a)(r,2),o=i[0],a=i[1],s=t.anchor,l=t.dynamicPosition,c=t.tipSize;return n&&l?function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.selfWidth,a=t.selfHeight,s=t.anchor,u=t.padding,l=void 0===u?0:u,c=Me[s],f=c.x,h=c.y,p=n-h*a,d=p+a,m=Math.max(0,l-p)+Math.max(0,d-i+l);if(m>0){var g=h,y=m;for(h=0;h<=1;h+=.5)d=(p=n-h*a)+a,(m=Math.max(0,l-p)+Math.max(0,d-i+l))<y&&(y=m,g=h);h=g}var v=.5;.5===h&&(f=Math.floor(f),v=1);var b=e-f*o,_=b+o,A=Math.max(0,l-b)+Math.max(0,_-r+l);if(A>0){var w=f,x=A;for(f=0;f<=1;f+=v)_=(b=e-f*o)+o,(A=Math.max(0,l-b)+Math.max(0,_-r+l))<x&&(x=A,w=f);f=w}return Re.find((function(t){var e=Me[t];return e.x===f&&e.y===h}))||s}({x:o,y:a,anchor:s,padding:c,width:e.width,height:e.height,selfWidth:n.clientWidth,selfHeight:n.clientHeight}):s}function Be(t){var e=Object(a.useRef)(null),n=de(t),r=n.context,i=n.containerRef,o=Object(a.useState)(!1),s=Object(u.a)(o,2)[1];Object(a.useEffect)((function(){s(!0)}),[e.current]),Object(a.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 l=r.viewport,c=r.map,f=t.className,h=t.longitude,p=t.latitude,d=t.tipSize,m=t.closeButton,g=t.children,y=t.altitude;void 0===y&&(y=R(c,{longitude:h,latitude:p}));var v=l.project([h,p,y]),b=Fe(t,l,e.current,v),_=function(t,e,n,r,i){var o=Object(u.a)(r,3),a=o[0],s=o[1],l=o[2],c=t.offsetLeft,f=t.offsetTop,h=t.sortByDepth,p=Me[i],d=a+c,m=s+f,g=Ce(n,100*-p.x),y=Ce(n,100*-p.y,"y"),v={position:"absolute",transform:"\n      translate(".concat(g,"%, ").concat(y,"%)\n      translate(").concat(Pe(d),"px, ").concat(Pe(m),"px)\n    "),display:void 0,zIndex:void 0};return h?(l>1||l<-1||a<0||a>e.width||s<0||s>e.height?v.display="none":v.zIndex=Math.floor((1-l)/2*1e5),v):v}(t,l,i.current,v,b),A=Object(a.useCallback)((function(t){n.props.onClose();var e=n.context.eventManager;e&&e.once("click",(function(t){return t.stopPropagation()}),t.target)}),[]);return a.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(b," ").concat(f),style:_,ref:i},a.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:d}}),a.createElement("div",{key:"content",ref:e,className:"mapboxgl-popup-content"},m&&a.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:A},"\xd7"),g))}Be.propTypes=Ne,Be.defaultProps=De;var ze=a.memo(Be);function Ue(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 Ge=Object.assign({},he,{toggleLabel:s.string,className:s.string,style:s.object,compact:s.bool,customAttribution:s.oneOfType([s.string,s.arrayOf(s.string)])}),Ve=Object.assign({},fe,{className:"",toggleLabel:"Toggle Attribution"});function qe(t){var e=de(t),n=e.context,r=e.containerRef,i=Object(a.useRef)(null),s=Object(a.useState)(!1),l=Object(u.a)(s,2),c=l[0],f=l[1];Object(a.useEffect)((function(){var e;return n.map&&(e=function(t,e,n,r){var i=new p.a.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;Object(a.useEffect)((function(){!h&&c&&f(!1)}),[h]);var d=Object(a.useCallback)((function(){return f((function(t){return!t}))}),[]),m=Object(a.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ue(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return a.createElement("div",{style:m,className:t.className},a.createElement("div",{ref:r,"aria-pressed":c,className:"mapboxgl-ctrl mapboxgl-ctrl-attrib ".concat(h?"mapboxgl-compact":""," ").concat(c?"mapboxgl-compact-show":"")},a.createElement("button",{type:"button",className:"mapboxgl-ctrl-attrib-button",title:t.toggleLabel,onClick:d}),a.createElement("div",{ref:i,className:"mapboxgl-ctrl-attrib-inner",role:"list"})))}qe.propTypes=Ge,qe.defaultProps=Ve;a.memo(qe);var He=n(72);function We(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 Xe=Object.assign({},he,{className:s.string,style:s.object,container:s.object,label:s.string}),Ye=Object.assign({},fe,{className:"",container:null,label:"Toggle fullscreen"});function Ze(t){var e=de(t),n=e.context,r=e.containerRef,i=Object(a.useState)(!1),s=Object(u.a)(i,2),l=s[0],c=s[1],f=Object(a.useState)(!1),h=Object(u.a)(f,2),d=h[0],m=h[1],g=Object(a.useState)(null),y=Object(u.a)(g,2),v=y[0],b=y[1];Object(a.useEffect)((function(){var t=new p.a.FullscreenControl;b(t),m(t._checkFullscreenSupport());var e=function(){var e=!t._fullscreen;t._fullscreen=e,c(e)};return He.a.addEventListener(t._fullscreenchange,e),function(){He.a.removeEventListener(t._fullscreenchange,e)}}),[]);var _=Object(a.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?We(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);if(!d)return null;var A=t.className,w=t.label,x=l?"shrink":"fullscreen";return a.createElement("div",{style:_,className:A},a.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},a.createElement("button",{key:x,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(x),type:"button",title:w,onClick:function(){v&&(v._container=t.container||n.container,v._onClickFullscreen())}},a.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}Ze.propTypes=Xe,Ze.defaultProps=Ye;var Ke;a.memo(Ze);function $e(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 Je=function(){},Qe=Object.assign({},he,{className:s.string,style:s.object,label:s.string,disabledLabel:s.string,auto:s.bool,positionOptions:s.object,fitBoundsOptions:s.object,trackUserLocation:s.bool,showUserLocation:s.bool,showAccuracyCircle:s.bool,showUserHeading:s.bool,onViewStateChange:s.func,onViewportChange:s.func,onGeolocate:s.func}),tn=Object.assign({},fe,{className:"",label:"Find My Location",disabledLabel:"Location Not Available",auto:!1,positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0,showUserHeading:!1,showAccuracyCircle:!0,onGeolocate:function(){}});function en(t,e){var n=e.context,r=e.props,i=function(t){var e=new p.a.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),a=o.longitude,s=o.latitude,u=o.zoom,l=Object.assign({},n.viewport,{longitude:a,latitude:s,zoom:u}),c=new P(l),f=Object.assign({},c.getViewportProps(),St),h=r.onViewportChange||n.onViewportChange||Je;(r.onViewStateChange||n.onViewStateChange||Je)({viewState:f}),h(f)}function nn(t){var e=de(t),n=e.context,r=e.containerRef,i=Object(a.useRef)(null),s=Object(a.useState)(null),l=Object(u.a)(s,2),c=l[0],f=l[1],h=Object(a.useState)(!1),d=Object(u.a)(h,2),m=d[0],g=d[1];Object(a.useEffect)((function(){var r;return n.map&&(void 0!==Ke?Promise.resolve(Ke):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then((function(t){return Ke="denied"!==t.state})):(Ke=Boolean(window.navigator.geolocation),Promise.resolve(Ke))).then((function(o){g(o),i.current&&(r=function(t,e,n){var r=new p.a.GeolocateControl(e);r._container=He.a.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),r._updateCamera=function(t){return en(t,e)},f(r))})),function(){r&&r._clearWatch()}}),[n.map]);var y=Object(a.useCallback)((function(){c&&(c.options=e.props,c.trigger())}),[c]);Object(a.useEffect)((function(){t.auto&&y()}),[c,t.auto]),Object(a.useEffect)((function(){c&&c._onZoom()}),[n.viewport.zoom]);var v=t.className,b=t.label,_=t.disabledLabel,A=t.trackUserLocation,w=Object(a.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$e(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return a.createElement("div",{style:w,className:v},a.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},a.createElement("button",{key:"geolocate",className:"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",ref:i,disabled:!m,"aria-pressed":!A,type:"button",title:m?b:_,"aria-label":m?b:_,onClick:y},a.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}nn.propTypes=Qe,nn.defaultProps=tn;var rn=a.memo(nn);function on(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 an=function(){},sn=Object.assign({},he,{className:s.string,style:s.object,onViewStateChange:s.func,onViewportChange:s.func,showCompass:s.bool,showZoom:s.bool,zoomInLabel:s.string,zoomOutLabel:s.string,compassLabel:s.string}),un=Object.assign({},fe,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"});function ln(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,a=r[i]||0;if(o<a)return-1;if(o>a)return 1}return 0}(t,"1.6.0")>=0?2:1}function cn(t,e,n){var r=t.viewport,i=new P(Object.assign({},r,n)),o=Object.assign({},i.getViewportProps(),St),a=e.onViewportChange||t.onViewportChange||an;(e.onViewStateChange||t.onViewStateChange||an)({viewState:o}),a(o)}function fn(t,e,n,r){return a.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:n},r||a.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}function hn(t){var e=de(t),n=e.context,r=e.containerRef,i=t.className,s=t.showCompass,u=t.showZoom,l=t.zoomInLabel,c=t.zoomOutLabel,f=t.compassLabel,h=Object(a.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?on(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return a.createElement("div",{style:h,className:i},a.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},u&&fn("zoom-in",l,(function(){cn(n,t,{zoom:n.viewport.zoom+1})})),u&&fn("zoom-out",c,(function(){cn(n,t,{zoom:n.viewport.zoom-1})})),s&&fn("compass",f,(function(){cn(n,t,{bearing:0,pitch:0})}),function(t){var e=Object(a.useMemo)((function(){return t.map?ln(t.map.version):2}),[t.map]),n=t.viewport.bearing,r={transform:"rotate(".concat(-n,"deg)")};return 2===e?a.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:r}):a.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:r})}(n))))}hn.propTypes=sn,hn.defaultProps=un;var pn=a.memo(hn);function dn(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 mn=Object.assign({},he,{className:s.string,style:s.object,maxWidth:s.number,unit:s.oneOf(["imperial","metric","nautical"])}),gn=Object.assign({},fe,{className:"",maxWidth:100,unit:"metric"});function yn(t){var e=de(t),n=e.context,r=e.containerRef,i=Object(a.useState)(null),s=Object(u.a)(i,2),l=s[0],c=s[1];Object(a.useEffect)((function(){if(n.map){var t=new p.a.ScaleControl;t._map=n.map,t._container=r.current,c(t)}}),[n.map]),l&&(l.options=t,l._onMove());var f=Object(a.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?dn(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return a.createElement("div",{style:f,className:t.className},a.createElement("div",{ref:r,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}))}yn.propTypes=mn,yn.defaultProps=gn;var vn=a.memo(yn),bn="undefined"!==typeof window&&window.devicePixelRatio||1,_n=Object.assign({},he,{redraw:s.func.isRequired});function An(t){var e=de(t),n=e.context,r=e.containerRef,i=Object(a.useState)(null),o=Object(u.a)(i,2),s=o[0],l=o[1];Object(a.useEffect)((function(){l(r.current.getContext("2d"))}),[]);var c=n.viewport,f=n.isDragging;return s&&(s.save(),s.scale(bn,bn),t.redraw({width:c.width,height:c.height,ctx:s,isDragging:f,project:c.project,unproject:c.unproject}),s.restore()),a.createElement("canvas",{ref:r,width:c.width*bn,height:c.height*bn,style:{width:"".concat(c.width,"px"),height:"".concat(c.height,"px"),position:"absolute",left:0,top:0}})}An.propTypes=_n,An.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};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({},he,{redraw:s.func.isRequired,style:s.object});function En(t){var e=de(t),n=e.context,r=e.containerRef,i=n.viewport,s=n.isDragging,u=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){Object(o.a)(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",left:0,top:0,width:i.width,height:i.height},t.style);return a.createElement("div",{ref:r,style:u},t.redraw({width:i.width,height:i.height,isDragging:s,project:i.project,unproject:i.unproject}))}En.propTypes=xn,En.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};function On(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=Object.assign({},he,{redraw:s.func.isRequired,style:s.object});function Pn(t){var e=de(t),n=e.context,r=e.containerRef,i=n.viewport,s=n.isDragging,u=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?On(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute",left:0,top:0},t.style);return a.createElement("svg",{width:i.width,height:i.height,ref:r,style:u},t.redraw({width:i.width,height:i.height,isDragging:s,project:i.project,unproject:i.unproject}))}Pn.propTypes=Sn,Pn.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};p.a&&p.a.setRTLTextPlugin},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(59),i=n(104),o=n(80),a=n(6),s=n(10),u=n(245);const l={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"},c={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:l},f={removedProps:l};class h extends r.a{get[Symbol.toStringTag](){return"Buffer"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerElement(t))}getVertexCount(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerVertex(t))}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(t)&&(t={data:t}),Number.isFinite(t)&&(t={byteLength:t}),t=Object(u.a)("Buffer",t,c),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=Object(u.a)("Buffer",t,f))&&this.setAccessor(t.accessor),this}setAccessor(t){return delete(t=Object.assign({},t)).buffer,this.accessor=new i.a(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;Object(s.a)(e);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?(Object(a.a)(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(t){let{sourceBuffer:e,readOffset:n=0,writeOffset:r=0,size:i}=t;const{gl:o}=this;return Object(a.a)(o),o.bindBuffer(36662,e.handle),o.bindBuffer(36663,this.handle),o.copyBufferSubData(36662,36663,n,r,i),o.bindBuffer(36662,null),o.bindBuffer(36663,null),this.debugData=null,this}getData(){let{dstData:t=null,srcByteOffset:e=0,dstOffset:n=0,length:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this.gl);const i=Object(o.c)(this.accessor.type||5126,{clamped:!1}),u=this._getAvailableElementCount(e),l=n;let c,f;t?(f=t.length,c=f-l):(c=Math.min(u,r||u),f=l+c);const h=Math.min(u,c);return r=r||h,Object(s.a)(r<=h),t=t||new i(f),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,e,t,n,r),this.gl.bindBuffer(36662,null),t}bind(){let{target:t=this.target,index:e=this.accessor&&this.accessor.index,offset:n=0,size:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===t||35982===t?void 0!==r?this.gl.bindBufferRange(t,e,this.handle,n,r):(Object(s.a)(0===n),this.gl.bindBufferBase(t,e,this.handle)):this.gl.bindBuffer(t,this.handle),this}unbind(){let{target:t=this.target,index:e=this.accessor&&this.accessor.index}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.byteLength+e;Object(s.a)(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 a=Object(o.b)(t);return Object(s.a)(a),this.setAccessor(new i.a(this.accessor,{type:a})),this}_setByteLength(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(s.a)(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/Object(o.c)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-e}_inferType(t){this.accessor.type||this.setAccessor(new i.a(this.accessor,{type:Object(o.b)(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 a.k.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return a.k.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(t){return a.k.deprecated("setByteLength","reallocate")(),this.reallocate(t)}updateAccessor(t){return a.k.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.a(this.accessor,t),this}}},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return f}));var r=function t(e,n,r){var i=n.global&&void 0!==n.global.colors[e]?n.global.colors[e]:e,o=i;return i&&((!0===r||void 0===r&&n.dark)&&void 0!==i.dark?o=i.dark:!1!==r&&n.dark||void 0===i.light||(o=i.light)),o&&n.global&&void 0!==n.global.colors[o]&&(o=t(o,n,r)),o},i=/^#[A-Za-z0-9]{3,4}$|^#[A-Za-z0-9]{6,8}$/,o=/^rgba?\(\s?([0-9]*)\s?,\s?([0-9]*)\s?,\s?([0-9]*)\s?\)/,a=/^rgba?\(\s?([0-9]*)\s?,\s?([0-9]*)\s?,\s?([0-9]*)\s?,\s?([.0-9]*)\s?\)/,s=/^hsla?\(\s?([0-9]*)\s?,\s?([0-9]*)%?\s?,\s?([0-9]*)%?\s?.*?\)/,u=function(t){return i.test(t)||o.test(t)||a.test(t)||s.test(t)},l=function(t){if(i.test(t)){var e=function(t){return t.length<7?t.match(/[A-Za-z0-9]{1}/g).map((function(t){return parseInt(""+t+t,16)})):t.match(/[A-Za-z0-9]{2}/g).map((function(t){return parseInt(t,16)}))}(t),n=e[0],r=e[1],u=e[2],l=e[3];return[n,r,u,void 0!==l?l/255:void 0]}var c=t.match(o);if(c)return c.splice(1).map((function(t){return parseInt(t,10)}));if(c=t.match(a))return c.splice(1).map((function(t){return parseFloat(t,10)}));if(c=t.match(s)){var f=c.splice(1).map((function(t){return parseInt(t,10)}));return function(t,e,n){var r,i,o;if(0===e||"0"===e)r=n,i=n,o=n;else{var a=function(t,e,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<.16666667?t+6*(e-t)*r:r<.5?e:r<.66666667?t+(e-t)*(.66666667-r)*6:t},s=n<.5?n*(1+e):n+e-n*e,u=2*n-s;r=a(u,s,t+.33333333),i=a(u,s,t),o=a(u,s,t-.33333333)}return[Math.round(255*r),Math.round(255*i),Math.round(255*o)]}(f[0]/360,f[1]/100,f[2]/100)}return t},c=function(t){if(t&&u(t)){var e=l(t),n=e[0],r=e[1],i=e[2];if(e[3]<.5)return;return(299*n+587*r+114*i)/1e3<125}},f=function(t,e){if(t&&u(t)){var n=l(t),r=n[0],i=n[1],o=n[2],a=n[3];return"rgba("+r+", "+i+", "+o+", "+(void 0!==e?e:void 0!==a?a:1)+")"}}},function(t,e,n){"use strict";function r(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}n.r(e),e.default=function(t,e){var n;void 0===e&&(e=r);var i,o=[],a=!1;return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];return a&&n===this&&e(r,o)||(i=t.apply(this,r),a=!0,n=this,o=r),i}}},function(t,e,n){"use strict";n.r(e),n.d(e,"Polygon",(function(){return h})),n.d(e,"getPolygonSignedArea",(function(){return u})),n.d(e,"getPolygonWindingDirection",(function(){return s})),n.d(e,"forEachSegmentInPolygon",(function(){return l})),n.d(e,"modifyPolygonWindingDirection",(function(){return a})),n.d(e,"WINDING",(function(){return o})),n.d(e,"earcut",(function(){return p})),n.d(e,"clipPolygon",(function(){return G})),n.d(e,"clipPolyline",(function(){return U})),n.d(e,"cutPolygonByGrid",(function(){return X})),n.d(e,"cutPolylineByGrid",(function(){return H})),n.d(e,"cutPolylineByMercatorBounds",(function(){return J})),n.d(e,"cutPolygonByMercatorBounds",(function(){return Q})),n.d(e,"_Polygon",(function(){return h}));var r=n(1),i=n(12);const o={CLOCKWISE:1,COUNTER_CLOCKWISE:-1};function a(t,e,n={}){return s(t,n)!==e&&(function(t,e){const{start:n=0,end:r=t.length,size:i=2}=e,o=(r-n)/i,a=Math.floor(o/2);for(let s=0;s<a;++s){const e=n+s*i,r=n+(o-1-s)*i;for(let n=0;n<i;++n){const i=t[e+n];t[e+n]=t[r+n],t[r+n]=i}}}(t,n),!0)}function s(t,e={}){return Math.sign(u(t,e))}function u(t,e={}){const{start:n=0,end:r=t.length}=e,i=e.size||2;let o=0;for(let a=n,s=r-i;a<r;a+=i)o+=(t[a]-t[s])*(t[a+1]+t[s+1]),s=a;return o/2}function l(t,e,n={}){const{start:r=0,end:o=t.length,size:a=2,isClosed:s}=n,u=(o-r)/a;for(let i=0;i<u-1;++i)e(t[r+i*a],t[r+i*a+1],t[r+(i+1)*a],t[r+(i+1)*a+1],i,i+1);const l=r+(u-1)*a;s||Object(i.j)(t[r],t[l])&&Object(i.j)(t[r+1],t[l+1])||e(t[l],t[l+1],t[r],t[r+1],u-1,0)}function c(t,e,n={}){const r=function(t,e={}){return Math.sign(f(t,e))}(t,n);return r!==e&&(t.reverse(),!0)}function f(t,e={}){const{start:n=0,end:r=t.length}=e;let i=0;for(let o=n,a=r-1;o<r;++o)i+=(t[o][0]-t[a][0])*(t[o][1]+t[a][1]),a=o;return i/2}class h{constructor(t,e={}){Object(r.a)(this,"points",void 0),Object(r.a)(this,"isFlatArray",void 0),Object(r.a)(this,"options",void 0),this.points=t,this.isFlatArray=!Object(i.m)(t[0]),this.options={start:e.start||0,end:e.end||t.length,size:e.size||2,isClosed:e.isClosed},Object.freeze(this)}getSignedArea(){return this.isFlatArray?u(this.points,this.options):f(this.points,this.options)}getArea(){return Math.abs(this.getSignedArea())}getWindingDirection(){return Math.sign(this.getSignedArea())}forEachSegment(t){this.isFlatArray?l(this.points,((e,n,r,i,o,a)=>{t([e,n],[r,i],o,a)}),this.options):function(t,e,n={}){const{start:r=0,end:o=t.length,isClosed:a}=n;for(let i=r;i<o-1;++i)e(t[i],t[i+1],i,i+1);a||Object(i.j)(t[o-1],t[0])||e(t[o-1],t[0],o-1,0)}(this.points,t,this.options)}modifyWindingDirection(t){return this.isFlatArray?a(this.points,t,this.options):c(this.points,t,this.options)}}function p(t,e,n=2,r){const i=e&&e.length,o=i?e[0]*n:t.length;let a=d(t,0,o,n,!0,r&&r[0]);const s=[];if(!a||a.next===a.prev)return s;let u,l,c,f,h,p,y;if(i&&(a=function(t,e,n,r,i){const o=[];let a,s,u,l,c;for(a=0,s=e.length;a<s;a++)u=e[a]*r,l=a<s-1?e[a+1]*r:t.length,c=d(t,u,l,r,!1,i&&i[a+1]),c===c.next&&(c.steiner=!0),o.push(O(c));for(o.sort(A),a=0;a<o.length;a++)w(o[a],n),n=m(n,n.next);return n}(t,e,a,n,r)),t.length>80*n){f=l=t[0],h=c=t[1];for(let e=n;e<o;e+=n)p=t[e],y=t[e+1],p<f&&(f=p),y<h&&(h=y),p>l&&(l=p),y>c&&(c=y);u=Math.max(l-f,c-h),u=0!==u?1/u:0}return g(a,s,n,f,h,u),s}function d(t,e,n,r,i,o){let a,s;if(void 0===o&&(o=u(t,{start:e,end:n,size:r})),i===o<0)for(a=e;a<n;a+=r)s=R(a,t[a],t[a+1],s);else for(a=n-r;a>=e;a-=r)s=R(a,t[a],t[a+1],s);return s&&T(s,s.next)&&(N(s),s=s.next),s}function m(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!T(r,r.next)&&0!==C(r.prev,r,r.next))r=r.next;else{if(N(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function g(t,e,n,r,i,o,a){if(!t)return;!a&&o&&function(t,e,n,r){let i=t;do{null===i.z&&(i.z=E(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){let e,n,r,i,o,a,s,u,l=1;do{for(i=t,t=null,u=null,r=0;i;){for(r++,a=i,o=0,n=0;n<l&&(o++,a=a.nextZ,a);n++);for(s=l;o>0||s>0&&a;)0!==o&&(0===s||!a||i.z<=a.z)?(e=i,i=i.nextZ,o--):(e=a,a=a.nextZ,s--),u?u.nextZ=e:t=e,e.prevZ=u,u=e;i=a}u.nextZ=null,l*=2}while(r>1)}(i)}(t,r,i,o);let s,u,l=t;for(;t.prev!==t.next;)if(s=t.prev,u=t.next,o?v(t,r,i,o):y(t))e.push(s.i/n),e.push(t.i/n),e.push(u.i/n),N(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?g(t=b(m(t),e,n),e,n,r,i,o,2):2===a&&_(t,e,n,r,i,o):g(m(t),e,n,r,i,o,1);break}}function y(t){const e=t.prev,n=t,r=t.next;if(C(e,n,r)>=0)return!1;let i=t.next.next;for(;i!==t.prev;){if(S(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&C(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function v(t,e,n,r){const i=t.prev,o=t,a=t.next;if(C(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=E(s,u,e,n,r),h=E(l,c,e,n,r);let p=t.prevZ,d=t.nextZ;for(;p&&p.z>=f&&d&&d.z<=h;){if(p!==t.prev&&p!==t.next&&S(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&C(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&S(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&C(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&S(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&C(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&S(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&C(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function b(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!T(i,o)&&k(i,r,r.next,o)&&j(i,o)&&j(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),N(r),N(r.next),r=t=o),r=r.next}while(r!==t);return m(r)}function _(t,e,n,r,i,o){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&P(a,t)){let s=M(a,t);return a=m(a,a.next),s=m(s,s.next),g(a,e,n,r,i,o),void g(s,e,n,r,i,o)}t=t.next}a=a.next}while(a!==t)}function A(t,e){return t.x-e.x}function w(t,e){if(e=function(t,e){let n=e;const r=t.x,i=t.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const t=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>a){if(a=t,t===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!o)return null;if(r===a)return o;const s=o,u=o.x,l=o.y;let c,f=1/0;n=o;do{r>=n.x&&n.x>=u&&r!==n.x&&S(i<l?r:a,i,u,l,i<l?a:r,i,n.x,n.y)&&(c=Math.abs(i-n.y)/(r-n.x),j(n,t)&&(c<f||c===f&&(n.x>o.x||n.x===o.x&&x(o,n)))&&(o=n,f=c)),n=n.next}while(n!==s);return o}(t,e),e){const n=M(e,t);m(e,e.next),m(n,n.next)}}function x(t,e){return C(t.prev,t,e.prev)<0&&C(e.next,t,t.next)<0}function E(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function O(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function S(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function P(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&k(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(j(t,e)&&j(e,t)&&function(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(C(t.prev,t,e.prev)||C(t,e.prev,e))||T(t,e)&&C(t.prev,t,t.next)>0&&C(e.prev,e,e.next)>0)}function C(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function k(t,e,n,r){const i=L(C(t,e,n)),o=L(C(t,e,r)),a=L(C(n,r,t)),s=L(C(n,r,e));return i!==o&&a!==s||(!(0!==i||!I(t,n,e))||(!(0!==o||!I(t,r,e))||(!(0!==a||!I(n,t,r))||!(0!==s||!I(n,e,r)))))}function I(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function L(t){return t>0?1:t<0?-1:0}function j(t,e){return C(t.prev,t,t.next)<0?C(t,e,t.next)>=0&&C(t,t.prev,e)>=0:C(t,e,t.prev)<0||C(t,t.next,e)<0}function M(t,e){const n=new D(t.i,t.x,t.y),r=new D(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function R(t,e,n,r){const i=new D(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function N(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function D(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(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 B(t,e){const n=e.length;for(let r=0;r<n;r++)t[r]=e[r]}function z(t,e,n,r,i=[]){const o=r+e*n;for(let a=0;a<n;a++)i[a]=t[o+a];return i}function U(t,e,n){const{size:r=2,startIndex:i=0,endIndex:o=t.length}=n||{},a=(o-i)/r,s=[];let u,l,c,f,h=[],p=-1;for(let d=1;d<a;d++){for(u=z(t,d-1,r,i,u),l=z(t,d,r,i,l),p<0&&(p=q(u,e)),c=f=q(l,e);;){if(!(p|c)){F(h,u),c!==f?(F(h,l),d<a-1&&(s.push(h),h=[])):d===a-1&&F(h,l);break}if(p&c)break;p?(V(u,l,p,e,u),p=q(u,e)):(V(u,l,c,e,l),c=q(l,e))}p=f}return h.length&&s.push(h),s}function G(t,e,n){const{size:r=2,endIndex:i=t.length}=n||{};let o,a,s,u,l,{startIndex:c=0}=n||{},f=(i-c)/r;for(let h=1;h<=8;h*=2){o=[],s=z(t,f-1,r,c,s),l=!(q(s,e)&h);for(let n=0;n<f;n++)a=z(t,n,r,c,a),u=!(q(a,e)&h),u!==l&&F(o,V(s,a,h,e)),u&&F(o,a),B(s,a),l=u;if(t=o,c=0,f=o.length/r,!f)break}return o}function V(t,e,n,r,i=[]){let o,a;if(8&n)o=(r[3]-t[1])/(e[1]-t[1]),a=3;else if(4&n)o=(r[1]-t[1])/(e[1]-t[1]),a=1;else if(2&n)o=(r[2]-t[0])/(e[0]-t[0]),a=2;else{if(!(1&n))return null;o=(r[0]-t[0])/(e[0]-t[0]),a=0}for(let s=0;s<t.length;s++)i[s]=(1&a)===s?r[a]:o*(e[s]-t[s])+t[s];return i}function q(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 H(t,e){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:o=[0,0],startIndex:a=0,endIndex:s=t.length}=e||{},u=(s-a)/n;let l=[];const c=[l],f=z(t,0,n,a);let h,p;const d=Z(f,i,o,[]),m=[];F(l,f);for(let g=1;g<u;g++){for(h=z(t,g,n,a,h),p=q(h,d);p;){V(f,h,p,d,m);const t=q(m,d);t&&(V(f,m,t,d,m),p=t),F(l,m),B(f,m),K(d,i,p),r&&l.length>n&&(l=[],c.push(l),F(l,f)),p=q(h,d)}F(l,h),B(f,h)}return r?c:c[0]}function W(t,e){for(let n=0;n<e.length;n++)t.push(e[n]);return t}function X(t,e=null,n){if(!t.length)return[];const{size:r=2,gridResolution:i=10,gridOffset:o=[0,0],edgeTypes:a=!1}=n||{},s=[],u=[{pos:t,types:a?new Array(t.length/r).fill(1):null,holes:e||[]}],l=[[],[]];let c=[];for(;u.length;){const{pos:t,types:e,holes:n}=u.shift();$(t,r,n[0]||t.length,l),c=Z(l[0],i,o,c);const f=q(l[1],c);if(f){let i=Y(t,e,r,0,n[0]||t.length,c,f);const o={pos:i[0].pos,types:i[0].types,holes:[]},s={pos:i[1].pos,types:i[1].types,holes:[]};u.push(o,s);for(let u=0;u<n.length;u++)i=Y(t,e,r,n[u],n[u+1]||t.length,c,f),i[0]&&(o.holes.push(o.pos.length),o.pos=W(o.pos,i[0].pos),a&&(o.types=W(o.types,i[0].types))),i[1]&&(s.holes.push(s.pos.length),s.pos=W(s.pos,i[1].pos),a&&(s.types=W(s.types,i[1].types)))}else{const r={positions:t};a&&(r.edgeTypes=e),n.length&&(r.holeIndices=n),s.push(r)}}return s}function Y(t,e,n,r,i,o,a){const s=(i-r)/n,u=[],l=[],c=[],f=[],h=[];let p,d,m;const g=z(t,s-1,n,r);let y=Math.sign(8&a?g[1]-o[3]:g[0]-o[2]),v=e&&e[s-1],b=0,_=0;for(let A=0;A<s;A++)p=z(t,A,n,r,p),d=Math.sign(8&a?p[1]-o[3]:p[0]-o[2]),m=e&&e[r/n+A],d&&y&&y!==d&&(V(g,p,a,o,h),F(u,h)&&c.push(v),F(l,h)&&f.push(v)),d<=0?(F(u,p)&&c.push(m),b-=d):c.length&&(c[c.length-1]=0),d>=0?(F(l,p)&&f.push(m),_+=d):f.length&&(f[f.length-1]=0),B(g,p),y=d,v=m;return[b?{pos:u,types:e&&c}:null,_?{pos:l,types:e&&f}:null]}function Z(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 K(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 $(t,e,n,r){let i=1/0,o=-1/0,a=1/0,s=-1/0;for(let u=0;u<n;u+=e){const e=t[u],n=t[u+1];i=e<i?e:i,o=e>o?e:o,a=n<a?n:a,s=n>s?n:s}return r[0][0]=i,r[0][1]=a,r[1][0]=o,r[1][1]=s,r}function J(t,e){const{size:n=2,startIndex:r=0,endIndex:i=t.length,normalize:o=!0}=e||{},a=t.slice(r,i);nt(a,n,0,i-r);const s=H(a,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(o)for(const u of s)rt(u,n);return s}function Q(t,e=null,n){const{size:r=2,normalize:i=!0,edgeTypes:o=!1}=n||{};e=e||[];const a=[],s=[];let u=0,l=0;for(let f=0;f<=e.length;f++){const i=e[f]||t.length,o=l,c=tt(t,r,u,i);for(let e=c;e<i;e++)a[l++]=t[e];for(let e=u;e<c;e++)a[l++]=t[e];nt(a,r,o,l),et(a,r,o,l,null===n||void 0===n?void 0:n.maxLatitude),u=i,s[f]=l}s.pop();const c=X(a,s,{size:r,gridResolution:360,gridOffset:[-180,-180],edgeTypes:o});if(i)for(const f of c)rt(f.positions,r);return c}function tt(t,e,n,r){let i=-1,o=-1;for(let a=n+1;a<r;a+=e){const e=Math.abs(t[a]);e>i&&(i=e,o=a-1)}return o}function et(t,e,n,r,i=85.051129){const o=t[n],a=t[r-e];if(Math.abs(o-a)>180){const r=z(t,0,e,n);r[0]+=360*Math.round((a-o)/360),F(t,r),r[1]=Math.sign(r[1])*i,F(t,r),r[0]=o,F(t,r)}}function nt(t,e,n,r){let i,o=t[0];for(let a=n;a<r;a+=e){i=t[a];const e=i-o;(e>180||e<-180)&&(i-=360*Math.round(e/360)),t[a]=o=i}}function rt(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(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1314),a=n.n(o),s=n(678),u=n.n(s);e.default=function(){return i.a.createElement("div",{className:u.a.LoadingSpinner},i.a.createElement(a.a,{size:50,color:u.a.spinnerColor,loading:!0}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return f})),n.d(e,"f",(function(){return p}));var r=n(111),i=n(100);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(t,e){const n=t%e;return n<0?e+n:n}function s(t){return[t[12],t[13],t[14]]}function u(t){return{left:c(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]),right:c(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]),bottom:c(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]),top:c(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]),near:c(t[3]+t[2],t[7]+t[6],t[11]+t[10],t[15]+t[14]),far:c(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14])}}const l=new i.a;function c(t,e,n,r){l.set(t,e,n);const o=l.len();return{distance:r/o,normal:new i.a(-t/o,-e/o,-n/o)}}function f(t){return t-Math.fround(t)}let h;function p(t,e){const{size:n=1,startIndex:i=0}=e,o=void 0!==e.endIndex?e.endIndex:t.length,a=(o-i)/n;h=r.a.allocate(h,a,{type:Float32Array,size:2*n});let s=i,u=0;for(;s<o;){for(let e=0;e<n;e++){const r=t[s++];h[u+e]=r,h[u+e+n]=f(r)}u+=2*n}return h.subarray(0,a*n*2)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(4),i=function(t){return"number"===typeof t?t:(t.match(/\s/),parseFloat(t.match(/\d+(\.\d+)?/),10))},o=function(t,e){return Object(r.css)(["@media only screen ","{",";}"],t.value&&"and (max-width: "+t.value+"px)",e)}},function(t,e,n){"use strict";n.d(e,"h",(function(){return m})),n.d(e,"c",(function(){return y})),n.d(e,"a",(function(){return v})),n.d(e,"f",(function(){return _})),n.d(e,"g",(function(){return w})),n.d(e,"b",(function(){return E})),n.d(e,"e",(function(){return O})),n.d(e,"d",(function(){return S}));var r=n(1),i=n(392),o=n(115),a=n(47),s=n(24);const u=512,l=[[.5,.5],[0,0],[0,1],[1,0],[1,1]],c=l.concat([[0,.5],[.5,0],[1,.5],[.5,1]]),f=c.concat([[.25,.5],[.75,.5]]);class h{constructor(t,e,n){Object(r.a)(this,"x",void 0),Object(r.a)(this,"y",void 0),Object(r.a)(this,"z",void 0),Object(r.a)(this,"childVisible",void 0),Object(r.a)(this,"selected",void 0),Object(r.a)(this,"_children",void 0),this.x=t,this.y=e,this.z=n}get children(){if(!this._children){const t=2*this.x,e=2*this.y,n=this.z+1;this._children=[new h(t,e,n),new h(t,e+1,n),new h(t+1,e,n),new h(t+1,e+1,n)]}return this._children}update(t){const{viewport:e,cullingVolume:n,elevationBounds:r,minZ:i,maxZ:o,bounds:a,offset:s,project:u}=t,l=this.getBoundingVolume(r,s,u);if(a&&!this.insideBounds(a))return!1;if(n.computeVisibility(l)<0)return!1;if(!this.childVisible){let{z:t}=this;if(t<o&&t>=i){const n=l.distanceTo(e.cameraPosition)*e.scale/e.height;t+=Math.floor(Math.log2(n))}if(t>=o)return this.selected=!0,!0}this.selected=!1,this.childVisible=!0;for(const c of this.children)c.update(t);return!0}getSelected(t=[]){if(this.selected&&t.push(this),this._children)for(const e of this._children)e.getSelected(t);return t}insideBounds([t,e,n,r]){const i=Math.pow(2,this.z),o=u/i;return this.x*o<n&&this.y*o<r&&(this.x+1)*o>t&&(this.y+1)*o>e}getBoundingVolume(t,e,n){if(n){const e=this.z<1?f:this.z<2?c:l,r=[];for(const i of e){const e=_(this.x+i[0],this.y+i[1],this.z);e[2]=t[0],r.push(n(e)),t[0]!==t[1]&&(e[2]=t[1],r.push(n(e)))}return Object(a.f)(r)}const r=Math.pow(2,this.z),i=u/r,o=this.x*i+e*u,s=u-(this.y+1)*i;return new a.a([o,s,t[0]],[o+i,s+i,t[1]])}}const p=512,d=[-1/0,-1/0,1/0,1/0],m={type:"url",value:null,validate:(t,e)=>e.optional&&null===t||"string"===typeof t||Array.isArray(t)&&t.every((t=>"string"===typeof t)),equals:(t,e)=>{if(t===e)return!0;if(!Array.isArray(t)||!Array.isArray(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 g(t,e){const n=[e.transformAsPoint([t[0],t[1]]),e.transformAsPoint([t[2],t[1]]),e.transformAsPoint([t[0],t[3]]),e.transformAsPoint([t[2],t[3]])];return[Math.min(...n.map((t=>t[0]))),Math.min(...n.map((t=>t[1]))),Math.max(...n.map((t=>t[0]))),Math.max(...n.map((t=>t[1])))]}function y(t,e){if(!t||!t.length)return null;const{index:n,id:r}=e;if(Array.isArray(t)){t=t[(i=r,Math.abs(i.split("").reduce(((t,e)=>(t<<5)-t+e.charCodeAt(0)|0),0))%t.length)]}var i;let o=t;for(const a of Object.keys(n)){const t=new RegExp("{".concat(a,"}"),"g");o=o.replace(t,String(n[a]))}return Number.isInteger(n.y)&&Number.isInteger(n.z)&&(o=o.replace(/\{-y\}/g,String(Math.pow(2,n.z)-n.y-1))),o}function v({viewport:t,z:e,cullRect:n}){const r=n.x-t.x,i=n.y-t.y,{width:o,height:a}=n;if(!Array.isArray(e)){const n={targetZ:e||0},s=t.unproject([r,i],n),u=t.unproject([r+o,i],n),l=t.unproject([r,i+a],n),c=t.unproject([r+o,i+a],n);return[Math.min(s[0],u[0],l[0],c[0]),Math.min(s[1],u[1],l[1],c[1]),Math.max(s[0],u[0],l[0],c[0]),Math.max(s[1],u[1],l[1],c[1])]}const s=v({viewport:t,z:e[0],cullRect:n}),u=v({viewport:t,z:e[1],cullRect:n});return[Math.min(s[0],u[0]),Math.min(s[1],u[1]),Math.max(s[2],u[2]),Math.max(s[3],u[3])]}function b(t,e){return Math.pow(2,t)*p/e}function _(t,e,n){const r=b(n,p),i=t/r*360-180,o=Math.PI-2*Math.PI*e/r;return[i,180/Math.PI*Math.atan(.5*(Math.exp(o)-Math.exp(-o)))]}function A(t,e,n,r){const i=b(n,r);return[t/i*p,e/i*p]}function w(t,e,n,r,i=512){if(t.isGeospatial){const[t,i]=_(e,n,r),[o,a]=_(e+1,n+1,r);return{west:t,north:i,east:o,south:a}}const[o,a]=A(e,n,r,i),[s,u]=A(e+1,n+1,r,i);return{left:o,top:a,right:s,bottom:u}}function x(t,e,n,r,i){const o=function(t,e,n){let r;if(e&&2===e.length){const[n,i]=e,o=t.getBounds({z:n}),a=t.getBounds({z:i});r=[Math.min(o[0],a[0]),Math.min(o[1],a[1]),Math.max(o[2],a[2]),Math.max(o[3],a[3])]}else r=t.getBounds();return t.isGeospatial?[Math.max(r[0],n[0]),Math.max(r[1],n[1]),Math.min(r[2],n[2]),Math.min(r[3],n[3])]:[Math.max(Math.min(r[0],n[2]),n[0]),Math.max(Math.min(r[1],n[3]),n[1]),Math.min(Math.max(r[2],n[0]),n[2]),Math.min(Math.max(r[3],n[1]),n[3])]}(t,null,r),a=b(e,n),[s,u,l,c]=function(t,e,n){if(n)return g(t,n).map((t=>t*e/p));return t.map((t=>t*e/p))}(o,a,i),f=[];for(let h=Math.floor(s);h<l;h++)for(let t=Math.floor(u);t<c;t++)f.push({x:h,y:t,z:e});return f}function E({viewport:t,maxZoom:e,minZoom:n,zRange:r,extent:l,tileSize:c=512,modelMatrix:f,modelMatrixInverse:m,zoomOffset:y=0}){let v=t.isGeospatial?Math.round(t.zoom+Math.log2(p/c))+y:Math.ceil(t.zoom)+y;if("number"===typeof n&&Number.isFinite(n)&&v<n){if(!l)return[];v=n}"number"===typeof e&&Number.isFinite(e)&&v>e&&(v=e);let b=l;return f&&m&&l&&!t.isGeospatial&&(b=g(l,f)),t.isGeospatial?function(t,e,n,r){const l=t instanceof i.a&&t.resolution?t.projectPosition:null,c=Object.values(t.getFrustumPlanes()).map((({normal:t,distance:e})=>new a.e(t.clone().negate(),e))),f=new a.c(c),p=t.distanceScales.unitsPerMeter[2],d=n&&n[0]*p||0,m=n&&n[1]*p||0,g=t instanceof o.a&&t.pitch<=60?e:0;if(r){const[t,e,n,i]=r,o=Object(s.m)([t,i]),a=Object(s.m)([n,e]);r=[o[0],u-o[1],a[0],u-a[1]]}const y=new h(0,0,0),v={viewport:t,project:l,cullingVolume:f,elevationBounds:[d,m],minZ:g,maxZ:e,bounds:r,offset:0};if(y.update(v),t instanceof o.a&&t.subViewports&&t.subViewports.length>1){for(v.offset=-1;y.update(v)&&!(--v.offset<-3););for(v.offset=1;y.update(v)&&!(++v.offset>3););}return y.getSelected()}(t,v,r,l):x(t,v,c,b||d,m)}function O(t){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(t)}function S(t){return Number.isFinite(t.west)&&Number.isFinite(t.north)&&Number.isFinite(t.east)&&Number.isFinite(t.south)}},function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(6),i=n(208),o=n(74),a=n(10),s=n(73),u=n(308);const l="Resource subclass must define virtual methods";class c{get[Symbol.toStringTag](){return"Resource"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.b)(t);const{id:n,userData:i={}}=e;this.gl=t,this.gl2=t,this.id=n||Object(s.c)(this[Symbol.toStringTag]),this.userData=i,this._bound=!1,this._handle=e.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._initStats(),this._addStats()}toString(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}get handle(){return this._handle}delete(){let{deleteChildren:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,e&&t&&e.filter(Boolean).forEach((t=>t.delete())),this}bind(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!==typeof e?(this._bindHandle(e),this):(this._bound?t=e():(this._bindHandle(this.handle),this._bound=!0,t=e(),this._bound=!1,this._bindHandle(null)),t)}unbind(){this.bind(null)}getParameter(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object(o.b)(this.gl,t),Object(a.a)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=Object(r.j)(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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{parameters:e,keys:n}=t,i=this.constructor.PARAMETERS||{},a=Object(r.j)(this.gl),s={},u=e||Object.keys(i);for(const r of u){const e=i[r];if(e&&(!("webgl2"in e)||a)&&(!("extension"in e)||this.gl.getExtension(e.extension))){const i=n?Object(o.a)(this.gl,r):r;s[i]=this.getParameter(r,t),n&&"GLenum"===e.type&&(s[i]=Object(o.a)(this.gl,s[i]))}}return s}setParameter(t,e){t=Object(o.b)(this.gl,t),Object(a.a)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=Object(r.j)(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=Object(o.b)(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 Object(u.a)(this,t,e,n)}initialize(t){}_createHandle(){throw new Error(l)}_deleteHandle(){throw new Error(l)}_bindHandle(t){throw new Error(l)}_getOptsFromHandle(){throw new Error(l)}_getParameter(t,e){throw new Error(l)}_setParameter(t,e){throw new Error(l)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_initStats(){this.gl.stats=this.gl.stats||new i.a}_addStats(){const t=this[Symbol.toStringTag],e=i.b.get("Resource Counts");e.get("Resources Created").incrementCount(),e.get("".concat(t,"s Created")).incrementCount(),e.get("".concat(t,"s Active")).incrementCount()}_removeStats(){const t=this[Symbol.toStringTag];i.b.get("Resource Counts").get("".concat(t,"s Active")).decrementCount()}_trackAllocatedMemory(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag];this._doTrackAllocatedMemory(t,e),this._doTrackAllocatedMemory(t,e,this.gl.stats.get("Memory Usage"))}_doTrackAllocatedMemory(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.b.get("Memory Usage");n.get("GPU Memory").addCount(t),n.get("".concat(e," Memory")).addCount(t),this.byteLength=t}_trackDeallocatedMemory(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag];this._doTrackDeallocatedMemory(t),this._doTrackDeallocatedMemory(t,this.gl.stats.get("Memory Usage"))}_doTrackDeallocatedMemory(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.b.get("Memory Usage");e.get("GPU Memory").subtractCount(this.byteLength),e.get("".concat(t," Memory")).subtractCount(this.byteLength),this.byteLength=0}}},function(t,e,n){"use strict";n.r(e),n.d(e,"earthRadius",(function(){return r})),n.d(e,"factors",(function(){return i})),n.d(e,"unitsFactors",(function(){return o})),n.d(e,"areaFactors",(function(){return a})),n.d(e,"feature",(function(){return s})),n.d(e,"geometry",(function(){return u})),n.d(e,"point",(function(){return l})),n.d(e,"points",(function(){return c})),n.d(e,"polygon",(function(){return f})),n.d(e,"polygons",(function(){return h})),n.d(e,"lineString",(function(){return p})),n.d(e,"lineStrings",(function(){return d})),n.d(e,"featureCollection",(function(){return m})),n.d(e,"multiLineString",(function(){return g})),n.d(e,"multiPoint",(function(){return y})),n.d(e,"multiPolygon",(function(){return v})),n.d(e,"geometryCollection",(function(){return b})),n.d(e,"round",(function(){return _})),n.d(e,"radiansToLength",(function(){return A})),n.d(e,"lengthToRadians",(function(){return w})),n.d(e,"lengthToDegrees",(function(){return x})),n.d(e,"bearingToAzimuth",(function(){return E})),n.d(e,"radiansToDegrees",(function(){return O})),n.d(e,"degreesToRadians",(function(){return S})),n.d(e,"convertLength",(function(){return P})),n.d(e,"convertArea",(function(){return C})),n.d(e,"isNumber",(function(){return T})),n.d(e,"isObject",(function(){return k})),n.d(e,"validateBBox",(function(){return I})),n.d(e,"validateId",(function(){return L}));var r=6371008.8,i={centimeters:100*r,centimetres:100*r,degrees:r/111325,feet:3.28084*r,inches:39.37*r,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:1e3*r,millimetres:1e3*r,nauticalmiles:r/1852,radians:1,yards:r/1.0936},o={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r,yards:1/1.0936},a={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function u(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return l(e).geometry;case"LineString":return p(e).geometry;case"Polygon":return f(e).geometry;case"MultiPoint":return y(e).geometry;case"MultiLineString":return g(e).geometry;case"MultiPolygon":return v(e).geometry;default:throw new Error(t+" is invalid")}}function l(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!T(t[0])||!T(t[1]))throw new Error("coordinates must contain numbers");return s({type:"Point",coordinates:t},e,n)}function c(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return l(t,e)})),n)}function f(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return s({type:"Polygon",coordinates:t},e,n)}function h(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return f(t,e)})),n)}function p(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return s({type:"LineString",coordinates:t},e,n)}function d(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return p(t,e)})),n)}function m(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function g(t,e,n){return void 0===n&&(n={}),s({type:"MultiLineString",coordinates:t},e,n)}function y(t,e,n){return void 0===n&&(n={}),s({type:"MultiPoint",coordinates:t},e,n)}function v(t,e,n){return void 0===n&&(n={}),s({type:"MultiPolygon",coordinates:t},e,n)}function b(t,e,n){return void 0===n&&(n={}),s({type:"GeometryCollection",geometries:t},e,n)}function _(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function A(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}function w(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function x(t,e){return O(w(t,e))}function E(t){var e=t%360;return e<0&&(e+=360),e}function O(t){return 180*(t%(2*Math.PI))/Math.PI}function S(t){return t%360*Math.PI/180}function P(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return A(w(t,e),n)}function C(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=a[e];if(!r)throw new Error("invalid original units");var i=a[n];if(!i)throw new Error("invalid final units");return t/r*i}function T(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function k(t){return!!t&&t.constructor===Object}function I(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!T(t))throw new Error("bbox must only contain numbers")}))}function L(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r,i=n(303),o=n(22),a=n(93),s=n(13),u=n(26),l=n(23),c=n(33);!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL0ROW3=3]="COL0ROW3",t[t.COL1ROW0=4]="COL1ROW0",t[t.COL1ROW1=5]="COL1ROW1",t[t.COL1ROW2=6]="COL1ROW2",t[t.COL1ROW3=7]="COL1ROW3",t[t.COL2ROW0=8]="COL2ROW0",t[t.COL2ROW1=9]="COL2ROW1",t[t.COL2ROW2=10]="COL2ROW2",t[t.COL2ROW3=11]="COL2ROW3",t[t.COL3ROW0=12]="COL3ROW0",t[t.COL3ROW1=13]="COL3ROW1",t[t.COL3ROW2=14]="COL3ROW2",t[t.COL3ROW3=15]="COL3ROW3"}(r||(r={}));const f=45*Math.PI/180,h=1,p=.1,d=500,m=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class g extends i.a{static get IDENTITY(){return function(){v||(v=new g,Object.freeze(v));return v}()}static get ZERO(){return function(){y||(y=new g([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(y));return y}()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return r}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,a,s,u,l,c,f,h,p,d,m){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=u,this[9]=l,this[10]=c,this[11]=f,this[12]=h,this[13]=p,this[14]=d,this[15]=m,this.check()}setRowMajor(t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m){return this[0]=t,this[1]=i,this[2]=u,this[3]=h,this[4]=e,this[5]=o,this[6]=l,this[7]=p,this[8]=n,this[9]=a,this[10]=c,this[11]=d,this[12]=r,this[13]=s,this[14]=f,this[15]=m,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(m)}fromObject(t){return this.check()}fromQuaternion(t){return s.c(this,t),this.check()}frustum(t){const{left:e,right:n,bottom:r,top:i,near:o=p,far:a=d}=t;return a===1/0?function(t,e,n,r,i,o){const a=2*o/(n-e),s=2*o/(i-r),u=(n+e)/(n-e),l=(i+r)/(i-r),c=-1,f=-1,h=-2*o;t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=l,t[10]=c,t[11]=f,t[12]=0,t[13]=0,t[14]=h,t[15]=0}(this,e,n,r,i,o):s.d(this,e,n,r,i,o,a),this.check()}lookAt(t){const{eye:e,center:n=[0,0,0],up:r=[0,1,0]}=t;return s.g(this,e,n,r),this.check()}ortho(t){const{left:e,right:n,bottom:r,top:i,near:o=p,far:a=d}=t;return s.i(this,e,n,r,i,o,a),this.check()}orthographic(t){const{fovy:e=f,aspect:n=h,focalDistance:r=1,near:i=p,far:o=d}=t;b(e);const a=e/2,s=r*Math.tan(a),u=s*n;return this.ortho({left:-u,right:u,bottom:-s,top:s,near:i,far:o})}perspective(t){const{fovy:e=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=t;return b(e),s.j(this,e,n,r,i),this.check()}determinant(){return s.a(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,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),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]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),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 s.q(this,this),this.check()}invert(){return s.f(this,this),this.check()}multiplyLeft(t){return s.h(this,t,this),this.check()}multiplyRight(t){return s.h(this,this,t),this.check()}rotateX(t){return s.l(this,this,t),this.check()}rotateY(t){return s.m(this,this,t),this.check()}rotateZ(t){return s.n(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,e){return s.k(this,this,t,e),this.check()}scale(t){return s.o(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return s.p(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=c.n(e||[-0,-0,-0,-0],t,this),Object(o.b)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;let r;switch(n){case 2:r=u.j(e||[-0,-0],t,this);break;case 3:r=l.t(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(o.b)(r,t.length),r}transformAsVector(t,e){let n;switch(t.length){case 2:n=Object(a.a)(e||[-0,-0],t,this);break;case 3:n=Object(a.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(o.b)(n,t.length),n}transformPoint(t,e){return this.transformAsPoint(t,e)}transformVector(t,e){return this.transformAsPoint(t,e)}transformDirection(t,e){return this.transformAsVector(t,e)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}}let y,v;function b(t){if(t>2*Math.PI)throw Error("expected radians")}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(447),a=["url","name","description","credit","parameters","options","sizes"],s=["width","height","includeSizeAttributes","loading"];function u(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}var l=function(t){if(t.hasOwnProperty("url")&&"string"==typeof t.url){var e,n=JSON.stringify(t),r=t.url,l=t.name,c=t.description,f=t.credit,h=t.parameters,p=t.options,d=t.sizes,m=u(t,a),g=m.width,y=m.height,v=(m.includeSizeAttributes,m.loading),b=u(m,s),_={fit:"crop",crop:"faces,entropy,center"};try{e=new URL(r).pathname}catch(O){e=r}var A=[l,c,f].filter((function(t){return"undefined"!=typeof t&&null!=t})).join(". "),w=o.default.buildSrcSet(e,Object.assign({},_,h),Object.assign({},{maxWidth:2e3},p)),x=o.default.buildURL(e,Object.assign({},_,{w:1680})),E=Object.entries("undefined"===typeof d?{"(min-width:1400px)":"420px","(max-width: 399px)":"200px","(max-width: 599px)":"300px","(max-width: 799px)":"400px","(max-width:1024px)":"512px","(max-width:1199px)":"300px","(max-width:1399px)":"350px"}:d).map((function(t){return"".concat(t[0]," ").concat(t[1])})).join(", ");return i.a.createElement("img",Object.assign({key:n,src:x,srcSet:w,sizes:E,alt:A,crossOrigin:"anonymous",loading:v||"lazy",width:t.includeSizeAttributes?g:null,height:t.includeSizeAttributes?y:null},b))}return i.a.createElement(i.a.Fragment,null)};e.default=l,l.defaultProps={includeSizeAttributes:!1}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(17),a=n(1020),s=n.n(a),u=n(730);e.default=function(t){var e=Object(o.useStore)().uiSettings.setOverflowToolbarVisible;return i.a.createElement("div",{className:s.a.TrayContent,onScroll:function(){e(!1)}},t.children,i.a.createElement(u.default,null))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIntermediatePosition=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},e.GeoJsonEditMode=void 0;var r=l(n(984)),i=l(n(331)),o=l(n(985)),a=l(n(982)),s=n(97),u=n(161);function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(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.")}()}function f(t,e){if(t){if("string"===typeof t)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(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 p(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)}}var d={type:"FeatureCollection",features:[]},m=[],g=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=[],(n="_clickSequence")in(e=this)?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,l;return e=t,(n=[{key:"getGuides",value:function(t){return d}},{key:"getTooltips",value:function(t){return m}},{key:"getSelectedFeature",value:function(t){return 1===t.selectedIndexes.length?t.data.features[t.selectedIndexes[0]]:null}},{key:"getSelectedGeometry",value:function(t){var e=this.getSelectedFeature(t);return e?e.geometry:null}},{key:"getSelectedFeaturesAsFeatureCollection",value:function(t){var e=t.data.features;return{type:"FeatureCollection",features:t.selectedIndexes.map((function(t){return e[t]}))}}},{key:"getClickSequence",value:function(){return this._clickSequence}},{key:"addClickSequence",value:function(t){var e=t.mapCoords;this._clickSequence.push(e)}},{key:"resetClickSequence",value:function(){this._clickSequence=[]}},{key:"getTentativeGuide",value:function(t){return this.getGuides(t).features.find((function(t){return t.properties&&"tentative"===t.properties.guideType}))}},{key:"isSelectionPicked",value:function(t,e){if(!t.length)return!1;var n=(0,s.getNonGuidePicks)(t).map((function(t){return t.index})),r=(0,s.getPickedEditHandles)(t).map((function(t){return t.properties.featureIndex})),i=new Set([].concat(c(n),c(r)));return e.selectedIndexes.some((function(t){return i.has(t)}))}},{key:"rewindPolygon",value:function(t){var e=t.geometry;return"Polygon"===e.type||"MultiPolygon"===e.type?(0,a.default)(t):t}},{key:"getAddFeatureAction",value:function(t,e){var n=t,r="Feature"===n.type?n:{type:"Feature",properties:{},geometry:n},i=this.rewindPolygon(r),o=new u.ImmutableFeatureCollection(e).addFeature(i).getObject();return{updatedData:o,editType:"addFeature",editContext:{featureIndexes:[o.features.length-1]}}}},{key:"getAddManyFeaturesAction",value:function(t,e){var n,r=t.features,i=new u.ImmutableFeatureCollection(e),o=i.getObject().features.length,a=[],s=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=f(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(r);try{for(s.s();!(n=s.n()).done;){var l=n.value,c=l.properties,h=l.geometry;i=i.addFeature({type:"Feature",properties:c,geometry:h}),a.push(o+a.length)}}catch(p){s.e(p)}finally{s.f()}return{updatedData:i.getObject(),editType:"addFeature",editContext:{featureIndexes:a}}}},{key:"getAddFeatureOrBooleanPolygonAction",value:function(t,e){var n=t,a=this.getSelectedFeature(e),s=e.modeConfig;if(s&&s.booleanOperation){if(!a||"Polygon"!==a.geometry.type&&"MultiPolygon"!==a.geometry.type)return console.warn("booleanOperation only supported for single Polygon or MultiPolygon selection"),null;var l,c="Feature"===n.type?n:{type:"Feature",geometry:n};if("union"===s.booleanOperation)l=(0,r.default)(a,c);else if("difference"===s.booleanOperation)l=(0,i.default)(a,c);else{if("intersection"!==s.booleanOperation)return console.warn("Invalid booleanOperation ".concat(s.booleanOperation)),null;l=(0,o.default)(a,c)}if(!l)return console.warn("Canceling edit. Boolean operation erased entire polygon."),null;var f=e.selectedIndexes[0];return{updatedData:new u.ImmutableFeatureCollection(e.data).replaceGeometry(f,l.geometry).getObject(),editType:"unionGeometry",editContext:{featureIndexes:[f]}}}return this.getAddFeatureAction(t,e.data)}},{key:"createTentativeFeature",value:function(t){return null}},{key:"handleClick",value:function(t,e){}},{key:"handlePointerMove",value:function(t,e){var n=this.createTentativeFeature(e);n&&e.onEdit({updatedData:e.data,editType:"updateTentativeFeature",editContext:{feature:n}})}},{key:"handleStartDragging",value:function(t,e){}},{key:"handleStopDragging",value:function(t,e){}},{key:"handleDragging",value:function(t,e){}},{key:"handleKeyUp",value:function(t,e){"Escape"===t.key&&(this.resetClickSequence(),e.onEdit({updatedData:e.data,editType:"cancelFeature",editContext:{}}))}}])&&p(e.prototype,n),l&&p(e,l),t}();e.GeoJsonEditMode=g},function(t,e,n){"use strict";function r(t){const{source:e,target:n,start:r=0,size:i,getData:o}=t,a=t.end||n.length,s=e.length,u=a-r;if(s>u)return void n.set(e.subarray(0,u),r);if(n.set(e,r),!o)return;let l=s;for(;l<u;){const t=o(l,e);for(let e=0;e<i;e++)n[r+l]=t[e]||0,l++}}n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l})),n.d(e,"f",(function(){return c}));const i={interpolation:{duration:0,easing:t=>t},spring:{stiffness:.05,damping:.5}};function o(t,e){if(!t)return null;Number.isFinite(t)&&(t={type:"interpolation",duration:t});const n=t.type||"interpolation";return{...i[n],...e,...t,type:n}}function a(t,e){const n=e.getBuffer();return n?[n,{divisor:0,size:e.size,normalized:e.settings.normalized}]:e.value}function s(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 u(t){t.push(t.shift())}function l(t,e){const{doublePrecision:n,settings:r,value:i,size:o}=t,a=n&&i instanceof Float64Array?2:1;return(r.noAlloc?i.length:e*o)*a}function c({buffer:t,numInstances:e,attribute:n,fromLength:i,fromStartIndices:o,getData:a=(t=>t)}){const s=n.doublePrecision&&n.value instanceof Float64Array?2:1,u=n.size*s,c=n.byteOffset,f=n.startIndices,h=o&&f,p=l(n,e),d=n.isConstant;if(!h&&i>=p)return;const m=d?n.value:n.getBuffer().getData({srcByteOffset:c});if(n.settings.normalized&&!d){const t=a;a=(e,r)=>n.normalizeConstant(t(e,r))}const g=d?(t,e)=>a(m,e):(t,e)=>a(m.subarray(t,t+u),e),y=t.getData({length:i}),v=new Float32Array(p);!function({source:t,target:e,size:n,getData:i,sourceStartIndices:o,targetStartIndices:a}){if(!Array.isArray(a))return r({source:t,target:e,size:n,getData:i}),e;let s=0,u=0;const l=i&&((t,e)=>i(t+u,e)),c=Math.min(o.length,a.length);for(let f=1;f<c;f++){const i=o[f]*n,c=a[f]*n;r({source:t.subarray(s,i),target:e,start:u,end:c,size:n,getData:l}),s=i,u=c}u<e.length&&r({source:[],target:e,start:u,size:n,getData:l})}({source:y,target:v,sourceStartIndices:o,targetStartIndices:f,size:u,getData:g}),t.byteLength<v.byteLength+c&&t.reallocate(v.byteLength+c),t.subData({data:v,offset:c})}},function(t,e,n){t.exports={OverlayTools:"OverlayTools-module__OverlayTools___4tBLd",isCentered:"OverlayTools-module__isCentered___3hjD8",toggleOverlayTools:"OverlayTools-module__toggleOverlayTools___2CCJH",isOpen:"OverlayTools-module__isOpen___3JE0K",toolsWrapper:"OverlayTools-module__toolsWrapper___dWZFk",hideTools:"OverlayTools-module__hideTools___3wACC",scrollPane:"OverlayTools-module__scrollPane___2DceT",isActive:"OverlayTools-module__isActive___1jCOX",overlayListItem:"OverlayTools-module__overlayListItem___1FH7u",overlayTitle:"OverlayTools-module__overlayTitle___3_HdH",overlayToolButtons:"OverlayTools-module__overlayToolButtons___2KcH_",overlayToolLocate:"OverlayTools-module__overlayToolLocate___3MGAc",overlayToolShowHide:"OverlayTools-module__overlayToolShowHide___2oOyg",overlaysListAdvanced:"OverlayTools-module__overlaysListAdvanced___3cOWM",dropdownIndicator:"OverlayTools-module__dropdownIndicator___sWvwA",removeOverlay:"OverlayTools-module__removeOverlay___32j9o",dragHandle:"OverlayTools-module__dragHandle___3tPyI",isClosed:"OverlayTools-module__isClosed___2qJLJ",childOverlaysList:"OverlayTools-module__childOverlaysList___3OPni",childOverlaysGrid:"OverlayTools-module__childOverlaysGrid___2cVOZ",activeDropzone:"OverlayTools-module__activeDropzone___1jeF5",inactiveDropzone:"OverlayTools-module__inactiveDropzone___1PmmP",overlayColorKey:"OverlayTools-module__overlayColorKey___JVMlP"}},,function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f<e;)u&&u[f].run();f=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.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];l.push(new d(t,e)),1!==l.length||c||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";n.r(e);e.default={blue:{line:[73,120,138],fill:[73,120,138]},green:{line:[33,140,78],fill:[73,231,138]},red:{line:[213,0,80],fill:[213,0,80]},purple:{line:[214,76,239],fill:[214,76,239]},black:{line:[0,0,0],fill:[0,0,0]}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1021),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:a.a.TrayTitle},t.children)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(372),i=n(3),o=n.n(i),a=n(0),s=n.n(a);function u(t){return u="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},u(t)}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(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 f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(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 p(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function d(t){return e=t,(e-=0)===e?t:(t=t.replace(/[\-_\s]+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))).substr(0,1).toLowerCase()+t.substr(1);var e}function m(t){return t.split(";").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n,r=e.indexOf(":"),i=d(e.slice(0,r)),o=e.slice(r+1).trim();return i.startsWith("webkit")?t[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=o:t[i]=o,t}),{})}var g=!1;try{g=!0}catch(A){}function y(t){return r.b.icon?r.b.icon(t):null===t?null:"object"===u(t)&&t.prefix&&t.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"===typeof t?{prefix:"fas",iconName:t}:void 0}function v(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?l({},t,e):{}}function b(t){var e=t.forwardedRef,n=h(t,["forwardedRef"]),i=n.icon,o=n.mask,a=n.symbol,s=n.className,u=n.title,c=n.titleId,d=y(i),m=v("classes",[].concat(p(function(t){var e,n=t.spin,r=t.pulse,i=t.fixedWidth,o=t.inverse,a=t.border,s=t.listItem,u=t.flip,c=t.size,f=t.rotation,h=t.pull,p=(l(e={"fa-spin":n,"fa-pulse":r,"fa-fw":i,"fa-inverse":o,"fa-border":a,"fa-li":s,"fa-flip-horizontal":"horizontal"===u||"both"===u,"fa-flip-vertical":"vertical"===u||"both"===u},"fa-".concat(c),"undefined"!==typeof c&&null!==c),l(e,"fa-rotate-".concat(f),"undefined"!==typeof f&&null!==f&&0!==f),l(e,"fa-pull-".concat(h),"undefined"!==typeof h&&null!==h),l(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(p).map((function(t){return p[t]?t:null})).filter((function(t){return t}))}(n)),p(s.split(" ")))),A=v("transform","string"===typeof n.transform?r.b.transform(n.transform):n.transform),w=v("mask",y(o)),x=Object(r.a)(d,f({},m,{},A,{},w,{symbol:a,title:u,titleId:c}));if(!x)return function(){var t;!g&&console&&"function"===typeof console.error&&(t=console).error.apply(t,arguments)}("Could not find icon",d),null;var E=x.abstract,O={ref:e};return Object.keys(n).forEach((function(t){b.defaultProps.hasOwnProperty(t)||(O[t]=n[t])})),_(E[0],O)}b.displayName="FontAwesomeIcon",b.propTypes={border:o.a.bool,className:o.a.string,mask:o.a.oneOfType([o.a.object,o.a.array,o.a.string]),fixedWidth:o.a.bool,inverse:o.a.bool,flip:o.a.oneOf(["horizontal","vertical","both"]),icon:o.a.oneOfType([o.a.object,o.a.array,o.a.string]),listItem:o.a.bool,pull:o.a.oneOf(["right","left"]),pulse:o.a.bool,rotation:o.a.oneOf([0,90,180,270]),size:o.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:o.a.bool,symbol:o.a.oneOfType([o.a.bool,o.a.string]),title:o.a.string,transform:o.a.oneOfType([o.a.string,o.a.object]),swapOpacity:o.a.bool},b.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var _=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"===typeof n)return n;var i=(n.children||[]).map((function(n){return t(e,n)})),o=Object.keys(n.attributes||{}).reduce((function(t,e){var r=n.attributes[e];switch(e){case"class":t.attrs.className=r,delete n.attributes.class;break;case"style":t.attrs.style=m(r);break;default:0===e.indexOf("aria-")||0===e.indexOf("data-")?t.attrs[e.toLowerCase()]=r:t.attrs[d(e)]=r}return t}),{attrs:{}}),a=r.style,s=void 0===a?{}:a,u=h(r,["style"]);return o.attrs.style=f({},o.attrs.style,{},s),e.apply(void 0,[n.tag,f({},o.attrs,{},u)].concat(p(i)))}.bind(null,s.a.createElement)},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return r}));"undefined"!==typeof window&&window,"undefined"!==typeof t||window;var r="undefined"!==typeof document?document:{}}).call(this,n(36))},function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return s}));var r=n(10);const i={};function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[t]=i[t]||1;const e=i[t]++;return"".concat(t,"-").concat(e)}function a(t){return Object(r.a)("number"===typeof t,"Input must be a number"),t&&0===(t&t-1)}function s(t){let e=!0;for(const n in t){e=!1;break}return e}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(10);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 Object(r.a)(void 0!==i,"Accessing undefined constant GL.".concat(e)),i}function o(t,e){e=Number(e);for(const n in t)if(t[n]===e)return"GL.".concat(n);return String(e)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(1),i=n(27),o=n(55),a=n(61),s=n(12),u=n(100),l=n(13),c=n(24),f=n(15);const h=Math.PI/180,p=Object(o.a)(),d=[0,0,0],m={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};class g{constructor(t={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"x",void 0),Object(r.a)(this,"y",void 0),Object(r.a)(this,"width",void 0),Object(r.a)(this,"height",void 0),Object(r.a)(this,"padding",void 0),Object(r.a)(this,"isGeospatial",void 0),Object(r.a)(this,"zoom",void 0),Object(r.a)(this,"focalDistance",void 0),Object(r.a)(this,"position",void 0),Object(r.a)(this,"modelMatrix",void 0),Object(r.a)(this,"distanceScales",void 0),Object(r.a)(this,"scale",void 0),Object(r.a)(this,"center",void 0),Object(r.a)(this,"cameraPosition",void 0),Object(r.a)(this,"projectionMatrix",void 0),Object(r.a)(this,"viewMatrix",void 0),Object(r.a)(this,"viewMatrixUncentered",void 0),Object(r.a)(this,"viewMatrixInverse",void 0),Object(r.a)(this,"viewProjectionMatrix",void 0),Object(r.a)(this,"pixelProjectionMatrix",void 0),Object(r.a)(this,"pixelUnprojectionMatrix",void 0),Object(r.a)(this,"resolution",void 0),Object(r.a)(this,"_frustumPlanes",{}),this.id=t.id||this.constructor.displayName||"viewport",this.x=t.x||0,this.y=t.y||0,this.width=t.width||1,this.height=t.height||1,this.zoom=t.zoom||0,this.padding=t.padding,this.distanceScales=t.distanceScales||m,this.focalDistance=t.focalDistance||1,this.position=t.position||d,this.modelMatrix=t.modelMatrix||null;const{longitude:e,latitude:n}=t;this.isGeospatial=Number.isFinite(n)&&Number.isFinite(e),this._initProps(t),this._initMatrices(t),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?f.d.WEB_MERCATOR:f.d.WEB_MERCATOR_AUTO_OFFSET:f.d.IDENTITY}equals(t){return t instanceof g&&(this===t||t.width===this.width&&t.height===this.height&&t.scale===this.scale&&Object(s.j)(t.projectionMatrix,this.projectionMatrix)&&Object(s.j)(t.viewMatrix,this.viewMatrix))}project(t,{topLeft:e=!0}={}){const n=this.projectPosition(t),r=Object(c.q)(n,this.pixelProjectionMatrix),[i,o]=r,a=e?o:this.height-o;return 2===t.length?[i,a]:[i,a,r[2]]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,a=e?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],u=Object(c.o)([r,a,o],this.pixelUnprojectionMatrix,s),[l,f,h]=this.unprojectPosition(u);return Number.isFinite(o)?[l,f,h]:Number.isFinite(n)?[l,f,n]:[l,f]}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){if(this.isGeospatial){const e=Object(c.m)(t);return e[1]=Object(s.d)(e[1],-318,830),e}return t}unprojectFlat(t){return this.isGeospatial?Object(c.p)(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){return t?Object(c.h)({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,Object(o.d)(this.viewProjectionMatrix)),this._frustumPlanes}panByPosition(t,e){return null}_initProps(t){const e=t.longitude,n=t.latitude;this.isGeospatial&&(Number.isFinite(t.zoom)||(this.zoom=Object(c.j)({latitude:n})+Math.log2(this.focalDistance)),this.distanceScales=t.distanceScales||Object(c.h)({latitude:n,longitude:e}));const r=Math.pow(2,this.zoom);this.scale=r;const{position:i,modelMatrix:o}=t;let s=d;if(i&&(s=o?new a.a(o).transformAsVector(i,[]):i),this.isGeospatial){const t=this.projectPosition([e,n,0]);this.center=new u.a(s).scale(this.distanceScales.unitsPerMeter).add(t)}else this.center=this.projectPosition(s)}_initMatrices(t){const{viewMatrix:e=p,projectionMatrix:n=null,orthographic:r=!1,fovyRadians:c,fovy:f=75,near:d=.1,far:m=1e3,padding:g=null,focalDistance:y=1}=t;this.viewMatrixUncentered=e,this.viewMatrix=(new a.a).multiplyRight(e).translate(new u.a(this.center).negate()),this.projectionMatrix=n||function({width:t,height:e,orthographic:n,fovyRadians:r,focalDistance:i,padding:o,near:u,far:l}){const c=t/e,f=n?(new a.a).orthographic({fovy:r,aspect:c,focalDistance:i,near:u,far:l}):(new a.a).perspective({fovy:r,aspect:c,near:u,far:l});if(o){const{left:n=0,right:r=0,top:i=0,bottom:a=0}=o,u=Object(s.d)((n+t-r)/2,0,t)-t/2,l=Object(s.d)((i+e-a)/2,0,e)-e/2;f[8]-=2*u/t,f[9]+=2*l/e}return f}({width:this.width,height:this.height,orthographic:r,fovyRadians:c||f*h,focalDistance:y,padding:g,near:d,far:m});const v=Object(o.a)();l.h(v,v,this.projectionMatrix),l.h(v,v,this.viewMatrix),this.viewProjectionMatrix=v,this.viewMatrixInverse=l.f([],this.viewMatrix)||this.viewMatrix,this.cameraPosition=Object(o.c)(this.viewMatrixInverse);const b=Object(o.a)(),_=Object(o.a)();l.o(b,b,[this.width/2,-this.height/2,1]),l.p(b,b,[1,-1,0]),l.h(_,b,this.viewProjectionMatrix),this.pixelProjectionMatrix=_,this.pixelUnprojectionMatrix=l.f(Object(o.a)(),this.pixelProjectionMatrix),this.pixelUnprojectionMatrix||i.a.warn("Pixel project matrix not invertible")()}}Object(r.a)(g,"displayName","Viewport")},function(t,e,n){"use strict";n.r(e),n.d(e,"useParentContext",(function(){return c}));var r=n(0),i=n(17),o=n(2),a=n(1017),s=n(14);function u(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(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 l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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 c=function(t){var e=t.currentItem,n=t.clear,l=t.setTo,c="checkQuery",f="doParentage",h="writeQuery",p="pushToHistory",d="parentCheck",m="loading",g="done",y=Object(s.e)(),v=Object(i.useStore)(),b=v.parentContext,_=v.parentContext,A=_.parent,w=_.pending,x=(_.pushEntry,v.pushToInternalHistory),E=v.setCollectionSlug,O=u(Object(r.useState)(c),2),S=O[0],P=O[1],C=u(Object(r.useState)(),2),T=C[0],k=C[1],I=u(Object(r.useState)(!1),2),L=I[0],j=I[1],M=u(Object(r.useState)(y.href),2),R=M[0],N=M[1];Object(a.useMapZooming)(e),Object(r.useEffect)((function(){l&&b.pushEntry(l)}),[l]),Object(r.useEffect)((function(){if(e)switch(S){case c:A||null!==w&&void 0!==w&&w.isParentOf(e)?P(f):(F(),k(p),P(m));break;case f:null!==A&&void 0!==A&&A.isParentOf(e)?(j(!0),P(h)):null!==w&&void 0!==w&&w.isParentOf(e)?(b.promotePending(),k(h),P(m)):b.containsAnyParentFor(e)?(b.removeEntriesAfterParentOf(e),P(h)):(b.clear(),P(h));break;case h:D(),P(p);break;case p:L?x(R,!0):x(R),P(d);break;case d:"CollectionModel"===Object(o.getType)(e).name&&b.pushPending(e),P(g);break;case m:b.loading.isLoading||P(T)}else x(R)}),[S,b.loading.isLoading]),Object(r.useEffect)((function(){if(A&&e){var t=A.positionOf(e);t>-1&&A.setIndexPosition(t)}}),[A,e]),Object(r.useEffect)((function(){A&&e&&e.id===A.id&&b.removeEntriesAfterParentOf(e)}),[e]);var D=function(){var t=new URLSearchParams(y.search).get("parent");if(b.entries.length&&!t){var e=JSON.stringify({entries:b.entries.map((function(t){return t.slug}))}),n=btoa(e),r=new URL(y.href);r.searchParams.append("parent",n);var i=r.toString();window.history.replaceState({},document.title,i),N(i)}},F=function(){var t=new URLSearchParams(y.search).get("parent");if(t)try{var n=atob(t),r=JSON.parse(n);r.entries.map((function(t){b.pushEntry(t)})),"record"===e.type&&E(r.entries[r.entries.length-1])}catch(i){console.warn("Parent context could not be rehydrated.",i)}};return n?(b.clear(),null):A}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(679),a=n(17);function s(t){var e=t.title,n=t.description,r=t.image,s=t.url,u=(t.site,t.creator,t.appendSiteDescription),l=Object(a.useStore)().siteMeta,c="",f=l.site_description;return n&&(c=n.replace(/(<([^>]+)>)/gi,"").trim()),u&&(c.length&&(c+=" "),c+=f),e&&(e+=" | "+l.siteMetaAttributes.title),i.a.createElement(o.a,{title:e},s&&i.a.createElement("link",{rel:"canonical",href:s}),s&&i.a.createElement("meta",{property:"og:url",content:s}),e&&i.a.createElement("meta",{property:"og:title",content:e}),e&&i.a.createElement("meta",{name:"twitter:title",content:e}),n&&i.a.createElement("meta",{name:"description",content:function(t){return t.length>170?t.substring(0,169)+"\u2026":t}(c)}),n&&i.a.createElement("meta",{property:"og:description",content:c}),n&&i.a.createElement("meta",{name:"twitter:description",content:c}),r&&i.a.createElement("meta",{property:"og:image",content:r}),r&&i.a.createElement("meta",{name:"twitter:image",content:r}))}s.defaultProps={title:"",description:"",image:"",url:"",site:"",creator:"",appendSiteDescription:!1},e.default=s},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return a}));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){let{clamped:e=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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(t){let{data:e,width:n,height:r,bytesPerPixel:i=4,temp:o}=t;const a=n*i;o=o||new Uint8Array(a);for(let s=0;s<r/2;++s){const t=s*a,n=(r-s-1)*a;o.set(e.subarray(t,t+a)),e.copyWithin(t,n,n+a),e.set(o,n)}}function a(t){let{data:e,width:n,height:r}=t;const i=Math.round(n/2),o=Math.round(r/2),a=new Uint8Array(i*o*4);for(let s=0;s<o;s++)for(let t=0;t<i;t++)for(let r=0;r<4;r++)a[4*(s*i+t)+r]=e[4*(2*s*n+2*t)+r];return{data:a,width:i,height:o}}},function(t,e,n){"use strict";(function(t,r){function i(t){return i="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},i(t)}n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"c",(function(){return l}));var o={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},a=o.global||o.self||o.window||{},s="object"!==("undefined"===typeof r?"undefined":i(r))||"[object process]"!==String(r)||r.browser,u="function"===typeof importScripts,l="undefined"!==typeof window&&"undefined"!==typeof window.orientation,c="undefined"!==typeof r&&r.version&&/v([0-9]*)/.exec(r.version);c&&parseFloat(c[1])}).call(this,n(36),n(68))},function(t,e,n){"use strict";function r(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 i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}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},o.apply(this,arguments)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e,n){return c=l()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&u(i,n.prototype),i},c.apply(null,arguments)}function f(t){var e="function"===typeof Map?new Map:void 0;return f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return c(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)},f(t)}function h(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 p(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"===typeof t)return h(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)?h(t,e):void 0}}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(e,"__esModule",{value:!0});var d=function(t){function e(){return t.apply(this,arguments)||this}return a(e,t),e}(f(Error)),m=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return a(e,t),e}(d),g=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return a(e,t),e}(d),y=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return a(e,t),e}(d),v=function(t){function e(){return t.apply(this,arguments)||this}return a(e,t),e}(d),b=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return a(e,t),e}(d),_=function(t){function e(){return t.apply(this,arguments)||this}return a(e,t),e}(d),A=function(t){function e(){return t.call(this,"Zone is an abstract class")||this}return a(e,t),e}(d),w="numeric",x="short",E="long",O={year:w,month:w,day:w},S={year:w,month:x,day:w},P={year:w,month:x,day:w,weekday:x},C={year:w,month:E,day:w},T={year:w,month:E,day:w,weekday:E},k={hour:w,minute:w},I={hour:w,minute:w,second:w},L={hour:w,minute:w,second:w,timeZoneName:x},j={hour:w,minute:w,second:w,timeZoneName:E},M={hour:w,minute:w,hourCycle:"h23"},R={hour:w,minute:w,second:w,hourCycle:"h23"},N={hour:w,minute:w,second:w,hourCycle:"h23",timeZoneName:x},D={hour:w,minute:w,second:w,hourCycle:"h23",timeZoneName:E},F={year:w,month:w,day:w,hour:w,minute:w},B={year:w,month:w,day:w,hour:w,minute:w,second:w},z={year:w,month:x,day:w,hour:w,minute:w},U={year:w,month:x,day:w,hour:w,minute:w,second:w},G={year:w,month:x,day:w,weekday:x,hour:w,minute:w},V={year:w,month:E,day:w,hour:w,minute:w,timeZoneName:x},q={year:w,month:E,day:w,hour:w,minute:w,second:w,timeZoneName:x},H={year:w,month:E,day:w,weekday:E,hour:w,minute:w,timeZoneName:E},W={year:w,month:E,day:w,weekday:E,hour:w,minute:w,second:w,timeZoneName:E};function X(t){return"undefined"===typeof t}function Y(t){return"number"===typeof t}function Z(t){return"number"===typeof t&&t%1===0}function K(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function $(t,e,n){if(0!==t.length)return t.reduce((function(t,r){var i=[e(r),r];return t&&n(t[0],i[0])===t[0]?t:i}),null)[1]}function J(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Q(t,e,n){return Z(t)&&t>=e&&t<=n}function tt(t,e){void 0===e&&(e=2);var n=t<0?"-":"",r=n?-1*t:t;return""+n+(r.toString().length<e?("0".repeat(e)+r).slice(-e):r.toString())}function et(t){return X(t)||null===t||""===t?void 0:parseInt(t,10)}function nt(t){if(!X(t)&&null!==t&&""!==t){var e=1e3*parseFloat("0."+t);return Math.floor(e)}}function rt(t,e,n){void 0===n&&(n=!1);var r=Math.pow(10,e);return(n?Math.trunc:Math.round)(t*r)/r}function it(t){return t%4===0&&(t%100!==0||t%400===0)}function ot(t){return it(t)?366:365}function at(t,e){var n=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===n?it(t+(e-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function st(t){var e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e)).setUTCFullYear(e.getUTCFullYear()-1900),+e}function ut(t){var e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,n=t-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===e||3===r?53:52}function lt(t){return t>99?t:t>60?1900+t:2e3+t}function ct(t,e,n,r){void 0===r&&(r=null);var i=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);var s=o({timeZoneName:e},a),u=new Intl.DateTimeFormat(n,s).formatToParts(i).find((function(t){return"timezonename"===t.type.toLowerCase()}));return u?u.value:null}function ft(t,e){var n=parseInt(t,10);Number.isNaN(n)&&(n=0);var r=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ht(t){var e=Number(t);if("boolean"===typeof t||""===t||Number.isNaN(e))throw new _("Invalid unit value "+t);return e}function pt(t,e){var n={};for(var r in t)if(J(t,r)){var i=t[r];if(void 0===i||null===i)continue;n[e(r)]=ht(i)}return n}function dt(t,e){var n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return""+i+tt(n,2)+":"+tt(r,2);case"narrow":return""+i+n+(r>0?":"+r:"");case"techie":return""+i+tt(n,2)+tt(r,2);default:throw new RangeError("Value format "+e+" is out of range for property format")}}function mt(t){return function(t,e){return e.reduce((function(e,n){return e[n]=t[n],e}),{})}(t,["hour","minute","second","millisecond"])}var gt=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/,yt=["January","February","March","April","May","June","July","August","September","October","November","December"],vt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],bt=["J","F","M","A","M","J","J","A","S","O","N","D"];function _t(t){switch(t){case"narrow":return[].concat(bt);case"short":return[].concat(vt);case"long":return[].concat(yt);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var At=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],wt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],xt=["M","T","W","T","F","S","S"];function Et(t){switch(t){case"narrow":return[].concat(xt);case"short":return[].concat(wt);case"long":return[].concat(At);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Ot=["AM","PM"],St=["Before Christ","Anno Domini"],Pt=["BC","AD"],Ct=["B","A"];function Tt(t){switch(t){case"narrow":return[].concat(Ct);case"short":return[].concat(Pt);case"long":return[].concat(St);default:return null}}function kt(t,e){for(var n,r="",i=p(t);!(n=i()).done;){var o=n.value;o.literal?r+=o.val:r+=e(o.val)}return r}var It={D:O,DD:S,DDD:C,DDDD:T,t:k,tt:I,ttt:L,tttt:j,T:M,TT:R,TTT:N,TTTT:D,f:F,ff:z,fff:V,ffff:H,F:B,FF:U,FFF:q,FFFF:W},Lt=function(){function t(t,e){this.opts=e,this.loc=t,this.systemLoc=null}t.create=function(e,n){return void 0===n&&(n={}),new t(e,n)},t.parseFormat=function(t){for(var e=null,n="",r=!1,i=[],o=0;o<t.length;o++){var a=t.charAt(o);"'"===a?(n.length>0&&i.push({literal:r,val:n}),e=null,n="",r=!r):r||a===e?n+=a:(n.length>0&&i.push({literal:!1,val:n}),n=a,e=a)}return n.length>0&&i.push({literal:r,val:n}),i},t.macroTokenToFormatOpts=function(t){return It[t]};var e=t.prototype;return e.formatWithSystemDefault=function(t,e){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,o({},this.opts,e)).format()},e.formatDateTime=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,o({},this.opts,e)).format()},e.formatDateTimeParts=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,o({},this.opts,e)).formatToParts()},e.resolvedOptions=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,o({},this.opts,e)).resolvedOptions()},e.num=function(t,e){if(void 0===e&&(e=0),this.opts.forceSimple)return tt(t,e);var n=o({},this.opts);return e>0&&(n.padTo=e),this.loc.numberFormatter(n).format(t)},e.formatDateTimeFromString=function(e,n){var r=this,i="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,a=function(t,n){return r.loc.extract(e,t,n)},s=function(t){return e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):""},u=function(){return i?function(t){return Ot[t.hour<12?0:1]}(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod")},l=function(t,n){return i?function(t,e){return _t(e)[t.month-1]}(e,t):a(n?{month:t}:{month:t,day:"numeric"},"month")},c=function(t,n){return i?function(t,e){return Et(e)[t.weekday-1]}(e,t):a(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday")},f=function(t){return i?function(t,e){return Tt(e)[t.year<0?0:1]}(e,t):a({era:t},"era")};return kt(t.parseFormat(n),(function(n){switch(n){case"S":return r.num(e.millisecond);case"u":case"SSS":return r.num(e.millisecond,3);case"s":return r.num(e.second);case"ss":return r.num(e.second,2);case"m":return r.num(e.minute);case"mm":return r.num(e.minute,2);case"h":return r.num(e.hour%12===0?12:e.hour%12);case"hh":return r.num(e.hour%12===0?12:e.hour%12,2);case"H":return r.num(e.hour);case"HH":return r.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return s({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:r.loc.locale});case"z":return e.zoneName;case"a":return u();case"d":return o?a({day:"numeric"},"day"):r.num(e.day);case"dd":return o?a({day:"2-digit"},"day"):r.num(e.day,2);case"c":case"E":return r.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?a({month:"numeric",day:"numeric"},"month"):r.num(e.month);case"LL":return o?a({month:"2-digit",day:"numeric"},"month"):r.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?a({month:"numeric"},"month"):r.num(e.month);case"MM":return o?a({month:"2-digit"},"month"):r.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?a({year:"numeric"},"year"):r.num(e.year);case"yy":return o?a({year:"2-digit"},"year"):r.num(e.year.toString().slice(-2),2);case"yyyy":return o?a({year:"numeric"},"year"):r.num(e.year,4);case"yyyyyy":return o?a({year:"numeric"},"year"):r.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return r.num(e.weekYear.toString().slice(-2),2);case"kkkk":return r.num(e.weekYear,4);case"W":return r.num(e.weekNumber);case"WW":return r.num(e.weekNumber,2);case"o":return r.num(e.ordinal);case"ooo":return r.num(e.ordinal,3);case"q":return r.num(e.quarter);case"qq":return r.num(e.quarter,2);case"X":return r.num(Math.floor(e.ts/1e3));case"x":return r.num(e.ts);default:return function(n){var i=t.macroTokenToFormatOpts(n);return i?r.formatWithSystemDefault(e,i):n}(n)}}))},e.formatDurationFromString=function(e,n){var r,i=this,o=function(t){switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},a=t.parseFormat(n),s=a.reduce((function(t,e){var n=e.literal,r=e.val;return n?t:t.concat(r)}),[]),u=e.shiftTo.apply(e,s.map(o).filter((function(t){return t})));return kt(a,(r=u,function(t){var e=o(t);return e?i.num(r.get(e),t.length):t}))},t}(),jt=function(){function t(t,e){this.reason=t,this.explanation=e}return t.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},t}(),Mt=function(){function t(){}var e=t.prototype;return e.offsetName=function(t,e){throw new A},e.formatOffset=function(t,e){throw new A},e.offset=function(t){throw new A},e.equals=function(t){throw new A},i(t,[{key:"type",get:function(){throw new A}},{key:"name",get:function(){throw new A}},{key:"isUniversal",get:function(){throw new A}},{key:"isValid",get:function(){throw new A}}]),t}(),Rt=null,Nt=function(t){function e(){return t.apply(this,arguments)||this}a(e,t);var n=e.prototype;return n.offsetName=function(t,e){return ct(t,e.format,e.locale)},n.formatOffset=function(t,e){return dt(this.offset(t),e)},n.offset=function(t){return-new Date(t).getTimezoneOffset()},n.equals=function(t){return"system"===t.type},i(e,[{key:"type",get:function(){return"system"}},{key:"name",get:function(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Rt&&(Rt=new e),Rt}}]),e}(Mt),Dt=RegExp("^"+gt.source+"$"),Ft={};var Bt={year:0,month:1,day:2,hour:3,minute:4,second:5};var zt={},Ut=function(t){function e(n){var r;return(r=t.call(this)||this).zoneName=n,r.valid=e.isValidZone(n),r}a(e,t),e.create=function(t){return zt[t]||(zt[t]=new e(t)),zt[t]},e.resetCache=function(){zt={},Ft={}},e.isValidSpecifier=function(t){return!(!t||!t.match(Dt))},e.isValidZone=function(t){try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(e){return!1}},e.parseGMTOffset=function(t){if(t){var e=t.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var n=e.prototype;return n.offsetName=function(t,e){return ct(t,e.format,e.locale,this.name)},n.formatOffset=function(t,e){return dt(this.offset(t),e)},n.offset=function(t){var e=new Date(t);if(isNaN(e))return NaN;var n,r=(n=this.name,Ft[n]||(Ft[n]=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Ft[n]),i=r.formatToParts?function(t,e){for(var n=t.formatToParts(e),r=[],i=0;i<n.length;i++){var o=n[i],a=o.type,s=o.value,u=Bt[a];X(u)||(r[u]=parseInt(s,10))}return r}(r,e):function(t,e){var n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),i=r[1],o=r[2];return[r[3],i,o,r[4],r[5],r[6]]}(r,e),o=+e,a=o%1e3;return(st({year:i[0],month:i[1],day:i[2],hour:i[3],minute:i[4],second:i[5],millisecond:0})-(o-=a>=0?a:1e3+a))/6e4},n.equals=function(t){return"iana"===t.type&&t.name===this.name},i(e,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),e}(Mt),Gt=null,Vt=function(t){function e(e){var n;return(n=t.call(this)||this).fixed=e,n}a(e,t),e.instance=function(t){return 0===t?e.utcInstance:new e(t)},e.parseSpecifier=function(t){if(t){var n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(ft(n[1],n[2]))}return null};var n=e.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(t,e){return dt(this.fixed,e)},n.offset=function(){return this.fixed},n.equals=function(t){return"fixed"===t.type&&t.fixed===this.fixed},i(e,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+dt(this.fixed,"narrow")}},{key:"isUniversal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}],[{key:"utcInstance",get:function(){return null===Gt&&(Gt=new e(0)),Gt}}]),e}(Mt),qt=function(t){function e(e){var n;return(n=t.call(this)||this).zoneName=e,n}a(e,t);var n=e.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},i(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Mt);function Ht(t,e){var n;if(X(t)||null===t)return e;if(t instanceof Mt)return t;if("string"===typeof t){var r=t.toLowerCase();return"local"===r||"system"===r?e:"utc"===r||"gmt"===r?Vt.utcInstance:null!=(n=Ut.parseGMTOffset(t))?Vt.instance(n):Ut.isValidSpecifier(r)?Ut.create(t):Vt.parseSpecifier(r)||new qt(t)}return Y(t)?Vt.instance(t):"object"===typeof t&&t.offset&&"number"===typeof t.offset?t:new qt(t)}var Wt,Xt=function(){return Date.now()},Yt="system",Zt=null,Kt=null,$t=null,Jt=function(){function t(){}return t.resetCaches=function(){ce.resetCache(),Ut.resetCache()},i(t,null,[{key:"now",get:function(){return Xt},set:function(t){Xt=t}},{key:"defaultZone",get:function(){return Ht(Yt,Nt.instance)},set:function(t){Yt=t}},{key:"defaultLocale",get:function(){return Zt},set:function(t){Zt=t}},{key:"defaultNumberingSystem",get:function(){return Kt},set:function(t){Kt=t}},{key:"defaultOutputCalendar",get:function(){return $t},set:function(t){$t=t}},{key:"throwOnInvalid",get:function(){return Wt},set:function(t){Wt=t}}]),t}(),Qt=["base"],te={};function ee(t,e){void 0===e&&(e={});var n=JSON.stringify([t,e]),r=te[n];return r||(r=new Intl.DateTimeFormat(t,e),te[n]=r),r}var ne={};var re={};function ie(t,e){void 0===e&&(e={});var n=e;n.base;var 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}(n,Qt),i=JSON.stringify([t,r]),o=re[i];return o||(o=new Intl.RelativeTimeFormat(t,e),re[i]=o),o}var oe=null;function ae(t,e,n,r,i){var o=t.listingMode(n);return"error"===o?null:"en"===o?r(e):i(e)}var se=function(){function t(t,e,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!e){var r={useGrouping:!1};n.padTo>0&&(r.minimumIntegerDigits=n.padTo),this.inf=function(t,e){void 0===e&&(e={});var n=JSON.stringify([t,e]),r=ne[n];return r||(r=new Intl.NumberFormat(t,e),ne[n]=r),r}(t,r)}}return t.prototype.format=function(t){if(this.inf){var e=this.floor?Math.floor(t):t;return this.inf.format(e)}return tt(this.floor?Math.floor(t):rt(t,3),this.padTo)},t}(),ue=function(){function t(t,e,n){var r;if(this.opts=n,t.zone.isUniversal){var i=t.offset/60*-1,a=i>=0?"Etc/GMT+"+i:"Etc/GMT"+i,s=Ut.isValidZone(a);0!==t.offset&&s?(r=a,this.dt=t):(r="UTC",n.timeZoneName?this.dt=t:this.dt=0===t.offset?t:pr.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,r=t.zone.name);var u=o({},this.opts);r&&(u.timeZone=r),this.dtf=ee(e,u)}var e=t.prototype;return e.format=function(){return this.dtf.format(this.dt.toJSDate())},e.formatToParts=function(){return this.dtf.formatToParts(this.dt.toJSDate())},e.resolvedOptions=function(){return this.dtf.resolvedOptions()},t}(),le=function(){function t(t,e,n){this.opts=o({style:"long"},n),!e&&K()&&(this.rtf=ie(t,n))}var e=t.prototype;return e.format=function(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&o){var a="days"===t;switch(e){case 1:return a?"tomorrow":"next "+i[t][0];case-1:return a?"yesterday":"last "+i[t][0];case 0:return a?"today":"this "+i[t][0]}}var s=Object.is(e,-0)||e<0,u=Math.abs(e),l=1===u,c=i[t],f=r?l?c[1]:c[2]||c[1]:l?i[t][0]:t;return s?u+" "+f+" ago":"in "+u+" "+f}(e,t,this.opts.numeric,"long"!==this.opts.style)},e.formatToParts=function(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]},t}(),ce=function(){function t(t,e,n,r){var i=function(t){var e=t.indexOf("-u-");if(-1===e)return[t];var n,r=t.substring(0,e);try{n=ee(t).resolvedOptions()}catch(o){n=ee(r).resolvedOptions()}var i=n;return[r,i.numberingSystem,i.calendar]}(t),o=i[0],a=i[1],s=i[2];this.locale=o,this.numberingSystem=e||a||null,this.outputCalendar=n||s||null,this.intl=function(t,e,n){return n||e?(t+="-u",n&&(t+="-ca-"+n),e&&(t+="-nu-"+e),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}t.fromOpts=function(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},t.create=function(e,n,r,i){void 0===i&&(i=!1);var o=e||Jt.defaultLocale;return new t(o||(i?"en-US":oe||(oe=(new Intl.DateTimeFormat).resolvedOptions().locale)),n||Jt.defaultNumberingSystem,r||Jt.defaultOutputCalendar,o)},t.resetCache=function(){oe=null,te={},ne={},re={}},t.fromObject=function(e){var n=void 0===e?{}:e,r=n.locale,i=n.numberingSystem,o=n.outputCalendar;return t.create(r,i,o)};var e=t.prototype;return e.listingMode=function(t){var e=this.isEnglish(),n=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return e&&n?"en":"intl"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(t){return void 0===t&&(t={}),this.clone(o({},t,{defaultToEN:!0}))},e.redefaultToSystem=function(t){return void 0===t&&(t={}),this.clone(o({},t,{defaultToEN:!1}))},e.months=function(t,e,n){var r=this;return void 0===e&&(e=!1),void 0===n&&(n=!0),ae(this,t,n,_t,(function(){var n=e?{month:t,day:"numeric"}:{month:t},i=e?"format":"standalone";return r.monthsCache[i][t]||(r.monthsCache[i][t]=function(t){for(var e=[],n=1;n<=12;n++){var r=pr.utc(2016,n,1);e.push(t(r))}return e}((function(t){return r.extract(t,n,"month")}))),r.monthsCache[i][t]}))},e.weekdays=function(t,e,n){var r=this;return void 0===e&&(e=!1),void 0===n&&(n=!0),ae(this,t,n,Et,(function(){var n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=e?"format":"standalone";return r.weekdaysCache[i][t]||(r.weekdaysCache[i][t]=function(t){for(var e=[],n=1;n<=7;n++){var r=pr.utc(2016,11,13+n);e.push(t(r))}return e}((function(t){return r.extract(t,n,"weekday")}))),r.weekdaysCache[i][t]}))},e.meridiems=function(t){var e=this;return void 0===t&&(t=!0),ae(this,void 0,t,(function(){return Ot}),(function(){if(!e.meridiemCache){var t={hour:"numeric",hourCycle:"h12"};e.meridiemCache=[pr.utc(2016,11,13,9),pr.utc(2016,11,13,19)].map((function(n){return e.extract(n,t,"dayperiod")}))}return e.meridiemCache}))},e.eras=function(t,e){var n=this;return void 0===e&&(e=!0),ae(this,t,e,Tt,(function(){var e={era:t};return n.eraCache[t]||(n.eraCache[t]=[pr.utc(-40,1,1),pr.utc(2017,1,1)].map((function(t){return n.extract(t,e,"era")}))),n.eraCache[t]}))},e.extract=function(t,e,n){var r=this.dtFormatter(t,e).formatToParts().find((function(t){return t.type.toLowerCase()===n}));return r?r.value:null},e.numberFormatter=function(t){return void 0===t&&(t={}),new se(this.intl,t.forceSimple||this.fastNumbers,t)},e.dtFormatter=function(t,e){return void 0===e&&(e={}),new ue(t,this.intl,e)},e.relFormatter=function(t){return void 0===t&&(t={}),new le(this.intl,this.isEnglish(),t)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar},i(t,[{key:"fastNumbers",get:function(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),t}();function fe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.reduce((function(t,e){return t+e.source}),"");return RegExp("^"+r+"$")}function he(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.reduce((function(e,n){var r=e[0],i=e[1],a=e[2],s=n(t,a),u=s[0],l=s[1],c=s[2];return[o({},r,u),i||l,c]}),[{},null,1]).slice(0,2)}}function pe(t){if(null==t)return[null,null];for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i],s=a[0],u=a[1],l=s.exec(t);if(l)return u(l)}return[null,null]}function de(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t,n){var r,i={};for(r=0;r<e.length;r++)i[e[r]]=et(t[n+r]);return[i,null,n+r]}}var me=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ge=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ye=RegExp(""+ge.source+me.source+"?"),ve=RegExp("(?:T"+ye.source+")?"),be=de("weekYear","weekNumber","weekDay"),_e=de("year","ordinal"),Ae=RegExp(ge.source+" ?(?:"+me.source+"|("+gt.source+"))?"),we=RegExp("(?: "+Ae.source+")?");function xe(t,e,n){var r=t[e];return X(r)?n:et(r)}function Ee(t,e){return[{year:xe(t,e),month:xe(t,e+1,1),day:xe(t,e+2,1)},null,e+3]}function Oe(t,e){return[{hours:xe(t,e,0),minutes:xe(t,e+1,0),seconds:xe(t,e+2,0),milliseconds:nt(t[e+3])},null,e+4]}function Se(t,e){var n=!t[e]&&!t[e+1],r=ft(t[e+1],t[e+2]);return[{},n?null:Vt.instance(r),e+3]}function Pe(t,e){return[{},t[e]?Ut.create(t[e]):null,e+1]}var Ce=RegExp("^T?"+ge.source+"$"),Te=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function ke(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c="-"===e[0],f=u&&"-"===u[0],h=function(t,e){return void 0===e&&(e=!1),void 0!==t&&(e||t&&c)?-t:t};return[{years:h(et(n)),months:h(et(r)),weeks:h(et(i)),days:h(et(o)),hours:h(et(a)),minutes:h(et(s)),seconds:h(et(u),"-0"===u),milliseconds:h(nt(l),f)}]}var Ie={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Le(t,e,n,r,i,o,a){var s={year:2===e.length?lt(et(e)):et(e),month:vt.indexOf(n)+1,day:et(r),hour:et(i),minute:et(o)};return a&&(s.second=et(a)),t&&(s.weekday=t.length>3?At.indexOf(t)+1:wt.indexOf(t)+1),s}var je=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Me(t){var e,n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c=t[9],f=t[10],h=t[11],p=Le(n,o,i,r,a,s,u);return e=l?Ie[l]:c?0:ft(f,h),[p,new Vt(e)]}var Re=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ne=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,De=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Fe(t){var e=t[1],n=t[2],r=t[3];return[Le(e,t[4],r,n,t[5],t[6],t[7]),Vt.utcInstance]}function Be(t){var e=t[1],n=t[2],r=t[3],i=t[4],o=t[5],a=t[6];return[Le(e,t[7],n,r,i,o,a),Vt.utcInstance]}var ze=fe(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ve),Ue=fe(/(\d{4})-?W(\d\d)(?:-?(\d))?/,ve),Ge=fe(/(\d{4})-?(\d{3})/,ve),Ve=fe(ye),qe=he(Ee,Oe,Se),He=he(be,Oe,Se),We=he(_e,Oe,Se),Xe=he(Oe,Se);var Ye=he(Oe);var Ze=fe(/(\d{4})-(\d\d)-(\d\d)/,we),Ke=fe(Ae),$e=he(Ee,Oe,Se,Pe),Je=he(Oe,Se,Pe);var Qe={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},tn=o({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Qe),en=365.2425,nn=30.436875,rn=o({years:{quarters:4,months:12,weeks:52.1775,days:en,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:nn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Qe),on=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],an=on.slice(0).reverse();function sn(t,e,n){void 0===n&&(n=!1);var r={values:n?e.values:o({},t.values,e.values||{}),loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new ln(r)}function un(t,e,n,r,i){var o=t[i][n],a=e[n]/o,s=!(Math.sign(a)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(a)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(a):Math.trunc(a);r[i]+=s,e[n]-=s*o}var ln=function(){function t(t){var e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||ce.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?rn:tn,this.isLuxonDuration=!0}t.fromMillis=function(e,n){return t.fromObject({milliseconds:e},n)},t.fromObject=function(e,n){if(void 0===n&&(n={}),null==e||"object"!==typeof e)throw new _("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new t({values:pt(e,t.normalizeUnit),loc:ce.fromObject(n),conversionAccuracy:n.conversionAccuracy})},t.fromISO=function(e,n){var r=function(t){return pe(t,[Te,ke])}(e),i=r[0];return i?t.fromObject(i,n):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.fromISOTime=function(e,n){var r=function(t){return pe(t,[Ce,Ye])}(e),i=r[0];return i?t.fromObject(i,n):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new _("need to specify a reason the Duration is invalid");var r=e instanceof jt?e:new jt(e,n);if(Jt.throwOnInvalid)throw new y(r);return new t({invalid:r})},t.normalizeUnit=function(t){var e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new b(t);return e},t.isDuration=function(t){return t&&t.isLuxonDuration||!1};var e=t.prototype;return e.toFormat=function(t,e){void 0===e&&(e={});var n=o({},e,{floor:!1!==e.round&&!1!==e.floor});return this.isValid?Lt.create(this.loc,n).formatDurationFromString(this,t):"Invalid Duration"},e.toObject=function(){return this.isValid?o({},this.values):{}},e.toISO=function(){if(!this.isValid)return null;var t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=rt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t},e.toISOTime=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var e=this.toMillis();if(e<0||e>=864e5)return null;t=o({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},t);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),r="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(r+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===n.milliseconds||(r+=".SSS"));var i=n.toFormat(r);return t.includePrefix&&(i="T"+i),i},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(t){if(!this.isValid)return this;for(var e,n=cn(t),r={},i=p(on);!(e=i()).done;){var o=e.value;(J(n.values,o)||J(this.values,o))&&(r[o]=n.get(o)+this.get(o))}return sn(this,{values:r},!0)},e.minus=function(t){if(!this.isValid)return this;var e=cn(t);return this.plus(e.negate())},e.mapUnits=function(t){if(!this.isValid)return this;for(var e={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];e[i]=ht(t(this.values[i],i))}return sn(this,{values:e},!0)},e.get=function(e){return this[t.normalizeUnit(e)]},e.set=function(e){return this.isValid?sn(this,{values:o({},this.values,pt(e,t.normalizeUnit))}):this},e.reconfigure=function(t){var e=void 0===t?{}:t,n=e.locale,r=e.numberingSystem,i=e.conversionAccuracy,o={loc:this.loc.clone({locale:n,numberingSystem:r})};return i&&(o.conversionAccuracy=i),sn(this,o)},e.as=function(t){return this.isValid?this.shiftTo(t).get(t):NaN},e.normalize=function(){if(!this.isValid)return this;var t=this.toObject();return function(t,e){an.reduce((function(n,r){return X(e[r])?n:(n&&un(t,e,n,e,r),r)}),null)}(this.matrix,t),sn(this,{values:t},!0)},e.shiftTo=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(e){return t.normalizeUnit(e)}));for(var i,o,a={},s={},u=this.toObject(),l=p(on);!(o=l()).done;){var c=o.value;if(n.indexOf(c)>=0){i=c;var f=0;for(var h in s)f+=this.matrix[h][c]*s[h],s[h]=0;Y(u[c])&&(f+=u[c]);var d=Math.trunc(f);for(var m in a[c]=d,s[c]=f-d,u)on.indexOf(m)>on.indexOf(c)&&un(this.matrix,u,m,a,c)}else Y(u[c])&&(s[c]=u[c])}for(var g in s)0!==s[g]&&(a[i]+=g===i?s[g]:s[g]/this.matrix[i][g]);return sn(this,{values:a},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var t={},e=0,n=Object.keys(this.values);e<n.length;e++){var r=n[e];t[r]=-this.values[r]}return sn(this,{values:t},!0)},e.equals=function(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(var e,n=p(on);!(e=n()).done;){var r=e.value;if(i=this.values[r],o=t.values[r],!(void 0===i||0===i?void 0===o||0===o:i===o))return!1}var i,o;return!0},i(t,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}();function cn(t){if(Y(t))return ln.fromMillis(t);if(ln.isDuration(t))return t;if("object"===typeof t)return ln.fromObject(t);throw new _("Unknown duration argument "+t+" of type "+typeof t)}var fn="Invalid Interval";function hn(t,e){return t&&t.isValid?e&&e.isValid?e<t?pn.invalid("end before start","The end of an interval must be after its start, but you had start="+t.toISO()+" and end="+e.toISO()):null:pn.invalid("missing or invalid end"):pn.invalid("missing or invalid start")}var pn=function(){function t(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new _("need to specify a reason the Interval is invalid");var r=e instanceof jt?e:new jt(e,n);if(Jt.throwOnInvalid)throw new g(r);return new t({invalid:r})},t.fromDateTimes=function(e,n){var r=dr(e),i=dr(n),o=hn(r,i);return null==o?new t({start:r,end:i}):o},t.after=function(e,n){var r=cn(n),i=dr(e);return t.fromDateTimes(i,i.plus(r))},t.before=function(e,n){var r=cn(n),i=dr(e);return t.fromDateTimes(i.minus(r),i)},t.fromISO=function(e,n){var r=(e||"").split("/",2),i=r[0],o=r[1];if(i&&o){var a,s,u,l;try{s=(a=pr.fromISO(i,n)).isValid}catch(o){s=!1}try{l=(u=pr.fromISO(o,n)).isValid}catch(o){l=!1}if(s&&l)return t.fromDateTimes(a,u);if(s){var c=ln.fromISO(o,n);if(c.isValid)return t.after(a,c)}else if(l){var f=ln.fromISO(i,n);if(f.isValid)return t.before(u,f)}}return t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.isInterval=function(t){return t&&t.isLuxonInterval||!1};var e=t.prototype;return e.length=function(t){return void 0===t&&(t="milliseconds"),this.isValid?this.toDuration.apply(this,[t]).get(t):NaN},e.count=function(t){if(void 0===t&&(t="milliseconds"),!this.isValid)return NaN;var e=this.start.startOf(t),n=this.end.startOf(t);return Math.floor(n.diff(e,t).get(t))+1},e.hasSame=function(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(t){return!!this.isValid&&this.s>t},e.isBefore=function(t){return!!this.isValid&&this.e<=t},e.contains=function(t){return!!this.isValid&&(this.s<=t&&this.e>t)},e.set=function(e){var n=void 0===e?{}:e,r=n.start,i=n.end;return this.isValid?t.fromDateTimes(r||this.s,i||this.e):this},e.splitAt=function(){var e=this;if(!this.isValid)return[];for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=r.map(dr).filter((function(t){return e.contains(t)})).sort(),a=[],s=this.s,u=0;s<this.e;){var l=o[u]||this.e,c=+l>+this.e?this.e:l;a.push(t.fromDateTimes(s,c)),s=c,u+=1}return a},e.splitBy=function(e){var n=cn(e);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i=this.s,o=1,a=[];i<this.e;){var s=this.start.plus(n.mapUnits((function(t){return t*o})));r=+s>+this.e?this.e:s,a.push(t.fromDateTimes(i,r)),i=r,o+=1}return a},e.divideEqually=function(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]},e.overlaps=function(t){return this.e>t.s&&this.s<t.e},e.abutsStart=function(t){return!!this.isValid&&+this.e===+t.s},e.abutsEnd=function(t){return!!this.isValid&&+t.e===+this.s},e.engulfs=function(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)},e.equals=function(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))},e.intersection=function(e){if(!this.isValid)return this;var n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:t.fromDateTimes(n,r)},e.union=function(e){if(!this.isValid)return this;var n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return t.fromDateTimes(n,r)},t.merge=function(t){var e=t.sort((function(t,e){return t.s-e.s})).reduce((function(t,e){var n=t[0],r=t[1];return r?r.overlaps(e)||r.abutsStart(e)?[n,r.union(e)]:[n.concat([r]),e]:[n,e]}),[[],null]),n=e[0],r=e[1];return r&&n.push(r),n},t.xor=function(e){for(var n,r,i=null,o=0,a=[],s=e.map((function(t){return[{time:t.s,type:"s"},{time:t.e,type:"e"}]})),u=p((n=Array.prototype).concat.apply(n,s).sort((function(t,e){return t.time-e.time})));!(r=u()).done;){var l=r.value;1===(o+="s"===l.type?1:-1)?i=l.time:(i&&+i!==+l.time&&a.push(t.fromDateTimes(i,l.time)),i=null)}return t.merge(a)},e.difference=function(){for(var e=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.xor([this].concat(r)).map((function(t){return e.intersection(t)})).filter((function(t){return t&&!t.isEmpty()}))},e.toString=function(){return this.isValid?"["+this.s.toISO()+" \u2013 "+this.e.toISO()+")":fn},e.toISO=function(t){return this.isValid?this.s.toISO(t)+"/"+this.e.toISO(t):fn},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():fn},e.toISOTime=function(t){return this.isValid?this.s.toISOTime(t)+"/"+this.e.toISOTime(t):fn},e.toFormat=function(t,e){var n=(void 0===e?{}:e).separator,r=void 0===n?" \u2013 ":n;return this.isValid?""+this.s.toFormat(t)+r+this.e.toFormat(t):fn},e.toDuration=function(t,e){return this.isValid?this.e.diff(this.s,t,e):ln.invalid(this.invalidReason)},e.mapEndpoints=function(e){return t.fromDateTimes(e(this.s),e(this.e))},i(t,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}(),dn=function(){function t(){}return t.hasDST=function(t){void 0===t&&(t=Jt.defaultZone);var e=pr.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset},t.isValidIANAZone=function(t){return Ut.isValidSpecifier(t)&&Ut.isValidZone(t)},t.normalizeZone=function(t){return Ht(t,Jt.defaultZone)},t.months=function(t,e){void 0===t&&(t="long");var n=void 0===e?{}:e,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.locObj,u=void 0===s?null:s,l=n.outputCalendar,c=void 0===l?"gregory":l;return(u||ce.create(i,a,c)).months(t)},t.monthsFormat=function(t,e){void 0===t&&(t="long");var n=void 0===e?{}:e,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.locObj,u=void 0===s?null:s,l=n.outputCalendar,c=void 0===l?"gregory":l;return(u||ce.create(i,a,c)).months(t,!0)},t.weekdays=function(t,e){void 0===t&&(t="long");var n=void 0===e?{}:e,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.locObj;return((void 0===s?null:s)||ce.create(i,a,null)).weekdays(t)},t.weekdaysFormat=function(t,e){void 0===t&&(t="long");var n=void 0===e?{}:e,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.locObj;return((void 0===s?null:s)||ce.create(i,a,null)).weekdays(t,!0)},t.meridiems=function(t){var e=(void 0===t?{}:t).locale,n=void 0===e?null:e;return ce.create(n).meridiems()},t.eras=function(t,e){void 0===t&&(t="short");var n=(void 0===e?{}:e).locale,r=void 0===n?null:n;return ce.create(r,null,"gregory").eras(t)},t.features=function(){return{relative:K()}},t}();function mn(t,e){var n=function(t){return t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},r=n(e)-n(t);return Math.floor(ln.fromMillis(r).as("days"))}function gn(t,e,n,r){var i=function(t,e,n){for(var r,i,o={},a=0,s=[["years",function(t,e){return e.year-t.year}],["quarters",function(t,e){return e.quarter-t.quarter}],["months",function(t,e){return e.month-t.month+12*(e.year-t.year)}],["weeks",function(t,e){var n=mn(t,e);return(n-n%7)/7}],["days",mn]];a<s.length;a++){var u=s[a],l=u[0],c=u[1];if(n.indexOf(l)>=0){var f;r=l;var h,p=c(t,e);(i=t.plus(((f={})[l]=p,f)))>e?(t=t.plus(((h={})[l]=p-1,h)),p-=1):t=i,o[l]=p}}return[t,o,i,r]}(t,e,n),o=i[0],a=i[1],s=i[2],u=i[3],l=e-o,c=n.filter((function(t){return["hours","minutes","seconds","milliseconds"].indexOf(t)>=0}));if(0===c.length){var f;if(s<e)s=o.plus(((f={})[u]=1,f));s!==o&&(a[u]=(a[u]||0)+l/(s-o))}var h,p=ln.fromObject(a,r);return c.length>0?(h=ln.fromMillis(l,r)).shiftTo.apply(h,c).plus(p):p}var yn={arab:"[\u0660-\u0669]",arabext:"[\u06f0-\u06f9]",bali:"[\u1b50-\u1b59]",beng:"[\u09e6-\u09ef]",deva:"[\u0966-\u096f]",fullwide:"[\uff10-\uff19]",gujr:"[\u0ae6-\u0aef]",hanidec:"[\u3007|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d]",khmr:"[\u17e0-\u17e9]",knda:"[\u0ce6-\u0cef]",laoo:"[\u0ed0-\u0ed9]",limb:"[\u1946-\u194f]",mlym:"[\u0d66-\u0d6f]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0b66-\u0b6f]",tamldec:"[\u0be6-\u0bef]",telu:"[\u0c66-\u0c6f]",thai:"[\u0e50-\u0e59]",tibt:"[\u0f20-\u0f29]",latn:"\\d"},vn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},bn=yn.hanidec.replace(/[\[|\]]/g,"").split("");function _n(t,e){var n=t.numberingSystem;return void 0===e&&(e=""),new RegExp(""+yn[n||"latn"]+e)}function An(t,e){return void 0===e&&(e=function(t){return t}),{regex:t,deser:function(t){var n=t[0];return e(function(t){var e=parseInt(t,10);if(isNaN(e)){e="";for(var n=0;n<t.length;n++){var r=t.charCodeAt(n);if(-1!==t[n].search(yn.hanidec))e+=bn.indexOf(t[n]);else for(var i in vn){var o=vn[i],a=o[0],s=o[1];r>=a&&r<=s&&(e+=r-a)}}return parseInt(e,10)}return e}(n))}}}var wn="( |"+String.fromCharCode(160)+")",xn=new RegExp(wn,"g");function En(t){return t.replace(/\./g,"\\.?").replace(xn,wn)}function On(t){return t.replace(/\./g,"").replace(xn," ").toLowerCase()}function Sn(t,e){return null===t?null:{regex:RegExp(t.map(En).join("|")),deser:function(n){var r=n[0];return t.findIndex((function(t){return On(r)===On(t)}))+e}}}function Pn(t,e){return{regex:t,deser:function(t){return ft(t[1],t[2])},groups:e}}function Cn(t){return{regex:t,deser:function(t){return t[0]}}}var Tn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var kn=null;function In(t,e){if(t.literal)return t;var n=Lt.macroTokenToFormatOpts(t.val);if(!n)return t;var r=Lt.create(e,n).formatDateTimeParts((kn||(kn=pr.fromMillis(1555555555555)),kn)).map((function(t){return function(t,e,n){var r=t.type,i=t.value;if("literal"===r)return{literal:!0,val:i};var o=n[r],a=Tn[r];return"object"===typeof a&&(a=a[o]),a?{literal:!1,val:a}:void 0}(t,0,n)}));return r.includes(void 0)?t:r}function Ln(t,e,n){var r=function(t,e){var n;return(n=Array.prototype).concat.apply(n,t.map((function(t){return In(t,e)})))}(Lt.parseFormat(n),t),i=r.map((function(e){return n=e,i=_n(r=t),o=_n(r,"{2}"),a=_n(r,"{3}"),s=_n(r,"{4}"),u=_n(r,"{6}"),l=_n(r,"{1,2}"),c=_n(r,"{1,3}"),f=_n(r,"{1,6}"),h=_n(r,"{1,9}"),p=_n(r,"{2,4}"),d=_n(r,"{4,6}"),m=function(t){return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(t){return t[0]},literal:!0};var e},g=function(t){if(n.literal)return m(t);switch(t.val){case"G":return Sn(r.eras("short",!1),0);case"GG":return Sn(r.eras("long",!1),0);case"y":return An(f);case"yy":case"kk":return An(p,lt);case"yyyy":case"kkkk":return An(s);case"yyyyy":return An(d);case"yyyyyy":return An(u);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return An(l);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return An(o);case"MMM":return Sn(r.months("short",!0,!1),1);case"MMMM":return Sn(r.months("long",!0,!1),1);case"LLL":return Sn(r.months("short",!1,!1),1);case"LLLL":return Sn(r.months("long",!1,!1),1);case"o":case"S":return An(c);case"ooo":case"SSS":return An(a);case"u":return Cn(h);case"a":return Sn(r.meridiems(),0);case"E":case"c":return An(i);case"EEE":return Sn(r.weekdays("short",!1,!1),1);case"EEEE":return Sn(r.weekdays("long",!1,!1),1);case"ccc":return Sn(r.weekdays("short",!0,!1),1);case"cccc":return Sn(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Pn(new RegExp("([+-]"+l.source+")(?::("+o.source+"))?"),2);case"ZZZ":return Pn(new RegExp("([+-]"+l.source+")("+o.source+")?"),2);case"z":return Cn(/[a-z_+-/]{1,256}?/i);default:return m(t)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"},g.token=n,g;var n,r,i,o,a,s,u,l,c,f,h,p,d,m,g})),o=i.find((function(t){return t.invalidReason}));if(o)return{input:e,tokens:r,invalidReason:o.invalidReason};var a=function(t){return["^"+t.map((function(t){return t.regex})).reduce((function(t,e){return t+"("+e.source+")"}),"")+"$",t]}(i),s=a[0],u=a[1],l=RegExp(s,"i"),c=function(t,e,n){var r=t.match(e);if(r){var i={},o=1;for(var a in n)if(J(n,a)){var s=n[a],u=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(o,o+u))),o+=u}return[r,i]}return[r,{}]}(e,l,u),f=c[0],h=c[1],p=h?function(t){var e;return e=X(t.Z)?X(t.z)?null:Ut.create(t.z):new Vt(t.Z),X(t.q)||(t.M=3*(t.q-1)+1),X(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),X(t.u)||(t.S=nt(t.u)),[Object.keys(t).reduce((function(e,n){var r=function(t){switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return r&&(e[r]=t[n]),e}),{}),e]}(h):[null,null],d=p[0],m=p[1];if(J(h,"a")&&J(h,"H"))throw new v("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:l,rawMatches:f,matches:h,result:d,zone:m}}var jn=[0,31,59,90,120,151,181,212,243,273,304,334],Mn=[0,31,60,91,121,152,182,213,244,274,305,335];function Rn(t,e){return new jt("unit out of range","you specified "+e+" (of type "+typeof e+") as a "+t+", which is invalid")}function Nn(t,e,n){var r=new Date(Date.UTC(t,e-1,n)).getUTCDay();return 0===r?7:r}function Dn(t,e,n){return n+(it(t)?Mn:jn)[e-1]}function Fn(t,e){var n=it(t)?Mn:jn,r=n.findIndex((function(t){return t<e}));return{month:r+1,day:e-n[r]}}function Bn(t){var e,n=t.year,r=t.month,i=t.day,a=Dn(n,r,i),s=Nn(n,r,i),u=Math.floor((a-s+10)/7);return u<1?u=ut(e=n-1):u>ut(n)?(e=n+1,u=1):e=n,o({weekYear:e,weekNumber:u,weekday:s},mt(t))}function zn(t){var e,n=t.weekYear,r=t.weekNumber,i=t.weekday,a=Nn(n,1,4),s=ot(n),u=7*r+i-a-3;u<1?u+=ot(e=n-1):u>s?(e=n+1,u-=ot(n)):e=n;var l=Fn(e,u);return o({year:e,month:l.month,day:l.day},mt(t))}function Un(t){var e=t.year;return o({year:e,ordinal:Dn(e,t.month,t.day)},mt(t))}function Gn(t){var e=t.year,n=Fn(e,t.ordinal);return o({year:e,month:n.month,day:n.day},mt(t))}function Vn(t){var e=Z(t.year),n=Q(t.month,1,12),r=Q(t.day,1,at(t.year,t.month));return e?n?!r&&Rn("day",t.day):Rn("month",t.month):Rn("year",t.year)}function qn(t){var e=t.hour,n=t.minute,r=t.second,i=t.millisecond,o=Q(e,0,23)||24===e&&0===n&&0===r&&0===i,a=Q(n,0,59),s=Q(r,0,59),u=Q(i,0,999);return o?a?s?!u&&Rn("millisecond",i):Rn("second",r):Rn("minute",n):Rn("hour",e)}var Hn="Invalid DateTime",Wn=864e13;function Xn(t){return new jt("unsupported zone",'the zone "'+t.name+'" is not supported')}function Yn(t){return null===t.weekData&&(t.weekData=Bn(t.c)),t.weekData}function Zn(t,e){var n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new pr(o({},n,e,{old:n}))}function Kn(t,e,n){var r=t-60*e*1e3,i=n.offset(r);if(e===i)return[r,e];r-=60*(i-e)*1e3;var o=n.offset(r);return i===o?[r,i]:[t-60*Math.min(i,o)*1e3,Math.max(i,o)]}function $n(t,e){var n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Jn(t,e,n){return Kn(st(t),e,n)}function Qn(t,e){var n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),a=o({},t.c,{year:r,month:i,day:Math.min(t.c.day,at(r,i))+Math.trunc(e.days)+7*Math.trunc(e.weeks)}),s=ln.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),u=Kn(st(a),n,t.zone),l=u[0],c=u[1];return 0!==s&&(l+=s,c=t.zone.offset(l)),{ts:l,o:c}}function tr(t,e,n,r,i){var a=n.setZone,s=n.zone;if(t&&0!==Object.keys(t).length){var u=e||s,l=pr.fromObject(t,o({},n,{zone:u}));return a?l:l.setZone(s)}return pr.invalid(new jt("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function er(t,e,n){return void 0===n&&(n=!0),t.isValid?Lt.create(ce.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function nr(t,e){var n=e.suppressSeconds,r=void 0!==n&&n,i=e.suppressMilliseconds,o=void 0!==i&&i,a=e.includeOffset,s=e.includePrefix,u=void 0!==s&&s,l=e.includeZone,c=void 0!==l&&l,f=e.spaceZone,h=void 0!==f&&f,p=e.format,d=void 0===p?"extended":p,m="basic"===d?"HHmm":"HH:mm";r&&0===t.second&&0===t.millisecond||(m+="basic"===d?"ss":":ss",o&&0===t.millisecond||(m+=".SSS")),(c||a)&&h&&(m+=" "),c?m+="z":a&&(m+="basic"===d?"ZZZ":"ZZ");var g=er(t,m);return u&&(g="T"+g),g}var rr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ir={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},or={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ar=["year","month","day","hour","minute","second","millisecond"],sr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ur=["year","ordinal","hour","minute","second","millisecond"];function lr(t){var e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new b(t);return e}function cr(t,e){var n,r,i=Ht(e.zone,Jt.defaultZone),o=ce.fromObject(e),a=Jt.now();if(X(t.year))n=a;else{for(var s,u=p(ar);!(s=u()).done;){var l=s.value;X(t[l])&&(t[l]=rr[l])}var c=Vn(t)||qn(t);if(c)return pr.invalid(c);var f=Jn(t,i.offset(a),i);n=f[0],r=f[1]}return new pr({ts:n,zone:i,loc:o,o:r})}function fr(t,e,n){var r=!!X(n.round)||n.round,i=function(t,i){return t=rt(t,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(t,i)},o=function(r){return n.calendary?e.hasSame(t,r)?0:e.startOf(r).diff(t.startOf(r),r).get(r):e.diff(t,r).get(r)};if(n.unit)return i(o(n.unit),n.unit);for(var a,s=p(n.units);!(a=s()).done;){var u=a.value,l=o(u);if(Math.abs(l)>=1)return i(l,u)}return i(t>e?-0:0,n.units[n.units.length-1])}function hr(t){var e,n={};return t.length>0&&"object"===typeof t[t.length-1]?(n=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[n,e]}var pr=function(){function t(t){var e=t.zone||Jt.defaultZone,n=t.invalid||(Number.isNaN(t.ts)?new jt("invalid input"):null)||(e.isValid?null:Xn(e));this.ts=X(t.ts)?Jt.now():t.ts;var r=null,i=null;if(!n)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e)){var o=[t.old.c,t.old.o];r=o[0],i=o[1]}else{var a=e.offset(this.ts);r=$n(this.ts,a),r=(n=Number.isNaN(r.year)?new jt("invalid input"):null)?null:r,i=n?null:a}this._zone=e,this.loc=t.loc||ce.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}t.now=function(){return new t({})},t.local=function(){var t=hr(arguments),e=t[0],n=t[1],r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],l=n[6];return cr({year:r,month:i,day:o,hour:a,minute:s,second:u,millisecond:l},e)},t.utc=function(){var t=hr(arguments),e=t[0],n=t[1],r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],l=n[6];return e.zone=Vt.utcInstance,cr({year:r,month:i,day:o,hour:a,minute:s,second:u,millisecond:l},e)},t.fromJSDate=function(e,n){void 0===n&&(n={});var r,i=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);if(Number.isNaN(i))return t.invalid("invalid input");var o=Ht(n.zone,Jt.defaultZone);return o.isValid?new t({ts:i,zone:o,loc:ce.fromObject(n)}):t.invalid(Xn(o))},t.fromMillis=function(e,n){if(void 0===n&&(n={}),Y(e))return e<-Wn||e>Wn?t.invalid("Timestamp out of range"):new t({ts:e,zone:Ht(n.zone,Jt.defaultZone),loc:ce.fromObject(n)});throw new _("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},t.fromSeconds=function(e,n){if(void 0===n&&(n={}),Y(e))return new t({ts:1e3*e,zone:Ht(n.zone,Jt.defaultZone),loc:ce.fromObject(n)});throw new _("fromSeconds requires a numerical input")},t.fromObject=function(e,n){void 0===n&&(n={}),e=e||{};var r=Ht(n.zone,Jt.defaultZone);if(!r.isValid)return t.invalid(Xn(r));var i=Jt.now(),o=r.offset(i),a=pt(e,lr),s=!X(a.ordinal),u=!X(a.year),l=!X(a.month)||!X(a.day),c=u||l,f=a.weekYear||a.weekNumber,h=ce.fromObject(n);if((c||s)&&f)throw new v("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new v("Can't mix ordinal dates with month/day");var d,m,g=f||a.weekday&&!c,y=$n(i,o);g?(d=sr,m=ir,y=Bn(y)):s?(d=ur,m=or,y=Un(y)):(d=ar,m=rr);for(var b,_=!1,A=p(d);!(b=A()).done;){var w=b.value;X(a[w])?a[w]=_?m[w]:y[w]:_=!0}var x=g?function(t){var e=Z(t.weekYear),n=Q(t.weekNumber,1,ut(t.weekYear)),r=Q(t.weekday,1,7);return e?n?!r&&Rn("weekday",t.weekday):Rn("week",t.week):Rn("weekYear",t.weekYear)}(a):s?function(t){var e=Z(t.year),n=Q(t.ordinal,1,ot(t.year));return e?!n&&Rn("ordinal",t.ordinal):Rn("year",t.year)}(a):Vn(a),E=x||qn(a);if(E)return t.invalid(E);var O=Jn(g?zn(a):s?Gn(a):a,o,r),S=new t({ts:O[0],zone:r,o:O[1],loc:h});return a.weekday&&c&&e.weekday!==S.weekday?t.invalid("mismatched weekday","you can't specify both a weekday of "+a.weekday+" and a date of "+S.toISO()):S},t.fromISO=function(t,e){void 0===e&&(e={});var n=function(t){return pe(t,[ze,qe],[Ue,He],[Ge,We],[Ve,Xe])}(t);return tr(n[0],n[1],e,"ISO 8601",t)},t.fromRFC2822=function(t,e){void 0===e&&(e={});var n=function(t){return pe(function(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[je,Me])}(t);return tr(n[0],n[1],e,"RFC 2822",t)},t.fromHTTP=function(t,e){void 0===e&&(e={});var n=function(t){return pe(t,[Re,Fe],[Ne,Fe],[De,Be])}(t);return tr(n[0],n[1],e,"HTTP",e)},t.fromFormat=function(e,n,r){if(void 0===r&&(r={}),X(e)||X(n))throw new _("fromFormat requires an input string and a format");var i=r,o=i.locale,a=void 0===o?null:o,s=i.numberingSystem,u=void 0===s?null:s,l=function(t,e,n){var r=Ln(t,e,n);return[r.result,r.zone,r.invalidReason]}(ce.fromOpts({locale:a,numberingSystem:u,defaultToEN:!0}),e,n),c=l[0],f=l[1],h=l[2];return h?t.invalid(h):tr(c,f,r,"format "+n,e)},t.fromString=function(e,n,r){return void 0===r&&(r={}),t.fromFormat(e,n,r)},t.fromSQL=function(t,e){void 0===e&&(e={});var n=function(t){return pe(t,[Ze,$e],[Ke,Je])}(t);return tr(n[0],n[1],e,"SQL",t)},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new _("need to specify a reason the DateTime is invalid");var r=e instanceof jt?e:new jt(e,n);if(Jt.throwOnInvalid)throw new m(r);return new t({invalid:r})},t.isDateTime=function(t){return t&&t.isLuxonDateTime||!1};var e=t.prototype;return e.get=function(t){return this[t]},e.resolvedLocaleOptions=function(t){void 0===t&&(t={});var e=Lt.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(t,e){return void 0===t&&(t=0),void 0===e&&(e={}),this.setZone(Vt.instance(t),e)},e.toLocal=function(){return this.setZone(Jt.defaultZone)},e.setZone=function(e,n){var r=void 0===n?{}:n,i=r.keepLocalTime,o=void 0!==i&&i,a=r.keepCalendarTime,s=void 0!==a&&a;if((e=Ht(e,Jt.defaultZone)).equals(this.zone))return this;if(e.isValid){var u=this.ts;if(o||s){var l=e.offset(this.ts);u=Jn(this.toObject(),l,e)[0]}return Zn(this,{ts:u,zone:e})}return t.invalid(Xn(e))},e.reconfigure=function(t){var e=void 0===t?{}:t,n=e.locale,r=e.numberingSystem,i=e.outputCalendar;return Zn(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i})})},e.setLocale=function(t){return this.reconfigure({locale:t})},e.set=function(t){if(!this.isValid)return this;var e,n=pt(t,lr),r=!X(n.weekYear)||!X(n.weekNumber)||!X(n.weekday),i=!X(n.ordinal),a=!X(n.year),s=!X(n.month)||!X(n.day),u=a||s,l=n.weekYear||n.weekNumber;if((u||i)&&l)throw new v("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&i)throw new v("Can't mix ordinal dates with month/day");r?e=zn(o({},Bn(this.c),n)):X(n.ordinal)?(e=o({},this.toObject(),n),X(n.day)&&(e.day=Math.min(at(e.year,e.month),e.day))):e=Gn(o({},Un(this.c),n));var c=Jn(e,this.o,this.zone);return Zn(this,{ts:c[0],o:c[1]})},e.plus=function(t){return this.isValid?Zn(this,Qn(this,cn(t))):this},e.minus=function(t){return this.isValid?Zn(this,Qn(this,cn(t).negate())):this},e.startOf=function(t){if(!this.isValid)return this;var e={},n=ln.normalizeUnit(t);switch(n){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===n&&(e.weekday=1),"quarters"===n){var r=Math.ceil(this.month/3);e.month=3*(r-1)+1}return this.set(e)},e.endOf=function(t){var e;return this.isValid?this.plus((e={},e[t]=1,e)).startOf(t).minus(1):this},e.toFormat=function(t,e){return void 0===e&&(e={}),this.isValid?Lt.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):Hn},e.toLocaleString=function(t,e){return void 0===t&&(t=O),void 0===e&&(e={}),this.isValid?Lt.create(this.loc.clone(e),t).formatDateTime(this):Hn},e.toLocaleParts=function(t){return void 0===t&&(t={}),this.isValid?Lt.create(this.loc.clone(t),t).formatDateTimeParts(this):[]},e.toISO=function(t){return void 0===t&&(t={}),this.isValid?this.toISODate(t)+"T"+this.toISOTime(t):null},e.toISODate=function(t){var e=(void 0===t?{}:t).format,n="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),er(this,n)},e.toISOWeekDate=function(){return er(this,"kkkk-'W'WW-c")},e.toISOTime=function(t){var e=void 0===t?{}:t,n=e.suppressMilliseconds,r=void 0!==n&&n,i=e.suppressSeconds,o=void 0!==i&&i,a=e.includeOffset,s=void 0===a||a,u=e.includePrefix,l=void 0!==u&&u,c=e.format;return nr(this,{suppressSeconds:o,suppressMilliseconds:r,includeOffset:s,includePrefix:l,format:void 0===c?"extended":c})},e.toRFC2822=function(){return er(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return er(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return er(this,"yyyy-MM-dd")},e.toSQLTime=function(t){var e=void 0===t?{}:t,n=e.includeOffset,r=void 0===n||n,i=e.includeZone;return nr(this,{includeOffset:r,includeZone:void 0!==i&&i,spaceZone:!0})},e.toSQL=function(t){return void 0===t&&(t={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(t):null},e.toString=function(){return this.isValid?this.toISO():Hn},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(t){if(void 0===t&&(t={}),!this.isValid)return{};var e=o({},this.c);return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(t,e,n){if(void 0===e&&(e="milliseconds"),void 0===n&&(n={}),!this.isValid||!t.isValid)return ln.invalid("created by diffing an invalid DateTime");var r,i=o({locale:this.locale,numberingSystem:this.numberingSystem},n),a=(r=e,Array.isArray(r)?r:[r]).map(ln.normalizeUnit),s=t.valueOf()>this.valueOf(),u=gn(s?this:t,s?t:this,a,i);return s?u.negate():u},e.diffNow=function(e,n){return void 0===e&&(e="milliseconds"),void 0===n&&(n={}),this.diff(t.now(),e,n)},e.until=function(t){return this.isValid?pn.fromDateTimes(this,t):this},e.hasSame=function(t,e){if(!this.isValid)return!1;var n=t.valueOf(),r=this.setZone(t.zone,{keepLocalTime:!0});return r.startOf(e)<=n&&n<=r.endOf(e)},e.equals=function(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)},e.toRelative=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var n=e.base||t.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),fr(n,this.plus(r),o({},e,{numeric:"always",units:i,unit:a}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?fr(e.base||t.fromObject({},{zone:this.zone}),this,o({},e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},t.min=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.every(t.isDateTime))throw new _("min requires all arguments be DateTimes");return $(n,(function(t){return t.valueOf()}),Math.min)},t.max=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.every(t.isDateTime))throw new _("max requires all arguments be DateTimes");return $(n,(function(t){return t.valueOf()}),Math.max)},t.fromFormatExplain=function(t,e,n){void 0===n&&(n={});var r=n,i=r.locale,o=void 0===i?null:i,a=r.numberingSystem,s=void 0===a?null:a;return Ln(ce.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0}),t,e)},t.fromStringExplain=function(e,n,r){return void 0===r&&(r={}),t.fromFormatExplain(e,n,r)},i(t,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?Yn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Yn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Yn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Un(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?dn.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?dn.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?dn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?dn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.isUniversal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return it(this.year)}},{key:"daysInMonth",get:function(){return at(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ot(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ut(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return O}},{key:"DATE_MED",get:function(){return S}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return P}},{key:"DATE_FULL",get:function(){return C}},{key:"DATE_HUGE",get:function(){return T}},{key:"TIME_SIMPLE",get:function(){return k}},{key:"TIME_WITH_SECONDS",get:function(){return I}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return j}},{key:"TIME_24_SIMPLE",get:function(){return M}},{key:"TIME_24_WITH_SECONDS",get:function(){return R}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return N}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return D}},{key:"DATETIME_SHORT",get:function(){return F}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return B}},{key:"DATETIME_MED",get:function(){return z}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return U}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return G}},{key:"DATETIME_FULL",get:function(){return V}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return q}},{key:"DATETIME_HUGE",get:function(){return H}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return W}}]),t}();function dr(t){if(pr.isDateTime(t))return t;if(t&&t.valueOf&&Y(t.valueOf()))return pr.fromJSDate(t);if(t&&"object"===typeof t)return pr.fromObject(t);throw new _("Unknown datetime argument: "+t+", of type "+typeof t)}e.DateTime=pr,e.Duration=ln,e.FixedOffsetZone=Vt,e.IANAZone=Ut,e.Info=dn,e.Interval=pn,e.InvalidZone=qt,e.Settings=Jt,e.SystemZone=Nt,e.VERSION="2.0.2",e.Zone=Mt},function(t,e,n){"use strict";n.r(e);e.default={blue:{line:[0,146,255],fill:[0,146,255]},red:{line:[255,73,0],fill:[255,73,0]},yellow:{line:[253,201,33],fill:[255,215,0]},purple:{line:[79,0,196],fill:[79,0,196]},green:{line:[0,218,29],fill:[0,218,29]},black:{line:[0,0,0],fill:[0,0,0]}}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function i(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function r(t){return r="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},r(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"h",(function(){return s})),n.d(e,"createElement",(function(){return s})),n.d(e,"cloneElement",(function(){return c})),n.d(e,"Component",(function(){return N})),n.d(e,"render",(function(){return D})),n.d(e,"rerender",(function(){return d})),n.d(e,"options",(function(){return i}));var i={},o=[],a=[];function s(t,e){var n,s,u,l,c=a;for(l=arguments.length;l-- >2;)o.push(arguments[l]);for(e&&null!=e.children&&(o.length||o.push(e.children),delete e.children);o.length;)if((s=o.pop())&&void 0!==s.pop)for(l=s.length;l--;)o.push(s[l]);else"boolean"===typeof s&&(s=null),(u="function"!==typeof t)&&(null==s?s="":"number"===typeof s?s=String(s):"string"!==typeof s&&(u=!1)),u&&n?c[c.length-1]+=s:c===a?c=[s]:c.push(s),n=u;var f=new r;return f.nodeName=t,f.children=c,f.attributes=null==e?void 0:e,f.key=null==e?void 0:e.key,void 0!==i.vnode&&i.vnode(f),f}function u(t,e){for(var n in e)t[n]=e[n];return t}var l="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(t,e){return s(t.nodeName,u(u({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function p(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(i.debounceRendering||l)(d)}function d(){var t,e=h;for(h=[];t=e.pop();)t._dirty&&M(t)}function m(t,e,n){return"string"===typeof e||"number"===typeof e?void 0!==t.splitText:"string"===typeof e.nodeName?!t._componentConstructor&&g(t,e.nodeName):n||t._componentConstructor===e.nodeName}function g(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function y(t){var e=u({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===e[r]&&(e[r]=n[r]);return e}function v(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,n,r,i){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)n&&n(null),r&&r(t);else if("class"!==e||i)if("style"===e){if(r&&"string"!==typeof r&&"string"!==typeof n||(t.style.cssText=r||""),r&&"object"===typeof r){if("string"!==typeof n)for(var o in n)o in r||(t.style[o]="");for(var o in r)t.style[o]="number"===typeof r[o]&&!1===f.test(o)?r[o]+"px":r[o]}}else if("dangerouslySetInnerHTML"===e)r&&(t.innerHTML=r.__html||"");else if("o"==e[0]&&"n"==e[1]){var a=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),r?n||t.addEventListener(e,_,a):t.removeEventListener(e,_,a),(t._listeners||(t._listeners={}))[e]=r}else if("list"!==e&&"type"!==e&&!i&&e in t)!function(t,e,n){try{t[e]=n}catch(r){}}(t,e,null==r?"":r),null!=r&&!1!==r||t.removeAttribute(e);else{var s=i&&e!==(e=e.replace(/^xlink:?/,""));null==r||!1===r?s?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!==typeof r&&(s?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),r):t.setAttribute(e,r))}else t.className=r||""}function _(t){return this._listeners[t.type](i.event&&i.event(t)||t)}var A=[],w=0,x=!1,E=!1;function O(){for(var t;t=A.pop();)i.afterMount&&i.afterMount(t),t.componentDidMount&&t.componentDidMount()}function S(t,e,n,r,i,o){w++||(x=null!=i&&void 0!==i.ownerSVGElement,E=null!=t&&!("__preactattr_"in t));var a=P(t,e,n,r,o);return i&&a.parentNode!==i&&i.appendChild(a),--w||(E=!1,o||O()),a}function P(t,e,n,r,i){var o=t,a=x;if(null!=e&&"boolean"!==typeof e||(e=""),"string"===typeof e||"number"===typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||i)?t.nodeValue!=e&&(t.nodeValue=e):(o=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(o,t),C(t,!0))),o.__preactattr_=!0,o;var s,u,l=e.nodeName;if("function"===typeof l)return function(t,e,n,r){var i=t&&t._component,o=i,a=t,s=i&&t._componentConstructor===e.nodeName,u=s,l=y(e);for(;i&&!u&&(i=i._parentComponent);)u=i.constructor===e.nodeName;i&&u&&(!r||i._component)?(j(i,l,3,n,r),t=i.base):(o&&!s&&(R(o),t=a=null),i=I(e.nodeName,l,n),t&&!i.nextBase&&(i.nextBase=t,a=null),j(i,l,1,n,r),t=i.base,a&&t!==a&&(a._component=null,C(a,!1)));return t}(t,e,n,r);if(x="svg"===l||"foreignObject"!==l&&x,l=String(l),(!t||!g(t,l))&&(s=l,(u=x?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,o=u,t)){for(;t.firstChild;)o.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(o,t),C(t,!0)}var c=o.firstChild,f=o.__preactattr_,h=e.children;if(null==f){f=o.__preactattr_={};for(var p=o.attributes,d=p.length;d--;)f[p[d].name]=p[d].value}return!E&&h&&1===h.length&&"string"===typeof h[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=h[0]&&(c.nodeValue=h[0]):(h&&h.length||null!=c)&&function(t,e,n,r,i){var o,a,s,u,l,c=t.childNodes,f=[],h={},p=0,d=0,g=c.length,y=0,b=e?e.length:0;if(0!==g)for(var _=0;_<g;_++){var A=c[_],w=A.__preactattr_;null!=(x=b&&w?A._component?A._component.__key:w.key:null)?(p++,h[x]=A):(w||(void 0!==A.splitText?!i||A.nodeValue.trim():i))&&(f[y++]=A)}if(0!==b)for(_=0;_<b;_++){var x;if(l=null,null!=(x=(u=e[_]).key))p&&void 0!==h[x]&&(l=h[x],h[x]=void 0,p--);else if(!l&&d<y)for(o=d;o<y;o++)if(void 0!==f[o]&&m(a=f[o],u,i)){l=a,f[o]=void 0,o===y-1&&y--,o===d&&d++;break}l=P(l,u,n,r),s=c[_],l&&l!==t&&l!==s&&(null==s?t.appendChild(l):l===s.nextSibling?v(s):t.insertBefore(l,s))}if(p)for(var _ in h)void 0!==h[_]&&C(h[_],!1);for(;d<=y;)void 0!==(l=f[y--])&&C(l,!1)}(o,h,n,r,E||null!=f.dangerouslySetInnerHTML),function(t,e,n){var r;for(r in n)e&&null!=e[r]||null==n[r]||b(t,r,n[r],n[r]=void 0,x);for(r in e)"children"===r||"innerHTML"===r||r in n&&e[r]===("value"===r||"checked"===r?t[r]:n[r])||b(t,r,n[r],n[r]=e[r],x)}(o,e.attributes,f),x=a,o}function C(t,e){var n=t._component;n?R(n):(null!=t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),!1!==e&&null!=t.__preactattr_||v(t),T(t))}function T(t){for(t=t.lastChild;t;){var e=t.previousSibling;C(t,!0),t=e}}var k={};function I(t,e,n){var r,i=k[t.name];if(t.prototype&&t.prototype.render?(r=new t(e,n),N.call(r,e,n)):((r=new N(e,n)).constructor=t,r.render=L),i)for(var o=i.length;o--;)if(i[o].constructor===t){r.nextBase=i[o].nextBase,i.splice(o,1);break}return r}function L(t,e,n){return this.constructor(t,n)}function j(t,e,n,r,o){t._disable||(t._disable=!0,(t.__ref=e.ref)&&delete e.ref,(t.__key=e.key)&&delete e.key,!t.base||o?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,r),r&&r!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=r),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==n&&(1!==n&&!1===i.syncComponentUpdates&&t.base?p(t):M(t,1,o)),t.__ref&&t.__ref(t))}function M(t,e,n,r){if(!t._disable){var o,a,s,l=t.props,c=t.state,f=t.context,h=t.prevProps||l,p=t.prevState||c,d=t.prevContext||f,m=t.base,g=t.nextBase,v=m||g,b=t._component,_=!1;if(m&&(t.props=h,t.state=p,t.context=d,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(l,c,f)?_=!0:t.componentWillUpdate&&t.componentWillUpdate(l,c,f),t.props=l,t.state=c,t.context=f),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!_){o=t.render(l,c,f),t.getChildContext&&(f=u(u({},f),t.getChildContext()));var x,E,P=o&&o.nodeName;if("function"===typeof P){var T=y(o);(a=b)&&a.constructor===P&&T.key==a.__key?j(a,T,1,f,!1):(x=a,t._component=a=I(P,T,f),a.nextBase=a.nextBase||g,a._parentComponent=t,j(a,T,0,f,!1),M(a,1,n,!0)),E=a.base}else s=v,(x=b)&&(s=t._component=null),(v||1===e)&&(s&&(s._component=null),E=S(s,o,f,n||!m,v&&v.parentNode,!0));if(v&&E!==v&&a!==b){var k=v.parentNode;k&&E!==k&&(k.replaceChild(E,v),x||(v._component=null,C(v,!1)))}if(x&&R(x),t.base=E,E&&!r){for(var L=t,N=t;N=N._parentComponent;)(L=N).base=E;E._component=L,E._componentConstructor=L.constructor}}if(!m||n?A.unshift(t):_||(t.componentDidUpdate&&t.componentDidUpdate(h,p,d),i.afterUpdate&&i.afterUpdate(t)),null!=t._renderCallbacks)for(;t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);w||r||O()}}function R(t){i.beforeUnmount&&i.beforeUnmount(t);var e=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?R(n):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),t.nextBase=e,v(e),function(t){var e=t.constructor.name;(k[e]||(k[e]=[])).push(t)}(t),T(e)),t.__ref&&t.__ref(null)}function N(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{}}function D(t,e,n){return S(n,t,{},!1,e,!1)}u(N.prototype,{setState:function(t,e){var n=this.state;this.prevState||(this.prevState=u({},n)),u(n,"function"===typeof t?t(n,this.props):t),e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),p(this)},forceUpdate:function(t){t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),M(this,2)},render:function(){}});var F={h:s,createElement:s,cloneElement:c,Component:N,render:D,rerender:d,options:i};e.default=F},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return s}));const r=[],i=[];function o(t,e=0,n=1/0){let o=r;const a={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),a.index=e-1),{iterable:o,objectInfo:a}}function a(t){return t&&t[Symbol.asyncIterator]}function s(t,e){const{size:n,stride:r,offset:i,startIndices:o,nested:a}=e,s=t.BYTES_PER_ELEMENT,u=r?r/s:n,l=i?i/s:0,c=Math.floor((t.length-l)/u);return(e,{index:r,target:i})=>{if(!o){const e=r*u+l;for(let r=0;r<n;r++)i[r]=t[e+r];return i}const s=o[r],f=o[r+1]||c;let h;if(a){h=new Array(f-s);for(let e=s;e<f;e++){const r=e*u+l;i=new Array(n);for(let e=0;e<n;e++)i[e]=t[r+e];h[e-s]=i}}else if(u===n)h=t.subarray(s*n+l,f*n+l);else{h=new t.constructor((f-s)*n);let e=0;for(let r=s;r<f;r++){const i=r*u+l;for(let r=0;r<n;r++)h[e++]=t[i+r]}}return h}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return zr})),n.d(e,"b",(function(){return ao})),n.d(e,"c",(function(){return di}));var r=n(312),i=n.n(r);function o(){return o=r||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},o.apply(this,arguments)}var a=n(0),s=n.n(a);function u(t,e){var n=Object(a.useState)((function(){return{inputs:e,result:t()}}))[0],r=Object(a.useRef)(!0),i=Object(a.useRef)(n),o=r.current||Boolean(e&&i.current.inputs&&function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(e,i.current.inputs))?i.current:{inputs:e,result:t()};return Object(a.useEffect)((function(){r.current=!1,i.current=o}),[o]),o.result}var l=u,c=function(t,e){return u((function(){return t}),e)},f=n(570),h=n(571);function p(t,e){t.prototype=f(e.prototype),t.prototype.constructor=t,h(t,e)}var d="Invariant failed";var m=function(t,e){if(!t)throw new Error(d)},g=n(407),y=function(){return Math.random().toString(36).substring(7).split("").join(".")},v={INIT:"@@redux/INIT"+y(),REPLACE:"@@redux/REPLACE"+y(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+y()}};function b(t){if("object"!==typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function _(t,e,n){var r;if("function"===typeof e&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"===typeof e&&"undefined"===typeof n&&(n=e,e=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(_)(t,e)}if("function"!==typeof t)throw new Error("Expected the reducer to be a function.");var i=t,o=e,a=[],s=a,u=!1;function l(){s===a&&(s=a.slice())}function c(){if(u)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function f(t){if("function"!==typeof t)throw new Error("Expected the listener to be a function.");if(u)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var e=!0;return l(),s.push(t),function(){if(e){if(u)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");e=!1,l();var n=s.indexOf(t);s.splice(n,1),a=null}}}function h(t){if(!b(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,o=i(o,t)}finally{u=!1}for(var e=a=s,n=0;n<e.length;n++){(0,e[n])()}return t}function p(t){if("function"!==typeof t)throw new Error("Expected the nextReducer to be a function.");i=t,h({type:v.REPLACE})}function d(){var t,e=f;return(t={subscribe:function(t){if("object"!==typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function n(){t.next&&t.next(c())}return n(),{unsubscribe:e(n)}}})[g.a]=function(){return this},t}return h({type:v.INIT}),(r={dispatch:h,subscribe:f,getState:c,replaceReducer:p})[g.a]=d,r}function A(t,e){return function(){return e(t.apply(this,arguments))}}function w(t,e){if("function"===typeof t)return A(t,e);if("object"!==typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in t){var i=t[r];"function"===typeof i&&(n[r]=A(i,e))}return n}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(n,!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}n(3);var P=s.a.createContext(null);var C=function(t){t()},T={notify:function(){}};function k(){var t=C,e=null,n=null;return{clear:function(){e=null,n=null},notify:function(){t((function(){for(var t=e;t;)t.callback(),t=t.next}))},get:function(){for(var t=[],n=e;n;)t.push(n),n=n.next;return t},subscribe:function(t){var r=!0,i=n={callback:t,next:null,prev:n};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var I=function(){function t(t,e){this.store=t,this.parentSub=e,this.unsubscribe=null,this.listeners=T,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var e=t.prototype;return e.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},e.notifyNestedSubs=function(){this.listeners.notify()},e.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},e.isSubscribed=function(){return Boolean(this.unsubscribe)},e.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=k())},e.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=T)},t}();var L=function(t){var e=t.store,n=t.context,r=t.children,i=Object(a.useMemo)((function(){var t=new I(e);return t.onStateChange=t.notifyNestedSubs,{store:e,subscription:t}}),[e]),o=Object(a.useMemo)((function(){return e.getState()}),[e]);Object(a.useEffect)((function(){var t=i.subscription;return t.trySubscribe(),o!==e.getState()&&t.notifyNestedSubs(),function(){t.tryUnsubscribe(),t.onStateChange=null}}),[i,o]);var u=n||P;return s.a.createElement(u.Provider,{value:i},r)};function j(){return j=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},j.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 R=n(179),N=n.n(R),D=n(226),F="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?a.useLayoutEffect:a.useEffect,B=[],z=[null,null];function U(t,e){var n=t[1];return[e.payload,n+1]}function G(t,e,n){F((function(){return t.apply(void 0,e)}),n)}function V(t,e,n,r,i,o,a){t.current=r,e.current=i,n.current=!1,o.current&&(o.current=null,a())}function q(t,e,n,r,i,o,a,s,u,l){if(t){var c=!1,f=null,h=function(){if(!c){var t,n,h=e.getState();try{t=r(h,i.current)}catch(p){n=p,f=p}n||(f=null),t===o.current?a.current||u():(o.current=t,s.current=t,a.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=h,n.trySubscribe(),h();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var H=function(){return[null,0]};function W(t,e){void 0===e&&(e={});var n=e,r=n.getDisplayName,i=void 0===r?function(t){return"ConnectAdvanced("+t+")"}:r,o=n.methodName,u=void 0===o?"connectAdvanced":o,l=n.renderCountProp,c=void 0===l?void 0:l,f=n.shouldHandleStateChanges,h=void 0===f||f,p=n.storeKey,d=void 0===p?"store":p,m=(n.withRef,n.forwardRef),g=void 0!==m&&m,y=n.context,v=void 0===y?P:y,b=M(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),_=v;return function(e){var n=e.displayName||e.name||"Component",r=i(n),o=j({},b,{getDisplayName:i,methodName:u,renderCountProp:c,shouldHandleStateChanges:h,storeKey:d,displayName:r,wrappedComponentName:n,WrappedComponent:e}),l=b.pure;var f=l?a.useMemo:function(t){return t()};function p(n){var r=Object(a.useMemo)((function(){var t=n.reactReduxForwardedRef,e=M(n,["reactReduxForwardedRef"]);return[n.context,t,e]}),[n]),i=r[0],u=r[1],l=r[2],c=Object(a.useMemo)((function(){return i&&i.Consumer&&Object(D.isContextConsumer)(s.a.createElement(i.Consumer,null))?i:_}),[i,_]),p=Object(a.useContext)(c),d=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(p)&&Boolean(p.store);var m=d?n.store:p.store,g=Object(a.useMemo)((function(){return function(e){return t(e.dispatch,o)}(m)}),[m]),y=Object(a.useMemo)((function(){if(!h)return z;var t=new I(m,d?null:p.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[m,d,p]),v=y[0],b=y[1],A=Object(a.useMemo)((function(){return d?p:j({},p,{subscription:v})}),[d,p,v]),w=Object(a.useReducer)(U,B,H),x=w[0][0],E=w[1];if(x&&x.error)throw x.error;var O=Object(a.useRef)(),S=Object(a.useRef)(l),P=Object(a.useRef)(),C=Object(a.useRef)(!1),T=f((function(){return P.current&&l===S.current?P.current:g(m.getState(),l)}),[m,x,l]);G(V,[S,O,C,l,T,P,b]),G(q,[h,m,v,g,S,O,C,P,b,E],[m,v,g]);var k=Object(a.useMemo)((function(){return s.a.createElement(e,j({},T,{ref:u}))}),[u,e,T]);return Object(a.useMemo)((function(){return h?s.a.createElement(c.Provider,{value:A},k):k}),[c,k,A])}var m=l?s.a.memo(p):p;if(m.WrappedComponent=e,m.displayName=r,g){var y=s.a.forwardRef((function(t,e){return s.a.createElement(m,j({},t,{reactReduxForwardedRef:e}))}));return y.displayName=r,y.WrappedComponent=e,N()(y,e)}return N()(m,e)}}function X(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function Y(t,e){if(X(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(e,n[i])||!X(t[n[i]],e[n[i]]))return!1;return!0}function Z(t){return function(e,n){var r=t(e,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function K(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function $(t,e){return function(e,n){n.displayName;var r=function(t,e){return r.dependsOnOwnProps?r.mapToProps(t,e):r.mapToProps(t)};return r.dependsOnOwnProps=!0,r.mapToProps=function(e,n){r.mapToProps=t,r.dependsOnOwnProps=K(t);var i=r(e,n);return"function"===typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=K(i),i=r(e,n)),i},r}}var J=[function(t){return"function"===typeof t?$(t):void 0},function(t){return t?void 0:Z((function(t){return{dispatch:t}}))},function(t){return t&&"object"===typeof t?Z((function(e){return w(t,e)})):void 0}];var Q=[function(t){return"function"===typeof t?$(t):void 0},function(t){return t?void 0:Z((function(){return{}}))}];function tt(t,e,n){return j({},n,t,e)}var et=[function(t){return"function"===typeof t?function(t){return function(e,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(e,n,s){var u=t(e,n,s);return a?i&&o(u,r)||(r=u):(a=!0,r=u),r}}}(t):void 0},function(t){return t?void 0:function(){return tt}}];function nt(t,e,n,r){return function(i,o){return n(t(i,o),e(r,o),o)}}function rt(t,e,n,r,i){var o,a,s,u,l,c=i.areStatesEqual,f=i.areOwnPropsEqual,h=i.areStatePropsEqual,p=!1;function d(i,p){var d,m,g=!f(p,a),y=!c(i,o);return o=i,a=p,g&&y?(s=t(o,a),e.dependsOnOwnProps&&(u=e(r,a)),l=n(s,u,a)):g?(t.dependsOnOwnProps&&(s=t(o,a)),e.dependsOnOwnProps&&(u=e(r,a)),l=n(s,u,a)):y?(d=t(o,a),m=!h(d,s),s=d,m&&(l=n(s,u,a)),l):l}return function(i,c){return p?d(i,c):(s=t(o=i,a=c),u=e(r,a),l=n(s,u,a),p=!0,l)}}function it(t,e){var n=e.initMapStateToProps,r=e.initMapDispatchToProps,i=e.initMergeProps,o=M(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(t,o),s=r(t,o),u=i(t,o);return(o.pure?rt:nt)(a,s,u,t,o)}function ot(t,e,n){for(var r=e.length-1;r>=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function at(t,e){return t===e}function st(t){var e=void 0===t?{}:t,n=e.connectHOC,r=void 0===n?W:n,i=e.mapStateToPropsFactories,o=void 0===i?Q:i,a=e.mapDispatchToPropsFactories,s=void 0===a?J:a,u=e.mergePropsFactories,l=void 0===u?et:u,c=e.selectorFactory,f=void 0===c?it:c;return function(t,e,n,i){void 0===i&&(i={});var a=i,u=a.pure,c=void 0===u||u,h=a.areStatesEqual,p=void 0===h?at:h,d=a.areOwnPropsEqual,m=void 0===d?Y:d,g=a.areStatePropsEqual,y=void 0===g?Y:g,v=a.areMergedPropsEqual,b=void 0===v?Y:v,_=M(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),A=ot(t,o,"mapStateToProps"),w=ot(e,s,"mapDispatchToProps"),x=ot(n,l,"mergeProps");return r(f,j({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:A,initMapDispatchToProps:w,initMergeProps:x,pure:c,areStatesEqual:p,areOwnPropsEqual:m,areStatePropsEqual:y,areMergedPropsEqual:b},_))}}var ut=st();var lt,ct=n(128);lt=ct.unstable_batchedUpdates,C=lt;var ft=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}}},ht=function(t,e){return{top:t.top-e.top,left:t.left-e.left,bottom:t.bottom+e.bottom,right:t.right+e.right}},pt=function(t,e){return{top:t.top+e.top,left:t.left+e.left,bottom:t.bottom-e.bottom,right:t.right-e.right}},dt={top:0,right:0,bottom:0,left:0},mt=function(t){var e=t.borderBox,n=t.margin,r=void 0===n?dt:n,i=t.border,o=void 0===i?dt:i,a=t.padding,s=void 0===a?dt:a,u=ft(ht(e,r)),l=ft(pt(e,o)),c=ft(pt(l,s));return{marginBox:u,borderBox:ft(e),paddingBox:l,contentBox:c,margin:r,border:o,padding:s}},gt=function(t){var e=t.slice(0,-2);if("px"!==t.slice(-2))return 0;var n=Number(e);return isNaN(n)&&m(!1),n},yt=function(t,e){var n,r,i=t.borderBox,o=t.border,a=t.margin,s=t.padding,u=(r=e,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return mt({borderBox:u,border:o,margin:a,padding:s})},vt=function(t,e){return void 0===e&&(e={x:window.pageXOffset,y:window.pageYOffset}),yt(t,e)},bt=function(t,e){var n={top:gt(e.marginTop),right:gt(e.marginRight),bottom:gt(e.marginBottom),left:gt(e.marginLeft)},r={top:gt(e.paddingTop),right:gt(e.paddingRight),bottom:gt(e.paddingBottom),left:gt(e.paddingLeft)},i={top:gt(e.borderTopWidth),right:gt(e.borderRightWidth),bottom:gt(e.borderBottomWidth),left:gt(e.borderLeftWidth)};return mt({borderBox:t,margin:n,padding:r,border:i})},_t=function(t){var e=t.getBoundingClientRect(),n=window.getComputedStyle(t);return bt(e,n)},At=n(52),wt=n(573),xt=n.n(wt),Et=n(319),Ot=n.n(Et),St=n(408),Pt=n.n(St),Ct=function(t){var e=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e=i,n||(n=requestAnimationFrame((function(){n=null,t.apply(void 0,e)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};n(574);function Tt(t){return-1!==t.message.indexOf("Invariant failed")}var kt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).onError=void 0,e.setOnError=function(t){e.onError=t},e.onFatalError=function(t){e.onError&&e.onError(),Tt(t)&&e.setState({})},e}p(e,t);var n=e.prototype;return n.componentDidMount=function(){window.addEventListener("error",this.onFatalError)},n.componentWillUnmount=function(){window.removeEventListener("error",this.onFatalError)},n.componentDidCatch=function(t){if(this.onFatalError(t),!Tt(t))throw t},n.render=function(){return this.props.children(this.setOnError)},e}(s.a.Component),It={x:0,y:0},Lt=function(t,e){return{x:t.x+e.x,y:t.y+e.y}},jt=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},Mt=function(t,e){return t.x===e.x&&t.y===e.y},Rt=function(t){return{x:0!==t.x?-t.x:0,y:0!==t.y?-t.y:0}},Nt=function(t,e,n){var r;return void 0===n&&(n=0),(r={})[t]=e,r["x"===t?"y":"x"]=n,r},Dt=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},Ft=function(t,e){return Math.min.apply(Math,e.map((function(e){return Dt(t,e)})))},Bt=function(t){return function(e){return{x:t(e.x),y:t(e.y)}}},zt=function(t,e){return{top:t.top+e.y,left:t.left+e.x,bottom:t.bottom+e.y,right:t.right+e.x}},Ut=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},Gt=function(t,e){return e&&e.shouldClipSubject?function(t,e){var n=ft({top:Math.max(e.top,t.top),right:Math.min(e.right,t.right),bottom:Math.min(e.bottom,t.bottom),left:Math.max(e.left,t.left)});return n.width<=0||n.height<=0?null:n}(e.pageMarginBox,t):ft(t)},Vt=function(t){var e=t.page,n=t.withPlaceholder,r=t.axis,i=t.frame,a=function(t,e){return e?zt(t,e.scroll.diff.displacement):t}(e.marginBox,i),s=function(t,e,n){var r;return n&&n.increasedBy?o({},t,((r={})[e.end]=t[e.end]+n.increasedBy[e.line],r)):t}(a,r,n);return{page:e,withPlaceholder:n,active:Gt(s,i)}},qt=function(t,e){t.frame||m(!1);var n=t.frame,r=jt(e,n.scroll.initial),i=Rt(r),a=o({},n,{scroll:{initial:n.scroll.initial,current:e,diff:{value:r,displacement:i},max:n.scroll.max}});return o({},t,{frame:a,subject:Vt({page:t.subject.page,withPlaceholder:t.subject.withPlaceholder,axis:t.axis,frame:a})})},Ht=function(t){var e=t.merge,n=t.destination;return n?n.droppableId:e?e.combine.droppableId:null};function Wt(t){return xt()(t)}function Xt(t,e){if(t.findIndex)return t.findIndex(e);for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}function Yt(t,e){if(t.find)return t.find(e);var n=Xt(t,e);return-1!==n?t[n]:void 0}var Zt=Object(At.default)((function(t){return t.reduce((function(t,e){return t[e.descriptor.id]=e,t}),{})})),Kt=Object(At.default)((function(t){return t.reduce((function(t,e){return t[e.descriptor.id]=e,t}),{})})),$t=Object(At.default)((function(t){return Wt(t)})),Jt=Object(At.default)((function(t){return Wt(t)})),Qt=function(t,e){return function(n){return t<=n&&n<=e}},te=function(t){var e=Qt(t.top,t.bottom),n=Qt(t.left,t.right);return function(t){return e(t.y)&&e(t.y)&&n(t.x)&&n(t.x)}},ee=Object(At.default)((function(t,e){return Jt(e).filter((function(e){return t===e.descriptor.droppableId})).sort((function(t,e){return t.descriptor.index-e.descriptor.index}))})),ne={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},re={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},ie=function(t,e){return t===ne?"down"===e.vertical:"right"===e.horizontal},oe=function(t,e){return Boolean(e.wasDisplaced[t])},ae=function(t){var e=t.displaced,n=t.onLift,r=t.combineWith,i=t.displacedBy,o=Boolean(e[r]);return oe(r,n)?o?It:Rt(i.point):o?i.point:It},se=function(t,e,n){return n?t!==n.combine.draggableId?e:n.whenEntered:e},ue=function(t){var e=t.pageBorderBoxCenterWithDroppableScrollChange,n=t.previousImpact,r=t.destination,i=t.insideDestinationWithoutDraggable,a=t.userDirection,s=t.onLift;if(!r.isCombineEnabled)return null;var u=r.axis,l=n.movement.map,c=n.movement.displacedBy,f=n.merge,h=Yt(i,(function(t){var n=t.descriptor.id,r=ae({displaced:l,onLift:s,combineWith:n,displacedBy:c});return function(t){var e=t.id,n=t.currentCenter,r=t.axis,i=t.borderBox,o=t.displaceBy,a=t.currentUserDirection,s=t.oldMerge,u=i[r.start]+o[r.line],l=i[r.end]+o[r.line],c=.666*i[r.size],f=se(e,a,s),h=ie(r,f),p=n[r.line];return h?Qt(u,u+c)(p):Qt(l-c,l)(p)}({id:n,currentCenter:e,axis:u,borderBox:t.page.borderBox,displaceBy:r,currentUserDirection:a,oldMerge:f})}));return h?o({},n,{destination:null,merge:{whenEntered:se(h.descriptor.id,a,f),combine:{draggableId:h.descriptor.id,droppableId:r.descriptor.id}}}):null},le=function(t){var e=Qt(t.top,t.bottom),n=Qt(t.left,t.right);return function(r){if(e(r.top)&&e(r.bottom)&&n(r.left)&&n(r.right))return!0;var i=e(r.top)||e(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;var a=r.top<t.top&&r.bottom>t.bottom,s=r.left<t.left&&r.right>t.right;return!(!a||!s)||(a&&o||s&&i)}},ce=function(t){var e=Qt(t.top,t.bottom),n=Qt(t.left,t.right);return function(t){return e(t.top)&&e(t.bottom)&&n(t.left)&&n(t.right)}},fe=function(t){var e=t.target,n=t.destination,r=t.viewport,i=t.withDroppableDisplacement,o=t.isVisibleThroughFrameFn,a=i?function(t,e){var n=e.frame?e.frame.scroll.diff.displacement:It;return zt(t,n)}(e,n):e;return function(t,e,n){return!!e.subject.active&&n(e.subject.active)(t)}(a,n,o)&&function(t,e,n){return n(e)(t)}(a,r,o)},he=function(t){return fe(o({},t,{isVisibleThroughFrameFn:le}))},pe=function(t){return fe(o({},t,{isVisibleThroughFrameFn:ce}))},de=function(t){var e=t.draggable,n=t.destination,r=t.previousImpact,i=t.viewport,o=t.onLift,a=t.forceShouldAnimate,s=e.descriptor.id,u=r.movement.map,l=function(t,e){var n=t.page.marginBox;if(!oe(t.descriptor.id,e))return n;var r={top:e.displacedBy.point.y,right:0,bottom:0,left:e.displacedBy.point.x};return ft(ht(n,r))}(e,o),c=he({target:l,destination:n,viewport:i,withDroppableDisplacement:!0}),f=function(t,e,n){return"boolean"===typeof t?t:!!e&&(!n||n.shouldAnimate)}(a,c,u[s]);return{draggableId:s,isVisible:c,shouldAnimate:f}},me=Object(At.default)((function(t){return t.reduce((function(t,e){return t[e.draggableId]=e,t}),{})})),ge=Object(At.default)((function(t,e){var n=e[t.line];return{value:n,point:Nt(t.line,n)}})),ye={displaced:[],map:{},displacedBy:{point:It,value:0}},ve={movement:ye,destination:null,merge:null},be=Object(At.default)((function(t,e){return e.filter((function(e){return e.descriptor.id!==t.descriptor.id}))})),_e=function(t){var e=t.pageBorderBoxCenter,n=t.draggable,r=t.draggables,i=t.droppables,o=t.previousImpact,a=t.viewport,s=t.userDirection,u=t.onLift,l=function(t){var e=t.target,n=t.droppables,r=Yt($t(n),(function(t){if(!t.isEnabled)return!1;var n=t.subject.active;return!!n&&te(n)(e)}));return r?r.descriptor.id:null}({target:e,droppables:i});if(!l)return ve;var c,f,h=i[l],p=ee(h.descriptor.id,r),d=be(n,p),m=(c=e,(f=h.frame)?Lt(c,f.scroll.diff.value):c),g=ue({pageBorderBoxCenterWithDroppableScrollChange:m,previousImpact:o,destination:h,insideDestinationWithoutDraggable:d,userDirection:s,onLift:u});return g||function(t){var e=t.pageBorderBoxCenterWithDroppableScrollChange,n=t.draggable,r=t.destination,i=t.insideDestinationWithoutDraggable,o=t.previousImpact,a=t.viewport,s=t.userDirection,u=t.onLift,l=r.axis,c=ie(r.axis,s),f=ge(r.axis,n.displaceBy),h=e[l.line],p=f.value,d=i.filter((function(t){var e=t.page.borderBox,n=e[l.start],r=e[l.end],i=oe(t.descriptor.id,u);return c?i?h<n:h<n+p:i?h<=r-p:h<=r})).map((function(t){return de({draggable:t,destination:r,previousImpact:o,viewport:a.frame,onLift:u})})),m=i.length-d.length;return{movement:{displacedBy:f,displaced:d,map:me(d)},destination:{droppableId:r.descriptor.id,index:m},merge:null}}({pageBorderBoxCenterWithDroppableScrollChange:m,destination:h,draggable:n,insideDestinationWithoutDraggable:d,previousImpact:o,viewport:a,userDirection:s,onLift:u})},Ae=function(t){var e,n=t.draggable,r=t.home,i=t.draggables,o=t.viewport,a=ge(r.axis,n.displaceBy),s=ee(r.descriptor.id,i).slice(n.descriptor.index+1),u={displacedBy:a,wasDisplaced:s.reduce((function(t,e){return t[e.descriptor.id]=!0,t}),{})},l=s.map((function(t){return de({draggable:t,destination:r,previousImpact:ve,viewport:o.frame,forceShouldAnimate:!1,onLift:u})}));return{impact:{movement:{displaced:l,map:me(l),displacedBy:a},destination:(e=n.descriptor,{index:e.index,droppableId:e.droppableId}),merge:null},onLift:u}},we=function(t){var e=t.draggable,n=t.offset,r=t.initialWindowScroll,i=yt(e.client,n),a=vt(i,r);return o({},e,{placeholder:o({},e.placeholder,{client:i}),client:i,page:a})},xe=function(t){var e=t.updatedDroppables,n=t.criticalId,r=t.existing,i=t.additions,a=t.removals,s=t.viewport,u=function(t){var e=t.existing,n=t.droppables,r=t.additions,i=t.removals,a=t.viewport,s={};return $t(n).forEach((function(t){var n=t.axis,u=ee(t.descriptor.id,e),l={},c=function(t,e){var n=l[t];l[t]=n?{indexChange:n.indexChange+e.indexChange,offset:Lt(n.offset,e.offset)}:e},f=Kt(i.map((function(t){var n=e[t];return n||m(!1),n})).filter((function(e){return e.descriptor.droppableId===t.descriptor.id}))),h=u.filter((function(t,e){if(!Boolean(f[t.descriptor.id]))return!0;var r=Rt(Nt(n.line,t.displaceBy[n.line]));return u.slice(e).forEach((function(t){f[t.descriptor.id]||c(t.descriptor.id,{indexChange:-1,offset:r})})),!1})),p=r.filter((function(e){return e.descriptor.droppableId===t.descriptor.id})),d=h.slice(0);p.forEach((function(t){d.splice(t.descriptor.index,0,t)}));var g=Kt(p);d.forEach((function(t,e){if(Boolean(g[t.descriptor.id])){var r=Nt(n.line,t.client.marginBox[n.size]);d.slice(e).forEach((function(t){g[t.descriptor.id]||c(t.descriptor.id,{indexChange:1,offset:r})}))}})),d.forEach((function(t){if(!g[t.descriptor.id]){var e=l[t.descriptor.id];if(e){var n=we({draggable:t,offset:e.offset,initialWindowScroll:a.scroll.initial}),r=t.descriptor.index+e.indexChange,i=o({},n,{descriptor:o({},t.descriptor,{index:r})});s[n.descriptor.id]=i}}}))})),o({},e,s)}({droppables:e,existing:r,additions:i,removals:a,viewport:s}),l=u[n],c=e[l.descriptor.droppableId],f=function(t){var e=t.additions,n=t.updatedDroppables,r=t.viewport,i=r.scroll.diff.value;return e.map((function(t){var e=t.descriptor.droppableId,o=n[e].frame;o||m(!1);var a=o.scroll.diff.value,s=Lt(i,a);return we({draggable:t,offset:s,initialWindowScroll:r.scroll.initial})}))}({additions:i,updatedDroppables:e,viewport:s}),h=function(t){var e=t.additions,n=t.dragging,r=t.home,i=t.viewport,o=ge(r.axis,n.displaceBy);return e.map((function(t){return t.descriptor.droppableId!==r.descriptor.id||t.descriptor.index<n.descriptor.index?t:we({draggable:t,offset:o.point,initialWindowScroll:i.scroll.initial})}))}({additions:f,dragging:l,home:c,viewport:s}),p=o({},u,Kt(h));return a.forEach((function(t){delete p[t]})),p},Ee=function(t){var e=t.scrollHeight,n=t.scrollWidth,r=t.height,i=t.width,o=jt({x:n,y:e},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Oe=function(t){var e=t.descriptor,n=t.isEnabled,r=t.isCombineEnabled,i=t.isFixedOnPage,o=t.direction,a=t.client,s=t.page,u=t.closest,l=function(){if(!u)return null;var t=u.scrollSize,e=u.client,n=Ee({scrollHeight:t.scrollHeight,scrollWidth:t.scrollWidth,height:e.paddingBox.height,width:e.paddingBox.width});return{pageMarginBox:u.page.marginBox,frameClient:e,scrollSize:t,shouldClipSubject:u.shouldClipSubject,scroll:{initial:u.scroll,current:u.scroll,max:n,diff:{value:It,displacement:It}}}}(),c="vertical"===o?ne:re;return{descriptor:e,isCombineEnabled:r,isFixedOnPage:i,axis:c,isEnabled:n,client:a,page:s,frame:l,subject:Vt({page:s,withPlaceholder:null,axis:c,frame:l})}},Se=function(t,e){return t.descriptor.droppableId===e.descriptor.id},Pe=function(t,e){return o({},t,{scroll:o({},t.scroll,{max:e})})},Ce=function(t,e,n){var r=t.frame;Se(e,t)&&m(!1),t.subject.withPlaceholder&&m(!1);var i=ge(t.axis,e.displaceBy).point,a=function(t,e,n){var r=t.axis,i=t.subject.page.contentBox[r.size],o=ee(t.descriptor.id,n).reduce((function(t,e){return t+e.client.marginBox[r.size]}),0)+e[r.line]-i;return o<=0?null:Nt(r.line,o)}(t,i,n),s={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!r)return o({},t,{subject:Vt({page:t.subject.page,withPlaceholder:s,axis:t.axis,frame:t.frame})});var u=a?Lt(r.scroll.max,a):r.scroll.max,l=Pe(r,u);return o({},t,{subject:Vt({page:t.subject.page,withPlaceholder:s,axis:t.axis,frame:l}),frame:l})},Te=function(t){var e=t.subject.withPlaceholder;e||m(!1);var n=t.frame;if(!n)return o({},t,{subject:Vt({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null})});var r=e.oldFrameMaxScroll;r||m(!1);var i=Pe(n,r);return o({},t,{subject:Vt({page:t.subject.page,axis:t.axis,frame:i,withPlaceholder:null}),frame:i})},ke=function(t){var e=t.frame;return e||m(!1),e},Ie=function(t,e){var n;return o({},t,((n={})[e.descriptor.id]=e,n))},Le=function(t){var e=t.draggable,n=t.draggables,r=t.droppables,i=t.previousImpact,o=t.impact,a=function(t){var e=t.previousImpact,n=t.impact,r=t.droppables,i=Ht(e),o=Ht(n);if(!i)return r;if(i===o)return r;var a=r[i];if(!a.subject.withPlaceholder)return r;var s=Te(a);return Ie(r,s)}({previousImpact:i,impact:o,droppables:r}),s=Ht(o);if(!s)return a;var u=r[s];if(Se(e,u))return a;if(u.subject.withPlaceholder)return a;var l=Ce(u,e,n);return Ie(a,l)},je=function(t){var e,n,r=t.state,i=t.published,a=function(t){var e=t.modified,n=t.existing,r=t.viewport;if(!e.length)return n;var i=e.map((function(t){var e=n[t.descriptor.id];e||m(!1);var i,o,a=Boolean(e.subject.withPlaceholder)?Te(e):e,s=a.client,u=t.client,l=ke(a),c=ke(t),f=mt({borderBox:(a.axis,i=s.borderBox,o=u.borderBox,{top:i.top,left:i.left,right:i.left+o.width,bottom:i.top+o.height}),margin:s.margin,border:s.border,padding:s.padding}),h={client:l.frameClient,page:vt(l.frameClient,r.scroll.initial),shouldClipSubject:l.shouldClipSubject,scrollSize:c.scrollSize,scroll:l.scroll.initial},p=Oe({descriptor:t.descriptor,isEnabled:t.isEnabled,isCombineEnabled:t.isCombineEnabled,isFixedOnPage:t.isFixedOnPage,direction:t.axis.direction,client:f,page:vt(f,r.scroll.initial),closest:h});return qt(p,c.scroll.current)}));return o({},n,Zt(i))}({modified:i.modified,existing:r.dimensions.droppables,viewport:r.viewport}),s=xe({updatedDroppables:a,criticalId:r.critical.draggable.id,existing:r.dimensions.draggables,additions:i.additions,removals:i.removals,viewport:r.viewport}),u={draggable:s[r.critical.draggable.id].descriptor,droppable:a[r.critical.droppable.id].descriptor},l=r.dimensions.draggables[u.draggable.id],c=s[u.draggable.id],f={draggables:s,droppables:Le({draggable:c,draggables:s,droppables:a,previousImpact:r.impact,impact:r.impact})},h=function(t){var e,n=t.initial,r=t.current,i=t.oldClientBorderBoxCenter,o=t.newClientBorderBoxCenter,a=t.viewport,s=jt(o,i),u={client:e={selection:Lt(n.client.selection,s),borderBoxCenter:o,offset:It},page:{selection:Lt(e.selection,a.scroll.initial),borderBoxCenter:Lt(e.selection,a.scroll.initial)}},l=function(){var t=Rt(s),e=Lt(r.client.offset,t),n={selection:Lt(u.client.selection,e),borderBoxCenter:Lt(u.client.borderBoxCenter,e),offset:e},i={selection:Lt(n.selection,a.scroll.current),borderBoxCenter:Lt(n.borderBoxCenter,a.scroll.current)};return Mt(r.client.borderBoxCenter,n.borderBoxCenter)||m(!1),{client:n,page:i}}();return{current:l,initial:u}}({initial:r.initial,current:r.current,oldClientBorderBoxCenter:l.client.borderBox.center,newClientBorderBoxCenter:c.client.borderBox.center,viewport:r.viewport}),p=h.initial,d=h.current,g=Ae({draggable:c,home:f.droppables[u.droppable.id],draggables:f.draggables,viewport:r.viewport}),y=g.impact,v=g.onLift,b=function(t){var e=t.movement.displaced;if(!e.length)return t;var n=e.map((function(t){return t.isVisible&&t.shouldAnimate?o({},t,{shouldAnimate:!1}):t}));return o({},t,{movement:o({},t.movement,{displaced:n,map:me(n)})})}(_e({pageBorderBoxCenter:d.page.borderBoxCenter,draggable:c,draggables:f.draggables,droppables:f.droppables,previousImpact:y,viewport:r.viewport,userDirection:r.userDirection,onLift:v}));Boolean("SNAP"===r.movementMode&&!Ht(b))&&m(!1);var _=o({phase:"DRAGGING"},r,((e={}).phase="DRAGGING",e.critical=u,e.current=d,e.initial=p,e.impact=b,e.dimensions=f,e.onLift=v,e.onLiftImpact=y,e.forceShouldAnimate=!1,e));return"COLLECTING"===r.phase?_:o({phase:"DROP_PENDING"},_,((n={}).phase="DROP_PENDING",n.reason=r.reason,n.isWaiting=!1,n))},Me={vertical:"down",horizontal:"right"},Re={vertical:"up",horizontal:"left"},Ne=function(t){var e=t.isMovingForward,n=t.isInHomeList,r=t.draggable,i=t.draggables,o=t.destination,a=t.insideDestination,s=t.previousImpact,u=t.onLift,l=s.destination?function(t){var e=t.isMovingForward,n=t.isInHomeList,r=t.draggable,i=t.insideDestination,o=t.location,a=i.slice(),s=o.index;!n&&a.splice(o.index,0,r);var u=e?s+1:s-1;return u<0||u>a.length-1?null:{proposedIndex:u,modifyDisplacement:!0}}({isMovingForward:e,isInHomeList:n,draggable:r,location:s.destination,insideDestination:a}):s.merge?function(t){var e=t.isMovingForward,n=t.destination,r=t.previousImpact,i=t.draggables,o=t.merge,a=t.onLift;if(!n.isCombineEnabled)return null;var s=r.movement,u=o.combine.draggableId,l=i[u].descriptor.index;return oe(u,a)?s.map[u]?e?{proposedIndex:l,modifyDisplacement:!0}:{proposedIndex:l-1,modifyDisplacement:!1}:e?{proposedIndex:l,modifyDisplacement:!1}:{proposedIndex:l-1,modifyDisplacement:!0}:Boolean(s.map[u])?e?{proposedIndex:l+1,modifyDisplacement:!0}:{proposedIndex:l,modifyDisplacement:!1}:e?{proposedIndex:l+1,modifyDisplacement:!1}:{proposedIndex:l,modifyDisplacement:!0}}({isMovingForward:e,destination:o,previousImpact:s,draggables:i,merge:s.merge,onLift:u}):null;if(null==l)return null;var c,f=l.proposedIndex,h=l.modifyDisplacement,p=ge(o.axis,r.displaceBy),d=(c=s.movement.displaced,h?e?function(t){return t.slice(1)}(c):function(t,e){return[{draggableId:t.descriptor.id,isVisible:!0,shouldAnimate:!0}].concat(e)}(be(r,a)[f],c):c);return{movement:{displacedBy:p,displaced:d,map:me(d)},destination:{droppableId:o.descriptor.id,index:f},merge:null}},De=function(t,e){return e.margin[t.start]+e.borderBox[t.size]/2},Fe=function(t,e,n){return e[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2},Be=function(t){var e=t.axis,n=t.moveRelativeTo,r=t.isMoving;return Nt(e.line,n.marginBox[e.end]+De(e,r),Fe(e,n.marginBox,r))},ze=function(t){var e=t.axis,n=t.moveRelativeTo,r=t.isMoving;return Nt(e.line,n.marginBox[e.start]-function(t,e){return e.margin[t.end]+e.borderBox[t.size]/2}(e,r),Fe(e,n.marginBox,r))},Ue=function(t){var e=t.movement,n=t.draggable,r=t.draggables,i=t.droppable,o=t.onLift,a=ee(i.descriptor.id,r),s=n.page,u=i.axis;if(!a.length)return function(t){var e=t.axis,n=t.moveInto,r=t.isMoving;return Nt(e.line,n.contentBox[e.start]+De(e,r),Fe(e,n.contentBox,r))}({axis:u,moveInto:i.page,isMoving:s});var l=e.displaced,c=e.displacedBy;if(l.length){var f=r[l[0].draggableId];if(oe(f.descriptor.id,o))return ze({axis:u,moveRelativeTo:f.page,isMoving:s});var h=yt(f.page,c.point);return ze({axis:u,moveRelativeTo:h,isMoving:s})}var p=a[a.length-1];if(p.descriptor.id===n.descriptor.id)return s.borderBox.center;if(oe(p.descriptor.id,o)){var d=yt(p.page,Rt(o.displacedBy.point));return Be({axis:u,moveRelativeTo:d,isMoving:s})}return Be({axis:u,moveRelativeTo:p.page,isMoving:s})},Ge=function(t,e){var n=t.frame;return n?Lt(e,n.scroll.diff.displacement):e},Ve=function(t){var e=t.impact,n=t.draggable,r=t.droppable,i=t.draggables,o=t.onLift,a=e.merge,s=e.destination,u=n.page.borderBox.center;return r?s?Ue({movement:e.movement,draggable:n,draggables:i,droppable:r,onLift:o}):a?function(t){var e=t.combine,n=t.onLift,r=t.movement,i=t.draggables,o=e.draggableId,a=i[o].page.borderBox.center,s=ae({displaced:r.map,onLift:n,combineWith:o,displacedBy:r.displacedBy});return Lt(a,s)}({movement:e.movement,combine:a.combine,draggables:i,onLift:o}):u:u},qe=function(t){var e=Ve(t),n=t.droppable;return n?Ge(n,e):e},He=function(t,e){var n=jt(e,t.scroll.initial),r=Rt(n);return{frame:ft({top:e.y,bottom:e.y+t.frame.height,left:e.x,right:e.x+t.frame.width}),scroll:{initial:t.scroll.initial,max:t.scroll.max,current:e,diff:{value:n,displacement:r}}}},We=function(t,e){return o({},t,{movement:o({},t.movement,{displaced:e,map:me(e)})})},Xe=function(t){var e=t.pageBorderBoxCenter,n=t.draggable,r=function(t,e){return Lt(t.scroll.diff.displacement,e)}(t.viewport,e),i=jt(r,n.page.borderBox.center);return Lt(n.client.borderBox.center,i)},Ye=function(t){var e=t.draggable,n=t.destination,r=t.newPageBorderBoxCenter,i=t.viewport,a=t.withDroppableDisplacement,s=t.onlyOnMainAxis,u=void 0!==s&&s,l=jt(r,e.page.borderBox.center),c={target:zt(e.page.borderBox,l),destination:n,withDroppableDisplacement:a,viewport:i};return u?function(t){return fe(o({},t,{isVisibleThroughFrameFn:(e=t.destination.axis,function(t){var n=Qt(t.top,t.bottom),r=Qt(t.left,t.right);return function(t){return e===ne?n(t.top)&&n(t.bottom):r(t.left)&&r(t.right)}})}));var e}(c):pe(c)},Ze=function(t){var e=t.isMovingForward,n=t.draggable,r=t.destination,i=t.draggables,o=t.previousImpact,a=t.viewport,s=t.previousPageBorderBoxCenter,u=t.previousClientSelection,l=t.onLift;if(!r.isEnabled)return null;var c=ee(r.descriptor.id,i),f=Se(n,r),h=function(t){var e=t.isMovingForward,n=t.isInHomeList,r=t.draggable,i=t.destination,o=t.insideDestination,a=t.previousImpact;if(!i.isCombineEnabled)return null;if(a.merge)return null;var s=a.destination;s||m(!1);var u,l=s.index,c=(u=o.slice(),n&&u.splice(r.descriptor.index,1),u.splice(s.index,0,r),u),f=e?l+1:l-1;if(f<0)return null;if(f>c.length-1)return null;var h=c[f];h===r&&m(!1);var p={whenEntered:e?Me:Re,combine:{draggableId:h.descriptor.id,droppableId:i.descriptor.id}};return{movement:a.movement,destination:null,merge:p}}({isInHomeList:f,isMovingForward:e,draggable:n,destination:r,insideDestination:c,previousImpact:o})||Ne({isMovingForward:e,isInHomeList:f,draggable:n,draggables:i,destination:r,insideDestination:c,previousImpact:o,onLift:l});if(!h)return null;var p=qe({impact:h,draggable:n,droppable:r,draggables:i,onLift:l});if(Ye({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Xe({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:h,scrollJumpRequest:null};var d=jt(p,s),g=function(t){var e=t.impact,n=t.viewport,r=t.destination,i=t.draggables,o=t.maxScrollChange,a=t.onLift,s=e.movement.displaced,u=He(n,Lt(n.scroll.current,o)),l=r.frame?qt(r,Lt(r.frame.scroll.current,o)):r,c=s.map((function(t){if(t.isVisible)return t;var o=i[t.draggableId],s=de({draggable:o,destination:r,previousImpact:e,viewport:u.frame,onLift:a,forceShouldAnimate:!1});if(s.isVisible)return s;var c=de({draggable:o,destination:l,previousImpact:e,viewport:n.frame,onLift:a,forceShouldAnimate:!1});return c.isVisible?c:t}));return We(e,c)}({impact:h,viewport:a,destination:r,draggables:i,maxScrollChange:d,onLift:l});return{clientSelection:u,impact:g,scrollJumpRequest:d}},Ke=function(t){var e=t.subject.active;return e||m(!1),e},$e=function(t,e){var n=t.page.borderBox.center;return oe(t.descriptor.id,e)?jt(n,e.displacedBy.point):n},Je=function(t,e){var n=t.page.borderBox;return oe(t.descriptor.id,e)?zt(n,Rt(e.displacedBy.point)):n},Qe=function(t){var e=t.isMovingForward,n=t.previousPageBorderBoxCenter,r=t.draggable,i=t.isOver,o=t.draggables,a=t.droppables,s=t.previousImpact,u=t.viewport,l=t.onLift,c=function(t){var e=t.isMovingForward,n=t.pageBorderBoxCenter,r=t.source,i=t.droppables,o=t.viewport,a=r.subject.active;if(!a)return null;var s=r.axis,u=Qt(a[s.start],a[s.end]),l=$t(i).filter((function(t){return t!==r})).filter((function(t){return t.isEnabled})).filter((function(t){return Boolean(t.subject.active)})).filter((function(t){return le(o.frame)(Ke(t))})).filter((function(t){var n=Ke(t);return e?a[s.crossAxisEnd]<n[s.crossAxisEnd]:n[s.crossAxisStart]<a[s.crossAxisStart]})).filter((function(t){var e=Ke(t),n=Qt(e[s.start],e[s.end]);return u(e[s.start])||u(e[s.end])||n(a[s.start])||n(a[s.end])})).sort((function(t,n){var r=Ke(t)[s.crossAxisStart],i=Ke(n)[s.crossAxisStart];return e?r-i:i-r})).filter((function(t,e,n){return Ke(t)[s.crossAxisStart]===Ke(n[0])[s.crossAxisStart]}));if(!l.length)return null;if(1===l.length)return l[0];var c=l.filter((function(t){return Qt(Ke(t)[s.start],Ke(t)[s.end])(n[s.line])}));return 1===c.length?c[0]:c.length>1?c.sort((function(t,e){return Ke(t)[s.start]-Ke(e)[s.start]}))[0]:l.sort((function(t,e){var r=Ft(n,Ut(Ke(t))),i=Ft(n,Ut(Ke(e)));return r!==i?r-i:Ke(t)[s.start]-Ke(e)[s.start]}))[0]}({isMovingForward:e,pageBorderBoxCenter:n,source:i,droppables:a,viewport:u});if(!c)return null;var f=ee(c.descriptor.id,o),h=function(t){var e=t.pageBorderBoxCenter,n=t.viewport,r=t.destination,i=t.insideDestination,o=t.onLift;return i.filter((function(t){return pe({target:Je(t,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(t,n){var i=Dt(e,Ge(r,$e(t,o))),a=Dt(e,Ge(r,$e(n,o)));return i<a?-1:a<i?1:t.descriptor.index-n.descriptor.index}))[0]||null}({pageBorderBoxCenter:n,viewport:u,destination:c,insideDestination:f,onLift:l}),p=function(t){var e=t.previousPageBorderBoxCenter,n=t.moveRelativeTo,r=t.insideDestination,i=t.draggable,o=t.draggables,a=t.destination,s=t.previousImpact,u=t.viewport,l=t.onLift;if(!n){if(r.length)return null;var c={movement:ye,destination:{droppableId:a.descriptor.id,index:0},merge:null},f=qe({impact:c,draggable:i,droppable:a,draggables:o,onLift:l}),h=Se(i,a)?a:Ce(a,i,o);return Ye({draggable:i,destination:h,newPageBorderBoxCenter:f,viewport:u.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var p=Boolean(e[a.axis.line]<n.page.borderBox.center[a.axis.line]),d=r.indexOf(n);-1===d&&m(!1);var g=n.descriptor.id===i.descriptor.id||p?d:d+1,y=be(i,r).slice(g).map((function(t){return de({draggable:t,destination:a,viewport:u.frame,previousImpact:s,onLift:l})}));return{movement:{displacedBy:ge(a.axis,i.displaceBy),displaced:y,map:me(y)},destination:{droppableId:a.descriptor.id,index:g},merge:null}}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:o,moveRelativeTo:h,insideDestination:f,previousImpact:s,viewport:u,onLift:l});if(!p)return null;var d=qe({impact:p,draggable:r,droppable:c,draggables:o,onLift:l});return{clientSelection:Xe({pageBorderBoxCenter:d,draggable:r,viewport:u}),impact:p,scrollJumpRequest:null}},tn=function(t){var e=t.state,n=t.type,r=function(t,e){var n=Ht(t);return n?e[n]:null}(e.impact,e.dimensions.droppables),i=Boolean(r),o=e.dimensions.droppables[e.critical.droppable.id],a=r||o,s=a.axis.direction,u="vertical"===s&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===s&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(u&&!i)return null;var l="MOVE_DOWN"===n||"MOVE_RIGHT"===n,c=e.dimensions.draggables[e.critical.draggable.id],f=e.current.page.borderBoxCenter,h=e.dimensions,p=h.draggables,d=h.droppables;return u?Ze({isMovingForward:l,previousPageBorderBoxCenter:f,draggable:c,destination:a,draggables:p,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,onLift:e.onLift}):Qe({isMovingForward:l,previousPageBorderBoxCenter:f,draggable:c,isOver:a,draggables:p,droppables:d,previousImpact:e.impact,viewport:e.viewport,onLift:e.onLift})};function en(t){return"DRAGGING"===t.phase||"COLLECTING"===t.phase}var nn,rn=function(t,e){return 0===e?t:e>0?"down":"up"},on=function(t,e){return 0===e?t:e>0?"right":"left"},an=function(t){var e,n,r,i,a=t.state,s=t.clientSelection,u=t.dimensions,l=t.viewport,c=t.impact,f=t.scrollJumpRequest,h=l||a.viewport,p=h.scroll.current,d=u||a.dimensions,m=s||a.current.client.selection,g=jt(m,a.initial.client.selection),y={offset:g,selection:m,borderBoxCenter:Lt(a.initial.client.borderBoxCenter,g)},v={selection:Lt(y.selection,p),borderBoxCenter:Lt(y.borderBoxCenter,p)},b={client:y,page:v},_=(e=a.userDirection,n=a.current.page.borderBoxCenter,r=b.page.borderBoxCenter,i=jt(r,n),{horizontal:on(e.horizontal,i.x),vertical:rn(e.vertical,i.y)});if("COLLECTING"===a.phase)return o({phase:"COLLECTING"},a,{dimensions:d,viewport:h,current:b,userDirection:_});var A=d.draggables[a.critical.draggable.id],w=c||_e({pageBorderBoxCenter:v.borderBoxCenter,draggable:A,draggables:d.draggables,droppables:d.droppables,previousImpact:a.impact,viewport:h,userDirection:_,onLift:a.onLift}),x=Le({draggable:A,impact:w,previousImpact:a.impact,draggables:d.draggables,droppables:d.droppables});return o({},a,{current:b,userDirection:_,dimensions:{draggables:d.draggables,droppables:x},impact:w,viewport:h,scrollJumpRequest:f||null,forceShouldAnimate:!f&&null})},sn=function(t){var e=t.impact,n=t.viewport,r=t.destination,i=t.draggables,o=t.onLift,a=t.forceShouldAnimate,s=e.movement.displaced.map((function(t){return de({draggable:i[t.draggableId],destination:r,previousImpact:e,viewport:n.frame,onLift:o,forceShouldAnimate:a})}));return We(e,s)},un=function(t){var e=t.impact,n=t.draggable,r=t.droppable,i=t.draggables,o=t.viewport,a=t.onLift,s=qe({impact:e,draggable:n,draggables:i,droppable:r,onLift:a});return Xe({pageBorderBoxCenter:s,draggable:n,viewport:o})},ln=function(t){var e=t.state,n=t.dimensions,r=t.viewport;"SNAP"!==e.movementMode&&m(!1);var i=e.impact,o=r||e.viewport,a=n||e.dimensions,s=a.draggables,u=a.droppables,l=s[e.critical.draggable.id],c=Ht(i);c||m(!1);var f=u[c],h=sn({impact:i,viewport:o,destination:f,draggables:s,onLift:e.onLift}),p=un({impact:h,draggable:l,droppable:f,draggables:s,viewport:o,onLift:e.onLift});return an({impact:h,clientSelection:p,state:e,dimensions:a,viewport:o})},cn=function(t){return"SNAP"===t.movementMode},fn=function(t,e,n){var r=function(t,e){return{draggables:t.draggables,droppables:Ie(t.droppables,e)}}(t.dimensions,e);return!cn(t)||n?an({state:t,dimensions:r}):ln({state:t,dimensions:r})},hn={phase:"IDLE",completed:null,shouldFlush:!1},pn=function(t,e){if(void 0===t&&(t=hn),"CLEAN"===e.type)return o({},hn,{shouldFlush:e.payload.shouldFlush});if("INITIAL_PUBLISH"===e.type){"IDLE"!==t.phase&&m(!1);var n=e.payload,r=n.critical,i=n.clientSelection,a=n.viewport,s=n.dimensions,u=n.movementMode,l=s.draggables[r.draggable.id],c=s.droppables[r.droppable.id],f={selection:i,borderBoxCenter:l.client.borderBox.center,offset:It},h={client:f,page:{selection:Lt(f.selection,a.scroll.initial),borderBoxCenter:Lt(f.selection,a.scroll.initial)}},p=$t(s.droppables).every((function(t){return!t.isFixedOnPage})),d=Ae({draggable:l,home:c,draggables:s.draggables,viewport:a}),g=d.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:u,dimensions:s,initial:h,current:h,isWindowScrollAllowed:p,impact:g,onLift:d.onLift,onLiftImpact:g,viewport:a,userDirection:Me,scrollJumpRequest:null,forceShouldAnimate:null}}var y;if("COLLECTION_STARTING"===e.type)return"COLLECTING"===t.phase||"DROP_PENDING"===t.phase?t:("DRAGGING"!==t.phase&&m(!1),o({phase:"COLLECTING"},t,((y={}).phase="COLLECTING",y)));if("PUBLISH_WHILE_DRAGGING"===e.type)return"COLLECTING"!==t.phase&&"DROP_PENDING"!==t.phase&&m(!1),je({state:t,published:e.payload});if("MOVE"===e.type){if("DROP_PENDING"===t.phase)return t;en(t)||m(!1);var v=e.payload.client;return Mt(v,t.current.client.selection)?t:an({state:t,clientSelection:v,impact:cn(t)?t.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===e.type){if("DROP_PENDING"===t.phase)return t;if("COLLECTING"===t.phase)return t;en(t)||m(!1);var b=e.payload,_=b.id,A=b.offset,w=t.dimensions.droppables[_];if(!w)return t;var x=qt(w,A);return fn(t,x,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===e.type){if("DROP_PENDING"===t.phase)return t;en(t)||m(!1);var E=e.payload,O=E.id,S=E.isEnabled,P=t.dimensions.droppables[O];P||m(!1),P.isEnabled===S&&m(!1);var C=o({},P,{isEnabled:S});return fn(t,C,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===e.type){if("DROP_PENDING"===t.phase)return t;en(t)||m(!1);var T=e.payload,k=T.id,I=T.isCombineEnabled,L=t.dimensions.droppables[k];L||m(!1),L.isCombineEnabled===I&&m(!1);var j=o({},L,{isCombineEnabled:I});return fn(t,j,!0)}if("MOVE_BY_WINDOW_SCROLL"===e.type){if("DROP_PENDING"===t.phase||"DROP_ANIMATING"===t.phase)return t;en(t)||m(!1),t.isWindowScrollAllowed||m(!1);var M=e.payload.newScroll;if(Mt(t.viewport.scroll.current,M))return t;var R=He(t.viewport,M);return cn(t)?ln({state:t,viewport:R}):an({state:t,viewport:R})}if("UPDATE_VIEWPORT_MAX_SCROLL"===e.type){if(!en(t))return t;var N=e.payload.maxScroll;if(Mt(N,t.viewport.scroll.max))return t;var D=o({},t.viewport,{scroll:o({},t.viewport.scroll,{max:N})});return o({phase:"DRAGGING"},t,{viewport:D})}if("MOVE_UP"===e.type||"MOVE_DOWN"===e.type||"MOVE_LEFT"===e.type||"MOVE_RIGHT"===e.type){if("COLLECTING"===t.phase||"DROP_PENDING"===t.phase)return t;"DRAGGING"!==t.phase&&m(!1);var F=tn({state:t,type:e.type});return F?an({state:t,impact:F.impact,clientSelection:F.clientSelection,scrollJumpRequest:F.scrollJumpRequest}):t}if("DROP_PENDING"===e.type){var B,z=e.payload.reason;return"COLLECTING"!==t.phase&&m(!1),o({phase:"DROP_PENDING"},t,((B={}).phase="DROP_PENDING",B.isWaiting=!0,B.reason=z,B))}if("DROP_ANIMATE"===e.type){var U=e.payload,G=U.completed,V=U.dropDuration,q=U.newHomeClientOffset;return"DRAGGING"!==t.phase&&"DROP_PENDING"!==t.phase&&m(!1),{phase:"DROP_ANIMATING",dimensions:t.dimensions,completed:G,dropDuration:V,newHomeClientOffset:q}}if("DROP_COMPLETE"===e.type){var H=e.payload;return{phase:"IDLE",completed:H.completed,shouldFlush:H.shouldFlush}}return t},dn=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},mn=function(){return{type:"COLLECTION_STARTING",payload:null}},gn=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},yn=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},vn=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},bn=function(t){return{type:"MOVE",payload:t}},_n=function(t){return{type:"DROP_COMPLETE",payload:t}},An=function(t){return{type:"DROP",payload:t}},wn="cubic-bezier(.2,1,.1,1)",xn={drop:0,combining:.7},En={drop:.75},On=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Sn={fluid:"opacity "+On,snap:"transform "+On+", opacity "+On,drop:function(t){var e=t+"s "+wn;return"transform "+e+", opacity "+e},outOfTheWay:"transform "+On,placeholder:"height "+On+", width "+On+", margin "+On},Pn=function(t){return Mt(t,It)?null:"translate("+t.x+"px, "+t.y+"px)"},Cn=Pn,Tn=function(t,e){var n=Pn(t);return n?e?n+" scale("+En.drop+")":n:null},kn=.33,In=.55,Ln=In-kn,jn=function(t){var e=t.getState,n=t.dispatch;return function(t){return function(r){if("DROP"===r.type){var i=e(),a=r.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&m(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&m(!1);var s=i.critical,u=i.dimensions,l=function(t){var e=t.reason,n=t.lastImpact,r=t.home,i=t.viewport,a=t.draggables,s=t.onLiftImpact,u=t.onLift,l="DROP"===e&&Boolean(Ht(n));return l?n.destination?{impact:n,didDropInsideDroppable:l}:{impact:o({},n,{movement:ye}),didDropInsideDroppable:l}:{impact:sn({impact:s,destination:r,viewport:i,draggables:a,onLift:u,forceShouldAnimate:!0}),didDropInsideDroppable:l}}({reason:a,lastImpact:i.impact,onLift:i.onLift,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),c=l.impact,f=l.didDropInsideDroppable,h=u.draggables[i.critical.draggable.id],p=f?c.destination:null,d=f&&c.merge?c.merge.combine:null,g={index:s.draggable.index,droppableId:s.droppable.id},y={draggableId:h.descriptor.id,type:h.descriptor.type,source:g,reason:a,mode:i.movementMode,destination:p,combine:d},v=function(t){var e=t.impact,n=t.draggable,r=t.dimensions,i=t.viewport,o=t.onLift,a=r.draggables,s=r.droppables,u=Ht(e),l=u?s[u]:null,c=s[n.descriptor.droppableId],f=un({impact:e,draggable:n,draggables:a,onLift:o,droppable:l||c,viewport:i}),h=jt(f,n.client.borderBox.center),p=e.merge;return p&&oe(p.combine.draggableId,o)?jt(h,o.displacedBy.point):h}({impact:c,draggable:h,dimensions:u,viewport:i.viewport,onLift:i.onLift}),b={critical:i.critical,result:y,impact:c};if(!Mt(i.current.client.offset,v)||Boolean(y.combine)){var _=function(t){var e=t.current,n=t.destination,r=t.reason,i=Dt(e,n);if(i<=0)return kn;if(i>=1500)return In;var o=kn+Ln*(i/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))}({current:i.current.client.offset,destination:v,reason:a});n(function(t){return{type:"DROP_ANIMATE",payload:t}}({newHomeClientOffset:v,dropDuration:_,completed:b}))}else n(_n({completed:b,shouldFlush:!1}))}}else n(function(t){return{type:"DROP_PENDING",payload:t}}({reason:a}))}else t(r)}}},Mn=function(t){return t+1},Rn=function(t,e){var n=t.droppableId===e.droppableId,r=Mn(t.index),i=Mn(e.index);return n?"\n      You have moved the item from position "+r+"\n      to position "+i+"\n    ":"\n    You have moved the item from position "+r+"\n    in list "+t.droppableId+"\n    to list "+e.droppableId+"\n    in position "+i+"\n  "},Nn=function(t,e,n){return e.droppableId===n.droppableId?"\n      The item "+t+"\n      has been combined with "+n.draggableId:"\n      The item "+t+"\n      in list "+e.droppableId+"\n      has been combined with "+n.draggableId+"\n      in list "+n.droppableId+"\n    "},Dn=function(t){return"\n  The item has returned to its starting position\n  of "+Mn(t.index)+"\n"},Fn=function(t){return"\n  You have lifted an item in position "+Mn(t.source.index)+".\n  Use the arrow keys to move, space bar to drop, and escape to cancel.\n"},Bn=function(t){var e=t.destination;if(e)return Rn(t.source,e);var n=t.combine;return n?Nn(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},zn=function(t){if("CANCEL"===t.reason)return"\n      Movement cancelled.\n      "+Dn(t.source)+"\n    ";var e=t.destination,n=t.combine;return e?"\n      You have dropped the item.\n      "+Rn(t.source,e)+"\n    ":n?"\n      You have dropped the item.\n      "+Nn(t.draggableId,t.source,n)+"\n    ":"\n    The item has been dropped while not over a drop area.\n    "+Dn(t.source)+"\n  "},Un=function(){var t=[];return{add:function(e){var n=setTimeout((function(){return function(e){var n=Xt(t,(function(t){return t.timerId===e}));-1===n&&m(!1),t.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:e};t.push(r)},flush:function(){if(t.length){var e=[].concat(t);t.length=0,e.forEach((function(t){clearTimeout(t.timerId),t.callback()}))}}}},Gn=function(t,e){e()},Vn=function(t,e){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:e}},qn=function(t,e,n,r){if(t){var i=function(t){var e=!1,n=!1,r=setTimeout((function(){n=!0})),i=function(i){e||n||(e=!0,t(i),clearTimeout(r))};return i.wasCalled=function(){return e},i}(n);t(e,{announce:i}),i.wasCalled()||n(r(e))}else n(r(e))},Hn=function(t,e){var n=function(t,e){var n=Un(),r=null,i=function(n){r||m(!1),r=null,Gn(0,(function(){return qn(t().onDragEnd,n,e,zn)}))};return{beforeStart:function(e,n){r&&m(!1),Gn(0,(function(){var r=t().onBeforeDragStart;r&&r(Vn(e,n))}))},start:function(i,o){r&&m(!1);var a=Vn(i,o);r={mode:o,lastCritical:i,lastLocation:a.source,lastCombine:null},n.add((function(){Gn(0,(function(){return qn(t().onDragStart,a,e,Fn)}))}))},update:function(i,a){var s=a.destination,u=a.merge?a.merge.combine:null;r||m(!1);var l=!function(t,e){if(t===e)return!0;var n=t.draggable.id===e.draggable.id&&t.draggable.droppableId===e.draggable.droppableId&&t.draggable.type===e.draggable.type&&t.draggable.index===e.draggable.index,r=t.droppable.id===e.droppable.id&&t.droppable.type===e.droppable.type;return n&&r}(i,r.lastCritical);l&&(r.lastCritical=i);var c,f,h=(f=s,!(null==(c=r.lastLocation)&&null==f||null!=c&&null!=f&&c.droppableId===f.droppableId&&c.index===f.index));h&&(r.lastLocation=s);var p=!function(t,e){return null==t&&null==e||null!=t&&null!=e&&t.draggableId===e.draggableId&&t.droppableId===e.droppableId}(r.lastCombine,u);if(p&&(r.lastCombine=u),l||h||p){var d=o({},Vn(i,r.mode),{combine:u,destination:s});n.add((function(){Gn(0,(function(){return qn(t().onDragUpdate,d,e,Bn)}))}))}},flush:function(){r||m(!1),n.flush()},drop:i,abort:function(){if(r){var t=o({},Vn(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});i(t)}}}}(t,e);return function(t){return function(e){return function(r){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),e(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var o=r.payload.completed.result;return n.flush(),e(r),void n.drop(o)}if(e(r),"CLEAN"!==r.type){var a=t.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}}}},Wn=function(t){return function(e){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=t.getState();"DROP_ANIMATING"!==r.phase&&m(!1),t.dispatch(_n({completed:r.completed,shouldFlush:!1}))}else e(n)}}},Xn=function(t){return function(e){return function(n){if(e(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=t.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||t.dispatch(An({reason:r.reason})))}}}},Yn=S,Zn=function(t){var e,n=t.dimensionMarshal,r=t.styleMarshal,i=t.getResponders,o=t.announce,a=t.autoScroller;return _(pn,Yn(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return O({},n,{dispatch:r=S.apply(void 0,o)(n.dispatch)})}}}((e=r,function(){return function(t){return function(n){"INITIAL_PUBLISH"===n.type&&e.dragging(),"DROP_ANIMATE"===n.type&&e.dropping(n.payload.completed.result.reason),"CLEAN"!==n.type&&"DROP_COMPLETE"!==n.type||e.resting(),t(n)}}}),function(t){return function(){return function(e){return function(n){"DROP_COMPLETE"!==n.type&&"CLEAN"!==n.type&&"DROP_ANIMATE"!==n.type||t.stopPublishing(),e(n)}}}}(n),function(t){return function(e){var n=e.getState,r=e.dispatch;return function(e){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,s=o.clientSelection,u=o.movementMode,l=n();"DROP_ANIMATING"===l.phase&&r(_n({completed:l.completed,shouldFlush:!0})),"IDLE"!==n().phase&&m(!1);var c={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===u}},f=t.startPublishing(c),h=f.critical,p=f.dimensions,d=f.viewport;r({type:"INITIAL_PUBLISH",payload:{critical:h,dimensions:p,clientSelection:s,movementMode:u,viewport:d}})}else e(i)}}}}(n),jn,Wn,Xn,function(t){return function(e){return function(n){return function(r){if(function(t){return"DROP_COMPLETE"===t.type||"DROP_ANIMATE"===t.type||"CLEAN"===t.type}(r))return t.stop(),void n(r);if(function(t){return"COLLECTION_STARTING"===t.type}(r))return t.cancelPending(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=e.getState();return"DRAGGING"!==i.phase&&m(!1),void t.start(i)}n(r),t.scroll(e.getState())}}}}(a),Hn(i,o))))},Kn=function(){return{x:window.pageXOffset,y:window.pageYOffset}},$n=function(){var t=document.documentElement;return t||m(!1),t},Jn=function(){var t=$n();return Ee({scrollHeight:t.scrollHeight,scrollWidth:t.scrollWidth,width:t.clientWidth,height:t.clientHeight})},Qn=function(t){var e,n,r,i,o,a,s,u=t.critical,l=t.scrollOptions,c=t.entries,f=(e=Kn(),n=Jn(),r=e.y,i=e.x,o=$n(),a=o.clientWidth,s=o.clientHeight,{frame:ft({top:r,left:i,right:i+a,bottom:r+s}),scroll:{initial:e,current:e,max:n,diff:{value:It,displacement:It}}}),h=f.scroll.current,p=u.droppable,d=Wt(c.droppables).filter((function(t){return t.descriptor.type===p.type})).map((function(t){return t.callbacks.getDimensionAndWatchScroll(h,l)})),m=Wt(c.draggables).filter((function(t){return t.descriptor.type===u.draggable.type})).map((function(t){return t.getDimension(h)}));return{dimensions:{draggables:Kt(m),droppables:Zt(d)},critical:u,viewport:f}},tr=function(t,e){t.critical.draggable.type!==e.type&&m(!1)},er=function(t){var e={droppables:{},draggables:{}},n=null,r=function(t){var e=t.getEntries,n=t.callbacks,r=function(){},i={additions:{},removals:{},modified:{}},o=null,a=function(){r(),o||(o=requestAnimationFrame((function(){o=null,n.collectionStarting();var t=n.getCritical(),r=e(),a=i,s=a.additions,u=a.removals,l=a.modified,c=Ot()(s).map((function(t){return r.draggables[t].getDimension(It)})).sort((function(t,e){return t.descriptor.index-e.descriptor.index})),f=Ot()(l).map((function(e){var n=r.droppables[e];n||m(!1);var i={withoutPlaceholder:!(n.descriptor.id===t.droppable.id)};return n.callbacks.recollect(i)})),h={additions:c,removals:Ot()(u),modified:f};i={additions:{},removals:{},modified:{}},n.publish(h)})))};return{add:function(t){i.additions[t.id]=t,i.modified[t.droppableId]=!0,i.removals[t.id]&&delete i.removals[t.id],a()},remove:function(t){i.removals[t.id]=t,i.modified[t.droppableId]=!0,i.additions[t.id]&&delete i.additions[t.id],a()},stop:function(){o&&(cancelAnimationFrame(o),o=null,i={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting,getCritical:function(){return n||m(!1),n.critical}},getEntries:function(){return e}});return{registerDraggable:function(t,i){var o={descriptor:t,getDimension:i};e.draggables[t.id]=o,n&&(tr(n,t),r.add(t))},updateDraggable:function(t,n,r){var i=e.draggables[t.id];i||m(!1),i.descriptor===t&&delete e.draggables[t.id];var o={descriptor:n,getDimension:r};e.draggables[n.id]=o},unregisterDraggable:function(t){var i=e.draggables[t.id];i||m(!1),i.descriptor===t&&(delete e.draggables[t.id],n&&(n.critical.draggable.id===t.id&&m(!1),tr(n,t),r.remove(t)))},registerDroppable:function(t,r){var i=t.id;e.droppables[i]={descriptor:t,callbacks:r},n&&m(!1)},unregisterDroppable:function(t){var r=e.droppables[t.id];r||m(!1),r.descriptor===t&&(delete e.droppables[t.id],n&&m(!1))},updateDroppableIsEnabled:function(r,i){e.droppables[r]||m(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){e.droppables[r]||m(!1),n&&t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i})},scrollDroppable:function(t,r){var i=e.droppables[t];i||m(!1),n&&i.callbacks.scroll(r)},updateDroppableScroll:function(r,i){e.droppables[r]||m(!1),n&&t.updateDroppableScroll({id:r,offset:i})},startPublishing:function(t){n&&m(!1);var r=e.draggables[t.draggableId];r||m(!1);var i=e.droppables[r.descriptor.droppableId];i||m(!1);var o={draggable:r.descriptor,droppable:i.descriptor};return n={critical:o},Qn({critical:o,entries:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;Wt(e.droppables).filter((function(e){return e.descriptor.type===t.type})).forEach((function(t){return t.callbacks.dragStopped()})),n=null}}}},nr=function(t){window.scrollBy(t.x,t.y)},rr=Object(At.default)((function(t){return $t(t).filter((function(t){return!!t.isEnabled&&!!t.frame}))})),ir=function(t){var e=t.center,n=t.destination,r=t.droppables;if(n){var i=r[n];return i.frame?i:null}var o=function(t,e){return Yt(rr(e),(function(e){return e.frame||m(!1),te(e.frame.pageMarginBox)(t)}))}(e,r);return o},or=.25,ar=.05,sr=28,ur=function(t){return Math.pow(t,2)},lr={stopDampeningAt:1200,accelerateAt:360},cr=function(t){var e=t.startOfRange,n=t.endOfRange,r=t.current,i=n-e;return 0===i?0:(r-e)/i},fr=lr.accelerateAt,hr=lr.stopDampeningAt,pr=function(t){var e=t.distanceToEdge,n=t.thresholds,r=t.dragStartTime,i=t.shouldUseTimeDampening,o=function(t,e){if(t>e.startScrollingFrom)return 0;if(t<=e.maxScrollValueAt)return sr;if(t===e.startScrollingFrom)return 1;var n=cr({startOfRange:e.maxScrollValueAt,endOfRange:e.startScrollingFrom,current:t}),r=sr*ur(1-n);return Math.ceil(r)}(e,n);return 0===o?0:i?Math.max(function(t,e){var n=e,r=hr,i=Pt()()-n;if(i>=hr)return t;if(i<fr)return 1;var o=cr({startOfRange:fr,endOfRange:r,current:i}),a=t*ur(o);return Math.ceil(a)}(o,r),1):o},dr=function(t){var e=t.container,n=t.distanceToEdges,r=t.dragStartTime,i=t.axis,o=t.shouldUseTimeDampening,a=function(t,e){return{startScrollingFrom:t[e.size]*or,maxScrollValueAt:t[e.size]*ar}}(e,i);return n[i.end]<n[i.start]?pr({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*pr({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},mr=Bt((function(t){return 0===t?0:t})),gr=function(t){var e=t.dragStartTime,n=t.container,r=t.subject,i=t.center,o=t.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},s=dr({container:n,distanceToEdges:a,dragStartTime:e,axis:ne,shouldUseTimeDampening:o}),u=dr({container:n,distanceToEdges:a,dragStartTime:e,axis:re,shouldUseTimeDampening:o}),l=mr({x:u,y:s});if(Mt(l,It))return null;var c=function(t){var e=t.container,n=t.subject,r=t.proposedScroll,i=n.height>e.height,o=n.width>e.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:l});return c?Mt(c,It)?null:c:null},yr=Bt((function(t){return 0===t?0:t>0?1:-1})),vr=(nn=function(t,e){return t<0?t:t>e?t-e:0},function(t){var e=t.current,n=t.max,r=t.change,i=Lt(e,r),o={x:nn(i.x,n.x),y:nn(i.y,n.y)};return Mt(o,It)?null:o}),br=function(t){var e=t.max,n=t.current,r=t.change,i={x:Math.max(n.x,e.x),y:Math.max(n.y,e.y)},o=yr(r),a=vr({max:i,current:n,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},_r=function(t,e){return br({current:t.scroll.current,max:t.scroll.max,change:e})},Ar=function(t,e){var n=t.frame;return!!n&&br({current:n.scroll.current,max:n.scroll.max,change:e})},wr=function(t){var e=t.state,n=t.dragStartTime,r=t.shouldUseTimeDampening,i=t.scrollWindow,o=t.scrollDroppable,a=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){var u=function(t){var e=t.viewport,n=t.subject,r=t.center,i=t.dragStartTime,o=t.shouldUseTimeDampening,a=gr({dragStartTime:i,container:e.frame,subject:n,center:r,shouldUseTimeDampening:o});return a&&_r(e,a)?a:null}({dragStartTime:n,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:r});if(u)return void i(u)}var l=ir({center:a,destination:Ht(e.impact),droppables:e.dimensions.droppables});if(l){var c=function(t){var e=t.droppable,n=t.subject,r=t.center,i=t.dragStartTime,o=t.shouldUseTimeDampening,a=e.frame;if(!a)return null;var s=gr({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return s&&Ar(e,s)?s:null}({dragStartTime:n,droppable:l,subject:s,center:a,shouldUseTimeDampening:r});c&&o(l.descriptor.id,c)}},xr=function(t){var e=t.move,n=t.scrollDroppable,r=t.scrollWindow,i=function(t,e){if(!Ar(t,e))return e;var r=function(t,e){var n=t.frame;return n&&Ar(t,e)?vr({current:n.scroll.current,max:n.scroll.max,change:e}):null}(t,e);if(!r)return n(t.descriptor.id,e),null;var i=jt(e,r);return n(t.descriptor.id,i),jt(e,i)},o=function(t,e,n){if(!t)return n;if(!_r(e,n))return n;var i=function(t,e){if(!_r(t,e))return null;var n=t.scroll.max,r=t.scroll.current;return vr({current:r,max:n,change:e})}(e,n);if(!i)return r(n),null;var o=jt(n,i);return r(o),jt(n,o)};return function(t){var n=t.scrollJumpRequest;if(n){var r=Ht(t.impact);r||m(!1);var a=i(t.dimensions.droppables[r],n);if(a){var s=t.viewport,u=o(t.isWindowScrollAllowed,s,a);u&&function(t,n){var r=Lt(t.current.client.selection,n);e({client:r})}(t,u)}}}},Er=function(t){var e=t.scrollDroppable,n=t.scrollWindow,r=t.move,i=function(t){var e=t.scrollWindow,n=t.scrollDroppable,r=Ct(e),i=Ct(n),o=null,a=function(t){o||m(!1);var e=o,n=e.shouldUseTimeDampening,a=e.dragStartTime;wr({state:t,scrollWindow:r,scrollDroppable:i,dragStartTime:a,shouldUseTimeDampening:n})},s=function(){o||m(!1),r.cancel(),i.cancel()};return{start:function(t){o&&m(!1);var e=Pt()(),n=!1,r=function(){n=!0};wr({state:t,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:e,shouldUseTimeDampening:n},n&&a(t)},stop:function(){o&&(s(),o=null)},cancelPending:s,scroll:a}}({scrollWindow:n,scrollDroppable:e}),o=xr({move:r,scrollWindow:n,scrollDroppable:e});return{scroll:function(t){"DRAGGING"===t.phase&&("FLUID"!==t.movementMode?t.scrollJumpRequest&&o(t):i.scroll(t))},cancelPending:i.cancelPending,start:i.start,stop:i.stop}},Or="data-react-beautiful-dnd-drag-handle",Sr=function(t,e){return t.map((function(t){var n=t.styles[e];return n?t.selector+" { "+n+" }":""})).join(" ")},Pr="undefined"!==typeof window?a.useLayoutEffect:a.useEffect,Cr=function(){var t=document.querySelector("head");return t||m(!1),t},Tr=function(){var t=document.createElement("style");return t.type="text/css",t};function kr(t){var e=l((function(){return""+t}),[t]),n=l((function(){return function(t){var e,n,r,i=(e=t,function(t){return"["+t+'="'+e+'"]'}),o=(n="\n      cursor: -webkit-grab;\n      cursor: grab;\n    ",{selector:i(Or),styles:{always:"\n          -webkit-touch-callout: none;\n          -webkit-tap-highlight-color: rgba(0,0,0,0);\n          touch-action: manipulation;\n        ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),a=[(r="\n      transition: "+Sn.outOfTheWay+";\n    ",{selector:i("data-react-beautiful-dnd-draggable"),styles:{dragging:r,dropAnimating:r,userCancel:r}}),o,{selector:i("data-react-beautiful-dnd-droppable"),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n        cursor: grabbing;\n        cursor: -webkit-grabbing;\n        user-select: none;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        overflow-anchor: none;\n      "}}];return{always:Sr(a,"always"),resting:Sr(a,"resting"),dragging:Sr(a,"dragging"),dropAnimating:Sr(a,"dropAnimating"),userCancel:Sr(a,"userCancel")}}(e)}),[e]),r=Object(a.useRef)(null),i=Object(a.useRef)(null),o=c(Object(At.default)((function(t){var e=i.current;e||m(!1),e.textContent=t})),[]),s=c((function(t){var e=r.current;e||m(!1),e.textContent=t}),[]);Pr((function(){(r.current||i.current)&&m(!1);var t=Tr(),a=Tr();return r.current=t,i.current=a,t.setAttribute("data-react-beautiful-dnd-always",e),a.setAttribute("data-react-beautiful-dnd-dynamic",e),Cr().appendChild(t),Cr().appendChild(a),s(n.always),o(n.resting),function(){var t=function(t){var e=t.current;e||m(!1),Cr().removeChild(e),t.current=null};t(r),t(i)}}),[s,o,n.always,n.resting,e]);var u=c((function(){return o(n.dragging)}),[o,n.dragging]),f=c((function(t){o("DROP"!==t?n.userCancel:n.dropAnimating)}),[o,n.dropAnimating,n.userCancel]),h=c((function(){i.current&&o(n.resting)}),[o,n.resting]);return l((function(){return{dragging:u,dropping:f,resting:h,styleContext:e}}),[u,f,h,e])}var Ir=s.a.createContext(null),Lr=function(){var t=document.body;return t||m(!1),t},jr={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var Mr=s.a.createContext(null);function Rr(){Object(a.useEffect)((function(){}),[])}function Nr(t){var e=Object(a.useRef)(t);return Object(a.useEffect)((function(){e.current=t})),e}function Dr(t){return t.current||m(!1),t.current}function Fr(t){var e=t.uniqueId,n=t.setOnError,r=Object(a.useRef)(null);Rr();var u=Nr(t),f=c((function(){return function(t){return{onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}}(u.current)}),[u]),h=function(t){var e=l((function(){return function(t){return"react-beautiful-dnd-announcement-"+t}(t)}),[t]),n=Object(a.useRef)(null);return Object(a.useEffect)((function(){n.current&&m(!1);var t=document.createElement("div");return n.current=t,t.id=e,t.setAttribute("aria-live","assertive"),t.setAttribute("role","log"),t.setAttribute("aria-atomic","true"),i()(t.style,jr),Lr().appendChild(t),function(){var t=n.current;t||m(!1),Lr().removeChild(t),n.current=null}}),[e]),c((function(t){var e=n.current;e&&(e.textContent=t)}),[])}(e),p=kr(e),d=c((function(t){Dr(r).dispatch(t)}),[]),g=l((function(){return w({publishWhileDragging:dn,updateDroppableScroll:gn,updateDroppableIsEnabled:yn,updateDroppableIsCombineEnabled:vn,collectionStarting:mn},d)}),[d]),y=l((function(){return er(g)}),[g]),v=l((function(){return Er(o({scrollWindow:nr,scrollDroppable:y.scrollDroppable},w({move:bn},d)))}),[y.scrollDroppable,d]),b=l((function(){return Zn({dimensionMarshal:y,styleMarshal:p,announce:h,autoScroller:v,getResponders:f})}),[h,v,y,f,p]);r.current=b;var _=c((function(){var t,e=Dr(r);"IDLE"!==e.getState().phase&&e.dispatch((void 0===(t={shouldFlush:!0})&&(t={shouldFlush:!1}),{type:"CLEAN",payload:t}))}),[]);n(_);var A=c((function(t){return function(t,e){return"IDLE"===t.phase||"DROP_ANIMATING"===t.phase&&t.completed.result.draggableId!==e&&"DROP"===t.completed.result.reason}(Dr(r).getState(),t)}),[]),x=c((function(){return en(Dr(r).getState())}),[]),E=l((function(){return{marshal:y,style:p.styleContext,canLift:A,isMovementAllowed:x}}),[y,A,x,p.styleContext]);return Object(a.useEffect)((function(){return _}),[_]),s.a.createElement(Mr.Provider,{value:E},s.a.createElement(L,{context:Ir,store:b},t.children))}var Br=0;function zr(t){var e=l((function(){return Br++}),[]);return s.a.createElement(kt,null,(function(n){return s.a.createElement(Fr,o({setOnError:n,uniqueId:e},t),t.children)}))}var Ur=function(t){return function(e){return t===e}},Gr=Ur("scroll"),Vr=Ur("auto"),qr=(Ur("visible"),function(t,e){return e(t.overflowX)||e(t.overflowY)}),Hr=function(t){var e=window.getComputedStyle(t),n={overflowX:e.overflowX,overflowY:e.overflowY};return qr(n,Gr)||qr(n,Vr)},Wr=function t(e){return null==e||e===document.body||e===document.documentElement?null:Hr(e)?e:t(e.parentElement)},Xr=function(t){return{x:t.scrollLeft,y:t.scrollTop}},Yr=function t(e){return!!e&&("fixed"===window.getComputedStyle(e).position||t(e.parentElement))},Zr=function(t){return{closestScrollable:Wr(t),isFixedOnPage:Yr(t)}},Kr=function(t){var e=t.ref,n=t.descriptor,r=t.env,i=t.windowScroll,o=t.direction,a=t.isDropDisabled,s=t.isCombineEnabled,u=t.shouldClipSubject,l=r.closestScrollable,c=function(t,e){var n=_t(t);if(!e)return n;if(t!==e)return n;var r=n.paddingBox.top-e.scrollTop,i=n.paddingBox.left-e.scrollLeft,o=r+e.scrollHeight,a=i+e.scrollWidth,s=ht({top:r,right:a,bottom:o,left:i},n.border);return mt({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})}(e,l),f=vt(c,i),h=function(){if(!l)return null;var t=_t(l),e={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:t,page:vt(t,i),scroll:Xr(l),scrollSize:e,shouldClipSubject:u}}();return Oe({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:o,client:c,page:f,closest:h})};var $r={passive:!1},Jr={passive:!0},Qr=function(t){return t.shouldPublishImmediately?$r:Jr};function ti(t){var e=Object(a.useContext)(t);return e||m(!1),e}var ei=function(t){return t&&t.env.closestScrollable||null};function ni(){}var ri={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},ii=function(t){var e=t.isAnimatingOpenOnMount,n=t.placeholder,r=function(t){var e=t.isAnimatingOpenOnMount,n=t.placeholder,r=t.animate;return e||"close"===r?ri:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:e,placeholder:n,animate:t.animate});return{display:n.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:Sn.placeholder}};var oi=s.a.memo((function(t){var e=Object(a.useRef)(null),n=c((function(){e.current&&(clearTimeout(e.current),e.current=null)}),[]),r=t.animate,i=t.onTransitionEnd,o=t.onClose,u=t.styleContext,l=Object(a.useState)("open"===t.animate),f=l[0],h=l[1];Object(a.useEffect)((function(){return f?"open"!==r?(n(),h(!1),ni):e.current?ni:(e.current=setTimeout((function(){e.current=null,h(!1)})),n):ni}),[r,f,n]);var p=c((function(t){"height"===t.propertyName&&(i(),"close"===r&&o())}),[r,o,i]),d=ii({isAnimatingOpenOnMount:f,animate:t.animate,placeholder:t.placeholder});return s.a.createElement(t.placeholder.tagName,{style:d,"data-react-beautiful-dnd-placeholder":u,onTransitionEnd:p,ref:t.innerRef})})),ai=s.a.createContext(null),si=function(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:window};function ui(t){return t instanceof si(t).HTMLElement}var li=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state={isVisible:Boolean(e.props.on),data:e.props.on,animate:e.props.shouldAnimate&&e.props.on?"open":"none"},e.onClose=function(){"close"===e.state.animate&&e.setState({isVisible:!1})},e}return p(e,t),e.getDerivedStateFromProps=function(t,e){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:e.isVisible?{isVisible:!0,data:e.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(t.on),data:t.on,animate:"none"}},e.prototype.render=function(){if(!this.state.isVisible)return null;var t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)},e}(s.a.PureComponent);var ci=function(t,e){return t===e},fi=function(t){var e=t.combine,n=t.destination;return n?n.droppableId:e?e.droppableId:null},hi=function(t,e){return t===e.droppable.type},pi=function(t,e){return e.draggables[t.draggable.id]},di=ut((function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null}},e=o({},t,{shouldAnimatePlaceholder:!1}),n=Object(At.default)((function(e,n,r,i){return r.descriptor.droppableId===e?{placeholder:r.placeholder,shouldAnimatePlaceholder:!1,snapshot:i}:n?{placeholder:r.placeholder,shouldAnimatePlaceholder:!0,snapshot:i}:t})),r=Object(At.default)((function(t,e,n){var r=n.descriptor.id;return{isDraggingOver:e,draggingOverWith:e?r:null,draggingFromThisWith:n.descriptor.droppableId===t?r:null}}));return function(i,o){var a=o.droppableId,s=o.type;if(i.isDragging){var u=i.critical;if(!hi(s,u))return t;var l=pi(u,i.dimensions),c=Ht(i.impact)===a,f=r(a,c,l);return n(a,c,l,f)}if("DROP_ANIMATING"===i.phase){var h=i.completed;if(!hi(s,h.critical))return t;var p=pi(h.critical,i.dimensions),d=r(a,fi(h.result)===a,p);return n(a,Ht(h.impact)===a,p,d)}if("IDLE"===i.phase&&!i.completed&&i.shouldFlush)return e;if("IDLE"===i.phase&&i.completed){var m=i.completed;if(!hi(s,m.critical))return t;var g=Ht(m.impact)===a,y=Boolean(m.impact.merge);return i.shouldFlush?e:g?y?t:e:t}return t}}),{updateViewportMaxScroll:function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}}},null,{context:Ir,pure:!0,areStatePropsEqual:ci})((function(t){var e=Object(a.useContext)(Mr);e||m(!1);var n,r,i,o,u,f,h,p,d,g,y,v,b,_,A,w,x=e.style,E=e.isMovementAllowed,O=Object(a.useRef)(null),S=Object(a.useRef)(null),P=t.children,C=t.droppableId,T=t.type,k=t.direction,I=t.ignoreContainerClipping,L=t.isDropDisabled,j=t.isCombineEnabled,M=t.snapshot,R=t.updateViewportMaxScroll,N=c((function(){return O.current}),[]),D=c((function(){return S.current}),[]),F=c((function(t){O.current=t}),[]),B=c((function(t){S.current=t}),[]),z=c((function(){E()&&R({maxScroll:Jn()})}),[E,R]);n={droppableId:C,type:T,direction:k,isDropDisabled:L,isCombineEnabled:j,ignoreContainerClipping:I,getDroppableRef:N,getPlaceholderRef:D},r=Object(a.useRef)(null),i=ti(Mr).marshal,o=Nr(n),u=l((function(){return{id:n.droppableId,type:n.type}}),[n.droppableId,n.type]),f=Object(a.useRef)(u),h=l((function(){return Object(At.default)((function(t,e){r.current||m(!1);var n={x:t,y:e};i.updateDroppableScroll(u.id,n)}))}),[u.id,i]),p=c((function(){var t=r.current;return t&&t.env.closestScrollable?Xr(t.env.closestScrollable):It}),[]),d=c((function(){var t=p();h(t.x,t.y)}),[p,h]),g=l((function(){return Ct(d)}),[d]),y=c((function(){var t=r.current,e=ei(t);t&&e||m(!1),t.scrollOptions.shouldPublishImmediately?d():g()}),[g,d]),v=c((function(t,e){r.current&&m(!1);var n=o.current,i=n.getDroppableRef();i||m(!1);var a=Zr(i),s={ref:i,descriptor:u,env:a,scrollOptions:e};r.current=s;var l=Kr({ref:i,descriptor:u,env:a,windowScroll:t,direction:n.direction,isDropDisabled:n.isDropDisabled,isCombineEnabled:n.isCombineEnabled,shouldClipSubject:!n.ignoreContainerClipping});return a.closestScrollable&&a.closestScrollable.addEventListener("scroll",y,Qr(s.scrollOptions)),l}),[u,y,o]),b=c((function(t){var e=r.current,n=ei(e);e&&n||m(!1);var i=o.current,a=function(){return Kr({ref:e.ref,descriptor:e.descriptor,env:e.env,windowScroll:It,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping})};return t.withoutPlaceholder?function(t,e){if(!t)return e();var n=t.style.display;t.style.display="none";var r=e();return t.style.display=n,r}(i.getPlaceholderRef(),a):a()}),[o]),_=c((function(){var t=r.current;t||m(!1);var e=ei(t);r.current=null,e&&(g.cancel(),e.removeEventListener("scroll",y,Qr(t.scrollOptions)))}),[y,g]),A=c((function(t){var e=r.current;e||m(!1);var n=ei(e);n||m(!1),n.scrollTop+=t.y,n.scrollLeft+=t.x}),[]),w=l((function(){return{getDimensionAndWatchScroll:v,recollect:b,dragStopped:_,scroll:A}}),[_,v,b,A]),Pr((function(){return f.current=u,i.registerDroppable(u,w),function(){r.current&&_(),i.unregisterDroppable(u)}}),[w,u,_,i]),Pr((function(){r.current&&i.updateDroppableIsEnabled(f.current.id,!n.isDropDisabled)}),[n.isDropDisabled,i]),Pr((function(){r.current&&i.updateDroppableIsCombineEnabled(f.current.id,n.isCombineEnabled)}),[n.isCombineEnabled,i]);var U,G=s.a.createElement(li,{on:t.placeholder,shouldAnimate:t.shouldAnimatePlaceholder},(function(t){var e=t.onClose,n=t.data,r=t.animate;return s.a.createElement(oi,{placeholder:n,onClose:e,innerRef:B,animate:r,styleContext:x,onTransitionEnd:z})})),V=l((function(){return{innerRef:F,placeholder:G,droppableProps:{"data-react-beautiful-dnd-droppable":x}}}),[G,F,x]),q=l((function(){return{droppableId:C,type:T}}),[C,T]);return(U={props:t,getDroppableRef:function(){return O.current},getPlaceholderRef:function(){return S.current}}).props,U.getDroppableRef,U.getPlaceholderRef,Object(a.useEffect)((function(){})),s.a.createElement(ai.Provider,{value:q},P(V,M))}));di.defaultProps={type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1};var mi=5e3,gi=4500,yi=function(t,e){return e?Sn.drop(e.duration):t?Sn.snap:Sn.fluid},vi=function(t,e){return t?e?xn.drop:xn.combining:null};function bi(t){return"DRAGGING"===t.type?(r=(n=t).dimension.client,i=n.offset,o=n.combineWith,a=n.dropping,s=Boolean(o),u=function(t){return null!=t.forceShouldAnimate?t.forceShouldAnimate:"SNAP"===t.mode}(n),l=Boolean(a),c=l?Tn(i,s):Cn(i),{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:yi(u,a),transform:c,opacity:vi(s,l),zIndex:l?gi:mi,pointerEvents:"none"}):{transform:Cn((e=t).offset),transition:e.shouldAnimateDisplacement?null:"none"};var e,n,r,i,o,a,s,u,l,c}var _i,Ai,wi=function(){var t=!1;return{handle:function(){t&&m(!1),t=!0},isHandled:function(){return t},reset:function(){t=!1}}},xi=function(t,e){return o({},t,e)},Ei=function(t,e,n){e.forEach((function(e){var r=xi(n,e.options);t.addEventListener(e.eventName,e.fn,r)}))},Oi=function(t,e,n){e.forEach((function(e){var r=xi(n,e.options);t.removeEventListener(e.eventName,e.fn,r)}))},Si=function(t){var e=Object(At.default)((function(e,n){var r={x:e,y:n};t.onMove(r)})),n=Ct((function(t){return e(t.x,t.y)})),r=Ct(t.onMoveUp),i=Ct(t.onMoveDown),o=Ct(t.onMoveRight),a=Ct(t.onMoveLeft),s=Ct(t.onWindowScroll);return{move:n,moveUp:r,moveDown:i,moveRight:o,moveLeft:a,windowScrollMove:s,cancel:function(){n.cancel(),r.cancel(),i.cancel(),o.cancel(),a.cancel(),s.cancel()}}},Pi=(_i="visibilitychange","undefined"===typeof document?_i:Yt([_i,"ms"+_i,"webkit"+_i,"moz"+_i,"o"+_i],(function(t){return"on"+t in document}))||_i),Ci={capture:!0},Ti=function(t){var e=!1,n=function(){e&&(e=!1,Oi(t(),r,Ci))},r=[{eventName:"click",fn:function(t){t.preventDefault(),n()}},{eventName:"mousedown",fn:n},{eventName:"touchstart",fn:n}];return{preventNext:function(){e&&n(),e||(e=!0,Ei(t(),r,Ci))},abort:n}},ki=((Ai={})[13]=!0,Ai[9]=!0,Ai),Ii=function(t){ki[t.keyCode]&&t.preventDefault()},Li=function(){},ji=wi();function Mi(t){var e=t.canStartCapturing,n=t.getWindow,r=t.callbacks,i=t.onCaptureStart,o=t.onCaptureEnd,s=Object(a.useRef)(null),u=Object(a.useRef)(!1),f=Object(a.useRef)(Li),h=c((function(){return Boolean(s.current||u.current)}),[]),p=l((function(){return h()&&m(!1),Si(r)}),[r,h]),d=l((function(){return Ti(n)}),[n]),g=c((function(){if(h()){p.cancel(),f.current();var t=u.current;ji.reset(),t&&d.preventNext(),s.current=null,u.current=!1,o()}}),[h,o,d,p]),y=c((function(){var t=u.current;g(),t&&r.onCancel()}),[r,g]),v=c((function(){u.current&&m(!1);var t=s.current;t||m(!1),s.current=null,u.current=!0,r.onLift({clientSelection:t,movementMode:"FLUID"})}),[r]),b=l((function(){return h()&&m(!1),[{eventName:"mousemove",fn:function(t){var e=t.button,n=t.clientX,r=t.clientY;if(0===e){var i={x:n,y:r};if(u.current)return t.preventDefault(),void p.move(i);var o,a,l=s.current;if(l||(g(),m(!1)),o=l,a=i,Math.abs(a.x-o.x)>=5||Math.abs(a.y-o.y)>=5)t.preventDefault(),v()}}},{eventName:"mouseup",fn:function(t){var e=u.current;g(),e&&(t.preventDefault(),r.onDrop())}},{eventName:"mousedown",fn:function(t){u.current&&t.preventDefault(),y()}},{eventName:"keydown",fn:function(t){if(!s.current)return 27===t.keyCode?(t.preventDefault(),void y()):void Ii(t);g()}},{eventName:"resize",fn:y},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.currentTarget===n()&&(s.current?g():p.windowScrollMove())}},{eventName:"webkitmouseforcedown",fn:function(){y()}},{eventName:Pi,fn:y}]}),[h,y,v,p,g,r,n]),_=c((function(){var t=n(),e={capture:!0};f.current=function(){return Oi(t,b,e)},Ei(t,b,e)}),[n,b]),A=c((function(t){s.current&&m(!1),s.current=t,i(g),_()}),[_,i,g]);return c((function(t){if(!ji.isHandled()&&(h()&&m(!1),e(t)&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey))){ji.handle(),t.preventDefault();var n={x:t.clientX,y:t.clientY};A(n)}}),[e,h,A])}function Ri(t){return t instanceof si(t).Element}var Ni,Di={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0},Fi=function t(e,n){if(null==n)return!1;if(Boolean(Di[n.tagName.toLowerCase()]))return!0;var r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==e&&t(e,n.parentElement)},Bi=function(t,e){if(e)return!0;var n=t.target,r=t.currentTarget;return!Ri(n)||!Ri(r)||!Fi(r,n)},zi=((Ni={})[34]=!0,Ni[33]=!0,Ni[36]=!0,Ni[35]=!0,Ni);function Ui(){}function Gi(t){var e=t.canStartCapturing,n=t.getWindow,r=t.callbacks,i=t.onCaptureStart,o=t.onCaptureEnd,s=t.getDraggableRef,u=Object(a.useRef)(!1),f=Object(a.useRef)(Ui),h=c((function(){return u.current}),[]),p=l((function(){return h()&&m(!1),Si(r)}),[r,h]),d=c((function(){h()&&(p.cancel(),f.current(),u.current=!1,o())}),[h,o,p]),g=c((function(){var t=u.current;d(),t&&r.onCancel()}),[r,d]),y=l((function(){return h()&&m(!1),[{eventName:"mousedown",fn:g},{eventName:"mouseup",fn:g},{eventName:"click",fn:g},{eventName:"touchstart",fn:g},{eventName:"resize",fn:g},{eventName:"wheel",fn:g,options:{passive:!0}},{eventName:"scroll",options:{capture:!1},fn:function(t){t.currentTarget===n()&&r.onWindowScroll()}},{eventName:Pi,fn:g}]}),[r,g,h,n]),v=c((function(){var t=n(),e={capture:!0};f.current=function(){return Oi(t,y,e)},Ei(t,y,e)}),[n,y]),b=c((function(){u.current&&m(!1);var t=s();t||m(!1),u.current=!0,i(d),v();var e=ft(t.getBoundingClientRect()).center;r.onLift({clientSelection:e,movementMode:"SNAP"})}),[v,r,s,i,d]);return c((function(t){if(!h()){if(t.defaultPrevented)return;if(!e(t))return;if(32!==t.keyCode)return;return t.preventDefault(),void b()}return 27===t.keyCode?(t.preventDefault(),void g()):32===t.keyCode?(t.preventDefault(),d(),void r.onDrop()):40===t.keyCode?(t.preventDefault(),void p.moveDown()):38===t.keyCode?(t.preventDefault(),void p.moveUp()):39===t.keyCode?(t.preventDefault(),void p.moveRight()):37===t.keyCode?(t.preventDefault(),void p.moveLeft()):void(zi[t.keyCode]?t.preventDefault():Ii(t))}),[r,e,g,h,p,b,d])}var Vi=wi(),qi=function(){};var Hi=function(t){!function(t){return Boolean(si(t).SVGElement)&&t instanceof si(t).SVGElement}(t)||m(!1)},Wi=function(t){if(t.hasAttribute(Or))return Hi(t),t;var e=t.querySelector("[data-react-beautiful-dnd-drag-handle]");return Hi(t),e||m(!1),ui(e)||m(!1),e};var Xi,Yi,Zi,Ki,$i=null,Ji={capture:!0},Qi=(Xi=!1,Yi=function(){Xi&&(Xi=!1,window.removeEventListener("focus",Zi,Ji))},Zi=function(){Yi(),$i=null},(Ki=function(){Xi||(Xi=!0,window.addEventListener("focus",Zi,Ji))}).cancel=function(){return Yi()},Ki),to=function(t){$i=t,Qi()},eo=function(t,e){if($i&&t===$i){$i=null,Qi.cancel();var n=Wi(e);n&&n.focus()}};function no(){}function ro(t){t.preventDefault()}function io(t){var e=Object(a.useRef)(null),n=c((function(t){e.current&&m(!1),e.current={abort:t}}),[]),r=c((function(){e.current||m(!1),e.current=null}),[]),i=c((function(){e.current||m(!1),e.current.abort()}),[]),o=ti(Mr),s=o.canLift,u=o.style,f=t.isDragging,h=t.isEnabled,p=t.draggableId,d=t.callbacks,g=t.getDraggableRef,y=t.getShouldRespectForcePress,v=t.canDragInteractiveElements,b=Nr(t);!function(t){var e=t.isEnabled,n=t.getDraggableRef;Object(a.useEffect)((function(){}),[n,e])}({isEnabled:h,getDraggableRef:g});var _=c((function(){return si(g())}),[g]),A=c((function(t){return!!h&&(!e.current&&(!!s(p)&&Bi(t,v)))}),[v,s,p,h]),w=function(t){var e=Object(a.useRef)(!1),n=Nr(t),r=t.getDraggableRef,i=c((function(){e.current=!0}),[]),o=c((function(){e.current=!1}),[]);Pr((function(){var t=n.current;if(!t.isEnabled)return no;var i=r();i||m(!1);var o=Wi(i);return eo(t.draggableId,o),function(){var t=n.current;t.isEnabled&&e.current&&(t.isDragging||t.isDropAnimating)&&to(t.draggableId)}}),[r,n]);var s=Object(a.useRef)(null);return Pr((function(){if(s.current){var t=r();t&&t!==s.current&&e.current&&n.current.isEnabled&&Wi(t).focus()}})),Pr((function(){s.current=r()})),{onBlur:o,onFocus:i}}(t),x=w.onBlur,E=w.onFocus,O=Mi(l((function(){return{callbacks:d,getDraggableRef:g,getWindow:_,canStartCapturing:A,onCaptureStart:n,onCaptureEnd:r,getShouldRespectForcePress:y}}),[d,g,_,A,n,r,y])),S=Gi(l((function(){return{callbacks:d,getDraggableRef:g,getWindow:_,canStartCapturing:A,onCaptureStart:n,onCaptureEnd:r}}),[d,A,g,_,r,n])),P=function(t){var e=t.callbacks,n=t.getWindow,r=t.canStartCapturing,i=t.getShouldRespectForcePress,o=t.onCaptureStart,s=t.onCaptureEnd,u=Object(a.useRef)(null),f=Object(a.useRef)(!1),h=Object(a.useRef)(!1),p=Object(a.useRef)(qi),d=c((function(){return Boolean(u.current||f.current)}),[]),g=l((function(){return Ti(n)}),[n]),y=l((function(){return d()&&m(!1),Si(e)}),[e,d]),v=c((function(){if(d()){if(y.cancel(),p.current(),Vi.reset(),h.current=!1,s(),f.current)return g.preventNext(),void(f.current=!1);var t=u.current;t||m(!1),clearTimeout(t.longPressTimerId),u.current=null}}),[d,s,g,y]),b=c((function(){var t=f.current;v(),t&&e.onCancel()}),[e,v]),_=l((function(){return d()&&m(!1),[{eventName:"touchmove",options:{passive:!1,capture:!1},fn:function(t){if(f.current){h.current||(h.current=!0);var e=t.touches[0];if(e){var n={x:e.clientX,y:e.clientY};t.preventDefault(),y.move(n)}}else v()}},{eventName:"touchend",fn:function(t){f.current?(t.preventDefault(),v(),e.onDrop()):v()}},{eventName:"touchcancel",fn:function(t){f.current?(t.preventDefault(),b()):v()}},{eventName:"touchstart",fn:b},{eventName:"orientationchange",fn:b},{eventName:"resize",fn:b},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){u.current?v():y.windowScrollMove()}},{eventName:"contextmenu",fn:function(t){t.preventDefault()}},{eventName:"keydown",fn:function(t){f.current?(27===t.keyCode&&t.preventDefault(),b()):b()}},{eventName:"touchforcechange",fn:function(t){if(t.touches[0].force>=.15){var e=i();if(!u.current)return e?h.current?void t.preventDefault():void b():void t.preventDefault();e&&b()}}},{eventName:Pi,fn:b}]}),[e,b,d,i,y,v]),A=c((function(){var t=n(),e={capture:!0};p.current=function(){return Oi(t,_,e)},Ei(t,_,e)}),[n,_]),w=c((function(){var t=u.current;t||m(!1),f.current=!0,u.current=null,h.current=!1,e.onLift({clientSelection:t.point,movementMode:"FLUID"})}),[e]),x=c((function(t){u.current&&m(!1);var e=t.touches[0],n={point:{x:e.clientX,y:e.clientY},longPressTimerId:setTimeout(w,120)};u.current=n,o(v),A()}),[A,o,w,v]);return Pr((function(){return Ei(window,[{eventName:"touchmove",fn:qi,options:{capture:!1,passive:!1}}])}),[]),function(t){Vi.isHandled()||(d()&&m(!1),r(t)&&(Vi.handle(),x(t)))}}(l((function(){return{callbacks:d,getDraggableRef:g,getWindow:_,canStartCapturing:A,getShouldRespectForcePress:y,onCaptureStart:n,onCaptureEnd:r}}),[d,g,_,A,y,n,r]));return Pr((function(){return function(){e.current&&(i(),b.current.isDragging&&b.current.callbacks.onCancel())}}),[]),!h&&e.current&&(i(),b.current.isDragging&&d.onCancel()),Pr((function(){!f&&e.current&&i()}),[i,f]),l((function(){return h?{onMouseDown:O,onKeyDown:S,onTouchStart:P,onFocus:E,onBlur:x,tabIndex:0,"data-react-beautiful-dnd-drag-handle":u,"aria-roledescription":"Draggable item. Press space bar to lift",draggable:!1,onDragStart:ro}:null}),[h,x,E,S,O,P,u])}function oo(t){var e=t.draggableId,n=t.index,r=t.getDraggableRef,i=ti(Mr).marshal,o=ti(ai),s=o.droppableId,u=o.type,f=l((function(){return{id:e,droppableId:s,type:u,index:n}}),[e,s,n,u]),h=Object(a.useRef)(f),p=c((function(t){var e=h.current,n=r();return n||m(!1),function(t,e,n){void 0===n&&(n=It);var r=window.getComputedStyle(e),i=e.getBoundingClientRect(),o=bt(i,r),a=vt(o,n);return{descriptor:t,placeholder:{client:o,tagName:e.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(e,n,t)}),[r]);Pr((function(){return i.registerDraggable(h.current,p),function(){return i.unregisterDraggable(h.current)}}),[p,i]),Pr((function(){if(h.current!==f){var t=h.current;h.current=f,i.updateDraggable(t,f,p)}}),[f,p,i])}var ao=ut((function(){var t=Object(At.default)((function(t,e,n,r){return{isDragging:!0,isDropAnimating:Boolean(r),dropAnimation:r,mode:t,draggingOver:e,combineWith:n,combineTargetFor:null}})),e=Object(At.default)((function(t){return{isDragging:!1,isDropAnimating:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:t,combineWith:null}})),n={mapped:{type:"SECONDARY",offset:It,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:e(null)}},r=Object(At.default)((function(t,e){return{x:t,y:e}})),i=Object(At.default)((function(e,n,r,i,o,a){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:o,mode:n,offset:e,dimension:r,forceShouldAnimate:a,snapshot:t(n,i,o,null)}}})),o=Object(At.default)((function(t,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:t,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:e(n)}}})),a=function(t,e,n){var i=n.movement.map[t],a=n.movement,s=n.merge,u=Boolean(s&&s.combine.draggableId===t),l=a.displacedBy.point,c=r(l.x,l.y);return u?o(i?c:It,e,!i||i.shouldAnimate):i&&i.isVisible?o(c,null,i.shouldAnimate):null};return function(e,o){return function(e,n){if(e.isDragging){if(e.critical.draggable.id!==n.draggableId)return null;var o=e.current.client.offset,a=e.dimensions.draggables[n.draggableId],s=e.movementMode,u=Ht(e.impact),l=(f=e.impact).merge?f.merge.combine.draggableId:null,c=e.forceShouldAnimate;return i(r(o.x,o.y),s,a,u,l,c)}var f;if("DROP_ANIMATING"===e.phase){var h=e.completed;if(h.result.draggableId!==n.draggableId)return null;var p=e.dimensions.draggables[n.draggableId],d=h.result,m=d.mode,g=fi(d),y=function(t){return t.combine?t.combine.draggableId:null}(d),v={duration:e.dropDuration,curve:wn,moveTo:e.newHomeClientOffset,opacity:y?xn.drop:null,scale:y?En.drop:null};return{mapped:{type:"DRAGGING",offset:e.newHomeClientOffset,dimension:p,dropping:v,draggingOver:g,combineWith:y,mode:m,forceShouldAnimate:null,snapshot:t(m,g,y,v)}}}return null}(e,o)||function(t,e){if(t.isDragging)return t.critical.draggable.id===e.draggableId?null:a(e.draggableId,t.critical.draggable.id,t.impact);if("DROP_ANIMATING"===t.phase){var n=t.completed;return n.result.draggableId===e.draggableId?null:a(e.draggableId,n.result.draggableId,n.impact)}return null}(e,o)||n}}),{lift:function(t){return{type:"LIFT",payload:t}},move:bn,moveUp:function(){return{type:"MOVE_UP",payload:null}},moveDown:function(){return{type:"MOVE_DOWN",payload:null}},moveLeft:function(){return{type:"MOVE_LEFT",payload:null}},moveRight:function(){return{type:"MOVE_RIGHT",payload:null}},moveByWindowScroll:function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},drop:An,dropAnimationFinished:function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}}},null,{context:Ir,pure:!0,areStatePropsEqual:ci})((function(t){var e=Object(a.useRef)(null),n=c((function(t){e.current=t}),[]),r=c((function(){return e.current}),[]),i=ti(Mr);Object(a.useEffect)((function(){}));var o=t.children,s=t.draggableId,u=t.isDragDisabled,f=t.shouldRespectForcePress,h=t.disableInteractiveElementBlocking,p=t.index,d=t.mapped,g=t.moveUp,y=t.move,v=t.drop,b=t.moveDown,_=t.moveRight,A=t.moveLeft,w=t.moveByWindowScroll,x=t.lift,E=t.dropAnimationFinished;oo(l((function(){return{draggableId:s,index:p,getDraggableRef:r}}),[s,r,p]));var O=c((function(t){e.current||m(!1),u&&m(!1);var n=t.clientSelection,r=t.movementMode;x({id:s,clientSelection:n,movementMode:r})}),[s,u,x]),S=c((function(){return f}),[f]),P=l((function(){return{onLift:O,onMove:function(t){return y({client:t})},onDrop:function(){return v({reason:"DROP"})},onCancel:function(){return v({reason:"CANCEL"})},onMoveUp:g,onMoveDown:b,onMoveRight:_,onMoveLeft:A,onWindowScroll:function(){return w({newScroll:Kn()})}}}),[v,y,w,b,A,_,g,O]),C="DRAGGING"===d.type,T="DRAGGING"===d.type&&Boolean(d.dropping),k=io(l((function(){return{draggableId:s,isDragging:C,isDropAnimating:T,isEnabled:!u,callbacks:P,getDraggableRef:r,canDragInteractiveElements:h,getShouldRespectForcePress:S}}),[P,h,s,r,S,u,C,T])),I=c((function(t){"DRAGGING"===d.type&&d.dropping&&"transform"===t.propertyName&&E()}),[E,d]);return o(l((function(){var t=bi(d),e="DRAGGING"===d.type&&d.dropping?I:null;return{innerRef:n,draggableProps:{"data-react-beautiful-dnd-draggable":i.style,style:t,onTransitionEnd:e},dragHandleProps:k}}),[i.style,k,d,I,n]),d.snapshot)}));ao.defaultProps={isDragDisabled:!1,disableInteractiveElementBlocking:!1,shouldRespectForcePress:!1}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return a}));function r(t){return 180*(t%(2*Math.PI))/Math.PI}function i(t){return t%360*Math.PI/180}function o(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")}function a(t,e,n){if(void 0===n&&(n={}),!0===n.final)return function(t,e){var n=a(e,t);return n=(n+180)%360}(t,e);var s=o(t),u=o(e),l=i(s[0]),c=i(u[0]),f=i(s[1]),h=i(u[1]),p=Math.sin(c-l)*Math.cos(h),d=Math.cos(f)*Math.sin(h)-Math.sin(f)*Math.cos(h)*Math.cos(c-l);return r(Math.atan2(p,d))}},function(t,e,n){"use strict";n.r(e),n.d(e,"earthRadius",(function(){return r})),n.d(e,"factors",(function(){return i})),n.d(e,"unitsFactors",(function(){return o})),n.d(e,"areaFactors",(function(){return a})),n.d(e,"feature",(function(){return s})),n.d(e,"geometry",(function(){return u})),n.d(e,"point",(function(){return l})),n.d(e,"points",(function(){return c})),n.d(e,"polygon",(function(){return f})),n.d(e,"polygons",(function(){return h})),n.d(e,"lineString",(function(){return p})),n.d(e,"lineStrings",(function(){return d})),n.d(e,"featureCollection",(function(){return m})),n.d(e,"multiLineString",(function(){return g})),n.d(e,"multiPoint",(function(){return y})),n.d(e,"multiPolygon",(function(){return v})),n.d(e,"geometryCollection",(function(){return b})),n.d(e,"round",(function(){return _})),n.d(e,"radiansToLength",(function(){return A})),n.d(e,"lengthToRadians",(function(){return w})),n.d(e,"lengthToDegrees",(function(){return x})),n.d(e,"bearingToAzimuth",(function(){return E})),n.d(e,"radiansToDegrees",(function(){return O})),n.d(e,"degreesToRadians",(function(){return S})),n.d(e,"convertLength",(function(){return P})),n.d(e,"convertArea",(function(){return C})),n.d(e,"isNumber",(function(){return T})),n.d(e,"isObject",(function(){return k})),n.d(e,"validateBBox",(function(){return I})),n.d(e,"validateId",(function(){return L}));var r=6371008.8,i={centimeters:100*r,centimetres:100*r,degrees:r/111325,feet:3.28084*r,inches:39.37*r,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:1e3*r,millimetres:1e3*r,nauticalmiles:r/1852,radians:1,yards:r/1.0936},o={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r,yards:1/1.0936},a={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function u(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return l(e).geometry;case"LineString":return p(e).geometry;case"Polygon":return f(e).geometry;case"MultiPoint":return y(e).geometry;case"MultiLineString":return g(e).geometry;case"MultiPolygon":return v(e).geometry;default:throw new Error(t+" is invalid")}}function l(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!T(t[0])||!T(t[1]))throw new Error("coordinates must contain numbers");return s({type:"Point",coordinates:t},e,n)}function c(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return l(t,e)})),n)}function f(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return s({type:"Polygon",coordinates:t},e,n)}function h(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return f(t,e)})),n)}function p(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return s({type:"LineString",coordinates:t},e,n)}function d(t,e,n){return void 0===n&&(n={}),m(t.map((function(t){return p(t,e)})),n)}function m(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function g(t,e,n){return void 0===n&&(n={}),s({type:"MultiLineString",coordinates:t},e,n)}function y(t,e,n){return void 0===n&&(n={}),s({type:"MultiPoint",coordinates:t},e,n)}function v(t,e,n){return void 0===n&&(n={}),s({type:"MultiPolygon",coordinates:t},e,n)}function b(t,e,n){return void 0===n&&(n={}),s({type:"GeometryCollection",geometries:t},e,n)}function _(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function A(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}function w(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function x(t,e){return O(w(t,e))}function E(t){var e=t%360;return e<0&&(e+=360),e}function O(t){return 180*(t%(2*Math.PI))/Math.PI}function S(t){return t%360*Math.PI/180}function P(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return A(w(t,e),n)}function C(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=a[e];if(!r)throw new Error("invalid original units");var i=a[n];if(!i)throw new Error("invalid final units");return t/r*i}function T(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function k(t){return!!t&&t.constructor===Object}function I(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!T(t))throw new Error("bbox must only contain numbers")}))}function L(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}function i(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 o(t){var e="function"===typeof Map?new Map:void 0;return o=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,l(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)},o(t)}function a(t,e,n){return a=s()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&u(i,n.prototype),i},a.apply(null,arguments)}function s(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var c=n(256),f=n(438),h=n(518),p=n(235),d=n(439),m=n(920),g=n(922),y=n(923),v=n(520),b=n(925),_=n(521),A=n(926),w=n(927),x=w.justErrorsLogger,E=w.debugLogger,O=n(929),S=function(t){var e,n;function r(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).isRestriction=!0,e}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,u(e,n),r}(o(Error)),P=function(){function t(t){var e=this;this.defaultLocale={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize2:"%{backwardsCompat} %{size}",exceedsSize:"This file exceeds maximum allowed size of",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noNewAlreadyUploading:"Cannot add new files: already uploading",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},selectAllFilesFromFolderNamed:"Select all files from folder %{name}",unselectAllFilesFromFolderNamed:"Unselect all files from folder %{name}",selectFileNamed:"Select file %{name}",unselectFileNamed:"Unselect file %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",backToSearch:"Back to Search",emptyFolderAdded:"No files were added from empty folder",folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}};var n={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null},meta:{},onBeforeFileAdded:function(t,e){return t},onBeforeUpload:function(t){return t},store:g(),logger:x,infoTimeout:5e3};if(this.opts=r({},n,t,{restrictions:r({},n.restrictions,t&&t.restrictions)}),t&&t.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t&&t.debug&&(this.opts.logger=E),this.log("Using Core v"+this.constructor.VERSION),this.opts.restrictions.allowedFileTypes&&null!==this.opts.restrictions.allowedFileTypes&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.plugins={},this.getState=this.getState.bind(this),this.getPlugin=this.getPlugin.bind(this),this.setFileMeta=this.setFileMeta.bind(this),this.setFileState=this.setFileState.bind(this),this.log=this.log.bind(this),this.info=this.info.bind(this),this.hideInfo=this.hideInfo.bind(this),this.addFile=this.addFile.bind(this),this.removeFile=this.removeFile.bind(this),this.pauseResume=this.pauseResume.bind(this),this.validateRestrictions=this.validateRestrictions.bind(this),this._calculateProgress=p(this._calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.updateOnlineStatus=this.updateOnlineStatus.bind(this),this.resetProgress=this.resetProgress.bind(this),this.pauseAll=this.pauseAll.bind(this),this.resumeAll=this.resumeAll.bind(this),this.retryAll=this.retryAll.bind(this),this.cancelAll=this.cancelAll.bind(this),this.retryUpload=this.retryUpload.bind(this),this.upload=this.upload.bind(this),this.emitter=f(),this.on=this.on.bind(this),this.off=this.off.bind(this),this.once=this.emitter.once.bind(this.emitter),this.emit=this.emitter.emit.bind(this.emitter),this.preProcessors=[],this.uploaders=[],this.postProcessors=[],this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:A(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:r({},this.opts.meta),info:{isHidden:!0,type:"info",message:""}}),this._storeUnsubscribe=this.store.subscribe((function(t,n,r){e.emit("state-update",t,n,r),e.updateAll(n)})),this.opts.debug&&"undefined"!==typeof window&&(window[this.opts.id]=this),this._addListeners()}var e,n,o,a=t.prototype;return a.on=function(t,e){return this.emitter.on(t,e),this},a.off=function(t,e){return this.emitter.off(t,e),this},a.updateAll=function(t){this.iteratePlugins((function(e){e.update(t)}))},a.setState=function(t){this.store.setState(t)},a.getState=function(){return this.store.getState()},a.setFileState=function(t,e){var n;if(!this.getState().files[t])throw new Error("Can\u2019t set state for "+t+" (the file could have been removed)");this.setState({files:r({},this.getState().files,(n={},n[t]=r({},this.getState().files[t],e),n))})},a.i18nInit=function(){this.translator=new c([this.defaultLocale,this.opts.locale]),this.locale=this.translator.locale,this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator)},a.setOptions=function(t){this.opts=r({},this.opts,t,{restrictions:r({},this.opts.restrictions,t&&t.restrictions)}),t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins((function(t){t.setOptions()})),this.setState()},a.resetProgress=function(){var t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},e=r({},this.getState().files),n={};Object.keys(e).forEach((function(i){var o=r({},e[i]);o.progress=r({},o.progress,t),n[i]=o})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")},a.addPreProcessor=function(t){this.preProcessors.push(t)},a.removePreProcessor=function(t){var e=this.preProcessors.indexOf(t);-1!==e&&this.preProcessors.splice(e,1)},a.addPostProcessor=function(t){this.postProcessors.push(t)},a.removePostProcessor=function(t){var e=this.postProcessors.indexOf(t);-1!==e&&this.postProcessors.splice(e,1)},a.addUploader=function(t){this.uploaders.push(t)},a.removeUploader=function(t){var e=this.uploaders.indexOf(t);-1!==e&&this.uploaders.splice(e,1)},a.setMeta=function(t){var e=r({},this.getState().meta,t),n=r({},this.getState().files);Object.keys(n).forEach((function(e){n[e]=r({},n[e],{meta:r({},n[e].meta,t)})})),this.log("Adding metadata:"),this.log(t),this.setState({meta:e,files:n})},a.setFileMeta=function(t,e){var n=r({},this.getState().files);if(n[t]){var i=r({},n[t].meta,e);n[t]=r({},n[t],{meta:i}),this.setState({files:n})}else this.log("Was trying to set metadata for a file that has been removed: ",t)},a.getFile=function(t){return this.getState().files[t]},a.getFiles=function(){var t=this.getState().files;return Object.keys(t).map((function(e){return t[e]}))},a.validateRestrictions=function(t,e){try{return this._checkRestrictions(t,e),{result:!0}}catch(n){return{result:!1,reason:n.message}}},a._checkRestrictions=function(t,e){void 0===e&&(e=this.getFiles());var n=this.opts.restrictions,r=n.maxFileSize,i=n.minFileSize,o=n.maxTotalFileSize,a=n.maxNumberOfFiles,s=n.allowedFileTypes;if(a&&e.length+1>a)throw new S(""+this.i18n("youCanOnlyUploadX",{smart_count:a}));if(s&&!s.some((function(e){return e.indexOf("/")>-1?!!t.type&&m(t.type.replace(/;.*?$/,""),e):!("."!==e[0]||!t.extension)&&t.extension.toLowerCase()===e.substr(1).toLowerCase()}))){var u=s.join(", ");throw new S(this.i18n("youCanOnlyUploadFileTypes",{types:u}))}if(o&&null!=t.size){var l=0;if(l+=t.size,e.forEach((function(t){l+=t.size})),l>o)throw new S(this.i18n("exceedsSize2",{backwardsCompat:this.i18n("exceedsSize"),size:d(o)}))}if(r&&null!=t.size&&t.size>r)throw new S(this.i18n("exceedsSize2",{backwardsCompat:this.i18n("exceedsSize"),size:d(r)}));if(i&&null!=t.size&&t.size<i)throw new S(this.i18n("inferiorSize",{size:d(i)}))},a._checkMinNumberOfFiles=function(t){var e=this.opts.restrictions.minNumberOfFiles;if(Object.keys(t).length<e)throw new S(""+this.i18n("youHaveToAtLeastSelectX",{smart_count:e}))},a._showOrLogErrorAndThrow=function(t,e){var n=void 0===e?{}:e,r=n.showInformer,i=void 0===r||r,o=n.file,a=void 0===o?null:o,s=n.throwErr,u=void 0===s||s,l="object"===typeof t?t.message:t,c="object"===typeof t&&t.details?t.details:"",f=l;if(c&&(f+=" "+c),t.isRestriction?(this.log(f),this.emit("restriction-failed",a,t)):this.log(f,"error"),i&&this.info({message:l,details:c},"error",this.opts.infoTimeout),u)throw"object"===typeof t?t:new Error(t)},a._assertNewUploadAllowed=function(t){!1===this.getState().allowNewUpload&&this._showOrLogErrorAndThrow(new S(this.i18n("noNewAlreadyUploading")),{file:t})},a._checkAndCreateFileStateObject=function(t,e){var n=y(e);e.type=n;var i,o=this.opts.onBeforeFileAdded(e,t);!1===o&&this._showOrLogErrorAndThrow(new S("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,file:e}),"object"===typeof o&&o&&(e=o),i=e.name?e.name:"image"===n.split("/")[0]?n.split("/")[0]+"."+n.split("/")[1]:"noname";var a=v(i).extension,s=e.isRemote||!1,u=b(e);t[u]&&this._showOrLogErrorAndThrow(new S(this.i18n("noDuplicates",{fileName:i})),{file:e});var l=e.meta||{};l.name=i,l.type=n;var c=isFinite(e.data.size)?e.data.size:null,f={source:e.source||"",id:u,name:i,extension:a||"",meta:r({},this.getState().meta,l),type:n,data:e.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:s,remote:e.remote||"",preview:e.preview};try{var h=Object.keys(t).map((function(e){return t[e]}));this._checkRestrictions(f,h)}catch(p){this._showOrLogErrorAndThrow(p,{file:f})}return f},a._startIfAutoProceed=function(){var t=this;this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((function(){t.scheduledAutoProceed=null,t.upload().catch((function(e){e.isRestriction||t.log(e.stack||e.message||e)}))}),4))},a.addFile=function(t){var e;this._assertNewUploadAllowed(t);var n=this.getState().files,i=this._checkAndCreateFileStateObject(n,t);return this.setState({files:r({},n,(e={},e[i.id]=i,e))}),this.emit("file-added",i),this.emit("files-added",[i]),this.log("Added file: "+i.name+", "+i.id+", mime type: "+i.type),this._startIfAutoProceed(),i.id},a.addFiles=function(t){var e=this;this._assertNewUploadAllowed();for(var n=r({},this.getState().files),i=[],o=[],a=0;a<t.length;a++)try{var s=this._checkAndCreateFileStateObject(n,t[a]);i.push(s),n[s.id]=s}catch(l){l.isRestriction||o.push(l)}if(this.setState({files:n}),i.forEach((function(t){e.emit("file-added",t)})),this.emit("files-added",i),i.length>5?this.log("Added batch of "+i.length+" files"):Object.keys(i).forEach((function(t){e.log("Added file: "+i[t].name+"\n id: "+i[t].id+"\n type: "+i[t].type)})),i.length>0&&this._startIfAutoProceed(),o.length>0){var u="Multiple errors occurred while adding files:\n";o.forEach((function(t){u+="\n * "+t.message})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:u},"error",this.opts.infoTimeout);var l=new Error(u);throw l.errors=o,l}},a.removeFiles=function(t,e){var n=this,i=this.getState(),o=i.files,a=i.currentUploads,s=r({},o),u=r({},a),l=Object.create(null);function c(t){return void 0===l[t]}t.forEach((function(t){o[t]&&(l[t]=o[t],delete s[t])}));var f=[];Object.keys(u).forEach((function(t){var e=a[t].fileIDs.filter(c);0!==e.length?u[t]=r({},a[t],{fileIDs:e}):f.push(t)})),f.forEach((function(t){delete u[t]}));var h={currentUploads:u,files:s};0===Object.keys(s).length&&(h.allowNewUpload=!0,h.error=null),this.setState(h),this._calculateTotalProgress();var p=Object.keys(l);p.forEach((function(t){n.emit("file-removed",l[t],e)})),p.length>5?this.log("Removed "+p.length+" files"):this.log("Removed files: "+p.join(", "))},a.removeFile=function(t,e){void 0===e&&(e=null),this.removeFiles([t],e)},a.pauseResume=function(t){if(this.getState().capabilities.resumableUploads&&!this.getFile(t).uploadComplete){var e=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:e}),this.emit("upload-pause",t,e),e}},a.pauseAll=function(){var t=r({},this.getState().files);Object.keys(t).filter((function(e){return!t[e].progress.uploadComplete&&t[e].progress.uploadStarted})).forEach((function(e){var n=r({},t[e],{isPaused:!0});t[e]=n})),this.setState({files:t}),this.emit("pause-all")},a.resumeAll=function(){var t=r({},this.getState().files);Object.keys(t).filter((function(e){return!t[e].progress.uploadComplete&&t[e].progress.uploadStarted})).forEach((function(e){var n=r({},t[e],{isPaused:!1,error:null});t[e]=n})),this.setState({files:t}),this.emit("resume-all")},a.retryAll=function(){var t=r({},this.getState().files),e=Object.keys(t).filter((function(e){return t[e].error}));if(e.forEach((function(e){var n=r({},t[e],{isPaused:!1,error:null});t[e]=n})),this.setState({files:t,error:null}),this.emit("retry-all",e),0===e.length)return Promise.resolve({successful:[],failed:[]});var n=this._createUpload(e,{forceAllowNewUpload:!0});return this._runUpload(n)},a.cancelAll=function(){this.emit("cancel-all");var t=this.getState().files,e=Object.keys(t);e.length&&this.removeFiles(e,"cancel-all"),this.setState({totalProgress:0,error:null})},a.retryUpload=function(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);var e=this._createUpload([t],{forceAllowNewUpload:!0});return this._runUpload(e)},a.reset=function(){this.cancelAll()},a._calculateProgress=function(t,e){if(this.getFile(t.id)){var n=isFinite(e.bytesTotal)&&e.bytesTotal>0;this.setFileState(t.id,{progress:r({},this.getFile(t.id).progress,{bytesUploaded:e.bytesUploaded,bytesTotal:e.bytesTotal,percentage:n?Math.round(e.bytesUploaded/e.bytesTotal*100):0})}),this._calculateTotalProgress()}else this.log("Not setting progress for a file that has been removed: "+t.id)},a._calculateTotalProgress=function(){var t=this.getFiles().filter((function(t){return t.progress.uploadStarted||t.progress.preprocess||t.progress.postprocess}));if(0===t.length)return this.emit("progress",0),void this.setState({totalProgress:0});var e=t.filter((function(t){return null!=t.progress.bytesTotal})),n=t.filter((function(t){return null==t.progress.bytesTotal}));if(0!==e.length){var r=e.reduce((function(t,e){return t+e.progress.bytesTotal}),0),i=r/e.length;r+=i*n.length;var o=0;e.forEach((function(t){o+=t.progress.bytesUploaded})),n.forEach((function(t){o+=i*(t.progress.percentage||0)/100}));var a=0===r?0:Math.round(o/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}else{var s=100*t.length,u=n.reduce((function(t,e){return t+e.progress.percentage}),0),l=Math.round(u/s*100);this.setState({totalProgress:l})}},a._addListeners=function(){var t=this;this.on("error",(function(e){var n="Unknown error";e.message&&(n=e.message),e.details&&(n+=" "+e.details),t.setState({error:n})})),this.on("upload-error",(function(e,n,r){var i="Unknown error";if(n.message&&(i=n.message),n.details&&(i+=" "+n.details),t.setFileState(e.id,{error:i,response:r}),t.setState({error:n.message}),"object"===typeof n&&n.message){var o=new Error(n.message);o.details=n.message,n.details&&(o.details+=" "+n.details),o.message=t.i18n("failedToUpload",{file:e.name}),t._showOrLogErrorAndThrow(o,{throwErr:!1})}else t._showOrLogErrorAndThrow(n,{throwErr:!1})})),this.on("upload",(function(){t.setState({error:null})})),this.on("upload-started",(function(e,n){t.getFile(e.id)?t.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):t.log("Not setting progress for a file that has been removed: "+e.id)})),this.on("upload-progress",this._calculateProgress),this.on("upload-success",(function(e,n){if(t.getFile(e.id)){var i=t.getFile(e.id).progress;t.setFileState(e.id,{progress:r({},i,{postprocess:t.postProcessors.length>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:i.bytesTotal}),response:n,uploadURL:n.uploadURL,isPaused:!1}),t._calculateTotalProgress()}else t.log("Not setting progress for a file that has been removed: "+e.id)})),this.on("preprocess-progress",(function(e,n){t.getFile(e.id)?t.setFileState(e.id,{progress:r({},t.getFile(e.id).progress,{preprocess:n})}):t.log("Not setting progress for a file that has been removed: "+e.id)})),this.on("preprocess-complete",(function(e){if(t.getFile(e.id)){var n=r({},t.getState().files);n[e.id]=r({},n[e.id],{progress:r({},n[e.id].progress)}),delete n[e.id].progress.preprocess,t.setState({files:n})}else t.log("Not setting progress for a file that has been removed: "+e.id)})),this.on("postprocess-progress",(function(e,n){t.getFile(e.id)?t.setFileState(e.id,{progress:r({},t.getState().files[e.id].progress,{postprocess:n})}):t.log("Not setting progress for a file that has been removed: "+e.id)})),this.on("postprocess-complete",(function(e){if(t.getFile(e.id)){var n=r({},t.getState().files);n[e.id]=r({},n[e.id],{progress:r({},n[e.id].progress)}),delete n[e.id].progress.postprocess,t.setState({files:n})}else t.log("Not setting progress for a file that has been removed: "+e.id)})),this.on("restored",(function(){t._calculateTotalProgress()})),"undefined"!==typeof window&&window.addEventListener&&(window.addEventListener("online",(function(){return t.updateOnlineStatus()})),window.addEventListener("offline",(function(){return t.updateOnlineStatus()})),setTimeout((function(){return t.updateOnlineStatus()}),3e3))},a.updateOnlineStatus=function(){"undefined"===typeof window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)},a.getID=function(){return this.opts.id},a.use=function(t,e){if("function"!==typeof t)throw new TypeError("Expected a plugin class, but got "+(null===t?"null":typeof t)+". Please verify that the plugin was imported and spelled correctly.");var n=new t(this,e),r=n.id;if(this.plugins[n.type]=this.plugins[n.type]||[],!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");var i=this.getPlugin(r);if(i){var o="Already found a plugin named '"+i.id+"'. Tried to use: '"+r+"'.\nUppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.";throw new Error(o)}return t.VERSION&&this.log("Using "+r+" v"+t.VERSION),this.plugins[n.type].push(n),n.install(),this},a.getPlugin=function(t){var e=null;return this.iteratePlugins((function(n){if(n.id===t)return e=n,!1})),e},a.iteratePlugins=function(t){var e=this;Object.keys(this.plugins).forEach((function(n){e.plugins[n].forEach(t)}))},a.removePlugin=function(t){var e;this.log("Removing plugin "+t.id),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();var n=this.plugins[t.type].slice(),i=_(n,(function(e){return e.id===t.id}));-1!==i&&(n.splice(i,1),this.plugins[t.type]=n);var o={plugins:r({},this.getState().plugins,(e={},e[t.id]=void 0,e))};this.setState(o)},a.close=function(){var t=this;this.log("Closing Uppy instance "+this.opts.id+": removing all files and uninstalling plugins"),this.reset(),this._storeUnsubscribe(),this.iteratePlugins((function(e){t.removePlugin(e)}))},a.info=function(t,e,n){void 0===e&&(e="info"),void 0===n&&(n=3e3);var r="object"===typeof t;this.setState({info:{isHidden:!1,type:e,message:r?t.message:t,details:r?t.details:null}}),this.emit("info-visible"),clearTimeout(this.infoTimeoutID),this.infoTimeoutID=0!==n?setTimeout(this.hideInfo,n):void 0},a.hideInfo=function(){var t=r({},this.getState().info,{isHidden:!0});this.setState({info:t}),this.emit("info-hidden")},a.log=function(t,e){var n=this.opts.logger;switch(e){case"error":n.error(t);break;case"warning":n.warn(t);break;default:n.debug(t)}},a.run=function(){return this.log("Calling run() is no longer necessary.","warning"),this},a.restore=function(t){return this.log('Core: attempting to restore upload "'+t+'"'),this.getState().currentUploads[t]?this._runUpload(t):(this._removeUpload(t),Promise.reject(new Error("Nonexistent upload")))},a._createUpload=function(t,e){var n;void 0===e&&(e={});var i=e.forceAllowNewUpload,o=void 0!==i&&i,a=this.getState(),s=a.allowNewUpload,u=a.currentUploads;if(!s&&!o)throw new Error("Cannot create a new upload: already uploading.");var l=h();return this.emit("upload",{id:l,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploads,currentUploads:r({},u,(n={},n[l]={fileIDs:t,step:0,result:{}},n))}),l},a._getUpload=function(t){return this.getState().currentUploads[t]},a.addResultData=function(t,e){var n;if(this._getUpload(t)){var i=this.getState().currentUploads,o=r({},i[t],{result:r({},i[t].result,e)});this.setState({currentUploads:r({},i,(n={},n[t]=o,n))})}else this.log("Not setting result for an upload that has been removed: "+t)},a._removeUpload=function(t){var e=r({},this.getState().currentUploads);delete e[t],this.setState({currentUploads:e})},a._runUpload=function(t){var e=this,n=this.getState().currentUploads[t].step,i=[].concat(this.preProcessors,this.uploaders,this.postProcessors),o=Promise.resolve();return i.forEach((function(i,a){a<n||(o=o.then((function(){var n,o=e.getState().currentUploads,s=o[t];if(s){var u=r({},s,{step:a});return e.setState({currentUploads:r({},o,(n={},n[t]=u,n))}),i(u.fileIDs,t)}})).then((function(t){return null})))})),o.catch((function(n){e.emit("error",n,t),e._removeUpload(t)})),o.then((function(){var n=e.getState().currentUploads[t];if(n){n.fileIDs.forEach((function(t){var n=e.getFile(t);n&&n.progress.postprocess&&e.emit("postprocess-complete",n)}));var r=n.fileIDs.map((function(t){return e.getFile(t)})),i=r.filter((function(t){return!t.error})),o=r.filter((function(t){return t.error}));e.addResultData(t,{successful:i,failed:o,uploadID:t})}})).then((function(){var n=e.getState().currentUploads;if(n[t]){var r=n[t].result;return e.emit("complete",r),e._removeUpload(t),r}})).then((function(n){return null==n&&e.log("Not setting result for an upload that has been removed: "+t),n}))},a.upload=function(){var t=this;this.plugins.uploader||this.log("No uploader type plugins are used","warning");var e=this.getState().files,n=this.opts.onBeforeUpload(e);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"===typeof n&&(e=n,this.setState({files:e})),Promise.resolve().then((function(){return t._checkMinNumberOfFiles(e)})).catch((function(e){t._showOrLogErrorAndThrow(e)})).then((function(){var n=t.getState().currentUploads,r=Object.keys(n).reduce((function(t,e){return t.concat(n[e].fileIDs)}),[]),i=[];Object.keys(e).forEach((function(e){var n=t.getFile(e);n.progress.uploadStarted||-1!==r.indexOf(e)||i.push(n.id)}));var o=t._createUpload(i);return t._runUpload(o)})).catch((function(e){t._showOrLogErrorAndThrow(e,{showInformer:!1})})))},e=t,(n=[{key:"state",get:function(){return this.getState()}}])&&i(e.prototype,n),o&&i(e,o),t}();P.VERSION="1.17.0",t.exports=function(t){return new P(t)},t.exports.Uppy=P,t.exports.Plugin=O,t.exports.debugLogger=E},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(6),i=n(59),o=n(50),a=n(140),s=n(10),u=n(73);const l=[9729,9728],c=globalThis.WebGLBuffer||function(){};class f extends i.a{get[Symbol.toStringTag](){return"Texture"}static isSupported(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{format:n,linearFiltering:r}=e;let i=!0;return n&&(i=i&&Object(a.d)(t,n),i=i&&(!r||Object(a.e)(t,n))),i}constructor(t,e){const{id:n=Object(u.c)("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(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},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:a=0,recreate:s=!1,parameters:u={},pixelStore:l={},textureUnit:c}=t;e||(e=i);let{width:f,height:h,dataFormat:p,type:d,compressed:m=!1,mipmaps:g=!0}=t;const{depth:y=0}=t;return({width:f,height:h,compressed:m,dataFormat:p,type:d}=this._deduceParameters({format:o,type:d,dataFormat:p,compressed:m,data:e,width:f,height:h})),this.width=f,this.height=h,this.depth=y,this.format=o,this.type=d,this.dataFormat=p,this.border=a,this.textureUnit=c,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),g&&this._isNPOT()&&(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),g=!1,this._updateForNPOT(u)),this.mipmaps=g,this.setImageData({data:e,width:f,height:h,depth:y,format:o,type:d,dataFormat:p,border:a,mipmaps:g,parameters:l,compressed:m}),g&&this.generateMipmap(),this.setParameters(u),s&&(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;if(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(t){let{height:e,width:n,mipmaps:r=!1}=t;return n!==this.width||e!==this.height?this.initialize({width:n,height:e,format:this.format,type:this.type,dataFormat:this.dataFormat,border:this.border,mipmaps:r}):this}generateMipmap(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),Object(r.o)(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:u=this.border,offset:l=0,parameters:c={}}=t;let{data:f=null,type:h=this.type,width:p=this.width,height:d=this.height,dataFormat:m=this.dataFormat,compressed:g=!1}=t;f||(f=n),({type:h,dataFormat:m,compressed:g,width:p,height:d}=this._deduceParameters({format:o,type:h,dataFormat:m,compressed:g,data:f,width:p,height:d}));const{gl:y}=this;y.bindTexture(this.target,this.handle);let v,b=null;({data:f,dataType:b}=this._getDataType({data:f,compressed:g}));let _=0;if(Object(r.o)(this.gl,c,(()=>{switch(b){case"null":y.texImage2D(e,i,o,p,d,u,m,h,f);break;case"typed-array":y.texImage2D(e,i,o,p,d,u,m,h,f,l);break;case"buffer":v=Object(r.a)(y),v.bindBuffer(35052,f.handle||f),v.texImage2D(e,i,o,p,d,u,m,h,l),v.bindBuffer(35052,null);break;case"browser-object":Object(r.j)(y)?y.texImage2D(e,i,o,p,d,u,m,h,f):y.texImage2D(e,i,o,m,h,f);break;case"compressed":for(const[t,n]of f.entries())y.compressedTexImage2D(e,t,n.format,n.width,n.height,u,n.data),_+=n.levelSize;break;default:Object(s.a)(!1,"Unknown image data type")}})),"compressed"===b)this._trackAllocatedMemory(_,"Texture");else if(f&&f.byteLength)this._trackAllocatedMemory(f.byteLength,"Texture");else{const t=a.a[this.dataFormat]||4,e=a.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*t*e,"Texture")}return this.loaded=!0,this}setSubImageData(t){let{target:e=this.target,pixels:n=null,data:i=null,x:a=0,y:u=0,width:l=this.width,height:f=this.height,level:h=0,format:p=this.format,type:d=this.type,dataFormat:m=this.dataFormat,compressed:g=!1,offset:y=0,border:v=this.border,parameters:b={}}=t;if(({type:d,dataFormat:m,compressed:g,width:l,height:f}=this._deduceParameters({format:p,type:d,dataFormat:m,compressed:g,data:i,width:l,height:f})),Object(s.a)(0===this.depth,"texSubImage not supported for 3D textures"),i||(i=n),i&&i.data){const t=i;i=t.data,l=t.shape[0],f=t.shape[1]}i instanceof o.a&&(i=i.handle),this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,b,(()=>{if(g)this.gl.compressedTexSubImage2D(e,h,a,u,l,f,p,i);else if(null===i)this.gl.texSubImage2D(e,h,a,u,l,f,m,d,null);else if(ArrayBuffer.isView(i))this.gl.texSubImage2D(e,h,a,u,l,f,m,d,i,y);else if(i instanceof c){const t=Object(r.a)(this.gl);t.bindBuffer(35052,i),t.texSubImage2D(e,h,a,u,l,f,m,d,y),t.bindBuffer(35052,null)}else if(Object(r.j)(this.gl)){Object(r.a)(this.gl).texSubImage2D(e,h,a,u,l,f,m,d,i)}else this.gl.texSubImage2D(e,h,a,u,m,d,i)})),this.gl.bindTexture(this.target,null)}copyFramebuffer(){return r.k.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:e}=this;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,null),t}_getDataType(t){let{data:e,compressed:n=!1}=t;return n?{data:e,dataType:"compressed"}:null===e?{data:e,dataType:"null"}:ArrayBuffer.isView(e)?{data:e,dataType:"typed-array"}:e instanceof o.a?{data:e.handle,dataType:"buffer"}:e instanceof c?{data:e,dataType:"buffer"}:{data:e,dataType:"browser-object"}}_deduceParameters(t){const{format:e,data:n}=t;let{width:r,height:i,dataFormat:o,type:s,compressed:u}=t;const l=a.b[e];return o=o||l&&l.dataFormat,s=s||l&&l.types[0],u=u||l&&l.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.naturalWidth,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},Object(s.a)(r,"Could not deduced texture size"),Object(s.a)(void 0===e||r.width===e,"Deduced texture width does not match supplied width"),Object(s.a)(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:Object(s.a)(!1);break;default:this.gl.texParameteri(this.target,t,e)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!Object(r.j)(this.gl)&&(!(!this.width||!this.height)&&(!Object(u.b)(this.width)||!Object(u.b)(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}}},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],a=n[3]*r+n[7]*i+n[11]*o||1;return t[0]=(n[0]*r+n[4]*i+n[8]*o)/a,t[1]=(n[1]*r+n[5]*i+n[9]*o)/a,t[2]=(n[2]*r+n[6]*i+n[10]*o)/a,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}function a(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[3]=e[3],t}function s(t,e,n){const r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[3]*i+n[6]*o,t[1]=n[1]*r+n[4]*i+n[7]*o,t[2]=n[2]*r+n[5]*i+n[8]*o,t[3]=e[3],t}n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return s}))},function(t,e,n){"use strict";function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"i",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"e",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return f})),n.d(e,"c",(function(){return h}));var r=n(9);function i(){var t=new r.a(9);return r.a!=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}function o(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=c*a-s*l,h=-c*o+s*u,p=l*o-a*u,d=n*f+r*h+i*p;return d?(d=1/d,t[0]=f*d,t[1]=(-c*r+i*l)*d,t[2]=(s*r-i*a)*d,t[3]=h*d,t[4]=(c*n-i*u)*d,t[5]=(-s*n+i*o)*d,t[6]=p*d,t[7]=(-l*n+r*u)*d,t[8]=(a*n-r*o)*d,t):null}function s(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8];return e*(l*o-a*u)+n*(-l*i+a*s)+r*(u*i-o*s)}function u(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=n[0],p=n[1],d=n[2],m=n[3],g=n[4],y=n[5],v=n[6],b=n[7],_=n[8];return t[0]=h*r+p*a+d*l,t[1]=h*i+p*s+d*c,t[2]=h*o+p*u+d*f,t[3]=m*r+g*a+y*l,t[4]=m*i+g*s+y*c,t[5]=m*o+g*u+y*f,t[6]=v*r+b*a+_*l,t[7]=v*i+b*s+_*c,t[8]=v*o+b*u+_*f,t}function l(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=h*r+p*a+l,t[7]=h*i+p*s+c,t[8]=h*o+p*u+f,t}function c(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*a,t[1]=p*i+h*s,t[2]=p*o+h*u,t[3]=p*a-h*r,t[4]=p*s-h*i,t[5]=p*u-h*o,t[6]=l,t[7]=c,t[8]=f,t}function f(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function h(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,f=r*s,h=i*a,p=i*s,d=i*u,m=o*a,g=o*s,y=o*u;return t[0]=1-f-d,t[3]=c-y,t[6]=h+g,t[1]=c+y,t[4]=1-l-d,t[7]=p-m,t[2]=h-g,t[5]=p+m,t[8]=1-l-f,t}},function(t,e,n){"use strict";n.r(e),n.d(e,"UNITS",(function(){return d})),n.d(e,"h3IndexToSplitLong",(function(){return y})),n.d(e,"splitLongToh3Index",(function(){return b})),n.d(e,"h3IsValid",(function(){return j})),n.d(e,"h3IsPentagon",(function(){return M})),n.d(e,"h3IsResClassIII",(function(){return R})),n.d(e,"h3GetBaseCell",(function(){return N})),n.d(e,"h3GetFaces",(function(){return D})),n.d(e,"h3GetResolution",(function(){return F})),n.d(e,"geoToH3",(function(){return B})),n.d(e,"h3ToGeo",(function(){return z})),n.d(e,"h3ToGeoBoundary",(function(){return U})),n.d(e,"h3ToParent",(function(){return G})),n.d(e,"h3ToChildren",(function(){return V})),n.d(e,"h3ToCenterChild",(function(){return q})),n.d(e,"kRing",(function(){return H})),n.d(e,"kRingDistances",(function(){return W})),n.d(e,"hexRing",(function(){return X})),n.d(e,"polyfill",(function(){return Y})),n.d(e,"h3SetToMultiPolygon",(function(){return Z})),n.d(e,"compact",(function(){return K})),n.d(e,"uncompact",(function(){return $})),n.d(e,"h3IndexesAreNeighbors",(function(){return J})),n.d(e,"getH3UnidirectionalEdge",(function(){return Q})),n.d(e,"getOriginH3IndexFromUnidirectionalEdge",(function(){return tt})),n.d(e,"getDestinationH3IndexFromUnidirectionalEdge",(function(){return et})),n.d(e,"h3UnidirectionalEdgeIsValid",(function(){return nt})),n.d(e,"getH3IndexesFromUnidirectionalEdge",(function(){return rt})),n.d(e,"getH3UnidirectionalEdgesFromHexagon",(function(){return it})),n.d(e,"getH3UnidirectionalEdgeBoundary",(function(){return ot})),n.d(e,"h3Distance",(function(){return at})),n.d(e,"h3Line",(function(){return st})),n.d(e,"experimentalH3ToLocalIj",(function(){return ut})),n.d(e,"experimentalLocalIjToH3",(function(){return lt})),n.d(e,"pointDist",(function(){return ct})),n.d(e,"cellArea",(function(){return ft})),n.d(e,"exactEdgeLength",(function(){return ht})),n.d(e,"hexArea",(function(){return pt})),n.d(e,"edgeLength",(function(){return dt})),n.d(e,"numHexagons",(function(){return mt})),n.d(e,"getRes0Indexes",(function(){return gt})),n.d(e,"getPentagonIndexes",(function(){return yt})),n.d(e,"degsToRads",(function(){return vt})),n.d(e,"radsToDegs",(function(){return bt}));var r=function(t){var e,n="undefined"!==typeof(t=t||{})?t:{},r={};for(e in n)n.hasOwnProperty(e)&&(r[e]=n[e]);var i,o=[],a="";document.currentScript&&(a=document.currentScript.src),a=0!==a.indexOf("blob:")?a.substr(0,a.lastIndexOf("/")+1):"",i=function(t,e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)e(r.response);else{var i=Z(t);i?e(i.buffer):n()}},r.onerror=n,r.send(null)};var s=n.print||console.log.bind(console),u=n.printErr||console.warn.bind(console);for(e in r)r.hasOwnProperty(e)&&(n[e]=r[e]);r=null,n.arguments&&(o=n.arguments);var l=0,c=function(){return l};var f=!1;function h(t){var e,r=n["_"+t];return e="Cannot call unknown function "+t+", make sure it is exported",r||ut("Assertion failed: "+e),r}function p(t,e,n,r,i){var o={string:function(t){var e=0;if(null!==t&&void 0!==t&&0!==t){var n=1+(t.length<<2);(function(t,e,n){(function(t,e,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a);if(s<=127){if(n>=o)break;e[n++]=s}else if(s<=2047){if(n+1>=o)break;e[n++]=192|s>>6,e[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;e[n++]=224|s>>12,e[n++]=128|s>>6&63,e[n++]=128|63&s}else{if(n+3>=o)break;e[n++]=240|s>>18,e[n++]=128|s>>12&63,e[n++]=128|s>>6&63,e[n++]=128|63&s}}e[n]=0})(t,v,e,n)})(t,e=tt(n),n)}return e},array:function(t){var e=tt(t.length);return function(t,e){y.set(t,e)}(t,e),e}};var a=h(t),s=[],u=0;if(r)for(var l=0;l<r.length;l++){var c=o[n[l]];c?(0===u&&(u=nt()),s[l]=c(r[l])):s[l]=r[l]}var f=a.apply(null,s);return f=function(t){return"string"===e?m(t):"boolean"===e?Boolean(t):t}(f),0!==u&&et(u),f}var d="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function m(t,e){return t?function(t,e,n){for(var r=e+n,i=e;t[i]&&!(i>=r);)++i;if(i-e>16&&t.subarray&&d)return d.decode(t.subarray(e,i));for(var o="";e<i;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)o+=String.fromCharCode(a);else{var l=a-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}(v,t,e):""}var g,y,v,b,_,A,w;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");function x(t,e){return t%e>0&&(t+=e-t%e),t}function E(t){g=t,n.HEAP8=y=new Int8Array(t),n.HEAP16=b=new Int16Array(t),n.HEAP32=_=new Int32Array(t),n.HEAPU8=v=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=new Uint32Array(t),n.HEAPF32=A=new Float32Array(t),n.HEAPF64=w=new Float64Array(t)}var O=n.TOTAL_MEMORY||33554432;function S(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"===typeof r?void 0===e.arg?n.dynCall_v(r):n.dynCall_vi(r,e.arg):r(void 0===e.arg?null:e.arg)}else e()}}O=(g=n.buffer?n.buffer:new ArrayBuffer(O)).byteLength,E(g),_[6004]=5266928;var P=[],C=[],T=[],k=[];var I=Math.abs,L=Math.ceil,j=Math.floor,M=Math.min,R=0,N=null,D=null;n.preloadedImages={},n.preloadedAudios={};var F,B,z=null,U="data:application/octet-stream;base64,";function G(t){return String.prototype.startsWith?t.startsWith(U):0===t.indexOf(U)}z="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAABFAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/NFQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";function V(t){return t}function q(t){return t.replace(/\b__Z[\w\d_]+/g,(function(t){return t===t?t:t+" ["+t+"]"}))}function H(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function W(){return y.length}function X(t){try{var e=new ArrayBuffer(t);if(e.byteLength!=t)return;return new Int8Array(e).set(y),Q(e),E(e),1}catch(n){}}var Y="function"===typeof atob?atob:function(t){var e,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",l=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=s.indexOf(t.charAt(l++))<<2|(i=s.indexOf(t.charAt(l++)))>>4,n=(15&i)<<4|(o=s.indexOf(t.charAt(l++)))>>2,r=(3&o)<<6|(a=s.indexOf(t.charAt(l++))),u+=String.fromCharCode(e),64!==o&&(u+=String.fromCharCode(n)),64!==a&&(u+=String.fromCharCode(r))}while(l<t.length);return u};function Z(t){if(G(t))return function(t){try{for(var e=Y(t),n=new Uint8Array(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}catch(i){throw new Error("Converting base64 string to bytes failed.")}}(t.slice(U.length))}var K,$,J=function(t,e,n){var r=new t.Int8Array(n),i=new t.Int32Array(n),o=(new t.Uint8Array(n),new t.Float32Array(n),new t.Float64Array(n)),a=0|e.p,s=t.Math.floor,u=t.Math.abs,l=t.Math.sqrt,c=t.Math.pow,f=t.Math.cos,h=t.Math.sin,p=t.Math.tan,d=t.Math.acos,m=t.Math.asin,g=t.Math.atan,y=t.Math.atan2,v=t.Math.ceil,b=t.Math.imul,_=t.Math.min,A=t.Math.clz32,w=e.b,x=e.c,E=e.d,O=e.e,S=e.f,P=e.g,C=e.h,T=e.i,k=24048;function I(t,e,n,r){var i,o;0|L(t|=0,e|=0,n|=0,r|=0,0)&&(Te(0|r,0,(o=1+(0|b(3*n|0,n+1|0))|0)<<3|0),(i=0|be(o,4))&&(j(t,e,n,r,i,o,0),ve(i)))}function L(t,e,n,r,o){t|=0,e|=0,n|=0,o|=0;var a,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0;if(a=k,k=k+16|0,d=a,i[(s=r|=0)>>2]=t,i[s+4>>2]=e,(s=0!=(0|o))&&(i[o>>2]=0),0|Mt(t,e))return k=a,0|(d=1);i[d>>2]=0;t:do{if((0|n)>=1)if(s)for(f=0,h=1,p=1,u=0,s=t;;){if(!(u|f)){if(0==(0|(s=0|M(s,e,4,d)))&0==(0|(e=0|x()))){s=2;break t}if(0|Mt(s,e)){s=1;break t}}if(0==(0|(s=0|M(s,e,0|i[16+(f<<2)>>2],d)))&0==(0|(e=0|x()))){s=2;break t}if(i[(t=r+(p<<3)|0)>>2]=s,i[t+4>>2]=e,i[o+(p<<2)>>2]=h,t=(0|(u=u+1|0))==(0|h),c=6==(0|(l=f+1|0)),0|Mt(s,e)){s=1;break t}if((0|(h=h+(c&t&1)|0))>(0|n)){s=0;break}f=t?c?0:l:f,p=p+1|0,u=t?0:u}else for(f=0,h=1,p=1,u=0,s=t;;){if(!(u|f)){if(0==(0|(s=0|M(s,e,4,d)))&0==(0|(e=0|x()))){s=2;break t}if(0|Mt(s,e)){s=1;break t}}if(0==(0|(s=0|M(s,e,0|i[16+(f<<2)>>2],d)))&0==(0|(e=0|x()))){s=2;break t}if(i[(t=r+(p<<3)|0)>>2]=s,i[t+4>>2]=e,t=(0|(u=u+1|0))==(0|h),c=6==(0|(l=f+1|0)),0|Mt(s,e)){s=1;break t}if((0|(h=h+(c&t&1)|0))>(0|n)){s=0;break}f=t?c?0:l:f,p=p+1|0,u=t?0:u}else s=0}while(0);return k=a,0|(d=s)}function j(t,e,n,r,o,a,s){n|=0,r|=0,o|=0,a|=0,s|=0;var u,l,c=0,f=0,h=0,p=0,d=0;if(l=k,k=k+16|0,u=l,0==(0|(t|=0))&0==(0|(e|=0)))k=l;else{if(c=0|xe(0|t,0|e,0|a,((0|a)<0)<<31>>31|0),x(),!(0==(0|(d=0|i[(p=f=r+(c<<3)|0)>>2]))&0==(0|(p=0|i[p+4>>2]))|(h=(0|d)==(0|t)&(0|p)==(0|e))))do{h=(0|(p=0|i[(d=f=r+((c=(c+1|0)%(0|a)|0)<<3)|0)>>2]))==(0|t)&(0|(d=0|i[d+4>>2]))==(0|e)}while(!(0==(0|p)&0==(0|d)|h));c=o+(c<<2)|0,h&&(0|i[c>>2])<=(0|s)||(i[(d=f)>>2]=t,i[d+4>>2]=e,i[c>>2]=s,(0|s)>=(0|n)||(d=s+1|0,i[u>>2]=0,j(p=0|M(t,e,2,u),0|x(),n,r,o,a,d),i[u>>2]=0,j(p=0|M(t,e,3,u),0|x(),n,r,o,a,d),i[u>>2]=0,j(p=0|M(t,e,1,u),0|x(),n,r,o,a,d),i[u>>2]=0,j(p=0|M(t,e,5,u),0|x(),n,r,o,a,d),i[u>>2]=0,j(p=0|M(t,e,4,u),0|x(),n,r,o,a,d),i[u>>2]=0,j(p=0|M(t,e,6,u),0|x(),n,r,o,a,d))),k=l}}function M(t,e,n,r){t|=0,e|=0,n|=0;var o,a,s=0,u=0,l=0,c=0,f=0,h=0,p=0;if((0|i[(r|=0)>>2])>0){s=0;do{n=0|ut(n),s=s+1|0}while((0|s)<(0|i[r>>2]))}o=0|Ee(0|t,0|e,45),x(),a=127&o,u=0|Rt(t,e),s=0|Ee(0|t,0|e,52),x(),s&=15;t:do{if(s)for(;;){if(h=0|Ee(0|t,0|e,0|(f=3*(15-s|0)|0)),x(),h&=7,p=0==(0|zt(s)),s=s+-1|0,c=0|Oe(7,0,0|f),e&=~(0|x()),t=(f=0|Oe(0|i[(p?464:48)+(28*h|0)+(n<<2)>>2],0,0|f))|t&~c,e|=0|x(),!(n=0|i[(p?672:256)+(28*h|0)+(n<<2)>>2])){n=0;break t}if(!s){l=6;break}}else l=6}while(0);6==(0|l)&&(t|=h=0|Oe(0|(p=0|i[880+(28*a|0)+(n<<2)>>2]),0,45),e=0|x()|-1040385&e,n=0|i[4304+(28*a|0)+(n<<2)>>2],127==(127&p|0)&&(p=0|Oe(0|i[880+(28*a|0)+20>>2],0,45),e=0|x()|-1040385&e,n=0|i[4304+(28*a|0)+20>>2],t=0|Dt(p|t,e),e=0|x(),i[r>>2]=1+(0|i[r>>2]))),l=0|Ee(0|t,0|e,45),x(),l&=127;t:do{if(0|N(l)){e:do{if(1==(0|Rt(t,e))){if((0|a)!=(0|l)){if(0|z(l,0|i[7728+(28*a|0)>>2])){t=0|Bt(t,e),u=1,e=0|x();break}t=0|Dt(t,e),u=1,e=0|x();break}switch(0|u){case 5:t=0|Bt(t,e),e=0|x(),i[r>>2]=5+(0|i[r>>2]),u=0;break e;case 3:t=0|Dt(t,e),e=0|x(),i[r>>2]=1+(0|i[r>>2]),u=0;break e;default:return p=0,w(0|(h=0)),0|p}}else u=0}while(0);if((0|n)>0){s=0;do{t=0|Nt(t,e),e=0|x(),s=s+1|0}while((0|s)!=(0|n))}if((0|a)!=(0|l)){if(!(0|D(l))){if(0!=(0|u)|5!=(0|Rt(t,e)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&o){case 8:case 118:break t}3!=(0|Rt(t,e))&&(i[r>>2]=1+(0|i[r>>2]))}}else if((0|n)>0){s=0;do{t=0|Dt(t,e),e=0|x(),s=s+1|0}while((0|s)!=(0|n))}}while(0);return i[r>>2]=((0|i[r>>2])+n|0)%6|0,p=t,w(0|(h=e)),0|p}function R(t,e,n,r,a,s){e|=0,n|=0,r|=0,a|=0,s|=0;var u,l,c,f,h,p,d,m,g,y=0,v=0,b=0,_=0,A=0,w=0,E=0,O=0,S=0,P=0,C=0,T=0,I=0,L=0;if(g=k,k=k+48|0,p=g+32|0,d=g+16|0,m=g,(0|(y=0|i[(t|=0)>>2]))<=0)return k=g,0|(T=0);u=t+4|0,l=p+8|0,c=d+8|0,f=m+8|0,h=((0|e)<0)<<31>>31,C=0;t:for(;;){S=(v=0|i[u>>2])+(C<<4)|0,i[p>>2]=i[S>>2],i[p+4>>2]=i[S+4>>2],i[p+8>>2]=i[S+8>>2],i[p+12>>2]=i[S+12>>2],(0|C)==(y+-1|0)?(i[d>>2]=i[v>>2],i[d+4>>2]=i[v+4>>2],i[d+8>>2]=i[v+8>>2],i[d+12>>2]=i[v+12>>2]):(S=v+(C+1<<4)|0,i[d>>2]=i[S>>2],i[d+4>>2]=i[S+4>>2],i[d+8>>2]=i[S+8>>2],i[d+12>>2]=i[S+12>>2]),S=0|W(p,d,n);e:do{if((0|S)>0){P=+(0|S),O=0;n:for(;;){L=+(S-O|0),I=+(0|O),o[m>>3]=+o[p>>3]*L/P+ +o[d>>3]*I/P,o[f>>3]=+o[l>>3]*L/P+ +o[c>>3]*I/P,v=0|xe(0|(w=0|Ut(m,n)),0|(E=0|x()),0|e,0|h),x(),_=0|i[(b=y=s+(v<<3)|0)>>2],b=0|i[b+4>>2];r:do{if(0==(0|_)&0==(0|b))T=14;else for(A=0;;){if((0|A)>(0|e)){y=1;break r}if((0|_)==(0|w)&(0|b)==(0|E)){y=7;break r}if(0==(0|(_=0|i[(b=y=s+((v=(v+1|0)%(0|e)|0)<<3)|0)>>2]))&0==(0|(b=0|i[b+4>>2]))){T=14;break}A=A+1|0}}while(0);switch(14==(0|T)&&(T=0,0==(0|w)&0==(0|E)?y=7:(i[y>>2]=w,i[y+4>>2]=E,y=0|i[r>>2],i[(A=a+(y<<3)|0)>>2]=w,i[A+4>>2]=E,i[r>>2]=y+1,y=0)),7&y){case 7:case 0:break;default:break n}if((0|S)<=(0|(O=O+1|0))){T=8;break e}}if(0|y){y=-1,T=20;break t}}else T=8}while(0);if(8==(0|T)&&(T=0),(0|(C=C+1|0))>=(0|(y=0|i[t>>2]))){y=0,T=20;break}}return 20==(0|T)?(k=g,0|y):0}function N(t){return 0|i[7728+(28*(t|=0)|0)+16>>2]}function D(t){return 4==(0|(t|=0))|117==(0|t)|0}function F(t){return 0|i[11152+(216*(0|i[(t|=0)>>2])|0)+(72*(0|i[t+4>>2])|0)+(24*(0|i[t+8>>2])|0)+(i[t+12>>2]<<3)>>2]}function B(t){return 0|i[11152+(216*(0|i[(t|=0)>>2])|0)+(72*(0|i[t+4>>2])|0)+(24*(0|i[t+8>>2])|0)+(i[t+12>>2]<<3)+4>>2]}function z(t,e){return e|=0,(0|i[7728+(28*(t|=0)|0)+20>>2])==(0|e)?0|(e=1):0|(e=(0|i[7728+(28*t|0)+24>>2])==(0|e))}function U(t,e){return 0|i[880+(28*(t|=0)|0)+((e|=0)<<2)>>2]}function G(t,e){return e|=0,(0|i[880+(28*(t|=0)|0)>>2])==(0|e)?0|(e=0):(0|i[880+(28*t|0)+4>>2])==(0|e)?0|(e=1):(0|i[880+(28*t|0)+8>>2])==(0|e)?0|(e=2):(0|i[880+(28*t|0)+12>>2])==(0|e)?0|(e=3):(0|i[880+(28*t|0)+16>>2])==(0|e)?0|(e=4):(0|i[880+(28*t|0)+20>>2])==(0|e)?0|(e=5):0|((0|i[880+(28*t|0)+24>>2])==(0|e)?6:7)}function V(t){return+o[(t|=0)+16>>3]<+o[t+24>>3]|0}function q(t,e){t|=0;var n,r,i=0;return(i=+o[(e|=0)>>3])>=+o[t+8>>3]&&i<=+o[t>>3]?(n=+o[t+16>>3],i=+o[t+24>>3],e=(r=+o[e+8>>3])>=i,t=r<=n&1,n<i?e&&(t=1):e||(t=0),0|(e=0!=(0|t))):0|(e=0)}function H(t,e){t|=0,e|=0;var n,r,a,s,l,c,f=0,h=0;s=k,k=k+288|0,n=s+264|0,r=s+96|0,h=(f=a=s)+96|0;do{i[f>>2]=0,f=f+4|0}while((0|f)<(0|h));return Wt(e,a),qt(h=0|i[(f=a)>>2],f=0|i[f+4>>2],n),Ht(h,f,r),l=+Ct(n,r+8|0),o[n>>3]=+o[t>>3],o[(f=n+8|0)>>3]=+o[t+16>>3],o[r>>3]=+o[t+8>>3],o[(h=r+8|0)>>3]=+o[t+24>>3],c=+Ct(n,r),h=~~+v(+c*c/+Se(+ +u(+(+o[f>>3]-+o[h>>3])/(+o[n>>3]-+o[r>>3])),3)/(l*(2.59807621135*l)*.8)),k=s,0|(0==(0|h)?1:h)}function W(t,e,n){t|=0,e|=0,n|=0;var r,o,a,s,u,l=0,c=0;s=k,k=k+288|0,r=s+264|0,o=s+96|0,c=(l=a=s)+96|0;do{i[l>>2]=0,l=l+4|0}while((0|l)<(0|c));return Wt(n,a),qt(l=0|i[(c=a)>>2],c=0|i[c+4>>2],r),Ht(l,c,o),u=+Ct(r,o+8|0),c=~~+v(+ +Ct(t,e)/(2*u)),k=s,0|(0==(0|c)?1:c)}function X(t,e,n,r){e|=0,n|=0,r|=0,i[(t|=0)>>2]=e,i[t+4>>2]=n,i[t+8>>2]=r}function Y(t,e){t|=0;var n,r,a,s,l=0,c=0,f=0,h=0,p=0,d=0,m=0;i[(s=(e|=0)+8|0)>>2]=0,r=+o[t>>3],h=+u(+r),a=+o[t+8>>3],h+=.5*(p=+u(+a)/.8660254037844386),h-=+(0|(l=~~h)),p-=+(0|(t=~~p));do{if(h<.5){if(h<.3333333333333333){if(i[e>>2]=l,p<.5*(h+1)){i[e+4>>2]=t;break}t=t+1|0,i[e+4>>2]=t;break}if(t=(1&!(p<(m=1-h)))+t|0,i[e+4>>2]=t,m<=p&p<2*h){l=l+1|0,i[e>>2]=l;break}i[e>>2]=l;break}if(!(h<.6666666666666666)){if(l=l+1|0,i[e>>2]=l,p<.5*h){i[e+4>>2]=t;break}t=t+1|0,i[e+4>>2]=t;break}if(p<1-h){if(i[e+4>>2]=t,2*h-1<p){i[e>>2]=l;break}}else t=t+1|0,i[e+4>>2]=t;l=l+1|0,i[e>>2]=l}while(0);do{if(r<0){if(1&t){l=~~(+(0|l)-(2*(+((d=0|_e(0|l,((0|l)<0)<<31>>31|0,0|(d=(t+1|0)/2|0),((0|d)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))+1)),i[e>>2]=l;break}l=~~(+(0|l)-2*(+((d=0|_e(0|l,((0|l)<0)<<31>>31|0,0|(d=(0|t)/2|0),((0|d)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))),i[e>>2]=l;break}}while(0);d=e+4|0,a<0&&(l=l-((1|t<<1)/2|0)|0,i[e>>2]=l,t=0-t|0,i[d>>2]=t),c=t-l|0,(0|l)<0?(f=0-l|0,i[d>>2]=c,i[s>>2]=f,i[e>>2]=0,t=c,l=0):f=0,(0|t)<0&&(l=l-t|0,i[e>>2]=l,f=f-t|0,i[s>>2]=f,i[d>>2]=0,t=0),n=l-f|0,c=t-f|0,(0|f)<0&&(i[e>>2]=n,i[d>>2]=c,i[s>>2]=0,t=c,l=n,f=0),(0|(c=(0|f)<(0|(c=(0|t)<(0|l)?t:l))?f:c))<=0||(i[e>>2]=l-c,i[d>>2]=t-c,i[s>>2]=f-c)}function Z(t){var e,n=0,r=0,o=0,a=0,s=0;n=0|i[(t|=0)>>2],r=0|i[(e=t+4|0)>>2],(0|n)<0&&(r=r-n|0,i[e>>2]=r,i[(s=t+8|0)>>2]=(0|i[s>>2])-n,i[t>>2]=0,n=0),(0|r)<0?(n=n-r|0,i[t>>2]=n,a=(0|i[(s=t+8|0)>>2])-r|0,i[s>>2]=a,i[e>>2]=0,r=0):(s=a=t+8|0,a=0|i[a>>2]),(0|a)<0&&(n=n-a|0,i[t>>2]=n,r=r-a|0,i[e>>2]=r,i[s>>2]=0,a=0),(0|(o=(0|a)<(0|(o=(0|r)<(0|n)?r:n))?a:o))<=0||(i[t>>2]=n-o,i[e>>2]=r-o,i[s>>2]=a-o)}function K(t,e){e|=0;var n,r;r=0|i[(t|=0)+8>>2],n=+((0|i[t+4>>2])-r|0),o[e>>3]=+((0|i[t>>2])-r|0)-.5*n,o[e+8>>3]=.8660254037844386*n}function $(t,e,n){t|=0,e|=0,i[(n|=0)>>2]=(0|i[e>>2])+(0|i[t>>2]),i[n+4>>2]=(0|i[e+4>>2])+(0|i[t+4>>2]),i[n+8>>2]=(0|i[e+8>>2])+(0|i[t+8>>2])}function J(t,e,n){t|=0,e|=0,i[(n|=0)>>2]=(0|i[t>>2])-(0|i[e>>2]),i[n+4>>2]=(0|i[t+4>>2])-(0|i[e+4>>2]),i[n+8>>2]=(0|i[t+8>>2])-(0|i[e+8>>2])}function Q(t,e){e|=0;var n,r=0;r=0|b(0|i[(t|=0)>>2],e),i[t>>2]=r,n=0|b(0|i[(r=t+4|0)>>2],e),i[r>>2]=n,e=0|b(0|i[(t=t+8|0)>>2],e),i[t>>2]=e}function tt(t){var e,n,r=0,o=0,a=0,s=0,u=0;u=(0|(n=0|i[(t|=0)>>2]))<0,t=(t=(o=(0|(s=((e=(0|(a=(0|i[t+4>>2])-(u?n:0)|0))<0)?0-a|0:0)+((0|i[t+8>>2])-(u?n:0))|0))<0)?0:s)-((a=(0|(o=(0|t)<(0|(o=(0|(r=(e?0:a)-(o?s:0)|0))<(0|(s=(u?0:n)-(e?a:0)-(o?s:0)|0))?r:s))?t:o))>0)?o:0)|0,r=r-(a?o:0)|0;t:do{switch(s-(a?o:0)|0){case 0:switch(0|r){case 0:return 0|(u=0==(0|t)?0:1==(0|t)?1:7);case 1:return 0|(u=0==(0|t)?2:1==(0|t)?3:7);default:break t}case 1:switch(0|r){case 0:return 0|(u=0==(0|t)?4:1==(0|t)?5:7);case 1:if(t)break t;return 0|(t=6);default:break t}}}while(0);return 0|(u=7)}function et(t){var e,n,r=0,o=0,a=0,s=0,u=0;o=0|i[(e=(t|=0)+8|0)>>2],a=0|ge(+((3*(r=(0|i[t>>2])-o|0)|0)-(o=(0|i[(n=t+4|0)>>2])-o|0)|0)/7),i[t>>2]=a,r=0|ge(+((o<<1)+r|0)/7),i[n>>2]=r,i[e>>2]=0,o=r-a|0,(0|a)<0?(u=0-a|0,i[n>>2]=o,i[e>>2]=u,i[t>>2]=0,r=o,a=0,o=u):o=0,(0|r)<0&&(a=a-r|0,i[t>>2]=a,o=o-r|0,i[e>>2]=o,i[n>>2]=0,r=0),u=a-o|0,s=r-o|0,(0|o)<0?(i[t>>2]=u,i[n>>2]=s,i[e>>2]=0,r=s,s=u,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[t>>2]=s-a,i[n>>2]=r-a,i[e>>2]=o-a)}function nt(t){var e,n,r=0,o=0,a=0,s=0,u=0;o=0|i[(e=(t|=0)+8|0)>>2],a=0|ge(+(((r=(0|i[t>>2])-o|0)<<1)+(o=(0|i[(n=t+4|0)>>2])-o|0)|0)/7),i[t>>2]=a,r=0|ge(+((3*o|0)-r|0)/7),i[n>>2]=r,i[e>>2]=0,o=r-a|0,(0|a)<0?(u=0-a|0,i[n>>2]=o,i[e>>2]=u,i[t>>2]=0,r=o,a=0,o=u):o=0,(0|r)<0&&(a=a-r|0,i[t>>2]=a,o=o-r|0,i[e>>2]=o,i[n>>2]=0,r=0),u=a-o|0,s=r-o|0,(0|o)<0?(i[t>>2]=u,i[n>>2]=s,i[e>>2]=0,r=s,s=u,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[t>>2]=s-a,i[n>>2]=r-a,i[e>>2]=o-a)}function rt(t){var e,n,r,o=0,a=0,s=0,u=0;o=0|i[(t|=0)>>2],a=0|i[(n=t+4|0)>>2],s=0|i[(r=t+8|0)>>2],u=a+(3*o|0)|0,i[t>>2]=u,a=s+(3*a|0)|0,i[n>>2]=a,o=(3*s|0)+o|0,i[r>>2]=o,s=a-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=s,i[r>>2]=o,i[t>>2]=0,a=s,s=0):s=u,(0|a)<0&&(s=s-a|0,i[t>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),e=s-o|0,u=a-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,s=e,o=0):u=a,(0|(a=(0|o)<(0|(a=(0|u)<(0|s)?u:s))?o:a))<=0||(i[t>>2]=s-a,i[n>>2]=u-a,i[r>>2]=o-a)}function it(t){var e,n,r,o=0,a=0,s=0,u=0;u=0|i[(t|=0)>>2],s=(3*(o=0|i[(n=t+4|0)>>2])|0)+u|0,u=(a=0|i[(r=t+8|0)>>2])+(3*u|0)|0,i[t>>2]=u,i[n>>2]=s,o=(3*a|0)+o|0,i[r>>2]=o,a=s-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=a,i[r>>2]=o,i[t>>2]=0,u=0):a=s,(0|a)<0&&(u=u-a|0,i[t>>2]=u,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),e=u-o|0,s=a-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=s,i[r>>2]=0,u=e,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|u)?s:u))?o:a))<=0||(i[t>>2]=u-a,i[n>>2]=s-a,i[r>>2]=o-a)}function ot(t,e){t|=0;var n,r,o,a=0,s=0,u=0;((e|=0)+-1|0)>>>0>=6||(u=(0|i[15472+(12*e|0)>>2])+(0|i[t>>2])|0,i[t>>2]=u,o=t+4|0,s=(0|i[15472+(12*e|0)+4>>2])+(0|i[o>>2])|0,i[o>>2]=s,r=t+8|0,e=(0|i[15472+(12*e|0)+8>>2])+(0|i[r>>2])|0,i[r>>2]=e,a=s-u|0,(0|u)<0?(e=e-u|0,i[o>>2]=a,i[r>>2]=e,i[t>>2]=0,s=0):(a=s,s=u),(0|a)<0&&(s=s-a|0,i[t>>2]=s,e=e-a|0,i[r>>2]=e,i[o>>2]=0,a=0),n=s-e|0,u=a-e|0,(0|e)<0?(i[t>>2]=n,i[o>>2]=u,i[r>>2]=0,s=n,e=0):u=a,(0|(a=(0|e)<(0|(a=(0|u)<(0|s)?u:s))?e:a))<=0||(i[t>>2]=s-a,i[o>>2]=u-a,i[r>>2]=e-a))}function at(t){var e,n,r,o=0,a=0,s=0,u=0;u=0|i[(t|=0)>>2],s=(o=0|i[(n=t+4|0)>>2])+u|0,u=(a=0|i[(r=t+8|0)>>2])+u|0,i[t>>2]=u,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=a,i[r>>2]=o,i[t>>2]=0,s=0):(a=s,s=u),(0|a)<0&&(s=s-a|0,i[t>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),e=s-o|0,u=a-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,s=e,o=0):u=a,(0|(a=(0|o)<(0|(a=(0|u)<(0|s)?u:s))?o:a))<=0||(i[t>>2]=s-a,i[n>>2]=u-a,i[r>>2]=o-a)}function st(t){var e,n,r,o=0,a=0,s=0,u=0;o=0|i[(t|=0)>>2],s=0|i[(n=t+4|0)>>2],a=0|i[(r=t+8|0)>>2],u=s+o|0,i[t>>2]=u,s=a+s|0,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=a,i[r>>2]=o,i[t>>2]=0,s=0):(a=s,s=u),(0|a)<0&&(s=s-a|0,i[t>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),e=s-o|0,u=a-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,s=e,o=0):u=a,(0|(a=(0|o)<(0|(a=(0|u)<(0|s)?u:s))?o:a))<=0||(i[t>>2]=s-a,i[n>>2]=u-a,i[r>>2]=o-a)}function ut(t){switch(0|(t|=0)){case 1:t=5;break;case 5:t=4;break;case 4:t=6;break;case 6:t=2;break;case 2:t=3;break;case 3:t=1}return 0|t}function lt(t){switch(0|(t|=0)){case 1:t=3;break;case 3:t=2;break;case 2:t=6;break;case 6:t=4;break;case 4:t=5;break;case 5:t=1}return 0|t}function ct(t){var e,n,r,o=0,a=0,s=0,u=0;o=0|i[(t|=0)>>2],a=0|i[(n=t+4|0)>>2],s=0|i[(r=t+8|0)>>2],u=a+(o<<1)|0,i[t>>2]=u,a=s+(a<<1)|0,i[n>>2]=a,o=(s<<1)+o|0,i[r>>2]=o,s=a-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=s,i[r>>2]=o,i[t>>2]=0,a=s,s=0):s=u,(0|a)<0&&(s=s-a|0,i[t>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),e=s-o|0,u=a-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,s=e,o=0):u=a,(0|(a=(0|o)<(0|(a=(0|u)<(0|s)?u:s))?o:a))<=0||(i[t>>2]=s-a,i[n>>2]=u-a,i[r>>2]=o-a)}function ft(t){var e,n,r,o=0,a=0,s=0,u=0;u=0|i[(t|=0)>>2],s=((o=0|i[(n=t+4|0)>>2])<<1)+u|0,u=(a=0|i[(r=t+8|0)>>2])+(u<<1)|0,i[t>>2]=u,i[n>>2]=s,o=(a<<1)+o|0,i[r>>2]=o,a=s-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=a,i[r>>2]=o,i[t>>2]=0,u=0):a=s,(0|a)<0&&(u=u-a|0,i[t>>2]=u,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),e=u-o|0,s=a-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=s,i[r>>2]=0,u=e,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|u)?s:u))?o:a))<=0||(i[t>>2]=u-a,i[n>>2]=s-a,i[r>>2]=o-a)}function ht(t,e){e|=0;var n,r,o,a=0,s=0,u=0;return o=(0|(r=(0|i[(t|=0)>>2])-(0|i[e>>2])|0))<0,n=(0|(s=(0|i[t+4>>2])-(0|i[e+4>>2])-(o?r:0)|0))<0,e=(e=(t=(0|(u=(o?0-r|0:0)+(0|i[t+8>>2])-(0|i[e+8>>2])+(n?0-s|0:0)|0))<0)?0:u)-((s=(0|(t=(0|e)<(0|(t=(0|(a=(n?0:s)-(t?u:0)|0))<(0|(u=(o?0:r)-(n?s:0)-(t?u:0)|0))?a:u))?e:t))>0)?t:0)|0,a=a-(s?t:0)|0,0|((0|(t=(0|(t=u-(s?t:0)|0))>-1?t:0-t|0))>(0|(e=(0|(a=(0|a)>-1?a:0-a|0))>(0|(e=(0|e)>-1?e:0-e|0))?a:e))?t:e)}function pt(t,e){e|=0;var n;n=0|i[(t|=0)+8>>2],i[e>>2]=(0|i[t>>2])-n,i[e+4>>2]=(0|i[t+4>>2])-n}function dt(t,e){e|=0;var n,r,o,a=0,s=0,u=0;s=0|i[(t|=0)>>2],i[e>>2]=s,t=0|i[t+4>>2],i[(r=e+4|0)>>2]=t,i[(o=e+8|0)>>2]=0,a=t-s|0,(0|s)<0?(t=0-s|0,i[r>>2]=a,i[o>>2]=t,i[e>>2]=0,s=0):(a=t,t=0),(0|a)<0&&(s=s-a|0,i[e>>2]=s,t=t-a|0,i[o>>2]=t,i[r>>2]=0,a=0),n=s-t|0,u=a-t|0,(0|t)<0?(i[e>>2]=n,i[r>>2]=u,i[o>>2]=0,a=u,u=n,t=0):u=s,(0|(s=(0|t)<(0|(s=(0|a)<(0|u)?a:u))?t:s))<=0||(i[e>>2]=u-s,i[r>>2]=a-s,i[o>>2]=t-s)}function mt(t){var e,n,r,o;n=(o=0|i[(e=(t|=0)+8|0)>>2])-(0|i[t>>2])|0,i[t>>2]=n,t=(0|i[(r=t+4|0)>>2])-o|0,i[r>>2]=t,i[e>>2]=0-(t+n)}function gt(t){var e,n,r=0,o=0,a=0,s=0,u=0;r=0-(o=0|i[(t|=0)>>2])|0,i[t>>2]=r,i[(e=t+8|0)>>2]=0,s=(a=0|i[(n=t+4|0)>>2])+o|0,(0|o)>0?(i[n>>2]=s,i[e>>2]=o,i[t>>2]=0,r=0,a=s):o=0,(0|a)<0?(u=r-a|0,i[t>>2]=u,o=o-a|0,i[e>>2]=o,i[n>>2]=0,s=u-o|0,r=0-o|0,(0|o)<0?(i[t>>2]=s,i[n>>2]=r,i[e>>2]=0,a=r,o=0):(a=0,s=u)):s=r,(0|(r=(0|o)<(0|(r=(0|a)<(0|s)?a:s))?o:r))<=0||(i[t>>2]=s-r,i[n>>2]=a-r,i[e>>2]=o-r)}function yt(t,e,n,r){e|=0,n|=0,r|=0;var a,s=0,u=0,l=0,c=0;if(a=k,k=k+32|0,function(t,e){e|=0;var n=0,r=0,i=0;n=+o[(t=t|0)>>3],r=+f(+n),n=+h(+n),o[e+16>>3]=n,n=+o[t+8>>3],i=r*+f(+n),o[e>>3]=i,n=r*+h(+n),o[e+8>>3]=n}(t|=0,u=a),i[n>>2]=0,s=+ue(15888,u),(l=+ue(15912,u))<s&&(i[n>>2]=1,s=l),(l=+ue(15936,u))<s&&(i[n>>2]=2,s=l),(l=+ue(15960,u))<s&&(i[n>>2]=3,s=l),(l=+ue(15984,u))<s&&(i[n>>2]=4,s=l),(l=+ue(16008,u))<s&&(i[n>>2]=5,s=l),(l=+ue(16032,u))<s&&(i[n>>2]=6,s=l),(l=+ue(16056,u))<s&&(i[n>>2]=7,s=l),(l=+ue(16080,u))<s&&(i[n>>2]=8,s=l),(l=+ue(16104,u))<s&&(i[n>>2]=9,s=l),(l=+ue(16128,u))<s&&(i[n>>2]=10,s=l),(l=+ue(16152,u))<s&&(i[n>>2]=11,s=l),(l=+ue(16176,u))<s&&(i[n>>2]=12,s=l),(l=+ue(16200,u))<s&&(i[n>>2]=13,s=l),(l=+ue(16224,u))<s&&(i[n>>2]=14,s=l),(l=+ue(16248,u))<s&&(i[n>>2]=15,s=l),(l=+ue(16272,u))<s&&(i[n>>2]=16,s=l),(l=+ue(16296,u))<s&&(i[n>>2]=17,s=l),(l=+ue(16320,u))<s&&(i[n>>2]=18,s=l),(l=+ue(16344,u))<s&&(i[n>>2]=19,s=l),(l=+d(+(1-.5*s)))<1e-16)return i[r>>2]=0,i[r+4>>2]=0,i[r+8>>2]=0,i[r+12>>2]=0,void(k=a);if(n=0|i[n>>2],s=+St((s=+o[16368+(24*n|0)>>3])-+St(+function(t,e){t|=0;var n=0,r=0,i=0,a=0,s=0;return a=+o[(e=e|0)>>3],r=+f(+a),i=+o[e+8>>3]-+o[t+8>>3],s=r*+h(+i),n=+o[t>>3],+ +y(+s,+(+h(+a)*+f(+n)-+f(+i)*(r*+h(+n))))}(15568+(n<<4)|0,t))),c=0|zt(e)?+St(s+-.3334731722518321):s,s=+p(+l)/.381966011250105,(0|e)>0){u=0;do{s*=2.6457513110645907,u=u+1|0}while((0|u)!=(0|e))}l=+f(+c)*s,o[r>>3]=l,c=+h(+c)*s,o[r+8>>3]=c,k=a}function vt(t,e,n,r,a){e|=0,n|=0,r|=0,a|=0;var s=0,c=0;if(s=+function(t){var e=0,n=0;return n=+o[(t=t|0)>>3],e=+o[t+8>>3],+ +l(+(n*n+e*e))}(t|=0),s<1e-16)return e=15568+(e<<4)|0,i[a>>2]=i[e>>2],i[a+4>>2]=i[e+4>>2],i[a+8>>2]=i[e+8>>2],void(i[a+12>>2]=i[e+12>>2]);if(c=+y(+ +o[t+8>>3],+ +o[t>>3]),(0|n)>0){t=0;do{s/=2.6457513110645907,t=t+1|0}while((0|t)!=(0|n))}r?(s/=3,n=0==(0|zt(n)),s=+g(.381966011250105*(n?s:s/2.6457513110645907))):(s=+g(.381966011250105*s),0|zt(n)&&(c=+St(c+.3334731722518321))),function(t,e,n,r){t|=0,e=+e,r|=0;var a=0,s=0,l=0,c=0;if((n=+n)<1e-16)return i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],void(i[r+12>>2]=i[t+12>>2]);s=e<0?e+6.283185307179586:e,s=e>=6.283185307179586?s+-6.283185307179586:s;do{if(!(s<1e-16)){if(a=+u(+(s+-3.141592653589793))<1e-16,e=+o[t>>3],a){e-=n,o[r>>3]=e,a=r;break}if(l=+f(+n),n=+h(+n),e=l*+h(+e)+ +f(+s)*(n*+f(+e)),e=+m(+((e=e>1?1:e)<-1?-1:e)),o[r>>3]=e,+u(+(e+-1.5707963267948966))<1e-16)return o[r>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return o[r>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if(c=+f(+e),s=n*+h(+s)/c,n=+o[t>>3],e=(l-+h(+e)*+h(+n))/+f(+n)/c,l=s>1?1:s,e=e>1?1:e,(e=+o[t+8>>3]+ +y(+(l<-1?-1:l),+(e<-1?-1:e)))>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);return void(o[r+8>>3]=e)}e=+o[t>>3]+n,o[r>>3]=e,a=r}while(0);if(+u(+(e+-1.5707963267948966))<1e-16)return o[a>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return o[a>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if((e=+o[t+8>>3])>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);o[r+8>>3]=e}(15568+(e<<4)|0,+St(+o[16368+(24*e|0)>>3]-c),s,a)}function bt(t,e,n){e|=0,n|=0;var r,o;r=k,k=k+16|0,K((t|=0)+4|0,o=r),vt(o,0|i[t>>2],e,0,n),k=r}function _t(t,e,n,r,a){t|=0,e|=0,n|=0,r|=0,a|=0;var s,u,l,c,f,h,p,d,m,g,y,v,b,_,A,w,x,O,S,P,C,T,I=0,L=0,j=0,M=0,R=0,N=0;if(T=k,k=k+272|0,M=T+240|0,S=T,P=T+224|0,C=T+208|0,y=T+176|0,v=T+160|0,b=T+192|0,_=T+144|0,A=T+128|0,w=T+112|0,x=T+96|0,O=T+80|0,i[(I=T+256|0)>>2]=e,i[M>>2]=i[t>>2],i[M+4>>2]=i[t+4>>2],i[M+8>>2]=i[t+8>>2],i[M+12>>2]=i[t+12>>2],At(M,I,S),i[a>>2]=0,(0|(M=r+n+(5==(0|r)&1)|0))<=(0|n))k=T;else{u=P+4|0,l=y+4|0,c=n+5|0,f=16848+((s=0|i[I>>2])<<2)|0,h=16928+(s<<2)|0,p=A+8|0,d=w+8|0,m=x+8|0,g=C+4|0,j=n;t:for(;;){L=S+(((0|j)%5|0)<<4)|0,i[C>>2]=i[L>>2],i[C+4>>2]=i[L+4>>2],i[C+8>>2]=i[L+8>>2],i[C+12>>2]=i[L+12>>2];do{}while(2==(0|wt(C,s,0,1)));if((0|j)>(0|n)&0!=(0|zt(e))){if(i[y>>2]=i[C>>2],i[y+4>>2]=i[C+4>>2],i[y+8>>2]=i[C+8>>2],i[y+12>>2]=i[C+12>>2],K(u,v),r=0|i[y>>2],I=0|i[17008+(80*r|0)+(i[P>>2]<<2)>>2],i[y>>2]=i[18608+(80*r|0)+(20*I|0)>>2],(0|(L=0|i[18608+(80*r|0)+(20*I|0)+16>>2]))>0){t=0;do{at(l),t=t+1|0}while((0|t)<(0|L))}switch(L=18608+(80*r|0)+(20*I|0)+4|0,i[b>>2]=i[L>>2],i[b+4>>2]=i[L+4>>2],i[b+8>>2]=i[L+8>>2],Q(b,3*(0|i[f>>2])|0),$(l,b,l),Z(l),K(l,_),R=+(0|i[h>>2]),o[A>>3]=3*R,o[p>>3]=0,N=-1.5*R,o[w>>3]=N,o[d>>3]=2.598076211353316*R,o[x>>3]=N,o[m>>3]=-2.598076211353316*R,0|i[17008+(80*(0|i[y>>2])|0)+(i[C>>2]<<2)>>2]){case 1:t=w,r=A;break;case 3:t=x,r=w;break;case 2:t=A,r=x;break;default:t=12;break t}ae(v,_,r,t,O),vt(O,0|i[y>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])}if((0|j)<(0|c)&&(K(g,y),vt(y,0|i[C>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),i[P>>2]=i[C>>2],i[P+4>>2]=i[C+4>>2],i[P+8>>2]=i[C+8>>2],i[P+12>>2]=i[C+12>>2],(0|(j=j+1|0))>=(0|M)){t=3;break}}3!=(0|t)?12==(0|t)&&E(22474,22521,581,22531):k=T}}function At(t,e,n){t|=0,e|=0,n|=0;var r,o=0,a=0,s=0,u=0,l=0;r=k,k=k+128|0,a=r,u=20208,l=(s=o=r+64|0)+60|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|l));u=20272,l=(s=a)+60|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|l));o=(l=0==(0|zt(0|i[e>>2])))?o:a,ct(a=t+4|0),ft(a),0|zt(0|i[e>>2])&&(it(a),i[e>>2]=1+(0|i[e>>2])),i[n>>2]=i[t>>2],$(a,o,e=n+4|0),Z(e),i[n+16>>2]=i[t>>2],$(a,o+12|0,e=n+20|0),Z(e),i[n+32>>2]=i[t>>2],$(a,o+24|0,e=n+36|0),Z(e),i[n+48>>2]=i[t>>2],$(a,o+36|0,e=n+52|0),Z(e),i[n+64>>2]=i[t>>2],$(a,o+48|0,n=n+68|0),Z(n),k=r}function wt(t,e,n,r){n|=0,r|=0;var o,a,s,u,l,c,f=0,h=0,p=0,d=0,m=0;if(c=k,k=k+32|0,l=c+12|0,a=c,m=(t|=0)+4|0,d=0|i[16928+((e|=0)<<2)>>2],d=(u=0!=(0|r))?3*d|0:d,f=0|i[m>>2],o=0|i[(s=t+8|0)>>2],u){if((0|(f=o+f+(r=0|i[(h=t+12|0)>>2])|0))==(0|d))return k=c,0|(m=1);p=h}else f=o+f+(r=0|i[(p=t+12|0)>>2])|0;if((0|f)<=(0|d))return k=c,0|(m=0);do{if((0|r)>0){if(r=0|i[t>>2],(0|o)>0){h=18608+(80*r|0)+60|0,r=t;break}r=18608+(80*r|0)+40|0,n?(X(l,d,0,0),J(m,l,a),st(a),$(a,l,m),h=r,r=t):(h=r,r=t)}else h=18608+(80*(0|i[t>>2])|0)+20|0,r=t}while(0);if(i[r>>2]=i[h>>2],(0|i[(f=h+16|0)>>2])>0){r=0;do{at(m),r=r+1|0}while((0|r)<(0|i[f>>2]))}return t=h+4|0,i[l>>2]=i[t>>2],i[l+4>>2]=i[t+4>>2],i[l+8>>2]=i[t+8>>2],e=0|i[16848+(e<<2)>>2],Q(l,u?3*e|0:e),$(m,l,m),Z(m),r=u&&((0|i[s>>2])+(0|i[m>>2])+(0|i[p>>2])|0)==(0|d)?1:2,k=c,0|(m=r)}function xt(t,e){t|=0,e|=0;var n=0;do{n=0|wt(t,e,0,1)}while(2==(0|n));return 0|n}function Et(t,e,n,r,a){t|=0,e|=0,n|=0,r|=0,a|=0;var s,u,l,c,f,h,p,d,m,g,y,v,b,_,A,w,x,O,S=0,P=0,C=0,T=0,I=0;if(O=k,k=k+240|0,_=O+208|0,A=O,w=O+192|0,x=O+176|0,m=O+160|0,g=O+144|0,y=O+128|0,v=O+112|0,b=O+96|0,i[(S=O+224|0)>>2]=e,i[_>>2]=i[t>>2],i[_+4>>2]=i[t+4>>2],i[_+8>>2]=i[t+8>>2],i[_+12>>2]=i[t+12>>2],Ot(_,S,A),i[a>>2]=0,(0|(d=r+n+(6==(0|r)&1)|0))<=(0|n))k=O;else{u=n+6|0,l=16928+((s=0|i[S>>2])<<2)|0,c=g+8|0,f=y+8|0,h=v+8|0,p=w+4|0,P=0,C=n,r=-1;t:for(;;){if(t=A+((S=(0|C)%6|0)<<4)|0,i[w>>2]=i[t>>2],i[w+4>>2]=i[t+4>>2],i[w+8>>2]=i[t+8>>2],i[w+12>>2]=i[t+12>>2],t=P,P=0|wt(w,s,0,1),(0|C)>(0|n)&0!=(0|zt(e))&&(1!=(0|t)&&(0|i[w>>2])!=(0|r))){switch(K(A+(((S+5|0)%6|0)<<4)+4|0,x),K(A+(S<<4)+4|0,m),T=+(0|i[l>>2]),o[g>>3]=3*T,o[c>>3]=0,I=-1.5*T,o[y>>3]=I,o[f>>3]=2.598076211353316*T,o[v>>3]=I,o[h>>3]=-2.598076211353316*T,S=0|i[_>>2],0|i[17008+(80*S|0)+(((0|r)==(0|S)?0|i[w>>2]:r)<<2)>>2]){case 1:t=y,r=g;break;case 3:t=v,r=y;break;case 2:t=g,r=v;break;default:t=8;break t}ae(x,m,r,t,b),0|se(x,b)||0|se(m,b)||(vt(b,0|i[_>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2]))}if((0|C)<(0|u)&&(K(p,x),vt(x,0|i[w>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),(0|(C=C+1|0))>=(0|d)){t=3;break}r=0|i[w>>2]}3!=(0|t)?8==(0|t)&&E(22557,22521,746,22602):k=O}}function Ot(t,e,n){t|=0,e|=0,n|=0;var r,o=0,a=0,s=0,u=0,l=0;r=k,k=k+160|0,a=r,u=20336,l=(s=o=r+80|0)+72|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|l));u=20416,l=(s=a)+72|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|l));o=(l=0==(0|zt(0|i[e>>2])))?o:a,ct(a=t+4|0),ft(a),0|zt(0|i[e>>2])&&(it(a),i[e>>2]=1+(0|i[e>>2])),i[n>>2]=i[t>>2],$(a,o,e=n+4|0),Z(e),i[n+16>>2]=i[t>>2],$(a,o+12|0,e=n+20|0),Z(e),i[n+32>>2]=i[t>>2],$(a,o+24|0,e=n+36|0),Z(e),i[n+48>>2]=i[t>>2],$(a,o+36|0,e=n+52|0),Z(e),i[n+64>>2]=i[t>>2],$(a,o+48|0,e=n+68|0),Z(e),i[n+80>>2]=i[t>>2],$(a,o+60|0,n=n+84|0),Z(n),k=r}function St(t){var e;return e=(t=+t)<0?t+6.283185307179586:t,+(t>=6.283185307179586?e+-6.283185307179586:e)}function Pt(t,e){return e|=0,+u(+(+o[(t|=0)>>3]-+o[e>>3]))<17453292519943298e-27?0|(e=+u(+(+o[t+8>>3]-+o[e+8>>3]))<17453292519943298e-27):0|(e=0)}function Ct(t,e){t|=0;var n,r,i,a=0;return r=+o[(e|=0)>>3],n=+o[t>>3],a=(i=+h(.5*(r-n)))*i+(a=+h(.5*(+o[e+8>>3]-+o[t+8>>3])))*(+f(+r)*+f(+n)*a),2*+y(+ +l(+a),+ +l(+(1-a)))*6371.007180918475}function Tt(t,e,n){t|=0,n|=0;var r,i,a,s,u=0,c=0,d=0,m=0,v=0,b=0;return b=+o[(e|=0)>>3],a=+o[t>>3],v=+h(.5*(b-a)),d=+o[e+8>>3],i=+o[t+8>>3],m=+h(.5*(d-i)),r=+f(+a),s=+f(+b),m=2*+y(+ +l(+(m=v*v+m*(s*r*m))),+ +l(+(1-m))),v=+o[n>>3],b=+h(.5*(v-b)),u=+o[n+8>>3],d=+h(.5*(u-d)),c=+f(+v),d=2*+y(+ +l(+(d=b*b+d*(s*c*d))),+ +l(+(1-d))),v=+h(.5*(a-v)),u=+h(.5*(i-u)),u=2*+y(+ +l(+(u=v*v+u*(r*c*u))),+ +l(+(1-u))),4*+g(+ +l(+ +p(.5*(c=.5*(m+d+u)))*+p(.5*(c-m))*+p(.5*(c-d))*+p(.5*(c-u))))}function kt(t,e){return e=0|Ee(0|(t|=0),0|(e|=0),45),x(),127&e|0}function It(t,e){var n=0,r=0,i=0,o=0,a=0,s=0;if(!(!0&134217728==(-16777216&(e|=0)|0)))return 0|(e=0);if(a=0|Ee(0|(t|=0),0|e,45),x(),(a&=127)>>>0>121)return 0|(e=0);n=0|Ee(0|t,0|e,52),x(),n&=15;do{if(0|n){for(i=1,r=0;;){if(o=0|Ee(0|t,0|e,3*(15-i|0)|0),x(),0!=(0|(o&=7))&(1^r)){if(1==(0|o)&0!=(0|N(a))){s=0,r=13;break}r=1}if(7==(0|o)){s=0,r=13;break}if(!(i>>>0<n>>>0)){r=9;break}i=i+1|0}if(9==(0|r)){if(15!=(0|n))break;return 0|(s=1)}if(13==(0|r))return 0|s}}while(0);for(;;){if(s=0|Ee(0|t,0|e,3*(14-n|0)|0),x(),!(7==(7&s|0)&!0)){s=0,r=13;break}if(!(n>>>0<14)){s=1,r=13;break}n=n+1|0}return 13==(0|r)?0|s:0}function Lt(t,e,n){n|=0;var r=0,i=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),x(),(0|(r&=15))>=(0|n)){if((0|r)!=(0|n))if(n>>>0<=15){if(t|=i=0|Oe(0|n,0,52),e=0|x()|-15728641&e,(0|r)>(0|n))do{i=0|Oe(7,0,3*(14-n|0)|0),n=n+1|0,t|=i,e=0|x()|e}while((0|n)<(0|r))}else e=0,t=0}else e=0,t=0;return w(0|e),0|t}function jt(t,e,n,r){n|=0,r|=0;var o,a=0,s=0,u=0,l=0,c=0,f=0;if(u=0|Ee(0|(t|=0),0|(e|=0),52),x(),(0|n)<16&(0|(u&=15))<=(0|n)){if((0|u)==(0|n))return i[(n=r)>>2]=t,void(i[n+4>>2]=e);if(o=(0|(c=0|ee(7,n-u|0)))/7|0,l=0|Ee(0|t,0|e,45),x(),0|N(127&l)){t:do{if(u)for(s=1;;){if(a=0|Ee(0|t,0|e,3*(15-s|0)|0),x(),0|(a&=7))break t;if(!(s>>>0<u>>>0)){a=0;break}s=s+1|0}else a=0}while(0);s=0==(0|a)}else s=0;if(f=0|Oe(u+1|0,0,52),a=0|x()|-15728641&e,jt(e=(f|t)&~(e=0|Oe(7,0,0|(l=3*(14-u|0)|0))),u=a&~(0|x()),n,r),a=r+(o<<3)|0,!s)return jt((f=0|Oe(1,0,0|l))|e,0|x()|u,n,a),f=a+(o<<3)|0,jt((c=0|Oe(2,0,0|l))|e,0|x()|u,n,f),f=f+(o<<3)|0,jt((c=0|Oe(3,0,0|l))|e,0|x()|u,n,f),f=f+(o<<3)|0,jt((c=0|Oe(4,0,0|l))|e,0|x()|u,n,f),f=f+(o<<3)|0,jt((c=0|Oe(5,0,0|l))|e,0|x()|u,n,f),void jt((c=0|Oe(6,0,0|l))|e,0|x()|u,n,f+(o<<3)|0);s=a+(o<<3)|0,(0|c)>6&&(Te(0|a,0,(f=(s>>>0>(c=a+8|0)>>>0?s:c)+-1+(0-a)|0)+8&-8|0),a=c+(f>>>3<<3)|0),jt((f=0|Oe(2,0,0|l))|e,0|x()|u,n,a),f=a+(o<<3)|0,jt((c=0|Oe(3,0,0|l))|e,0|x()|u,n,f),f=f+(o<<3)|0,jt((c=0|Oe(4,0,0|l))|e,0|x()|u,n,f),f=f+(o<<3)|0,jt((c=0|Oe(5,0,0|l))|e,0|x()|u,n,f),jt((c=0|Oe(6,0,0|l))|e,0|x()|u,n,f+(o<<3)|0)}}function Mt(t,e){var n=0,r=0,i=0;if(i=0|Ee(0|(t|=0),0|(e|=0),45),x(),!(0|N(127&i)))return 0|(i=0);i=0|Ee(0|t,0|e,52),x(),i&=15;t:do{if(i)for(r=1;;){if(n=0|Ee(0|t,0|e,3*(15-r|0)|0),x(),0|(n&=7))break t;if(!(r>>>0<i>>>0)){n=0;break}r=r+1|0}else n=0}while(0);return 0|(i=0==(0|n)&1)}function Rt(t,e){var n=0,r=0,i=0;if(i=0|Ee(0|(t|=0),0|(e|=0),52),x(),!(i&=15))return 0|(i=0);for(r=1;;){if(n=0|Ee(0|t,0|e,3*(15-r|0)|0),x(),0|(n&=7)){r=5;break}if(!(r>>>0<i>>>0)){n=0,r=5;break}r=r+1|0}return 5==(0|r)?0|n:0}function Nt(t,e){var n=0,r=0,i=0,o=0,a=0,s=0,u=0;if(u=0|Ee(0|(t|=0),0|(e|=0),52),x(),!(u&=15))return u=t,w(0|(s=e)),0|u;for(s=1,n=0;;){r=0|Oe(7,0,0|(o=3*(15-s|0)|0)),i=0|x(),a=0|Ee(0|t,0|e,0|o),x(),t=(o=0|Oe(0|ut(7&a),0,0|o))|t&~r,e=(a=0|x())|e&~i;t:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Ee(0|t,0|e,52),x(),r&=15){n=1;e:for(;;){switch(a=0|Ee(0|t,0|e,3*(15-n|0)|0),x(),7&a){case 1:break e;case 0:break;default:n=1;break t}if(!(n>>>0<r>>>0)){n=1;break t}n=n+1|0}for(n=1;;){if(i=0|Ee(0|t,0|e,0|(a=3*(15-n|0)|0)),x(),o=0|Oe(7,0,0|a),e&=~(0|x()),t=t&~o|(a=0|Oe(0|ut(7&i),0,0|a)),e=0|e|x(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<u>>>0))break;s=s+1|0}return w(0|e),0|t}function Dt(t,e){var n=0,r=0,i=0,o=0,a=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),x(),!(r&=15))return r=t,w(0|(n=e)),0|r;for(n=1;a=0|Ee(0|t,0|e,0|(o=3*(15-n|0)|0)),x(),i=0|Oe(7,0,0|o),e&=~(0|x()),t=(o=0|Oe(0|ut(7&a),0,0|o))|t&~i,e=0|x()|e,n>>>0<r>>>0;)n=n+1|0;return w(0|e),0|t}function Ft(t,e){var n=0,r=0,i=0,o=0,a=0,s=0,u=0;if(u=0|Ee(0|(t|=0),0|(e|=0),52),x(),!(u&=15))return u=t,w(0|(s=e)),0|u;for(s=1,n=0;;){r=0|Oe(7,0,0|(o=3*(15-s|0)|0)),i=0|x(),a=0|Ee(0|t,0|e,0|o),x(),t=(o=0|Oe(0|lt(7&a),0,0|o))|t&~r,e=(a=0|x())|e&~i;t:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Ee(0|t,0|e,52),x(),r&=15){n=1;e:for(;;){switch(a=0|Ee(0|t,0|e,3*(15-n|0)|0),x(),7&a){case 1:break e;case 0:break;default:n=1;break t}if(!(n>>>0<r>>>0)){n=1;break t}n=n+1|0}for(n=1;;){if(o=0|Oe(7,0,0|(i=3*(15-n|0)|0)),a=e&~(0|x()),e=0|Ee(0|t,0|e,0|i),x(),t=t&~o|(e=0|Oe(0|lt(7&e),0,0|i)),e=0|a|x(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<u>>>0))break;s=s+1|0}return w(0|e),0|t}function Bt(t,e){var n=0,r=0,i=0,o=0,a=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),x(),!(r&=15))return r=t,w(0|(n=e)),0|r;for(n=1;o=0|Oe(7,0,0|(a=3*(15-n|0)|0)),i=e&~(0|x()),e=0|Ee(0|t,0|e,0|a),x(),t=(e=0|Oe(0|lt(7&e),0,0|a))|t&~o,e=0|x()|i,n>>>0<r>>>0;)n=n+1|0;return w(0|e),0|t}function zt(t){return 0|(0|(t|=0))%2}function Ut(t,e){t|=0;var n,r;return r=k,k=k+16|0,n=r,(e|=0)>>>0<=15&&2146435072!=(2146435072&i[t+4>>2]|0)&&2146435072!=(2146435072&i[t+8+4>>2]|0)?(!function(t,e,n){var r,i;r=k,k=k+16|0,yt(t|=0,e|=0,n|=0,i=r),Y(i,n+4|0),k=r}(t,e,n),e=0|function(t,e){t|=0;var n,r=0,o=0,a=0,s=0,u=0,l=0,c=0,f=0;if(n=k,k=k+64|0,l=n+40|0,o=n+24|0,a=n+12|0,s=n,Oe(0|(e|=0),0,52),r=134225919|x(),!e)return(0|i[t+4>>2])>2||(0|i[t+8>>2])>2||(0|i[t+12>>2])>2?(l=0,w(0|(u=0)),k=n,0|l):(Oe(0|F(t),0,45),u=0|x()|r,l=-1,w(0|u),k=n,0|l);if(i[l>>2]=i[t>>2],i[l+4>>2]=i[t+4>>2],i[l+8>>2]=i[t+8>>2],i[l+12>>2]=i[t+12>>2],u=l+4|0,(0|e)>0)for(t=-1;i[o>>2]=i[u>>2],i[o+4>>2]=i[u+4>>2],i[o+8>>2]=i[u+8>>2],1&e?(et(u),i[a>>2]=i[u>>2],i[a+4>>2]=i[u+4>>2],i[a+8>>2]=i[u+8>>2],rt(a)):(nt(u),i[a>>2]=i[u>>2],i[a+4>>2]=i[u+4>>2],i[a+8>>2]=i[u+8>>2],it(a)),J(o,a,s),Z(s),c=0|Oe(7,0,0|(f=3*(15-e|0)|0)),r&=~(0|x()),t=(f=0|Oe(0|tt(s),0,0|f))|t&~c,r=0|x()|r,(0|e)>1;)e=e+-1|0;else t=-1;t:do{if((0|i[u>>2])<=2&&(0|i[l+8>>2])<=2&&(0|i[l+12>>2])<=2){if(e=0|Oe(0|(o=0|F(l)),0,45),e|=t,t=0|x()|-1040385&r,s=0|B(l),!(0|N(o))){if((0|s)<=0)break;for(a=0;;){if(o=0|Ee(0|e,0|t,52),x(),o&=15)for(r=1;l=0|Ee(0|e,0|t,0|(f=3*(15-r|0)|0)),x(),c=0|Oe(7,0,0|f),t&=~(0|x()),e=e&~c|(f=0|Oe(0|ut(7&l),0,0|f)),t=0|t|x(),r>>>0<o>>>0;)r=r+1|0;if((0|(a=a+1|0))==(0|s))break t}}a=0|Ee(0|e,0|t,52),x(),a&=15;e:do{if(a){r=1;n:for(;;){switch(f=0|Ee(0|e,0|t,3*(15-r|0)|0),x(),7&f){case 1:break n;case 0:break;default:break e}if(!(r>>>0<a>>>0))break e;r=r+1|0}if(0|z(o,0|i[l>>2]))for(r=1;c=0|Oe(7,0,0|(l=3*(15-r|0)|0)),f=t&~(0|x()),t=0|Ee(0|e,0|t,0|l),x(),e=e&~c|(t=0|Oe(0|lt(7&t),0,0|l)),t=0|f|x(),r>>>0<a>>>0;)r=r+1|0;else for(r=1;l=0|Ee(0|e,0|t,0|(f=3*(15-r|0)|0)),x(),c=0|Oe(7,0,0|f),t&=~(0|x()),e=e&~c|(f=0|Oe(0|ut(7&l),0,0|f)),t=0|t|x(),r>>>0<a>>>0;)r=r+1|0}}while(0);if((0|s)>0){r=0;do{e=0|Nt(e,t),t=0|x(),r=r+1|0}while((0|r)!=(0|s))}}else e=0,t=0}while(0);return f=e,w(0|(c=t)),k=n,0|f}(n,e),t=0|x()):(t=0,e=0),w(0|t),k=r,0|e}function Gt(t,e,n){var r,o=0,a=0,s=0;if(r=(n|=0)+4|0,a=0|Ee(0|(t|=0),0|(e|=0),52),x(),a&=15,s=0|Ee(0|t,0|e,45),x(),o=0==(0|a),0|N(127&s)){if(o)return 0|(s=1);o=1}else{if(o)return 0|(s=0);o=0==(0|i[r>>2])&&0==(0|i[n+8>>2])?0!=(0|i[n+12>>2])&1:1}for(n=1;1&n?rt(r):it(r),s=0|Ee(0|t,0|e,3*(15-n|0)|0),x(),ot(r,7&s),n>>>0<a>>>0;)n=n+1|0;return 0|o}function Vt(t,e,n){n|=0;var r,o,a=0,s=0,u=0,l=0,c=0,f=0;o=k,k=k+16|0,r=o,f=0|Ee(0|(t|=0),0|(e|=0),45),x(),f&=127;t:do{if(0!=(0|N(f))&&(u=0|Ee(0|t,0|e,52),x(),0!=(0|(u&=15)))){a=1;e:for(;;){switch(c=0|Ee(0|t,0|e,3*(15-a|0)|0),x(),7&c){case 5:break e;case 0:break;default:a=e;break t}if(!(a>>>0<u>>>0)){a=e;break t}a=a+1|0}for(s=1,a=e;l=0|Oe(7,0,0|(e=3*(15-s|0)|0)),c=a&~(0|x()),a=0|Ee(0|t,0|a,0|e),x(),t=t&~l|(a=0|Oe(0|lt(7&a),0,0|e)),a=0|c|x(),s>>>0<u>>>0;)s=s+1|0}else a=e}while(0);if(c=7728+(28*f|0)|0,i[n>>2]=i[c>>2],i[n+4>>2]=i[c+4>>2],i[n+8>>2]=i[c+8>>2],i[n+12>>2]=i[c+12>>2],0|Gt(t,a,n)){if(l=n+4|0,i[r>>2]=i[l>>2],i[r+4>>2]=i[l+4>>2],i[r+8>>2]=i[l+8>>2],u=0|Ee(0|t,0|a,52),x(),c=15&u,1&u?(it(l),u=c+1|0):u=c,0|N(f)){t:do{if(c)for(e=1;;){if(s=0|Ee(0|t,0|a,3*(15-e|0)|0),x(),0|(s&=7)){a=s;break t}if(!(e>>>0<c>>>0)){a=0;break}e=e+1|0}else a=0}while(0);a=4==(0|a)&1}else a=0;if(0|wt(n,u,a,0)){if(0|N(f))do{}while(0!=(0|wt(n,u,0,0)));(0|u)!=(0|c)&&nt(l)}else(0|u)!=(0|c)&&(i[l>>2]=i[r>>2],i[l+4>>2]=i[r+4>>2],i[l+8>>2]=i[r+8>>2]);k=o}else k=o}function qt(t,e,n){n|=0;var r,i;r=k,k=k+16|0,Vt(t|=0,e|=0,i=r),e=0|Ee(0|t,0|e,52),x(),bt(i,15&e,n),k=r}function Ht(t,e,n){n|=0;var r,i,o=0,a=0;i=k,k=k+16|0,Vt(t|=0,e|=0,r=i),o=0|Ee(0|t,0|e,45),x(),o=0==(0|N(127&o)),a=0|Ee(0|t,0|e,52),x(),a&=15;t:do{if(!o){if(0|a)for(o=1;;){if(!(0==((0|Oe(7,0,3*(15-o|0)|0))&t|0)&0==((0|x())&e|0)))break t;if(!(o>>>0<a>>>0))break;o=o+1|0}return _t(r,a,0,5,n),void(k=i)}}while(0);Et(r,a,0,6,n),k=i}function Wt(t,e){e|=0;var n,r=0,o=0,a=0,s=0,u=0,l=0;if(Oe(0|(t|=0),0,52),n=134225919|x(),(0|t)<1){o=0,r=0;do{0|N(o)&&(Oe(0|o,0,45),u=0|n|x(),i[(t=e+(r<<3)|0)>>2]=-1,i[t+4>>2]=u,r=r+1|0),o=o+1|0}while(122!=(0|o))}else{u=0,r=0;do{if(0|N(u)){for(Oe(0|u,0,45),o=1,a=-1,s=0|n|x();a&=~(l=0|Oe(7,0,3*(15-o|0)|0)),s&=~(0|x()),(0|o)!=(0|t);)o=o+1|0;i[(l=e+(r<<3)|0)>>2]=a,i[l+4>>2]=s,r=r+1|0}u=u+1|0}while(122!=(0|u))}}function Xt(t,e,n,r){var o,a=0,s=0,u=0,l=0,c=0;if(o=k,k=k+64|0,u=o,(0|(t|=0))==(0|(n|=0))&(0|(e|=0))==(0|(r|=0))|!1|134217728!=(2013265920&e|0)|!1|134217728!=(2013265920&r|0))return k=o,0|(u=0);if(a=0|Ee(0|t,0|e,52),x(),a&=15,s=0|Ee(0|n,0|r,52),x(),(0|a)!=(15&s|0))return k=o,0|(u=0);if(s=a+-1|0,a>>>0>1&&(c=0|Lt(t,e,s),l=0|x(),(0|c)==(0|(s=0|Lt(n,r,s)))&(0|l)==(0|x()))){if(a=0|Ee(0|t,0|e,0|(s=3*(15^a)|0)),x(),a&=7,s=0|Ee(0|n,0|r,0|s),x(),0==(0|a)|0==(0|(s&=7)))return k=o,0|(c=1);if((0|i[21136+(a<<2)>>2])==(0|s))return k=o,0|(c=1);if((0|i[21168+(a<<2)>>2])==(0|s))return k=o,0|(c=1)}s=(a=u)+56|0;do{i[a>>2]=0,a=a+4|0}while((0|a)<(0|s));return I(t,e,1,u),a=(0|i[(c=u)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+8|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+16|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+24|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+32|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+40|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)?1:1&((0|i[(a=u+48|0)>>2])==(0|n)?(0|i[a+4>>2])==(0|r):0),k=o,0|(c=a)}function Yt(t,e,n){n|=0;var r,o,a,s,u=0;if(a=k,k=k+16|0,o=a,u=0|Ee(0|(t|=0),0|(e|=0),56),x(),e=0|function(t,e,n){n|=0;var r=0,o=0;if(r=0|Mt(t=t|0,e=e|0),(n+-1|0)>>>0>5)return 0|(n=-1);if(1==(0|n)&(o=0!=(0|r)))return 0|(n=-1);return r=0|function(t,e){var n=0,r=0,o=0,a=0,s=0,u=0,l=0,c=0;if(c=k,k=k+32|0,a=c,Vt(t=t|0,e=e|0,o=c+16|0),s=0|kt(t,e),l=0|Rt(t,e),function(t,e){t=7728+(28*(t|=0)|0)|0,i[(e|=0)>>2]=i[t>>2],i[e+4>>2]=i[t+4>>2],i[e+8>>2]=i[t+8>>2],i[e+12>>2]=i[t+12>>2]}(s,a),e=0|function(t,e){t|=0;var n=0,r=0;if((e|=0)>>>0>20)return-1;do{if((0|i[11152+(216*e|0)>>2])!=(0|t))if((0|i[11152+(216*e|0)+8>>2])!=(0|t))if((0|i[11152+(216*e|0)+16>>2])!=(0|t))if((0|i[11152+(216*e|0)+24>>2])!=(0|t))if((0|i[11152+(216*e|0)+32>>2])!=(0|t))if((0|i[11152+(216*e|0)+40>>2])!=(0|t))if((0|i[11152+(216*e|0)+48>>2])!=(0|t))if((0|i[11152+(216*e|0)+56>>2])!=(0|t))if((0|i[11152+(216*e|0)+64>>2])!=(0|t))if((0|i[11152+(216*e|0)+72>>2])!=(0|t))if((0|i[11152+(216*e|0)+80>>2])!=(0|t))if((0|i[11152+(216*e|0)+88>>2])!=(0|t))if((0|i[11152+(216*e|0)+96>>2])!=(0|t))if((0|i[11152+(216*e|0)+104>>2])!=(0|t))if((0|i[11152+(216*e|0)+112>>2])!=(0|t))if((0|i[11152+(216*e|0)+120>>2])!=(0|t))if((0|i[11152+(216*e|0)+128>>2])!=(0|t)){if((0|i[11152+(216*e|0)+136>>2])!=(0|t)){if((0|i[11152+(216*e|0)+144>>2])==(0|t)){t=0,n=2,r=0;break}if((0|i[11152+(216*e|0)+152>>2])==(0|t)){t=0,n=2,r=1;break}if((0|i[11152+(216*e|0)+160>>2])==(0|t)){t=0,n=2,r=2;break}if((0|i[11152+(216*e|0)+168>>2])==(0|t)){t=1,n=2,r=0;break}if((0|i[11152+(216*e|0)+176>>2])==(0|t)){t=1,n=2,r=1;break}if((0|i[11152+(216*e|0)+184>>2])==(0|t)){t=1,n=2,r=2;break}if((0|i[11152+(216*e|0)+192>>2])==(0|t)){t=2,n=2,r=0;break}if((0|i[11152+(216*e|0)+200>>2])==(0|t)){t=2,n=2,r=1;break}if((0|i[11152+(216*e|0)+208>>2])==(0|t)){t=2,n=2,r=2;break}return-1}t=2,n=1,r=2}else t=2,n=1,r=1;else t=2,n=1,r=0;else t=1,n=1,r=2;else t=1,n=1,r=1;else t=1,n=1,r=0;else t=0,n=1,r=2;else t=0,n=1,r=1;else t=0,n=1,r=0;else t=2,n=0,r=2;else t=2,n=0,r=1;else t=2,n=0,r=0;else t=1,n=0,r=2;else t=1,n=0,r=1;else t=1,n=0,r=0;else t=0,n=0,r=2;else t=0,n=0,r=1;else t=0,n=0,r=0}while(0);return 0|i[11152+(216*e|0)+(72*n|0)+(24*t|0)+(r<<3)+4>>2]}(s,0|i[o>>2]),!(0|N(s)))return k=c,0|(l=e);switch(0|s){case 4:t=0,n=14;break;case 14:t=1,n=14;break;case 24:t=2,n=14;break;case 38:t=3,n=14;break;case 49:t=4,n=14;break;case 58:t=5,n=14;break;case 63:t=6,n=14;break;case 72:t=7,n=14;break;case 83:t=8,n=14;break;case 97:t=9,n=14;break;case 107:t=10,n=14;break;case 117:t=11,n=14;break;default:u=0,r=0}14==(0|n)&&(u=0|i[22096+(24*t|0)+8>>2],r=0|i[22096+(24*t|0)+16>>2]);(0|(t=0|i[o>>2]))!=(0|i[a>>2])&&(s=0|D(s))|(0|(t=0|i[o>>2]))==(0|r)&&(e=(e+1|0)%6|0);if(3==(0|l)&(0|t)==(0|r))return k=c,0|(l=(e+5|0)%6|0);if(!(5==(0|l)&(0|t)==(0|u)))return k=c,0|(l=e);return k=c,0|(l=(e+1|0)%6|0)}(t,e),o?0|(n=(5-r+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-r+(0|i[22416+(n<<2)>>2])|0)%6|0)}(r=(s=!0&268435456==(2013265920&e|0))?t:0,t=s?-2130706433&e|134217728:0,7&u),-1==(0|e))return i[n>>2]=0,void(k=a);Vt(r,t,o),u=0|Ee(0|r,0|t,52),x(),u&=15,0|Mt(r,t)?_t(o,u,e,2,n):Et(o,u,e,2,n),k=a}function Zt(t){t|=0;var e,n,r=0;return(e=0|be(1,12))||E(22691,22646,49,22704),0|(r=0|i[(n=t+4|0)>>2])?(i[(r=r+8|0)>>2]=e,i[n>>2]=e,0|e):(0|i[t>>2]&&E(22721,22646,61,22744),i[(r=t)>>2]=e,i[n>>2]=e,0|e)}function Kt(t,e){t|=0,e|=0;var n,r;return(r=0|ye(24))||E(22758,22646,78,22772),i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],i[r+12>>2]=i[e+12>>2],i[r+16>>2]=0,0|(n=0|i[(e=t+4|0)>>2])?(i[n+16>>2]=r,i[e>>2]=r,0|r):(0|i[t>>2]&&E(22787,22646,82,22772),i[t>>2]=r,i[e>>2]=r,0|r)}function $t(t){var e,n,r=0,a=0,s=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0,A=0,w=0,x=0,O=0,S=0,P=0,C=0,T=0,k=0,I=0,L=0,j=0,M=0,R=0,N=0;if(0|i[(l=(t|=0)+8|0)>>2])return 0|(N=1);if(!(s=0|i[t>>2]))return 0|(N=0);r=s,a=0;do{a=a+1|0,r=0|i[r+8>>2]}while(0!=(0|r));if(a>>>0<2)return 0|(N=0);(n=0|ye(a<<2))||E(22807,22646,317,22826),(e=0|ye(a<<5))||E(22848,22646,321,22826),i[t>>2]=0,i[(C=t+4|0)>>2]=0,i[l>>2]=0,a=0,M=0,P=0,g=0;t:for(;;){if(m=0|i[s>>2]){c=0,f=m;do{if(p=+o[f+8>>3],r=f,f=0|i[f+16>>2],h=+o[(l=(d=0==(0|f))?m:f)+8>>3],+u(+(p-h))>3.141592653589793){N=14;break}c+=(h-p)*(+o[r>>3]+ +o[l>>3])}while(!d);if(14==(0|N)){N=0,c=0,r=m;do{S=+o[r+8>>3],L=0|i[(j=r+16|0)>>2],O=+o[(L=0==(0|L)?m:L)+8>>3],c+=(+o[r>>3]+ +o[L>>3])*((O<0?O+6.283185307179586:O)-(S<0?S+6.283185307179586:S)),r=0|i[(0==(0|r)?s:j)>>2]}while(0!=(0|r))}c>0?(i[n+(M<<2)>>2]=s,M=M+1|0,l=P,r=g):N=19}else N=19;if(19==(0|N)){N=0;do{if(!a){if(g){l=C,f=g+8|0,r=s,a=t;break}if(0|i[t>>2]){N=27;break t}l=C,f=t,r=s,a=t;break}if(0|i[(r=a+8|0)>>2]){N=21;break t}if(!(a=0|be(1,12))){N=23;break t}i[r>>2]=a,l=a+4|0,f=a,r=g}while(0);if(i[f>>2]=s,i[l>>2]=s,f=e+(P<<5)|0,d=0|i[s>>2]){for(o[(m=e+(P<<5)+8|0)>>3]=17976931348623157e292,o[(g=e+(P<<5)+24|0)>>3]=17976931348623157e292,o[f>>3]=-17976931348623157e292,o[(y=e+(P<<5)+16|0)>>3]=-17976931348623157e292,w=17976931348623157e292,x=-17976931348623157e292,l=0,v=d,p=17976931348623157e292,_=17976931348623157e292,A=-17976931348623157e292,h=-17976931348623157e292;c=+o[v>>3],S=+o[v+8>>3],v=0|i[v+16>>2],O=+o[((b=0==(0|v))?d:v)+8>>3],c<p&&(o[m>>3]=c,p=c),S<_&&(o[g>>3]=S,_=S),c>A?o[f>>3]=c:c=A,S>h&&(o[y>>3]=S,h=S),w=S>0&S<w?S:w,x=S<0&S>x?S:x,l|=+u(+(S-O))>3.141592653589793,!b;)A=c;l&&(o[y>>3]=x,o[g>>3]=w)}else i[f>>2]=0,i[f+4>>2]=0,i[f+8>>2]=0,i[f+12>>2]=0,i[f+16>>2]=0,i[f+20>>2]=0,i[f+24>>2]=0,i[f+28>>2]=0;l=P+1|0}if(s=0|i[(j=s+8|0)>>2],i[j>>2]=0,!s){N=45;break}P=l,g=r}if(21==(0|N))E(22624,22646,35,22658);else if(23==(0|N))E(22678,22646,37,22658);else if(27==(0|N))E(22721,22646,61,22744);else if(45==(0|N)){t:do{if((0|M)>0){for(j=0==(0|l),I=l<<2,L=0==(0|t),k=0,r=0;;){if(T=0|i[n+(k<<2)>>2],j)N=73;else{if(!(P=0|ye(I))){N=50;break}if(!(C=0|ye(I))){N=52;break}e:do{if(L)a=0;else{for(l=0,a=0,f=t;s=e+(l<<5)|0,0|Jt(0|i[f>>2],s,0|i[T>>2])?(i[P+(a<<2)>>2]=f,i[C+(a<<2)>>2]=s,b=a+1|0):b=a,f=0|i[f+8>>2];)l=l+1|0,a=b;if((0|b)>0)if(s=0|i[P>>2],1==(0|b))a=s;else for(y=0,v=-1,a=s,g=s;;){for(d=0|i[g>>2],s=0,f=0;m=(0|(l=0|i[i[P+(f<<2)>>2]>>2]))==(0|d)?s:s+(1&(0|Jt(l,0|i[C+(f<<2)>>2],0|i[d>>2])))|0,(0|(f=f+1|0))!=(0|b);)s=m;if(a=(l=(0|m)>(0|v))?g:a,(0|(s=y+1|0))==(0|b))break e;y=s,v=l?m:v,g=0|i[P+(s<<2)>>2]}else a=0}}while(0);if(ve(P),ve(C),a){if(s=0|i[(l=a+4|0)>>2])a=s+8|0;else if(0|i[a>>2]){N=70;break}i[a>>2]=T,i[l>>2]=T}else N=73}if(73==(0|N)){if(N=0,0|(r=0|i[T>>2]))do{C=r,r=0|i[r+16>>2],ve(C)}while(0!=(0|r));ve(T),r=2}if((0|(k=k+1|0))>=(0|M)){R=r;break t}}50==(0|N)?E(22863,22646,249,22882):52==(0|N)?E(22901,22646,252,22882):70==(0|N)&&E(22721,22646,61,22744)}else R=0}while(0);return ve(n),ve(e),0|(N=R)}return 0}function Jt(t,e,n){t|=0;var r,a=0,s=0,u=0,l=0,c=0,f=0,h=0;if(!(0|q(e|=0,n|=0)))return 0|(t=0);if(e=0|V(e),r=+o[n>>3],a=e&(a=+o[n+8>>3])<0?a+6.283185307179586:a,!(t=0|i[t>>2]))return 0|(t=0);if(e){e=0,n=t;t:for(;;){for(;l=+o[n>>3],f=+o[n+8>>3],h=0|i[(n=n+16|0)>>2],u=+o[(h=0==(0|h)?t:h)>>3],s=+o[h+8>>3],l>u?(c=l,l=f):(c=u,u=l,l=s,s=f),r<u|r>c;)if(!(n=0|i[n>>2])){n=22;break t}if(a=(l=l<0?l+6.283185307179586:l)==a|(f=s<0?s+6.283185307179586:s)==a?a+-2220446049250313e-31:a,((f+=(r-u)/(c-u)*(l-f))<0?f+6.283185307179586:f)>a&&(e^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|e}else{e=0,n=t;t:for(;;){for(;l=+o[n>>3],f=+o[n+8>>3],h=0|i[(n=n+16|0)>>2],u=+o[(h=0==(0|h)?t:h)>>3],s=+o[h+8>>3],l>u?(c=l,l=f):(c=u,u=l,l=s,s=f),r<u|r>c;)if(!(n=0|i[n>>2])){n=22;break t}if(s+(r-u)/(c-u)*(l-s)>(a=l==a|s==a?a+-2220446049250313e-31:a)&&(e^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|e}return 0}function Qt(t,e,n,o,a){n|=0,o|=0,a|=0;var s,u,l,c,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0;if(c=k,k=k+32|0,_=c+16|0,l=c,f=0|Ee(0|(t|=0),0|(e|=0),52),x(),f&=15,y=0|Ee(0|n,0|o,52),x(),(0|f)!=(15&y|0))return k=c,0|(_=1);if(m=0|Ee(0|t,0|e,45),x(),m&=127,g=0|Ee(0|n,0|o,45),x(),y=(0|m)!=(0|(g&=127))){if(7==(0|(p=0|G(m,g))))return k=c,0|(_=2);7==(0|(d=0|G(g,m)))?E(22925,22949,151,22959):(v=p,h=d)}else v=0,h=0;s=0|N(m),u=0|N(g),i[_>>2]=0,i[_+4>>2]=0,i[_+8>>2]=0,i[_+12>>2]=0;do{if(v){if(p=(0|(g=0|i[4304+(28*m|0)+(v<<2)>>2]))>0,u)if(p){m=0,d=n,p=o;do{d=0|Ft(d,p),p=0|x(),1==(0|(h=0|lt(h)))&&(h=0|lt(1)),m=m+1|0}while((0|m)!=(0|g));g=h,m=d,d=p}else g=h,m=n,d=o;else if(p){m=0,d=n,p=o;do{d=0|Bt(d,p),p=0|x(),h=0|lt(h),m=m+1|0}while((0|m)!=(0|g));g=h,m=d,d=p}else g=h,m=n,d=o;if(Gt(m,d,_),y||E(22972,22949,181,22959),(p=0!=(0|s))&(h=0!=(0|u))&&E(22999,22949,182,22959),p){if(h=0|Rt(t,e),0|r[22032+(7*h|0)+v>>0]){f=3;break}m=d=0|i[21200+(28*h|0)+(v<<2)>>2],b=26}else if(h){if(h=0|Rt(m,d),0|r[22032+(7*h|0)+g>>0]){f=4;break}m=0,d=0|i[21200+(28*g|0)+(h<<2)>>2],b=26}else h=0;if(26==(0|b))if((0|d)<=-1&&E(23030,22949,212,22959),(0|m)<=-1&&E(23053,22949,213,22959),(0|d)>0){p=_+4|0,h=0;do{st(p),h=h+1|0}while((0|h)!=(0|d));h=m}else h=m;if(i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,ot(l,v),0|f)for(;0|zt(f)?rt(l):it(l),(0|f)>1;)f=f+-1|0;if((0|h)>0){f=0;do{st(l),f=f+1|0}while((0|f)!=(0|h))}$(b=_+4|0,l,b),Z(b),b=50}else if(Gt(n,o,_),0!=(0|s)&0!=(0|u))if((0|g)!=(0|m)&&E(23077,22949,243,22959),h=0|Rt(t,e),f=0|Rt(n,o),0|r[22032+(7*h|0)+f>>0])f=5;else if((0|(h=0|i[21200+(28*h|0)+(f<<2)>>2]))>0){p=_+4|0,f=0;do{st(p),f=f+1|0}while((0|f)!=(0|h));b=50}else b=50;else b=50}while(0);return 50==(0|b)&&(f=_+4|0,i[a>>2]=i[f>>2],i[a+4>>2]=i[f+4>>2],i[a+8>>2]=i[f+8>>2],f=0),k=c,0|(_=f)}function te(t,e,n,r){n|=0,r|=0;var o,a,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0;if(a=k,k=k+48|0,l=a+36|0,c=a+24|0,f=a+12|0,h=a,u=0|Ee(0|(t|=0),0|(e|=0),52),x(),u&=15,d=0|Ee(0|t,0|e,45),x(),o=0|N(d&=127),Oe(0|u,0,52),y=134225919|x(),i[(g=r)>>2]=-1,i[g+4>>2]=y,!u)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(s=0|U(d,0|tt(n))))?(k=a,0|(y=1)):(m=0|Oe(0|s,0,45),g=0|x(),g=-1040385&i[(d=r)+4>>2]|g,i[(y=r)>>2]=i[d>>2]|m,i[y+4>>2]=g,k=a,0|(y=0));for(i[l>>2]=i[n>>2],i[l+4>>2]=i[n+4>>2],i[l+8>>2]=i[n+8>>2];i[c>>2]=i[l>>2],i[c+4>>2]=i[l+4>>2],i[c+8>>2]=i[l+8>>2],0|zt(u)?(et(l),i[f>>2]=i[l>>2],i[f+4>>2]=i[l+4>>2],i[f+8>>2]=i[l+8>>2],rt(f)):(nt(l),i[f>>2]=i[l>>2],i[f+4>>2]=i[l+4>>2],i[f+8>>2]=i[l+8>>2],it(f)),J(c,f,h),Z(h),v=0|i[(g=r)>>2],g=0|i[g+4>>2],n=0|Oe(7,0,0|(b=3*(15-u|0)|0)),g&=~(0|x()),b=0|Oe(0|tt(h),0,0|b),g=0|x()|g,i[(y=r)>>2]=b|v&~n,i[y+4>>2]=g,(0|u)>1;)u=u+-1|0;t:do{if((0|i[l>>2])<=1&&(0|i[l+4>>2])<=1&&(0|i[l+8>>2])<=1){h=127==(0|(c=0|U(d,u=0|tt(l))))?0:0|N(c);e:do{if(u){if(o){if(l=21408+(28*(0|Rt(t,e))|0)+(u<<2)|0,(0|(l=0|i[l>>2]))>0){n=0;do{u=0|ut(u),n=n+1|0}while((0|n)!=(0|l))}if(1==(0|u)){s=3;break t}127==(0|(n=0|U(d,u)))&&E(23104,22949,376,23134),0|N(n)?E(23147,22949,377,23134):(m=l,p=u,s=n)}else m=0,p=u,s=c;if((0|(f=0|i[4304+(28*d|0)+(p<<2)>>2]))<=-1&&E(23178,22949,384,23134),!h){if((0|m)<=-1&&E(23030,22949,417,23134),0|m){u=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|Dt(n,l),l=0|x(),i[(b=r)>>2]=n,i[b+4>>2]=l,u=u+1|0}while((0|u)<(0|m))}if((0|f)<=0){u=54;break}for(u=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];;)if(n=0|Dt(n,l),l=0|x(),i[(b=r)>>2]=n,i[b+4>>2]=l,(0|(u=u+1|0))==(0|f)){u=54;break e}}if(7==(0|(c=0|G(s,d)))&&E(22925,22949,393,23134),n=0|i[(u=r)>>2],u=0|i[u+4>>2],(0|f)>0){l=0;do{n=0|Dt(n,u),u=0|x(),i[(b=r)>>2]=n,i[b+4>>2]=u,l=l+1|0}while((0|l)!=(0|f))}if(n=0|Rt(n,u),b=0|D(s),(0|(n=0|i[(b?21824:21616)+(28*c|0)+(n<<2)>>2]))<=-1&&E(23030,22949,412,23134),n){u=0,l=0|i[(c=r)>>2],c=0|i[c+4>>2];do{l=0|Nt(l,c),c=0|x(),i[(b=r)>>2]=l,i[b+4>>2]=c,u=u+1|0}while((0|u)<(0|n));u=54}else u=54}else if(0!=(0|o)&0!=(0|h))if(u=21408+(28*(b=0|Rt(t,e))|0)+((0|Rt(0|i[(u=r)>>2],0|i[u+4>>2]))<<2)|0,(0|(u=0|i[u>>2]))<=-1&&E(23201,22949,433,23134),u){s=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|Dt(n,l),l=0|x(),i[(b=r)>>2]=n,i[b+4>>2]=l,s=s+1|0}while((0|s)<(0|u));s=c,u=54}else s=c,u=55;else s=c,u=54}while(0);if(54==(0|u)&&h&&(u=55),55==(0|u)&&1==(0|Rt(0|i[(b=r)>>2],0|i[b+4>>2]))){s=4;break}y=0|i[(b=r)>>2],b=-1040385&i[b+4>>2],v=0|Oe(0|s,0,45),b=0|b|x(),i[(s=r)>>2]=y|v,i[s+4>>2]=b,s=0}else s=2}while(0);return k=a,0|(b=s)}function ee(t,e){var n=0;if(!(e|=0))return 0|(n=1);n=t|=0,t=1;do{t=0|b(0==(1&e|0)?1:n,t),e>>=1,n=0|b(n,n)}while(0!=(0|e));return 0|t}function ne(t,e,n){t|=0;var r,a,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0;if(!(0|q(e|=0,n|=0)))return 0|(d=0);if(e=0|V(e),a=+o[n>>3],s=e&(s=+o[n+8>>3])<0?s+6.283185307179586:s,(0|(d=0|i[t>>2]))<=0)return 0|(d=0);if(r=0|i[t+4>>2],e){e=0,n=-1,t=0;t:for(;;){for(p=t;c=+o[r+(p<<4)>>3],h=+o[r+(p<<4)+8>>3],l=+o[r+((t=(n+2|0)%(0|d)|0)<<4)>>3],u=+o[r+(t<<4)+8>>3],c>l?(f=c,c=h):(f=l,l=c,c=u,u=h),a<l|a>f;){if(!((0|(n=p+1|0))<(0|d))){n=22;break t}t=p,p=n,n=t}if(s=(c=c<0?c+6.283185307179586:c)==s|(h=u<0?u+6.283185307179586:u)==s?s+-2220446049250313e-31:s,((h+=(a-l)/(f-l)*(c-h))<0?h+6.283185307179586:h)>s&&(e^=1),(0|(t=p+1|0))>=(0|d)){n=22;break}n=p}if(22==(0|n))return 0|e}else{e=0,n=-1,t=0;t:for(;;){for(p=t;c=+o[r+(p<<4)>>3],h=+o[r+(p<<4)+8>>3],l=+o[r+((t=(n+2|0)%(0|d)|0)<<4)>>3],u=+o[r+(t<<4)+8>>3],c>l?(f=c,c=h):(f=l,l=c,c=u,u=h),a<l|a>f;){if(!((0|(n=p+1|0))<(0|d))){n=22;break t}t=p,p=n,n=t}if(u+(a-l)/(f-l)*(c-u)>(s=c==s|u==s?s+-2220446049250313e-31:s)&&(e^=1),(0|(t=p+1|0))>=(0|d)){n=22;break}n=p}if(22==(0|n))return 0|e}return 0}function re(t,e){e|=0;var n,r,a,s,l,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0,A=0;if(!(r=0|i[(t|=0)>>2]))return i[e>>2]=0,i[e+4>>2]=0,i[e+8>>2]=0,i[e+12>>2]=0,i[e+16>>2]=0,i[e+20>>2]=0,i[e+24>>2]=0,void(i[e+28>>2]=0);if(o[(a=e+8|0)>>3]=17976931348623157e292,o[(s=e+24|0)>>3]=17976931348623157e292,o[e>>3]=-17976931348623157e292,o[(l=e+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[t+4>>2],y=17976931348623157e292,v=-17976931348623157e292,b=0,t=-1,p=17976931348623157e292,d=17976931348623157e292,g=-17976931348623157e292,f=-17976931348623157e292,_=0;c=+o[n+(_<<4)>>3],m=+o[n+(_<<4)+8>>3],h=+o[n+(((0|(t=t+2|0))==(0|r)?0:t)<<4)+8>>3],c<p&&(o[a>>3]=c,p=c),m<d&&(o[s>>3]=m,d=m),c>g?o[e>>3]=c:c=g,m>f&&(o[l>>3]=m,f=m),y=m>0&m<y?m:y,v=m<0&m>v?m:v,b|=+u(+(m-h))>3.141592653589793,(0|(t=_+1|0))!=(0|r);)A=_,g=c,_=t,t=A;b&&(o[l>>3]=v,o[s>>3]=y)}}function ie(t,e){e|=0;var n,r=0,a=0,s=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0,A=0,w=0,x=0,E=0,O=0,S=0;if(v=0|i[(t|=0)>>2]){if(o[(b=e+8|0)>>3]=17976931348623157e292,o[(_=e+24|0)>>3]=17976931348623157e292,o[e>>3]=-17976931348623157e292,o[(A=e+16|0)>>3]=-17976931348623157e292,(0|v)>0){for(s=0|i[t+4>>2],g=17976931348623157e292,y=-17976931348623157e292,a=0,r=-1,h=17976931348623157e292,p=17976931348623157e292,m=-17976931348623157e292,c=-17976931348623157e292,w=0;l=+o[s+(w<<4)>>3],d=+o[s+(w<<4)+8>>3],f=+o[s+(((0|(O=r+2|0))==(0|v)?0:O)<<4)+8>>3],l<h&&(o[b>>3]=l,h=l),d<p&&(o[_>>3]=d,p=d),l>m?o[e>>3]=l:l=m,d>c&&(o[A>>3]=d,c=d),g=d>0&d<g?d:g,y=d<0&d>y?d:y,a|=+u(+(d-f))>3.141592653589793,(0|(r=w+1|0))!=(0|v);)O=w,m=l,w=r,r=O;a&&(o[A>>3]=y,o[_>>3]=g)}}else i[e>>2]=0,i[e+4>>2]=0,i[e+8>>2]=0,i[e+12>>2]=0,i[e+16>>2]=0,i[e+20>>2]=0,i[e+24>>2]=0,i[e+28>>2]=0;if(!((0|(r=0|i[(O=t+8|0)>>2]))<=0)){n=t+12|0,E=0;do{if(s=0|i[n>>2],a=E,_=e+((E=E+1|0)<<5)|0,A=0|i[s+(a<<3)>>2]){if(o[(w=e+(E<<5)+8|0)>>3]=17976931348623157e292,o[(t=e+(E<<5)+24|0)>>3]=17976931348623157e292,o[_>>3]=-17976931348623157e292,o[(x=e+(E<<5)+16|0)>>3]=-17976931348623157e292,(0|A)>0){for(v=0|i[s+(a<<3)+4>>2],g=17976931348623157e292,y=-17976931348623157e292,s=0,a=-1,b=0,h=17976931348623157e292,p=17976931348623157e292,d=-17976931348623157e292,c=-17976931348623157e292;l=+o[v+(b<<4)>>3],m=+o[v+(b<<4)+8>>3],f=+o[v+(((0|(a=a+2|0))==(0|A)?0:a)<<4)+8>>3],l<h&&(o[w>>3]=l,h=l),m<p&&(o[t>>3]=m,p=m),l>d?o[_>>3]=l:l=d,m>c&&(o[x>>3]=m,c=m),g=m>0&m<g?m:g,y=m<0&m>y?m:y,s|=+u(+(m-f))>3.141592653589793,(0|(a=b+1|0))!=(0|A);)S=b,b=a,d=l,a=S;s&&(o[x>>3]=y,o[t>>3]=g)}}else i[_>>2]=0,i[_+4>>2]=0,i[_+8>>2]=0,i[_+12>>2]=0,i[_+16>>2]=0,i[_+20>>2]=0,i[_+24>>2]=0,i[_+28>>2]=0,r=0|i[O>>2]}while((0|E)<(0|r))}}function oe(t,e,n){var r=0,o=0,a=0;if(!(0|ne(t|=0,e|=0,n|=0)))return 0|(o=0);if((0|i[(o=t+8|0)>>2])<=0)return 0|(o=1);for(r=t+12|0,t=0;;){if(a=t,t=t+1|0,0|ne((0|i[r>>2])+(a<<3)|0,e+(t<<5)|0,n)){t=0,r=6;break}if((0|t)>=(0|i[o>>2])){t=1,r=6;break}}return 6==(0|r)?0|t:0}function ae(t,e,n,r,i){e|=0,n|=0,r|=0,i|=0;var a,s,u,l,c,f,h,p=0;l=+o[(t|=0)>>3],u=+o[e>>3]-l,s=+o[t+8>>3],a=+o[e+8>>3]-s,f=+o[n>>3],p=((p=+o[r>>3]-f)*(s-(h=+o[n+8>>3]))-(l-f)*(c=+o[r+8>>3]-h))/(u*c-a*p),o[i>>3]=l+u*p,o[i+8>>3]=s+a*p}function se(t,e){return e|=0,+o[(t|=0)>>3]!=+o[e>>3]?0|(e=0):0|(e=+o[t+8>>3]==+o[e+8>>3])}function ue(t,e){e|=0;var n,r,i;return+((i=+o[(t|=0)>>3]-+o[e>>3])*i+(r=+o[t+8>>3]-+o[e+8>>3])*r+(n=+o[t+16>>3]-+o[e+16>>3])*n)}function le(t,e,n){t|=0,n|=0;var r=0;(0|(e|=0))>0?(r=0|be(e,4),i[t>>2]=r,r||E(23230,23253,40,23267)):i[t>>2]=0,i[t+4>>2]=e,i[t+8>>2]=0,i[t+12>>2]=n}function ce(t){var e,n,r,a=0,s=0,l=0,f=0;e=(t|=0)+4|0,n=t+12|0,r=t+8|0;t:for(;;){for(s=0|i[e>>2],a=0;;){if((0|a)>=(0|s))break t;if(l=0|i[t>>2],f=0|i[l+(a<<2)>>2])break;a=a+1|0}a=l+(~~(+u(+ +c(10,+ +(15-(0|i[n>>2])|0))*(+o[f>>3]+ +o[f+8>>3]))%+(0|s))>>>0<<2)|0,s=0|i[a>>2];e:do{if(0|s){if(l=f+32|0,(0|s)==(0|f))i[a>>2]=i[l>>2];else{if(!(a=0|i[(s=s+32|0)>>2]))break;for(;(0|a)!=(0|f);)if(!(a=0|i[(s=a+32|0)>>2]))break e;i[s>>2]=i[l>>2]}ve(f),i[r>>2]=(0|i[r>>2])-1}}while(0)}ve(0|i[t>>2])}function fe(t){var e,n=0,r=0;for(e=0|i[(t|=0)+4>>2],r=0;;){if((0|r)>=(0|e)){n=0,r=4;break}if(n=0|i[(0|i[t>>2])+(r<<2)>>2]){r=4;break}r=r+1|0}return 4==(0|r)?0|n:0}function he(t,e){e|=0;var n=0,r=0,a=0,s=0;if(n=~~(+u(+ +c(10,+ +(15-(0|i[(t|=0)+12>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,n=(0|i[t>>2])+(n<<2)|0,!(r=0|i[n>>2]))return 0|(s=1);s=e+32|0;do{if((0|r)!=(0|e)){if(!(n=0|i[r+32>>2]))return 0|(s=1);for(a=n;;){if((0|a)==(0|e)){a=8;break}if(!(n=0|i[a+32>>2])){n=1,a=10;break}r=a,a=n}if(8==(0|a)){i[r+32>>2]=i[s>>2];break}if(10==(0|a))return 0|n}else i[n>>2]=i[s>>2]}while(0);return ve(e),i[(s=t+8|0)>>2]=(0|i[s>>2])-1,0|(s=0)}function pe(t,e,n){t|=0,e|=0,n|=0;var r,a=0,s=0,l=0;(r=0|ye(40))||E(23283,23253,98,23296),i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],i[r+12>>2]=i[e+12>>2],i[(s=r+16|0)>>2]=i[n>>2],i[s+4>>2]=i[n+4>>2],i[s+8>>2]=i[n+8>>2],i[s+12>>2]=i[n+12>>2],i[r+32>>2]=0,s=~~(+u(+ +c(10,+ +(15-(0|i[t+12>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,s=(0|i[t>>2])+(s<<2)|0,a=0|i[s>>2];do{if(a){for(;!(0|Pt(a,e)&&0|Pt(a+16|0,n));)if(s=0|i[a+32>>2],!(0|i[(a=0==(0|s)?a:s)+32>>2])){l=10;break}if(10==(0|l)){i[a+32>>2]=r;break}return ve(r),0|(l=a)}i[s>>2]=r}while(0);return i[(l=t+8|0)>>2]=1+(0|i[l>>2]),0|(l=r)}function de(t,e,n){e|=0,n|=0;var r=0,a=0;if(a=~~(+u(+ +c(10,+ +(15-(0|i[(t|=0)+12>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,!(a=0|i[(0|i[t>>2])+(a<<2)>>2]))return 0|(n=0);if(!n){for(t=a;;){if(0|Pt(t,e)){r=10;break}if(!(t=0|i[t+32>>2])){t=0,r=10;break}}if(10==(0|r))return 0|t}for(t=a;;){if(0|Pt(t,e)&&0|Pt(t+16|0,n)){r=10;break}if(!(t=0|i[t+32>>2])){t=0,r=10;break}}return 10==(0|r)?0|t:0}function me(t,e){e|=0;var n=0;if(n=~~(+u(+ +c(10,+ +(15-(0|i[(t|=0)+12>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,!(t=0|i[(0|i[t>>2])+(n<<2)>>2]))return 0|(n=0);for(;;){if(0|Pt(t,e)){e=5;break}if(!(t=0|i[t+32>>2])){t=0,e=5;break}}return 5==(0|e)?0|t:0}function ge(t){return 0|~~+function(t){return+ +ke(+(t=+t))}(t=+t)}function ye(t){t|=0;var e,n=0,r=0,o=0,a=0,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0,A=0,w=0;e=k,k=k+16|0,d=e;do{if(t>>>0<245){if(t=(f=t>>>0<11?16:t+11&-8)>>>3,3&(r=(p=0|i[5829])>>>t)|0)return o=0|i[(r=(t=23356+((n=(1&r^1)+t|0)<<1<<2)|0)+8|0)>>2],(0|(s=0|i[(a=o+8|0)>>2]))==(0|t)?i[5829]=p&~(1<<n):(i[s+12>>2]=t,i[r>>2]=s),w=n<<3,i[o+4>>2]=3|w,i[(w=o+w+4|0)>>2]=1|i[w>>2],k=e,0|(w=a);if(f>>>0>(h=0|i[5831])>>>0){if(0|r)return n=((n=r<<t&((n=2<<t)|0-n))&0-n)-1|0,s=0|i[(t=(n=23356+((o=((r=(n>>>=l=n>>>12&16)>>>5&8)|l|(s=(n>>>=r)>>>2&4)|(t=(n>>>=s)>>>1&2)|(o=(n>>>=t)>>>1&1))+(n>>>o)|0)<<1<<2)|0)+8|0)>>2],(0|(r=0|i[(l=s+8|0)>>2]))==(0|n)?(t=p&~(1<<o),i[5829]=t):(i[r+12>>2]=n,i[t>>2]=r,t=p),u=(w=o<<3)-f|0,i[s+4>>2]=3|f,i[(a=s+f|0)+4>>2]=1|u,i[s+w>>2]=u,0|h&&(o=0|i[5834],r=23356+((n=h>>>3)<<1<<2)|0,t&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=u,i[5834]=a,k=e,0|(w=l);if(s=0|i[5830]){for(r=(s&0-s)-1|0,r=c=0|i[23620+(((o=(r>>>=a=r>>>12&16)>>>5&8)|a|(u=(r>>>=o)>>>2&4)|(l=(r>>>=u)>>>1&2)|(c=(r>>>=l)>>>1&1))+(r>>>c)<<2)>>2],l=c,c=(-8&i[c+4>>2])-f|0;(t=0|i[r+16>>2])||(t=0|i[r+20>>2]);)r=t,l=(a=(u=(-8&i[t+4>>2])-f|0)>>>0<c>>>0)?t:l,c=a?u:c;if((u=l+f|0)>>>0>l>>>0){a=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(t=l+20|0)>>2])&&!(n=0|i[(t=l+16|0)>>2])){r=0;break}for(;;)if(r=0|i[(o=n+20|0)>>2])n=r,t=o;else{if(!(r=0|i[(o=n+16|0)>>2]))break;n=r,t=o}i[t>>2]=0,r=n}else r=0|i[l+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|a){if(n=0|i[l+28>>2],(0|l)==(0|i[(t=23620+(n<<2)|0)>>2])){if(i[t>>2]=r,!r){i[5830]=s&~(1<<n);break}}else if(i[((0|i[(w=a+16|0)>>2])==(0|l)?w:a+20|0)>>2]=r,!r)break;i[r+24>>2]=a,0|(n=0|i[l+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[l+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return c>>>0<16?(w=c+f|0,i[l+4>>2]=3|w,i[(w=l+w+4|0)>>2]=1|i[w>>2]):(i[l+4>>2]=3|f,i[u+4>>2]=1|c,i[u+c>>2]=c,0|h&&(o=0|i[5834],r=23356+((n=h>>>3)<<1<<2)|0,(n=1<<n)&p?n=0|i[(t=r+8|0)>>2]:(i[5829]=n|p,n=r,t=r+8|0),i[t>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=c,i[5834]=u),k=e,0|(w=l+8|0)}p=f}else p=f}else p=f}else if(t>>>0<=4294967231)if(f=-8&(t=t+11|0),o=0|i[5830]){a=0-f|0,c=(t>>>=8)?f>>>0>16777215?31:f>>>((c=14-((l=((y=t<<(p=(t+1048320|0)>>>16&8))+520192|0)>>>16&4)|p|(c=((y<<=l)+245760|0)>>>16&2))+(y<<c>>>15)|0)+7|0)&1|c<<1:0,r=0|i[23620+(c<<2)>>2];t:do{if(r)for(t=0,l=f<<(31==(0|c)?0:25-(c>>>1)|0),s=0;;){if((u=(-8&i[r+4>>2])-f|0)>>>0<a>>>0){if(!u){t=r,a=0,y=65;break t}t=r,a=u}if(s=0==(0|(y=0|i[r+20>>2]))|(0|y)==(0|(r=0|i[r+16+(l>>>31<<2)>>2]))?s:y,!r){r=s,y=61;break}l<<=1}else r=0,t=0,y=61}while(0);if(61==(0|y)){if(0==(0|r)&0==(0|t)){if(!(t=((t=2<<c)|0-t)&o)){p=f;break}p=(t&0-t)-1|0,t=0,r=0|i[23620+(((s=(p>>>=u=p>>>12&16)>>>5&8)|u|(l=(p>>>=s)>>>2&4)|(c=(p>>>=l)>>>1&2)|(r=(p>>>=c)>>>1&1))+(p>>>r)<<2)>>2]}r?y=65:(l=t,u=a)}if(65==(0|y))for(s=r;;){if(a=(r=(p=(-8&i[s+4>>2])-f|0)>>>0<a>>>0)?p:a,t=r?s:t,(r=0|i[s+16>>2])||(r=0|i[s+20>>2]),!r){l=t,u=a;break}s=r}if(0!=(0|l)&&u>>>0<((0|i[5831])-f|0)>>>0&&(h=l+f|0)>>>0>l>>>0){s=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(t=l+20|0)>>2])&&!(n=0|i[(t=l+16|0)>>2])){n=0;break}for(;;)if(r=0|i[(a=n+20|0)>>2])n=r,t=a;else{if(!(r=0|i[(a=n+16|0)>>2]))break;n=r,t=a}i[t>>2]=0}else w=0|i[l+8>>2],i[w+12>>2]=n,i[n+8>>2]=w}while(0);do{if(s){if(t=0|i[l+28>>2],(0|l)==(0|i[(r=23620+(t<<2)|0)>>2])){if(i[r>>2]=n,!n){o&=~(1<<t),i[5830]=o;break}}else if(i[((0|i[(w=s+16|0)>>2])==(0|l)?w:s+20|0)>>2]=n,!n)break;i[n+24>>2]=s,0|(t=0|i[l+16>>2])&&(i[n+16>>2]=t,i[t+24>>2]=n),(t=0|i[l+20>>2])&&(i[n+20>>2]=t,i[t+24>>2]=n)}}while(0);t:do{if(u>>>0<16)w=u+f|0,i[l+4>>2]=3|w,i[(w=l+w+4|0)>>2]=1|i[w>>2];else{if(i[l+4>>2]=3|f,i[h+4>>2]=1|u,i[h+u>>2]=u,n=u>>>3,u>>>0<256){r=23356+(n<<1<<2)|0,(t=0|i[5829])&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=h,i[n+12>>2]=h,i[h+8>>2]=n,i[h+12>>2]=r;break}if(n=23620+((r=(n=u>>>8)?u>>>0>16777215?31:u>>>((r=14-((_=((w=n<<(A=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|A|(r=((w<<=_)+245760|0)>>>16&2))+(w<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[h+28>>2]=r,i[(t=h+16|0)+4>>2]=0,i[t>>2]=0,!(o&(t=1<<r))){i[5830]=o|t,i[n>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break}n=0|i[n>>2];e:do{if((-8&i[n+4>>2]|0)!=(0|u)){for(o=u<<(31==(0|r)?0:25-(r>>>1)|0);t=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|u)){n=t;break e}o<<=1,n=t}i[r>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break t}}while(0);w=0|i[(A=n+8|0)>>2],i[w+12>>2]=h,i[A>>2]=h,i[h+8>>2]=w,i[h+12>>2]=n,i[h+24>>2]=0}}while(0);return k=e,0|(w=l+8|0)}p=f}else p=f;else p=-1}while(0);if((r=0|i[5831])>>>0>=p>>>0)return n=r-p|0,t=0|i[5834],n>>>0>15?(w=t+p|0,i[5834]=w,i[5831]=n,i[w+4>>2]=1|n,i[t+r>>2]=n,i[t+4>>2]=3|p):(i[5831]=0,i[5834]=0,i[t+4>>2]=3|r,i[(w=t+r+4|0)>>2]=1|i[w>>2]),k=e,0|(w=t+8|0);if((u=0|i[5832])>>>0>p>>>0)return _=u-p|0,i[5832]=_,A=(w=0|i[5835])+p|0,i[5835]=A,i[A+4>>2]=1|_,i[w+4>>2]=3|p,k=e,0|(w=w+8|0);if(0|i[5947]?t=0|i[5949]:(i[5949]=4096,i[5948]=4096,i[5950]=-1,i[5951]=-1,i[5952]=0,i[5940]=0,i[5947]=-16&d^1431655768,t=4096),l=p+48|0,(f=(s=t+(c=p+47|0)|0)&(a=0-t|0))>>>0<=p>>>0)return k=e,0|(w=0);if(0|(t=0|i[5939])&&(d=(h=0|i[5937])+f|0)>>>0<=h>>>0|d>>>0>t>>>0)return k=e,0|(w=0);t:do{if(4&i[5940])n=0,y=143;else{r=0|i[5835];e:do{if(r){for(o=23764;!((d=0|i[o>>2])>>>0<=r>>>0&&(d+(0|i[o+4>>2])|0)>>>0>r>>>0);){if(!(t=0|i[o+8>>2])){y=128;break e}o=t}if((n=s-u&a)>>>0<2147483647)if((0|(t=0|Ie(0|n)))==((0|i[o>>2])+(0|i[o+4>>2])|0)){if(-1!=(0|t)){u=n,s=t,y=145;break t}}else o=t,y=136;else n=0}else y=128}while(0);do{if(128==(0|y))if(-1!=(0|(r=0|Ie(0)))&&(n=r,g=(n=(0==((g=(m=0|i[5948])+-1|0)&n|0)?0:(g+n&0-m)-n|0)+f|0)+(m=0|i[5937])|0,n>>>0>p>>>0&n>>>0<2147483647)){if(0|(d=0|i[5939])&&g>>>0<=m>>>0|g>>>0>d>>>0){n=0;break}if((0|(t=0|Ie(0|n)))==(0|r)){u=n,s=r,y=145;break t}o=t,y=136}else n=0}while(0);do{if(136==(0|y)){if(r=0-n|0,!(l>>>0>n>>>0&n>>>0<2147483647&-1!=(0|o))){if(-1==(0|o)){n=0;break}u=n,s=o,y=145;break t}if((t=c-n+(t=0|i[5949])&0-t)>>>0>=2147483647){u=n,s=o,y=145;break t}if(-1==(0|Ie(0|t))){Ie(0|r),n=0;break}u=t+n|0,s=o,y=145;break t}}while(0);i[5940]=4|i[5940],y=143}}while(0);if(143==(0|y)&&f>>>0<2147483647&&!(-1==(0|(_=0|Ie(0|f)))|1^(b=(v=(g=0|Ie(0))-_|0)>>>0>(p+40|0)>>>0)|_>>>0<g>>>0&-1!=(0|_)&-1!=(0|g)^1)&&(u=b?v:n,s=_,y=145),145==(0|y)){n=(0|i[5937])+u|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),c=0|i[5835];t:do{if(c){for(n=23764;;){if((0|s)==((t=0|i[n>>2])+(r=0|i[n+4>>2])|0)){y=154;break}if(!(o=0|i[n+8>>2]))break;n=o}if(154==(0|y)&&(A=n+4|0,0==(8&i[n+12>>2]|0))&&s>>>0>c>>>0&t>>>0<=c>>>0){i[A>>2]=r+u,A=c+(_=0==(7&(_=c+8|0)|0)?0:0-_&7)|0,_=(w=(0|i[5832])+u|0)-_|0,i[5835]=A,i[5832]=_,i[A+4>>2]=1|_,i[c+w+4>>2]=40,i[5836]=i[5951];break}for(s>>>0<(0|i[5833])>>>0&&(i[5833]=s),r=s+u|0,n=23764;;){if((0|i[n>>2])==(0|r)){y=162;break}if(!(t=0|i[n+8>>2]))break;n=t}if(162==(0|y)&&0==(8&i[n+12>>2]|0)){i[n>>2]=s,i[(h=n+4|0)>>2]=(0|i[h>>2])+u,f=(h=s+(0==(7&(h=s+8|0)|0)?0:0-h&7)|0)+p|0,l=(n=r+(0==(7&(n=r+8|0)|0)?0:0-n&7)|0)-h-p|0,i[h+4>>2]=3|p;e:do{if((0|c)==(0|n))w=(0|i[5832])+l|0,i[5832]=w,i[5835]=f,i[f+4>>2]=1|w;else{if((0|i[5834])==(0|n)){w=(0|i[5831])+l|0,i[5831]=w,i[5834]=f,i[f+4>>2]=1|w,i[f+w>>2]=w;break}if(1==(3&(t=0|i[n+4>>2])|0)){u=-8&t,o=t>>>3;n:do{if(t>>>0<256){if(t=0|i[n+8>>2],(0|(r=0|i[n+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<<o);break}i[t+12>>2]=r,i[r+8>>2]=t;break}s=0|i[n+24>>2],t=0|i[n+12>>2];do{if((0|t)==(0|n)){if(t=0|i[(o=(r=n+16|0)+4|0)>>2])r=o;else if(!(t=0|i[r>>2])){t=0;break}for(;;)if(o=0|i[(a=t+20|0)>>2])t=o,r=a;else{if(!(o=0|i[(a=t+16|0)>>2]))break;t=o,r=a}i[r>>2]=0}else w=0|i[n+8>>2],i[w+12>>2]=t,i[t+8>>2]=w}while(0);if(!s)break;o=23620+((r=0|i[n+28>>2])<<2)|0;do{if((0|i[o>>2])==(0|n)){if(i[o>>2]=t,0|t)break;i[5830]=i[5830]&~(1<<r);break n}if(i[((0|i[(w=s+16|0)>>2])==(0|n)?w:s+20|0)>>2]=t,!t)break n}while(0);if(i[t+24>>2]=s,0|(o=0|i[(r=n+16|0)>>2])&&(i[t+16>>2]=o,i[o+24>>2]=t),!(r=0|i[r+4>>2]))break;i[t+20>>2]=r,i[r+24>>2]=t}while(0);n=n+u|0,a=u+l|0}else a=l;if(i[(n=n+4|0)>>2]=-2&i[n>>2],i[f+4>>2]=1|a,i[f+a>>2]=a,n=a>>>3,a>>>0<256){r=23356+(n<<1<<2)|0,(t=0|i[5829])&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=f,i[n+12>>2]=f,i[f+8>>2]=n,i[f+12>>2]=r;break}n=a>>>8;do{if(n){if(a>>>0>16777215){o=31;break}o=a>>>((o=14-((_=((w=n<<(A=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|A|(o=((w<<=_)+245760|0)>>>16&2))+(w<<o>>>15)|0)+7|0)&1|o<<1}else o=0}while(0);if(n=23620+(o<<2)|0,i[f+28>>2]=o,i[(t=f+16|0)+4>>2]=0,i[t>>2]=0,!((t=0|i[5830])&(r=1<<o))){i[5830]=t|r,i[n>>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break}n=0|i[n>>2];n:do{if((-8&i[n+4>>2]|0)!=(0|a)){for(o=a<<(31==(0|o)?0:25-(o>>>1)|0);t=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|a)){n=t;break n}o<<=1,n=t}i[r>>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break e}}while(0);w=0|i[(A=n+8|0)>>2],i[w+12>>2]=f,i[A>>2]=f,i[f+8>>2]=w,i[f+12>>2]=n,i[f+24>>2]=0}}while(0);return k=e,0|(w=h+8|0)}for(n=23764;!((t=0|i[n>>2])>>>0<=c>>>0&&(w=t+(0|i[n+4>>2])|0)>>>0>c>>>0);)n=0|i[n+8>>2];n=(t=(t=(a=w+-47|0)+(0==(7&(t=a+8|0)|0)?0:0-t&7)|0)>>>0<(a=c+16|0)>>>0?c:t)+8|0,A=s+(_=0==(7&(_=s+8|0)|0)?0:0-_&7)|0,_=(r=u+-40|0)-_|0,i[5835]=A,i[5832]=_,i[A+4>>2]=1|_,i[s+r+4>>2]=40,i[5836]=i[5951],i[(r=t+4|0)>>2]=27,i[n>>2]=i[5941],i[n+4>>2]=i[5942],i[n+8>>2]=i[5943],i[n+12>>2]=i[5944],i[5941]=s,i[5942]=u,i[5944]=0,i[5943]=n,n=t+24|0;do{A=n,i[(n=n+4|0)>>2]=7}while((A+8|0)>>>0<w>>>0);if((0|t)!=(0|c)){if(s=t-c|0,i[r>>2]=-2&i[r>>2],i[c+4>>2]=1|s,i[t>>2]=s,n=s>>>3,s>>>0<256){r=23356+(n<<1<<2)|0,(t=0|i[5829])&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=c,i[n+12>>2]=c,i[c+8>>2]=n,i[c+12>>2]=r;break}if(r=23620+((o=(n=s>>>8)?s>>>0>16777215?31:s>>>((o=14-((_=((w=n<<(A=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|A|(o=((w<<=_)+245760|0)>>>16&2))+(w<<o>>>15)|0)+7|0)&1|o<<1:0)<<2)|0,i[c+28>>2]=o,i[c+20>>2]=0,i[a>>2]=0,!((n=0|i[5830])&(t=1<<o))){i[5830]=n|t,i[r>>2]=c,i[c+24>>2]=r,i[c+12>>2]=c,i[c+8>>2]=c;break}n=0|i[r>>2];e:do{if((-8&i[n+4>>2]|0)!=(0|s)){for(o=s<<(31==(0|o)?0:25-(o>>>1)|0);t=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|s)){n=t;break e}o<<=1,n=t}i[r>>2]=c,i[c+24>>2]=n,i[c+12>>2]=c,i[c+8>>2]=c;break t}}while(0);w=0|i[(A=n+8|0)>>2],i[w+12>>2]=c,i[A>>2]=c,i[c+8>>2]=w,i[c+12>>2]=n,i[c+24>>2]=0}}else 0==(0|(w=0|i[5833]))|s>>>0<w>>>0&&(i[5833]=s),i[5941]=s,i[5942]=u,i[5944]=0,i[5838]=i[5947],i[5837]=-1,i[5842]=23356,i[5841]=23356,i[5844]=23364,i[5843]=23364,i[5846]=23372,i[5845]=23372,i[5848]=23380,i[5847]=23380,i[5850]=23388,i[5849]=23388,i[5852]=23396,i[5851]=23396,i[5854]=23404,i[5853]=23404,i[5856]=23412,i[5855]=23412,i[5858]=23420,i[5857]=23420,i[5860]=23428,i[5859]=23428,i[5862]=23436,i[5861]=23436,i[5864]=23444,i[5863]=23444,i[5866]=23452,i[5865]=23452,i[5868]=23460,i[5867]=23460,i[5870]=23468,i[5869]=23468,i[5872]=23476,i[5871]=23476,i[5874]=23484,i[5873]=23484,i[5876]=23492,i[5875]=23492,i[5878]=23500,i[5877]=23500,i[5880]=23508,i[5879]=23508,i[5882]=23516,i[5881]=23516,i[5884]=23524,i[5883]=23524,i[5886]=23532,i[5885]=23532,i[5888]=23540,i[5887]=23540,i[5890]=23548,i[5889]=23548,i[5892]=23556,i[5891]=23556,i[5894]=23564,i[5893]=23564,i[5896]=23572,i[5895]=23572,i[5898]=23580,i[5897]=23580,i[5900]=23588,i[5899]=23588,i[5902]=23596,i[5901]=23596,i[5904]=23604,i[5903]=23604,A=s+(_=0==(7&(_=s+8|0)|0)?0:0-_&7)|0,_=(w=u+-40|0)-_|0,i[5835]=A,i[5832]=_,i[A+4>>2]=1|_,i[s+w+4>>2]=40,i[5836]=i[5951]}while(0);if((n=0|i[5832])>>>0>p>>>0)return _=n-p|0,i[5832]=_,A=(w=0|i[5835])+p|0,i[5835]=A,i[A+4>>2]=1|_,i[w+4>>2]=3|p,k=e,0|(w=w+8|0)}return i[(w=23312)>>2]=12,k=e,0|(w=0)}function ve(t){var e=0,n=0,r=0,o=0,a=0,s=0,u=0,l=0;if(t|=0){n=t+-8|0,o=0|i[5833],l=n+(e=-8&(t=0|i[t+-4>>2]))|0;do{if(1&t)u=n,s=n;else{if(r=0|i[n>>2],!(3&t))return;if(a=r+e|0,(s=n+(0-r)|0)>>>0<o>>>0)return;if((0|i[5834])==(0|s)){if(3!=(3&(e=0|i[(t=l+4|0)>>2])|0)){u=s,e=a;break}return i[5831]=a,i[t>>2]=-2&e,i[s+4>>2]=1|a,void(i[s+a>>2]=a)}if(n=r>>>3,r>>>0<256){if(t=0|i[s+8>>2],(0|(e=0|i[s+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<<n),u=s,e=a;break}i[t+12>>2]=e,i[e+8>>2]=t,u=s,e=a;break}o=0|i[s+24>>2],t=0|i[s+12>>2];do{if((0|t)==(0|s)){if(t=0|i[(n=(e=s+16|0)+4|0)>>2])e=n;else if(!(t=0|i[e>>2])){t=0;break}for(;;)if(n=0|i[(r=t+20|0)>>2])t=n,e=r;else{if(!(n=0|i[(r=t+16|0)>>2]))break;t=n,e=r}i[e>>2]=0}else u=0|i[s+8>>2],i[u+12>>2]=t,i[t+8>>2]=u}while(0);if(o){if(e=0|i[s+28>>2],(0|i[(n=23620+(e<<2)|0)>>2])==(0|s)){if(i[n>>2]=t,!t){i[5830]=i[5830]&~(1<<e),u=s,e=a;break}}else if(i[((0|i[(u=o+16|0)>>2])==(0|s)?u:o+20|0)>>2]=t,!t){u=s,e=a;break}i[t+24>>2]=o,0|(n=0|i[(e=s+16|0)>>2])&&(i[t+16>>2]=n,i[n+24>>2]=t),(e=0|i[e+4>>2])?(i[t+20>>2]=e,i[e+24>>2]=t,u=s,e=a):(u=s,e=a)}else u=s,e=a}}while(0);if(!(s>>>0>=l>>>0)&&1&(r=0|i[(t=l+4|0)>>2])){if(2&r)i[t>>2]=-2&r,i[u+4>>2]=1|e,i[s+e>>2]=e,o=e;else{if((0|i[5835])==(0|l)){if(l=(0|i[5832])+e|0,i[5832]=l,i[5835]=u,i[u+4>>2]=1|l,(0|u)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|l))return l=(0|i[5831])+e|0,i[5831]=l,i[5834]=s,i[u+4>>2]=1|l,void(i[s+l>>2]=l);o=(-8&r)+e|0,n=r>>>3;do{if(r>>>0<256){if(e=0|i[l+8>>2],(0|(t=0|i[l+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<n);break}i[e+12>>2]=t,i[t+8>>2]=e;break}a=0|i[l+24>>2],t=0|i[l+12>>2];do{if((0|t)==(0|l)){if(t=0|i[(n=(e=l+16|0)+4|0)>>2])e=n;else if(!(t=0|i[e>>2])){n=0;break}for(;;)if(n=0|i[(r=t+20|0)>>2])t=n,e=r;else{if(!(n=0|i[(r=t+16|0)>>2]))break;t=n,e=r}i[e>>2]=0,n=t}else n=0|i[l+8>>2],i[n+12>>2]=t,i[t+8>>2]=n,n=t}while(0);if(0|a){if(t=0|i[l+28>>2],(0|i[(e=23620+(t<<2)|0)>>2])==(0|l)){if(i[e>>2]=n,!n){i[5830]=i[5830]&~(1<<t);break}}else if(i[((0|i[(r=a+16|0)>>2])==(0|l)?r:a+20|0)>>2]=n,!n)break;i[n+24>>2]=a,0|(e=0|i[(t=l+16|0)>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),0|(t=0|i[t+4>>2])&&(i[n+20>>2]=t,i[t+24>>2]=n)}}while(0);if(i[u+4>>2]=1|o,i[s+o>>2]=o,(0|u)==(0|i[5834]))return void(i[5831]=o)}if(t=o>>>3,o>>>0<256)return n=23356+(t<<1<<2)|0,(e=0|i[5829])&(t=1<<t)?t=0|i[(e=n+8|0)>>2]:(i[5829]=e|t,t=n,e=n+8|0),i[e>>2]=u,i[t+12>>2]=u,i[u+8>>2]=t,void(i[u+12>>2]=n);t=23620+((r=(t=o>>>8)?o>>>0>16777215?31:o>>>((r=14-((a=((l=t<<(s=(t+1048320|0)>>>16&8))+520192|0)>>>16&4)|s|(r=((l<<=a)+245760|0)>>>16&2))+(l<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[u+28>>2]=r,i[u+20>>2]=0,i[u+16>>2]=0,e=0|i[5830],n=1<<r;t:do{if(e&n){t=0|i[t>>2];e:do{if((-8&i[t+4>>2]|0)!=(0|o)){for(r=o<<(31==(0|r)?0:25-(r>>>1)|0);e=0|i[(n=t+16+(r>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|o)){t=e;break e}r<<=1,t=e}i[n>>2]=u,i[u+24>>2]=t,i[u+12>>2]=u,i[u+8>>2]=u;break t}}while(0);l=0|i[(s=t+8|0)>>2],i[l+12>>2]=u,i[s>>2]=u,i[u+8>>2]=l,i[u+12>>2]=t,i[u+24>>2]=0}else i[5830]=e|n,i[t>>2]=u,i[u+24>>2]=t,i[u+12>>2]=u,i[u+8>>2]=u}while(0);if(l=(0|i[5837])-1|0,i[5837]=l,!(0|l)){for(t=23772;t=0|i[t>>2];)t=t+8|0;i[5837]=-1}}}}function be(t,e){e|=0;var n=0;return(t|=0)?(n=0|b(e,t),(e|t)>>>0>65535&&(n=(0|(n>>>0)/(t>>>0))==(0|e)?n:-1)):n=0,(t=0|ye(n))&&3&i[t+-4>>2]?(Te(0|t,0,0|n),0|t):0|t}function _e(t,e,n,r){return 0|(w(0|(r=(e|=0)-(r|=0)-((n|=0)>>>0>(t|=0)>>>0|0)>>>0)),t-n>>>0|0)}function Ae(t){return 0|((t|=0)?31-(0|A(t^t-1))|0:32)}function we(t,e,n,r,o){o|=0;var a=0,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0;if(f=t|=0,s=n|=0,u=p=r|=0,!(c=l=e|=0))return a=0!=(0|o),u?a?(i[o>>2]=0|t,i[o+4>>2]=0&e,o=0,0|(w(0|(p=0)),o)):(o=0,0|(w(0|(p=0)),o)):(a&&(i[o>>2]=(f>>>0)%(s>>>0),i[o+4>>2]=0),o=(f>>>0)/(s>>>0)>>>0,0|(w(0|(p=0)),o));a=0==(0|u);do{if(s){if(!a){if((a=(0|A(0|u))-(0|A(0|c))|0)>>>0<=31){s=h=a+1|0,t=f>>>(h>>>0)&(e=a-31>>31)|c<<(u=31-a|0),e&=c>>>(h>>>0),a=0,u=f<<u;break}return o?(i[o>>2]=0|t,i[o+4>>2]=l|0&e,o=0,0|(w(0|(p=0)),o)):(o=0,0|(w(0|(p=0)),o))}if((a=s-1|0)&s|0){s=u=33+(0|A(0|s))-(0|A(0|c))|0,t=(h=32-u|0)-1>>31&c>>>((d=u-32|0)>>>0)|(c<<h|f>>>(u>>>0))&(e=d>>31),e&=c>>>(u>>>0),a=f<<(m=64-u|0)&(l=h>>31),u=(c<<m|f>>>(d>>>0))&l|f<<h&u-33>>31;break}return 0|o&&(i[o>>2]=a&f,i[o+4>>2]=0),1==(0|s)?(m=0|t,0|(w(0|(d=l|0&e)),m)):(d=c>>>((m=0|Ae(0|s))>>>0)|0,m=c<<32-m|f>>>(m>>>0)|0,0|(w(0|d),m))}if(a)return 0|o&&(i[o>>2]=(c>>>0)%(s>>>0),i[o+4>>2]=0),m=(c>>>0)/(s>>>0)>>>0,0|(w(0|(d=0)),m);if(!f)return 0|o&&(i[o>>2]=0,i[o+4>>2]=(c>>>0)%(u>>>0)),m=(c>>>0)/(u>>>0)>>>0,0|(w(0|(d=0)),m);if(!((a=u-1|0)&u))return 0|o&&(i[o>>2]=0|t,i[o+4>>2]=a&c|0&e),d=0,m=c>>>((0|Ae(0|u))>>>0),0|(w(0|d),m);if((a=(0|A(0|u))-(0|A(0|c))|0)>>>0<=30){s=e=a+1|0,t=c<<(u=31-a|0)|f>>>(e>>>0),e=c>>>(e>>>0),a=0,u=f<<u;break}return o?(i[o>>2]=0|t,i[o+4>>2]=l|0&e,m=0,0|(w(0|(d=0)),m)):(m=0,0|(w(0|(d=0)),m))}while(0);if(s){c=0|function(t,e,n,r){return 0|(w((e|=0)+(r|=0)+((n=(t|=0)+(n|=0)>>>0)>>>0<t>>>0|0)>>>0|0),0|n)}(0|(h=0|n),0|(f=p|0&r),-1,-1),n=0|x(),l=u,u=0;do{r=l,l=a>>>31|l<<1,a=u|a<<1,_e(0|c,0|n,0|(r=t<<1|r>>>31|0),0|(p=t>>>31|e<<1|0)),u=1&(d=(m=0|x())>>31|((0|m)<0?-1:0)<<1),t=0|_e(0|r,0|p,d&h|0,(((0|m)<0?-1:0)>>31|((0|m)<0?-1:0)<<1)&f|0),e=0|x(),s=s-1|0}while(0!=(0|s));c=l,l=0}else c=u,l=0,u=0;return s=0,0|o&&(i[o>>2]=t,i[o+4>>2]=e),m=-2&(a<<1|0)|u,0|(w(0|(d=(0|a)>>>31|(c|s)<<1|0&(s<<1|a>>>31)|l)),m)}function xe(t,e,n,r){var o,a;return a=k,k=k+16|0,we(t|=0,e|=0,n|=0,r|=0,o=0|a),k=a,0|(w(0|i[o+4>>2]),0|i[o>>2])}function Ee(t,e,n){return t|=0,e|=0,(0|(n|=0))<32?(w(e>>>n|0),t>>>n|(e&(1<<n)-1)<<32-n):(w(0),e>>>n-32|0)}function Oe(t,e,n){return t|=0,e|=0,(0|(n|=0))<32?(w(e<<n|(t&(1<<n)-1<<32-n)>>>32-n|0),t<<n):(w(t<<n-32|0),0)}function Se(t,e){return e=+e,(t=+t)!=t?+e:e!=e?+t:+_(+t,+e)}function Pe(t){return(t=+t)>=0?+s(t+.5):+v(t-.5)}function Ce(t,e,n){t|=0,e|=0;var o,a,s=0;if((0|(n|=0))>=8192)return P(0|t,0|e,0|n),0|t;if(a=0|t,o=t+n|0,(3&t)==(3&e)){for(;3&t;){if(!n)return 0|a;r[t>>0]=0|r[e>>0],t=t+1|0,e=e+1|0,n=n-1|0}for(s=(n=-4&o|0)-64|0;(0|t)<=(0|s);)i[t>>2]=i[e>>2],i[t+4>>2]=i[e+4>>2],i[t+8>>2]=i[e+8>>2],i[t+12>>2]=i[e+12>>2],i[t+16>>2]=i[e+16>>2],i[t+20>>2]=i[e+20>>2],i[t+24>>2]=i[e+24>>2],i[t+28>>2]=i[e+28>>2],i[t+32>>2]=i[e+32>>2],i[t+36>>2]=i[e+36>>2],i[t+40>>2]=i[e+40>>2],i[t+44>>2]=i[e+44>>2],i[t+48>>2]=i[e+48>>2],i[t+52>>2]=i[e+52>>2],i[t+56>>2]=i[e+56>>2],i[t+60>>2]=i[e+60>>2],t=t+64|0,e=e+64|0;for(;(0|t)<(0|n);)i[t>>2]=i[e>>2],t=t+4|0,e=e+4|0}else for(n=o-4|0;(0|t)<(0|n);)r[t>>0]=0|r[e>>0],r[t+1>>0]=0|r[e+1>>0],r[t+2>>0]=0|r[e+2>>0],r[t+3>>0]=0|r[e+3>>0],t=t+4|0,e=e+4|0;for(;(0|t)<(0|o);)r[t>>0]=0|r[e>>0],t=t+1|0,e=e+1|0;return 0|a}function Te(t,e,n){e|=0;var o,a=0,s=0,u=0;if(o=(t|=0)+(n|=0)|0,e&=255,(0|n)>=67){for(;3&t;)r[t>>0]=e,t=t+1|0;for(u=e|e<<8|e<<16|e<<24,s=(a=-4&o|0)-64|0;(0|t)<=(0|s);)i[t>>2]=u,i[t+4>>2]=u,i[t+8>>2]=u,i[t+12>>2]=u,i[t+16>>2]=u,i[t+20>>2]=u,i[t+24>>2]=u,i[t+28>>2]=u,i[t+32>>2]=u,i[t+36>>2]=u,i[t+40>>2]=u,i[t+44>>2]=u,i[t+48>>2]=u,i[t+52>>2]=u,i[t+56>>2]=u,i[t+60>>2]=u,t=t+64|0;for(;(0|t)<(0|a);)i[t>>2]=u,t=t+4|0}for(;(0|t)<(0|o);)r[t>>0]=e,t=t+1|0;return o-n|0}function ke(t){return(t=+t)>=0?+s(t+.5):+v(t-.5)}function Ie(t){t|=0;var e,n,r;return r=0|S(),(0|t)>0&(0|(e=(n=0|i[a>>2])+t|0))<(0|n)|(0|e)<0?(T(0|e),O(12),-1):(0|e)>(0|r)&&!(0|C(0|e))?(O(12),-1):(i[a>>2]=e,0|n)}return{___uremdi3:xe,_bitshift64Lshr:Ee,_bitshift64Shl:Oe,_calloc:be,_cellAreaKm2:function(t,e){var n,r,o,a=0;if(o=k,k=k+192|0,r=o,qt(t|=0,e|=0,n=o+168|0),Ht(t,e,r),(0|(e=0|i[r>>2]))>0){if(a=+Tt(r+8|0,r+8+((1!=(0|e)&1)<<4)|0,n)+0,1!=(0|e)){t=1;do{a+=+Tt(r+8+(t<<4)|0,r+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,n)}while((0|t)<(0|e))}}else a=0;return k=o,6371.007180918475*a*6371.007180918475},_cellAreaM2:function(t,e){var n,r,o,a=0;if(o=k,k=k+192|0,r=o,qt(t|=0,e|=0,n=o+168|0),Ht(t,e,r),(0|(e=0|i[r>>2]))>0){if(a=+Tt(r+8|0,r+8+((1!=(0|e)&1)<<4)|0,n)+0,1!=(0|e)){t=1;do{a+=+Tt(r+8+(t<<4)|0,r+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,n)}while((0|t)<(0|e))}}else a=0;return k=o,6371.007180918475*a*6371.007180918475*1e3*1e3},_cellAreaRads2:function(t,e){var n,r,o,a=0;if(o=k,k=k+192|0,r=o,qt(t|=0,e|=0,n=o+168|0),Ht(t,e,r),(0|(e=0|i[r>>2]))<=0)return k=o,+(a=0);if(a=+Tt(r+8|0,r+8+((1!=(0|e)&1)<<4)|0,n)+0,1==(0|e))return k=o,+a;t=1;do{a+=+Tt(r+8+(t<<4)|0,r+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,n)}while((0|t)<(0|e));return k=o,+a},_compact:function(t,e,n){e|=0;var r,o=0,a=0,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0,A=0,w=0,E=0,O=0,S=0;if(!(n|=0))return 0|(O=0);if(o=0|i[(a=t|=0)>>2],!0&0==(15728640&(a=0|i[a+4>>2])|0)){if((0|n)<=0)return 0|(O=0);if(i[(O=e)>>2]=o,i[O+4>>2]=a,1==(0|n))return 0|(O=0);o=1;do{E=0|i[(w=t+(o<<3)|0)+4>>2],i[(O=e+(o<<3)|0)>>2]=i[w>>2],i[O+4>>2]=E,o=o+1|0}while((0|o)!=(0|n));return 0|(o=0)}if(!(E=0|ye(w=n<<3)))return 0|(O=-3);if(Ce(0|E,0|t,0|w),!(r=0|be(n,8)))return ve(E),0|(O=-3);o=n;t:for(;;){_=0|Ee(0|(h=0|i[(u=E)>>2]),0|(u=0|i[u+4>>2]),52),x(),A=(_&=15)+-1|0,b=(0|o)>0;e:do{if(b){if(v=((0|o)<0)<<31>>31,g=0|Oe(0|A,0,52),y=0|x(),A>>>0>15)for(a=0,t=h,n=u;;){if(!(0==(0|t)&0==(0|n))){if(s=0|Ee(0|t,0|n,52),x(),l=(0|(s&=15))<(0|A),s=(0|s)==(0|A),n=0|xe(0|(f=l?0:s?t:0),0|(t=l?0:s?n:0),0|o,0|v),x(),0==(0|(c=0|i[(l=s=r+(n<<3)|0)>>2]))&0==(0|(l=0|i[l+4>>2])))n=f;else for(g=0,m=n,d=l,n=f;;){if((0|g)>(0|o)){O=41;break t}if((0|c)==(0|n)&(-117440513&d|0)==(0|t)){f=0|Ee(0|c,0|d,56),x(),p=(f&=7)+1|0,y=0|Ee(0|c,0|d,45),x();n:do{if(0|N(127&y)){if(c=0|Ee(0|c,0|d,52),x(),!(c&=15)){l=6;break}for(l=1;;){if(!(0==((y=0|Oe(7,0,3*(15-l|0)|0))&n|0)&0==((0|x())&t|0))){l=7;break n}if(!(l>>>0<c>>>0)){l=6;break}l=l+1|0}}else l=7}while(0);if((f+2|0)>>>0>l>>>0){O=51;break t}y=0|Oe(0|p,0,56),t=0|x()|-117440513&t,i[(l=s)>>2]=0,i[l+4>>2]=0,l=m,n|=y}else l=(m+1|0)%(0|o)|0;if(0==(0|(c=0|i[(d=s=r+(l<<3)|0)>>2]))&0==(0|(d=0|i[d+4>>2])))break;g=g+1|0,m=l}i[(y=s)>>2]=n,i[y+4>>2]=t}if((0|(a=a+1|0))>=(0|o))break e;t=0|i[(n=E+(a<<3)|0)>>2],n=0|i[n+4>>2]}for(a=0,t=h,n=u;;){if(!(0==(0|t)&0==(0|n))){if(l=0|Ee(0|t,0|n,52),x(),(0|(l&=15))>=(0|A)){if((0|l)!=(0|A)&&(t|=g,n=-15728641&n|y,l>>>0>=_>>>0)){s=A;do{m=0|Oe(7,0,3*(14-s|0)|0),s=s+1|0,t|=m,n=0|x()|n}while(s>>>0<l>>>0)}}else t=0,n=0;if(l=0|xe(0|t,0|n,0|o,0|v),x(),!(0==(0|(f=0|i[(c=s=r+(l<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2]))))for(m=0;;){if((0|m)>(0|o)){O=41;break t}if((0|f)==(0|t)&(-117440513&c|0)==(0|n)){p=0|Ee(0|f,0|c,56),x(),d=(p&=7)+1|0,S=0|Ee(0|f,0|c,45),x();n:do{if(0|N(127&S)){if(f=0|Ee(0|f,0|c,52),x(),!(f&=15)){c=6;break}for(c=1;;){if(!(0==((S=0|Oe(7,0,3*(15-c|0)|0))&t|0)&0==((0|x())&n|0))){c=7;break n}if(!(c>>>0<f>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((p+2|0)>>>0>c>>>0){O=51;break t}S=0|Oe(0|d,0,56),n=0|x()|-117440513&n,i[(d=s)>>2]=0,i[d+4>>2]=0,t|=S}else l=(l+1|0)%(0|o)|0;if(0==(0|(f=0|i[(c=s=r+(l<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2])))break;m=m+1|0}i[(S=s)>>2]=t,i[S+4>>2]=n}if((0|(a=a+1|0))>=(0|o))break e;t=0|i[(n=E+(a<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((o+5|0)>>>0<11){O=99;break}if(!(y=0|be((0|o)/6|0,8))){O=58;break}e:do{if(b){m=0,d=0;do{if(!(0==(0|(a=0|i[(t=l=r+(m<<3)|0)>>2]))&0==(0|(t=0|i[t+4>>2])))){c=0|Ee(0|a,0|t,56),x(),n=(c&=7)+1|0,f=-117440513&t,S=0|Ee(0|a,0|t,45),x();n:do{if(0|N(127&S)){if(p=0|Ee(0|a,0|t,52),x(),0|(p&=15))for(s=1;;){if(!(0==(a&(S=0|Oe(7,0,3*(15-s|0)|0))|0)&0==(f&(0|x())|0)))break n;if(!(s>>>0<p>>>0))break;s=s+1|0}a|=t=0|Oe(0|n,0,56),t=0|x()|f,i[(n=l)>>2]=a,i[n+4>>2]=t,n=c+2|0}}while(0);7==(0|n)&&(i[(S=y+(d<<3)|0)>>2]=a,i[S+4>>2]=-117440513&t,d=d+1|0)}m=m+1|0}while((0|m)!=(0|o));if(b){if(g=((0|o)<0)<<31>>31,p=0|Oe(0|A,0,52),m=0|x(),A>>>0>15)for(t=0,a=0;;){do{if(!(0==(0|h)&0==(0|u))){for(c=0|Ee(0|h,0|u,52),x(),s=(0|(c&=15))<(0|A),c=(0|c)==(0|A),s=0|xe(0|(l=s?0:c?h:0),0|(c=s?0:c?u:0),0|o,0|g),x(),n=0;;){if((0|n)>(0|o)){O=98;break t}if((-117440513&(f=0|i[(S=r+(s<<3)|0)+4>>2])|0)==(0|c)&&(0|i[S>>2])==(0|l)){O=70;break}if((0|i[(S=r+((s=(s+1|0)%(0|o)|0)<<3)|0)>>2])==(0|l)&&(0|i[S+4>>2])==(0|c))break;n=n+1|0}if(70==(0|O)&&(O=0,!0&100663296==(117440512&f|0)))break;i[(S=e+(a<<3)|0)>>2]=h,i[S+4>>2]=u,a=a+1|0}}while(0);if((0|(t=t+1|0))>=(0|o)){o=d;break e}h=0|i[(u=E+(t<<3)|0)>>2],u=0|i[u+4>>2]}for(t=0,a=0;;){do{if(!(0==(0|h)&0==(0|u))){if(c=0|Ee(0|h,0|u,52),x(),(0|(c&=15))>=(0|A))if((0|c)!=(0|A))if(n=h|p,s=-15728641&u|m,c>>>0<_>>>0)c=s;else{l=A;do{S=0|Oe(7,0,3*(14-l|0)|0),l=l+1|0,n|=S,s=0|x()|s}while(l>>>0<c>>>0);c=s}else n=h,c=u;else n=0,c=0;for(l=0|xe(0|n,0|c,0|o,0|g),x(),s=0;;){if((0|s)>(0|o)){O=98;break t}if((-117440513&(f=0|i[(S=r+(l<<3)|0)+4>>2])|0)==(0|c)&&(0|i[S>>2])==(0|n)){O=93;break}if((0|i[(S=r+((l=(l+1|0)%(0|o)|0)<<3)|0)>>2])==(0|n)&&(0|i[S+4>>2])==(0|c))break;s=s+1|0}if(93==(0|O)&&(O=0,!0&100663296==(117440512&f|0)))break;i[(S=e+(a<<3)|0)>>2]=h,i[S+4>>2]=u,a=a+1|0}}while(0);if((0|(t=t+1|0))>=(0|o)){o=d;break e}h=0|i[(u=E+(t<<3)|0)>>2],u=0|i[u+4>>2]}}else a=0,o=d}else a=0,o=0}while(0);if(Te(0|r,0,0|w),Ce(0|E,0|y,o<<3|0),ve(y),!o)break;e=e+(a<<3)|0}return 41==(0|O)?(ve(E),ve(r),0|(S=-1)):51==(0|O)?(ve(E),ve(r),0|(S=-2)):58==(0|O)?(ve(E),ve(r),0|(S=-3)):98==(0|O)?(ve(y),ve(E),ve(r),0|(S=-1)):(99==(0|O)&&Ce(0|e,0|E,o<<3|0),ve(E),ve(r),0|(S=0))},_destroyLinkedPolygon:function(t){var e=0,n=0,r=0,o=0;if(t|=0)for(r=1;;){if(0|(e=0|i[t>>2]))do{if(0|(n=0|i[e>>2]))do{o=n,n=0|i[n+16>>2],ve(o)}while(0!=(0|n));o=e,e=0|i[e+8>>2],ve(o)}while(0!=(0|e));if(e=t,t=0|i[t+8>>2],r||ve(e),!t)break;r=0}},_edgeLengthKm:function(t){return+ +o[20752+((t|=0)<<3)>>3]},_edgeLengthM:function(t){return+ +o[20880+((t|=0)<<3)>>3]},_emscripten_replace_memory:function(t){return r=new Int8Array(t),new Uint8Array(t),i=new Int32Array(t),new Float32Array(t),o=new Float64Array(t),n=t,!0},_exactEdgeLengthKm:function(t,e){var n,r,a=0,s=0,u=0,c=0,p=0,d=0;if(r=k,k=k+176|0,Yt(t|=0,e|=0,n=r),(0|(t=0|i[n>>2]))<=1)return k=r,+(u=0);e=t+-1|0,t=0,a=0,s=+o[n+8>>3],u=+o[n+16>>3];do{p=s,s=+o[n+8+((t=t+1|0)<<4)>>3],d=+h(.5*(s-p)),c=u,u=+o[n+8+(t<<4)+8>>3],c=d*d+(c=+h(.5*(u-c)))*(+f(+p)*+f(+s)*c),a+=2*+y(+ +l(+c),+ +l(+(1-c)))}while((0|t)!=(0|e));return k=r,+(d=6371.007180918475*a)},_exactEdgeLengthM:function(t,e){var n,r,a=0,s=0,u=0,c=0,p=0,d=0;if(r=k,k=k+176|0,Yt(t|=0,e|=0,n=r),(0|(t=0|i[n>>2]))<=1)return k=r,+(u=0);e=t+-1|0,t=0,a=0,s=+o[n+8>>3],u=+o[n+16>>3];do{p=s,s=+o[n+8+((t=t+1|0)<<4)>>3],d=+h(.5*(s-p)),c=u,u=+o[n+8+(t<<4)+8>>3],c=d*d+(c=+h(.5*(u-c)))*(+f(+p)*+f(+s)*c),a+=2*+y(+ +l(+c),+ +l(+(1-c)))}while((0|t)!=(0|e));return k=r,+(d=6371.007180918475*a*1e3)},_exactEdgeLengthRads:function(t,e){var n,r,a=0,s=0,u=0,c=0,p=0,d=0;if(r=k,k=k+176|0,Yt(t|=0,e|=0,n=r),(0|(t=0|i[n>>2]))<=1)return k=r,+(u=0);e=t+-1|0,t=0,a=0,s=+o[n+8>>3],u=+o[n+16>>3];do{p=s,s=+o[n+8+((t=t+1|0)<<4)>>3],d=+h(.5*(s-p)),c=u,u=+o[n+8+(t<<4)+8>>3],c=d*d+(c=+h(.5*(u-c)))*(+f(+s)*+f(+p)*c),a+=2*+y(+ +l(+c),+ +l(+(1-c)))}while((0|t)<(0|e));return k=r,+a},_experimentalH3ToLocalIj:function(t,e,n,r,i){var o,a;return i|=0,a=k,k=k+16|0,(t=0|Qt(t|=0,e|=0,n|=0,r|=0,o=a))||(pt(o,i),t=0),k=a,0|t},_experimentalLocalIjToH3:function(t,e,n,r){var i,o;return t|=0,e|=0,r|=0,i=k,k=k+16|0,dt(n|=0,o=i),r=0|te(t,e,o,r),k=i,0|r},_free:ve,_geoToH3:Ut,_getDestinationH3IndexFromUnidirectionalEdge:function(t,e){t|=0;var n,r,o=0;return n=k,k=k+16|0,o=n,!0&268435456==(2013265920&(e|=0)|0)?(r=0|Ee(0|t,0|e,56),x(),i[o>>2]=0,o=0|M(t,-2130706433&e|134217728,7&r,o),e=0|x(),w(0|e),k=n,0|o):(o=0,w(0|(e=0)),k=n,0|o)},_getH3IndexesFromUnidirectionalEdge:function(t,e,n){t|=0;var r,o,a,s,u=0;a=k,k=k+16|0,r=a,s=!0&268435456==(2013265920&(e|=0)|0),o=-2130706433&e|134217728,i[(u=n|=0)>>2]=s?t:0,i[u+4>>2]=s?o:0,s?(e=0|Ee(0|t,0|e,56),x(),i[r>>2]=0,t=0|M(t,o,7&e,r),e=0|x()):(t=0,e=0),i[(u=n+8|0)>>2]=t,i[u+4>>2]=e,k=a},_getH3UnidirectionalEdge:function(t,e,n,r){var o,a,s=0,u=0,l=0,c=0,f=0;if(a=k,k=k+16|0,o=a,!(0|Xt(t|=0,e|=0,n|=0,r|=0)))return c=0,w(0|(l=0)),k=a,0|c;for(l=-2130706433&e,s=(s=0==(0|Mt(t,e)))?1:2;i[o>>2]=0,u=s+1|0,!((0|(f=0|M(t,e,s,o)))==(0|n)&(0|x())==(0|r));){if(!(u>>>0<7)){s=0,t=0,c=6;break}s=u}return 6==(0|c)?(w(0|s),k=a,0|t):(f=0|Oe(0|s,0,56),c=0|l|x()|268435456,f|=t,w(0|c),k=a,0|f)},_getH3UnidirectionalEdgeBoundary:Yt,_getH3UnidirectionalEdgesFromHexagon:function(t,e,n){n|=0;var r,o=0;r=0==(0|Mt(t|=0,e|=0)),e&=-2130706433,i[(o=n)>>2]=r?t:0,i[o+4>>2]=r?285212672|e:0,i[(o=n+8|0)>>2]=t,i[o+4>>2]=301989888|e,i[(o=n+16|0)>>2]=t,i[o+4>>2]=318767104|e,i[(o=n+24|0)>>2]=t,i[o+4>>2]=335544320|e,i[(o=n+32|0)>>2]=t,i[o+4>>2]=352321536|e,i[(n=n+40|0)>>2]=t,i[n+4>>2]=369098752|e},_getOriginH3IndexFromUnidirectionalEdge:function(t,e){var n;return t|=0,w(0|((n=!0&268435456==(2013265920&(e|=0)|0))?-2130706433&e|134217728:0)),0|(n?t:0)},_getPentagonIndexes:Wt,_getRes0Indexes:function(t){t|=0;var e=0,n=0,r=0;e=0;do{Oe(0|e,0,45),r=134225919|x(),i[(n=t+(e<<3)|0)>>2]=-1,i[n+4>>2]=r,e=e+1|0}while(122!=(0|e))},_h3Distance:function(t,e,n,r){var i,o,a;return n|=0,r|=0,a=k,k=k+32|0,o=a,t=0==(0|Qt(t|=0,e|=0,t,e,i=a+12|0))&&0==(0|Qt(t,e,n,r,o))?0|ht(i,o):-1,k=a,0|t},_h3GetBaseCell:kt,_h3GetFaces:function t(e,n,r){r|=0;var o,a=0,s=0,u=0,l=0,c=0,f=0,h=0,p=0;o=k,k=k+128|0,h=o+112|0,u=o+96|0,p=o,s=0|Ee(0|(e|=0),0|(n|=0),52),x(),c=15&s,i[h>>2]=c,l=0|Ee(0|e,0|n,45),x(),l&=127;t:do{if(0|N(l)){if(0|c)for(a=1;;){if(!(0==((f=0|Oe(7,0,3*(15-a|0)|0))&e|0)&0==((0|x())&n|0))){s=0;break t}if(!(a>>>0<c>>>0))break;a=a+1|0}if(!(1&s))return f=0|Oe(c+1|0,0,52),p=0|x()|-15728641&n,t((f|e)&~(h=0|Oe(7,0,3*(14-c|0)|0)),p&~(0|x()),r),void(k=o);s=1}else s=0}while(0);Vt(e,n,u),s?(At(u,h,p),f=5):(Ot(u,h,p),f=6);t:do{if(0|N(l))if(c)for(a=1;;){if(!(0==((l=0|Oe(7,0,3*(15-a|0)|0))&e|0)&0==((0|x())&n|0))){a=8;break t}if(!(a>>>0<c>>>0)){a=20;break}a=a+1|0}else a=20;else a=8}while(0);if(Te(0|r,-1,0|a),s){s=0;do{for(xt(u=p+(s<<4)|0,0|i[h>>2]),u=0|i[u>>2],a=0;!(-1==(0|(c=0|i[(l=r+(a<<2)|0)>>2]))|(0|c)==(0|u));)a=a+1|0;i[l>>2]=u,s=s+1|0}while((0|s)!=(0|f))}else{s=0;do{for(wt(u=p+(s<<4)|0,0|i[h>>2],0,1),u=0|i[u>>2],a=0;!(-1==(0|(c=0|i[(l=r+(a<<2)|0)>>2]))|(0|c)==(0|u));)a=a+1|0;i[l>>2]=u,s=s+1|0}while((0|s)!=(0|f))}k=o},_h3GetResolution:function(t,e){return e=0|Ee(0|(t|=0),0|(e|=0),52),x(),15&e|0},_h3IndexesAreNeighbors:Xt,_h3IsPentagon:Mt,_h3IsResClassIII:function(t,e){return e=0|Ee(0|(t|=0),0|(e|=0),52),x(),1&e|0},_h3IsValid:It,_h3Line:function(t,e,n,r,o){n|=0,r|=0,o|=0;var a,s=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0,A=0,w=0,x=0,E=0;if(a=k,k=k+48|0,l=a+12|0,x=a,0==(0|Qt(t|=0,e|=0,t,e,s=a+24|0))&&0==(0|Qt(t,e,n,r,l))){if((0|(w=0|ht(s,l)))<0)return k=a,0|(x=w);for(i[s>>2]=0,i[s+4>>2]=0,i[s+8>>2]=0,i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,Qt(t,e,t,e,s),Qt(t,e,n,r,l),mt(s),mt(l),w?(g=+(0|w),A=s,n=p=0|i[s>>2],r=d=0|i[(b=s+4|0)>>2],s=m=0|i[(_=s+8|0)>>2],y=+((0|i[l>>2])-p|0)/g,v=+((0|i[l+4>>2])-d|0)/g,g=+((0|i[l+8>>2])-m|0)/g):(b=r=s+4|0,_=m=s+8|0,A=s,n=0|i[s>>2],r=0|i[r>>2],s=0|i[m>>2],y=0,v=0,g=0),i[x>>2]=n,i[(m=x+4|0)>>2]=r,i[(d=x+8|0)>>2]=s,p=0;;){E=y*(f=+(0|p))+ +(0|n),c=v*f+ +(0|i[b>>2]),f=g*f+ +(0|i[_>>2]),r=~~+Pe(+E),l=~~+Pe(+c),n=~~+Pe(+f),E=+u(+(+(0|r)-E)),c=+u(+(+(0|l)-c)),f=+u(+(+(0|n)-f));do{if(!(E>c&E>f)){if(h=0-r|0,c>f){s=h-n|0;break}s=l,n=h-l|0;break}r=0-(l+n)|0,s=l}while(0);if(i[x>>2]=r,i[m>>2]=s,i[d>>2]=n,gt(x),te(t,e,x,o+(p<<3)|0),(0|p)==(0|w))break;p=p+1|0,n=0|i[A>>2]}return k=a,0|(x=0)}return k=a,0|(x=-1)},_h3LineSize:function(t,e,n,r){var i,o,a;return n|=0,r|=0,a=k,k=k+32|0,o=a,t=0==(0|Qt(t|=0,e|=0,t,e,i=a+12|0))&&0==(0|Qt(t,e,n,r,o))?0|ht(i,o):-1,k=a,(t>>>31^1)+t|0},_h3SetToLinkedGeo:function(t,e,n){n|=0;var r,o,a,s=0;if(a=k,k=k+32|0,r=a,function(t,e,n){t|=0,n|=0;var r,o,a=0,s=0,u=0,l=0,c=0;if(o=k,k=k+176|0,r=o,(0|(e|=0))<1)return le(n,0,0),void(k=o);l=0|Ee(0|i[(l=t)>>2],0|i[l+4>>2],52),x(),le(n,(0|e)>6?e:6,15&l),l=0;do{if(Ht(0|i[(a=t+(l<<3)|0)>>2],0|i[a+4>>2],r),(0|(a=0|i[r>>2]))>0){c=0;do{u=r+8+(c<<4)|0,(s=0|de(n,a=r+8+(((0|(c=c+1|0))%(0|a)|0)<<4)|0,u))?he(n,s):pe(n,u,a),a=0|i[r>>2]}while((0|c)<(0|a))}l=l+1|0}while((0|l)!=(0|e));k=o}(t|=0,e|=0,o=a+16|0),i[n>>2]=0,i[n+4>>2]=0,i[n+8>>2]=0,!(t=0|fe(o)))return $t(n),ce(o),void(k=a);do{e=0|Zt(n);do{Kt(e,t),s=t+16|0,i[r>>2]=i[s>>2],i[r+4>>2]=i[s+4>>2],i[r+8>>2]=i[s+8>>2],i[r+12>>2]=i[s+12>>2],he(o,t),t=0|me(o,r)}while(0!=(0|t));t=0|fe(o)}while(0!=(0|t));$t(n),ce(o),k=a},_h3ToCenterChild:function(t,e,n){n|=0;var r=0,i=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),x(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(t|=i=0|Oe(0|n,0,52),e=0|x()|-15728641&e,(0|r)<(0|n)))do{i=0|Oe(7,0,3*(14-r|0)|0),r=r+1|0,t&=~i,e&=~(0|x())}while((0|r)<(0|n))}else e=0,t=0;return w(0|e),0|t},_h3ToChildren:jt,_h3ToGeo:qt,_h3ToGeoBoundary:Ht,_h3ToParent:Lt,_h3UnidirectionalEdgeIsValid:function(t,e){var n=0;if(!(!0&268435456==(2013265920&(e|=0)|0)))return 0|(n=0);switch(n=0|Ee(0|(t|=0),0|e,56),x(),7&n){case 0:case 7:return 0|(n=0)}return!0&16777216==(117440512&e|0)&0!=(0|Mt(t,n=-2130706433&e|134217728))?0|(n=0):0|(n=0|It(t,n))},_hexAreaKm2:function(t){return+ +o[20496+((t|=0)<<3)>>3]},_hexAreaM2:function(t){return+ +o[20624+((t|=0)<<3)>>3]},_hexRing:function(t,e,n,r){t|=0,e|=0,r|=0;var o,a=0,s=0,u=0,l=0,c=0,f=0,h=0;if(o=k,k=k+16|0,h=o,!(n|=0))return i[(h=r)>>2]=t,i[h+4>>2]=e,k=o,0|(h=0);i[h>>2]=0;t:do{if(0|Mt(t,e))t=1;else{if(s=(0|n)>0){a=0,f=t;do{if(0==(0|(f=0|M(f,e,4,h)))&0==(0|(e=0|x()))){t=2;break t}if(a=a+1|0,0|Mt(f,e)){t=1;break t}}while((0|a)<(0|n));if(i[(c=r)>>2]=f,i[c+4>>2]=e,c=n+-1|0,s){s=0,u=1,a=f,t=e;do{if(0==(0|(a=0|M(a,t,2,h)))&0==(0|(t=0|x()))){t=2;break t}if(i[(l=r+(u<<3)|0)>>2]=a,i[l+4>>2]=t,u=u+1|0,0|Mt(a,t)){t=1;break t}s=s+1|0}while((0|s)<(0|n));l=0,s=u;do{if(0==(0|(a=0|M(a,t,3,h)))&0==(0|(t=0|x()))){t=2;break t}if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=t,s=s+1|0,0|Mt(a,t)){t=1;break t}l=l+1|0}while((0|l)<(0|n));u=0;do{if(0==(0|(a=0|M(a,t,1,h)))&0==(0|(t=0|x()))){t=2;break t}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=t,s=s+1|0,0|Mt(a,t)){t=1;break t}u=u+1|0}while((0|u)<(0|n));u=0;do{if(0==(0|(a=0|M(a,t,5,h)))&0==(0|(t=0|x()))){t=2;break t}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=t,s=s+1|0,0|Mt(a,t)){t=1;break t}u=u+1|0}while((0|u)<(0|n));u=0;do{if(0==(0|(a=0|M(a,t,4,h)))&0==(0|(t=0|x()))){t=2;break t}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=t,s=s+1|0,0|Mt(a,t)){t=1;break t}u=u+1|0}while((0|u)<(0|n));for(u=0;;){if(0==(0|(a=0|M(a,t,6,h)))&0==(0|(t=0|x()))){t=2;break t}if((0|u)!=(0|c)){if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=t,0|Mt(a,t)){t=1;break t}s=s+1|0}if((0|(u=u+1|0))>=(0|n)){u=f,s=e;break}}}else u=f,a=f,s=e,t=e}else i[(u=r)>>2]=t,i[u+4>>2]=e,u=t,a=t,s=e,t=e;t=1&((0|u)!=(0|a)|(0|s)!=(0|t))}}while(0);return k=o,0|(h=t)},_i64Subtract:_e,_kRing:I,_kRingDistances:function(t,e,n,r,i){var o;if(0|L(t|=0,e|=0,n|=0,r|=0,i|=0)){if(Te(0|r,0,(o=1+(0|b(3*n|0,n+1|0))|0)<<3|0),0|i)return Te(0|i,0,o<<2|0),void j(t,e,n,r,i,o,0);(i=0|be(o,4))&&(j(t,e,n,r,i,o,0),ve(i))}},_llvm_minnum_f64:Se,_llvm_round_f64:Pe,_malloc:ye,_maxFaceCount:function(t,e){var n=0,r=0;if(r=0|Ee(0|(t|=0),0|(e|=0),45),x(),!(0|N(127&r)))return 0|(r=2);if(r=0|Ee(0|t,0|e,52),x(),!(r&=15))return 0|(r=5);for(n=1;;){if(!(0==((0|Oe(7,0,3*(15-n|0)|0))&t|0)&0==((0|x())&e|0))){n=2,t=6;break}if(!(n>>>0<r>>>0)){n=5,t=6;break}n=n+1|0}return 6==(0|t)?0|n:0},_maxH3ToChildrenSize:function(t,e,n){return n|=0,t=0|Ee(0|(t|=0),0|(e|=0),52),x(),(0|n)<16&(0|(t&=15))<=(0|n)?0|(n=0|ee(7,n-t|0)):0|(n=0)},_maxKringSize:function(t){return 1+(0|b(3*(t|=0)|0,t+1|0))|0},_maxPolyfillSize:function(t,e){e|=0;var n,r=0,o=0,a=0,s=0,u=0;if(n=k,k=k+48|0,a=n+8|0,o=n,s=0|i[(u=t|=0)+4>>2],i[(r=o)>>2]=i[u>>2],i[r+4>>2]=s,re(o,a),a=0|H(a,e),e=0|i[o>>2],(0|(o=0|i[t+8>>2]))<=0)return k=n,0|(u=(u=(s=(0|a)<(0|(u=e)))?u:a)+12|0);r=0|i[t+12>>2],t=0;do{e=(0|i[r+(t<<3)>>2])+e|0,t=t+1|0}while((0|t)<(0|o));return k=n,0|(u=(u=(u=(0|a)<(0|e))?e:a)+12|0)},_maxUncompactSize:function(t,e,n){t|=0,n|=0;var r=0,o=0,a=0,s=0;if((0|(e|=0))<=0)return 0|(n=0);if((0|n)>=16){for(r=0;;){if(!(0==(0|i[(s=t+(r<<3)|0)>>2])&0==(0|i[s+4>>2]))){r=-1,o=13;break}if((0|(r=r+1|0))>=(0|e)){r=0,o=13;break}}if(13==(0|o))return 0|r}r=0,s=0;t:for(;;){a=0|i[(o=t+(s<<3)|0)>>2],o=0|i[o+4>>2];do{if(!(0==(0|a)&0==(0|o))){if(o=0|Ee(0|a,0|o,52),x(),(0|(o&=15))>(0|n)){r=-1,o=13;break t}if((0|o)==(0|n)){r=r+1|0;break}r=(0|ee(7,n-o|0))+r|0;break}}while(0);if((0|(s=s+1|0))>=(0|e)){o=13;break}}return 13==(0|o)?0|r:0},_memcpy:Ce,_memset:Te,_numHexagons:function(t){var e;return t=0|i[(e=21008+((t|=0)<<3)|0)>>2],w(0|i[e+4>>2]),0|t},_pentagonIndexCount:function(){return 12},_pointDistKm:Ct,_pointDistM:function(t,e){t|=0;var n,r,i,a=0;return r=+o[(e|=0)>>3],n=+o[t>>3],a=(i=+h(.5*(r-n)))*i+(a=+h(.5*(+o[e+8>>3]-+o[t+8>>3])))*(+f(+r)*+f(+n)*a),2*+y(+ +l(+a),+ +l(+(1-a)))*6371.007180918475*1e3},_pointDistRads:function(t,e){t|=0;var n,r,i,a=0;return r=+o[(e|=0)>>3],n=+o[t>>3],a=(i=+h(.5*(r-n)))*i+(a=+h(.5*(+o[e+8>>3]-+o[t+8>>3])))*(+f(+r)*+f(+n)*a),2*+y(+ +l(+a),+ +l(+(1-a)))},_polyfill:function(t,e,n){var r,o=0,a=0,s=0,u=0,l=0;if(r=k,k=k+48|0,o=r+8|0,a=r,0|function(t,e,n){e|=0,n|=0;var r=0,o=0,a=0,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,v=0,b=0,_=0,A=0,w=0,O=0,S=0,P=0,C=0,T=0,I=0,M=0,N=0,D=0,F=0,B=0;B=k,k=k+112|0,M=B+80|0,l=B+72|0,N=B,D=B+56|0,(F=0|ye(32+(i[(c=(t=t|0)+8|0)>>2]<<5)|0))||E(22848,22448,800,22456);if(ie(t,F),r=0|i[(a=t)+4>>2],i[(u=l)>>2]=i[a>>2],i[u+4>>2]=r,re(l,M),u=0|H(M,e),r=0|i[l>>2],(0|(a=0|i[c>>2]))>0){s=0|i[t+12>>2],o=0;do{r=(0|i[s+(o<<3)>>2])+r|0,o=o+1|0}while((0|o)!=(0|a))}if(o=0|be(I=(u=(0|u)<(0|r)?r:u)+12|0,8),f=0|be(I,8),i[M>>2]=0,T=0|i[(C=t)+4>>2],i[(r=l)>>2]=i[C>>2],i[r+4>>2]=T,0|(r=0|R(l,I,e,M,o,f)))return ve(o),ve(f),ve(F),k=B,0|(F=r);t:do{if((0|i[c>>2])>0){for(a=t+12|0,r=0;s=0|R((0|i[a>>2])+(r<<3)|0,I,e,M,o,f),r=r+1|0,!(0|s);)if((0|r)>=(0|i[c>>2]))break t;return ve(o),ve(f),ve(F),k=B,0|(F=s)}}while(0);(0|u)>-12&&Te(0|f,0,((0|I)>1?I:1)<<3|0);t:do{if((0|i[M>>2])>0){T=((0|I)<0)<<31>>31,A=o,w=f,O=o,S=o,P=f,C=o,r=o,y=o,v=f,b=f,_=f,o=f;e:for(;;){for(g=0|i[M>>2],d=0,m=0,a=0;;){u=(s=N)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|u));if(0|L(l=0|i[(e=A+(d<<3)|0)>>2],e=0|i[e+4>>2],1,N,0)){u=(s=N)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|u));0|(s=0|be(7,4))&&(j(l,e,1,N,s,7,0),ve(s))}p=0;do{f=0|i[(h=N+(p<<3)|0)>>2],h=0|i[h+4>>2];n:do{if(!(0==(0|f)&0==(0|h))){if(l=0|xe(0|f,0|h,0|I,0|T),x(),!(0==(0|(e=0|i[(u=s=n+(l<<3)|0)>>2]))&0==(0|(u=0|i[u+4>>2]))))for(c=0;;){if((0|c)>(0|I))break e;if((0|e)==(0|f)&(0|u)==(0|h))break n;if(0==(0|(e=0|i[(u=s=n+((l=(l+1|0)%(0|I)|0)<<3)|0)>>2]))&0==(0|(u=0|i[u+4>>2])))break;c=c+1|0}0==(0|f)&0==(0|h)||(qt(f,h,D),0|oe(t,F,D)&&(i[(c=s)>>2]=f,i[c+4>>2]=h,i[(c=w+(a<<3)|0)>>2]=f,i[c+4>>2]=h,a=a+1|0))}}while(0);p=p+1|0}while(p>>>0<7);if((0|(m=m+1|0))>=(0|g))break;d=d+1|0}if((0|g)>0&&Te(0|O,0,g<<3|0),i[M>>2]=a,!((0|a)>0))break t;f=o,h=_,p=C,d=b,m=v,g=w,o=y,_=r,b=S,v=O,y=f,r=h,C=P,P=p,S=d,O=m,w=A,A=g}return ve(S),ve(P),ve(F),k=B,0|(F=-1)}r=f}while(0);return ve(F),ve(o),ve(r),k=B,0|(F=0)}(t|=0,e|=0,n|=0)){if(s=0|i[(l=t)+4>>2],i[(u=a)>>2]=i[l>>2],i[u+4>>2]=s,re(a,o),u=0|H(o,e),e=0|i[a>>2],(0|(s=0|i[t+8>>2]))>0){a=0|i[t+12>>2],o=0;do{e=(0|i[a+(o<<3)>>2])+e|0,o=o+1|0}while((0|o)!=(0|s))}(0|(e=(0|u)<(0|e)?e:u))<=-12||Te(0|n,0,8+(((0|(l=e+11|0))>0?l:0)<<3)|0),k=r}else k=r},_res0IndexCount:function(){return 122},_round:ke,_sbrk:Ie,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(t,e,n,r,o){t|=0,n|=0,r|=0,o|=0;var a=0,s=0,u=0,l=0,c=0,f=0;if((0|(e|=0))<=0)return 0|(o=0);if((0|o)>=16){for(a=0;;){if(!(0==(0|i[(f=t+(a<<3)|0)>>2])&0==(0|i[f+4>>2]))){a=14;break}if((0|(a=a+1|0))>=(0|e)){s=0,a=16;break}}if(14==(0|a))return 0|((0|r)>0?-2:-1);if(16==(0|a))return 0|s}a=0,f=0;t:for(;;){s=0|i[(u=c=t+(f<<3)|0)>>2],u=0|i[u+4>>2];do{if(!(0==(0|s)&0==(0|u))){if((0|a)>=(0|r)){s=-1,a=16;break t}if(l=0|Ee(0|s,0|u,52),x(),(0|(l&=15))>(0|o)){s=-2,a=16;break t}if((0|l)==(0|o)){i[(c=n+(a<<3)|0)>>2]=s,i[c+4>>2]=u,a=a+1|0;break}if((0|(s=(0|ee(7,o-l|0))+a|0))>(0|r)){s=-1,a=16;break t}jt(0|i[c>>2],0|i[c+4>>2],o,n+(a<<3)|0),a=s}}while(0);if((0|(f=f+1|0))>=(0|e)){s=0,a=16;break}}return 16==(0|a)?0|s:0},establishStackSpace:function(t,e){k=t|=0},stackAlloc:function(t){var e;return e=k,k=(k=k+(t|=0)|0)+15&-16,0|e},stackRestore:function(t){k=t|=0},stackSave:function(){return 0|k}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:ut,b:function(t){l=t},c:c,d:function(t,e,n,r){ut("Assertion failed: "+m(t)+", at: "+[e?m(e):"unknown filename",n,r?m(r):"unknown function"])},e:function(t){return n.___errno_location&&(_[n.___errno_location()>>2]=t),t},f:W,g:function(t,e,n){v.set(v.subarray(e,e+n),t)},h:function(t){var e=W(),n=16777216,r=2130706432;if(t>r)return!1;for(var i=Math.max(e,16777216);i<t;)i=i<=536870912?x(2*i,n):Math.min(x((3*i+2147483648)/4,n),r);return!!X(i)},i:function(t){ut("OOM")},j:V,k:q,l:X,m:H,n:function(){var t=H();return n.extraStackTrace&&(t+="\n"+n.extraStackTrace()),q(t)},o:24032,p:24016},g),Q=(n.___uremdi3=J.___uremdi3,n._bitshift64Lshr=J._bitshift64Lshr,n._bitshift64Shl=J._bitshift64Shl,n._calloc=J._calloc,n._cellAreaKm2=J._cellAreaKm2,n._cellAreaM2=J._cellAreaM2,n._cellAreaRads2=J._cellAreaRads2,n._compact=J._compact,n._destroyLinkedPolygon=J._destroyLinkedPolygon,n._edgeLengthKm=J._edgeLengthKm,n._edgeLengthM=J._edgeLengthM,n._emscripten_replace_memory=J._emscripten_replace_memory),tt=(n._exactEdgeLengthKm=J._exactEdgeLengthKm,n._exactEdgeLengthM=J._exactEdgeLengthM,n._exactEdgeLengthRads=J._exactEdgeLengthRads,n._experimentalH3ToLocalIj=J._experimentalH3ToLocalIj,n._experimentalLocalIjToH3=J._experimentalLocalIjToH3,n._free=J._free,n._geoToH3=J._geoToH3,n._getDestinationH3IndexFromUnidirectionalEdge=J._getDestinationH3IndexFromUnidirectionalEdge,n._getH3IndexesFromUnidirectionalEdge=J._getH3IndexesFromUnidirectionalEdge,n._getH3UnidirectionalEdge=J._getH3UnidirectionalEdge,n._getH3UnidirectionalEdgeBoundary=J._getH3UnidirectionalEdgeBoundary,n._getH3UnidirectionalEdgesFromHexagon=J._getH3UnidirectionalEdgesFromHexagon,n._getOriginH3IndexFromUnidirectionalEdge=J._getOriginH3IndexFromUnidirectionalEdge,n._getPentagonIndexes=J._getPentagonIndexes,n._getRes0Indexes=J._getRes0Indexes,n._h3Distance=J._h3Distance,n._h3GetBaseCell=J._h3GetBaseCell,n._h3GetFaces=J._h3GetFaces,n._h3GetResolution=J._h3GetResolution,n._h3IndexesAreNeighbors=J._h3IndexesAreNeighbors,n._h3IsPentagon=J._h3IsPentagon,n._h3IsResClassIII=J._h3IsResClassIII,n._h3IsValid=J._h3IsValid,n._h3Line=J._h3Line,n._h3LineSize=J._h3LineSize,n._h3SetToLinkedGeo=J._h3SetToLinkedGeo,n._h3ToCenterChild=J._h3ToCenterChild,n._h3ToChildren=J._h3ToChildren,n._h3ToGeo=J._h3ToGeo,n._h3ToGeoBoundary=J._h3ToGeoBoundary,n._h3ToParent=J._h3ToParent,n._h3UnidirectionalEdgeIsValid=J._h3UnidirectionalEdgeIsValid,n._hexAreaKm2=J._hexAreaKm2,n._hexAreaM2=J._hexAreaM2,n._hexRing=J._hexRing,n._i64Subtract=J._i64Subtract,n._kRing=J._kRing,n._kRingDistances=J._kRingDistances,n._llvm_minnum_f64=J._llvm_minnum_f64,n._llvm_round_f64=J._llvm_round_f64,n._malloc=J._malloc,n._maxFaceCount=J._maxFaceCount,n._maxH3ToChildrenSize=J._maxH3ToChildrenSize,n._maxKringSize=J._maxKringSize,n._maxPolyfillSize=J._maxPolyfillSize,n._maxUncompactSize=J._maxUncompactSize,n._memcpy=J._memcpy,n._memset=J._memset,n._numHexagons=J._numHexagons,n._pentagonIndexCount=J._pentagonIndexCount,n._pointDistKm=J._pointDistKm,n._pointDistM=J._pointDistM,n._pointDistRads=J._pointDistRads,n._polyfill=J._polyfill,n._res0IndexCount=J._res0IndexCount,n._round=J._round,n._sbrk=J._sbrk,n._sizeOfCoordIJ=J._sizeOfCoordIJ,n._sizeOfGeoBoundary=J._sizeOfGeoBoundary,n._sizeOfGeoCoord=J._sizeOfGeoCoord,n._sizeOfGeoPolygon=J._sizeOfGeoPolygon,n._sizeOfGeofence=J._sizeOfGeofence,n._sizeOfH3Index=J._sizeOfH3Index,n._sizeOfLinkedGeoPolygon=J._sizeOfLinkedGeoPolygon,n._uncompact=J._uncompact,n.establishStackSpace=J.establishStackSpace,n.stackAlloc=J.stackAlloc),et=n.stackRestore=J.stackRestore,nt=n.stackSave=J.stackSave;if(n.asm=J,n.cwrap=function(t,e,n,r){var i=(n=n||[]).every((function(t){return"number"===t}));return"string"!==e&&i&&!r?h(t):function(){return p(t,e,n,arguments)}},n.setValue=function(t,e,n,r){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":y[t>>0]=e;break;case"i16":b[t>>1]=e;break;case"i32":_[t>>2]=e;break;case"i64":B=[e>>>0,(F=e,+I(F)>=1?F>0?(0|M(+j(F/4294967296),4294967295))>>>0:~~+L((F-+(~~F>>>0))/4294967296)>>>0:0)],_[t>>2]=B[0],_[t+4>>2]=B[1];break;case"float":A[t>>2]=e;break;case"double":w[t>>3]=e;break;default:ut("invalid type for setValue: "+n)}},n.getValue=function(t,e,n){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return y[t>>0];case"i16":return b[t>>1];case"i32":case"i64":return _[t>>2];case"float":return A[t>>2];case"double":return w[t>>3];default:ut("invalid type for getValue: "+e)}return null},n.getTempRet0=c,z){G(z)||(K=z,z=n.locateFile?n.locateFile(K,a):a+K),R++,n.monitorRunDependencies&&n.monitorRunDependencies(R);var rt=function(t){t.byteLength&&(t=new Uint8Array(t)),v.set(t,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(t){if(R--,n.monitorRunDependencies&&n.monitorRunDependencies(R),0==R&&(null!==N&&(clearInterval(N),N=null),D)){var e=D;D=null,e()}}()},it=function(){i(z,rt,(function(){throw"could not load memory initializer "+z}))},ot=Z(z);if(ot)rt(ot.buffer);else if(n.memoryInitializerRequest){var at=function(){var t=n.memoryInitializerRequest,e=t.response;if(200!==t.status&&0!==t.status){var r=Z(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+t.status+", retrying "+z),void it();e=r.buffer}rt(e)};n.memoryInitializerRequest.response?setTimeout(at,0):n.memoryInitializerRequest.addEventListener("load",at)}else it()}function st(t){function e(){$||($=!0,f||(S(C),S(T),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),k.unshift(t);var t;S(k)}()))}t=t||o,R>0||(!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),P.unshift(t);var t;S(P)}(),R>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}function ut(t){throw n.onAbort&&n.onAbort(t),s(t+=""),u(t),f=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}if(D=function t(){$||st(),$||(D=t)},n.run=st,n.abort=ut,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return st(),t}("object"===typeof r?r:{}),i="number",o={};[["sizeOfH3Index",i],["sizeOfGeoCoord",i],["sizeOfGeoBoundary",i],["sizeOfGeoPolygon",i],["sizeOfGeofence",i],["sizeOfLinkedGeoPolygon",i],["sizeOfCoordIJ",i],["h3IsValid",i,[i,i]],["geoToH3",i,[i,i,i]],["h3ToGeo",null,[i,i,i]],["h3ToGeoBoundary",null,[i,i,i]],["maxKringSize",i,[i]],["kRing",null,[i,i,i,i]],["kRingDistances",null,[i,i,i,i,i]],["hexRing",null,[i,i,i,i]],["maxPolyfillSize",i,[i,i]],["polyfill",null,[i,i,i]],["h3SetToLinkedGeo",null,[i,i,i]],["destroyLinkedPolygon",null,[i]],["compact",i,[i,i,i]],["uncompact",i,[i,i,i,i,i]],["maxUncompactSize",i,[i,i,i]],["h3IsPentagon",i,[i,i]],["h3IsResClassIII",i,[i,i]],["h3GetBaseCell",i,[i,i]],["h3GetResolution",i,[i,i]],["maxFaceCount",i,[i,i]],["h3GetFaces",null,[i,i,i]],["h3ToParent",i,[i,i,i]],["h3ToChildren",null,[i,i,i,i]],["h3ToCenterChild",i,[i,i,i]],["maxH3ToChildrenSize",i,[i,i,i]],["h3IndexesAreNeighbors",i,[i,i,i,i]],["getH3UnidirectionalEdge",i,[i,i,i,i]],["getOriginH3IndexFromUnidirectionalEdge",i,[i,i]],["getDestinationH3IndexFromUnidirectionalEdge",i,[i,i]],["h3UnidirectionalEdgeIsValid",i,[i,i]],["getH3IndexesFromUnidirectionalEdge",null,[i,i,i]],["getH3UnidirectionalEdgesFromHexagon",null,[i,i,i]],["getH3UnidirectionalEdgeBoundary",null,[i,i,i]],["h3Distance",i,[i,i,i,i]],["h3Line",i,[i,i,i,i,i]],["h3LineSize",i,[i,i,i,i]],["experimentalH3ToLocalIj",i,[i,i,i,i,i]],["experimentalLocalIjToH3",i,[i,i,i,i]],["hexAreaM2",i,[i]],["hexAreaKm2",i,[i]],["edgeLengthM",i,[i]],["edgeLengthKm",i,[i]],["pointDistM",i,[i,i]],["pointDistKm",i,[i,i]],["pointDistRads",i,[i,i]],["cellAreaM2",i,[i,i]],["cellAreaKm2",i,[i,i]],["cellAreaRads2",i,[i,i]],["exactEdgeLengthM",i,[i,i]],["exactEdgeLengthKm",i,[i,i]],["exactEdgeLengthRads",i,[i,i]],["numHexagons",i,[i]],["getRes0Indexes",null,[i]],["res0IndexCount",i],["getPentagonIndexes",null,[i,i]],["pentagonIndexCount",i]].forEach((function(t){o[t[0]]=r.cwrap.apply(r,t)}));var a=16,s=o.sizeOfH3Index(),u=o.sizeOfGeoCoord(),l=o.sizeOfGeoBoundary(),c=o.sizeOfGeoPolygon(),f=o.sizeOfGeofence(),h=o.sizeOfLinkedGeoPolygon(),p=o.sizeOfCoordIJ(),d={m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"};function m(t){if("number"!==typeof t||t<0||t>15||Math.floor(t)!==t)throw new Error("Invalid resolution: "+t)}var g=/[^0-9a-fA-F]/;function y(t){if(Array.isArray(t)&&2===t.length&&Number.isInteger(t[0])&&Number.isInteger(t[1]))return t;if("string"!==typeof t||g.test(t))return[0,0];var e=parseInt(t.substring(0,t.length-8),a);return[parseInt(t.substring(t.length-8),a),e]}function v(t){if(t>=0)return t.toString(a);var e=_(8,(t&=2147483647).toString(a));return e=(parseInt(e[0],a)+8).toString(a)+e.substring(1)}function b(t,e){return v(e)+_(8,v(t))}function _(t,e){for(var n=t-e.length,r="",i=0;i<n;i++)r+="0";return r+=e}function A(t,e,n){for(var i=t.length,o=r._calloc(i,u),a=n?1:0,s=n?0:1,l=0;l<2*i;l+=2)r.HEAPF64.set([t[l/2][a],t[l/2][s]].map(vt),o/8+l);return r.HEAPU32.set([i,o],e/4),e}function w(t){return[t,r.getTempRet0()]}function x(t){var e=w(t),n=e[0],r=e[1];return r?b(n,r):null}function E(t,e){void 0===e&&(e=0);var n=r.getValue(t+4*e*2,"i32"),i=r.getValue(t+4*(2*e+1),"i32");return i?b(n,i):null}function O(t,e,n){r.HEAPU32.set(y(t),e/4+2*n)}function S(t,e){for(var n=[],r=0;r<e;r++){var i=E(t,r);null!==i&&n.push(i)}return n}function P(t,e){for(var n=e.length,r=0;r<n;r++)O(e[r],t,r)}function C(t,e){var n=r._calloc(1,u);return r.HEAPF64.set([t,e].map(vt),n/8),n}function T(t){return bt(r.getValue(t,"double"))}function k(t){return[T(t),T(t+8)]}function I(t){return[T(t+8),T(t)]}function L(t,e,n){for(var i=r.getValue(t,"i32"),o=t+8,a=[],s=e?I:k,u=0;u<2*i;u+=2)a.push(s(o+8*u));return n&&a.push(a[0]),a}function j(t){var e=y(t),n=e[0],r=e[1];return Boolean(o.h3IsValid(n,r))}function M(t){var e=y(t),n=e[0],r=e[1];return Boolean(o.h3IsPentagon(n,r))}function R(t){var e=y(t),n=e[0],r=e[1];return Boolean(o.h3IsResClassIII(n,r))}function N(t){var e=y(t),n=e[0],r=e[1];return o.h3GetBaseCell(n,r)}function D(t){var e=y(t),n=e[0],i=e[1],a=o.maxFaceCount(n,i),s=r._malloc(4*a);o.h3GetFaces(n,i,s);var u=function(t,e){for(var n=[],i=0;i<e;i++){var o=r.getValue(t+4*i,"i32");o>=0&&n.push(o)}return n}(s,a);return r._free(s),u}function F(t){var e=y(t),n=e[0],r=e[1];return o.h3IsValid(n,r)?o.h3GetResolution(n,r):-1}function B(t,e,n){var i=r._malloc(u);r.HEAPF64.set([t,e].map(vt),i/8);var a=x(o.geoToH3(i,n));return r._free(i),a}function z(t){var e=r._malloc(u),n=y(t),i=n[0],a=n[1];o.h3ToGeo(i,a,e);var s=k(e);return r._free(e),s}function U(t,e){var n=r._malloc(l),i=y(t),a=i[0],s=i[1];o.h3ToGeoBoundary(a,s,n);var u=L(n,e,e);return r._free(n),u}function G(t,e){var n=y(t),r=n[0],i=n[1];return x(o.h3ToParent(r,i,e))}function V(t,e){if(!j(t))return[];var n=y(t),i=n[0],a=n[1],u=o.maxH3ToChildrenSize(i,a,e),l=r._calloc(u,s);o.h3ToChildren(i,a,e,l);var c=S(l,u);return r._free(l),c}function q(t,e){var n=y(t),r=n[0],i=n[1];return x(o.h3ToCenterChild(r,i,e))}function H(t,e){var n=y(t),i=n[0],a=n[1],u=o.maxKringSize(e),l=r._calloc(u,s);o.kRing(i,a,e,l);var c=S(l,u);return r._free(l),c}function W(t,e){var n=y(t),i=n[0],a=n[1],u=o.maxKringSize(e),l=r._calloc(u,s),c=r._calloc(u,4);o.kRingDistances(i,a,e,l,c);for(var f=[],h=0;h<e+1;h++)f.push([]);for(var p=0;p<2*u;p+=2){var d=r.getValue(l+4*p,"i32"),m=r.getValue(l+4*(p+1),"i32"),g=r.getValue(c+p/2*4,"i32");0===d&&0===m||f[g].push(b(d,m))}return r._free(l),r._free(c),f}function X(t,e){var n=0===e?1:6*e,i=r._calloc(n,s);if(0!==o.hexRing.apply(o,y(t).concat([e],[i])))throw r._free(i),new Error("Failed to get hexRing (encountered a pentagon?)");var a=S(i,n);return r._free(i),a}function Y(t,e,n){if(m(e),n=Boolean(n),0===t.length||0===t[0].length)return[];"number"===typeof t[0][0]&&(t=[t]);var i=function(t,e){var n,i=t.length-1,o=r._calloc(c),a=0+f,s=a+4;if(A(t[0],o+0,e),i>0){n=r._calloc(i,f);for(var u=0;u<i;u++)A(t[u+1],n+f*u,e)}return r.setValue(o+a,i,"i32"),r.setValue(o+s,n,"i32"),o}(t,n),a=o.maxPolyfillSize(i,e),u=r._calloc(a,s);o.polyfill(i,e,u);var l=S(u,a);return r._free(u),function(t){var e=0+f,n=e+4;r._free(r.getValue(t+0+4,"i8*"));var i=r.getValue(t+e,"i32");if(i>0){for(var o=r.getValue(t+n,"i32"),a=0;a<i;a++)r._free(r.getValue(o+f*a+4,"i8*"));r._free(o)}r._free(t)}(i),l}function Z(t,e){if(!t||!t.length)return[];var n=t.length,i=r._calloc(n,s);P(i,t);var a=r._calloc(h),u=a;o.h3SetToLinkedGeo(i,n,a);var l=function(t,e){for(var n,i,o,a,s=[],u=e?I:k;t;){for(s.push(n=[]),i=r.getValue(t,"i8*");i;){for(n.push(o=[]),a=r.getValue(i,"i8*");a;)o.push(u(a)),a=r.getValue(a+16,"i8*");e&&o.push(o[0]),i=r.getValue(i+8,"i8*")}t=r.getValue(t+8,"i8*")}return s}(a,e);return o.destroyLinkedPolygon(u),r._free(u),r._free(i),l}function K(t){if(!t||!t.length)return[];var e=t.length,n=r._calloc(e,s);P(n,t);var i=r._calloc(e,s);if(0!==o.compact(n,i,e))throw r._free(n),r._free(i),new Error("Failed to compact, malformed input data (duplicate hexagons?)");var a=S(i,e);return r._free(n),r._free(i),a}function $(t,e){if(m(e),!t||!t.length)return[];var n=t.length,i=r._calloc(n,s);P(i,t);var a=o.maxUncompactSize(i,n,e),u=r._calloc(a,s);if(0!==o.uncompact(i,n,u,a,e))throw r._free(i),r._free(u),new Error("Failed to uncompact (bad resolution?)");var l=S(u,a);return r._free(i),r._free(u),l}function J(t,e){var n=y(t),r=n[0],i=n[1],a=y(e),s=a[0],u=a[1];return Boolean(o.h3IndexesAreNeighbors(r,i,s,u))}function Q(t,e){var n=y(t),r=n[0],i=n[1],a=y(e),s=a[0],u=a[1];return x(o.getH3UnidirectionalEdge(r,i,s,u))}function tt(t){var e=y(t),n=e[0],r=e[1];return x(o.getOriginH3IndexFromUnidirectionalEdge(n,r))}function et(t){var e=y(t),n=e[0],r=e[1];return x(o.getDestinationH3IndexFromUnidirectionalEdge(n,r))}function nt(t){var e=y(t),n=e[0],r=e[1];return Boolean(o.h3UnidirectionalEdgeIsValid(n,r))}function rt(t){var e=y(t),n=e[0],i=e[1],a=r._calloc(2,s);o.getH3IndexesFromUnidirectionalEdge(n,i,a);var u=S(a,2);return r._free(a),u}function it(t){var e=y(t),n=e[0],i=e[1],a=r._calloc(6,s);o.getH3UnidirectionalEdgesFromHexagon(n,i,a);var u=S(a,6);return r._free(a),u}function ot(t,e){var n=r._malloc(l),i=y(t),a=i[0],s=i[1];o.getH3UnidirectionalEdgeBoundary(a,s,n);var u=L(n,e);return r._free(n),u}function at(t,e){var n=y(t),r=n[0],i=n[1],a=y(e),s=a[0],u=a[1];return o.h3Distance(r,i,s,u)}function st(t,e){var n=y(t),i=n[0],a=n[1],u=y(e),l=u[0],c=u[1],f=o.h3LineSize(i,a,l,c);if(f<0)throw new Error("Line cannot be calculated");var h=r._calloc(f,s);o.h3Line(i,a,l,c,h);var p=S(h,f);return r._free(h),p}function ut(t,e){var n,i=r._malloc(p),a=o.experimentalH3ToLocalIj.apply(o,y(t).concat(y(e),[i])),s=(n=i,{i:r.getValue(n,"i32"),j:r.getValue(n+4,"i32")});switch(r._free(i),a){case 0:return s;case 1:throw new Error("Incompatible origin and index.");case 2:default:throw new Error("Local IJ coordinates undefined for this origin and index pair. The index may be too far from the origin.");case 3:case 4:case 5:throw new Error("Encountered possible pentagon distortion")}}function lt(t,e){if(!e||"number"!==typeof e.i||"number"!==typeof e.j)throw new Error("Coordinates must be provided as an {i, j} object");var n,i,a,u,l=r._malloc(p),c=r._malloc(s);n=l,a=(i=e).i,u=i.j,r.setValue(n,a,"i32"),r.setValue(n+4,u,"i32");var f=o.experimentalLocalIjToH3.apply(o,y(t).concat([l],[c])),h=E(c);if(r._free(l),r._free(c),0!==f)throw new Error("Index not defined for this origin and IJ coordinates pair. IJ coordinates may be too far from origin, or a pentagon distortion was encountered.");return h}function ct(t,e,n){var i,a=C(t[0],t[1]),s=C(e[0],e[1]);switch(n){case d.m:i=o.pointDistM(a,s);break;case d.km:i=o.pointDistKm(a,s);break;case d.rads:i=o.pointDistRads(a,s);break;default:i=null}if(r._free(a),r._free(s),null===i)throw new Error("Unknown unit: "+n);return i}function ft(t,e){var n=y(t),r=n[0],i=n[1];switch(e){case d.m2:return o.cellAreaM2(r,i);case d.km2:return o.cellAreaKm2(r,i);case d.rads2:return o.cellAreaRads2(r,i);default:throw new Error("Unknown unit: "+e)}}function ht(t,e){var n=y(t),r=n[0],i=n[1];switch(e){case d.m:return o.exactEdgeLengthM(r,i);case d.km:return o.exactEdgeLengthKm(r,i);case d.rads:return o.exactEdgeLengthRads(r,i);default:throw new Error("Unknown unit: "+e)}}function pt(t,e){switch(m(t),e){case d.m2:return o.hexAreaM2(t);case d.km2:return o.hexAreaKm2(t);default:throw new Error("Unknown unit: "+e)}}function dt(t,e){switch(m(t),e){case d.m:return o.edgeLengthM(t);case d.km:return o.edgeLengthKm(t);default:throw new Error("Unknown unit: "+e)}}function mt(t){m(t);var e=w(o.numHexagons(t)),n=e[0],r=e[1];return r?r*Math.pow(2,32)+n:n}function gt(){var t=o.res0IndexCount(),e=r._malloc(s*t);o.getRes0Indexes(e);var n=S(e,t);return r._free(e),n}function yt(t){m(t);var e=o.pentagonIndexCount(),n=r._malloc(s*e);o.getPentagonIndexes(t,n);var i=S(n,e);return r._free(n),i}function vt(t){return t*Math.PI/180}function bt(t){return 180*t/Math.PI}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(t))return e;return[255*t[0],255*t[1],255*t[2],255*t[3]]},e.recursivelyTraverseNestedArrays=function t(e,n,r){if(!Array.isArray(e[0]))return!0;for(var i=0;i<e.length;i++)if(t(e[i],[].concat(h(n),[i]),r)){r(e,n);break}return!1},e.generatePointsParallelToLinePoints=function(t,e,n){var a={type:"LineString",coordinates:[t,e]},u=(0,s.point)(n),l=(0,o.default)(u,a),c=(0,i.default)(t,e),f=(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])<0?c-90:c-270,h=(0,r.default)(e,l,f),p=(0,r.default)(t,l,f);return[h.geometry.coordinates,p.geometry.coordinates]},e.distance2d=m,e.mix=g,e.nearestPointOnProjectedLine=function(t,e,n){var r=new l.default(n),i=t.geometry.coordinates.map((function(t){var e=f(t,3),n=e[0],i=e[1],o=e[2],a=void 0===o?0:o;return r.project([n,i,a])})),o=f(r.project(e.geometry.coordinates),2),a=o[0],s=o[1],u=1/0,c={};i.forEach((function(t,e){var n=f(t,2),r=n[0],o=n[1];if(0!==e){var l=f(i[e-1],2),h=l[0],p=l[1],d=p-o,m=r-h,g=h*o-r*p,y=d*d+m*m,v=Math.abs(d*a+m*s+g)/Math.sqrt(y);v<u&&(u=v,c={index:e,x0:(m*(m*a-d*s)-d*g)/y,y0:(d*(-m*a+d*s)-m*g)/y})}}));var h=c,p=h.index,d=h.x0,y=h.y0,v=f(i[p-1],3),b=v[0],_=v[1],A=v[2],w=void 0===A?0:A,x=f(i[p],3),E=x[0],O=x[1],S=x[2],P=void 0===S?0:S,C=m(b,_,E,O),T=m(b,_,d,y),k=g(w,P,T/C);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([d,y,k])},properties:{dist:u,index:p-1}}},e.nearestPointOnLine=function(t,e,n){var r,i,o;n&&(o=new l.default(n));var c=(0,s.point)([1/0,1/0],{dist:1/0});if(!(null===(r=t.geometry)||void 0===r?void 0:r.coordinates.length)||(null===(i=t.geometry)||void 0===i?void 0:i.coordinates.length)<2)return c;return(0,a.flattenEach)(t,(function(t){var n,r,i,a,l,f,h,p=(0,u.getCoords)(t),d=(0,u.getCoords)(e);if(p.length>1&&d.length){var m,g;o?(m=p.map((function(t){return o.project(t)})),g=o.project(d)):(m=p,g=d);for(var y=1;y<m.length;y++){if(m[y][0]!==m[y-1][0]){var v=(m[y][1]-m[y-1][1])/(m[y][0]-m[y-1][0]),b=m[y][1]-v*m[y][0];h=Math.abs(v*g[0]+b-g[1])/Math.sqrt(v*v+1)}else h=Math.abs(g[0]-m[y][0]);var _=Math.pow(m[y][1]-m[y-1][1],2)+Math.pow(m[y][0]-m[y-1][0],2),A=Math.pow(m[y][1]-g[1],2)+Math.pow(m[y][0]-g[0],2),w=Math.pow(m[y-1][1]-g[1],2)+Math.pow(m[y-1][0]-g[0],2),x=Math.pow(h,2),E=A-x+w-x;E>_&&(h=Math.sqrt(Math.min(A,w))),(null===n||void 0===n||n>h)&&(E>_?w<A?(r=0,i=1):(i=0,r=1):(r=Math.sqrt(w-x)/Math.sqrt(_),i=Math.sqrt(A-x)/Math.sqrt(_)),n=h,f=y)}var O=m[f-1][0]-m[f][0],S=m[f-1][1]-m[f][1];a=m[f-1][0]-O*r,l=m[f-1][1]-S*r}var P={x:a,y:l,idx:f-1,to:r,from:i};if(o){var C=o.unproject([P.x,P.y]);P={x:C[0],y:C[1],idx:f-1,to:r,from:i}}c=(0,s.point)([P.x,P.y],{dist:Math.abs(P.from-P.to),index:P.idx})})),c},e.getPickedEditHandle=function(t){var e=y(t);return e.length?e[0]:null},e.getPickedSnapSourceEditHandle=function(t){return y(t).find((function(t){return"snap-source"===t.properties.editHandleType}))},e.getNonGuidePicks=function(t){return t&&t.filter((function(t){return!t.isGuide}))},e.getPickedExistingEditHandle=function(t){return y(t).find((function(t){var e=t.properties;return e.featureIndex>=0&&"existing"===e.editHandleType}))},e.getPickedIntermediateEditHandle=function(t){return y(t).find((function(t){var e=t.properties;return e.featureIndex>=0&&"intermediate"===e.editHandleType}))},e.getPickedEditHandles=y,e.getEditHandlesForGeometry=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"existing",r=[];switch(t.type){case"Point":r=[{type:"Feature",properties:{guideType:"editHandle",editHandleType:n,positionIndexes:[],featureIndex:e},geometry:{type:"Point",coordinates:t.coordinates}}];break;case"MultiPoint":case"LineString":r=r.concat(v(t.coordinates,[],e,n));break;case"Polygon":case"MultiLineString":for(var i=0;i<t.coordinates.length;i++)r=r.concat(v(t.coordinates[i],[i],e,n)),"Polygon"===t.type&&(r=r.slice(0,-1));break;case"MultiPolygon":for(var o=0;o<t.coordinates.length;o++)for(var a=0;a<t.coordinates[o].length;a++)r=(r=r.concat(v(t.coordinates[o][a],[o,a],e,n))).slice(0,-1);break;default:throw Error("Unhandled geometry type: ".concat(t.type))}return r},e.updateRectanglePosition=function(t,e,n){var r=t.geometry.coordinates;if(!r)return null;var i=r[0].slice(0,4);i[e%4]=n;var o=i[(e+2)%4],a=i[e%4];return i[(e+1)%4]=[a[0],o[1]],i[(e+3)%4]=[o[0],a[1]],[[].concat(h(i),[i[0]])]},e.mapCoords=function t(e,n){if("number"===typeof e[0])return!isNaN(e[0])&&isFinite(e[0])?n(e):e;return e.map((function(e){return t(e,n)})).filter(Boolean)};var r=c(n(151)),i=c(n(89)),o=c(n(609)),a=n(347),s=n(34),u=n(182),l=c(n(441));function c(t){return t&&t.__esModule?t:{default:t}}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||p(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.")}()}function p(t,e){if(t){if("string"===typeof t)return d(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(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 m(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function g(t,e,n){return e*n+t*(1-n)}function y(t){return t&&t.filter((function(t){return t.isGuide&&"editHandle"===t.object.properties.guideType})).map((function(t){return t.object}))||[]}function v(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"existing",i=[],o=0;o<t.length;o++){var a=t[o];i.push({type:"Feature",properties:{guideType:"editHandle",positionIndexes:[].concat(h(e),[o]),featureIndex:n,editHandleType:r},geometry:{type:"Point",coordinates:a}})}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(1),i=n(239),o=n(12);const a=["longitude","latitude","zoom","bearing","pitch"],s=["longitude","latitude","zoom"];class u extends i.a{constructor(t={}){const e=Array.isArray(t)?t:t.transitionProps,n=Array.isArray(t)?{}:t;n.transitionProps=Array.isArray(e)?{compare:e,required:e}:e||{compare:a,required:s},super(n.transitionProps),Object(r.a)(this,"opts",void 0),this.opts=n}initializeProps(t,e){const n=super.initializeProps(t,e),{makeViewport:r,around:i}=this.opts;if(r&&i){const o=r(t),a=r(e),s=o.unproject(i);n.start.around=i,Object.assign(n.end,{around:a.project(s),aroundPosition:s,width:e.width,height:e.height})}return n}interpolateProps(t,e,n){const r={};for(const i of this._propsToExtract)r[i]=Object(o.n)(t[i]||0,e[i]||0,n);if(e.aroundPosition&&this.opts.makeViewport){const i=this.opts.makeViewport({...e,...r});Object.assign(r,i.panByPosition(e.aroundPosition,Object(o.n)(t.around,e.around,n)))}return r}}},function(t,e,n){(function(r){var i,o;(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var a=this.Rails;(function(){(function(){var t;t=null,a.loadCSPNonce=function(){var e;return t=null!=(e=document.querySelector("meta[name=csp-nonce]"))?e.content:void 0},a.cspNonce=function(){return null!=t?t:a.loadCSPNonce()}}).call(this),function(){var t;t=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,a.matches=function(e,n){return null!=n.exclude?t.call(e,n.selector)&&!t.call(e,n.exclude):t.call(e,n)},a.getData=function(t,e){var n;return null!=(n=t._ujsData)?n[e]:void 0},a.setData=function(t,e,n){return null==t._ujsData&&(t._ujsData={}),t._ujsData[e]=n},a.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var t,e,n;t=a.$,n=a.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},e=a.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},a.CSRFProtection=function(t){var e;if(null!=(e=n()))return t.setRequestHeader("X-CSRF-Token",e)},a.refreshCSRFTokens=function(){var r,i;if(i=n(),r=e(),null!=i&&null!=r)return t('form input[name="'+r+'"]').forEach((function(t){return t.value=i}))}}.call(this),function(){var t,e,n,r;n=a.matches,"function"!==typeof(t=window.CustomEvent)&&((t=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,r=t.prototype.preventDefault,t.prototype.preventDefault=function(){var t;return t=r.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),e=a.fire=function(e,n,r){var i;return i=new t(n,{bubbles:!0,cancelable:!0,detail:r}),e.dispatchEvent(i),!i.defaultPrevented},a.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},a.delegate=function(t,e,r,i){return t.addEventListener(r,(function(t){var r;for(r=t.target;r instanceof Element&&!n(r,e);)r=r.parentNode;if(r instanceof Element&&!1===i.call(r,t))return t.preventDefault(),t.stopPropagation()}))}}.call(this),function(){var t,e,n,r,i,o;r=a.cspNonce,e=a.CSRFProtection,a.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},a.ajax=function(t){var e;return t=i(t),e=n(t,(function(){var n,r;return r=o(null!=(n=e.response)?n:e.responseText,e.getResponseHeader("Content-Type")),2===Math.floor(e.status/100)?"function"===typeof t.success&&t.success(r,e.statusText,e):"function"===typeof t.error&&t.error(r,e.statusText,e),"function"===typeof t.complete?t.complete(e,e.statusText):void 0})),!(null!=t.beforeSend&&!t.beforeSend(e,t))&&(e.readyState===XMLHttpRequest.OPENED?e.send(t.data):void 0)},i=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),"GET"===e.type&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),null==t[e.dataType]&&(e.dataType="*"),e.accept=t[e.dataType],"*"!==e.dataType&&(e.accept+=", */*; q=0.01"),e},n=function(t,n){var r;return(r=new XMLHttpRequest).open(t.type,t.url,!0),r.setRequestHeader("Accept",t.accept),"string"===typeof t.data&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||(r.setRequestHeader("X-Requested-With","XMLHttpRequest"),e(r)),r.withCredentials=!!t.withCredentials,r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE)return n(r)},r},o=function(t,e){var n,i;if("string"===typeof t&&"string"===typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(o){}else if(e.match(/\b(?:java|ecma)script\b/))(i=document.createElement("script")).setAttribute("nonce",r()),i.text=t,document.head.appendChild(i).parentNode.removeChild(i);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(o){}}return t},a.href=function(t){return t.href},a.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host===n.protocol+"//"+n.host)}catch(r){return r,!0}}}.call(this),function(){var t,e;t=a.matches,e=function(t){return Array.prototype.slice.call(t)},a.serializeElement=function(n,r){var i,o;return i=[n],t(n,"form")&&(i=e(n.elements)),o=[],i.forEach((function(n){if(n.name&&!n.disabled&&!t(n,"fieldset[disabled] *"))return t(n,"select")?e(n.options).forEach((function(t){if(t.selected)return o.push({name:n.name,value:t.value})})):n.checked||-1===["radio","checkbox","submit"].indexOf(n.type)?o.push({name:n.name,value:n.value}):void 0})),r&&o.push(r),o.map((function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t})).join("&")},a.formElements=function(n,r){return t(n,"form")?e(n.elements).filter((function(e){return t(e,r)})):e(n.querySelectorAll(r))}}.call(this),function(){var t,e,n;e=a.fire,n=a.stopEverything,a.handleConfirm=function(e){if(!t(this))return n(e)},a.confirm=function(t,e){return confirm(t)},t=function(t){var n,r,i;if(!(i=t.getAttribute("data-confirm")))return!0;if(n=!1,e(t,"confirm")){try{n=a.confirm(i,t)}catch(o){}r=e(t,"confirm:complete",[n])}return n&&r}}.call(this),function(){var t,e,n,r,i,o,s,u,l,c,f,h;c=a.matches,u=a.getData,f=a.setData,h=a.stopEverything,s=a.formElements,a.handleDisabledElement=function(t){if(this,this.disabled)return h(t)},a.enableElement=function(t){var e;if(t instanceof Event){if(l(t))return;e=t.target}else e=t;return c(e,a.linkDisableSelector)?o(e):c(e,a.buttonDisableSelector)||c(e,a.formEnableSelector)?r(e):c(e,a.formSubmitSelector)?i(e):void 0},a.disableElement=function(r){var i;return i=r instanceof Event?r.target:r,c(i,a.linkDisableSelector)?n(i):c(i,a.buttonDisableSelector)||c(i,a.formDisableSelector)?t(i):c(i,a.formSubmitSelector)?e(i):void 0},n=function(t){var e;if(!u(t,"ujs:disabled"))return null!=(e=t.getAttribute("data-disable-with"))&&(f(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",h),f(t,"ujs:disabled",!0)},o=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(t.innerHTML=e,f(t,"ujs:enable-with",null)),t.removeEventListener("click",h),f(t,"ujs:disabled",null)},e=function(e){return s(e,a.formDisableSelector).forEach(t)},t=function(t){var e;if(!u(t,"ujs:disabled"))return null!=(e=t.getAttribute("data-disable-with"))&&(c(t,"button")?(f(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(f(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,f(t,"ujs:disabled",!0)},i=function(t){return s(t,a.formEnableSelector).forEach(r)},r=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(c(t,"button")?t.innerHTML=e:t.value=e,f(t,"ujs:enable-with",null)),t.disabled=!1,f(t,"ujs:disabled",null)},l=function(t){var e,n;return null!=(null!=(n=null!=(e=t.detail)?e[0]:void 0)?n.getResponseHeader("X-Xhr-Redirect"):void 0)}}.call(this),function(){var t;t=a.stopEverything,a.handleMethod=function(e){var n,r,i,o,s,u,l;if(l=(u=this).getAttribute("data-method"))return s=a.href(u),r=a.csrfToken(),n=a.csrfParam(),i=document.createElement("form"),o="<input name='_method' value='"+l+"' type='hidden' />",null==n||null==r||a.isCrossDomain(s)||(o+="<input name='"+n+"' value='"+r+"' type='hidden' />"),o+='<input type="submit" />',i.method="post",i.action=s,i.target=u.target,i.innerHTML=o,i.style.display="none",document.body.appendChild(i),i.querySelector('[type="submit"]').click(),t(e)}}.call(this),function(){var t,e,n,r,i,o,s,u,l,c=[].slice;o=a.matches,n=a.getData,u=a.setData,e=a.fire,l=a.stopEverything,t=a.ajax,r=a.isCrossDomain,s=a.serializeElement,i=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},a.handleRemote=function(f){var h,p,d,m,g,y,v;return!i(m=this)||(e(m,"ajax:before")?(v=m.getAttribute("data-with-credentials"),d=m.getAttribute("data-type")||"script",o(m,a.formSubmitSelector)?(h=n(m,"ujs:submit-button"),g=n(m,"ujs:submit-button-formmethod")||m.method,y=n(m,"ujs:submit-button-formaction")||m.getAttribute("action")||location.href,"GET"===g.toUpperCase()&&(y=y.replace(/\?.*$/,"")),"multipart/form-data"===m.enctype?(p=new FormData(m),null!=h&&p.append(h.name,h.value)):p=s(m,h),u(m,"ujs:submit-button",null),u(m,"ujs:submit-button-formmethod",null),u(m,"ujs:submit-button-formaction",null)):o(m,a.buttonClickSelector)||o(m,a.inputChangeSelector)?(g=m.getAttribute("data-method"),y=m.getAttribute("data-url"),p=s(m,m.getAttribute("data-params"))):(g=m.getAttribute("data-method"),y=a.href(m),p=m.getAttribute("data-params")),t({type:g||"GET",url:y,data:p,dataType:d,beforeSend:function(t,n){return e(m,"ajax:beforeSend",[t,n])?e(m,"ajax:send",[t]):(e(m,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],e(m,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],e(m,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],e(m,"ajax:complete",t)},crossDomain:r(y),withCredentials:null!=v&&"false"!==v}),l(f)):(e(m,"ajax:stopped"),!1))},a.formSubmitButtonClick=function(t){var e,n;if(n=(e=this).form)return e.name&&u(n,"ujs:submit-button",{name:e.name,value:e.value}),u(n,"ujs:formnovalidate-button",e.formNoValidate),u(n,"ujs:submit-button-formaction",e.getAttribute("formaction")),u(n,"ujs:submit-button-formmethod",e.getAttribute("formmethod"))},a.preventInsignificantClick=function(t){var e,n,r;if(this,r=(this.getAttribute("data-method")||"GET").toUpperCase(),e=this.getAttribute("data-params"),n=(t.metaKey||t.ctrlKey)&&"GET"===r&&!e,null!=t.button&&0!==t.button||n)return t.stopImmediatePropagation()}}.call(this),function(){var t,e,n,i,o,s,u,l,c,f,h,p,d,m,g;if(s=a.fire,n=a.delegate,l=a.getData,t=a.$,g=a.refreshCSRFTokens,e=a.CSRFProtection,d=a.loadCSPNonce,o=a.enableElement,i=a.disableElement,f=a.handleDisabledElement,c=a.handleConfirm,m=a.preventInsignificantClick,p=a.handleRemote,u=a.formSubmitButtonClick,h=a.handleMethod,"undefined"!==typeof r&&null!==r&&null!=r.ajax){if(r.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");r.rails=a,r.ajaxPrefilter((function(t,n,r){if(!t.crossDomain)return e(r)}))}a.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){return t(a.formEnableSelector).forEach((function(t){if(l(t,"ujs:disabled"))return o(t)})),t(a.linkDisableSelector).forEach((function(t){if(l(t,"ujs:disabled"))return o(t)}))})),n(document,a.linkDisableSelector,"ajax:complete",o),n(document,a.linkDisableSelector,"ajax:stopped",o),n(document,a.buttonDisableSelector,"ajax:complete",o),n(document,a.buttonDisableSelector,"ajax:stopped",o),n(document,a.linkClickSelector,"click",m),n(document,a.linkClickSelector,"click",f),n(document,a.linkClickSelector,"click",c),n(document,a.linkClickSelector,"click",i),n(document,a.linkClickSelector,"click",p),n(document,a.linkClickSelector,"click",h),n(document,a.buttonClickSelector,"click",m),n(document,a.buttonClickSelector,"click",f),n(document,a.buttonClickSelector,"click",c),n(document,a.buttonClickSelector,"click",i),n(document,a.buttonClickSelector,"click",p),n(document,a.inputChangeSelector,"change",f),n(document,a.inputChangeSelector,"change",c),n(document,a.inputChangeSelector,"change",p),n(document,a.formSubmitSelector,"submit",f),n(document,a.formSubmitSelector,"submit",c),n(document,a.formSubmitSelector,"submit",p),n(document,a.formSubmitSelector,"submit",(function(t){return setTimeout((function(){return i(t)}),13)})),n(document,a.formSubmitSelector,"ajax:send",i),n(document,a.formSubmitSelector,"ajax:complete",o),n(document,a.formInputClickSelector,"click",m),n(document,a.formInputClickSelector,"click",f),n(document,a.formInputClickSelector,"click",c),n(document,a.formInputClickSelector,"click",u),document.addEventListener("DOMContentLoaded",g),document.addEventListener("DOMContentLoaded",d),window._rails_loaded=!0},window.Rails===a&&s(document,"rails:attachBindings")&&a.start()}.call(this)}).call(this),t.exports?t.exports=a:void 0===(o="function"===typeof(i=a)?i.call(e,n,e,t):i)||(t.exports=o)}).call(this)}).call(this,n(155))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(201),i=n(12),o=n(22),a=n(23),s=n(93);const u=[0,0,0];let l;class c extends r.a{static get ZERO(){return l||(l=new c(0,0,0),Object.freeze(l)),l}constructor(t=0,e=0,n=0){super(-0,-0,-0),1===arguments.length&&Object(i.m)(t)?this.copy(t):(i.f.debug&&(Object(o.a)(t),Object(o.a)(e),Object(o.a)(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 i.f.debug&&(Object(o.a)(t.x),Object(o.a)(t.y),Object(o.a)(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]=Object(o.a)(t)}angle(t){return a.b(this,t)}cross(t){return a.d(this,this,t),this.check()}rotateX({radians:t,origin:e=u}){return a.n(this,this,e,t),this.check()}rotateY({radians:t,origin:e=u}){return a.o(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=u}){return a.p(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return a.t(this,this,t),this.check()}transformAsVector(t){return Object(s.c)(this,this,t),this.check()}transformByMatrix3(t){return a.s(this,this,t),this.check()}transformByMatrix2(t){return Object(s.b)(this,this,t),this.check()}transformByQuaternion(t){return a.u(this,this,t),this.check()}}},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,"a",(function(){return r}))},function(t,e,n){"use strict";n.r(e),n.d(e,"getPath",(function(){return r}));var r=function(t){switch(t.type){case"collection":return"/map/collections/".concat(t.slug);case"trail":return"/map/trails/".concat(t.slug);case"route":return"/map/routes/".concat(t.slug);case"timeline":return"/map/timelines/".concat(t.slug);case"project":return"/map/contribute/projects/".concat(t.slug);case"record":return"/map/records/".concat(t.slug);case"overlay":return"/map/overlays/".concat(t.slug);default:return console.warn("Missing type in getPath()"),""}}},function(t,e,n){"use strict";n.r(e),n.d(e,"OverlayCreatorStore",(function(){return l})),n.d(e,"overlayCreatorStore",(function(){return c})),n.d(e,"OverlayCreatorStoreProvider",(function(){return h})),n.d(e,"useStore",(function(){return p}));var r=n(0),i=n.n(r),o=n(2),a=n(578),s=n(371);function u(){u=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}var l=o.types.model("OverlayCreatorStore",{id:o.types.maybeNull(o.types.integer),slug:o.types.maybeNull(o.types.string),name:o.types.maybeNull(o.types.string),overlayGroup:o.types.maybeNull(a.default),allLayers:o.types.array(s.default),loading:o.types.optional(o.types.boolean,!1),loaded:o.types.optional(o.types.boolean,!1),gidForUpload:o.types.maybeNull(o.types.string)}).volatile((function(t){return{requestHeaders:{},addLayerOptionsLock:!1,showingAddLayerPanel:!1,activeFeature:null,cursorState:null,popoversDisabled:!1,message:null,mapViewport:null,activeLayerForErrorCheck:null}})).actions((function(t){return{afterCreate:function(){t.requestHeaders={"Content-Type":"application/json","X-Csrf-Token":document.querySelector('meta[name="csrf-token"]').content}},fetchAllLayers:Object(o.flow)(u().mark((function e(){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.prev=1,e.next=4,fetch("/overlays/layer/all.json");case 4:return n=e.sent,e.next=7,n.json();case 7:e.sent.forEach((function(e){t.allLayers.push(s.default.create(e))})),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching data:",e.t0);case 14:return e.prev=14,t.loading=!1,t.loaded=!0,e.finish(14);case 18:case"end":return e.stop()}}),e,null,[[1,11,14,18]])}))),initialise:function(e,n){t.overlayGroup=a.default.create(e),n.forEach((function(e){t.overlayGroup.addLayer(e)}))},toggleAddLayerPanel:function(){t.showingAddLayerPanel=!t.showingAddLayerPanel,t.setAddLayerOptionsLock(!1)},setAddLayerOptionsLock:function(e){t.addLayerOptionsLock=e},setLoading:function(e){t.loading=e},setGidForUpload:function(e){t.gidForUpload=e},setActiveFeature:function(e){t.popoversDisabled||(t.activeFeature=e)},clearGidForUpload:function(){t.gidForUpload=null},setCursorState:function(e){t.cursorState=e},setPopoversDisabled:function(e){e&&(t.activeFeature=null),t.popoversDisabled=e},setMessage:function(e){t.message=e},storeMapViewport:function(e){t.mapViewport=e},clearMessage:function(e){t.message=null},setActiveLayerForErrorCheck:function(e){t.activeLayerForErrorCheck=e},clearActiveLayerForErrorCheck:function(){t.activeLayerForErrorCheck=null}}})).views((function(t){return{get isDataLoaded(){return t.loaded},get isInitialised(){return!!t.overlayGroup}}})),c=l.create(),f=i.a.createContext(c),h=f.Provider;function p(){var t=i.a.useContext(f);if(null===t)throw new Error("Store cannot be null, please add a context provider");return t}"object"===typeof window&&(window.store=l)},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(80),i=n(10),o=n(245);const a={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},s={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}};class u{static getBytesPerElement(t){return Object(r.c)(t.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(t){Object(i.a)(t.size);return Object(r.c)(t.type||5126).BYTES_PER_ELEMENT*t.size}static resolve(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new u(...[a,...e])}constructor(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object(o.a)("Accessor",t,s),void 0!==t.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}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return p})),n.d(e,"c",(function(){return d}));var r=n(567),i=n.n(r),o=n(53);const a=o.WINDING.CLOCKWISE,s=o.WINDING.COUNTER_CLOCKWISE,u={isClosed:!0};function l(t){return"positions"in t?t.positions:t}function c(t){return"holeIndices"in t?t.holeIndices:null}function f(t,e,n,r,i){let a=e;const s=n.length;for(let o=0;o<s;o++)for(let e=0;e<r;e++)t[a++]=n[o][e]||0;if(!function(t){const e=t[0],n=t[t.length-1];return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}(n))for(let o=0;o<r;o++)t[a++]=n[0][o]||0;return u.start=e,u.end=a,u.size=r,Object(o.modifyPolygonWindingDirection)(t,i,u),a}function h(t,e,n,r,i=0,a,s){const l=(a=a||n.length)-i;if(l<=0)return e;let c=e;for(let o=0;o<l;o++)t[c++]=n[i+o];if(!function(t,e,n,r){for(let i=0;i<e;i++)if(t[n+i]!==t[r-e+i])return!1;return!0}(n,r,i,a))for(let o=0;o<r;o++)t[c++]=n[i+o];return u.start=e,u.end=c,u.size=r,Object(o.modifyPolygonWindingDirection)(t,s,u),c}function p(t,e){!function(t){if(t=t&&t.positions||t,!Array.isArray(t)&&!ArrayBuffer.isView(t))throw new Error("invalid polygon")}(t);const n=[],r=[];if("positions"in t){const{positions:i,holeIndices:o}=t;if(o){let t=0;for(let u=0;u<=o.length;u++)t=h(n,t,i,e,o[u-1],o[u],0===u?a:s),r.push(t);return r.pop(),{positions:n,holeIndices:r}}t=i}if(!function(t){return Array.isArray(t[0])}(t))return h(n,0,t,e,0,n.length,a),n;if(!function(t){return t.length>=1&&t[0].length>=2&&Number.isFinite(t[0][0])}(t)){let i=0;for(const[o,u]of t.entries())i=f(n,i,u,e,0===o?a:s),r.push(i);return r.pop(),{positions:n,holeIndices:r}}return f(n,0,t,e,a),n}function d(t,e,n){let r=c(t);r&&(r=r.map((t=>t/e)));let o=l(t);if(n){const t=o.length;o=o.slice();const r=[];for(let i=0;i<t;i+=e){r[0]=o[i],r[1]=o[i+1];const t=n(r);o[i]=t[0],o[i+1]=t[1]}}return i()(o,r,e)}},function(t,e,n){t.exports={PlaceSearch:"PlaceSearch-module__PlaceSearch___O1NIa",buttonInput:"PlaceSearch-module__buttonInput___2rlZJ",isOpen:"PlaceSearch-module__isOpen___1NPr_",label:"PlaceSearch-module__label___2owhN",searchField:"PlaceSearch-module__searchField___2Du_G",icon:"PlaceSearch-module__icon___6ILO0",wrapper:"PlaceSearch-module__wrapper___1DizR",listHeader:"PlaceSearch-module__listHeader___yg3vK"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ArrowStyles",{enumerable:!0,get:function(){return r.ArrowStyles}}),Object.defineProperty(e,"DEFAULT_ARROWS",{enumerable:!0,get:function(){return r.DEFAULT_ARROWS}}),Object.defineProperty(e,"MAX_ARROWS",{enumerable:!0,get:function(){return r.MAX_ARROWS}}),Object.defineProperty(e,"SELECTION_TYPE",{enumerable:!0,get:function(){return i.SELECTION_TYPE}}),Object.defineProperty(e,"Feature",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"LayerMouseEvent",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"NebulaLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JunctionsLayer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TextsLayer",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"SegmentsLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"NebulaCore",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"PROJECTED_PIXEL_SIZE_MULTIPLIER",{enumerable:!0,get:function(){return h.PROJECTED_PIXEL_SIZE_MULTIPLIER}}),Object.defineProperty(e,"toDeckColor",{enumerable:!0,get:function(){return p.toDeckColor}}),Object.defineProperty(e,"EditableGeoJsonLayer",{enumerable:!0,get:function(){return d.EditableGeoJsonLayer}}),Object.defineProperty(e,"SelectionLayer",{enumerable:!0,get:function(){return d.SelectionLayer}}),Object.defineProperty(e,"ElevatedEditHandleLayer",{enumerable:!0,get:function(){return d.ElevatedEditHandleLayer}}),Object.defineProperty(e,"PathOutlineLayer",{enumerable:!0,get:function(){return d.PathOutlineLayer}}),Object.defineProperty(e,"PathMarkerLayer",{enumerable:!0,get:function(){return d.PathMarkerLayer}}),Object.defineProperty(e,"GeoJsonEditMode",{enumerable:!0,get:function(){return m.GeoJsonEditMode}}),Object.defineProperty(e,"ModifyMode",{enumerable:!0,get:function(){return m.ModifyMode}}),Object.defineProperty(e,"ResizeCircleMode",{enumerable:!0,get:function(){return m.ResizeCircleMode}}),Object.defineProperty(e,"TranslateMode",{enumerable:!0,get:function(){return m.TranslateMode}}),Object.defineProperty(e,"ScaleMode",{enumerable:!0,get:function(){return m.ScaleMode}}),Object.defineProperty(e,"RotateMode",{enumerable:!0,get:function(){return m.RotateMode}}),Object.defineProperty(e,"DuplicateMode",{enumerable:!0,get:function(){return m.DuplicateMode}}),Object.defineProperty(e,"ExtendLineStringMode",{enumerable:!0,get:function(){return m.ExtendLineStringMode}}),Object.defineProperty(e,"SplitPolygonMode",{enumerable:!0,get:function(){return m.SplitPolygonMode}}),Object.defineProperty(e,"ExtrudeMode",{enumerable:!0,get:function(){return m.ExtrudeMode}}),Object.defineProperty(e,"ElevationMode",{enumerable:!0,get:function(){return m.ElevationMode}}),Object.defineProperty(e,"TransformMode",{enumerable:!0,get:function(){return m.TransformMode}}),Object.defineProperty(e,"DrawPointMode",{enumerable:!0,get:function(){return m.DrawPointMode}}),Object.defineProperty(e,"DrawLineStringMode",{enumerable:!0,get:function(){return m.DrawLineStringMode}}),Object.defineProperty(e,"DrawPolygonMode",{enumerable:!0,get:function(){return m.DrawPolygonMode}}),Object.defineProperty(e,"DrawRectangleMode",{enumerable:!0,get:function(){return m.DrawRectangleMode}}),Object.defineProperty(e,"DrawSquareMode",{enumerable:!0,get:function(){return m.DrawSquareMode}}),Object.defineProperty(e,"DrawRectangleFromCenterMode",{enumerable:!0,get:function(){return m.DrawRectangleFromCenterMode}}),Object.defineProperty(e,"DrawSquareFromCenterMode",{enumerable:!0,get:function(){return m.DrawSquareFromCenterMode}}),Object.defineProperty(e,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return m.DrawCircleByDiameterMode}}),Object.defineProperty(e,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return m.DrawCircleFromCenterMode}}),Object.defineProperty(e,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return m.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(e,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return m.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(e,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return m.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(e,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return m.Draw90DegreePolygonMode}}),Object.defineProperty(e,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return m.DrawPolygonByDraggingMode}}),Object.defineProperty(e,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return m.ImmutableFeatureCollection}}),Object.defineProperty(e,"ViewMode",{enumerable:!0,get:function(){return m.ViewMode}}),Object.defineProperty(e,"MeasureDistanceMode",{enumerable:!0,get:function(){return m.MeasureDistanceMode}}),Object.defineProperty(e,"MeasureAreaMode",{enumerable:!0,get:function(){return m.MeasureAreaMode}}),Object.defineProperty(e,"MeasureAngleMode",{enumerable:!0,get:function(){return m.MeasureAngleMode}}),Object.defineProperty(e,"CompositeMode",{enumerable:!0,get:function(){return m.CompositeMode}}),Object.defineProperty(e,"SnappableMode",{enumerable:!0,get:function(){return m.SnappableMode}});var r=n(715),i=n(716),o=g(n(1232)),a=g(n(717)),s=g(n(343)),u=g(n(1233)),l=g(n(1275)),c=g(n(1276)),f=g(n(1278)),h=n(727),p=n(426),d=n(510),m=n(424);function g(t){return t&&t.__esModule?t:{default:t}}},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 a=0;for(let s=n;a<i;a++)t[s++]=e[a];for(;a<o;)a<o-a?(t.copyWithin(n+a,n,n+a),a*=2):(t.copyWithin(n+a,n,n+o-a),a=o);return t}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return f}));var r={prefix:"fas",iconName:"angle-down",icon:[320,512,[],"f107","M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"]},i={prefix:"fas",iconName:"angle-up",icon:[320,512,[],"f106","M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"]},o={prefix:"fas",iconName:"book",icon:[448,512,[],"f02d","M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"]},a={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"]},s={prefix:"fas",iconName:"check",icon:[512,512,[],"f00c","M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"]},u={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"]},l={prefix:"fas",iconName:"envelope",icon:[512,512,[],"f0e0","M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"]},c={prefix:"fas",iconName:"external-link-alt",icon:[512,512,[],"f35d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]},f={prefix:"fas",iconName:"grip-lines",icon:[512,512,[],"f7a4","M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"]}},function(t,e,n){"use strict";(function(t){n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return l}));var r=n(0),i=function(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function o(){var t=i(Object(r.useState)(0),2)[1];return Object(r.useCallback)((function(){t((function(t){return t+1}))}),[])}function a(t){if(!t||"object"!==typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}function s(t){return"function"===typeof Symbol?Symbol.for(t):"__$mobx-react "+t+"__"}var u={};function l(){return"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:u}}).call(this,n(36))},function(t,e,n){"use strict";var r=n(1);e.a=new class{constructor(t={}){Object(r.a)(this,"_pool",[]),Object(r.a)(this,"opts",{overAlloc:2,poolSize:100}),this.setOptions(t)}setOptions(t){Object.assign(this.opts,t)}allocate(t,e,{size:n=1,type:r,padding:i=0,copy:o=!1,initialize:a=!1,maxCount:s}){const u=r||t&&t.constructor||Float32Array,l=e*n+i;if(ArrayBuffer.isView(t)){if(l<=t.length)return t;if(l*t.BYTES_PER_ELEMENT<=t.buffer.byteLength)return new u(t.buffer,0,l)}let c=1/0;s&&(c=s*n+i);const f=this._allocate(u,l,a,c);return t&&o?f.set(t):a||f.fill(0,0,4),this._release(t),f}release(t){this._release(t)}_allocate(t,e,n,r){let i=Math.max(Math.ceil(e*this.opts.overAlloc),1);i>r&&(i=r);const o=this._pool,a=t.BYTES_PER_ELEMENT*i,s=o.findIndex((t=>t.byteLength>=a));if(s>=0){const e=new t(o.splice(s,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}=t,{byteLength:r}=n,i=e.findIndex((t=>t.byteLength>=r));i<0?e.push(n):(i>0||e.length<this.opts.poolSize)&&e.splice(i,0,n),e.length>this.opts.poolSize&&e.shift()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIntermediatePosition=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},e.GeoJsonEditMode=void 0;var r=l(n(984)),i=l(n(331)),o=l(n(985)),a=l(n(982)),s=n(157),u=n(258);function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(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.")}()}function f(t,e){if(t){if("string"===typeof t)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(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 p(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)}}var d={type:"FeatureCollection",features:[]},m=[],g=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=[],(n="_clickSequence")in(e=this)?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,l;return e=t,(n=[{key:"getGuides",value:function(t){return d}},{key:"getTooltips",value:function(t){return m}},{key:"getSelectedFeature",value:function(t){return 1===t.selectedIndexes.length?t.data.features[t.selectedIndexes[0]]:null}},{key:"getSelectedGeometry",value:function(t){var e=this.getSelectedFeature(t);return e?e.geometry:null}},{key:"getSelectedFeaturesAsFeatureCollection",value:function(t){var e=t.data.features;return{type:"FeatureCollection",features:t.selectedIndexes.map((function(t){return e[t]}))}}},{key:"getClickSequence",value:function(){return this._clickSequence}},{key:"addClickSequence",value:function(t){var e=t.mapCoords;this._clickSequence.push(e)}},{key:"resetClickSequence",value:function(){this._clickSequence=[]}},{key:"getTentativeGuide",value:function(t){return this.getGuides(t).features.find((function(t){return t.properties&&"tentative"===t.properties.guideType}))}},{key:"isSelectionPicked",value:function(t,e){if(!t.length)return!1;var n=(0,s.getNonGuidePicks)(t).map((function(t){return t.index})),r=(0,s.getPickedEditHandles)(t).map((function(t){return t.properties.featureIndex})),i=new Set([].concat(c(n),c(r)));return e.selectedIndexes.some((function(t){return i.has(t)}))}},{key:"rewindPolygon",value:function(t){var e=t.geometry;return"Polygon"===e.type||"MultiPolygon"===e.type?(0,a.default)(t):t}},{key:"getAddFeatureAction",value:function(t,e){var n=t,r="Feature"===n.type?n:{type:"Feature",properties:{},geometry:n},i=this.rewindPolygon(r),o=new u.ImmutableFeatureCollection(e).addFeature(i).getObject();return{updatedData:o,editType:"addFeature",editContext:{featureIndexes:[o.features.length-1]}}}},{key:"getAddManyFeaturesAction",value:function(t,e){var n,r=t.features,i=new u.ImmutableFeatureCollection(e),o=i.getObject().features.length,a=[],s=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=f(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(r);try{for(s.s();!(n=s.n()).done;){var l=n.value,c=l.properties,h=l.geometry;i=i.addFeature({type:"Feature",properties:c,geometry:h}),a.push(o+a.length)}}catch(p){s.e(p)}finally{s.f()}return{updatedData:i.getObject(),editType:"addFeature",editContext:{featureIndexes:a}}}},{key:"getAddFeatureOrBooleanPolygonAction",value:function(t,e){var n=t,a=this.getSelectedFeature(e),s=e.modeConfig;if(s&&s.booleanOperation){if(!a||"Polygon"!==a.geometry.type&&"MultiPolygon"!==a.geometry.type)return console.warn("booleanOperation only supported for single Polygon or MultiPolygon selection"),null;var l,c="Feature"===n.type?n:{type:"Feature",geometry:n};if("union"===s.booleanOperation)l=(0,r.default)(a,c);else if("difference"===s.booleanOperation)l=(0,i.default)(a,c);else{if("intersection"!==s.booleanOperation)return console.warn("Invalid booleanOperation ".concat(s.booleanOperation)),null;l=(0,o.default)(a,c)}if(!l)return console.warn("Canceling edit. Boolean operation erased entire polygon."),null;var f=e.selectedIndexes[0];return{updatedData:new u.ImmutableFeatureCollection(e.data).replaceGeometry(f,l.geometry).getObject(),editType:"unionGeometry",editContext:{featureIndexes:[f]}}}return this.getAddFeatureAction(t,e.data)}},{key:"createTentativeFeature",value:function(t){return null}},{key:"handleClick",value:function(t,e){}},{key:"handlePointerMove",value:function(t,e){var n=this.createTentativeFeature(e);n&&e.onEdit({updatedData:e.data,editType:"updateTentativeFeature",editContext:{feature:n}})}},{key:"handleStartDragging",value:function(t,e){}},{key:"handleStopDragging",value:function(t,e){}},{key:"handleDragging",value:function(t,e){}},{key:"handleKeyUp",value:function(t,e){"Escape"===t.key&&(this.resetClickSequence(),e.onEdit({updatedData:e.data,editType:"cancelFeature",editContext:{}}))}}])&&p(e.prototype,n),l&&p(e,l),t}();e.GeoJsonEditMode=g},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(1),i=n(351),o=n(98);const a={transitionDuration:0},s=t=>1-(1-t)*(1-t),u=["wheel"],l=["panstart","panmove","panend"],c=["pinchstart","pinchmove","pinchend"],f=["tripanstart","tripanmove","tripanend"],h=["doubletap"],p=["keydown"],d={};class m{constructor(t){Object(r.a)(this,"props",void 0),Object(r.a)(this,"state",{}),Object(r.a)(this,"transitionManager",void 0),Object(r.a)(this,"eventManager",void 0),Object(r.a)(this,"onViewStateChange",void 0),Object(r.a)(this,"onStateChange",void 0),Object(r.a)(this,"makeViewport",void 0),Object(r.a)(this,"_controllerState",void 0),Object(r.a)(this,"_events",{}),Object(r.a)(this,"_interactionState",{isDragging:!1}),Object(r.a)(this,"_customEvents",[]),Object(r.a)(this,"_eventStartBlocked",null),Object(r.a)(this,"_panMove",!1),Object(r.a)(this,"invertPan",!1),Object(r.a)(this,"dragMode","rotate"),Object(r.a)(this,"inertia",0),Object(r.a)(this,"scrollZoom",!0),Object(r.a)(this,"dragPan",!0),Object(r.a)(this,"dragRotate",!0),Object(r.a)(this,"doubleClickZoom",!0),Object(r.a)(this,"touchZoom",!0),Object(r.a)(this,"touchRotate",!1),Object(r.a)(this,"keyboard",!0),this.transitionManager=new i.b({...t,getControllerState:t=>new this.ControllerState(t),onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)}),this.handleEvent=this.handleEvent.bind(this),this.eventManager=t.eventManager,this.onViewStateChange=t.onViewStateChange||(()=>{}),this.onStateChange=t.onStateChange||(()=>{}),this.makeViewport=t.makeViewport}set events(t){this.toggleEvents(this._customEvents,!1),this.toggleEvents(t,!0),this._customEvents=t,this.props&&this.setProps(this.props)}finalize(){for(const e in this._events){var t;if(this._events[e])null===(t=this.eventManager)||void 0===t||t.off(e,this.handleEvent)}this.transitionManager.finalize()}handleEvent(t){this._controllerState=void 0;const 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}}get controllerState(){return this._controllerState=this._controllerState||new this.ControllerState({makeViewport:this.makeViewport,...this.props,...this.state}),this._controllerState}getCenter(t){const{x:e,y:n}=this.props,{offsetCenter:r}=t;return[r.x-e,r.y-n]}isPointInBounds(t,e){const{width:n,height:r}=this.props;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||!1}blockEvents(t){const e=setTimeout((()=>{this._eventStartBlocked===e&&(this._eventStartBlocked=null)}),t);this._eventStartBlocked=e}setProps(t){t.dragMode&&(this.dragMode=t.dragMode),this.props=t,"transitionInterpolator"in t||(t.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(t);const{inertia:e}=t;this.inertia=Number.isFinite(e)?e:!0===e?300:0;const{scrollZoom:n=!0,dragPan:r=!0,dragRotate:i=!0,doubleClickZoom:o=!0,touchZoom:a=!0,touchRotate:s=!1,keyboard:d=!0}=t,m=Boolean(this.onViewStateChange);this.toggleEvents(u,m&&n),this.toggleEvents(l,m&&(r||i)),this.toggleEvents(c,m&&(a||s)),this.toggleEvents(f,m&&s),this.toggleEvents(h,m&&o),this.toggleEvents(p,m&&d),this.scrollZoom=n,this.dragPan=r,this.dragRotate=i,this.doubleClickZoom=o,this.touchZoom=a,this.touchRotate=s,this.keyboard=d}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=null,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();this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:this._interactionState,oldViewState:t})}}_onTransition(t){this.onViewStateChange({...t,interactionState:this._interactionState})}_setInteractionState(t){Object.assign(this._interactionState,t),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||!1;(this.invertPan||"pan"===this.dragMode)&&(n=!n);const r=this.controllerState[n?"panStart":"rotateStart"]({pos:e});return this._panMove=n,this.updateViewport(r,a,{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,a,{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:s},{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,a,{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:s},{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.srcEvent.preventDefault();const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;const{speed:n=.01,smooth:r=!1}=!0===this.scrollZoom?{}:this.scrollZoom,{delta:i}=t;let o=2/(1+Math.exp(-Math.abs(i*n)));i<0&&0!==o&&(o=1/o);const a=this.controllerState.zoom({pos:e,scale:o});return this.updateViewport(a,{...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,a,{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,a,{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:s},{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 d._startPinchRotation=t.rotation,d._lastPinchEvent=t,this.updateViewport(n,a,{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:d._startPinchRotation-n})}return this.updateViewport(e,a,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),d._lastPinchEvent=t,!0}_onPinchEnd(t){if(!this.isDragging())return!1;const{inertia:e}=this,{_lastPinchEvent:n}=d;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),a=(o-Math.log2(n.scale))/(t.deltaTime-n.deltaTime),u=Math.pow(2,o+a*e/2);i=i.zoom({pos:r,scale:u}).zoomEnd(),this.updateViewport(i,{...this._getTransitionProps({around:r}),transitionDuration:e,transitionEasing:s},{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 d._startPinchRotation=null,d._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}=!0===this.keyboard?{}:this.keyboard,{controllerState:a}=this;let s;const u={};switch(t.srcEvent.code){case"Minus":s=e?a.zoomOut(n).zoomOut(n):a.zoomOut(n),u.isZooming=!0;break;case"Equal":s=e?a.zoomIn(n).zoomIn(n):a.zoomIn(n),u.isZooming=!0;break;case"ArrowLeft":e?(s=a.rotateLeft(i),u.isRotating=!0):(s=a.moveLeft(r),u.isPanning=!0);break;case"ArrowRight":e?(s=a.rotateRight(i),u.isRotating=!0):(s=a.moveRight(r),u.isPanning=!0);break;case"ArrowUp":e?(s=a.rotateUp(o),u.isRotating=!0):(s=a.moveUp(r),u.isPanning=!0);break;case"ArrowDown":e?(s=a.rotateDown(o),u.isRotating=!0):(s=a.moveDown(r),u.isPanning=!0);break;default:return!1}return this.updateViewport(s,this._getTransitionProps(),u),!0}_getTransitionProps(t){const{transition:e}=this;return e&&e.transitionInterpolator?t?{...e,transitionInterpolator:new o.a({...t,...e.transitionInterpolator.opts,makeViewport:this.controllerState.makeViewport})}:e:a}}},function(t,e,n){"use strict";n.r(e);var r=n(2);function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=r.types.model("ImageModel",{id:r.types.maybeNull(r.types.integer),name:r.types.string,description:r.types.maybeNull(r.types.string),credit:r.types.maybeNull(r.types.string),url:r.types.maybeNull(r.types.string),rights_statement:r.types.maybeNull(r.types.string),source_link:r.types.maybeNull(r.types.string),identifier:r.types.maybeNull(r.types.string),transcription:r.types.maybeNull(r.types.string),license:r.types.maybeNull(r.types.string),type:"image",width:r.types.maybeNull(r.types.integer),height:r.types.maybeNull(r.types.integer)}).preProcessSnapshot((function(t){if(t)return t.image?t.image:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)}));e.default=a},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1),i=n(76),o=n(24),a=n(26),s=n(61);const u=Math.PI/180;function l(t){return 512/4003e4/Math.cos(t*u)}class c extends i.a{constructor(t={}){const{latitude:e=0,longitude:n=0,zoom:i=0,pitch:a=0,bearing:u=0,nearZMultiplier:l=.1,farZMultiplier:c=1.01,orthographic:f=!1,projectionMatrix:h,repeat:p=!1,worldOffset:d=0,legacyMeterSizes:m=!1}=t;let{width:g,height:y,altitude:v=1.5}=t;const b=Math.pow(2,i);let _;g=g||1,y=y||1;let A=null;h?(v=h[5]/2,_=Object(o.c)(v)):(t.fovy?(_=t.fovy,v=Object(o.f)(_)):_=Object(o.c)(v),A=Object(o.k)({width:g,height:y,pitch:a,fovy:_,nearZMultiplier:l,farZMultiplier:c}));let w=Object(o.l)({height:y,pitch:a,bearing:u,scale:b,altitude:v});if(d){w=(new s.a).translate([512*d,0,0]).multiplyLeft(w)}super({...t,width:g,height:y,viewMatrix:w,longitude:n,latitude:e,zoom:i,...A,fovy:_,focalDistance:v}),Object(r.a)(this,"longitude",void 0),Object(r.a)(this,"latitude",void 0),Object(r.a)(this,"pitch",void 0),Object(r.a)(this,"bearing",void 0),Object(r.a)(this,"altitude",void 0),Object(r.a)(this,"fovy",void 0),Object(r.a)(this,"orthographic",void 0),Object(r.a)(this,"_subViewports",void 0),Object(r.a)(this,"_pseudoMeters",void 0),this.latitude=e,this.longitude=n,this.zoom=i,this.pitch=a,this.bearing=u,this.altitude=v,this.fovy=_,this.orthographic=f,this._subViewports=p?[]:null,this._pseudoMeters=m,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 c({...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)*l(t[1])]}unprojectPosition(t){if(this._pseudoMeters)return super.unprojectPosition(t);const[e,n]=this.unprojectFlat(t);return[e,n,(t[2]||0)/l(n)]}addMetersToLngLat(t,e){return Object(o.b)(t,e)}panByPosition(t,e){const n=Object(o.o)(e,this.pixelUnprojectionMatrix),r=this.projectFlat(t),i=a.a([],r,a.d([],n)),s=a.a([],this.center,i),[u,l]=this.unprojectFlat(s);return{longitude:u,latitude:l}}getBounds(t={}){const e=Object(o.g)(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:i,latitude:a,zoom:s}=Object(o.d)({width:n,height:r,bounds:t,...e});return new c({width:n,height:r,longitude:i,latitude:a,zoom:s})}}Object(r.a)(c,"displayName","WebMercatorViewport")},function(t,e,n){t.exports={ToolbarButton:"ToolbarButton-module__ToolbarButton___27XF_",isCurrent:"ToolbarButton-module__isCurrent___2nEMU","icon--marker":"ToolbarButton-module__icon--marker___2SCLd","icon--line":"ToolbarButton-module__icon--line___1Ftzo","icon--select":"ToolbarButton-module__icon--select___3KSMW","icon--measure":"ToolbarButton-module__icon--measure___2FkVC","icon--polygon":"ToolbarButton-module__icon--polygon___1_oQr","icon--trace":"ToolbarButton-module__icon--trace___3sd0z","icon--delete":"ToolbarButton-module__icon--delete___2jvVY","icon--move":"ToolbarButton-module__icon--move___1XXOz","icon--edit-metadata":"ToolbarButton-module__icon--edit-metadata___2HOtd","icon--combine":"ToolbarButton-module__icon--combine___1O0de","icon--cut-away":"ToolbarButton-module__icon--cut-away___1RtNM","icon--magnet":"ToolbarButton-module__icon--magnet___2I5s0",disabled:"ToolbarButton-module__disabled___12LWo",hasSubmenuOpen:"ToolbarButton-module__hasSubmenuOpen___24hCC",isToggle:"ToolbarButton-module__isToggle___2YpiM",isActive:"ToolbarButton-module__isActive___1GUzr"}},function(t,e,n){t.exports={Colophon:"ColophonAndLog-module__Colophon___1eO0F",counts:"ColophonAndLog-module__counts___1dKn2",views:"ColophonAndLog-module__views___vMRU7",favourites:"ColophonAndLog-module__favourites___q2BZe",profile:"ColophonAndLog-module__profile___3dGbV",textContent:"ColophonAndLog-module__textContent___DjV0p",date:"ColophonAndLog-module__date___3q0_Q",row:"ColophonAndLog-module__row___3d8FO",ActivityLog:"ColophonAndLog-module__ActivityLog___uwi9V"}},function(t,e,n){"use strict";e.__esModule=!0,e.StyledIcon=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=r?Object.getOwnPropertyDescriptor(t,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=t[i]}n.default=t,e&&e.set(t,n);return n}(n(4)),a=n(1301),s=n(1218);function u(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function l(){return l=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},l.apply(this,arguments)}var c=(0,o.css)([""," ",' g{fill:inherit;stroke:inherit;}*:not([stroke]){&[fill="none"]{stroke-width:0;}}*[stroke*="#"],*[STROKE*="#"]{stroke:inherit;fill:none;}*[fill-rule],*[FILL-RULE],*[fill*="#"],*[FILL*="#"]{fill:inherit;stroke:none;}'],(function(t){return(0,a.colorStyle)("fill",t.color||t.theme.global.colors.icon,t.theme)}),(function(t){return(0,a.colorStyle)("stroke",t.color||t.theme.global.colors.icon,t.theme)})),f=function(t){var e=t.a11yTitle,n=(t.color,t.size,t.theme,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,["a11yTitle","color","size","theme"]));return i.default.createElement("svg",l({"aria-label":e},n))};f.displayName="Icon";var h=(0,o.default)(f).withConfig({displayName:"StyledIcon",componentId:"ofa7kd-0"})(["display:inline-block;flex:0 0 auto;"," "," ",""],(function(t){var e,n=t.size,r=void 0===n?"medium":n,i=t.theme,o=(t.viewBox||"0 0 24 24").split(" "),a=o[2],s=o[3],u=a/s,l=(e=i.icon.size[r]||r,parseFloat(e.match(/\d+(\.\d+)?/),10));return a<s?"\n      width: "+l+"px;\n      height: "+l/u+"px;\n    ":s<a?"\n      width: "+l*u+"px;\n      height: "+l+"px;\n    ":"\n      width: "+l+"px;\n      height: "+l+"px;\n    "}),(function(t){return"plain"!==t.color&&c}),(function(t){var e=t.theme;return e&&e.icon.extend}));e.StyledIcon=h,h.defaultProps={},Object.setPrototypeOf(h.defaultProps,s.defaultProps)},function(t,e,n){"use strict";n.r(e);var r=n(182),i=n(34);e.default=function(t,e,n){void 0===n&&(n={});var o=Object(r.getCoord)(t),a=Object(r.getCoord)(e),s=Object(i.degreesToRadians)(a[1]-o[1]),u=Object(i.degreesToRadians)(a[0]-o[0]),l=Object(i.degreesToRadians)(o[1]),c=Object(i.degreesToRadians)(a[1]),f=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return Object(i.radiansToLength)(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)}},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1),i=n(76);const o=/([0-9]+\.?[0-9]*)(%|px)/;function a(t){switch(typeof t){case"number":return{position:t,relative:!1};case"string":const e=o.exec(t);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 u=n(101),l=n(42);class c{constructor(t){Object(r.a)(this,"id",void 0),Object(r.a)(this,"viewportInstance",void 0),Object(r.a)(this,"_x",void 0),Object(r.a)(this,"_y",void 0),Object(r.a)(this,"_width",void 0),Object(r.a)(this,"_height",void 0),Object(r.a)(this,"_padding",void 0),Object(r.a)(this,"props",void 0);const{id:e,x:n=0,y:o=0,width:s="100%",height:u="100%",padding:c=null,viewportInstance:f}=t||{};Object(l.a)(!f||f instanceof i.a),this.viewportInstance=f,this.id=e||this.constructor.displayName||"view",this.props={...t,id:this.id},this._x=a(n),this._y=a(o),this._width=a(s),this._height=a(u),this._padding=c&&{left:a(c.left||0),right:a(c.right||0),top:a(c.top||0),bottom:a(c.bottom||0)},this.equals=this.equals.bind(this),Object.seal(this)}equals(t){return this===t||(this.viewportInstance?!!t.viewportInstance&&this.viewportInstance.equals(t.viewportInstance):this.ViewportType===t.ViewportType&&Object(u.a)(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 new this.ViewportType({...n,...this.props,...r})}getViewStateId(){const{viewState:t}=this.props;return"string"===typeof t?t:(null===t||void 0===t?void 0:t.id)||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}){const n={x:s(this._x,t),y:s(this._y,e),width:s(this._width,t),height:s(this._height,e)};return this._padding&&(n.padding={left:s(this._padding.left,t),top:s(this._padding.top,e),right:s(this._padding.right,t),bottom:s(this._padding.bottom,e)}),n}get controller(){const t=this.props.controller;return t?!0===t?{type:this.ControllerType}:"function"===typeof t?{type:t}:{type:this.ControllerType,...t}:null}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1);class i{constructor(t){Object(r.a)(this,"_inProgress",void 0),Object(r.a)(this,"_handle",void 0),Object(r.a)(this,"_timeline",void 0),Object(r.a)(this,"time",void 0),Object(r.a)(this,"settings",void 0),this._inProgress=!1,this._handle=null,this._timeline=t,this.time=0,this.settings={duration:0}}get inProgress(){return this._inProgress}start(t){var e,n;this.cancel(),this.settings=t,this._inProgress=!0,null===(e=(n=this.settings).onStart)||void 0===e||e.call(n,this)}end(){var t,e;this._inProgress&&(this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,null===(t=(e=this.settings).onEnd)||void 0===t||t.call(e,this))}cancel(){var t,e;this._inProgress&&(null===(t=(e=this.settings).onInterrupt)||void 0===t||t.call(e,this),this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}update(){var t,e;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(),null===(t=(e=this.settings).onUpdate)||void 0===t||t.call(e,this),this._timeline.isFinished(this._handle)&&this.end(),!0}_onUpdate(){}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r=n(6),i=n(59),o=n(173),a=n(176),s=n(316),u=n(411),l=n(608),c=n(74),f=n(10);const h="Multiple render targets not supported";class p extends i.a{get[Symbol.toStringTag](){return"Framebuffer"}static isSupported(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 p(t,{id:"default-framebuffer",handle:null,attachments:{}}),t.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const t=Object(r.a)(this.gl);return t.getParameter(t.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const t=Object(r.a)(this.gl);return t.getParameter(t.MAX_DRAW_BUFFERS)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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(t){let{width:e=1,height:n=1,attachments:r=null,color:i=!0,depth:o=!0,stencil:a=!1,check:s=!0,readBuffer:u,drawBuffers:l}=t;if(Object(f.a)(e>=0&&n>=0,"Width and height need to be integers"),this.width=e,this.height=n,r)for(const c in r){const t=r[c];(Array.isArray(t)?t[0]:t).resize({width:e,height:n})}else r=this._createDefaultAttachments(i,o,a,e,n);this.update({clearAttachments:!0,attachments:r,readBuffer:u,drawBuffers:l}),r&&s&&this.checkStatus()}delete(){for(const t of this.ownResources)t.delete();return super.delete(),this}update(t){let{attachments:e={},readBuffer:n,drawBuffers:r,clearAttachments:i=!1,resizeAttachments:o=!0}=t;this.attach(e,{clearAttachments:i,resizeAttachments:o});const{gl:a}=this,s=a.bindFramebuffer(36160,this.handle);return n&&this._setReadBuffer(n),r&&this._setDrawBuffers(r),a.bindFramebuffer(36160,s||null),this}resize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{width:e,height:n}=t;if(null===this.handle)return Object(f.a)(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.k.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(e,"x").concat(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){let{clearAttachments:e=!1,resizeAttachments:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};e&&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){Object(f.a)(void 0!==o,"Misspelled framebuffer binding point?");const t=Number(o),e=r[t];let i=e;if(i)if(i instanceof a.a)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(p.STATUS||{})[t]||"Framebuffer error ".concat(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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:e,depth:n,stencil:r,drawBuffers:i=[]}=t,o=this.gl.bindFramebuffer(36160,this.handle);return(e||n||r)&&Object(s.a)(this.gl,{color:e,depth:n,stencil:r}),i.forEach(((t,e)=>{Object(s.b)(this.gl,{drawBuffer:e,value:t})})),this.gl.bindFramebuffer(36160,o||null),this}readPixels(){return r.k.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(){return r.k.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(){return r.k.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(){return r.k.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(){return r.k.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(){return r.k.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}invalidate(t){let{attachments:e=[],x:n=0,y:i=0,width:o,height:a}=t;const s=Object(r.a)(this.gl),u=s.bindFramebuffer(36008,this.handle);return 0===n&&0===i&&void 0===o&&void 0===a?s.invalidateFramebuffer(36008,e):s.invalidateFramebuffer(36008,e,n,i,o,a),s.bindFramebuffer(36008,u),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=Object(c.a)(this.gl,r)),r}getAttachmentParameters(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[];const r={};for(const i of n){r[e?Object(c.a)(this.gl,i):i]=this.getAttachmentParameter(t,i,e)}return r}getParameters(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=Object.keys(this.attachments),n={};for(const r of e){const e=Number(r);n[t?Object(c.a)(this.gl,e):e]=this.getAttachmentParameters(e,t)}return n}show(){return"undefined"!==typeof window&&window.open(Object(u.a)(this),"luma-debug-texture"),this}log(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t>r.k.level||"undefined"===typeof window)return this;e=e||"Framebuffer ".concat(this.id);const n=Object(u.a)(this,{targetMaxHeight:100});return r.k.image({logLevel:t,message:e,image:n},e)(),this}bind(){let{target:t=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(t,this.handle),this}unbind(){let{target:t=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(t,null),this}_createDefaultAttachments(t,e,n,r,i){let s=null;return t&&(s=s||{},s[36064]=new o.a(this.gl,{id:"".concat(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(s[36064])),e&&n?(s=s||{},s[33306]=new a.a(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:r,height:111}),this.ownResources.push(s[33306])):e?(s=s||{},s[36096]=new a.a(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(s[36096])):n&&Object(f.a)(!1),s}_unattach(t){const e=this.attachments[t];e&&(e instanceof a.a?this.gl.framebufferRenderbuffer(36160,t,36161,null):this.gl.framebufferTexture2D(36160,t,3553,null,0),delete this.attachments[t])}_attachRenderbuffer(t){let{attachment:e=36064,renderbuffer:n}=t;const{gl:r}=this;r.framebufferRenderbuffer(36160,e,36161,n.handle),this.attachments[e]=n}_attachTexture(t){let{attachment:e=36064,texture:n,layer:i,level:o}=t;const{gl:a}=this;switch(a.bindTexture(n.target,n.handle),n.target){case 35866:case 32879:Object(r.a)(a).framebufferTextureLayer(36160,e,n.target,o,i);break;case 34067:const t=function(t){return t<34069?t+34069:t}(i);a.framebufferTexture2D(36160,e,t,n.handle,o);break;case 3553:a.framebufferTexture2D(36160,e,3553,n.handle,o);break;default:Object(f.a)(!1,"Illegal texture type")}a.bindTexture(n.target,null),this.attachments[e]=n}_setReadBuffer(t){const e=Object(r.g)(this.gl);e?e.readBuffer(t):Object(f.a)(36064===t||1029===t,h),this.readBuffer=t}_setDrawBuffers(t){const{gl:e}=this,n=Object(r.a)(e);if(n)n.drawBuffers(t);else{const n=e.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(t):Object(f.a)(1===t.length&&(36064===t[0]||1029===t[0]),h)}this.drawBuffers=t}_getAttachmentParameterFallback(t){const e=Object(l.a)(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)}}p.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(1),i=n(241);class o{constructor(t,e){Object(r.a)(this,"name",void 0),Object(r.a)(this,"type",void 0),Object(r.a)(this,"sampleSize",1),Object(r.a)(this,"time",void 0),Object(r.a)(this,"count",void 0),Object(r.a)(this,"samples",void 0),Object(r.a)(this,"lastTiming",void 0),Object(r.a)(this,"lastSampleTime",void 0),Object(r.a)(this,"lastSampleCount",void 0),Object(r.a)(this,"_count",0),Object(r.a)(this,"_time",0),Object(r.a)(this,"_samples",0),Object(r.a)(this,"_startTime",0),Object(r.a)(this,"_timerPending",!1),this.name=t,this.type=e,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=Object(i.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(i.a)()-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 a{constructor(t){Object(r.a)(this,"id",void 0),Object(r.a)(this,"stats",{}),this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"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(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).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]}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));const r="vs",i="fs"},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var r=n(1),i=n(368),o=n(310);var a=n(146),s=n(243),u=n(261),l=n(198),c=n(197);const f={circle:{type:s.a,props:{filled:"filled",stroked:"stroked",lineWidthMaxPixels:"lineWidthMaxPixels",lineWidthMinPixels:"lineWidthMinPixels",lineWidthScale:"lineWidthScale",lineWidthUnits:"lineWidthUnits",pointRadiusMaxPixels:"radiusMaxPixels",pointRadiusMinPixels:"radiusMinPixels",pointRadiusScale:"radiusScale",pointRadiusUnits:"radiusUnits",pointAntialiasing:"antialiasing",pointBillboard:"billboard",getFillColor:"getFillColor",getLineColor:"getLineColor",getLineWidth:"getLineWidth",getPointRadius:"getRadius"}},icon:{type:a.a,props:{iconAtlas:"iconAtlas",iconMapping:"iconMapping",iconSizeMaxPixels:"sizeMaxPixels",iconSizeMinPixels:"sizeMinPixels",iconSizeScale:"sizeScale",iconSizeUnits:"sizeUnits",iconAlphaCutoff:"alphaCutoff",iconBillboard:"billboard",getIcon:"getIcon",getIconAngle:"getAngle",getIconColor:"getColor",getIconPixelOffset:"getPixelOffset",getIconSize:"getSize"}},text:{type:u.a,props:{textSizeMaxPixels:"sizeMaxPixels",textSizeMinPixels:"sizeMinPixels",textSizeScale:"sizeScale",textSizeUnits:"sizeUnits",textBackground:"background",textBackgroundPadding:"backgroundPadding",textFontFamily:"fontFamily",textFontWeight:"fontWeight",textLineHeight:"lineHeight",textMaxWidth:"maxWidth",textOutlineColor:"outlineColor",textOutlineWidth:"outlineWidth",textWordBreak:"wordBreak",textCharacterSet:"characterSet",textBillboard:"billboard",textFontSettings:"fontSettings",getText:"getText",getTextAngle:"getAngle",getTextColor:"getColor",getTextPixelOffset:"getPixelOffset",getTextSize:"getSize",getTextAnchor:"getTextAnchor",getTextAlignmentBaseline:"getAlignmentBaseline",getTextBackgroundColor:"getBackgroundColor",getTextBorderColor:"getBorderColor",getTextBorderWidth:"getBorderWidth"}}},h={type:l.a,props:{lineWidthUnits:"widthUnits",lineWidthScale:"widthScale",lineWidthMinPixels:"widthMinPixels",lineWidthMaxPixels:"widthMaxPixels",lineJointRounded:"jointRounded",lineCapRounded:"capRounded",lineMiterLimit:"miterLimit",lineBillboard:"billboard",getLineColor:"getColor",getLineWidth:"getWidth"}},p={type:c.a,props:{extruded:"extruded",filled:"filled",wireframe:"wireframe",elevationScale:"elevationScale",material:"material",getElevation:"getElevation",getFillColor:"getFillColor",getLineColor:"getLineColor"}};function d({type:t,props:e}){const n={};for(const r in e)n[r]=t.defaultProps[e[r]];return n}function m(t,e){const{transitions:n,updateTriggers:r}=t.props,i={updateTriggers:{},transitions:n&&{getPosition:n.geometry}};for(const o in e){const a=e[o];let s=t.props[o];o.startsWith("get")&&(s=t.getSubLayerAccessor(s),i.updateTriggers[a]=r[o],n&&(i.transitions[a]=n[o])),i[a]=s}return i}var g=n(27);function y(t,e,n={}){const r={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},{startRow:i=0,endRow:o=t.length}=n;for(let a=i;a<o;a++){const n=t[a],{geometry:i}=n;if(i)if("GeometryCollection"===i.type){g.a.assert(Array.isArray(i.geometries),"GeoJSON does not have geometries array");const{geometries:t}=i;for(let i=0;i<t.length;i++){v(t[i],r,e,n,a)}}else v(i,r,e,n,a)}return r}function v(t,e,n,r,i){const{type:o,coordinates:a}=t,{pointFeatures:s,lineFeatures:u,polygonFeatures:l,polygonOutlineFeatures:c}=e;if(function(t,e){let n=b[t];g.a.assert(n,"Unknown GeoJSON type ".concat(t));for(;e&&--n>0;)e=e[0];return e&&Number.isFinite(e[0])}(o,a))switch(o){case"Point":s.push(n({geometry:t},r,i));break;case"MultiPoint":a.forEach((t=>{s.push(n({geometry:{type:"Point",coordinates:t}},r,i))}));break;case"LineString":u.push(n({geometry:t},r,i));break;case"MultiLineString":a.forEach((t=>{u.push(n({geometry:{type:"LineString",coordinates:t}},r,i))}));break;case"Polygon":l.push(n({geometry:t},r,i)),a.forEach((t=>{c.push(n({geometry:{type:"LineString",coordinates:t}},r,i))}));break;case"MultiPolygon":a.forEach((t=>{l.push(n({geometry:{type:"Polygon",coordinates:t}},r,i)),t.forEach((t=>{c.push(n({geometry:{type:"LineString",coordinates:t}},r,i))}))}))}else g.a.warn("".concat(o," coordinates are malformed"))()}const b={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function _(t){return t.geometry.coordinates}function A(t,e){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{points:r,lines:i,polygons:o}=t,a=function(t,e){const n={points:null,lines:null,polygons:null};for(const r in n){const i=t[r].globalFeatureIds.value;n[r]=new Uint8ClampedArray(3*i.length);const o=[];for(let t=0;t<i.length;t++)e(i[t],o),n[r][3*t+0]=o[0],n[r][3*t+1]=o[1],n[r][3*t+2]=o[2]}return n}(t,e);return n.points.data={length:r.positions.value.length/r.positions.size,attributes:{...r.attributes,getPosition:r.positions,instancePickingColors:{size:3,value:a.points}},properties:r.properties,numericProps:r.numericProps,featureIds:r.featureIds},n.lines.data={length:i.pathIndices.value.length-1,startIndices:i.pathIndices.value,attributes:{...i.attributes,getPath:i.positions,instancePickingColors:{size:3,value:a.lines}},properties:i.properties,numericProps:i.numericProps,featureIds:i.featureIds},n.lines._pathType="open",n.polygons.data={length:o.polygonIndices.value.length-1,startIndices:o.polygonIndices.value,attributes:{...o.attributes,getPolygon:o.positions,pickingColors:{size:3,value:a.polygons}},properties:o.properties,numericProps:o.numericProps,featureIds:o.featureIds},n.polygons._normalize=!1,o.triangles&&(n.polygons.data.attributes.indices=o.triangles.value),n.polygonsOutline.data={length:o.primitivePolygonIndices.value.length-1,startIndices:o.primitivePolygonIndices.value,attributes:{...o.attributes,getPath:o.positions,instancePickingColors:{size:3,value:a.polygons}},properties:o.properties,numericProps:o.numericProps,featureIds:o.featureIds},n.polygonsOutline._pathType="open",n}const w=["points","linestrings","polygons"],x={...d(f.circle),...d(f.icon),...d(f.text),...d(h),...d(p),stroked:!0,filled:!0,extruded:!1,wireframe:!1,iconAtlas:{type:"object",value:null},iconMapping:{type:"object",value:{}},getIcon:{type:"accessor",value:t=>t.properties.icon},getText:{type:"accessor",value:t=>t.properties.text},pointType:"circle",getRadius:{deprecatedFor:"getPointRadius"}};class E extends i.a{initializeState(){this.state={layerProps:{},features:{}}}updateState({props:t,changeFlags:e}){if(!e.dataChanged)return;const{data:n}=this.props,r=n&&"points"in n&&"polygons"in n&&"lines"in n;this.setState({binary:r}),r?this._updateStateBinary({props:t,changeFlags:e}):this._updateStateJSON({props:t,changeFlags:e})}_updateStateBinary({props:t,changeFlags:e}){const n=A(t.data,this.encodePickingColor);this.setState({layerProps:n})}_updateStateJSON({props:t,changeFlags:e}){const n=function(t){if(Array.isArray(t))return t;switch(g.a.assert(t.type,"GeoJSON does not have type"),t.type){case"Feature":return[t];case"FeatureCollection":return g.a.assert(Array.isArray(t.features),"GeoJSON does not have features array"),t.features;default:return[{geometry:t}]}}(t.data),r=this.getSubLayerRow.bind(this);let i={};const a={};if(Array.isArray(e.dataChanged)){const t=this.state.features;for(const e in t)i[e]=t[e].slice(),a[e]=[];for(const s of e.dataChanged){const e=y(n,r,s);for(const n in t)a[n].push(Object(o.a)({data:i[n],getIndex:t=>t.__source.index,dataRange:s,replace:e[n]}))}}else i=y(n,r);const s=function(t,e){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{pointFeatures:r,lineFeatures:i,polygonFeatures:o,polygonOutlineFeatures:a}=t;return n.points.data=r,n.points._dataDiff=e.pointFeatures&&(()=>e.pointFeatures),n.points.getPosition=_,n.lines.data=i,n.lines._dataDiff=e.lineFeatures&&(()=>e.lineFeatures),n.lines.getPath=_,n.polygons.data=o,n.polygons._dataDiff=e.polygonFeatures&&(()=>e.polygonFeatures),n.polygons.getPolygon=_,n.polygonsOutline.data=a,n.polygonsOutline._dataDiff=e.polygonOutlineFeatures&&(()=>e.polygonOutlineFeatures),n.polygonsOutline.getPath=_,n}(i,a);this.setState({features:i,featuresDiff:a,layerProps:s})}getPickingInfo(t){const e=super.getPickingInfo(t),{index:n,sourceLayer:r}=e;return e.featureType=w.find((t=>r.id.startsWith("".concat(this.id,"-").concat(t,"-")))),n>=0&&r.id.startsWith("".concat(this.id,"-points-text"))&&this.state.binary&&(e.index=this.props.data.points.globalFeatureIds.value[n]),e}_updateAutoHighlight(t){const e="".concat(this.id,"-points-"),n="points"===t.featureType;for(const r of this.getSubLayers())r.id.startsWith(e)===n&&r.updateAutoHighlight(t)}_renderPolygonLayer(){const{extruded:t,wireframe:e}=this.props,{layerProps:n}=this.state,r="polygons-fill",i=this.shouldRenderSubLayer(r,n.polygons.data)&&this.getSubLayerClass(r,p.type);if(i){const o=m(this,p.props),a=t&&e;return a||delete o.getLineColor,o.updateTriggers.lineColors=a,new i(o,this.getSubLayerProps({id:r,updateTriggers:o.updateTriggers}),n.polygons)}return null}_renderLineLayers(){const{extruded:t,stroked:e}=this.props,{layerProps:n}=this.state,r="polygons-stroke",i="linestrings",o=!t&&e&&this.shouldRenderSubLayer(r,n.polygonsOutline.data)&&this.getSubLayerClass(r,h.type),a=this.shouldRenderSubLayer(i,n.lines.data)&&this.getSubLayerClass(i,h.type);if(o||a){const t=m(this,h.props);return[o&&new o(t,this.getSubLayerProps({id:r,updateTriggers:t.updateTriggers}),n.polygonsOutline),a&&new a(t,this.getSubLayerProps({id:i,updateTriggers:t.updateTriggers}),n.lines)]}return null}_renderPointLayers(){const{pointType:t}=this.props,{layerProps:e,binary:n}=this.state;let{highlightedObjectIndex:r}=this.props;!n&&Number.isFinite(r)&&(r=e.points.data.findIndex((t=>t.__source.index===r)));const i=new Set(t.split("+")),o=[];for(const a of i){const t="points-".concat(a),i=f[a],s=i&&this.shouldRenderSubLayer(t,e.points.data)&&this.getSubLayerClass(t,i.type);if(s){const u=m(this,i.props);let l=e.points;if("text"===a&&n){const{instancePickingColors:t,...e}=l.data.attributes;l={...l,data:{...l.data,attributes:e}}}o.push(new s(u,this.getSubLayerProps({id:t,updateTriggers:u.updateTriggers,highlightedObjectIndex:r}),l))}}return o}renderLayers(){const{extruded:t}=this.props,e=this._renderPolygonLayer();return[!t&&e,this._renderLineLayers(),this._renderPointLayers(),t&&e]}getSubLayerAccessor(t){const{binary:e}=this.state;return e&&"function"===typeof t?(e,n)=>{const{data:r,index:i}=n,o=function(t,e){if(!t)return null;const n="startIndices"in t?t.startIndices[e]:e,r=t.featureIds.value[n];return-1!==n?function(t,e,n){const r={properties:{...t.properties[e]}};for(const i in t.numericProps)r.properties[i]=t.numericProps[i].value[n];return r}(t,r,n):null}(r,i);return t(o,n)}:super.getSubLayerAccessor(t)}}Object(r.a)(E,"layerName","GeoJsonLayer"),Object(r.a)(E,"defaultProps",x)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1030),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:"".concat(a.a.TrayArticle," TrayArticle--").concat(t.layoutType)}," ",t.children)}},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),t.exports=n(634)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1),i=n(365),o=n(6),a=n(316);class s extends i.a{constructor(...t){super(...t),Object(r.a)(this,"_lastRenderIndex",-1)}render(t){const e=this.gl;return Object(o.n)(e,{framebuffer:t.target}),this._drawLayers(t)}_drawLayers(t){const{target:e,moduleParameters:n,viewports:r,views:i,onViewportActive:a,clearStack:s=!0,clearCanvas:u=!0}=t;t.pass=t.pass||"unknown";const l=this.gl;u&&function(t){const e=t.drawingBufferWidth,n=t.drawingBufferHeight;Object(o.n)(t,{viewport:[0,0,e,n]}),t.clear(16640)}(l),s&&(this._lastRenderIndex=-1);const c=[];for(const o of r){const r=i&&i[o.id];a(o);const s=this._getDrawLayerParams(o,t),u=o.subViewports||[o];for(const i of u){const o=this._drawLayersInViewport(l,{target:e,moduleParameters:n,viewport:i,view:r,pass:t.pass,layers:t.layers},s);c.push(o)}}return c}_getDrawLayerParams(t,{layers:e,pass:n,layerFilter:r,cullRect:i,effects:o,moduleParameters:a}){const s=[],l=u(this._lastRenderIndex+1),c={layer:e[0],viewport:t,isPicking:n.startsWith("picking"),renderPass:n,cullRect:i},f={};for(let u=0;u<e.length;u++){const i=e[u],h=this._shouldDrawLayer(i,c,r,f),p={shouldDrawLayer:h};h&&(p.layerRenderIndex=l(i,h),p.moduleParameters=this._getModuleParameters(i,o,n,a),p.layerParameters=this.getLayerParameters(i,u,t)),s[u]=p}return s}_drawLayersInViewport(t,{layers:e,moduleParameters:n,pass:r,target:i,viewport:s,view:u},l){const c=function(t,{moduleParameters:e,target:n,viewport:r}){const i=n&&"default-framebuffer"!==n.id,a=e&&e.devicePixelRatio||Object(o.e)(t),s=i?n.height:t.drawingBufferHeight,u=r;return[u.x*a,s-(u.y+u.height)*a,u.width*a,u.height*a]}(t,{moduleParameters:n,target:i,viewport:s});if(u&&u.props.clear){const e=!0===u.props.clear?{color:!0,depth:!0}:u.props.clear;Object(o.o)(t,{scissorTest:!0,scissor:c},(()=>Object(a.a)(t,e)))}const f={totalCount:e.length,visibleCount:0,compositeCount:0,pickableCount:0};Object(o.n)(t,{viewport:c});for(let o=0;o<e.length;o++){const t=e[o],{shouldDrawLayer:n,layerRenderIndex:i,moduleParameters:a,layerParameters:u}=l[o];if(n&&t.props.pickable&&f.pickableCount++,t.isComposite)f.compositeCount++;else if(n){f.visibleCount++,this._lastRenderIndex=Math.max(this._lastRenderIndex,i),a.viewport=s;try{t._drawLayer({moduleParameters:a,uniforms:{layerIndex:i},parameters:u})}catch(h){t.raiseError(h,"drawing ".concat(t," to ").concat(r))}}}return f}shouldDrawLayer(t){return!0}getModuleParameters(t,e){return null}getLayerParameters(t,e,n){return t.props.parameters}_shouldDrawLayer(t,e,n,r){if(!(t.props.visible&&this.shouldDrawLayer(t)))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,r){var i;const a=Object.assign(Object.create((null===(i=t.internalState)||void 0===i?void 0:i.propsInTransition)||t.props),{autoWrapLongitude:t.wrapLongitude,viewport:t.context.viewport,mousePosition:t.context.mousePosition,pickingActive:0,devicePixelRatio:Object(o.e)(this.gl)});if(e)for(const o of e){var s;Object.assign(a,null===(s=o.getModuleParameters)||void 0===s?void 0:s.call(o,t))}return Object.assign(a,this.getModuleParameters(t,e),r)}}function u(t=0,e={}){const n={},r=(i,o)=>{const a=i.props._offset,s=i.id,l=i.parent&&i.parent.id;let c;if(l&&!(l in e)&&r(i.parent,!1),l in n){const t=n[l]=n[l]||u(e[l],e);c=t(i,o),n[s]=t}else Number.isFinite(a)?(c=a+(e[l]||0),n[s]=null):c=t;return o&&c>=t&&(t=c+1),e[s]=c,c};return r}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(73),i=n(10);const o={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};class a{static get DRAW_MODE(){return o}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(r.c)("geometry"),drawMode:n=o.TRIANGLES,attributes:i={},indices:a=null,vertexCount:s=null}=t;this.id=e,this.drawMode=0|n,this.attributes={},this.userData={},this._setAttributes(i,a),this.vertexCount=s||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 ".concat(this.id," attribute ").concat(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,Object(i.a)(ArrayBuffer.isView(e.value),"".concat(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?(Object(i.a)(!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:a}=e;!a&&i&&o>=1&&(n=Math.min(n,i.length/o))}return Object(i.a)(Number.isFinite(n)),n}}},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,"a",(function(){return i}))},function(t,e,n){t.exports={Timeline:"Timeline-module__Timeline___1lWtG",shadow:"Timeline-module__shadow___2-pbT",scrollLeftButton:"Timeline-module__scrollLeftButton___12efz",scrollRightButton:"Timeline-module__scrollRightButton___9VlMj",isOverflowingLeft:"Timeline-module__isOverflowingLeft___Bpd3H",isOverflowingRight:"Timeline-module__isOverflowingRight___1Zb0h",pane:"Timeline-module__pane___2jOxI",line:"Timeline-module__line___S4h-c",timelineItems:"Timeline-module__timelineItems___OUROb",timelineItem:"Timeline-module__timelineItem___2GnCx",dot:"Timeline-module__dot___u9nTu",date:"Timeline-module__date___Mr7St",title:"Timeline-module__title___2BhWR",startTerminus:"Timeline-module__startTerminus___1HvO7",endTerminus:"Timeline-module__endTerminus___3G13q",tick:"Timeline-module__tick___37Kcq"}},function(t,e,n){t.exports={MediaGalleryStreetViewOverlay:"MediaGalleryStreetViewOverlay-module__MediaGalleryStreetViewOverlay___yyQxS",sidebar:"MediaGalleryStreetViewOverlay-module__sidebar___9avET",pane:"MediaGalleryStreetViewOverlay-module__pane___2utKH",caption:"MediaGalleryStreetViewOverlay-module__caption___3X1Bj",transcription:"MediaGalleryStreetViewOverlay-module__transcription___3hsqB",attribution:"MediaGalleryStreetViewOverlay-module__attribution___1f8uT",item:"MediaGalleryStreetViewOverlay-module__item___yUkcC",imageDiv:"MediaGalleryStreetViewOverlay-module__imageDiv___3KWiw",panFrame:"MediaGalleryStreetViewOverlay-module__panFrame___xb7m-",panoramaDiv:"MediaGalleryStreetViewOverlay-module__panoramaDiv___1F_WJ",opacityControl:"MediaGalleryStreetViewOverlay-module__opacityControl___bTah1"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(85),i=n(58);function o(t,e){if(e&&("object"===Object(r.a)(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Object(i.a)(t)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u}));var r=n(172);function i(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 o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){var e;return!!t&&(Array.isArray(t)&&(t=t[0]),Array.isArray(null===(e=t)||void 0===e?void 0:e.extensions))}function u(t){var e,n,i;return Object(r.a)(t,"null loader"),Object(r.a)(s(t),"invalid loader"),Array.isArray(t)&&(i=t[1],t=o(o({},t=t[0]),{},{options:o(o({},t.options),i)})),(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}},function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c}));var r=n(10);const i=5126,o=5124,a=5125,s={[i]:[i,1,"float"],35664:[i,2,"vec2"],35665:[i,3,"vec3"],35666:[i,4,"vec4"],[o]:[o,1,"int"],35667:[o,2,"ivec2"],35668:[o,3,"ivec3"],35669:[o,4,"ivec4"],[a]:[a,1,"uint"],36294:[a,2,"uvec2"],36295:[a,3,"uvec3"],36296:[a,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 Object(r.a)(!1),0}}function l(t){const e=s[t];if(!e)return null;const[n,r]=e;return{type:n,components:r}}function c(t,e){switch(t){case 5120:case 5121:case 5122:case 5123:t=i}for(const n in s){const[r,i,o]=s[n];if(r===t&&i===e)return{glType:n,name:o}}return null}},function(t,e,n){"use strict";n.d(e,"b",(function(){return _})),n.d(e,"c",(function(){return w})),n.d(e,"a",(function(){return x}));var r=n(29),i=n(405),o=n(1);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var l=new(n(1135).a)({id:"loaders.gl"}),c=function(){function t(){a(this,t)}return u(t,[{key:"log",value:function(){return function(){}}},{key:"info",value:function(){return function(){}}},{key:"warn",value:function(){return function(){}}},{key:"error",value:function(){return function(){}}}]),t}(),f=function(){function t(){a(this,t),Object(o.a)(this,"console",void 0),this.console=console}return u(t,[{key:"log",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.log).bind.apply(t,[this.console].concat(n))}},{key:"info",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.info).bind.apply(t,[this.console].concat(n))}},{key:"warn",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.warn).bind.apply(t,[this.console].concat(n))}},{key:"error",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=this.console.error).bind.apply(t,[this.console].concat(n))}}]),t}(),h=n(149),p={fetch:null,mimeType:void 0,nothrow:!1,log:new f,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:h.a,_nodeWorkers:!1,_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 m(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return g(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 g(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function g(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 y(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 v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){b(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(){globalThis.loaders=globalThis.loaders||{};var t=globalThis.loaders;return t._state=t._state||{},t._state}var A=function(){var t=_();return t.globalOptions=t.globalOptions||v({},p),t.globalOptions};function w(t,e,n,r){return n=n||[],function(t,e){E(t,null,p,d,e);var n,r=m(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=t&&t[i.id]||{},a=i.options&&i.options[i.id]||{},s=i.deprecatedOptions&&i.deprecatedOptions[i.id]||{};E(o,i.id,a,s,e)}}catch(u){r.e(u)}finally{r.f()}}(t,n=Array.isArray(n)?n:[n]),S(e,t,r)}function x(t,e){var n=A(),o=t||n;return"function"===typeof o.fetch?o.fetch:Object(r.f)(o.fetch)?function(t){return Object(i.a)(t,o)}:null!==e&&void 0!==e&&e.fetch?null===e||void 0===e?void 0:e.fetch:i.a}function E(t,e,n,i,o){var a=e||"Top level",s=e?"".concat(e,"."):"";for(var u in t){var c=!e&&Object(r.f)(t[u]);if(!(u in n)&&!("baseUri"===u&&!e)&&!("workerUrl"===u&&e))if(u in i)l.warn("".concat(a," loader option '").concat(s).concat(u,"' no longer supported, use '").concat(i[u],"'"))();else if(!c){var f=O(u,o);l.warn("".concat(a," loader option '").concat(s).concat(u,"' not recognized. ").concat(f))()}}}function O(t,e){var n,r=t.toLowerCase(),i="",o=m(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;for(var s in a.options){if(t===s)return"Did you mean '".concat(a.id,".").concat(s,"'?");var u=s.toLowerCase();(r.startsWith(u)||u.startsWith(r))&&(i=i||"Did you mean '".concat(a.id,".").concat(s,"'?"))}}}catch(l){o.e(l)}finally{o.f()}return i}function S(t,e,n){var r=v({},t.options||{});return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(r,n),null===r.log&&(r.log=new c),P(r,A()),P(r,e),r}function P(t,e){for(var n in e)if(n in e){var i=e[n];Object(r.g)(i)&&Object(r.g)(t[n])?t[n]=v(v({},t[n]),e[n]):t[n]=e[n]}}},function(t,e,n){"use strict";n.r(e),n.d(e,"LoadingStatesEnum",(function(){return i})),n.d(e,"LoadingState",(function(){return o}));var r=n(2),i={PENDING:1,LOADING:2,ERROR:500,NOT_FOUND:404},o=r.types.model("LoadingState",{code:1,message:r.types.maybeNull(r.types.string,"")}).actions((function(t){return{setMessage:function(e){t.message=e},setCode:function(e){t.code=e},setError:function(e,n){console.error(e.toString(),n),t.message=e.toString(),t.code=n},start:function(){t.setCode(i.LOADING)},loading:function(){t.setCode(i.LOADING)},done:function(){t.setCode(i.PENDING)}}})).views((function(t){return{get isLoading(){return t.code===i.LOADING},get didFail(){return t.code===i.ERROR||t.code===i.NOT_FOUND}}}));e.default=o},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return u}));var r=n(6);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},a={5126:4,5125:4,5124:4,5123:2,5122:2,5131:2,5120:1,5121:1};function s(t,e){const n=i[e];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;const o=Object(r.j)(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}}},function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));const r="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i="undefined"!==typeof window?window:t;"undefined"!==typeof t||window,"undefined"!==typeof document&&document;let o=!1;try{const t={get passive(){return o=!0,!0}};i.addEventListener("test",null,t),i.removeEventListener("test",null)}catch(a){o=!1}}).call(this,n(36))},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return o}));function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){void 0===n&&(n={});for(var i=0,o=t;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:t},e,n)}function o(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),o=Number(t[2]),a=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var s=[n,r];return i([[s,[o,r],[o,a],[n,a],s]],e.properties,{bbox:t,id:e.id})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),i=n.n(r).a.createContext({useFormField:function(t){return{error:t.error,info:t.info}},useFormInput:function(t,e,n){var i=Object(r.useState)(void 0!==e?e:n),o=i[0],a=i[1];return[void 0!==e?e:o,function(t){void 0!==n&&a(t)}]}})},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(30),s=n(62),u=n(547),l=n(156),c=n.n(l),f=function(t){var e=t.randomEnterDelay?Math.floor(10*Math.random())/10:0,n=t.noEnterAnimation?0:.4,r=t.showDraftState&&t.item.state&&!["published","awaiting_moderation"].includes(t.item.state),l=t.showDraftState&&t.item.state&&"awaiting_moderation"==t.item.state;return i.a.createElement(a.a,null,i.a.createElement(a.b.div,{className:"".concat(c.a.Card," ").concat(t.layoutType),key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{delay:e,duration:n}},i.a.createElement(o.a,{to:t.path,onClick:t.onClick},t.item.image&&t.item.image.url&&i.a.createElement(s.default,Object.assign({},t.item.image,{parameters:{ar:"3:2"},options:{minWidth:200,maxWidth:512}})),t.trailOrdinalPosition&&i.a.createElement("div",{className:c.a.trailOrdinalPosition},i.a.createElement("span",null,t.trailOrdinalPosition)),(!t.item.image||t.item.image&&!t.item.image.url)&&i.a.createElement("div",{className:c.a.imageSubstitute},i.a.createElement("span",{dangerouslySetInnerHTML:{__html:t.item.excerpt}})),i.a.createElement("section",null,i.a.createElement("h3",null,t.item.name),i.a.createElement("div",{className:c.a.typeIndicator},I18n.t(t.resultType||t.item.type||"record").toLowerCase()),i.a.createElement("div",{className:"".concat(c.a.mediaTypeIcon," ").concat(t.trailOrdinalPosition?c.a.hasTrailNumber:"")},i.a.createElement(u.default,{mediaType:t.item.hero_attachment_type})),r&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:c.a.stateIndicator,"aria-label":"".concat(t.item.state," item")},I18n.t("draft"))),l&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:c.a.stateIndicator,"aria-label":"".concat(t.item.state," item")},"Awaiting approval")),i.a.createElement("div",{className:c.a.description},i.a.createElement("p",null,t.item.excerpt))))))};f.defaultProps={parent:"/map",showDraftState:!1,randomEnterDelay:!1,noEnterAnimation:!1,onClick:function(){}},e.default=f},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1),i=n(368),o=n(108),a=n(126),s=n(242),u=n(57);const l={TilesetClass:s.b,data:{type:"data",value:[]},dataComparator:u.h.equals,renderSubLayers:{type:"function",value:t=>new a.a(t),compare:!1},getTileData:{type:"function",optional:!0,value:null,compare:!1},onViewportLoad:{type:"function",optional:!0,value:null,compare:!1},onTileLoad:{type:"function",value:t=>{},compare:!1},onTileUnload:{type:"function",value:t=>{},compare:!1},onTileError:{type:"function",value:t=>console.error(t),compare:!1},extent:{type:"array",optional:!0,value:null,compare:!0},tileSize:512,maxZoom:null,minZoom:0,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:s.a,zRange:null,maxRequests:6,zoomOffset:0};class c extends i.a{initializeState(){this.state={tileset:null,isLoaded:!1}}finalizeState(){var t,e;null===(t=this.state)||void 0===t||null===(e=t.tileset)||void 0===e||e.finalize()}get isLoaded(){var t,e;return null===(t=this.state)||void 0===t||null===(e=t.tileset)||void 0===e?void 0:e.selectedTiles.every((t=>t.isLoaded&&t.layers&&t.layers.every((t=>t.isLoaded))))}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({changeFlags:t}){let{tileset:e}=this.state;const n=t.propsOrDataChanged||t.updateTriggersChanged,r=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getTileData);e?n&&(e.setOptions(this._getTilesetOptions()),r?e.reloadAll():this.state.tileset.tiles.forEach((t=>{t.layers=null}))):(e=new this.props.TilesetClass(this._getTilesetOptions()),this.setState({tileset:e})),this._updateTileset()}_getTilesetOptions(){const{tileSize:t,maxCacheSize:e,maxCacheByteSize:n,refinementStrategy:r,extent:i,maxZoom:o,minZoom:a,maxRequests:s,zoomOffset:u}=this.props;return{maxCacheSize:e,maxCacheByteSize:n,maxZoom:o,minZoom:a,tileSize:t,refinementStrategy:r,extent:i,maxRequests:s,zoomOffset:u,getTileData:this.getTileData.bind(this),onTileLoad:this._onTileLoad.bind(this),onTileError:this._onTileError.bind(this),onTileUnload:this._onTileUnload.bind(this)}}_updateTileset(){const{tileset:t}=this.state,{zRange:e,modelMatrix:n}=this.props,r=t.update(this.context.viewport,{zRange:e,modelMatrix:n}),{isLoaded:i}=t,o=this.state.isLoaded!==i,a=this.state.frameNumber!==r;i&&(o||a)&&this._onViewportLoad(),a&&this.setState({frameNumber:r}),this.state.isLoaded=i}_onViewportLoad(){const{tileset:t}=this.state,{onViewportLoad:e}=this.props;e&&e(t.selectedTiles)}_onTileLoad(t){this.props.onTileLoad(t),t.layers=null,this.setNeedsUpdate()}_onTileError(t,e){this.props.onTileError(t),e.layers=null,this.setNeedsUpdate()}_onTileUnload(t){this.props.onTileUnload(t)}getTileData(t){const{data:e,getTileData:n,fetch:r}=this.props,{signal:i}=t;return t.url="string"===typeof e||Array.isArray(e)?Object(u.c)(e,t):null,n?n(t):r&&t.url?r(t.url,{propName:"data",layer:this,signal:i}):null}renderSubLayers(t){return this.props.renderSubLayers(t)}getSubLayerPropsByTile(t){return null}getPickingInfo({info:t,sourceLayer:e}){return t.picked&&(t.tile=e.props.tile),t}_updateAutoHighlight(t){t.sourceLayer&&t.sourceLayer.updateAutoHighlight(t)}renderLayers(){return this.state.tileset.tiles.map((t=>{const e=this.getSubLayerPropsByTile(t);if(t.isLoaded||t.content)if(t.layers)e&&t.layers[0]&&Object.keys(e).some((n=>t.layers[0].props[n]!==e[n]))&&(t.layers=t.layers.map((t=>t.clone(e))));else{const n=this.renderSubLayers({...this.props,id:"".concat(this.id,"-").concat(t.id),data:t.content,_offset:0,tile:t});t.layers=Object(o.b)(n,Boolean).map((n=>n.clone({tile:t,...e})))}else;return t.layers}))}filterSubLayer({layer:t,cullRect:e}){const{tile:n}=t.props;return this.state.tileset.isTileVisible(n,e)}}Object(r.a)(c,"defaultProps",l),Object(r.a)(c,"layerName","TileLayer")},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var r=n(1),i=n(357),o=n(491),a=n(492),s=n(15),u=n(27),l=n(366),c=n(130),f=n(173),h=n(411),p=n(1530),d=n(1529),m=n(87);const g=()=>{},y={10241:9987,10240:9729,10242:33071,10243:33071};function v(t,e,n,r){return n===e.width&&r===e.height?e:(t.canvas.height=r,t.canvas.width=n,t.clearRect(0,0,t.canvas.width,t.canvas.height),t.drawImage(e,0,0,e.width,e.height,0,0,n,r),t.canvas)}function b(t){return t&&(t.id||t.url)}function _(t,e,n){for(let r=0;r<e.length;r++){const{icon:i,xOffset:o}=e[r];t[b(i)]={...i,x:o,y:n}}}class A{constructor(t,{onUpdate:e=g,onError:n=g}){Object(r.a)(this,"gl",void 0),Object(r.a)(this,"onUpdate",void 0),Object(r.a)(this,"onError",void 0),Object(r.a)(this,"_loadOptions",null),Object(r.a)(this,"_texture",null),Object(r.a)(this,"_externalTexture",null),Object(r.a)(this,"_mapping",{}),Object(r.a)(this,"_textureParameters",null),Object(r.a)(this,"_pendingCount",0),Object(r.a)(this,"_autoPacking",!1),Object(r.a)(this,"_xOffset",0),Object(r.a)(this,"_yOffset",0),Object(r.a)(this,"_rowHeight",0),Object(r.a)(this,"_buffer",4),Object(r.a)(this,"_canvasWidth",1024),Object(r.a)(this,"_canvasHeight",0),Object(r.a)(this,"_canvas",null),this.gl=t,this.onUpdate=e,this.onError=n}finalize(){var t;null===(t=this._texture)||void 0===t||t.delete()}getTexture(){return this._texture||this._externalTexture}getIconMapping(t){const e=this._autoPacking?b(t):t;return this._mapping[e]||{}}setProps({loadOptions:t,autoPacking:e,iconAtlas:n,iconMapping:r,textureParameters:i}){var o;(t&&(this._loadOptions=t),void 0!==e&&(this._autoPacking=e),r&&(this._mapping=r),n)&&(null===(o=this._texture)||void 0===o||o.delete(),this._texture=null,this._externalTexture=n);i&&(this._textureParameters=i)}get isLoaded(){return 0===this._pendingCount}packIcons(t,e){if(!this._autoPacking||"undefined"===typeof document)return;const n=Object.values(function(t,e,n){if(!t||!e)return null;n=n||{};const r={},{iterable:i,objectInfo:o}=Object(m.a)(t);for(const a of i){o.index++;const t=e(a,o),i=b(t);if(!t)throw new Error("Icon is missing.");if(!t.url)throw new Error("Icon url is missing.");r[i]||n[i]&&t.url===n[i].url||(r[i]={...t,source:a,sourceIndex:o.index})}return r}(t,e,this._mapping)||{});if(n.length>0){const{mapping:t,xOffset:e,yOffset:r,rowHeight:i,canvasHeight:o}=function({icons:t,buffer:e,mapping:n={},xOffset:r=0,yOffset:i=0,rowHeight:o=0,canvasWidth:a}){let s=[];for(let l=0;l<t.length;l++){const u=t[l];if(!n[b(u)]){const{height:t,width:l}=u;r+l+e>a&&(_(n,s,i),r=0,i=o+i+e,o=0,s=[]),s.push({icon:u,xOffset:r}),r=r+l+e,o=Math.max(o,t)}}return s.length>0&&_(n,s,i),{mapping:n,rowHeight:o,xOffset:r,yOffset:i,canvasWidth:a,canvasHeight:(u=o+i+e,Math.pow(2,Math.ceil(Math.log2(u))))};var u}({icons:n,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset});this._rowHeight=i,this._mapping=t,this._xOffset=e,this._yOffset=r,this._canvasHeight=o,this._texture||(this._texture=new f.a(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:this._textureParameters||y})),this._texture.height!==this._canvasHeight&&(this._texture=function(t,e,n,r){const i=t.width,o=t.height,a=new f.a(t.gl,{width:e,height:n,parameters:r});return Object(h.b)(t,a,{targetY:0,width:i,height:o}),t.delete(),a}(this._texture,this._canvasWidth,this._canvasHeight,this._textureParameters||y)),this.onUpdate(),this._canvas=this._canvas||document.createElement("canvas"),this._loadIcons(n)}}_loadIcons(t){const e=this._canvas.getContext("2d");for(const n of t)this._pendingCount++,Object(d.a)(n.url,p.a,this._loadOptions).then((t=>{const r=b(n),{x:i,y:o,width:a,height:s}=this._mapping[r],u=v(e,t,a,s);this._texture.setSubImageData({data:u,x:i,y:o,width:a,height:s}),this._texture.generateMipmap(),this.onUpdate()})).catch((t=>{this.onError({url:n.url,source:n.source,sourceIndex:n.sourceIndex,loadOptions:this._loadOptions,error:t})})).finally((()=>{this._pendingCount--}))}}const w=[0,0,0,255],x={iconAtlas:{type:"image",value:null,async:!0},iconMapping:{type:"object",value:{},async:!0},sizeScale:{type:"number",value:1,min:0},billboard:!0,sizeUnits:"pixels",sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},alphaCutoff:{type:"number",value:.05,min:0,max:1},getPosition:{type:"accessor",value:t=>t.position},getIcon:{type:"accessor",value:t=>t.icon},getColor:{type:"accessor",value:w},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},onIconError:{type:"function",value:null,compare:!1,optional:!0}};class E extends i.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(){return super.getShaders({vs:'#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\nattribute vec2 instancePixelOffset;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform bool billboard;\nuniform int sizeUnits;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n  float angle_radian = angle * PI / 180.0;\n  float cos_angle = cos(angle_radian);\n  float sin_angle = sin(angle_radian);\n  mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n  return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  geometry.uv = positions;\n  geometry.pickingColor = instancePickingColors;\n  uv = positions;\n\n  vec2 iconSize = instanceIconFrames.zw;\n  // convert size in meters to pixels, then scaled and clamp\n \n  // project meters to pixels and clamp to limits \n  float sizePixels = clamp(\n    project_size_to_pixel(instanceSizes * sizeScale, sizeUnits), \n    sizeMinPixels, sizeMaxPixels\n  );\n\n  // scale icon height to match instanceSize\n  float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;\n\n  // scale and rotate vertex in "pixel" value and convert back to fraction in clipspace\n  vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n  pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;\n  pixelOffset += instancePixelOffset;\n  pixelOffset.y *= -1.0;\n\n  if (billboard)  {\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n    vec3 offset = vec3(pixelOffset, 0.0);\n    DECKGL_FILTER_SIZE(offset, geometry);\n    gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n\n  } else {\n    vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n    DECKGL_FILTER_SIZE(offset_common, geometry);\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position); \n  }\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vTextureCoords = mix(\n    instanceIconFrames.xy,\n    instanceIconFrames.xy + iconSize,\n    (positions.xy + 1.0) / 2.0\n  ) / iconsTextureDim;\n\n  vColor = instanceColors;\n  DECKGL_FILTER_COLOR(vColor, geometry);\n\n  vColorMode = instanceColorModes;\n}\n',fs:"#define SHADER_NAME icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float alphaCutoff;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n  geometry.uv = uv;\n\n  vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n\n  // if colorMode == 0, use pixel color from the texture\n  // if colorMode == 1 or rendering picking buffer, use texture as transparency mask\n  vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n  // Take the global opacity and the alpha from vColor into account for the alpha component\n  float a = texColor.a * opacity * vColor.a;\n\n  if (a < alphaCutoff) {\n    discard;\n  }\n\n  gl_FragColor = vec4(color, a);\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}initializeState(){this.state={iconManager:new A(this.context.gl,{onUpdate:this._onUpdate.bind(this),onError:this._onError.bind(this)})};this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceOffsets:{size:2,accessor:"getIcon",transform:this.getInstanceOffset},instanceIconFrames:{size:4,accessor:"getIcon",transform:this.getInstanceIconFrame},instanceColorModes:{size:1,type:5121,accessor:"getIcon",transform:this.getInstanceColorMode},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:w},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}updateState(t){super.updateState(t);const{props:e,oldProps:n,changeFlags:r}=t,i=this.getAttributeManager(),{iconAtlas:o,iconMapping:a,data:s,getIcon:u,textureParameters:l}=e,{iconManager:c}=this.state,f=o||this.internalState.isAsyncPropLoading("iconAtlas");if(c.setProps({loadOptions:e.loadOptions,autoPacking:!f,iconAtlas:o,iconMapping:f?a:null,textureParameters:l}),f?n.iconMapping!==e.iconMapping&&i.invalidate("getIcon"):(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getIcon))&&c.packIcons(s,u),r.extensionsChanged){var h;const{gl:t}=this.context;null===(h=this.state.model)||void 0===h||h.delete(),this.state.model=this._getModel(t),i.invalidateAll()}}get isLoaded(){return super.isLoaded&&this.state.iconManager.isLoaded}finalizeState(t){super.finalizeState(t),this.state.iconManager.finalize()}draw({uniforms:t}){const{sizeScale:e,sizeMinPixels:n,sizeMaxPixels:r,sizeUnits:i,billboard:o,alphaCutoff:a}=this.props,{iconManager:u}=this.state,l=u.getTexture();l&&this.state.model.setUniforms(t).setUniforms({iconsTexture:l,iconsTextureDim:[l.width,l.height],sizeUnits:s.e[i],sizeScale:e,sizeMinPixels:n,sizeMaxPixels:r,billboard:o,alphaCutoff:a}).draw()}_getModel(t){return new l.a(t,{...this.getShaders(),id:this.props.id,geometry:new c.a({drawMode:6,attributes:{positions:{size:2,value:new Float32Array([-1,-1,-1,1,1,1,1,-1])}}}),isInstanced:!0})}_onUpdate(){this.setNeedsRedraw()}_onError(t){var e;const n=null===(e=this.getCurrentLayer())||void 0===e?void 0:e.props.onIconError;n?n(t):u.a.error(t.error.message)()}getInstanceOffset(t){const{width:e,height:n,anchorX:r=e/2,anchorY:i=n/2}=this.state.iconManager.getIconMapping(t);return[e/2-r,n/2-i]}getInstanceColorMode(t){return this.state.iconManager.getIconMapping(t).mask?1:0}getInstanceIconFrame(t){const{x:e,y:n,width:r,height:i}=this.state.iconManager.getIconMapping(t);return[e,n,r,i]}}Object(r.a)(E,"defaultProps",x),Object(r.a)(E,"layerName","IconLayer")},function(t,e,n){"use strict";n.r(e),n.d(e,"buildHeaders",(function(){return s})),n.d(e,"PER_PAGE",(function(){return l})),n.d(e,"TRAIL_STOPS_LIMIT",(function(){return c}));var r=n(474);function i(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 o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"X-Hasura-Tenant-Id":document.querySelector("meta[name=tenant-id]").content},n=document.querySelector("meta[name=user-id]");n&&n.content&&(e["X-Hasura-User-Id"]=n.content);var r=document.querySelector("meta[name=deeptime-admin-token]");return r&&r.content&&(e["X-Hasura-DeepTime-Admin-Token"]=r.content),o(o({},t),e)},u=new r.GraphQLClient("".concat("https://api.humap.site","/v1/graphql"),{headers:s()}),l=12,c=25;e.default=u},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1018),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:"".concat(a.a.RecordsList," RecordsList--").concat(t.layoutType)}," ",t.children)}},function(t,e,n){"use strict";(function(t,r){function i(t){return i="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},i(t)}n.d(e,"a",(function(){return o}));"undefined"!==typeof self&&self,"undefined"!==typeof window&&window,"undefined"!==typeof document&&document;var o=Boolean("object"!==("undefined"===typeof r?"undefined":i(r))||"[object process]"!==String(r)||r.browser),a="undefined"!==typeof r&&r.version&&/v([0-9]*)/.exec(r.version);a&&parseFloat(a[1])}).call(this,n(36),n(68))},function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return c}));var r=n(169);function i(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return o(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 o(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 a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(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 a(t){return a="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},a(t)}function s(t){if(Object(r.b)(t))return Object(r.a)(t);if(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){var e=t;return(new TextEncoder).encode(e).buffer}if(t&&"object"===a(t)&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function u(t,e,n){if(n=n||t.byteLength,t.byteLength<n||e.byteLength<n)return!1;for(var r=new Uint8Array(t),i=new Uint8Array(e),o=0;o<r.length;++o)if(r[o]!==i[o])return!1;return!0}function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,o=e.map((function(t){return t instanceof ArrayBuffer?new Uint8Array(t):t})),a=o.reduce((function(t,e){return t+e.byteLength}),0),s=new Uint8Array(a),u=0,l=i(o);try{for(l.s();!(r=l.n()).done;){var c=r.value;s.set(c,u),u+=c.byteLength}}catch(f){l.e(f)}finally{l.f()}return s.buffer}function c(t,e,n){var r=void 0!==n?new Uint8Array(t).subarray(e,e+n):new Uint8Array(t).subarray(e);return new Uint8Array(r).buffer}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return f}));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:5825721.287490856};function o(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!c(t[0])||!c(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function s(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function u(t){return 180*(t%(2*Math.PI))/Math.PI}function l(t){return t%360*Math.PI/180}function c(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function f(t,e,n,r){void 0===r&&(r={});var i=function(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")}(t),o=l(i[0]),c=l(i[1]),f=l(n),h=s(e,r.units),p=Math.asin(Math.sin(c)*Math.cos(h)+Math.cos(c)*Math.sin(h)*Math.cos(f));return a([u(o+Math.atan2(Math.sin(f)*Math.sin(h)*Math.cos(c),Math.cos(h)-Math.sin(c)*Math.sin(p))),u(p)],r.properties)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return l}));var r=n(29),i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function a(t){var e=i.exec(t);return e?e[1]:""}var s=/\?.*/;function u(t){if(Object(r.i)(t)){var e=c(t.url||""),n=t.headers.get("content-type")||"";return{url:e,type:(i=n,s=o.exec(i),(s?s[1]:i)||a(e))}}var i,s;return Object(r.b)(t)?{url:c(t.name||""),type:t.type||""}:"string"===typeof t?{url:c(t),type:a(t)}:{url:"",type:""}}function l(t){return Object(r.i)(t)?t.headers["content-length"]||-1:Object(r.b)(t)?t.size:"string"===typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function c(t){return t.replace(s,"")}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(139);function o(){o=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function a(t){return function(t){if(Array.isArray(t))return s(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)return;if("string"===typeof t)return s(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 s(t,e)}(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.")}()}function s(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 u(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 l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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}var f=r.types.model({}).volatile((function(t){return{loading:i.default.create({code:i.LoadingStatesEnum.PENDING}),query:null,customParams:{},count:0,append:!1}})).actions((function(t){var e=Object(r.flow)(o().mark((function e(n){var s,u,c,f,h,p,d,m=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=m.length>1&&void 0!==m[1]?m[1]:{},t.query=n,t.customParams=s,u=s,t.filter&&(c=Object(r.getSnapshot)(t.filter),u=l(l({},u),c),t.filter.hasOwnProperty("toQuery")&&(u=l(l({},u),t.filter.toQuery))),t.loading.loading(),e.prev=6,e.next=9,n(u);case 9:if(f=e.sent,h=f.results,p=0,f.total&&(p=f.total.aggregate.count),t.count=p,t.loading.done(),!t.results){e.next=22;break}return d=[],d=t.append?[].concat(a(t.results.toJSON()),a(h)):h,Object(r.applySnapshot)(t.results,d),e.abrupt("return",f);case 22:return e.abrupt("return",f.results);case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(6),t.loading.setError(e.t0,i.LoadingStatesEnum.ERROR);case 28:case"end":return e.stop()}}),e,null,[[6,25]])})));return{fetch:e,fetchNextPage:Object(r.flow)(o().mark((function e(){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.query||t.filter||t.customParams){e.next=2;break}throw Error(I18n.t("models.pageable_query_model.query_error"));case 2:return t.filter.setSearchParameter("offset",t.filter.nextOffset),t.append=!0,e.next=6,t.fetch(t.query,t.customParams);case 6:return n=e.sent,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)}))),clear:function(){t.results=[],t.filter.offset=0}}})).views((function(t){return{get hasMore(){return t.count>t.filter.offset+t.filter.limit}}}));e.default=f},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchRecordQuery",(function(){return i})),n.d(e,"fetchRecordImagesQuery",(function(){return s})),n.d(e,"fetchRecordVideoEmbedsQuery",(function(){return u})),n.d(e,"fetchRecordAudioEmbedsQuery",(function(){return l})),n.d(e,"fetchRecordIiifEmbedsQuery",(function(){return f})),n.d(e,"fetchRecordStreetViewOverlaysQuery",(function(){return h})),n.d(e,"fetchRecordSketchfabEmbedsQuery",(function(){return c})),n.d(e,"fetchFullRecordQuery",(function(){return o})),n.d(e,"fetchRelatedRecordsQuery",(function(){return a})),n.d(e,"fetchRecordAssociationsQuery",(function(){return p})),n.d(e,"fetchUserCanUpdateRecordQuery",(function(){return g})),n.d(e,"mutateUpdateRecordState",(function(){return d})),n.d(e,"mutateDeleteRecord",(function(){return m}));var r=n(21),i=function(t){return r.default.request("\n    #graphql\n\n    query RecordQuery($slug: String!) {\n        record: records(limit: 1, where: {\n            slug: {\n                _eq: $slug\n            }\n        }) {\n            id\n            name\n            slug\n            sanitised_content\n            excerpt\n            location: lonlat\n            date_from\n            date_to\n            hero_attachment_type\n            hero_attachment_id\n            media_sort_order\n            state\n            date_from_precision\n            date_to_precision \n            parent_item_ids\n            static_map_urls\n            attribution\n            linkable_keywords\n            custom_fields\n            user {\n                id\n                name\n            }\n            image {\n                name\n                url\n            }\n            record_cta_block {\n                cta_block {\n                    title\n                    description\n                    url\n                    button_text\n                }\n            }\n\n            terms: record_terms {\n                term: taxonomy_term {\n                    id\n                    name\n                    has_duplicate_name\n                }\n            }\n            project_records {\n                project {\n                    name\n                    slug\n                }\n            }\n            links {\n                attachments_link {\n                    name\n                    url\n                }\n            }\n            associated_overlay_group {\n                slug\n            }\n        }\n    }\n",{slug:t})},o=function(t,e){return r.default.request("\n    #graphql\n\n    query RecordQuery($slug: String!) {\n        record: records(limit: 1, where: {slug: {_eq: $slug}}) {\n            id\n            name\n            slug\n            sanitised_content\n            excerpt\n            location: lonlat\n            date_from\n            date_to\n            hero_attachment_type\n            hero_attachment_id\n            media_sort_order\n            state\n            date_from_precision\n            date_to_precision\n            parent_item_ids\n            static_map_urls\n            user_id\n            linkable_keywords\n            user {\n                id\n                name\n            }\n            image {\n                name\n                url\n            }\n            terms: record_terms {\n                term: taxonomy_term {\n                    id\n                    name\n                    has_duplicate_name\n                }\n            }\n            project_records {\n                project {\n                    name\n                    slug\n                }\n            }\n            attribution\n            project_attributions: project_attribution_fields {\n                value\n            }\n            links {\n                attachments_link {\n                    name,\n                    url\n                }\n            }\n            record_cta_block {\n                cta_block {\n                    title\n                    description\n                    url\n                    button_text\n                }\n            }\n            associated_overlay_group {\n                slug\n            }\n        }\n    }\n",{slug:t},e)},a=function(t){return r.default.request("\n    #graphql\n\n    query RelatedRecords($slug: String!, $limit: Int=10, $type: [String!]) {\n        related_records(args: {record_slug: $slug}, limit: $limit, where:{type:{_in: $type}}) {\n            type, name, slug, image_url, state, hero_attachment_type\n        }\n    }\n",t)},s=function(t){return r.default.request('\n    #graphql\n\n    query RecordImagesQuery($slug: String!) {\n        total: record_images_aggregate(where: {record: {slug: {_eq: $slug}}, image: {metadata_status: {_eq: "complete"}}}) {\n            aggregate {\n                count\n            }\n        }\n        results: record_images(where: {record: {slug: {_eq: $slug}}, image: {metadata_status: {_eq: "complete"}}}) {\n            image {\n                width: metadata(path: "image_data.PixelWidth")\n                height: metadata(path: "image_data.PixelHeight")\n                id\n                name\n                credit\n                description\n                url\n                rights_statement\n                source_link\n                identifier\n                transcription\n                license\n            }\n        }\n    }\n',t)},u=function(t){return r.default.request('\n    #graphql\n\n    query RecordVideoEmbedsQuery($slug: String!) {\n        total: record_video_embeds_aggregate(where: {record: {slug: {_eq: $slug}}, video_embed: {metadata_status: {_eq: "complete"}}}) {\n            aggregate {\n                count\n            }\n        }\n        results: record_video_embeds(where: {record: {slug: {_eq: $slug}}, video_embed: {metadata_status: {_eq: "complete"}}}) {\n            video_embed {\n                id\n                html: metadata(path: "html")\n                credit: metadata(path: "author_name")\n                url: metadata(path: "url")\n                description: metadata(path: "description")\n                name: metadata(path: "title")\n                rights_statement\n                source_link\n                identifier\n                transcription\n                license\n                image {\n                    width: metadata(path: "image_data.PixelWidth")\n                    height: metadata(path: "image_data.PixelHeight")\n                    id\n                    name\n                    credit\n                    description\n                    url\n                }\n            }\n        }\n    }\n',t)},l=function(t){return r.default.request('\n    #graphql\n\n    query RecordAudioEmbedsQuery($slug: String!) {\n        total: record_audio_embeds_aggregate(where: {record: {slug: {_eq: $slug}}, audio_embed: {metadata_status: {_eq: "complete"}}}) {\n            aggregate {\n                count\n            }\n        }\n        results: record_audio_embeds(where: {record: {slug: {_eq: $slug}}, audio_embed: {metadata_status: {_eq: "complete"}}}) {\n            audio_embed {\n                id\n                html: metadata(path: "html")\n                credit: metadata(path: "author_name")\n                url: metadata(path: "url")\n                description: metadata(path: "description")\n                name: metadata(path: "title")\n                rights_statement\n                source_link\n                identifier\n                transcription\n                license\n                image {\n                    width: metadata(path: "image_data.PixelWidth")\n                    height: metadata(path: "image_data.PixelHeight")\n                    id\n                    name\n                    credit\n                    description\n                    url\n                }\n            }\n        }\n    }\n',t)},c=function(t){return r.default.request('\n    #graphql\n\n    query RecordSketchfabEmbedsQuery($slug: String!) {\n        total: record_sketchfab_embeds_aggregate(where: {record: {slug: {_eq: $slug}}, sketchfab_embed: {metadata_status: {_eq: "complete"}}}) {\n            aggregate {\n                count\n            }\n        }\n        results: record_sketchfab_embeds(where: {record: {slug: {_eq: $slug}}, sketchfab_embed: {metadata_status: {_eq: "complete"}}}) {\n            sketchfab_embed {\n                id\n                html: metadata(path: "html")\n                credit: metadata(path: "author_name")\n                url: metadata(path: "url")\n                description: metadata(path: "description")\n                name: metadata(path: "title")\n                rights_statement\n                source_link\n                identifier\n                license\n                image {\n                    width: metadata(path: "image_data.PixelWidth")\n                    height: metadata(path: "image_data.PixelHeight")\n                    id\n                    name\n                    credit\n                    description\n                    url\n                }\n            }\n        }\n    }\n',t)},f=function(t){return r.default.request('\n    #graphql\n\n    query RecordIiifEmbedsQuery($slug: String!) {\n        total: record_iiif_embeds_aggregate(where: {record: {slug: {_eq: $slug}}, iiif_embed: {metadata_status: {_eq: "complete"}}}) {\n            aggregate {\n                count\n            }\n        }\n        results: record_iiif_embeds(where: {record: {slug: {_eq: $slug }}, iiif_embed: {metadata_status: {_eq: "complete"}}}) {\n            iiif_embed {\n                id\n                name\n                manifest_url\n                credit\n                description\n                image {\n                    width: metadata(path: "image_data.PixelWidth")\n                    height: metadata(path: "image_data.PixelHeight")\n                    id\n                    name\n                    credit\n                    description\n                    url\n                }\n            }\n        }\n    }\n',t)},h=function(t){return r.default.request("\n    #graphql\n\n    query RecordStreetViewOverlays($slug: String!) {\n        \n        total: attachments_street_view_overlays_aggregate(where: {record: {slug: {_eq: $slug}}}) {\n            aggregate {\n                count\n            }\n        }\n        \n        results: attachments_street_view_overlays(where: {record: {slug: {_eq: $slug}}}) {\n            id\n            name\n            metadata\n            credit\n            rights_statement\n            source_link\n            identifier\n            license\n            transcription\n            description\n            url    \n        }\n    }\n",t)},p=function(t,e){return r.default.request("\n    #graphql\n\n    query RecordAssociations($slug: String!, $types: [String!]) {\n        record_associations(where: {type: {_in: $types}, record_slug: {_eq: $slug}}) {\n            name\n            slug\n            type\n        }\n    }\n",t,e)},d=function(t,e){return r.default.request("\n    #graphql\n\n    mutation updateRecordState($id: bigint!, $state: String!) {\n        result: update_record(id: $id, state: $state) {\n            id\n            state\n        }\n    }\n",t,e)},m=function(t,e){return r.default.request("\n    #graphql\n\n    mutation DeleteRecord($id: bigint!) {\n        delete_humap_projects_project_records(where: {record_id: {_eq: $id}}) {\n            affected_rows\n        }\n        delete_humap_collections_collection_records(where: {record_id: {_eq: $id}}) {\n            affected_rows\n        }\n        result: delete_records_by_pk(id: $id) {\n            id\n        }\n    }\n",t,e)},g=function(t,e){return r.default.request("\n    #graphql\n\n    query UserCanUpdateRecord($id: bigint!, $user_id: jsonb!) {\n        records(where: {id: {_eq: $id}, project_records: {project: {member_ids: {_contains: $user_id}}}}) {\n            user_id\n            project_records {\n                project {\n                    id\n                }\n            }\n        }\n    }\n",t,e)}},function(t,e,n){var r;!function(e,n){"use strict";"object"===typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!==typeof window?window:this,(function(n,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,f={},h=f.toString,p=f.hasOwnProperty,d=p.toString,m=d.call(Object),g={},y=function(t){return"function"===typeof t&&"number"!==typeof t.nodeType},v=function(t){return null!=t&&t===t.window},b=n.document,_={type:!0,src:!0,nonce:!0,noModule:!0};function A(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in _)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(t){return null==t?t+"":"object"===typeof t||"function"===typeof t?f[h.call(t)]||"object":typeof t}var x="3.5.1",E=function(t,e){return new E.fn.init(t,e)};function O(t){var e=!!t&&"length"in t&&t.length,n=w(t);return!y(t)&&!v(t)&&("array"===n||0===e||"number"===typeof e&&e>0&&e-1 in t)}E.fn=E.prototype={jquery:x,constructor:E,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=E.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return E.each(this,t)},map:function(t){return this.pushStack(E.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:o.sort,splice:o.splice},E.extend=E.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"===typeof a&&(l=a,a=arguments[s]||{},s++),"object"===typeof a||y(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(t=arguments[s]))for(e in t)r=t[e],"__proto__"!==e&&a!==r&&(l&&r&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[e],o=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,a[e]=E.extend(l,o,r)):void 0!==r&&(a[e]=r));return a},E.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t))&&(!(e=a(t))||"function"===typeof(n=p.call(e,"constructor")&&e.constructor)&&d.call(n)===m)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){A(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(O(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(O(Object(t))?E.merge(n,"string"===typeof t?[t]:t):l.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:c.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(O(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return u(a)},guid:1,support:g}),"function"===typeof Symbol&&(E.fn[Symbol.iterator]=o[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){f["[object "+e+"]"]=e.toLowerCase()}));var S=function(t){var e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_="sizzle"+1*new Date,A=t.document,w=0,x=0,E=ut(),O=ut(),S=ut(),P=ut(),C=function(t,e){return t===e&&(f=!0),0},T={}.hasOwnProperty,k=[],I=k.pop,L=k.push,j=k.push,M=k.slice,R=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",D="[\\x20\\t\\r\\n\\f]",F="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\[[\\x20\\t\\r\\n\\f]*("+F+")(?:"+D+"*([*^$|!~]?=)"+D+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+D+"*\\]",z=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",U=new RegExp(D+"+","g"),G=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),V=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),q=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),H=new RegExp(D+"|>"),W=new RegExp(z),X=new RegExp("^"+F+"$"),Y={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Z=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},at=_t((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{j.apply(k=M.call(A.childNodes),A.childNodes),k[A.childNodes.length].nodeType}catch(Ot){j={apply:k.length?function(t,e){L.apply(t,M.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,l,c,f,d,y,v=e&&e.ownerDocument,A=e?e.nodeType:9;if(r=r||[],"string"!==typeof t||!t||1!==A&&9!==A&&11!==A)return r;if(!i&&(h(e),e=e||p,m)){if(11!==A&&(f=Q.exec(t)))if(o=f[1]){if(9===A){if(!(l=e.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(v&&(l=v.getElementById(o))&&b(e,l)&&l.id===o)return r.push(l),r}else{if(f[2])return j.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return j.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!P[t+" "]&&(!g||!g.test(t))&&(1!==A||"object"!==e.nodeName.toLowerCase())){if(y=t,v=e,1===A&&(H.test(t)||q.test(t))){for((v=tt.test(t)&&yt(e.parentNode)||e)===e&&n.scope||((c=e.getAttribute("id"))?c=c.replace(rt,it):e.setAttribute("id",c=_)),s=(d=a(t)).length;s--;)d[s]=(c?"#"+c:":scope")+" "+bt(d[s]);y=d.join(",")}try{return j.apply(r,v.querySelectorAll(y)),r}catch(w){P(t,!0)}finally{c===_&&e.removeAttribute("id")}}}return u(t.replace(G,"$1"),e,r,i)}function ut(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function lt(t){return t[_]=!0,t}function ct(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(Ot){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function ht(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return lt((function(e){return e=+e,lt((function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function yt(t){return t&&"undefined"!==typeof t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!Z.test(e||n&&n.nodeName||"HTML")},h=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:A;return a!=p&&9===a.nodeType&&a.documentElement?(d=(p=a).documentElement,m=!o(p),A!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=ct((function(t){return d.appendChild(t).appendChild(p.createElement("div")),"undefined"!==typeof t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ct((function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=ct((function(t){return d.appendChild(t).id=_,!p.getElementsByName||!p.getElementsByName(_).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if("undefined"!==typeof e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n="undefined"!==typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if("undefined"!==typeof e.getElementById&&m){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return"undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if("undefined"!==typeof e.getElementsByClassName&&m)return e.getElementsByClassName(t)},y=[],g=[],(n.qsa=J.test(p.querySelectorAll))&&(ct((function(t){var e;d.appendChild(t).innerHTML="<a id='"+_+"'></a><select id='"+_+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+N+")"),t.querySelectorAll("[id~="+_+"-]").length||g.push("~="),(e=p.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+_+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=J.test(v=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ct((function(t){n.disconnectedMatch=v.call(t,"*"),v.call(t,"[s!='']:x"),y.push("!=",z)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),e=J.test(d.compareDocumentPosition),b=e||J.test(d.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},C=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==p||t.ownerDocument==A&&b(A,t)?-1:e==p||e.ownerDocument==A&&b(A,e)?1:c?R(c,t)-R(c,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t==p?-1:e==p?1:i?-1:o?1:c?R(c,t)-R(c,e):0;if(i===o)return ht(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ht(a[r],s[r]):a[r]==A?-1:s[r]==A?1:0},p):p},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&m&&!P[e+" "]&&(!y||!y.test(e))&&(!g||!g.test(e)))try{var r=v.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(Ot){P(e,!0)}return st(e,p,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=p&&h(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=p&&h(t);var i=r.attrHandle[e.toLowerCase()],o=i&&T.call(r.attrHandle,e.toLowerCase())?i(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(C),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return c=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"===typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},r=st.selectors={cacheLength:50,createPseudo:lt,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&W.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=E[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+D+"|$)"))&&E(t,(function(t){return e.test("string"===typeof t.className&&t.className||"undefined"!==typeof t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,f,h,p,d,m=o!==a?"nextSibling":"previousSibling",g=e.parentNode,y=s&&e.nodeName.toLowerCase(),v=!u&&!s,b=!1;if(g){if(o){for(;m;){for(h=e;h=h[m];)if(s?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;d=m="only"===t&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&v){for(b=(p=(l=(c=(f=(h=g)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===w&&l[1])&&l[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(b=p=0)||d.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[w,p,b];break}}else if(v&&(b=p=(l=(c=(f=(h=e)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===w&&l[1]),!1===b)for(;(h=++p&&h&&h[m]||(b=p=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++b||(v&&((c=(f=h[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]=[w,b]),h!==e)););return(b-=i)===r||b%r===0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[_]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?lt((function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=R(t,o[a])]=!(n[r]=o[a])})):function(t){return i(t,0,n)}):i}},pseudos:{not:lt((function(t){var e=[],n=[],r=s(t.replace(G,"$1"));return r[_]?lt((function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:lt((function(t){return function(e){return st(t,e).length>0}})),contains:lt((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:lt((function(t){return X.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return $.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,n){return[n<0?n+e:n]})),even:gt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:gt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:gt((function(t,e,n){for(var r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:gt((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=pt(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=dt(e);function vt(){}function bt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function _t(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=x++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,u){var l,c,f,h=[w,s];if(u){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(c=(f=e[_]||(e[_]={}))[e.uniqueID]||(f[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((l=c[o])&&l[0]===w&&l[1]===s)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function At(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function wt(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,l=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),l&&e.push(s)));return a}function xt(t,e,n,r,i,o){return r&&!r[_]&&(r=xt(r)),i&&!i[_]&&(i=xt(i,o)),lt((function(o,a,s,u){var l,c,f,h=[],p=[],d=a.length,m=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)st(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),g=!t||!o&&e?m:wt(m,h,t,s,u),y=n?i||(o?t:d||r)?[]:a:g;if(n&&n(g,y,s,u),r)for(l=wt(y,p),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(y[p[c]]=!(g[p[c]]=f));if(o){if(i||t){if(i){for(l=[],c=y.length;c--;)(f=y[c])&&l.push(g[c]=f);i(null,y=[],l,u)}for(c=y.length;c--;)(f=y[c])&&(l=i?R(o,f):h[c])>-1&&(o[l]=!(a[l]=f))}}else y=wt(y===a?y.splice(d,y.length):y),i?i(null,a,y,u):j.apply(a,y)}))}function Et(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],u=a?1:0,c=_t((function(t){return t===e}),s,!0),f=_t((function(t){return R(e,t)>-1}),s,!0),h=[function(t,n,r){var i=!a&&(r||n!==l)||((e=n).nodeType?c(t,n,r):f(t,n,r));return e=null,i}];u<o;u++)if(n=r.relative[t[u].type])h=[_t(At(h),n)];else{if((n=r.filter[t[u].type].apply(null,t[u].matches))[_]){for(i=++u;i<o&&!r.relative[t[i].type];i++);return xt(u>1&&At(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(G,"$1"),n,u<i&&Et(t.slice(u,i)),i<o&&Et(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return At(h)}return vt.prototype=r.filters=r.pseudos,r.setFilters=new vt,a=st.tokenize=function(t,e){var n,i,o,a,s,u,l,c=O[t+" "];if(c)return e?0:c.slice(0);for(s=t,u=[],l=r.preFilter;s;){for(a in n&&!(i=V.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=q.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(G," ")}),s=s.slice(n.length)),r.filter)!(i=Y[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):O(t,u).slice(0)},s=st.compile=function(t,e){var n,i=[],o=[],s=S[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=Et(e[n]))[_]?i.push(s):o.push(s);s=S(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,a,s,u,c){var f,d,g,y=0,v="0",b=o&&[],_=[],A=l,x=o||i&&r.find.TAG("*",c),E=w+=null==A?1:Math.random()||.1,O=x.length;for(c&&(l=a==p||a||c);v!==O&&null!=(f=x[v]);v++){if(i&&f){for(d=0,a||f.ownerDocument==p||(h(f),s=!m);g=t[d++];)if(g(f,a||p,s)){u.push(f);break}c&&(w=E)}n&&((f=!g&&f)&&y--,o&&b.push(f))}if(y+=v,n&&v!==y){for(d=0;g=e[d++];)g(b,_,a,s);if(o){if(y>0)for(;v--;)b[v]||_[v]||(_[v]=I.call(u));_=wt(_)}j.apply(u,_),c&&!o&&_.length>0&&y+e.length>1&&st.uniqueSort(u)}return c&&(w=E,l=A),b};return n?lt(o):o}(o,i)),s.selector=t}return s},u=st.select=function(t,e,n,i){var o,u,l,c,f,h="function"===typeof t&&t,p=!i&&a(t=h.selector||t);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===e.nodeType&&m&&r.relative[u[1].type]){if(!(e=(r.find.ID(l.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=Y.needsContext.test(t)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(et,nt),tt.test(u[0].type)&&yt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return j.apply(n,i),n;break}}return(h||s(t,p))(i,e,!m,n,!e||tt.test(t)&&yt(e.parentNode)||e),n},n.sortStable=_.split("").sort(C).join("")===_,n.detectDuplicates=!!f,h(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))})),ct((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ft("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ct((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ft("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ct((function(t){return null==t.getAttribute("disabled")}))||ft(N,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),st}(n);E.find=S,E.expr=S.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=S.uniqueSort,E.text=S.getText,E.isXMLDoc=S.isXML,E.contains=S.contains,E.escapeSelector=S.escape;var P=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&E(t).is(n))break;r.push(t)}return r},C=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=E.expr.match.needsContext;function k(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(t,e,n){return y(e)?E.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?E.grep(t,(function(t){return t===e!==n})):"string"!==typeof e?E.grep(t,(function(t){return c.call(e,t)>-1!==n})):E.filter(e,t,n)}E.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?E.find.matchesSelector(r,t)?[r]:[]:E.find.matches(t,E.grep(e,(function(t){return 1===t.nodeType})))},E.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!==typeof t)return this.pushStack(E(t).filter((function(){for(e=0;e<r;e++)if(E.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)E.find(t,i[e],n);return r>1?E.uniqueSort(n):n},filter:function(t){return this.pushStack(L(this,t||[],!1))},not:function(t){return this.pushStack(L(this,t||[],!0))},is:function(t){return!!L(this,"string"===typeof t&&T.test(t)?E(t):t||[],!1).length}});var j,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||j,"string"===typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:M.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof E?e[0]:e,E.merge(this,E.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),I.test(r[1])&&E.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(E):E.makeArray(t,this)}).prototype=E.fn,j=E(b);var R=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function D(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}E.fn.extend({has:function(t){var e=E(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(E.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!==typeof t&&E(t);if(!T.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(t){return t?"string"===typeof t?c.call(E(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),E.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return P(t,"parentNode")},parentsUntil:function(t,e,n){return P(t,"parentNode",n)},next:function(t){return D(t,"nextSibling")},prev:function(t){return D(t,"previousSibling")},nextAll:function(t){return P(t,"nextSibling")},prevAll:function(t){return P(t,"previousSibling")},nextUntil:function(t,e,n){return P(t,"nextSibling",n)},prevUntil:function(t,e,n){return P(t,"previousSibling",n)},siblings:function(t){return C((t.parentNode||{}).firstChild,t)},children:function(t){return C(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(k(t,"template")&&(t=t.content||t),E.merge([],t.childNodes))}},(function(t,e){E.fn[t]=function(n,r){var i=E.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"===typeof r&&(i=E.filter(r,i)),this.length>1&&(N[t]||E.uniqueSort(i),R.test(t)&&i.reverse()),this.pushStack(i)}}));var F=/[^\x20\t\r\n\f]+/g;function B(t){return t}function z(t){throw t}function U(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}E.Callbacks=function(t){t="string"===typeof t?function(t){var e={};return E.each(t.match(F)||[],(function(t,n){e[n]=!0})),e}(t):E.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){E.each(n,(function(n,r){y(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==w(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return E.each(arguments,(function(t,e){for(var n;(n=E.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?E.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(t){var e=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return E.Deferred((function(n){E.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,r,i){var o=0;function a(t,e,r,i){return function(){var s=this,u=arguments,l=function(){var n,l;if(!(t<o)){if((n=r.apply(s,u))===e.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"===typeof n||"function"===typeof n)&&n.then,y(l)?i?l.call(n,a(o,e,B,i),a(o,e,z,i)):(o++,l.call(n,a(o,e,B,i),a(o,e,z,i),a(o,e,B,e.notifyWith))):(r!==B&&(s=void 0,u=[n]),(i||e.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(n){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(n,c.stackTrace),t+1>=o&&(r!==z&&(s=void 0,u=[n]),e.rejectWith(s,u))}};t?c():(E.Deferred.getStackHook&&(c.stackTrace=E.Deferred.getStackHook()),n.setTimeout(c))}}return E.Deferred((function(n){e[0][3].add(a(0,n,y(i)?i:B,n.notifyWith)),e[1][3].add(a(0,n,y(t)?t:B)),e[2][3].add(a(0,n,y(r)?r:z))})).promise()},promise:function(t){return null!=t?E.extend(t,i):i}},o={};return E.each(e,(function(t,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),o=E.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(U(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)U(i[n],a(n),o.reject);return o.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&G.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},E.readyException=function(t){n.setTimeout((function(){throw t}))};var V=E.Deferred();function q(){b.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),E.ready()}E.fn.ready=function(t){return V.then(t).catch((function(t){E.readyException(t)})),this},E.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==t&&--E.readyWait>0||V.resolveWith(b,[E]))}}),E.ready.then=V.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(E.ready):(b.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var H=function(t,e,n,r,i,o,a){var s=0,u=t.length,l=null==n;if("object"===w(n))for(s in i=!0,n)H(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),l&&(a?(e.call(t,r),e=null):(l=e,e=function(t,e,n){return l.call(E(t),n)})),e))for(;s<u;s++)e(t[s],n,a?r:r.call(t[s],s,e(t[s],n)));return i?t:l?e.call(t):u?e(t[0],n):o},W=/^-ms-/,X=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function Z(t){return t.replace(W,"ms-").replace(X,Y)}var K=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function $(){this.expando=E.expando+$.uid++}$.uid=1,$.prototype={cache:function(t){var e=t[this.expando];return e||(e={},K(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"===typeof e)i[Z(e)]=n;else for(r in e)i[Z(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][Z(e)]},access:function(t,e,n){return void 0===e||e&&"string"===typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(Z):(e=Z(e))in r?[e]:e.match(F)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||E.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!E.isEmptyObject(e)}};var J=new $,Q=new $,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(et,"-$&").toLowerCase(),"string"===typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(i){}Q.set(t,e,n)}else n=void 0;return n}E.extend({hasData:function(t){return Q.hasData(t)||J.hasData(t)},data:function(t,e,n){return Q.access(t,e,n)},removeData:function(t,e){Q.remove(t,e)},_data:function(t,e,n){return J.access(t,e,n)},_removeData:function(t,e){J.remove(t,e)}}),E.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=Q.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=Z(r.slice(5)),nt(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"===typeof t?this.each((function(){Q.set(this,t)})):H(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Q.get(o,t))||void 0!==(n=nt(o,t))?n:void 0;this.each((function(){Q.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Q.remove(this,t)}))}}),E.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=J.get(t,e),n&&(!r||Array.isArray(n)?r=J.access(t,e,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=E.queue(t,e),r=n.length,i=n.shift(),o=E._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){E.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:E.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),E.fn.extend({queue:function(t,e){var n=2;return"string"!==typeof t&&(e=t,t="fx",n--),arguments.length<n?E.queue(this[0],t):void 0===e?this:this.each((function(){var n=E.queue(this,t,e);E._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&E.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){E.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=E.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!==typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=J.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+rt+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],at=b.documentElement,st=function(t){return E.contains(t.ownerDocument,t)},ut={composed:!0};at.getRootNode&&(st=function(t){return E.contains(t.ownerDocument,t)||t.getRootNode(ut)===t.ownerDocument});var lt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===E.css(t,"display")};function ct(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(t,e,"")},u=s(),l=n&&n[3]||(E.cssNumber[e]?"":"px"),c=t.nodeType&&(E.cssNumber[e]||"px"!==l&&+u)&&it.exec(E.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)E.style(t,e,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,E.style(t,e,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ft={};function ht(t){var e,n=t.ownerDocument,r=t.nodeName,i=ft[r];return i||(e=n.body.appendChild(n.createElement(r)),i=E.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),ft[r]=i,i)}function pt(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&lt(r)&&(i[o]=ht(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}E.fn.extend({show:function(){return pt(this,!0)},hide:function(){return pt(this)},toggle:function(t){return"boolean"===typeof t?t?this.show():this.hide():this.each((function(){lt(this)?E(this).show():E(this).hide()}))}});var dt,mt,gt=/^(?:checkbox|radio)$/i,yt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,vt=/^$|^module$|\/(?:java|ecma)script/i;dt=b.createDocumentFragment().appendChild(b.createElement("div")),(mt=b.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),dt.appendChild(mt),g.checkClone=dt.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!dt.cloneNode(!0).lastChild.defaultValue,dt.innerHTML="<option></option>",g.option=!!dt.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function _t(t,e){var n;return n="undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!==typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&k(t,e)?E.merge([t],n):n}function At(t,e){for(var n=0,r=t.length;n<r;n++)J.set(t[n],"globalEval",!e||J.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,g.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var wt=/<|&#?\w+;/;function xt(t,e,n,r,i){for(var o,a,s,u,l,c,f=e.createDocumentFragment(),h=[],p=0,d=t.length;p<d;p++)if((o=t[p])||0===o)if("object"===w(o))E.merge(h,o.nodeType?[o]:o);else if(wt.test(o)){for(a=a||f.appendChild(e.createElement("div")),s=(yt.exec(o)||["",""])[1].toLowerCase(),u=bt[s]||bt._default,a.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;E.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(e.createTextNode(o));for(f.textContent="",p=0;o=h[p++];)if(r&&E.inArray(o,r)>-1)i&&i.push(o);else if(l=st(o),a=_t(f.appendChild(o),"script"),l&&At(a),n)for(c=0;o=a[c++];)vt.test(o.type||"")&&n.push(o);return f}var Et=/^key/,Ot=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,St=/^([^.]*)(?:\.(.+)|)/;function Pt(){return!0}function Ct(){return!1}function Tt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()===("focus"===e)}function kt(t,e,n,r,i,o){var a,s;if("object"===typeof e){for(s in"string"!==typeof n&&(r=r||n,n=void 0),e)kt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"===typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ct;else if(!i)return t;return 1===o&&(a=i,i=function(t){return E().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=E.guid++)),t.each((function(){E.event.add(this,e,i,r,n)}))}function It(t,e,n){n?(J.set(t,e,!1),E.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=J.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(E.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),J.set(this,e,o),r=n(this,e),this[e](),o!==(i=J.get(this,e))||r?J.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else o.length&&(J.set(this,e,{value:E.event.trigger(E.extend(o[0],E.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&E.event.add(t,e,Pt)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,p,d,m,g=J.get(t);if(K(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(at,i),n.guid||(n.guid=E.guid++),(u=g.events)||(u=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(e){return"undefined"!==typeof E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(F)||[""]).length;l--;)p=m=(s=St.exec(e[l])||[])[1],d=(s[2]||"").split(".").sort(),p&&(f=E.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=E.event.special[p]||{},c=E.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:d.join(".")},o),(h=u[p])||((h=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,d,a)||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),E.event.global[p]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,p,d,m,g=J.hasData(t)&&J.get(t);if(g&&(u=g.events)){for(l=(e=(e||"").match(F)||[""]).length;l--;)if(p=m=(s=St.exec(e[l])||[])[1],d=(s[2]||"").split(".").sort(),p){for(f=E.event.special[p]||{},h=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(t,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(t,d,g.handle)||E.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)E.event.remove(t,p+e[l],n,r,!0);E.isEmptyObject(u)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(t),l=(J.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=E.event.handlers.call(this,u,l),e=0;(i=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?E(i,this).index(l)>-1:E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<e.length&&s.push({elem:l,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[E.expando]?t:new E.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return gt.test(e.type)&&e.click&&k(e,"input")&&It(e,"click",Pt),!1},trigger:function(t){var e=this||t;return gt.test(e.type)&&e.click&&k(e,"input")&&It(e,"click"),!0},_default:function(t){var e=t.target;return gt.test(e.type)&&e.click&&k(e,"input")&&J.get(e,"click")||k(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},E.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},E.Event=function(t,e){if(!(this instanceof E.Event))return new E.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Pt:Ct,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&E.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:Ct,isPropagationStopped:Ct,isImmediatePropagationStopped:Ct,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Pt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Pt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Pt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&Et.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&Ot.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(t,e){E.event.special[t]={setup:function(){return It(this,t,Tt),!1},trigger:function(){return It(this,t),!0},delegateType:e}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){E.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||E.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),E.fn.extend({on:function(t,e,n,r){return kt(this,t,e,n,r)},one:function(t,e,n,r){return kt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,E(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!==typeof e||(n=e,e=void 0),!1===n&&(n=Ct),this.each((function(){E.event.remove(this,t,n,e)}))}});var Lt=/<script|<style|<link/i,jt=/checked\s*(?:[^=]|=\s*.checked.)/i,Mt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Rt(t,e){return k(t,"table")&&k(11!==e.nodeType?e:e.firstChild,"tr")&&E(t).children("tbody")[0]||t}function Nt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Dt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(J.hasData(t)&&(s=J.get(t).events))for(i in J.remove(e,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)E.event.add(e,i,s[i][n]);Q.hasData(t)&&(o=Q.access(t),a=E.extend({},o),Q.set(e,a))}}function Bt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&gt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function zt(t,e,n,r){e=u(e);var i,o,a,s,l,c,f=0,h=t.length,p=h-1,d=e[0],m=y(d);if(m||h>1&&"string"===typeof d&&!g.checkClone&&jt.test(d))return t.each((function(i){var o=t.eq(i);m&&(e[0]=d.call(this,i,o.html())),zt(o,e,n,r)}));if(h&&(o=(i=xt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=E.map(_t(i,"script"),Nt)).length;f<h;f++)l=i,f!==p&&(l=E.clone(l,!0,!0),s&&E.merge(a,_t(l,"script"))),n.call(t[f],l,f);if(s)for(c=a[a.length-1].ownerDocument,E.map(a,Dt),f=0;f<s;f++)l=a[f],vt.test(l.type||"")&&!J.access(l,"globalEval")&&E.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?E._evalUrl&&!l.noModule&&E._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):A(l.textContent.replace(Mt,""),l,c))}return t}function Ut(t,e,n){for(var r,i=e?E.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(_t(r)),r.parentNode&&(n&&st(r)&&At(_t(r,"script")),r.parentNode.removeChild(r));return t}E.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=st(t);if(!g.noCloneChecked&&(1===t.nodeType||11===t.nodeType)&&!E.isXMLDoc(t))for(a=_t(s),r=0,i=(o=_t(t)).length;r<i;r++)Bt(o[r],a[r]);if(e)if(n)for(o=o||_t(t),a=a||_t(s),r=0,i=o.length;r<i;r++)Ft(o[r],a[r]);else Ft(t,s);return(a=_t(s,"script")).length>0&&At(a,!u&&_t(t,"script")),s},cleanData:function(t){for(var e,n,r,i=E.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[J.expando]){if(e.events)for(r in e.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,e.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),E.fn.extend({detach:function(t){return Ut(this,t,!0)},remove:function(t){return Ut(this,t)},text:function(t){return H(this,(function(t){return void 0===t?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return zt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,t).appendChild(t)}))},prepend:function(){return zt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Rt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(E.cleanData(_t(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return E.clone(this,t,e)}))},html:function(t){return H(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"===typeof t&&!Lt.test(t)&&!bt[(yt.exec(t)||["",""])[1].toLowerCase()]){t=E.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(E.cleanData(_t(e,!1)),e.innerHTML=t);e=0}catch(i){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return zt(this,arguments,(function(e){var n=this.parentNode;E.inArray(this,t)<0&&(E.cleanData(_t(this)),n&&n.replaceChild(e,this))}),t)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){E.fn[t]=function(t){for(var n,r=[],i=E(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),E(i[a])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Gt=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Vt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},qt=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},Ht=new RegExp(ot.join("|"),"i");function Wt(t,e,n){var r,i,o,a,s=t.style;return(n=n||Vt(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||st(t)||(a=E.style(t,e)),!g.pixelBoxStyles()&&Gt.test(a)&&Ht.test(e)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Xt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",at.appendChild(l).appendChild(c);var t=n.getComputedStyle(c);r="1%"!==t.top,u=12===e(t.marginLeft),c.style.right="60%",a=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),at.removeChild(l),c=null}}function e(t){return Math.round(parseFloat(t))}var r,i,o,a,s,u,l=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,E.extend(g,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,r,i;return null==s&&(t=b.createElement("table"),e=b.createElement("tr"),r=b.createElement("div"),t.style.cssText="position:absolute;left:-11111px",e.style.height="1px",r.style.height="9px",at.appendChild(t).appendChild(e).appendChild(r),i=n.getComputedStyle(e),s=parseInt(i.height)>3,at.removeChild(t)),s}}))}();var Yt=["Webkit","Moz","ms"],Zt=b.createElement("div").style,Kt={};function $t(t){var e=E.cssProps[t]||Kt[t];return e||(t in Zt?t:Kt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Zt)return t}(t)||t)}var Jt=/^(none|table(?!-c[ea]).+)/,Qt=/^--/,te={position:"absolute",visibility:"hidden",display:"block"},ee={letterSpacing:"0",fontWeight:"400"};function ne(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function re(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=E.css(t,n+ot[a],!0,i)),r?("content"===n&&(u-=E.css(t,"padding"+ot[a],!0,i)),"margin"!==n&&(u-=E.css(t,"border"+ot[a]+"Width",!0,i))):(u+=E.css(t,"padding"+ot[a],!0,i),"padding"!==n?u+=E.css(t,"border"+ot[a]+"Width",!0,i):s+=E.css(t,"border"+ot[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function ie(t,e,n){var r=Vt(t),i=(!g.boxSizingReliable()||n)&&"border-box"===E.css(t,"boxSizing",!1,r),o=i,a=Wt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Gt.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&k(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===E.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+re(t,e,n||(i?"border":"content"),o,r,a)+"px"}function oe(t,e,n,r,i){return new oe.prototype.init(t,e,n,r,i)}E.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=Z(e),u=Qt.test(e),l=t.style;if(u||(e=$t(s)),a=E.cssHooks[e]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:l[e];"string"===(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=ct(t,e,i),o="number"),null!=n&&n===n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,a,s=Z(e);return Qt.test(e)||(e=$t(s)),(a=E.cssHooks[e]||E.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Wt(t,e,r)),"normal"===i&&e in ee&&(i=ee[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(t,e){E.cssHooks[e]={get:function(t,n,r){if(n)return!Jt.test(E.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ie(t,e,r):qt(t,te,(function(){return ie(t,e,r)}))},set:function(t,n,r){var i,o=Vt(t),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===E.css(t,"boxSizing",!1,o),u=r?re(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-re(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=E.css(t,e)),ne(0,n,u)}}})),E.cssHooks.marginLeft=Xt(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(t,e){E.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"===typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(E.cssHooks[t+e].set=ne)})),E.fn.extend({css:function(t,e){return H(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Vt(t),i=e.length;a<i;a++)o[e[a]]=E.css(t,e[a],!1,r);return o}return void 0!==n?E.style(t,e,n):E.css(t,e)}),t,e,arguments.length>1)}}),E.Tween=oe,oe.prototype={constructor:oe,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||E.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var t=oe.propHooks[this.prop];return t&&t.get?t.get(this):oe.propHooks._default.get(this)},run:function(t){var e,n=oe.propHooks[this.prop];return this.options.duration?this.pos=e=E.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):oe.propHooks._default.set(this),this}},oe.prototype.init.prototype=oe.prototype,oe.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=E.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){E.fx.step[t.prop]?E.fx.step[t.prop](t):1!==t.elem.nodeType||!E.cssHooks[t.prop]&&null==t.elem.style[$t(t.prop)]?t.elem[t.prop]=t.now:E.style(t.elem,t.prop,t.now+t.unit)}}},oe.propHooks.scrollTop=oe.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},E.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},E.fx=oe.prototype.init,E.fx.step={};var ae,se,ue=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function ce(){se&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ce):n.setTimeout(ce,E.fx.interval),E.fx.tick())}function fe(){return n.setTimeout((function(){ae=void 0})),ae=Date.now()}function he(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function pe(t,e,n){for(var r,i=(de.tweeners[e]||[]).concat(de.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function de(t,e,n){var r,i,o=0,a=de.prefilters.length,s=E.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=ae||fe(),n=Math.max(0,l.startTime+l.duration-e),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(t,[l,r,n]),r<1&&a?n:(a||s.notifyWith(t,[l,1,0]),s.resolveWith(t,[l]),!1)},l=s.promise({elem:t,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:e,originalOptions:n,startTime:ae||fe(),duration:n.duration,tweens:[],createTween:function(e,n){var r=E.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return e?(s.notifyWith(t,[l,1,0]),s.resolveWith(t,[l,e])):s.rejectWith(t,[l,e]),this}}),c=l.props;for(!function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=Z(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=E.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=de.prefilters[o].call(l,t,c,l.opts))return y(r.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return E.map(c,pe,l),y(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(de,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ct(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(F);for(var n,r=0,i=t.length;r<i;r++)n=t[r],de.tweeners[n]=de.tweeners[n]||[],de.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,u,l,c,f="width"in e||"height"in e,h=this,p={},d=t.style,m=t.nodeType&&lt(t),g=J.get(t,"fxshow");for(r in n.queue||(null==(a=E._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,E.queue(t,"fx").length||a.empty.fire()}))}))),e)if(i=e[r],ue.test(i)){if(delete e[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}p[r]=g&&g[r]||E.style(t,r)}if((u=!E.isEmptyObject(e))||!E.isEmptyObject(p))for(r in f&&1===t.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],null==(l=g&&g.display)&&(l=J.get(t,"display")),"none"===(c=E.css(t,"display"))&&(l?c=l:(pt([t],!0),l=t.style.display||l,c=E.css(t,"display"),pt([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.css(t,"float")&&(u||(h.done((function(){d.display=l})),null==l&&(c=d.display,l="none"===c?"":c)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",h.always((function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}))),u=!1,p)u||(g?"hidden"in g&&(m=g.hidden):g=J.access(t,"fxshow",{display:l}),o&&(g.hidden=!m),m&&pt([t],!0),h.done((function(){for(r in m||pt([t]),J.remove(t,"fxshow"),p)E.style(t,r,p[r])}))),u=pe(m?g[r]:0,r,h),r in g||(g[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?de.prefilters.unshift(t):de.prefilters.push(t)}}),E.speed=function(t,e,n){var r=t&&"object"===typeof t?E.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return E.fx.off?r.duration=0:"number"!==typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(t,e,n,r){return this.filter(lt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=E.isEmptyObject(t),o=E.speed(e,n,r),a=function(){var e=de(this,E.extend({},t),o);(i||J.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!==typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=E.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&le.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||E.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=J.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=E.timers,a=r?r.length:0;for(n.finish=!0,E.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(t,e){var n=E.fn[e];E.fn[e]=function(t,r,i){return null==t||"boolean"===typeof t?n.apply(this,arguments):this.animate(he(e,!0),t,r,i)}})),E.each({slideDown:he("show"),slideUp:he("hide"),slideToggle:he("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){E.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),E.timers=[],E.fx.tick=function(){var t,e=0,n=E.timers;for(ae=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||E.fx.stop(),ae=void 0},E.fx.timer=function(t){E.timers.push(t),E.fx.start()},E.fx.interval=13,E.fx.start=function(){se||(se=!0,ce())},E.fx.stop=function(){se=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(t,e){return t=E.fx&&E.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,r){var i=n.setTimeout(e,t);r.stop=function(){n.clearTimeout(i)}}))},function(){var t=b.createElement("input"),e=b.createElement("select").appendChild(b.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=b.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var me,ge=E.expr.attrHandle;E.fn.extend({attr:function(t,e){return H(this,E.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){E.removeAttr(this,t)}))}}),E.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"===typeof t.getAttribute?E.prop(t,e,n):(1===o&&E.isXMLDoc(t)||(i=E.attrHooks[e.toLowerCase()]||(E.expr.match.bool.test(e)?me:void 0)),void 0!==n?null===n?void E.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=E.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&k(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(F);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),me={set:function(t,e,n){return!1===e?E.removeAttr(t,n):t.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ge[e]||E.find.attr;ge[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ge[a],ge[a]=i,i=null!=n(t,e,r)?a:null,ge[a]=o),i}}));var ye=/^(?:input|select|textarea|button)$/i,ve=/^(?:a|area)$/i;function be(t){return(t.match(F)||[]).join(" ")}function _e(t){return t.getAttribute&&t.getAttribute("class")||""}function Ae(t){return Array.isArray(t)?t:"string"===typeof t&&t.match(F)||[]}E.fn.extend({prop:function(t,e){return H(this,E.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[E.propFix[t]||t]}))}}),E.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(t)||(e=E.propFix[e]||e,i=E.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=E.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||ve.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(E.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(y(t))return this.each((function(e){E(this).addClass(t.call(this,e,_e(this)))}));if((e=Ae(t)).length)for(;n=this[u++];)if(i=_e(n),r=1===n.nodeType&&" "+be(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=be(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(y(t))return this.each((function(e){E(this).removeClass(t.call(this,e,_e(this)))}));if(!arguments.length)return this.attr("class","");if((e=Ae(t)).length)for(;n=this[u++];)if(i=_e(n),r=1===n.nodeType&&" "+be(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=be(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"===typeof e&&r?e?this.addClass(t):this.removeClass(t):y(t)?this.each((function(n){E(this).toggleClass(t.call(this,n,_e(this),e),e)})):this.each((function(){var e,i,o,a;if(r)for(i=0,o=E(this),a=Ae(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=_e(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+be(_e(n))+" ").indexOf(e)>-1)return!0;return!1}});var we=/\r/g;E.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,E(this).val()):t)?i="":"number"===typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(t){return null==t?"":t+""}))),(e=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"===typeof(n=i.value)?n.replace(we,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(t){var e=E.find.attr(t,"value");return null!=e?e:be(E.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!k(n.parentNode,"optgroup"))){if(e=E(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=E.makeArray(e),a=i.length;a--;)((r=i[a]).selected=E.inArray(E.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=E.inArray(E(t).val(),e)>-1}},g.checkOn||(E.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in n;var xe=/^(?:focusinfocus|focusoutblur)$/,Ee=function(t){t.stopPropagation()};E.extend(E.event,{trigger:function(t,e,r,i){var o,a,s,u,l,c,f,h,d=[r||b],m=p.call(t,"type")?t.type:t,g=p.call(t,"namespace")?t.namespace.split("."):[];if(a=h=s=r=r||b,3!==r.nodeType&&8!==r.nodeType&&!xe.test(m+E.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[E.expando]?t:new E.Event(m,"object"===typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:E.makeArray(e,[t]),f=E.event.special[m]||{},i||!f.trigger||!1!==f.trigger.apply(r,e))){if(!i&&!f.noBubble&&!v(r)){for(u=f.delegateType||m,xe.test(u+m)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||b)&&d.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)h=a,t.type=o>1?u:f.bindType||m,(c=(J.get(a,"events")||Object.create(null))[t.type]&&J.get(a,"handle"))&&c.apply(a,e),(c=l&&a[l])&&c.apply&&K(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),e)||!K(r)||l&&y(r[m])&&!v(r)&&((s=r[l])&&(r[l]=null),E.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Ee),r[m](),t.isPropagationStopped()&&h.removeEventListener(m,Ee),E.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,e,n){var r=E.extend(new E.Event,n,{type:t,isSimulated:!0});E.event.trigger(r,null,e)}}),E.fn.extend({trigger:function(t,e){return this.each((function(){E.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return E.event.trigger(t,e,n,!0)}}),g.focusin||E.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){E.event.simulate(e,t.target,E.event.fix(t))};E.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=J.access(r,e);i||r.addEventListener(t,n,!0),J.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=J.access(r,e)-1;i?J.access(r,e,i):(r.removeEventListener(t,n,!0),J.remove(r,e))}}}));var Oe=n.location,Se={guid:Date.now()},Pe=/\?/;E.parseXML=function(t){var e;if(!t||"string"!==typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(r){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||E.error("Invalid XML: "+t),e};var Ce=/\[\]$/,Te=/\r?\n/g,ke=/^(?:submit|button|image|reset|file)$/i,Ie=/^(?:input|select|textarea|keygen)/i;function Le(t,e,n,r){var i;if(Array.isArray(e))E.each(e,(function(e,i){n||Ce.test(t)?r(t,i):Le(t+"["+("object"===typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==w(e))r(t,e);else for(i in e)Le(t+"["+i+"]",e[i],n,r)}E.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!E.isPlainObject(t))E.each(t,(function(){i(this.name,this.value)}));else for(n in t)Le(n,t[n],e,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=E.prop(this,"elements");return t?E.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!E(this).is(":disabled")&&Ie.test(this.nodeName)&&!ke.test(t)&&(this.checked||!gt.test(t))})).map((function(t,e){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(t){return{name:e.name,value:t.replace(Te,"\r\n")}})):{name:e.name,value:n.replace(Te,"\r\n")}})).get()}});var je=/%20/g,Me=/#.*$/,Re=/([?&])_=[^&]*/,Ne=/^(.*?):[ \t]*([^\r\n]*)$/gm,De=/^(?:GET|HEAD)$/,Fe=/^\/\//,Be={},ze={},Ue="*/".concat("*"),Ge=b.createElement("a");function Ve(t){return function(e,n){"string"!==typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(F)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function qe(t,e,n,r){var i={},o=t===ze;function a(s){var u;return i[s]=!0,E.each(t[s]||[],(function(t,s){var l=s(e,n,r);return"string"!==typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function He(t,e){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&E.extend(!0,t,r),t}Ge.href=Oe.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Oe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Oe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?He(He(t,E.ajaxSettings),e):He(E.ajaxSettings,t)},ajaxPrefilter:Ve(Be),ajaxTransport:Ve(ze),ajax:function(t,e){"object"===typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,a,s,u,l,c,f,h,p=E.ajaxSetup({},e),d=p.context||p,m=p.context&&(d.nodeType||d.jquery)?E(d):E.event,g=E.Deferred(),y=E.Callbacks("once memory"),v=p.statusCode||{},_={},A={},w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=Ne.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=A[t.toLowerCase()]=A[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==l&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)x.always(t[x.status]);else for(e in t)v[e]=[v[e],t[e]];return this},abort:function(t){var e=t||w;return r&&r.abort(e),O(0,e),this}};if(g.promise(x),p.url=((t||p.url||Oe.href)+"").replace(Fe,Oe.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(F)||[""],null==p.crossDomain){u=b.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Ge.protocol+"//"+Ge.host!==u.protocol+"//"+u.host}catch(S){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!==typeof p.data&&(p.data=E.param(p.data,p.traditional)),qe(Be,p,e,x),l)return x;for(f in(c=E.event&&p.global)&&0===E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!De.test(p.type),i=p.url.replace(Me,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(je,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"===typeof p.data)&&(i+=(Pe.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Re,"$1"),h=(Pe.test(i)?"&":"?")+"_="+Se.guid+++h),p.url=i+h),p.ifModified&&(E.lastModified[i]&&x.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&x.setRequestHeader("If-None-Match",E.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ue+"; q=0.01":""):p.accepts["*"]),p.headers)x.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(d,x,p)||l))return x.abort();if(w="abort",y.add(p.complete),x.done(p.success),x.fail(p.error),r=qe(ze,p,e,x)){if(x.readyState=1,c&&m.trigger("ajaxSend",[x,p]),l)return x;p.async&&p.timeout>0&&(s=n.setTimeout((function(){x.abort("timeout")}),p.timeout));try{l=!1,r.send(_,O)}catch(S){if(l)throw S;O(-1,S)}}else O(-1,"No Transport");function O(t,e,a,u){var f,h,b,_,A,w=e;l||(l=!0,s&&n.clearTimeout(s),r=void 0,o=u||"",x.readyState=t>0?4:0,f=t>=200&&t<300||304===t,a&&(_=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,x,a)),!f&&E.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),_=function(t,e,n,r){var i,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(S){return{state:"parsererror",error:a?S:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(p,_,x,f),f?(p.ifModified&&((A=x.getResponseHeader("Last-Modified"))&&(E.lastModified[i]=A),(A=x.getResponseHeader("etag"))&&(E.etag[i]=A)),204===t||"HEAD"===p.type?w="nocontent":304===t?w="notmodified":(w=_.state,h=_.data,f=!(b=_.error))):(b=w,!t&&w||(w="error",t<0&&(t=0))),x.status=t,x.statusText=(e||w)+"",f?g.resolveWith(d,[h,w,x]):g.rejectWith(d,[x,w,b]),x.statusCode(v),v=void 0,c&&m.trigger(f?"ajaxSuccess":"ajaxError",[x,p,f?h:b]),y.fireWith(d,[x,w]),c&&(m.trigger("ajaxComplete",[x,p]),--E.active||E.event.trigger("ajaxStop")))}return x},getJSON:function(t,e,n){return E.get(t,e,n,"json")},getScript:function(t,e){return E.get(t,void 0,e,"script")}}),E.each(["get","post"],(function(t,e){E[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:t,type:e,dataType:i,data:n,success:r},E.isPlainObject(t)&&t))}})),E.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),E._evalUrl=function(t,e,n){return E.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){E.globalEval(t,e,n)}})},E.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=E(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){E(this).wrapInner(t.call(this,e))})):this.each((function(){var e=E(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){E(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(t){return!E.expr.pseudos.visible(t)},E.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Xe=E.ajaxSettings.xhr();g.cors=!!Xe&&"withCredentials"in Xe,g.ajax=Xe=!!Xe,E.ajaxTransport((function(t){var e,r;if(g.cors||Xe&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!==typeof s.status?o(0,"error"):o(s.status,s.statusText):o(We[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!==typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){e&&r()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(u){if(e)throw u}},abort:function(){e&&e()}}})),E.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return E.globalEval(t),t}}}),E.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),E.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=E("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ye,Ze=[],Ke=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ze.pop()||E.expando+"_"+Se.guid++;return this[t]=!0,t}}),E.ajaxPrefilter("json jsonp",(function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(Ke.test(t.url)?"url":"string"===typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ke.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Ke,"$1"+i):!1!==t.jsonp&&(t.url+=(Pe.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||E.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always((function(){void 0===o?E(n).removeProp(i):n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ze.push(i)),a&&y(o)&&o(a[0]),a=o=void 0})),"script"})),g.createHTMLDocument=((Ye=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ye.childNodes.length),E.parseHTML=function(t,e,n){return"string"!==typeof t?[]:("boolean"===typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((r=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(r)):e=b),o=!n&&[],(i=I.exec(t))?[e.createElement(i[1])]:(i=xt([t],e,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(t,e,n){var r,i,o,a=this,s=t.indexOf(" ");return s>-1&&(r=be(t.slice(s)),t=t.slice(0,s)),y(e)?(n=e,e=void 0):e&&"object"===typeof e&&(i="POST"),a.length>0&&E.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,a.html(r?E("<div>").append(E.parseHTML(t)).find(r):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,(function(e){return t===e.elem})).length},E.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,l=E.css(t,"position"),c=E(t),f={};"static"===l&&(t.style.position="relative"),s=c.offset(),o=E.css(t,"top"),u=E.css(t,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,E.extend({},s))),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):("number"===typeof f.top&&(f.top+="px"),"number"===typeof f.left&&(f.left+="px"),c.css(f))}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){E.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===E.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=E(t).offset()).top+=E.css(t,"borderTopWidth",!0),i.left+=E.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-E.css(r,"marginTop",!0),left:e.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===E.css(t,"position");)t=t.offsetParent;return t||at}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;E.fn[t]=function(r){return H(this,(function(t,r,i){var o;if(v(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),E.each(["top","left"],(function(t,e){E.cssHooks[e]=Xt(g.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Gt.test(n)?E(t).position()[e]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(t,e){E.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){E.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!==typeof i),s=n||(!0===i||!0===o?"margin":"border");return H(this,(function(e,n,i){var o;return v(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?E.css(e,n,s):E.style(e,n,i,s)}),e,a?i:void 0,a)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){E.fn[e]=function(t){return this.on(e,t)}})),E.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){E.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var $e=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;E.proxy=function(t,e){var n,r,i;if("string"===typeof e&&(n=t[e],e=t,t=n),y(t))return r=s.call(arguments,2),i=function(){return t.apply(e||this,r.concat(s.call(arguments)))},i.guid=t.guid=t.guid||E.guid++,i},E.holdReady=function(t){t?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=k,E.isFunction=y,E.isWindow=v,E.camelCase=Z,E.type=w,E.now=Date.now,E.isNumeric=function(t){var e=E.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},E.trim=function(t){return null==t?"":(t+"").replace($e,"")},void 0===(r=function(){return E}.apply(e,[]))||(t.exports=r);var Je=n.jQuery,Qe=n.$;return E.noConflict=function(t){return n.$===E&&(n.$=Qe),t&&n.jQuery===E&&(n.jQuery=Je),E},"undefined"===typeof i&&(n.jQuery=n.$=E),E}))},function(t,e,n){t.exports={Card:"Card-module__Card___5lvtD",imageSubstitute:"Card-module__imageSubstitute___3NkZG",description:"Card-module__description___3iyvj",typeIndicator:"Card-module__typeIndicator___3292X",stateIndicator:"Card-module__stateIndicator___2JoyW",trailOrdinalPosition:"Card-module__trailOrdinalPosition___24HCf",mediaTypeIcon:"Card-module__mediaTypeIcon___3jdkY",hasTrailNumber:"Card-module__hasTrailNumber___tPLyZ"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(t))return e;return[255*t[0],255*t[1],255*t[2],255*t[3]]},e.recursivelyTraverseNestedArrays=function t(e,n,r){if(!Array.isArray(e[0]))return!0;for(var i=0;i<e.length;i++)if(t(e[i],[].concat(c(n),[i]),r)){r(e,n);break}return!1},e.generatePointsParallelToLinePoints=function(t,e,n){var s={type:"LineString",coordinates:[t,e]},u=(0,a.point)(n),l=(0,o.default)(u,s),c=(0,i.default)(t,e),f=(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])<0?c-90:c-270,h=(0,r.default)(e,l,f),p=(0,r.default)(t,l,f);return[h.geometry.coordinates,p.geometry.coordinates]},e.distance2d=p,e.mix=d,e.nearestPointOnProjectedLine=function(t,e,n){var r=new s.default(n),i=t.geometry.coordinates.map((function(t){var e=l(t,3),n=e[0],i=e[1],o=e[2],a=void 0===o?0:o;return r.project([n,i,a])})),o=l(r.project(e.geometry.coordinates),2),a=o[0],u=o[1],c=1/0,f={};i.forEach((function(t,e){var n=l(t,2),r=n[0],o=n[1];if(0!==e){var s=l(i[e-1],2),h=s[0],p=s[1],d=p-o,m=r-h,g=h*o-r*p,y=d*d+m*m,v=Math.abs(d*a+m*u+g)/Math.sqrt(y);v<c&&(c=v,f={index:e,x0:(m*(m*a-d*u)-d*g)/y,y0:(d*(-m*a+d*u)-m*g)/y})}}));var h=f,m=h.index,g=h.x0,y=h.y0,v=l(i[m-1],3),b=v[0],_=v[1],A=v[2],w=void 0===A?0:A,x=l(i[m],3),E=x[0],O=x[1],S=x[2],P=void 0===S?0:S,C=p(b,_,E,O),T=p(b,_,g,y),k=d(w,P,T/C);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([g,y,k])},properties:{dist:c,index:m-1}}},e.getPickedEditHandle=function(t){var e=m(t);return e.length?e[0]:null},e.getPickedSnapSourceEditHandle=function(t){return m(t).find((function(t){return"snap-source"===t.properties.editHandleType}))},e.getNonGuidePicks=function(t){return t&&t.filter((function(t){return!t.isGuide}))},e.getPickedExistingEditHandle=function(t){return m(t).find((function(t){var e=t.properties;return e.featureIndex>=0&&"existing"===e.editHandleType}))},e.getPickedIntermediateEditHandle=function(t){return m(t).find((function(t){var e=t.properties;return e.featureIndex>=0&&"intermediate"===e.editHandleType}))},e.getPickedEditHandles=m,e.getEditHandlesForGeometry=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"existing",r=[];switch(t.type){case"Point":r=[{type:"Feature",properties:{guideType:"editHandle",editHandleType:n,positionIndexes:[],featureIndex:e},geometry:{type:"Point",coordinates:t.coordinates}}];break;case"MultiPoint":case"LineString":r=r.concat(g(t.coordinates,[],e,n));break;case"Polygon":case"MultiLineString":for(var i=0;i<t.coordinates.length;i++)r=r.concat(g(t.coordinates[i],[i],e,n)),"Polygon"===t.type&&(r=r.slice(0,-1));break;case"MultiPolygon":for(var o=0;o<t.coordinates.length;o++)for(var a=0;a<t.coordinates[o].length;a++)r=(r=r.concat(g(t.coordinates[o][a],[o,a],e,n))).slice(0,-1);break;default:throw Error("Unhandled geometry type: ".concat(t.type))}return r};var r=u(n(151)),i=u(n(89)),o=u(n(609)),a=n(60),s=u(n(441));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(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.")}()}function f(t,e){if(t){if("string"===typeof t)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(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 p(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function d(t,e,n){return e*n+t*(1-n)}function m(t){return t&&t.filter((function(t){return t.isGuide&&"editHandle"===t.object.properties.guideType})).map((function(t){return t.object}))||[]}function g(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"existing",i=[],o=0;o<t.length;o++){var a=t[o];i.push({type:"Feature",properties:{guideType:"editHandle",positionIndexes:[].concat(c(e),[o]),featureIndex:n,editHandleType:r},geometry:{type:"Point",coordinates:a}})}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return w})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return p})),n.d(e,"e",(function(){return v})),n.d(e,"f",(function(){return b})),n.d(e,"g",(function(){return A})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return g})),n.d(e,"j",(function(){return d}));var r=n(0),i=n(587);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},o.apply(this,arguments)}var a=n(393),s=n(1052),u=n(414),l=n(466),c=Object.prototype.hasOwnProperty,f=Object(r.createContext)("undefined"!==typeof HTMLElement?Object(i.a)({key:"css"}):null);var h=f.Provider,p=function(){return Object(r.useContext)(f)},d=function(t){return Object(r.forwardRef)((function(e,n){var i=Object(r.useContext)(f);return t(e,i,n)}))},m=Object(r.createContext)({});var g=function(){return Object(r.useContext)(m)},y=Object(a.a)((function(t){return Object(a.a)((function(e){return function(t,e){return"function"===typeof e?e(t):o({},t,e)}(t,e)}))})),v=function(t){var e=Object(r.useContext)(m);return t.theme!==e&&(e=y(e)(t.theme)),Object(r.createElement)(m.Provider,{value:e},t.children)};function b(t){var e=t.displayName||t.name||"Component",n=function(e,n){var i=Object(r.useContext)(m);return Object(r.createElement)(t,o({theme:i,ref:n},e))},i=Object(r.forwardRef)(n);return i.displayName="WithTheme("+e+")",Object(s.a)(i,t)}var _="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",A=function(t,e){var n={};for(var r in e)c.call(e,r)&&(n[r]=e[r]);return n[_]=t,n},w=d((function(t,e,n){var i=t.css;"string"===typeof i&&void 0!==e.registered[i]&&(i=e.registered[i]);var o=t[_],a=[i],s="";"string"===typeof t.className?s=Object(u.a)(e.registered,a,t.className):null!=t.className&&(s=t.className+" ");var f=Object(l.a)(a,void 0,Object(r.useContext)(m));Object(u.b)(e,f,"string"===typeof o);s+=e.key+"-"+f.name;var h={};for(var p in t)c.call(t,p)&&"css"!==p&&p!==_&&(h[p]=t[p]);return h.ref=n,h.className=s,Object(r.createElement)(o,h)}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(12);class i 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)){clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=t[n+e];return this.check()}toArray(t=[],e=0){for(let n=0;n<this.ELEMENTS;++n)t[e+n]=this[n];return t}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}to(t){return t===this?this:Object(r.m)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(r.f)}formatString(t){let e="";for(let n=0;n<this.ELEMENTS;++n)e+=(n>0?", ":"")+Object(r.l)(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(!Object(r.j)(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){if(void 0===n)return this.lerp(this,t,e);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("number"===typeof t)for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;else for(let e=0;e<this.ELEMENTS&&e<t.length;++e)this[e]*=t[e];return this.check()}multiplyByScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}check(){if(r.f.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid 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}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.multiplyByScalar(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()}get elements(){return this}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(3),a=n.n(o),s=n(399),u=["markerPrefix","orderedPosition","unclustered","getIcon","highlighted","type","slug","sub_slug","user","level","path"];function l(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}var c=function(t){var e=t.markerPrefix,n=t.orderedPosition,r=t.unclustered,o=t.getIcon,a=t.highlighted,c=t.type,f=t.slug,h=t.sub_slug,p=t.user,d=t.level,m=void 0===d?0:d,g=t.path,y=l(t,u);return Object(s.default)({markerPrefix:e,orderedPosition:n,unclustered:r,getIcon:o,highlighted:a,path:g,level:m,type:c,slug:0===m?f:h,user:p,baseUrl:"".concat("https://vector-tiles.humap.site","/rpc/item_points")}),i.a.createElement(i.a.Fragment,null,y.children)};c.propTypes={type:a.a.string.isRequired,user:a.a.object,highlight:a.a.bool,level:a.a.number.isRequired,getIcon:a.a.func},c.defaultProps={level:0},e.default=c},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return i(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(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.")}()}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){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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(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 u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.ImmutableFeatureCollection=void 0;var l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,"featureCollection",void 0),this.featureCollection=e}var e,n,i;return e=t,(n=[{key:"getObject",value:function(){return this.featureCollection}},{key:"replacePosition",value:function(t,e,n){var r=this.featureCollection.features[t].geometry,i="Polygon"===r.type||"MultiPolygon"===r.type,o=a({},r,{coordinates:f(r.coordinates,e,n,i)});return this.replaceGeometry(t,o)}},{key:"removePosition",value:function(t,e){var n=this.featureCollection.features[t].geometry;if("Point"===n.type)throw Error("Can't remove a position from a Point or there'd be nothing left");if("MultiPoint"===n.type&&n.coordinates.length<2)throw Error("Can't remove the last point of a MultiPoint or there'd be nothing left");if("LineString"===n.type&&n.coordinates.length<3)throw Error("Can't remove position. LineString must have at least two positions");if("Polygon"===n.type&&n.coordinates[0].length<5&&Array.isArray(e)&&0===e[0])throw Error("Can't remove position. Polygon's outer ring must have at least four positions");if("MultiLineString"===n.type&&1===n.coordinates.length&&n.coordinates[0].length<3)throw Error("Can't remove position. MultiLineString must have at least two positions");if("MultiPolygon"===n.type&&1===n.coordinates.length&&n.coordinates[0][0].length<5&&Array.isArray(e)&&0===e[0]&&0===e[1])throw Error("Can't remove position. MultiPolygon's outer ring must have at least four positions");var r="Polygon"===n.type||"MultiPolygon"===n.type,i=a({},n,{coordinates:h(n.coordinates,e,r)});return function(t){switch(t.type){case"Polygon":!function(t){for(var e=t.coordinates,n=1;n<e.length;n++)d(e,n)&&n--}(t);break;case"MultiLineString":!function(t){for(var e=0;e<t.coordinates.length;e++)1===t.coordinates[e].length&&(t.coordinates.splice(e,1),e--)}(t);break;case"MultiPolygon":!function(t){for(var e=0;e<t.coordinates.length;e++){var n=t.coordinates[e];n[0].length<=3&&(t.coordinates.splice(e,1),e--);for(var r=1;r<n.length;r++)d(n,r)&&r--}}(t)}}(i),this.replaceGeometry(t,i)}},{key:"addPosition",value:function(t,e,n){var r=this.featureCollection.features[t].geometry;if("Point"===r.type)throw new Error("Unable to add a position to a Point feature");var i="Polygon"===r.type||"MultiPolygon"===r.type,o=a({},r,{coordinates:p(r.coordinates,e,n,i)});return this.replaceGeometry(t,o)}},{key:"replaceGeometry",value:function(e,n){var i=a({},this.featureCollection.features[e],{geometry:n});return new t(a({},this.featureCollection,{features:[].concat(r(this.featureCollection.features.slice(0,e)),[i],r(this.featureCollection.features.slice(e+1)))}))}},{key:"addFeature",value:function(t){return this.addFeatures([t])}},{key:"addFeatures",value:function(e){return new t(a({},this.featureCollection,{features:[].concat(r(this.featureCollection.features),r(e))}))}},{key:"deleteFeature",value:function(t){return this.deleteFeatures([t])}},{key:"deleteFeatures",value:function(e){var n=r(this.featureCollection.features);e.sort();for(var i=e.length-1;i>=0;i--){var o=e[i];o>=0&&o<n.length&&n.splice(o,1)}return new t(a({},this.featureCollection,{features:n}))}}])&&s(e.prototype,n),i&&s(e,i),t}();function c(t,e){if(2===t.length&&3===e.length){var n=e[2];return[t[0],t[1],n]}return t}function f(t,e,n,i){if(!e)return t;if(0===e.length)return c(n,t);if(1===e.length){var o=[].concat(r(t.slice(0,e[0])),[c(n,t[e[0]])],r(t.slice(e[0]+1)));return!i||0!==e[0]&&e[0]!==t.length-1||(o[0]=c(n,t[0]),o[t.length-1]=c(n,t[0])),o}return[].concat(r(t.slice(0,e[0])),[f(t[e[0]],e.slice(1,e.length),n,i)],r(t.slice(e[0]+1)))}function h(t,e,n){if(!e)return t;if(0===e.length)throw Error("Must specify the index of the position to remove");if(1===e.length){var i=[].concat(r(t.slice(0,e[0])),r(t.slice(e[0]+1)));return!n||0!==e[0]&&e[0]!==t.length-1||(0===e[0]?i[i.length-1]=i[0]:e[0]===t.length-1&&(i[0]=i[i.length-1])),i}return[].concat(r(t.slice(0,e[0])),[h(t[e[0]],e.slice(1,e.length),n)],r(t.slice(e[0]+1)))}function p(t,e,n,i){if(!e)return t;if(0===e.length)throw Error("Must specify the index of the position to remove");return 1===e.length?[].concat(r(t.slice(0,e[0])),[n],r(t.slice(e[0]))):[].concat(r(t.slice(0,e[0])),[p(t[e[0]],e.slice(1,e.length),n,i)],r(t.slice(e[0]+1)))}function d(t,e){return t[e].length<=3&&(t.splice(e,1),!0)}e.ImmutableFeatureCollection=l},function(t,e,n){"use strict";function r(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}n.d(e,"a",(function(){return r}))},,,function(t,e,n){"use strict";(function(t,r){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));const i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document,process:"object"===typeof r&&r},o=(globalThis,i.window||i.self||i.global),a=i.process||{};console}).call(this,n(36),n(68))},function(t,e,n){var r=n(291),i=n(120),o=n(497),a=n(886),s=n(388),u=function(t,e,n){var l,c,f,h=t&u.F,p=t&u.G,d=t&u.S,m=t&u.P,g=t&u.B,y=t&u.W,v=p?i:i[e]||(i[e]={}),b=v.prototype,_=p?r:d?r[e]:(r[e]||{}).prototype;for(l in p&&(n=e),n)(c=!h&&_&&void 0!==_[l])&&s(v,l)||(f=c?_[l]:n[l],v[l]=p&&"function"!=typeof _[l]?n[l]:g&&c?o(f,r):y&&_[l]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):m&&"function"==typeof f?o(Function.call,f):f,m&&((v.virtual||(v.virtual={}))[l]=f,t&u.R&&b&&!b[l]&&a(b,l,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){t.exports=!n(293)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r="",i={};function o(t){for(var e in i)if(t.startsWith(e)){var n=i[e];t=t.replace(e,n)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(r).concat(t)),t}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));n(406);function r(t){return r="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},r(t)}function i(t){return t&&"object"===r(t)&&t.isBuffer}function o(t){return i(t)?new Uint8Array(t.buffer,t.byteOffset,t.length).slice().buffer:t}},function(t,e,n){"use strict";var r=n(1432);const i="#define SMOOTH_EDGE_RADIUS 0.5";var o={name:"geometry",vs:"\n".concat(i,"\n\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, 0.0, 1.0, 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".concat(i,"\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")},a=n(15);const s=Object.keys(a.a).map((t=>"const int COORDINATE_SYSTEM_".concat(t," = ").concat(a.a[t],";"))).join(""),u=Object.keys(a.d).map((t=>"const int PROJECTION_MODE_".concat(t," = ").concat(a.d[t],";"))).join(""),l=Object.keys(a.e).map((t=>"const int UNIT_".concat(t.toUpperCase()," = ").concat(a.e[t],";"))).join("");var c="".concat(s,"\n").concat(u,"\n").concat(l,'\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; // meters\nconst float GLOBE_RADIUS = 256.0;\n\n// returns an adjustment factor for uCommonUnitsPerMeter\nfloat project_size_at_latitude(float lat) {\n  float y = clamp(lat, -89.9, 89.9);\n  return 1.0 / cos(radians(y));\n}\n\nfloat project_size() {\n  if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR &&\n    project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT &&\n    project_uPseudoMeters == false) {\n\n    // uCommonUnitsPerMeter in low-zoom Web Mercator is non-linear\n    // Adjust by 1 / cos(latitude)\n    // If geometry.position (vertex in common space) is populated, use it\n    // Otherwise use geometry.worldPosition (anchor in world space)\n    \n    if (geometry.position.w == 0.0) {\n      return project_size_at_latitude(geometry.worldPosition.y);\n    }\n\n    // latitude from common y: 2.0 * (atan(exp(y / TILE_SIZE * 2.0 * PI - PI)) - PI / 4.0)\n    // Taylor series of 1 / cos(latitude)\n    // Max error < 0.003\n  \n    float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;\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}\n\nfloat project_size_at_latitude(float meters, float lat) {\n  return meters * project_uCommonUnitsPerMeter.z * project_size_at_latitude(lat);\n}\n\n//\n// Scaling offsets - scales meters to "world distance"\n// Note the scalar version of project_size is for scaling the z component only\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}\n\n// Get rotation matrix that aligns the z axis with the given up vector\n// Find 3 unit vectors ux, uy, uz that are perpendicular to each other and uz == up\nmat3 project_get_orientation_matrix(vec3 up) {\n  vec3 uz = normalize(up);\n  // Tangent on XY plane\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\n//\n// Projecting normal - transform deltas from current coordinate system to\n// normals in the worldspace\n//\nvec3 project_normal(vec3 vector) {\n  // Apply model matrix\n  vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n  vec3 n = normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n  mat3 rotation;\n  if (project_needs_rotation(geometry.position.xyz, rotation)) {\n    n = rotation * n;\n  }\n  return n;\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}\n\n//\n// Projecting positions - non-linear projection: lnglats => unit tile [0-1, 0-1]\n//\nvec2 project_mercator_(vec2 lnglat) {\n  float x = lnglat.x;\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}\n\n//\n// Projects positions (defined by project_uCoordinateSystem) to common space (defined by project_uProjectionMode)\n//\nvec4 project_position(vec4 position, vec3 position64Low) {\n  vec4 position_world = project_uModelMatrix * position;\n\n  // Work around for a Mac+NVIDIA bug https://github.com/visgl/deck.gl/issues/4145\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_at_latitude(position_world.z, position_world.y),\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        // Too far from the projection center for offset mode to be accurate\n        // Only use high parts\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    // Subtract high part of 64 bit value. Convert remainder to float32, preserving precision.\n    position_world.xyz -= project_uCoordinateOrigin;\n  }\n\n  // Translation is already added to the high parts\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}\n\n//\n// Projects from common space coordinates to clip space.\n// Uses project_uViewProjectionMatrix\n//\nvec4 project_common_position_to_clipspace(vec4 position) {\n  return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\n\n// Returns a clip space offset that corresponds to a given number of screen pixels\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  // UNIT_PIXELS\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}\n'),f=n(218);const h={};e.a={name:"project",dependencies:[r.a,o],vs:c,getUniforms:function(t=h){return"viewport"in t?Object(f.b)(t):{}}}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchCollectionQuery",(function(){return i})),n.d(e,"fetchCollectionCardItemsQuery",(function(){return l})),n.d(e,"fetchRecordActionsCollectionsQuery",(function(){return s})),n.d(e,"fetchParentContextItemQuery",(function(){return f})),n.d(e,"fetchParentContextItemNavigationQuery",(function(){return h})),n.d(e,"fetchCollectionSummaryQuery",(function(){return a})),n.d(e,"fetchTimelineItemQuery",(function(){return c})),n.d(e,"mutateAddRecordToCollection",(function(){return u})),n.d(e,"mutateUpdateCollectionState",(function(){return p})),n.d(e,"fetchParentItemsQuery",(function(){return d}));var r=n(21),i=function(t,e){return r.default.request("\n    #graphql\n\n    query CollectionQuery($slug: String!) {\n        collection: collections(limit: 1, where: {\n            slug: {\n                _eq: $slug\n            }\n        }) {\n            id\n            tenant_id\n            name\n            slug\n            sanitised_content\n            excerpt\n            metadata\n            type\n            parent_item_ids\n            location: lonlat\n            bounding_box\n            state\n            user_id\n            static_map_urls\n            contribution_status\n            user {\n                name\n                id\n            }\n            image {\n                name\n                url\n                credit\n                description\n            }\n            collection_cta_block {\n                cta_block {\n                    title\n                    description\n                    url\n                    button_text\n                }\n            }\n            associated_overlay_group {\n                slug\n            }\n        }\n    }\n",{slug:t},e)},o="\n    #graphql\n\n    query CollectionSummaryQuery($ids: [bigint!]) {\n        collections: collections(where: {\n            id: {\n                _in: $ids\n            }\n        }) {\n            name, slug\n        }\n    }\n",a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.request(o,t,e)},s=function(t,e){return r.default.request("\n    #graphql\n\n    query RecordActionCollectionsQuery($user_id: bigint!, $without_record: jsonb) {\n        results: collections(where: {_and: {_or: [{user_id: {_eq: $user_id}}, {collection_projects: {project: {users:{user_id:{_eq:$user_id}}}}}], _not: {all_record_ids: {_contains: $without_record}}}}) {\n            name\n            id\n            slug\n        }\n        collections_aggregate(where: {_and: {_or: [{user_id: {_eq: $user_id}}, {collection_projects: {project: {users:{user_id:{_eq:$user_id}}}}}]}}) {\n            aggregate {\n                count(distinct: true)\n            }\n        }\n    }\n\n",t,e)},u=function(t,e){return r.default.request("\n    #graphql\n\n    mutation AddRecordToCollection($collection_id: bigint!, $record_id: bigint!) {\n        inserted: insert_humap_collections_collection_records(objects: {record_id: $record_id, collection_id: $collection_id}) {\n            affected_rows\n        }\n    }\n",t,e)},l=function(t){return r.default.request("\n    #graphql\n    query CollectionCardItemsQuery($slug: String!, $limit: Int!, $offset: Int!) {\n        results: collection_card_items(where: {collection_slug: {_eq: $slug}}, limit: $limit, offset: $offset) {\n            id\n            name\n            slug\n            type\n            image_url\n            excerpt\n            hero_attachment_type\n        }\n        total: collection_card_items_aggregate(where: {collection_slug: {_eq: $slug}}) {\n            aggregate {\n                count\n            }\n        }\n    }\n",t)},c=function(t){return r.default.request('\n    #graphql\n\n    query timelineItemQuery($slug: String!) {\n        parent: collections(limit: 1, where: {slug: {_eq: $slug}}) {\n            items(where: {state: {_eq: "published"}}) {\n                id\n                type\n                date_from\n                name\n                slug\n            }\n            first_date: items(limit: 1, order_by: {date_from: asc}, where: {state: {_eq: "published"}}) {\n                date_from\n            }\n            last_date: items(limit: 1, order_by: {date_from: desc}, where: {state: {_eq: "published"}}) {\n                date_from\n            }\n        }\n    }\n',t)},f=function(t,e){return r.default.request('\n    #graphql\n    query ParentContextItemQuery($slug: String!) {\n        collection: collections(limit: 1, where: {slug: {_eq: $slug}}) {\n            id\n            name\n            slug\n            type\n            metadata\n            associated_overlay_group {\n                slug\n            }\n            items(where: {state: {_eq: "published"}}) {\n                id\n                type\n            }\n        }\n        total: collection_card_items_aggregate(where: {collection_slug: {_eq: $slug}, state: {_eq: "published"}}) {\n            aggregate {\n                count\n            }\n        }\n    }\n',t,e)},h=function(t){return r.default.request('\n    #graphql\n    query ParentContextItemQuery($slug: String!, $limit: Int!, $offset: Int!) {\n        navigation_items: collection_card_items(where: {collection_slug: {_eq: $slug}, state: {_eq: "published"}}, limit: $limit, offset: $offset) {\n            id\n            name\n            slug\n            type\n        }\n    }\n',t)},p=function(t,e){return r.default.request("\n    #graphql\n\n    mutation updateCollectionState($id: bigint!, $state: String!) {\n        result: update_collection(id: $id, state: $state) {\n            id\n            state\n        }\n    }\n",t,e)},d=function(t,e){return r.default.request('\n    #graphql\n\n    query parentItemsQuery($parent_item_ids: [bigint!]) {\n        collection_parents: card_items(where: { id: { _in: $parent_item_ids }, type: { _in: ["collection", "trail", "timeline", "route"] } }) {\n            id\n            name\n            type\n            slug\n        }\n    }\n',t,e)}},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loader assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(6),i=n(92),o=n(10);let a="";class s extends i.a{get[Symbol.toStringTag](){return"Texture2D"}static isSupported(t,e){return i.a.isSupported(t,e)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i;Object(r.b)(t),(e instanceof Promise||"string"===typeof e)&&(e={data:e}),"string"===typeof e.data&&(e=Object.assign({},e,{data:(n=e.data,Object(o.a)("string"===typeof n),n=a+n,new Promise(((t,e)=>{try{const r=new Image;r.onload=()=>t(r),r.onerror=()=>e(new Error("Could not load image ".concat(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)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchUserQuery",(function(){return i})),n.d(e,"fetchUserViewQuery",(function(){return o})),n.d(e,"fetchUserProjectsQuery",(function(){return a})),n.d(e,"mutateQueryProjectUserInvitation",(function(){return s})),n.d(e,"fetchUserCardItemResultsQuery",(function(){return l})),n.d(e,"mutateQueryProjectUserRequestMembership",(function(){return u})),n.d(e,"fetchUserProfileQuery",(function(){return c}));var r=n(21),i=function(t,e){return r.default.request('\n    #graphql\n\n    query User($id: bigint!) {\n        user(id: $id) {\n            id\n            name\n        }\n        records_aggregate(where: {user_id: {_eq: $id}}) {\n            aggregate {\n                count\n            }\n        }\n        collections_aggregate(where: {user_id: {_eq: $id}, type: {_neq: "trail"}}) {\n            aggregate {\n                count\n            }\n        }\n        trails_aggregate: collections_aggregate(where: {user_id: {_eq: $id}, type: {_eq: "trail"}}) {\n            aggregate {\n                count\n            }\n        }\n        projects: humap_projects_project_users(where: {project: {name: {_neq: ""}}, user_id: {_eq: $id}, state: {_eq: "accepted"}}) {\n            id\n            state\n            project {\n                id\n                name\n                slug\n                requests: users(where:{state:{_eq: "requested"}}) {\n                    state\n                }\n                all_collection_ids\n                all_record_ids\n            }\n        }\n    }\n',t,e)},o=function(t,e){return r.default.request('\n    #graphql\n\n    query User($id: bigint!) {\n        user(id: $id) {\n            id\n            name\n            created_at\n        }\n        records_aggregate(where: {user_id: {_eq: $id}}) {\n            aggregate {\n                count\n            }\n        }\n        collections_aggregate(where: {user_id: {_eq: $id}, type: {_neq: "trail"}}) {\n            aggregate {\n                count\n            }\n        }\n        trails_aggregate: collections_aggregate(where: {user_id: {_eq: $id}, type: {_eq: "trail"}}) {\n            aggregate {\n                count\n            }\n        }\n    }\n',t,e)},a=function(t,e){return r.default.request('\n    #graphql\n\n    query UserProjects($user_id: bigint!) {\n        project_memberships: humap_projects_project_users(where: {project: {name: {_neq: ""}}, user: {id: {_eq: $user_id}}}) {\n            id\n            state\n            project {\n                id\n                name\n                slug\n                state\n                all_collection_ids\n                all_record_ids\n            }\n            user {\n                id\n            }\n        }\n    }\n',t,e)},s=function(t,e){return r.default.request("\n    #graphql\n\n    mutation UpdateProjectMembership($id: bigint!, $state: String!) {\n        update: update_project_users(id: $id, state: $state) {\n            id, state\n        }\n    }\n",t,e)},u=function(t,e){return r.default.request('\n    #graphql\n\n    mutation CreateProjectMembership($id: bigint!) {\n        update: create_project_user(project_id: $id, state: "requested") {\n            id\n            state\n            user {\n                id\n                name\n                email\n            }\n        }\n    }\n',t,e)},l=function(t,e){return r.default.request('\n    #graphql\n\n    query UserCardItemResults($id: Int!, $limit: Int, $offset: Int, $type: String) {\n        results: user_content(args: {user_id_value: $id}, limit: $limit, where: {type: {_eq: $type}}, order_by: {updated_at: desc}) {\n            id, name, excerpt, slug, location: lonlat, date_from, date_to, type, excerpt, image_url, state, updated_at\n        }\n        draft_results: user_content(args: {user_id_value: $id}, where: {state: {_neq: "published"}, type: {_eq: $type}}) {\n            id, name, excerpt, slug, location: lonlat, date_from, date_to, type, excerpt, image_url, state\n        }\n    }\n',t,e)},c=function(t,e){return r.default.request("\n    #graphql\n\n    query userProfile($id: bigint!) {\n        profile: user_tenant_profiles(limit: 1, where: {user_id: {_eq: $id}}) {\n            id\n            description: sanitised_content\n            plain_content\n            image {\n                name\n                url\n            }\n            site_link\n            facebook\n            twitter\n            instagram\n            location\n            user{\n                created_at\n            }\n        }\n    }\n",t,e)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f}));var r=n(29),i=n(152);function o(t){return o="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},o(t)}function a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(C){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=c;var h={};function p(){}function d(){}function m(){}var g={};l(g,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,i)&&(g=v);var b=m.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(i,a,s,u){var l=f(t[i],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=m,l(b,"constructor",m),l(m,"constructor",d),d.displayName=l(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(A.prototype),l(A.prototype,s,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function s(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))}}function l(t){return c.apply(this,arguments)}function c(){return(c=u(a().mark((function t(e){var n,o,s,u,l,c,f;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Object(r.i)(e)){t.next=2;break}return t.abrupt("return",e);case 2:return n={},(o=Object(i.a)(e))>=0&&(n["content-length"]=String(o)),s=Object(i.b)(e),u=s.url,(l=s.type)&&(n["content-type"]=l),t.next=9,m(e);case 9:return(c=t.sent)&&(n["x-first-bytes"]=c),"string"===typeof e&&(e=(new TextEncoder).encode(e)),f=new Response(e,{headers:n}),Object.defineProperty(f,"url",{value:u}),t.abrupt("return",f);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(t){return h.apply(this,arguments)}function h(){return(h=u(a().mark((function t(e){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=5;break}return t.next=3,p(e);case 3:throw n=t.sent,new Error(n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){return d.apply(this,arguments)}function d(){return(d=u(a().mark((function t(e){var n,r,i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,r=e.headers.get("Content-Type"),i=e.statusText,!r.includes("application/json")){t.next=11;break}return t.t0=i,t.t1=" ",t.next=9,e.text();case 9:t.t2=t.sent,i=t.t0+=t.t1.concat.call(t.t1,t.t2);case 11:n=(n+=i).length>60?"".concat(n.slice(0,60),"..."):n,t.next=17;break;case 15:t.prev=15,t.t3=t.catch(1);case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})))).apply(this,arguments)}function m(t){return g.apply(this,arguments)}function g(){return(g=u(a().mark((function t(e){var n,r,i,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=5,"string"!==typeof e){t.next=3;break}return t.abrupt("return","data:,".concat(e.slice(0,n)));case 3:if(!(e instanceof Blob)){t.next=8;break}return r=e.slice(0,5),t.next=7,new Promise((function(t){var e=new FileReader;e.onload=function(e){var n;return t(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.result)},e.readAsDataURL(r)}));case 7:return t.abrupt("return",t.sent);case 8:if(!(e instanceof ArrayBuffer)){t.next=12;break}return i=e.slice(0,n),o=y(i),t.abrupt("return","data:base64,".concat(o));case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function y(t){for(var e="",n=new Uint8Array(t),r=0;r<n.byteLength;r++)e+=String.fromCharCode(n[r]);return btoa(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(59);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}},a=n(6),s=n(10);class u extends r.a{get[Symbol.toStringTag](){return"Renderbuffer"}static isSupported(t){let{format:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{format:null};return!e||function(t,e,n){const r=n[e];if(!r)return!1;const i=Object(a.j)(t)&&r.gl2||r.gl1;return"string"===typeof i?t.getExtension(i):i}(t,e,o)}static getSamplesForFormat(t,e){let{format:n}=e;return t.getInternalformatParameter(36161,n,32937)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.initialize(e),Object.seal(this)}initialize(t){let{format:e,width:n=1,height:r=1,samples:i=0}=t;return Object(s.a)(e,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==i&&Object(a.j)(this.gl)?this.gl.renderbufferStorageMultisample(36161,i,e,n,r):this.gl.renderbufferStorage(36161,e,n,r),this.format=e,this.width=n,this.height=r,this.samples=i,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*o[this.format].bpp),this}resize(t){let{width:e,height:n}=t;return e!==this.width||n!==this.height?this.initialize({width:e,height:n,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)}}},function(t,e,n){t.exports={MediaTypeIcon:"MediaTypeIcon-module__MediaTypeIcon___3EJOf",videoIcon:"MediaTypeIcon-module__videoIcon___3xZ_1",streetViewIcon:"MediaTypeIcon-module__streetViewIcon___m-wBi",iiifIcon:"MediaTypeIcon-module__iiifIcon___32XUa"}},function(t,e,n){"use strict";n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return p}));var r=n(6);function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unnamed";const n=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/,r=t.match(n);return r?r[1]:e}function o(t,e,n,r){const o=t.split(/\r?\n/),u={},l={},c=r||i(e)||"(unnamed)",f="".concat(function(t){switch(t){case 35632:return"fragment";case 35633:return"vertex";default:return"unknown type"}}(n)," shader ").concat(c);for(let i=0;i<o.length;i++){const e=o[i];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 ".concat(f,": ").concat(t));"WARNING"!==r?u[a]=e:l[a]=e}const h=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ";const r=t.split(/\r?\n/),i=String(r.length+e-1).length;return r.map(((t,r)=>{const o=String(r+e),a=o.length;return s(o,i-a)+n+t}))}(e);return{shaderName:f,errors:a(u,h),warnings:a(l,h)}}function a(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+="".concat(i,"\n"),t[r+1])){const e=t[r+1],i=e.split(":",3),o=i[0],a=parseInt(i[1],10)||0,u=e.substring(i.join(":").length+1).trim();n+=s("^^^ ".concat(o,": ").concat(u,"\n\n"),a)}}return n}function s(t,e){let n="";for(let r=0;r<e;++r)n+=" ";return"".concat(n).concat(t)}var u=n(10),l=n(73),c=n(59);class f extends c.a{get[Symbol.toStringTag](){return"Shader"}static getTypeName(t){switch(t){case 35633:return"vertex-shader";case 35632:return"fragment-shader";default:return Object(u.a)(!1),"unknown"}}constructor(t,e){Object(r.b)(t),Object(u.a)("string"===typeof e.source,"Shader: GLSL source code must be a JavaScript string");super(t,{id:i(e.source,null)||e.id||Object(l.c)("unnamed ".concat(f.getTypeName(e.shaderType)))}),this.shaderType=e.shaderType,this.source=e.source,this.initialize(e)}initialize(t){let{source:e}=t;const n=i(e,null);n&&(this.id=Object(l.c)(n)),this._compile(e)}getParameter(t){return this.gl.getShaderParameter(this.handle,t)}toString(){return"".concat(f.getTypeName(this.shaderType),":").concat(this.id)}getName(){return i(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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.source;t.startsWith("#version ")||(t="#version 100\n".concat(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:i}=o(t,this.source,this.shaderType,this.id);throw r.k.error("GLSL compilation errors in ".concat(e,"\n").concat(n))(),r.k.warn("GLSL compilation warnings in ".concat(e,"\n").concat(i))(),new Error("GLSL compilation errors in ".concat(e))}}_deleteHandle(){this.gl.deleteShader(this.handle)}_getOptsFromHandle(){return{type:this.getParameter(35663),source:this.getSource()}}}class h extends f{get[Symbol.toStringTag](){return"VertexShader"}constructor(t,e){"string"===typeof e&&(e={source:e}),super(t,Object.assign({},e,{shaderType:35633}))}_createHandle(){return this.gl.createShader(35633)}}class p extends f{get[Symbol.toStringTag](){return"FragmentShader"}constructor(t,e){"string"===typeof e&&(e={source:e}),super(t,Object.assign({},e,{shaderType:35632}))}_createHandle(){return this.gl.createShader(35632)}}},function(t,e,n){"use strict";var r=n(226),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var s=u(e),m=u(n),g=0;g<a.length;++g){var y=a[g];if(!o[y]&&(!r||!r[y])&&(!m||!m[y])&&(!s||!s[y])){var v=h(n,y);try{l(e,y,v)}catch(b){}}}}return e}},function(t,e,n){"use strict";n.r(e);function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!o(t[0])||!o(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function o(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function a(t,e,n){if(null!==t)for(var r,i,o,s,u,l,c,f,h=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,y=m?t.features.length:1,v=0;v<y;v++){u=(f=!!(c=m?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<u;b++){var _=0,A=0;if(null!==(s=f?c.geometries[b]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,v,_,A))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,v,_,A))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===e(l[r][i],p,v,_,A))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&A++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(A=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===e(l[r][i][o],p,v,_,A))return!1;p++}A++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===a(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}e.default=function(t,e){void 0===e&&(e={});var n=0,r=0,o=0;return a(t,(function(t){n+=t[0],r+=t[1],o++}),!0),i([n/o,r/o],e.properties)}},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.r(e),n.d(e,"getCoord",(function(){return i})),n.d(e,"getCoords",(function(){return o})),n.d(e,"containsNumber",(function(){return a})),n.d(e,"geojsonType",(function(){return s})),n.d(e,"featureOf",(function(){return u})),n.d(e,"collectionOf",(function(){return l})),n.d(e,"getGeom",(function(){return c})),n.d(e,"getType",(function(){return f}));var r=n(34);function i(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")}function o(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function a(t){if(t.length>1&&Object(r.isNumber)(t[0])&&Object(r.isNumber)(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return a(t[0]);throw new Error("coordinates must only contain numbers")}function s(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}function u(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function l(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=t.features;r<i.length;r++){var o=i[r];if(!o||"Feature"!==o.type||!o.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!o.geometry||o.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+o.geometry.type)}}function c(t){return"Feature"===t.type?t.geometry:t}function f(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}},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}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";const r=n(1424),i=n(1425),o=n(1426),a=n(1427);function s(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function l(t,e){return e.decode?i(t):t}function c(t){return Array.isArray(t)?t.sort():"object"===typeof t?c(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function f(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function h(t){const e=(t=f(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function p(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function d(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const i="string"===typeof n&&n.includes(t.arrayFormatSeparator),o="string"===typeof n&&!i&&l(n,t).includes(t.arrayFormatSeparator);n=o?l(n,t):n;const a=i||o?n.split(t.arrayFormatSeparator).map((e=>l(e,t))):null===n?n:l(n,t);r[e]=a};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),r=Object.create(null);if("string"!==typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const i of t.split("&")){if(""===i)continue;let[t,a]=o(e.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator"].includes(e.arrayFormat)?a:l(a,e),n(l(t,e),a,r)}for(const i of Object.keys(r)){const t=r[i];if("object"===typeof t&&null!==t)for(const n of Object.keys(t))t[n]=p(t[n],e);else r[i]=p(t,e)}return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce(((t,e)=>{const n=r[e];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?t[e]=c(n):t[e]=n,t}),Object.create(null))}e.extract=h,e.parse=d,e.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>{return e.skipNull&&(null===(r=t[n])||void 0===r)||e.skipEmptyString&&""===t[n];var r},r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const i=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[",i,"]"].join("")]:[...n,[u(e,t),"[",u(i,t),"]=",u(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[]"].join("")]:[...n,[u(e,t),"[]=",u(r,t)].join("")];case"comma":case"separator":return e=>(n,r)=>null===r||void 0===r||0===r.length?n:0===n.length?[[u(e,t),"=",u(r,t)].join("")]:[[n,u(r,t)].join(t.arrayFormatSeparator)];default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,u(e,t)]:[...n,[u(e,t),"=",u(r,t)].join("")]}}(e),i={};for(const a of Object.keys(t))n(a)||(i[a]=t[a]);const o=Object.keys(i);return!1!==e.sort&&o.sort(e.sort),o.map((n=>{const i=t[n];return void 0===i?"":null===i?u(n,e):Array.isArray(i)?i.reduce(r(n),[]).join("&"):u(n,e)+"="+u(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,r]=o(t,"#");return Object.assign({url:n.split("?")[0]||"",query:d(h(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=f(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),a=Object.assign(o,t.query);let s=e.stringify(a,n);s&&(s=`?${s}`);let l=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(l=`#${u(t.fragmentIdentifier,n)}`),`${r}${s}${l}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:i,query:o,fragmentIdentifier:s}=e.parseUrl(t,r);return e.stringifyUrl({url:i,query:a(o,n),fragmentIdentifier:s},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return e.pick(t,i,r)}},function(t,e,n){var r;!function(i,o,a,s){"use strict";var u,l=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),f=Math.round,h=Math.abs,p=Date.now;function d(t,e,n){return setTimeout(A(t,n),e)}function m(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==s)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 y(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===s||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!==s&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var v=y((function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&t[r[i]]===s)&&(t[r[i]]=e[r[i]]),i++;return t}),"extend","Use `assign`."),b=y((function(t,e){return v(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 A(t,e){return function(){return t.apply(e,arguments)}}function w(t,e){return"function"==typeof t?t.apply(e&&e[0]||s,e):t}function x(t,e){return t===s?e:t}function E(t,e,n){g(C(e),(function(e){t.addEventListener(e,n,!1)}))}function O(t,e,n){g(C(e),(function(e){t.removeEventListener(e,n,!1)}))}function S(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function P(t,e){return t.indexOf(e)>-1}function C(t){return t.trim().split(/\s+/g)}function T(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 k(t){return Array.prototype.slice.call(t,0)}function I(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];T(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}function L(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<l.length;){if((r=(n=l[o])?n+i:e)in t)return r;o++}return s}var j=1;function M(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var R="ontouchstart"in i,N=L(i,"PointerEvent")!==s,D=R&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F="touch",B="mouse",z=24,U=["x","y"],G=["clientX","clientY"];function V(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){w(t.options.enable,[t])&&n.handler(e)},this.init()}function q(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=1&e&&r-i===0,a=12&e&&r-i===0;n.isFirst=!!o,n.isFinal=!!a,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,a=n.firstMultiple,u=a?a.center:o.center,l=e.center=W(r);e.timeStamp=p(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=K(u,l),e.distance=Z(u,l),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=Y(e.deltaX,e.deltaY);var c=X(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=h(c.x)>h(c.y)?c.x:c.y,e.scale=a?(f=a.pointers,d=r,Z(d[0],d[1],G)/Z(f[0],f[1],G)):1,e.rotation=a?function(t,e){return K(e[1],e[0],G)+K(t[1],t[0],G)}(a.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,a=t.lastInterval||e,u=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(u>25||a.velocity===s)){var l=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,f=X(u,l,c);r=f.x,i=f.y,n=h(f.x)>h(f.y)?f.x:f.y,o=Y(l,c),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var f,d;var m=t.element;S(e.srcEvent.target,m)&&(m=e.srcEvent.target);e.target=m}(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:f(t.pointers[n].clientX),clientY:f(t.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:e,center:W(e),deltaX:t.deltaX,deltaY:t.deltaY}}function W(t){var e=t.length;if(1===e)return{x:f(t[0].clientX),y:f(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:f(n/e),y:f(r/e)}}function X(t,e,n){return{x:e/t||0,y:n/t||0}}function Y(t,e){return t===e?1:h(t)>=h(e)?t<0?2:4:e<0?8:16}function Z(t,e,n){n||(n=U);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function K(t,e,n){n||(n=U);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}V.prototype={handler:function(){},init:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(M(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&O(this.element,this.evEl,this.domHandler),this.evTarget&&O(this.target,this.evTarget,this.domHandler),this.evWin&&O(M(this.element),this.evWin,this.domHandler)}};var $={mousedown:1,mousemove:2,mouseup:4},J="mousedown",Q="mousemove mouseup";function tt(){this.evEl=J,this.evWin=Q,this.pressed=!1,V.apply(this,arguments)}_(tt,V,{handler:function(t){var e=$[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,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(rt="MSPointerDown",it="MSPointerMove MSPointerUp MSPointerCancel"),_(ot,V,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=et[r],o=nt[t.pointerType]||t.pointerType,a=o==F,s=T(e,t.pointerId,"pointerId");1&i&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&i&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var at={touchstart:1,touchmove:2,touchend:4,touchcancel:8},st="touchstart",ut="touchstart touchmove touchend touchcancel";function lt(){this.evTarget=st,this.evWin=ut,this.started=!1,V.apply(this,arguments)}function ct(t,e){var n=k(t.touches),r=k(t.changedTouches);return 12&e&&(n=I(n.concat(r),"identifier",!0)),[n,r]}_(lt,V,{handler:function(t){var e=at[t.type];if(1===e&&(this.started=!0),this.started){var n=ct.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 ft={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ht="touchstart touchmove touchend touchcancel";function pt(){this.evTarget=ht,this.targetIds={},V.apply(this,arguments)}function dt(t,e){var n=k(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=k(t.changedTouches),s=[],u=this.target;if(o=n.filter((function(t){return S(t.target,u)})),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&e&&delete r[a[i].identifier],i++;return s.length?[I(o.concat(s),"identifier",!0),s]:void 0}_(pt,V,{handler:function(t){var e=ft[t.type],n=dt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}});function mt(){V.apply(this,arguments);var t=A(this.handler,this);this.touch=new pt(this.manager,t),this.mouse=new tt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function gt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,yt.call(this,e)):12&t&&yt.call(this,e)}function yt(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 vt(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),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}_(mt,V,{handler:function(t,e,n){var r=n.pointerType==F,i=n.pointerType==B;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)gt.call(this,e,n);else if(i&&vt.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var bt=L(c.style,"touchAction"),_t=bt!==s,At="compute",wt="auto",xt="manipulation",Et="none",Ot="pan-x",St="pan-y",Pt=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 Ct(t,e){this.manager=t,this.set(e)}Ct.prototype={set:function(t){t==At&&(t=this.compute()),_t&&this.manager.element.style&&Pt[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 g(this.manager.recognizers,(function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(P(t,Et))return Et;var e=P(t,Ot),n=P(t,St);if(e&&n)return Et;if(e||n)return e?Ot:St;if(P(t,xt))return xt;return wt}(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=P(r,Et)&&!Pt.none,o=P(r,St)&&!Pt["pan-y"],a=P(r,Ot)&&!Pt["pan-x"];if(i){var s=1===t.pointers.length,u=t.distance<2,l=t.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&6&n||a&&n&z?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Tt=32;function kt(t){this.options=u({},this.defaults,t||{}),this.id=j++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function It(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Lt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function jt(t,e){var n=e.manager;return n?n.get(t):t}function Mt(){kt.apply(this,arguments)}function Rt(){Mt.apply(this,arguments),this.pX=null,this.pY=null}function Nt(){Mt.apply(this,arguments)}function Dt(){kt.apply(this,arguments),this._timer=null,this._input=null}function Ft(){Mt.apply(this,arguments)}function Bt(){Mt.apply(this,arguments)}function zt(){kt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ut(t,e){return(e=e||{}).recognizers=x(e.recognizers,Ut.defaults.preset),new Gt(t,e)}kt.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(m(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=jt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return m(t,"dropRecognizeWith",this)||(t=jt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(m(t,"requireFailure",this))return this;var e=this.requireFail;return-1===T(e,t=jt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(m(t,"dropRequireFailure",this))return this;t=jt(t,this);var e=T(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+It(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+It(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Tt},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(!w(this.options.enable,[this,e]))return this.reset(),void(this.state=Tt);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},_(Mt,kt,{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:Tt}}),_(Rt,Mt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(St),t&z&&e.push(Ot),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=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===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return Mt.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=Lt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(Nt,Mt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Et]},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)}}),_(Dt,kt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[wt]},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=d((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return Tt},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=p(),this.manager.emit(this.options.event,this._input)))}}),_(Ft,Mt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Bt,Mt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Rt.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&z&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&h(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Lt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(zt,kt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},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.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,a=!this.pCenter||Z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=d((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return Tt},failTimeout:function(){return this._timer=d((function(){this.state=Tt}),this.options.interval,this),Tt},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ut.VERSION="2.0.7",Ut.defaults={domEvents:!1,touchAction:At,enable:!0,inputTarget:null,inputClass:null,preset:[[Ft,{enable:!1}],[Nt,{enable:!1},["rotate"]],[Bt,{direction:6}],[Rt,{direction:6},["swipe"]],[zt],[zt,{event:"doubletap",taps:2},["tap"]],[Dt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Gt(t,e){var n;this.options=u({},Ut.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||(N?ot:D?pt:R?mt:tt))(n,q),this.touchAction=new Ct(this,this.options.touchAction),Vt(this,!0),g(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 Vt(t,e){var n,r=t.element;r.style&&(g(t.options.cssProps,(function(i,o){n=L(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}Gt.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 kt)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(m(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(m(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=T(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==s&&e!==s){var n=this.handlers;return g(C(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==s){var n=this.handlers;return g(C(t),(function(t){e?n[t]&&n[t].splice(T(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&&Vt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Ut,{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:Tt,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:z,DIRECTION_ALL:30,Manager:Gt,Input:V,TouchAction:Ct,TouchInput:pt,MouseInput:tt,PointerEventInput:ot,TouchMouseInput:mt,SingleTouchInput:lt,Recognizer:kt,AttrRecognizer:Mt,Tap:zt,Pan:Rt,Swipe:Bt,Pinch:Nt,Rotate:Ft,Press:Dt,on:E,off:O,each:g,merge:b,extend:v,assign:u,inherit:_,bindFn:A,prefixed:L}),("undefined"!==typeof i?i:"undefined"!==typeof self?self:{}).Hammer=Ut,(r=function(){return Ut}.call(e,n,e,t))===s||(t.exports=r)}(window,document)},function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var r=n(361);var i=n(832),o=n(833),a=n(834);function s(t){var e="function"===typeof Map?new Map:void 0;return s=function(t){if(null===t||!o(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return a(t,arguments,i(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),r(n,t)},s(t)}var u=function(t){var e,n;function i(e){return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+e+" for more information.")||this)}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n),i}(s(Error));function l(t){return Math.round(255*t)}function c(t,e,n){return l(t)+","+l(e)+","+l(n)}function f(t,e,n,r){if(void 0===r&&(r=c),0===e)return r(n,n,n);var i=(t%360+360)%360/60,o=(1-Math.abs(2*n-1))*e,a=o*(1-Math.abs(i%2-1)),s=0,u=0,l=0;i>=0&&i<1?(s=o,u=a):i>=1&&i<2?(s=a,u=o):i>=2&&i<3?(u=o,l=a):i>=3&&i<4?(u=a,l=o):i>=4&&i<5?(s=a,l=o):i>=5&&i<6&&(s=o,l=a);var f=n-o/2;return r(s+f,u+f,l+f)}var h={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var p=/^#[a-fA-F0-9]{6}$/,d=/^#[a-fA-F0-9]{8}$/,m=/^#[a-fA-F0-9]{3}$/,g=/^#[a-fA-F0-9]{4}$/,y=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,v=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,b=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,_=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function A(t){if("string"!==typeof t)throw new u(3);var e=function(t){if("string"!==typeof t)return t;var e=t.toLowerCase();return h[e]?"#"+h[e]:t}(t);if(e.match(p))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(d)){var n=parseFloat((parseInt(""+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16),alpha:n}}if(e.match(m))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};if(e.match(g)){var r=parseFloat((parseInt(""+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16),alpha:r}}var i=y.exec(e);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=v.exec(e);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var a=b.exec(e);if(a){var s="rgb("+f(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",l=y.exec(s);if(!l)throw new u(4,e,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=_.exec(e);if(c){var A="rgb("+f(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",w=y.exec(A);if(!w)throw new u(4,e,A);return{red:parseInt(""+w[1],10),green:parseInt(""+w[2],10),blue:parseInt(""+w[3],10),alpha:parseFloat(""+c[4])}}throw new u(5)}var w=function(t){return 7===t.length&&t[1]===t[2]&&t[3]===t[4]&&t[5]===t[6]?"#"+t[1]+t[3]+t[5]:t};function x(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function E(t,e,n){if("number"===typeof t&&"number"===typeof e&&"number"===typeof n)return w("#"+x(t)+x(e)+x(n));if("object"===typeof t&&void 0===e&&void 0===n)return w("#"+x(t.red)+x(t.green)+x(t.blue));throw new u(6)}function O(t,e,n,r){if("string"===typeof t&&"number"===typeof e){var i=A(t);return"rgba("+i.red+","+i.green+","+i.blue+","+e+")"}if("number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof r)return r>=1?E(t,e,n):"rgba("+t+","+e+","+n+","+r+")";if("object"===typeof t&&void 0===e&&void 0===n&&void 0===r)return t.alpha>=1?E(t.red,t.green,t.blue):"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")";throw new u(7)}},function(t,e,n){t.exports={MapTools:"MapTools-module__MapTools___128jE",isHidden:"MapTools-module__isHidden___6Vrde",label:"MapTools-module__label___lfKUK",hideUnrelatedPins:"MapTools-module__hideUnrelatedPins___1kLrR",toggleOverlayTools:"MapTools-module__toggleOverlayTools___mYqho",icon:"MapTools-module__icon___2ejxv",pinsHidden:"MapTools-module__pinsHidden___196zp",zoomControl:"MapTools-module__zoomControl___2uSBA",geolocateControl:"MapTools-module__geolocateControl___3wYPO"}},function(t,e,n){t.exports={MediaGalleryImage:"MediaGalleryImage-module__MediaGalleryImage___1hBh9",sidebar:"MediaGalleryImage-module__sidebar___2_ADo",pane:"MediaGalleryImage-module__pane___2zaYj",caption:"MediaGalleryImage-module__caption___2XXNd",transcription:"MediaGalleryImage-module__transcription___vKL5U",attribution:"MediaGalleryImage-module__attribution___3LvPt",item:"MediaGalleryImage-module__item___4rSYw"}},function(t,e,n){t.exports={MediaGalleryVideoEmbed:"MediaGalleryVideoEmbed-module__MediaGalleryVideoEmbed___1316U",sidebar:"MediaGalleryVideoEmbed-module__sidebar___2NGMg",pane:"MediaGalleryVideoEmbed-module__pane___gehHC",caption:"MediaGalleryVideoEmbed-module__caption___1jTMg",transcription:"MediaGalleryVideoEmbed-module__transcription___2YRzQ",attribution:"MediaGalleryVideoEmbed-module__attribution___32vKw",item:"MediaGalleryVideoEmbed-module__item___39hB5"}},function(t,e,n){t.exports={MediaGalleryAudioEmbed:"MediaGalleryAudioEmbed-module__MediaGalleryAudioEmbed___3SB0G",sidebar:"MediaGalleryAudioEmbed-module__sidebar___N68LH",pane:"MediaGalleryAudioEmbed-module__pane___o7CDK",caption:"MediaGalleryAudioEmbed-module__caption___2JJ-W",transcription:"MediaGalleryAudioEmbed-module__transcription___3HtE5",attribution:"MediaGalleryAudioEmbed-module__attribution___1gSGZ",item:"MediaGalleryAudioEmbed-module__item___2zqZ3"}},function(t,e,n){(function(e){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof e&&e&&e.Object===Object&&e,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,h=Math.min,p=function(){return l.Date.now()};function d(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==c.call(t)}(t))return NaN;if(d(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=d(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var s=i.test(t);return s||o.test(t)?a(t.slice(2),s?2:8):r.test(t)?NaN:+t}t.exports=function(t,e,n){var r,i,o,a,s,u,l=0,c=!1,g=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function b(t){return l=t,s=setTimeout(A,e),c?v(t):a}function _(t){var n=t-u;return void 0===u||n>=e||n<0||g&&t-l>=o}function A(){var t=p();if(_(t))return w(t);s=setTimeout(A,function(t){var n=e-(t-u);return g?h(n,o-(t-l)):n}(t))}function w(t){return s=void 0,y&&r?v(t):(r=i=void 0,a)}function x(){var t=p(),n=_(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return b(u);if(g)return s=setTimeout(A,e),v(u)}return void 0===s&&(s=setTimeout(A,e)),a}return e=m(e)||0,d(n)&&(c=!!n.leading,o=(g="maxWait"in n)?f(m(n.maxWait)||0,e):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},x.flush=function(){return void 0===s?a:w(p())},x}}).call(this,n(36))},function(t,e,n){"use strict";function r(t){return t.keys().map((e=>function(t,e){const n=function(t){const e=(t.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(e)return e.replace(/_/g,"-").replace(/\//g,"--")}(e);if(n)return function(t,e){const n=t.default;if("function"==typeof n)return{identifier:e,controllerConstructor:n}}(t(e),n)}(t,e))).filter((t=>t))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(17),s=n(1026),u=n.n(s),l=function(t){var e=Object(a.useStore)(),n=e.parentContext.parent,r=e.internalHistory,s=e.getLastItemFromInternalHistory,l=Object(o.g)();return i.a.createElement("div",{className:u.a.CloseButton,onClick:function(){r.length>1?l(s()):n?(l(n.path),s()):l("/map/browse"),t.callback()}},i.a.createElement("a",null,i.a.createElement("span",null,t.children)))};l.defaultProps={callback:function(){}},e.default=l},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(682),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:a.a.LocationBar},t.title&&i.a.createElement("span",{className:a.a.title},t.title),t.children)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(417),s=n.n(a);function u(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(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 l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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}e.default=Object(o.a)((function(t){var e=t.children,n=u(Object(r.useState)(!1),2),o=n[0],a=n[1],l=u(Object(r.useState)(!1),2),c=l[0],f=l[1],h=u(Object(r.useState)(!1),2),p=h[0],d=h[1],m=Object(r.useRef)(null),g=Object(r.useRef)(null);return Object(r.useEffect)((function(){var t=m.current,e=g.current,n=function(){d(t&&e&&e.offsetHeight>t.offsetHeight)},r=function(){var e=0===t.scrollTop,n=t.scrollHeight-t.scrollTop===t.clientHeight;a(e),f(n)};n(),r();var i=new ResizeObserver((function(){n(),r()}));return g.current&&i.observe(g.current),t.addEventListener("scroll",r),function(){i.disconnect(),t.removeEventListener("scroll",r)}}),[]),i.a.createElement("div",{className:"".concat(s.a.Sidebar," ").concat(p?s.a.needsScroll:""," ").concat(o?s.a.atTop:""," ").concat(c?s.a.atBottom:""),ref:m},i.a.createElement("div",{className:s.a.wrap,ref:g},e))}))},function(t,e,n){"use strict";function r(t){var e=i(document.head,'meta[name="'.concat(t,'"]'));if(e)return e.getAttribute("content")}function i(t,e){return"string"==typeof t&&(e=t,t=document),t.querySelector(e)}function o(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function a(t,e){return e.parentNode.insertBefore(t,e.nextSibling)}n.r(e),n.d(e,"getMetaValue",(function(){return r})),n.d(e,"findElement",(function(){return i})),n.d(e,"removeElement",(function(){return o})),n.d(e,"insertAfter",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var r=n(1),i=n(357),o=n(491),a=n(531),s=n(492),u=n(15),l=n(608),c=n(315),f=n(366),h=n(130),p=n(105),d=n(637),m=n(53);class g extends d.a{constructor(t){const{fp64:e,IndexType:n=Uint32Array}=t;super({...t,attributes:{positions:{size:3,type:e?Float64Array:Float32Array},vertexValid:{type:Uint8ClampedArray,size:1},indices:{type:n,size:1}}})}get(t){const{attributes:e}=this;return"indices"===t?e.indices&&e.indices.subarray(0,this.vertexCount):e[t]}updateGeometry(t){super.updateGeometry(t);const e=this.buffers.indices;if(e)this.vertexCount=(e.value||e).length;else if(this.data&&!this.getGeometry)throw new Error("missing indices buffer")}normalizeGeometry(t){if(this.normalize){const e=p.d(t,this.positionSize);return this.opts.resolution?Object(m.cutPolygonByGrid)(p.b(e),p.a(e),{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0}):this.opts.wrapLongitude?Object(m.cutPolygonByMercatorBounds)(p.b(e),p.a(e),{size:this.positionSize,maxLatitude:86,edgeTypes:!0}):e}return t}getGeometrySize(t){if(y(t)){let e=0;for(const n of t)e+=this.getGeometrySize(n);return e}return p.b(t).length/this.positionSize}getGeometryFromBuffer(t){return this.normalize||!this.buffers.indices?super.getGeometryFromBuffer(t):null}updateGeometryAttributes(t,e){if(t&&y(t))for(const n of t){const t=this.getGeometrySize(n);e.geometrySize=t,this.updateGeometryAttributes(n,e),e.vertexStart+=t,e.indexStart=this.indexStarts[e.geometryIndex+1]}else this._updateIndices(t,e),this._updatePositions(t,e),this._updateVertexValid(t,e)}_updateIndices(t,{geometryIndex:e,vertexStart:n,indexStart:r}){const{attributes:i,indexStarts:o,typedArrayManager:a}=this;let s=i.indices;if(!s||!t)return;let u=r;const l=p.c(t,this.positionSize,this.opts.preproject);s=a.allocate(s,r+l.length,{copy:!0});for(let c=0;c<l.length;c++)s[u++]=l[c]+n;o[e+1]=r+l.length,i.indices=s}_updatePositions(t,{vertexStart:e,geometrySize:n}){const{attributes:{positions:r},positionSize:i}=this;if(!r||!t)return;const o=p.b(t);for(let a=e,s=0;s<n;a++,s++){const t=o[s*i],e=o[s*i+1],n=i>2?o[s*i+2]:0;r[3*a]=t,r[3*a+1]=e,r[3*a+2]=n}}_updateVertexValid(t,{vertexStart:e,geometrySize:n}){const{positionSize:r}=this,i=this.attributes.vertexValid,o=t&&p.a(t);if(t&&t.edgeTypes?i.set(t.edgeTypes,e):i.fill(1,e,e+n),o)for(let a=0;a<o.length;a++)i[e+o[a]/r-1]=0;i[e+n-1]=0}}function y(t){return Array.isArray(t)&&t.length>0&&!Number.isFinite(t[0])}var v="\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nstruct PolygonProps {\n  vec4 fillColors;\n  vec4 lineColors;\n  vec3 positions;\n  vec3 nextPositions;\n  vec3 pickingColors;\n  vec3 positions64Low;\n  vec3 nextPositions64Low;\n  float elevations;\n};\n\nvec3 project_offset_normal(vec3 vector) {\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n    project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n    // normals generated by the polygon tesselator are in lnglat offsets instead of meters\n    return normalize(vector * project_uCommonUnitsPerWorldUnit);\n  }\n  return project_normal(vector);\n}\n\nvoid calculatePosition(PolygonProps props) {\n#ifdef IS_SIDE_VERTEX\n  if(vertexValid < 0.5){\n    gl_Position = vec4(0.);\n    return;\n  }\n#endif\n\n  vec3 pos;\n  vec3 pos64Low;\n  vec3 normal;\n  vec4 colors = isWireframe ? props.lineColors : props.fillColors;\n\n  geometry.worldPosition = props.positions;\n  geometry.worldPositionAlt = props.nextPositions;\n  geometry.pickingColor = props.pickingColors;\n\n#ifdef IS_SIDE_VERTEX\n  pos = mix(props.positions, props.nextPositions, vertexPositions.x);\n  pos64Low = mix(props.positions64Low, props.nextPositions64Low, vertexPositions.x);\n#else\n  pos = props.positions;\n  pos64Low = props.positions64Low;\n#endif\n\n  if (extruded) {\n    pos.z += props.elevations * vertexPositions.y * elevationScale;\n  }\n  gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);\n\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  if (extruded) {\n  #ifdef IS_SIDE_VERTEX\n    normal = vec3(\n      props.positions.y - props.nextPositions.y + (props.positions64Low.y - props.nextPositions64Low.y),\n      props.nextPositions.x - props.positions.x + (props.nextPositions64Low.x - props.positions64Low.x),\n      0.0);\n    normal = project_offset_normal(normal);\n  #else\n    normal = project_normal(vec3(0.0, 0.0, 1.0));\n  #endif\n    geometry.normal = normal;\n    vec3 lightColor = lighting_getLightColor(colors.rgb, project_uCameraPosition, geometry.position.xyz, normal);\n    vColor = vec4(lightColor, colors.a * opacity);\n  } else {\n    vColor = vec4(colors.rgb, colors.a * opacity);\n  }\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",b="#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float elevations;\nattribute vec4 fillColors;\nattribute vec4 lineColors;\nattribute vec3 pickingColors;\n\n".concat(v,"\n\nvoid main(void) {\n  PolygonProps props;\n\n  props.positions = positions;\n  props.positions64Low = positions64Low;\n  props.elevations = elevations;\n  props.fillColors = fillColors;\n  props.lineColors = lineColors;\n  props.pickingColors = pickingColors;\n\n  calculatePosition(props);\n}\n"),_="#define SHADER_NAME solid-polygon-layer-vertex-shader-side\n#define IS_SIDE_VERTEX\n\n\nattribute vec3 instancePositions;\nattribute vec3 nextPositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 nextPositions64Low;\nattribute float instanceElevations;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\n".concat(v,"\n\nvoid main(void) {\n  PolygonProps props;\n\n  #if RING_WINDING_ORDER_CW == 1\n    props.positions = instancePositions;\n    props.positions64Low = instancePositions64Low;\n    props.nextPositions = nextPositions;\n    props.nextPositions64Low = nextPositions64Low;\n  #else\n    props.positions = nextPositions;\n    props.positions64Low = nextPositions64Low;\n    props.nextPositions = instancePositions;\n    props.nextPositions64Low = instancePositions64Low;\n  #endif\n  props.elevations = instanceElevations;\n  props.fillColors = instanceFillColors;\n  props.lineColors = instanceLineColors;\n  props.pickingColors = instancePickingColors;\n\n  calculatePosition(props);\n}\n");const A=[0,0,0,255],w={filled:!0,extruded:!1,wireframe:!1,_normalize:!0,_windingOrder:"CW",elevationScale:{type:"number",min:0,value:1},getPolygon:{type:"accessor",value:t=>t.polygon},getElevation:{type:"accessor",value:1e3},getFillColor:{type:"accessor",value:A},getLineColor:{type:"accessor",value:A},material:!0},x={enter:(t,e)=>e.length?e.subarray(e.length-t.length):t};class E extends i.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(t){return super.getShaders({vs:"top"===t?b:_,fs:"#define SHADER_NAME solid-polygon-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",defines:{RING_WINDING_ORDER_CW:this.props._normalize||"CCW"!==this.props._windingOrder?1:0},modules:[o.a,a.a,s.a]})}get wrapLongitude(){return!1}initializeState(){const{gl:t,viewport:e}=this.context;let{coordinateSystem:n}=this.props;e.isGeospatial&&n===u.a.DEFAULT&&(n=u.a.LNGLAT),this.setState({numInstances:0,polygonTesselator:new g({preproject:n===u.a.LNGLAT&&e.projectFlat.bind(e),fp64:this.use64bitPositions(),IndexType:!t||Object(l.c)(t,c.a.ELEMENT_INDEX_UINT32)?Uint32Array:Uint16Array})});const r=this.getAttributeManager(),i=!0;r.remove(["instancePickingColors"]),r.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:i},positions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:x,accessor:"getPolygon",update:this.calculatePositions,noAlloc:i,shaderAttributes:{positions:{vertexOffset:0,divisor:0},instancePositions:{vertexOffset:0,divisor:1},nextPositions:{vertexOffset:1,divisor:1}}},vertexValid:{size:1,divisor:1,type:5121,update:this.calculateVertexValid,noAlloc:i},elevations:{size:1,transition:x,accessor:"getElevation",shaderAttributes:{elevations:{divisor:0},instanceElevations:{divisor:1}}},fillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:x,accessor:"getFillColor",defaultValue:A,shaderAttributes:{fillColors:{divisor:0},instanceFillColors:{divisor:1}}},lineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:x,accessor:"getLineColor",defaultValue:A,shaderAttributes:{lineColors:{divisor:0},instanceLineColors:{divisor:1}}},pickingColors:{size:3,type:5121,accessor:(t,{index:e,target:n})=>this.encodePickingColor(t&&t.__source?t.__source.index:e,n),shaderAttributes:{pickingColors:{divisor:0},instancePickingColors:{divisor:1}}}})}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{extruded:e,filled:n,wireframe:r,elevationScale:i}=this.props,{topModel:o,sideModel:a,polygonTesselator:s}=this.state,u={...t,extruded:Boolean(e),elevationScale:i};a&&(a.setInstanceCount(s.instanceCount-1),a.setUniforms(u),r&&(a.setDrawMode(3),a.setUniforms({isWireframe:!0}).draw()),n&&(a.setDrawMode(6),a.setUniforms({isWireframe:!1}).draw())),o&&(o.setVertexCount(s.vertexCount),o.setUniforms(u).draw())}updateState(t){super.updateState(t),this.updateGeometry(t);const{props:e,oldProps:n,changeFlags:r}=t,i=this.getAttributeManager();var o;(r.extensionsChanged||e.filled!==n.filled||e.extruded!==n.extruded)&&(null===(o=this.state.models)||void 0===o||o.forEach((t=>t.delete())),this.setState(this._getModels(this.context.gl)),i.invalidateAll())}updateGeometry({props:t,oldProps:e,changeFlags:n}){if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPolygon)){const{polygonTesselator:e}=this.state,r=t.data.attributes||{};e.updateGeometry({data:t.data,normalize:t._normalize,geometryBuffer:r.getPolygon,buffers:r,getGeometry:t.getPolygon,positionFormat:t.positionFormat,wrapLongitude:t.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:n.dataChanged}),this.setState({numInstances:e.instanceCount,startIndices:e.vertexStarts}),n.dataChanged||this.getAttributeManager().invalidateAll()}}_getModels(t){const{id:e,filled:n,extruded:r}=this.props;let i,o;if(n){const n=this.getShaders("top");n.defines.NON_INSTANCED_MODEL=1,i=new f.a(t,{...n,id:"".concat(e,"-top"),drawMode:4,attributes:{vertexPositions:new Float32Array([0,1])},uniforms:{isWireframe:!1,isSideVertex:!1},vertexCount:0,isIndexed:!0})}return r&&(o=new f.a(t,{...this.getShaders("side"),id:"".concat(e,"-side"),geometry:new h.a({drawMode:1,vertexCount:4,attributes:{vertexPositions:{size:2,value:new Float32Array([1,0,0,0,0,1,1,1])}}}),instanceCount:0,isInstanced:1}),o.userData.excludeAttributes={indices:!0}),{models:[o,i].filter(Boolean),topModel:i,sideModel:o}}calculateIndices(t){const{polygonTesselator:e}=this.state;t.startIndices=e.indexStarts,t.value=e.get("indices")}calculatePositions(t){const{polygonTesselator:e}=this.state;t.startIndices=e.vertexStarts,t.value=e.get("positions")}calculateVertexValid(t){t.value=this.state.polygonTesselator.get("vertexValid")}}Object(r.a)(E,"defaultProps",w),Object(r.a)(E,"layerName","SolidPolygonLayer")},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(1),i=n(357),o=n(491),a=n(492),s=n(15),u=n(366),l=n(130),c=n(637),f=n(53);class h extends c.a{constructor(t){super({...t,attributes:{positions:{size:3,padding:18,initialize:!0,type:t.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}})}get(t){return this.attributes[t]}getGeometryFromBuffer(t){return this.normalize?super.getGeometryFromBuffer(t):null}normalizeGeometry(t){return this.normalize?function(t,e,n,r){let i;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}else i=t;return n?Object(f.cutPolylineByGrid)(i,{size:e,gridResolution:n}):r?Object(f.cutPolylineByMercatorBounds)(i,{size:e}):i}(t,this.positionSize,this.opts.resolution,this.opts.wrapLongitude):t}getGeometrySize(t){if(p(t)){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&&p(t))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 n=this.attributes.segmentTypes,r=!!t&&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||!t)return;const{vertexStart:r,geometrySize:i}=e,o=new Array(3);for(let a=r,s=0;s<i;a++,s++)this.getPointOnPath(t,s,o),n[3*a]=o[0],n[3*a+1]=o[1],n[3*a+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 Boolean(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])}}function p(t){return Array.isArray(t[0])}const d=[0,0,0,255],m={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:d},getWidth:{type:"accessor",value:1},rounded:{deprecatedFor:["jointRounded","capRounded"]}},g={enter:(t,e)=>e.length?e.subarray(e.length-t.length):t};class y extends i.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}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}\n\n// calculate line join positions\nvec3 lineJoin(\n  vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n  vec2 width\n) {\n  bool isEnd = positions.x > 0.0;\n  // side of the segment - -1: left, 0: center, 1: right\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\n  // tangent of the corner\n  vec2 tangent = dirA + dirB;\n  tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n  // direction of the corner\n  vec2 miterVec = vec2(-tangent.y, tangent.x);\n  // direction of the segment\n  vec2 dir = isEnd ? dirA : dirB;\n  // direction of the extrusion\n  vec2 perp = isEnd ? perpA : perpB;\n  // length of the segment\n  float L = isEnd ? lenA : lenB;\n\n  // A = angle of the corner\n  float sinHalfA = abs(dot(miterVec, perp));\n  float cosHalfA = abs(dot(dirA, miterVec));\n\n  // -1: right, 1: left\n  float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n\n  // relative position to the corner:\n  // -1: inside (smaller side of the angle)\n  // 0: center\n  // 1: outside (bigger side of the angle)\n  float cornerPosition = sideOfPath * turnDirection;\n\n  float miterSize = 1.0 / max(sinHalfA, EPSILON);\n  // trim if inside corner extends further than the line segment\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\n  // special treatment for start cap and end cap\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\n  // extend out a triangle to envelope the round cap\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\n  // Generate variables for fragment shader\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}\n\n// In clipspace extrusion, if a line extends behind the camera, clip it to avoid visual artifacts\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    // Extrude in clipspace\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    // Extrude in commonspace\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;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\n/*\n * vPathPosition represents the relative coordinates of the current fragment on the path segment.\n * vPathPosition.x - position along the width of the path, between [-1, 1]. 0 is the center line.\n * vPathPosition.y - position along the length of the path, between [0, L / width].\n */\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 joint is rounded, test distance from the corner\n    if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {\n      discard;\n    }\n    // trim miter\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:[o.a,a.a]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:g,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:g,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:g,defaultValue:d},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 h({fp64:this.use64bitPositions()})})}updateState(t){super.updateState(t);const{props:e,changeFlags:n}=t,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:a,widthMinPixels:u,widthMaxPixels:l}=this.props;this.state.model.setUniforms(t).setUniforms({jointType:Number(e),capType:Number(n),billboard:r,widthUnits:s.e[o],widthScale:a,miterLimit:i,widthMinPixels:u,widthMaxPixels:l}).draw()}_getModel(t){return new u.a(t,{...this.getShaders(),id:this.props.id,geometry:new l.a({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")}}Object(r.a)(y,"defaultProps",m),Object(r.a)(y,"layerName","PathLayer")},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1),i=n(100);const o=[255,255,255],a=1,s=[0,0,-1];let u=0;class l{constructor(t={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"color",void 0),Object(r.a)(this,"intensity",void 0),Object(r.a)(this,"type","directional"),Object(r.a)(this,"direction",void 0),Object(r.a)(this,"shadow",void 0);const{color:e=o}=t,{intensity:n=a}=t,{direction:l=s}=t,{_shadow:c=!1}=t;this.id=t.id||"directional-".concat(u++),this.color=e,this.intensity=n,this.type="directional",this.direction=new i.a(l).normalize().toArray(),this.shadow=c}getProjectedLight(t){return this}}},function(t,e,n){(function(t,r){var i;(function(){var o,a="Expected a function",s="__lodash_hash_undefined__",u="__lodash_placeholder__",l=16,c=32,f=64,h=128,p=256,d=1/0,m=9007199254740991,g=NaN,y=4294967295,v=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",f],["rearg",p]],b="[object Arguments]",_="[object Array]",A="[object Boolean]",w="[object Date]",x="[object Error]",E="[object Function]",O="[object GeneratorFunction]",S="[object Map]",P="[object Number]",C="[object Object]",T="[object Promise]",k="[object RegExp]",I="[object Set]",L="[object String]",j="[object Symbol]",M="[object WeakMap]",R="[object ArrayBuffer]",N="[object DataView]",D="[object Float32Array]",F="[object Float64Array]",B="[object Int8Array]",z="[object Int16Array]",U="[object Int32Array]",G="[object Uint8Array]",V="[object Uint8ClampedArray]",q="[object Uint16Array]",H="[object Uint32Array]",W=/\b__p \+= '';/g,X=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,$=RegExp(Z.source),J=RegExp(K.source),Q=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ot=/[\\^$.*+?()[\]{}|]/g,at=RegExp(ot.source),st=/^\s+|\s+$/g,ut=/^\s+/,lt=/\s+$/,ct=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ft=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dt=/\\(\\)?/g,mt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,yt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,At=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xt=/($^)/,Et=/['\n\r\u2028\u2029\\]/g,Ot="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Pt="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",Tt="\\ufe0e\\ufe0f",kt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",It="['\u2019]",Lt="[\\ud800-\\udfff]",jt="["+kt+"]",Mt="["+Ot+"]",Rt="\\d+",Nt="[\\u2700-\\u27bf]",Dt="["+Pt+"]",Ft="[^\\ud800-\\udfff"+kt+Rt+St+Pt+Ct+"]",Bt="\\ud83c[\\udffb-\\udfff]",zt="[^\\ud800-\\udfff]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Gt="[\\ud800-\\udbff][\\udc00-\\udfff]",Vt="["+Ct+"]",qt="(?:"+Dt+"|"+Ft+")",Ht="(?:"+Vt+"|"+Ft+")",Wt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Yt="(?:"+Mt+"|"+Bt+")"+"?",Zt="[\\ufe0e\\ufe0f]?",Kt=Zt+Yt+("(?:\\u200d(?:"+[zt,Ut,Gt].join("|")+")"+Zt+Yt+")*"),$t="(?:"+[Nt,Ut,Gt].join("|")+")"+Kt,Jt="(?:"+[zt+Mt+"?",Mt,Ut,Gt,Lt].join("|")+")",Qt=RegExp(It,"g"),te=RegExp(Mt,"g"),ee=RegExp(Bt+"(?="+Bt+")|"+Jt+Kt,"g"),ne=RegExp([Vt+"?"+Dt+"+"+Wt+"(?="+[jt,Vt,"$"].join("|")+")",Ht+"+"+Xt+"(?="+[jt,Vt+qt,"$"].join("|")+")",Vt+"?"+qt+"+"+Wt,Vt+"+"+Xt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,$t].join("|"),"g"),re=RegExp("[\\u200d\\ud800-\\udfff"+Ot+Tt+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,se={};se[D]=se[F]=se[B]=se[z]=se[U]=se[G]=se[V]=se[q]=se[H]=!0,se[b]=se[_]=se[R]=se[A]=se[N]=se[w]=se[x]=se[E]=se[S]=se[P]=se[C]=se[k]=se[I]=se[L]=se[M]=!1;var ue={};ue[b]=ue[_]=ue[R]=ue[N]=ue[A]=ue[w]=ue[D]=ue[F]=ue[B]=ue[z]=ue[U]=ue[S]=ue[P]=ue[C]=ue[k]=ue[I]=ue[L]=ue[j]=ue[G]=ue[V]=ue[q]=ue[H]=!0,ue[x]=ue[E]=ue[M]=!1;var le={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ce=parseFloat,fe=parseInt,he="object"==typeof t&&t&&t.Object===Object&&t,pe="object"==typeof self&&self&&self.Object===Object&&self,de=he||pe||Function("return this")(),me=e&&!e.nodeType&&e,ge=me&&"object"==typeof r&&r&&!r.nodeType&&r,ye=ge&&ge.exports===me,ve=ye&&he.process,be=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||ve&&ve.binding&&ve.binding("util")}catch(e){}}(),_e=be&&be.isArrayBuffer,Ae=be&&be.isDate,we=be&&be.isMap,xe=be&&be.isRegExp,Ee=be&&be.isSet,Oe=be&&be.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Pe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ke(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ie(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Le(t,e){return!!(null==t?0:t.length)&&Ge(t,e,0)>-1}function je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Me(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Re(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Ne(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function De(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Be=We("length");function ze(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ue(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ge(t,e,n){return e===e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ue(t,qe,n)}function Ve(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function qe(t){return t!==t}function He(t,e){var n=null==t?0:t.length;return n?Ze(t,e)/n:g}function We(t){return function(e){return null==e?o:e[t]}}function Xe(t){return function(e){return null==t?o:t[e]}}function Ye(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ze(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function Ke(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function $e(t){return function(e){return t(e)}}function Je(t,e){return Me(e,(function(e){return t[e]}))}function Qe(t,e){return t.has(e)}function tn(t,e){for(var n=-1,r=t.length;++n<r&&Ge(e,t[n],0)>-1;);return n}function en(t,e){for(var n=t.length;n--&&Ge(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var rn=Xe({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),on=Xe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function an(t){return"\\"+le[t]}function sn(t){return re.test(t)}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function cn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,o[i++]=n)}return o}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function hn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function pn(t){return sn(t)?function(t){var e=ee.lastIndex=0;for(;ee.test(t);)++e;return e}(t):Be(t)}function dn(t){return sn(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}var mn=Xe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var gn=function t(e){var n,r=(e=null==e?de:gn.defaults(de.Object(),e,gn.pick(de,oe))).Array,i=e.Date,Ot=e.Error,St=e.Function,Pt=e.Math,Ct=e.Object,Tt=e.RegExp,kt=e.String,It=e.TypeError,Lt=r.prototype,jt=St.prototype,Mt=Ct.prototype,Rt=e["__core-js_shared__"],Nt=jt.toString,Dt=Mt.hasOwnProperty,Ft=0,Bt=(n=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",zt=Mt.toString,Ut=Nt.call(Ct),Gt=de._,Vt=Tt("^"+Nt.call(Dt).replace(ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qt=ye?e.Buffer:o,Ht=e.Symbol,Wt=e.Uint8Array,Xt=qt?qt.allocUnsafe:o,Yt=ln(Ct.getPrototypeOf,Ct),Zt=Ct.create,Kt=Mt.propertyIsEnumerable,$t=Lt.splice,Jt=Ht?Ht.isConcatSpreadable:o,ee=Ht?Ht.iterator:o,re=Ht?Ht.toStringTag:o,le=function(){try{var t=ho(Ct,"defineProperty");return t({},"",{}),t}catch(e){}}(),he=e.clearTimeout!==de.clearTimeout&&e.clearTimeout,pe=i&&i.now!==de.Date.now&&i.now,me=e.setTimeout!==de.setTimeout&&e.setTimeout,ge=Pt.ceil,ve=Pt.floor,be=Ct.getOwnPropertySymbols,Be=qt?qt.isBuffer:o,Xe=e.isFinite,yn=Lt.join,vn=ln(Ct.keys,Ct),bn=Pt.max,_n=Pt.min,An=i.now,wn=e.parseInt,xn=Pt.random,En=Lt.reverse,On=ho(e,"DataView"),Sn=ho(e,"Map"),Pn=ho(e,"Promise"),Cn=ho(e,"Set"),Tn=ho(e,"WeakMap"),kn=ho(Ct,"create"),In=Tn&&new Tn,Ln={},jn=zo(On),Mn=zo(Sn),Rn=zo(Pn),Nn=zo(Cn),Dn=zo(Tn),Fn=Ht?Ht.prototype:o,Bn=Fn?Fn.valueOf:o,zn=Fn?Fn.toString:o;function Un(t){if(rs(t)&&!Wa(t)&&!(t instanceof Hn)){if(t instanceof qn)return t;if(Dt.call(t,"__wrapped__"))return Uo(t)}return new qn(t)}var Gn=function(){function t(){}return function(e){if(!ns(e))return{};if(Zt)return Zt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Vn(){}function qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Hn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Xn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Yn;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Xn(t);this.size=e.size}function $n(t,e){var n=Wa(t),r=!n&&Ha(t),i=!n&&!r&&Ka(t),o=!n&&!r&&!i&&fs(t),a=n||r||i||o,s=a?Ke(t.length,kt):[],u=s.length;for(var l in t)!e&&!Dt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_o(l,u))||s.push(l);return s}function Jn(t){var e=t.length;return e?t[Zr(0,e-1)]:o}function Qn(t,e){return Do(ki(t),ur(e,0,t.length))}function tr(t){return Do(ki(t))}function er(t,e,n){(n!==o&&!Ga(t[e],n)||n===o&&!(e in t))&&ar(t,e,n)}function nr(t,e,n){var r=t[e];Dt.call(t,e)&&Ga(r,n)&&(n!==o||e in t)||ar(t,e,n)}function rr(t,e){for(var n=t.length;n--;)if(Ga(t[n][0],e))return n;return-1}function ir(t,e,n,r){return pr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function or(t,e){return t&&Ii(e,js(e),t)}function ar(t,e,n){"__proto__"==e&&le?le(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:Cs(t,e[n]);return a}function ur(t,e,n){return t===t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function lr(t,e,n,r,i,a){var s,u=1&e,l=2&e,c=4&e;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!ns(t))return t;var f=Wa(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Dt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return ki(t,s)}else{var h=go(t),p=h==E||h==O;if(Ka(t))return Ei(t,u);if(h==C||h==b||p&&!i){if(s=l||p?{}:vo(t),!u)return l?function(t,e){return Ii(t,mo(t),e)}(t,function(t,e){return t&&Ii(e,Ms(e),t)}(s,t)):function(t,e){return Ii(t,po(t),e)}(t,or(s,t))}else{if(!ue[h])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case R:return Oi(t);case A:case w:return new r(+t);case N:return function(t,e){var n=e?Oi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case D:case F:case B:case z:case U:case G:case V:case q:case H:return Si(t,n);case S:return new r;case P:case L:return new r(t);case k:return function(t){var e=new t.constructor(t.source,gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new r;case j:return i=t,Bn?Ct(Bn.call(i)):{}}var i}(t,h,u)}}a||(a=new Kn);var d=a.get(t);if(d)return d;a.set(t,s),us(t)?t.forEach((function(r){s.add(lr(r,e,n,r,t,a))})):is(t)&&t.forEach((function(r,i){s.set(i,lr(r,e,n,i,t,a))}));var m=f?o:(c?l?oo:io:l?Ms:js)(t);return Ce(m||t,(function(r,i){m&&(r=t[i=r]),nr(s,i,lr(r,e,n,i,t,a))})),s}function cr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Ct(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function fr(t,e,n){if("function"!=typeof t)throw new It(a);return jo((function(){t.apply(o,n)}),e)}function hr(t,e,n,r){var i=-1,o=Le,a=!0,s=t.length,u=[],l=e.length;if(!s)return u;n&&(e=Me(e,$e(n))),r?(o=je,a=!1):e.length>=200&&(o=Qe,a=!1,e=new Zn(e));t:for(;++i<s;){var c=t[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f===f){for(var h=l;h--;)if(e[h]===f)continue t;u.push(c)}else o(e,f,r)||u.push(c)}return u}Un.templateSettings={escape:Q,evaluate:tt,interpolate:et,variable:"",imports:{_:Un}},Un.prototype=Vn.prototype,Un.prototype.constructor=Un,qn.prototype=Gn(Vn.prototype),qn.prototype.constructor=qn,Hn.prototype=Gn(Vn.prototype),Hn.prototype.constructor=Hn,Wn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Wn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wn.prototype.get=function(t){var e=this.__data__;if(kn){var n=e[t];return n===s?o:n}return Dt.call(e,t)?e[t]:o},Wn.prototype.has=function(t){var e=this.__data__;return kn?e[t]!==o:Dt.call(e,t)},Wn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=kn&&e===o?s:e,this},Xn.prototype.clear=function(){this.__data__=[],this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():$t.call(e,n,1),--this.size,!0)},Xn.prototype.get=function(t){var e=this.__data__,n=rr(e,t);return n<0?o:e[n][1]},Xn.prototype.has=function(t){return rr(this.__data__,t)>-1},Xn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Xn),string:new Wn}},Yn.prototype.delete=function(t){var e=co(this,t).delete(t);return this.size-=e?1:0,e},Yn.prototype.get=function(t){return co(this,t).get(t)},Yn.prototype.has=function(t){return co(this,t).has(t)},Yn.prototype.set=function(t,e){var n=co(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Zn.prototype.add=Zn.prototype.push=function(t){return this.__data__.set(t,s),this},Zn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Xn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(t,e),this.size=n.size,this};var pr=Mi(Ar),dr=Mi(wr,!0);function mr(t,e){var n=!0;return pr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(u===o?s===s&&!cs(s):n(s,u)))var u=s,l=a}return l}function yr(t,e){var n=[];return pr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function vr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=bo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?vr(s,e-1,n,r,i):Re(i,s):r||(i[i.length]=s)}return i}var br=Ri(),_r=Ri(!0);function Ar(t,e){return t&&br(t,e,js)}function wr(t,e){return t&&_r(t,e,js)}function xr(t,e){return Ie(e,(function(e){return Qa(t[e])}))}function Er(t,e){for(var n=0,r=(e=_i(e,t)).length;null!=t&&n<r;)t=t[Bo(e[n++])];return n&&n==r?t:o}function Or(t,e,n){var r=e(t);return Wa(t)?r:Re(r,n(t))}function Sr(t){return null==t?t===o?"[object Undefined]":"[object Null]":re&&re in Ct(t)?function(t){var e=Dt.call(t,re),n=t[re];try{t[re]=o;var r=!0}catch(a){}var i=zt.call(t);r&&(e?t[re]=n:delete t[re]);return i}(t):function(t){return zt.call(t)}(t)}function Pr(t,e){return t>e}function Cr(t,e){return null!=t&&Dt.call(t,e)}function Tr(t,e){return null!=t&&e in Ct(t)}function kr(t,e,n){for(var i=n?je:Le,a=t[0].length,s=t.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Me(h,$e(e))),c=_n(h.length,c),l[u]=!n&&(e||a>=120&&h.length>=120)?new Zn(u&&h):o}h=t[0];var p=-1,d=l[0];t:for(;++p<a&&f.length<c;){var m=h[p],g=e?e(m):m;if(m=n||0!==m?m:0,!(d?Qe(d,g):i(f,g,n))){for(u=s;--u;){var y=l[u];if(!(y?Qe(y,g):i(t[u],g,n)))continue t}d&&d.push(g),f.push(m)}}return f}function Ir(t,e,n){var r=null==(t=To(t,e=_i(e,t)))?t:t[Bo(Jo(e))];return null==r?o:Se(r,t,n)}function Lr(t){return rs(t)&&Sr(t)==b}function jr(t,e,n,r,i){return t===e||(null==t||null==e||!rs(t)&&!rs(e)?t!==t&&e!==e:function(t,e,n,r,i,a){var s=Wa(t),u=Wa(e),l=s?_:go(t),c=u?_:go(e),f=(l=l==b?C:l)==C,h=(c=c==b?C:c)==C,p=l==c;if(p&&Ka(t)){if(!Ka(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Kn),s||fs(t)?no(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!o(new Wt(t),new Wt(e)));case A:case w:case P:return Ga(+t,+e);case x:return t.name==e.name&&t.message==e.message;case k:case L:return t==e+"";case S:var s=un;case I:var u=1&r;if(s||(s=fn),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=no(s(t),s(e),r,i,o,a);return a.delete(t),c;case j:if(Bn)return Bn.call(t)==Bn.call(e)}return!1}(t,e,l,n,r,i,a);if(!(1&n)){var d=f&&Dt.call(t,"__wrapped__"),m=h&&Dt.call(e,"__wrapped__");if(d||m){var g=d?t.value():t,y=m?e.value():e;return a||(a=new Kn),i(g,y,n,r,a)}}if(!p)return!1;return a||(a=new Kn),function(t,e,n,r,i,a){var s=1&n,u=io(t),l=u.length,c=io(e).length;if(l!=c&&!s)return!1;var f=l;for(;f--;){var h=u[f];if(!(s?h in e:Dt.call(e,h)))return!1}var p=a.get(t);if(p&&a.get(e))return p==e;var d=!0;a.set(t,e),a.set(e,t);var m=s;for(;++f<l;){var g=t[h=u[f]],y=e[h];if(r)var v=s?r(y,g,h,e,t,a):r(g,y,h,t,e,a);if(!(v===o?g===y||i(g,y,n,r,a):v)){d=!1;break}m||(m="constructor"==h)}if(d&&!m){var b=t.constructor,_=e.constructor;b==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a)}(t,e,n,r,jr,i))}function Mr(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=Ct(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var l=(u=n[i])[0],c=t[l],f=u[1];if(s&&u[2]){if(c===o&&!(l in t))return!1}else{var h=new Kn;if(r)var p=r(c,f,l,t,e,h);if(!(p===o?jr(f,c,3,r,h):p))return!1}}return!0}function Rr(t){return!(!ns(t)||(e=t,Bt&&Bt in e))&&(Qa(t)?Vt:bt).test(zo(t));var e}function Nr(t){return"function"==typeof t?t:null==t?ou:"object"==typeof t?Wa(t)?Gr(t[0],t[1]):Ur(t):du(t)}function Dr(t){if(!Oo(t))return vn(t);var e=[];for(var n in Ct(t))Dt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Fr(t){if(!ns(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=Oo(t),n=[];for(var r in t)("constructor"!=r||!e&&Dt.call(t,r))&&n.push(r);return n}function Br(t,e){return t<e}function zr(t,e){var n=-1,i=Ya(t)?r(t.length):[];return pr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Ur(t){var e=fo(t);return 1==e.length&&e[0][2]?Po(e[0][0],e[0][1]):function(n){return n===t||Mr(n,t,e)}}function Gr(t,e){return wo(t)&&So(e)?Po(Bo(t),e):function(n){var r=Cs(n,t);return r===o&&r===e?Ts(n,t):jr(e,r,3)}}function Vr(t,e,n,r,i){t!==e&&br(e,(function(a,s){if(i||(i=new Kn),ns(a))!function(t,e,n,r,i,a,s){var u=Io(t,n),l=Io(e,n),c=s.get(l);if(c)return void er(t,n,c);var f=a?a(u,l,n+"",t,e,s):o,h=f===o;if(h){var p=Wa(l),d=!p&&Ka(l),m=!p&&!d&&fs(l);f=l,p||d||m?Wa(u)?f=u:Za(u)?f=ki(u):d?(h=!1,f=Ei(l,!0)):m?(h=!1,f=Si(l,!0)):f=[]:as(l)||Ha(l)?(f=u,Ha(u)?f=bs(u):ns(u)&&!Qa(u)||(f=vo(l))):h=!1}h&&(s.set(l,f),i(f,l,r,a,s),s.delete(l));er(t,n,f)}(t,e,s,n,Vr,r,i);else{var u=r?r(Io(t,s),a,s+"",t,e,i):o;u===o&&(u=a),er(t,s,u)}}),Ms)}function qr(t,e){var n=t.length;if(n)return _o(e+=e<0?n:0,n)?t[e]:o}function Hr(t,e,n){var r=-1;e=Me(e.length?e:[ou],$e(lo()));var i=zr(t,(function(t,n,i){var o=Me(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Pi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Wr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Er(t,a);n(s,a)&&ti(o,_i(a,t),s)}return o}function Xr(t,e,n,r){var i=r?Ve:Ge,o=-1,a=e.length,s=t;for(t===e&&(e=ki(e)),n&&(s=Me(t,$e(n)));++o<a;)for(var u=0,l=e[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==t&&$t.call(s,u,1),$t.call(t,u,1);return t}function Yr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;_o(i)?$t.call(t,i,1):hi(t,i)}}return t}function Zr(t,e){return t+ve(xn()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>m)return n;do{e%2&&(n+=t),(e=ve(e/2))&&(t+=t)}while(e);return n}function $r(t,e){return Mo(Co(t,e,ou),t+"")}function Jr(t){return Jn(Gs(t))}function Qr(t,e){var n=Gs(t);return Do(n,ur(e,0,n.length))}function ti(t,e,n,r){if(!ns(t))return t;for(var i=-1,a=(e=_i(e,t)).length,s=a-1,u=t;null!=u&&++i<a;){var l=Bo(e[i]),c=n;if(i!=s){var f=u[l];(c=r?r(f,l,u):o)===o&&(c=ns(f)?f:_o(e[i+1])?[]:{})}nr(u,l,c),u=u[l]}return t}var ei=In?function(t,e){return In.set(t,e),t}:ou,ni=le?function(t,e){return le(t,"toString",{configurable:!0,enumerable:!1,value:nu(e),writable:!0})}:ou;function ri(t){return Do(Gs(t))}function ii(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function oi(t,e){var n;return pr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e===e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,ou,n)}function si(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!==e,u=null===e,l=cs(e),c=e===o;i<a;){var f=ve((i+a)/2),h=n(t[f]),p=h!==o,d=null===h,m=h===h,g=cs(h);if(s)var y=r||m;else y=c?m&&(r||p):u?m&&p&&(r||!d):l?m&&p&&!d&&(r||!g):!d&&!g&&(r?h<=e:h<e);y?i=f+1:a=f}return _n(a,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Ga(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(t){return"number"==typeof t?t:cs(t)?g:+t}function ci(t){if("string"==typeof t)return t;if(Wa(t))return Me(t,ci)+"";if(cs(t))return zn?zn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function fi(t,e,n){var r=-1,i=Le,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=je;else if(o>=200){var l=e?null:Ki(t);if(l)return fn(l);a=!1,i=Qe,u=new Zn}else u=e?[]:s;t:for(;++r<o;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,a&&f===f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),s.push(c)}else i(u,f,n)||(u!==s&&u.push(f),s.push(c))}return s}function hi(t,e){return null==(t=To(t,e=_i(e,t)))||delete t[Bo(Jo(e))]}function pi(t,e,n,r){return ti(t,e,n(Er(t,e)),r)}function di(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function mi(t,e){var n=t;return n instanceof Hn&&(n=n.value()),Ne(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function gi(t,e,n){var i=t.length;if(i<2)return i?fi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=hr(a[o]||s,t[u],e,n));return fi(vr(a,1),e,n)}function yi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var u=r<a?e[r]:o;n(s,t[r],u)}return s}function vi(t){return Za(t)?t:[]}function bi(t){return"function"==typeof t?t:ou}function _i(t,e){return Wa(t)?t:wo(t,e)?[t]:Fo(_s(t))}var Ai=$r;function wi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:ii(t,e,n)}var xi=he||function(t){return de.clearTimeout(t)};function Ei(t,e){if(e)return t.slice();var n=t.length,r=Xt?Xt(n):new t.constructor(n);return t.copy(r),r}function Oi(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Si(t,e){var n=e?Oi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Pi(t,e){if(t!==e){var n=t!==o,r=null===t,i=t===t,a=cs(t),s=e!==o,u=null===e,l=e===e,c=cs(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t<e||c&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!l)return-1}return 0}function Ci(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,l=e.length,c=bn(a-s,0),f=r(l+c),h=!i;++u<l;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;c--;)f[u++]=t[o++];return f}function Ti(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,l=-1,c=e.length,f=bn(a-u,0),h=r(f+c),p=!i;++o<f;)h[o]=t[o];for(var d=o;++l<c;)h[d+l]=e[l];for(;++s<u;)(p||o<a)&&(h[d+n[s]]=t[o++]);return h}function ki(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ii(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],l=r?r(n[u],t[u],u,n,t):o;l===o&&(l=t[u]),i?ar(n,u,l):nr(n,u,l)}return n}function Li(t,e){return function(n,r){var i=Wa(n)?Pe:ir,o=e?e():{};return i(n,t,lo(r,2),o)}}function ji(t){return $r((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Ao(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=Ct(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e}))}function Mi(t,e){return function(n,r){if(null==n)return n;if(!Ya(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Ct(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ri(t){return function(e,n,r){for(var i=-1,o=Ct(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Ni(t){return function(e){var n=sn(e=_s(e))?dn(e):o,r=n?n[0]:e.charAt(0),i=n?wi(n,1).join(""):e.slice(1);return r[t]()+i}}function Di(t){return function(e){return Ne(Qs(Hs(e).replace(Qt,"")),t,"")}}function Fi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Gn(t.prototype),r=t.apply(n,e);return ns(r)?r:n}}function Bi(t){return function(e,n,r){var i=Ct(e);if(!Ya(e)){var a=lo(n,3);e=js(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function zi(t){return ro((function(e){var n=e.length,r=n,i=qn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new It(a);if(i&&!u&&"wrapper"==so(s))var u=new qn([],!0)}for(r=u?r:n;++r<n;){var l=so(s=e[r]),c="wrapper"==l?ao(s):o;u=c&&xo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[so(c[0])].apply(u,c[3]):1==s.length&&xo(s)?u[l]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Wa(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Ui(t,e,n,i,a,s,u,l,c,f){var p=e&h,d=1&e,m=2&e,g=24&e,y=512&e,v=m?o:Fi(t);return function o(){for(var h=arguments.length,b=r(h),_=h;_--;)b[_]=arguments[_];if(g)var A=uo(o),w=nn(b,A);if(i&&(b=Ci(b,i,a,g)),s&&(b=Ti(b,s,u,g)),h-=w,g&&h<f){var x=cn(b,A);return Yi(t,e,Ui,o.placeholder,n,b,x,l,c,f-h)}var E=d?n:this,O=m?E[t]:t;return h=b.length,l?b=ko(b,l):y&&h>1&&b.reverse(),p&&c<h&&(b.length=c),this&&this!==de&&this instanceof o&&(O=v||Fi(O)),O.apply(E,b)}}function Gi(t,e){return function(n,r){return function(t,e,n,r){return Ar(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Vi(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=li(n),r=li(r)),i=t(n,r)}return i}}function qi(t){return ro((function(e){return e=Me(e,$e(lo())),$r((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Hi(t,e){var n=(e=e===o?" ":ci(e)).length;if(n<2)return n?Kr(e,t):e;var r=Kr(e,ge(t/pn(e)));return sn(e)?wi(dn(r),0,t).join(""):r.slice(0,t)}function Wi(t){return function(e,n,i){return i&&"number"!=typeof i&&Ao(e,n,i)&&(n=i=o),e=ms(e),n===o?(n=e,e=0):n=ms(n),function(t,e,n,i){for(var o=-1,a=bn(ge((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:ms(i),t)}}function Xi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=vs(e),n=vs(n)),t(e,n)}}function Yi(t,e,n,r,i,a,s,u,l,h){var p=8&e;e|=p?c:f,4&(e&=~(p?f:c))||(e&=-4);var d=[t,e,i,p?a:o,p?s:o,p?o:a,p?o:s,u,l,h],m=n.apply(o,d);return xo(t)&&Lo(m,d),m.placeholder=r,Ro(m,t,e)}function Zi(t){var e=Pt[t];return function(t,n){if(t=vs(t),(n=null==n?0:_n(gs(n),292))&&Xe(t)){var r=(_s(t)+"e").split("e");return+((r=(_s(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ki=Cn&&1/fn(new Cn([,-0]))[1]==d?function(t){return new Cn(t)}:cu;function $i(t){return function(e){var n=go(e);return n==S?un(e):n==I?hn(e):function(t,e){return Me(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ji(t,e,n,i,s,d,m,g){var y=2&e;if(!y&&"function"!=typeof t)throw new It(a);var v=i?i.length:0;if(v||(e&=-97,i=s=o),m=m===o?m:bn(gs(m),0),g=g===o?g:gs(g),v-=s?s.length:0,e&f){var b=i,_=s;i=s=o}var A=y?o:ao(t),w=[t,e,n,i,s,b,_,d,m,g];if(A&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==h&&8==n||r==h&&n==p&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var s=e[3];if(s){var l=t[3];t[3]=l?Ci(l,s,e[4]):s,t[4]=l?cn(t[3],u):e[4]}(s=e[5])&&(l=t[5],t[5]=l?Ti(l,s,e[6]):s,t[6]=l?cn(t[5],u):e[6]);(s=e[7])&&(t[7]=s);r&h&&(t[8]=null==t[8]?e[8]:_n(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(w,A),t=w[0],e=w[1],n=w[2],i=w[3],s=w[4],!(g=w[9]=w[9]===o?y?0:t.length:bn(w[9]-v,0))&&24&e&&(e&=-25),e&&1!=e)x=8==e||e==l?function(t,e,n){var i=Fi(t);return function a(){for(var s=arguments.length,u=r(s),l=s,c=uo(a);l--;)u[l]=arguments[l];var f=s<3&&u[0]!==c&&u[s-1]!==c?[]:cn(u,c);return(s-=f.length)<n?Yi(t,e,Ui,a.placeholder,o,u,f,o,o,n-s):Se(this&&this!==de&&this instanceof a?i:t,this,u)}}(t,e,g):e!=c&&33!=e||s.length?Ui.apply(o,w):function(t,e,n,i){var o=1&e,a=Fi(t);return function e(){for(var s=-1,u=arguments.length,l=-1,c=i.length,f=r(c+u),h=this&&this!==de&&this instanceof e?a:t;++l<c;)f[l]=i[l];for(;u--;)f[l++]=arguments[++s];return Se(h,o?n:this,f)}}(t,e,n,i);else var x=function(t,e,n){var r=1&e,i=Fi(t);return function e(){return(this&&this!==de&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Ro((A?ei:Lo)(x,w),t,e)}function Qi(t,e,n,r){return t===o||Ga(t,Mt[n])&&!Dt.call(r,n)?e:t}function to(t,e,n,r,i,a){return ns(t)&&ns(e)&&(a.set(e,t),Vr(t,e,o,to,a),a.delete(e)),t}function eo(t){return as(t)?o:t}function no(t,e,n,r,i,a){var s=1&n,u=t.length,l=e.length;if(u!=l&&!(s&&l>u))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var f=-1,h=!0,p=2&n?new Zn:o;for(a.set(t,e),a.set(e,t);++f<u;){var d=t[f],m=e[f];if(r)var g=s?r(m,d,f,e,t,a):r(d,m,f,t,e,a);if(g!==o){if(g)continue;h=!1;break}if(p){if(!Fe(e,(function(t,e){if(!Qe(p,e)&&(d===t||i(d,t,n,r,a)))return p.push(e)}))){h=!1;break}}else if(d!==m&&!i(d,m,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function ro(t){return Mo(Co(t,o,Xo),t+"")}function io(t){return Or(t,js,po)}function oo(t){return Or(t,Ms,mo)}var ao=In?function(t){return In.get(t)}:cu;function so(t){for(var e=t.name+"",n=Ln[e],r=Dt.call(Ln,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function uo(t){return(Dt.call(Un,"placeholder")?Un:t).placeholder}function lo(){var t=Un.iteratee||au;return t=t===au?Nr:t,arguments.length?t(arguments[0],arguments[1]):t}function co(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function fo(t){for(var e=js(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,So(i)]}return e}function ho(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Rr(n)?n:o}var po=be?function(t){return null==t?[]:(t=Ct(t),Ie(be(t),(function(e){return Kt.call(t,e)})))}:yu,mo=be?function(t){for(var e=[];t;)Re(e,po(t)),t=Yt(t);return e}:yu,go=Sr;function yo(t,e,n){for(var r=-1,i=(e=_i(e,t)).length,o=!1;++r<i;){var a=Bo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&es(i)&&_o(a,i)&&(Wa(t)||Ha(t))}function vo(t){return"function"!=typeof t.constructor||Oo(t)?{}:Gn(Yt(t))}function bo(t){return Wa(t)||Ha(t)||!!(Jt&&t&&t[Jt])}function _o(t,e){var n=typeof t;return!!(e=null==e?m:e)&&("number"==n||"symbol"!=n&&At.test(t))&&t>-1&&t%1==0&&t<e}function Ao(t,e,n){if(!ns(n))return!1;var r=typeof e;return!!("number"==r?Ya(n)&&_o(e,n.length):"string"==r&&e in n)&&Ga(n[e],t)}function wo(t,e){if(Wa(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||(rt.test(t)||!nt.test(t)||null!=e&&t in Ct(e))}function xo(t){var e=so(t),n=Un[e];if("function"!=typeof n||!(e in Hn.prototype))return!1;if(t===n)return!0;var r=ao(n);return!!r&&t===r[0]}(On&&go(new On(new ArrayBuffer(1)))!=N||Sn&&go(new Sn)!=S||Pn&&go(Pn.resolve())!=T||Cn&&go(new Cn)!=I||Tn&&go(new Tn)!=M)&&(go=function(t){var e=Sr(t),n=e==C?t.constructor:o,r=n?zo(n):"";if(r)switch(r){case jn:return N;case Mn:return S;case Rn:return T;case Nn:return I;case Dn:return M}return e});var Eo=Rt?Qa:vu;function Oo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Mt)}function So(t){return t===t&&!ns(t)}function Po(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==o||t in Ct(n)))}}function Co(t,e,n){return e=bn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=bn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),Se(t,this,u)}}function To(t,e){return e.length<2?t:Er(t,ii(e,0,-1))}function ko(t,e){for(var n=t.length,r=_n(e.length,n),i=ki(t);r--;){var a=e[r];t[r]=_o(a,n)?i[a]:o}return t}function Io(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var Lo=No(ei),jo=me||function(t,e){return de.setTimeout(t,e)},Mo=No(ni);function Ro(t,e,n){var r=e+"";return Mo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ct,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ce(v,(function(n){var r="_."+n[0];e&n[1]&&!Le(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ft);return e?e[1].split(ht):[]}(r),n)))}function No(t){var e=0,n=0;return function(){var r=An(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Do(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Zr(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Fo=function(t){var e=Na(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(it,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function Bo(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zo(t){if(null!=t){try{return Nt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Uo(t){if(t instanceof Hn)return t.clone();var e=new qn(t.__wrapped__,t.__chain__);return e.__actions__=ki(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Go=$r((function(t,e){return Za(t)?hr(t,vr(e,1,Za,!0)):[]})),Vo=$r((function(t,e){var n=Jo(e);return Za(n)&&(n=o),Za(t)?hr(t,vr(e,1,Za,!0),lo(n,2)):[]})),qo=$r((function(t,e){var n=Jo(e);return Za(n)&&(n=o),Za(t)?hr(t,vr(e,1,Za,!0),o,n):[]}));function Ho(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),Ue(t,lo(e,3),i)}function Wo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=gs(n),i=n<0?bn(r+i,0):_n(i,r-1)),Ue(t,lo(e,3),i,!0)}function Xo(t){return(null==t?0:t.length)?vr(t,1):[]}function Yo(t){return t&&t.length?t[0]:o}var Zo=$r((function(t){var e=Me(t,vi);return e.length&&e[0]===t[0]?kr(e):[]})),Ko=$r((function(t){var e=Jo(t),n=Me(t,vi);return e===Jo(n)?e=o:n.pop(),n.length&&n[0]===t[0]?kr(n,lo(e,2)):[]})),$o=$r((function(t){var e=Jo(t),n=Me(t,vi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?kr(n,o,e):[]}));function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Qo=$r(ta);function ta(t,e){return t&&t.length&&e&&e.length?Xr(t,e):t}var ea=ro((function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Yr(t,Me(e,(function(t){return _o(t,n)?+t:t})).sort(Pi)),r}));function na(t){return null==t?t:En.call(t)}var ra=$r((function(t){return fi(vr(t,1,Za,!0))})),ia=$r((function(t){var e=Jo(t);return Za(e)&&(e=o),fi(vr(t,1,Za,!0),lo(e,2))})),oa=$r((function(t){var e=Jo(t);return e="function"==typeof e?e:o,fi(vr(t,1,Za,!0),o,e)}));function aa(t){if(!t||!t.length)return[];var e=0;return t=Ie(t,(function(t){if(Za(t))return e=bn(t.length,e),!0})),Ke(e,(function(e){return Me(t,We(e))}))}function sa(t,e){if(!t||!t.length)return[];var n=aa(t);return null==e?n:Me(n,(function(t){return Se(e,o,t)}))}var ua=$r((function(t,e){return Za(t)?hr(t,e):[]})),la=$r((function(t){return gi(Ie(t,Za))})),ca=$r((function(t){var e=Jo(t);return Za(e)&&(e=o),gi(Ie(t,Za),lo(e,2))})),fa=$r((function(t){var e=Jo(t);return e="function"==typeof e?e:o,gi(Ie(t,Za),o,e)})),ha=$r(aa);var pa=$r((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,sa(t,n)}));function da(t){var e=Un(t);return e.__chain__=!0,e}function ma(t,e){return e(t)}var ga=ro((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Hn&&_o(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ma,args:[i],thisArg:o}),new qn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)}));var ya=Li((function(t,e,n){Dt.call(t,n)?++t[n]:ar(t,n,1)}));var va=Bi(Ho),ba=Bi(Wo);function _a(t,e){return(Wa(t)?Ce:pr)(t,lo(e,3))}function Aa(t,e){return(Wa(t)?Te:dr)(t,lo(e,3))}var wa=Li((function(t,e,n){Dt.call(t,n)?t[n].push(e):ar(t,n,[e])}));var xa=$r((function(t,e,n){var i=-1,o="function"==typeof e,a=Ya(t)?r(t.length):[];return pr(t,(function(t){a[++i]=o?Se(e,t,n):Ir(t,e,n)})),a})),Ea=Li((function(t,e,n){ar(t,n,e)}));function Oa(t,e){return(Wa(t)?Me:zr)(t,lo(e,3))}var Sa=Li((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Pa=$r((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Ao(t,e[0],e[1])?e=[]:n>2&&Ao(e[0],e[1],e[2])&&(e=[e[0]]),Hr(t,vr(e,1),[])})),Ca=pe||function(){return de.Date.now()};function Ta(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Ji(t,h,o,o,o,o,e)}function ka(t,e){var n;if("function"!=typeof e)throw new It(a);return t=gs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Ia=$r((function(t,e,n){var r=1;if(n.length){var i=cn(n,uo(Ia));r|=c}return Ji(t,r,e,n,i)})),La=$r((function(t,e,n){var r=3;if(n.length){var i=cn(n,uo(La));r|=c}return Ji(e,r,t,n,i)}));function ja(t,e,n){var r,i,s,u,l,c,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new It(a);function m(e){var n=r,a=i;return r=i=o,f=e,u=t.apply(a,n)}function g(t){return f=t,l=jo(v,e),h?m(t):u}function y(t){var n=t-c;return c===o||n>=e||n<0||p&&t-f>=s}function v(){var t=Ca();if(y(t))return b(t);l=jo(v,function(t){var n=e-(t-c);return p?_n(n,s-(t-f)):n}(t))}function b(t){return l=o,d&&r?m(t):(r=i=o,u)}function _(){var t=Ca(),n=y(t);if(r=arguments,i=this,c=t,n){if(l===o)return g(c);if(p)return xi(l),l=jo(v,e),m(c)}return l===o&&(l=jo(v,e)),u}return e=vs(e)||0,ns(n)&&(h=!!n.leading,s=(p="maxWait"in n)?bn(vs(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d),_.cancel=function(){l!==o&&xi(l),f=0,r=c=i=l=o},_.flush=function(){return l===o?u:b(Ca())},_}var Ma=$r((function(t,e){return fr(t,1,e)})),Ra=$r((function(t,e,n){return fr(t,vs(e)||0,n)}));function Na(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(a);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Na.Cache||Yn),n}function Da(t){if("function"!=typeof t)throw new It(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Na.Cache=Yn;var Fa=Ai((function(t,e){var n=(e=1==e.length&&Wa(e[0])?Me(e[0],$e(lo())):Me(vr(e,1),$e(lo()))).length;return $r((function(r){for(var i=-1,o=_n(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Ba=$r((function(t,e){var n=cn(e,uo(Ba));return Ji(t,c,o,e,n)})),za=$r((function(t,e){var n=cn(e,uo(za));return Ji(t,f,o,e,n)})),Ua=ro((function(t,e){return Ji(t,p,o,o,o,e)}));function Ga(t,e){return t===e||t!==t&&e!==e}var Va=Xi(Pr),qa=Xi((function(t,e){return t>=e})),Ha=Lr(function(){return arguments}())?Lr:function(t){return rs(t)&&Dt.call(t,"callee")&&!Kt.call(t,"callee")},Wa=r.isArray,Xa=_e?$e(_e):function(t){return rs(t)&&Sr(t)==R};function Ya(t){return null!=t&&es(t.length)&&!Qa(t)}function Za(t){return rs(t)&&Ya(t)}var Ka=Be||vu,$a=Ae?$e(Ae):function(t){return rs(t)&&Sr(t)==w};function Ja(t){if(!rs(t))return!1;var e=Sr(t);return e==x||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!as(t)}function Qa(t){if(!ns(t))return!1;var e=Sr(t);return e==E||e==O||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ts(t){return"number"==typeof t&&t==gs(t)}function es(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=m}function ns(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function rs(t){return null!=t&&"object"==typeof t}var is=we?$e(we):function(t){return rs(t)&&go(t)==S};function os(t){return"number"==typeof t||rs(t)&&Sr(t)==P}function as(t){if(!rs(t)||Sr(t)!=C)return!1;var e=Yt(t);if(null===e)return!0;var n=Dt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==Ut}var ss=xe?$e(xe):function(t){return rs(t)&&Sr(t)==k};var us=Ee?$e(Ee):function(t){return rs(t)&&go(t)==I};function ls(t){return"string"==typeof t||!Wa(t)&&rs(t)&&Sr(t)==L}function cs(t){return"symbol"==typeof t||rs(t)&&Sr(t)==j}var fs=Oe?$e(Oe):function(t){return rs(t)&&es(t.length)&&!!se[Sr(t)]};var hs=Xi(Br),ps=Xi((function(t,e){return t<=e}));function ds(t){if(!t)return[];if(Ya(t))return ls(t)?dn(t):ki(t);if(ee&&t[ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ee]());var e=go(t);return(e==S?un:e==I?fn:Gs)(t)}function ms(t){return t?(t=vs(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}function gs(t){var e=ms(t),n=e%1;return e===e?n?e-n:e:0}function ys(t){return t?ur(gs(t),0,y):0}function vs(t){if("number"==typeof t)return t;if(cs(t))return g;if(ns(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ns(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(st,"");var n=vt.test(t);return n||_t.test(t)?fe(t.slice(2),n?2:8):yt.test(t)?g:+t}function bs(t){return Ii(t,Ms(t))}function _s(t){return null==t?"":ci(t)}var As=ji((function(t,e){if(Oo(e)||Ya(e))Ii(e,js(e),t);else for(var n in e)Dt.call(e,n)&&nr(t,n,e[n])})),ws=ji((function(t,e){Ii(e,Ms(e),t)})),xs=ji((function(t,e,n,r){Ii(e,Ms(e),t,r)})),Es=ji((function(t,e,n,r){Ii(e,js(e),t,r)})),Os=ro(sr);var Ss=$r((function(t,e){t=Ct(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Ao(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=Ms(a),u=-1,l=s.length;++u<l;){var c=s[u],f=t[c];(f===o||Ga(f,Mt[c])&&!Dt.call(t,c))&&(t[c]=a[c])}return t})),Ps=$r((function(t){return t.push(o,to),Se(Ns,o,t)}));function Cs(t,e,n){var r=null==t?o:Er(t,e);return r===o?n:r}function Ts(t,e){return null!=t&&yo(t,e,Tr)}var ks=Gi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),t[e]=n}),nu(ou)),Is=Gi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),Dt.call(t,e)?t[e].push(n):t[e]=[n]}),lo),Ls=$r(Ir);function js(t){return Ya(t)?$n(t):Dr(t)}function Ms(t){return Ya(t)?$n(t,!0):Fr(t)}var Rs=ji((function(t,e,n){Vr(t,e,n)})),Ns=ji((function(t,e,n,r){Vr(t,e,n,r)})),Ds=ro((function(t,e){var n={};if(null==t)return n;var r=!1;e=Me(e,(function(e){return e=_i(e,t),r||(r=e.length>1),e})),Ii(t,oo(t),n),r&&(n=lr(n,7,eo));for(var i=e.length;i--;)hi(n,e[i]);return n}));var Fs=ro((function(t,e){return null==t?{}:function(t,e){return Wr(t,e,(function(e,n){return Ts(t,n)}))}(t,e)}));function Bs(t,e){if(null==t)return{};var n=Me(oo(t),(function(t){return[t]}));return e=lo(e),Wr(t,n,(function(t,n){return e(t,n[0])}))}var zs=$i(js),Us=$i(Ms);function Gs(t){return null==t?[]:Je(t,js(t))}var Vs=Di((function(t,e,n){return e=e.toLowerCase(),t+(n?qs(e):e)}));function qs(t){return Js(_s(t).toLowerCase())}function Hs(t){return(t=_s(t))&&t.replace(wt,rn).replace(te,"")}var Ws=Di((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Xs=Di((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ys=Ni("toLowerCase");var Zs=Di((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ks=Di((function(t,e,n){return t+(n?" ":"")+Js(e)}));var $s=Di((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Js=Ni("toUpperCase");function Qs(t,e,n){return t=_s(t),(e=n?o:e)===o?function(t){return ie.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(pt)||[]}(t):t.match(e)||[]}var tu=$r((function(t,e){try{return Se(t,o,e)}catch(n){return Ja(n)?n:new Ot(n)}})),eu=ro((function(t,e){return Ce(e,(function(e){e=Bo(e),ar(t,e,Ia(t[e],t))})),t}));function nu(t){return function(){return t}}var ru=zi(),iu=zi(!0);function ou(t){return t}function au(t){return Nr("function"==typeof t?t:lr(t,1))}var su=$r((function(t,e){return function(n){return Ir(n,t,e)}})),uu=$r((function(t,e){return function(n){return Ir(t,n,e)}}));function lu(t,e,n){var r=js(e),i=xr(e,r);null!=n||ns(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=xr(e,js(e)));var o=!(ns(n)&&"chain"in n)||!!n.chain,a=Qa(t);return Ce(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=ki(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function cu(){}var fu=qi(Me),hu=qi(ke),pu=qi(Fe);function du(t){return wo(t)?We(Bo(t)):function(t){return function(e){return Er(e,t)}}(t)}var mu=Wi(),gu=Wi(!0);function yu(){return[]}function vu(){return!1}var bu=Vi((function(t,e){return t+e}),0),_u=Zi("ceil"),Au=Vi((function(t,e){return t/e}),1),wu=Zi("floor");var xu,Eu=Vi((function(t,e){return t*e}),1),Ou=Zi("round"),Su=Vi((function(t,e){return t-e}),0);return Un.after=function(t,e){if("function"!=typeof e)throw new It(a);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},Un.ary=Ta,Un.assign=As,Un.assignIn=ws,Un.assignInWith=xs,Un.assignWith=Es,Un.at=Os,Un.before=ka,Un.bind=Ia,Un.bindAll=eu,Un.bindKey=La,Un.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Wa(t)?t:[t]},Un.chain=da,Un.chunk=function(t,e,n){e=(n?Ao(t,e,n):e===o)?1:bn(gs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(ge(i/e));a<i;)u[s++]=ii(t,a,a+=e);return u},Un.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Un.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Re(Wa(n)?ki(n):[n],vr(e,1))},Un.cond=function(t){var e=null==t?0:t.length,n=lo();return t=e?Me(t,(function(t){if("function"!=typeof t[1])throw new It(a);return[n(t[0]),t[1]]})):[],$r((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},Un.conforms=function(t){return function(t){var e=js(t);return function(n){return cr(n,t,e)}}(lr(t,1))},Un.constant=nu,Un.countBy=ya,Un.create=function(t,e){var n=Gn(t);return null==e?n:or(n,e)},Un.curry=function t(e,n,r){var i=Ji(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Un.curryRight=function t(e,n,r){var i=Ji(e,l,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Un.debounce=ja,Un.defaults=Ss,Un.defaultsDeep=Ps,Un.defer=Ma,Un.delay=Ra,Un.difference=Go,Un.differenceBy=Vo,Un.differenceWith=qo,Un.drop=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=n||e===o?1:gs(e))<0?0:e,r):[]},Un.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,0,(e=r-(e=n||e===o?1:gs(e)))<0?0:e):[]},Un.dropRightWhile=function(t,e){return t&&t.length?di(t,lo(e,3),!0,!0):[]},Un.dropWhile=function(t,e){return t&&t.length?di(t,lo(e,3),!0):[]},Un.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Ao(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=gs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:gs(r))<0&&(r+=i),r=n>r?0:ys(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Un.filter=function(t,e){return(Wa(t)?Ie:yr)(t,lo(e,3))},Un.flatMap=function(t,e){return vr(Oa(t,e),1)},Un.flatMapDeep=function(t,e){return vr(Oa(t,e),d)},Un.flatMapDepth=function(t,e,n){return n=n===o?1:gs(n),vr(Oa(t,e),n)},Un.flatten=Xo,Un.flattenDeep=function(t){return(null==t?0:t.length)?vr(t,d):[]},Un.flattenDepth=function(t,e){return(null==t?0:t.length)?vr(t,e=e===o?1:gs(e)):[]},Un.flip=function(t){return Ji(t,512)},Un.flow=ru,Un.flowRight=iu,Un.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Un.functions=function(t){return null==t?[]:xr(t,js(t))},Un.functionsIn=function(t){return null==t?[]:xr(t,Ms(t))},Un.groupBy=wa,Un.initial=function(t){return(null==t?0:t.length)?ii(t,0,-1):[]},Un.intersection=Zo,Un.intersectionBy=Ko,Un.intersectionWith=$o,Un.invert=ks,Un.invertBy=Is,Un.invokeMap=xa,Un.iteratee=au,Un.keyBy=Ea,Un.keys=js,Un.keysIn=Ms,Un.map=Oa,Un.mapKeys=function(t,e){var n={};return e=lo(e,3),Ar(t,(function(t,r,i){ar(n,e(t,r,i),t)})),n},Un.mapValues=function(t,e){var n={};return e=lo(e,3),Ar(t,(function(t,r,i){ar(n,r,e(t,r,i))})),n},Un.matches=function(t){return Ur(lr(t,1))},Un.matchesProperty=function(t,e){return Gr(t,lr(e,1))},Un.memoize=Na,Un.merge=Rs,Un.mergeWith=Ns,Un.method=su,Un.methodOf=uu,Un.mixin=lu,Un.negate=Da,Un.nthArg=function(t){return t=gs(t),$r((function(e){return qr(e,t)}))},Un.omit=Ds,Un.omitBy=function(t,e){return Bs(t,Da(lo(e)))},Un.once=function(t){return ka(2,t)},Un.orderBy=function(t,e,n,r){return null==t?[]:(Wa(e)||(e=null==e?[]:[e]),Wa(n=r?o:n)||(n=null==n?[]:[n]),Hr(t,e,n))},Un.over=fu,Un.overArgs=Fa,Un.overEvery=hu,Un.overSome=pu,Un.partial=Ba,Un.partialRight=za,Un.partition=Sa,Un.pick=Fs,Un.pickBy=Bs,Un.property=du,Un.propertyOf=function(t){return function(e){return null==t?o:Er(t,e)}},Un.pull=Qo,Un.pullAll=ta,Un.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Xr(t,e,lo(n,2)):t},Un.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Xr(t,e,o,n):t},Un.pullAt=ea,Un.range=mu,Un.rangeRight=gu,Un.rearg=Ua,Un.reject=function(t,e){return(Wa(t)?Ie:yr)(t,Da(lo(e,3)))},Un.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=lo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Yr(t,i),n},Un.rest=function(t,e){if("function"!=typeof t)throw new It(a);return $r(t,e=e===o?e:gs(e))},Un.reverse=na,Un.sampleSize=function(t,e,n){return e=(n?Ao(t,e,n):e===o)?1:gs(e),(Wa(t)?Qn:Qr)(t,e)},Un.set=function(t,e,n){return null==t?t:ti(t,e,n)},Un.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:ti(t,e,n,r)},Un.shuffle=function(t){return(Wa(t)?tr:ri)(t)},Un.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Ao(t,e,n)?(e=0,n=r):(e=null==e?0:gs(e),n=n===o?r:gs(n)),ii(t,e,n)):[]},Un.sortBy=Pa,Un.sortedUniq=function(t){return t&&t.length?ui(t):[]},Un.sortedUniqBy=function(t,e){return t&&t.length?ui(t,lo(e,2)):[]},Un.split=function(t,e,n){return n&&"number"!=typeof n&&Ao(t,e,n)&&(e=n=o),(n=n===o?y:n>>>0)?(t=_s(t))&&("string"==typeof e||null!=e&&!ss(e))&&!(e=ci(e))&&sn(t)?wi(dn(t),0,n):t.split(e,n):[]},Un.spread=function(t,e){if("function"!=typeof t)throw new It(a);return e=null==e?0:bn(gs(e),0),$r((function(n){var r=n[e],i=wi(n,0,e);return r&&Re(i,r),Se(t,this,i)}))},Un.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},Un.take=function(t,e,n){return t&&t.length?ii(t,0,(e=n||e===o?1:gs(e))<0?0:e):[]},Un.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=r-(e=n||e===o?1:gs(e)))<0?0:e,r):[]},Un.takeRightWhile=function(t,e){return t&&t.length?di(t,lo(e,3),!1,!0):[]},Un.takeWhile=function(t,e){return t&&t.length?di(t,lo(e,3)):[]},Un.tap=function(t,e){return e(t),t},Un.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new It(a);return ns(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})},Un.thru=ma,Un.toArray=ds,Un.toPairs=zs,Un.toPairsIn=Us,Un.toPath=function(t){return Wa(t)?Me(t,Bo):cs(t)?[t]:ki(Fo(_s(t)))},Un.toPlainObject=bs,Un.transform=function(t,e,n){var r=Wa(t),i=r||Ka(t)||fs(t);if(e=lo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:ns(t)&&Qa(o)?Gn(Yt(t)):{}}return(i?Ce:Ar)(t,(function(t,r,i){return e(n,t,r,i)})),n},Un.unary=function(t){return Ta(t,1)},Un.union=ra,Un.unionBy=ia,Un.unionWith=oa,Un.uniq=function(t){return t&&t.length?fi(t):[]},Un.uniqBy=function(t,e){return t&&t.length?fi(t,lo(e,2)):[]},Un.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?fi(t,o,e):[]},Un.unset=function(t,e){return null==t||hi(t,e)},Un.unzip=aa,Un.unzipWith=sa,Un.update=function(t,e,n){return null==t?t:pi(t,e,bi(n))},Un.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:pi(t,e,bi(n),r)},Un.values=Gs,Un.valuesIn=function(t){return null==t?[]:Je(t,Ms(t))},Un.without=ua,Un.words=Qs,Un.wrap=function(t,e){return Ba(bi(e),t)},Un.xor=la,Un.xorBy=ca,Un.xorWith=fa,Un.zip=ha,Un.zipObject=function(t,e){return yi(t||[],e||[],nr)},Un.zipObjectDeep=function(t,e){return yi(t||[],e||[],ti)},Un.zipWith=pa,Un.entries=zs,Un.entriesIn=Us,Un.extend=ws,Un.extendWith=xs,lu(Un,Un),Un.add=bu,Un.attempt=tu,Un.camelCase=Vs,Un.capitalize=qs,Un.ceil=_u,Un.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=vs(n))===n?n:0),e!==o&&(e=(e=vs(e))===e?e:0),ur(vs(t),e,n)},Un.clone=function(t){return lr(t,4)},Un.cloneDeep=function(t){return lr(t,5)},Un.cloneDeepWith=function(t,e){return lr(t,5,e="function"==typeof e?e:o)},Un.cloneWith=function(t,e){return lr(t,4,e="function"==typeof e?e:o)},Un.conformsTo=function(t,e){return null==e||cr(t,e,js(e))},Un.deburr=Hs,Un.defaultTo=function(t,e){return null==t||t!==t?e:t},Un.divide=Au,Un.endsWith=function(t,e,n){t=_s(t),e=ci(e);var r=t.length,i=n=n===o?r:ur(gs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Un.eq=Ga,Un.escape=function(t){return(t=_s(t))&&J.test(t)?t.replace(K,on):t},Un.escapeRegExp=function(t){return(t=_s(t))&&at.test(t)?t.replace(ot,"\\$&"):t},Un.every=function(t,e,n){var r=Wa(t)?ke:mr;return n&&Ao(t,e,n)&&(e=o),r(t,lo(e,3))},Un.find=va,Un.findIndex=Ho,Un.findKey=function(t,e){return ze(t,lo(e,3),Ar)},Un.findLast=ba,Un.findLastIndex=Wo,Un.findLastKey=function(t,e){return ze(t,lo(e,3),wr)},Un.floor=wu,Un.forEach=_a,Un.forEachRight=Aa,Un.forIn=function(t,e){return null==t?t:br(t,lo(e,3),Ms)},Un.forInRight=function(t,e){return null==t?t:_r(t,lo(e,3),Ms)},Un.forOwn=function(t,e){return t&&Ar(t,lo(e,3))},Un.forOwnRight=function(t,e){return t&&wr(t,lo(e,3))},Un.get=Cs,Un.gt=Va,Un.gte=qa,Un.has=function(t,e){return null!=t&&yo(t,e,Cr)},Un.hasIn=Ts,Un.head=Yo,Un.identity=ou,Un.includes=function(t,e,n,r){t=Ya(t)?t:Gs(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=bn(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ge(t,e,n)>-1},Un.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),Ge(t,e,i)},Un.inRange=function(t,e,n){return e=ms(e),n===o?(n=e,e=0):n=ms(n),function(t,e,n){return t>=_n(e,n)&&t<bn(e,n)}(t=vs(t),e,n)},Un.invoke=Ls,Un.isArguments=Ha,Un.isArray=Wa,Un.isArrayBuffer=Xa,Un.isArrayLike=Ya,Un.isArrayLikeObject=Za,Un.isBoolean=function(t){return!0===t||!1===t||rs(t)&&Sr(t)==A},Un.isBuffer=Ka,Un.isDate=$a,Un.isElement=function(t){return rs(t)&&1===t.nodeType&&!as(t)},Un.isEmpty=function(t){if(null==t)return!0;if(Ya(t)&&(Wa(t)||"string"==typeof t||"function"==typeof t.splice||Ka(t)||fs(t)||Ha(t)))return!t.length;var e=go(t);if(e==S||e==I)return!t.size;if(Oo(t))return!Dr(t).length;for(var n in t)if(Dt.call(t,n))return!1;return!0},Un.isEqual=function(t,e){return jr(t,e)},Un.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?jr(t,e,o,n):!!r},Un.isError=Ja,Un.isFinite=function(t){return"number"==typeof t&&Xe(t)},Un.isFunction=Qa,Un.isInteger=ts,Un.isLength=es,Un.isMap=is,Un.isMatch=function(t,e){return t===e||Mr(t,e,fo(e))},Un.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Mr(t,e,fo(e),n)},Un.isNaN=function(t){return os(t)&&t!=+t},Un.isNative=function(t){if(Eo(t))throw new Ot("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(t)},Un.isNil=function(t){return null==t},Un.isNull=function(t){return null===t},Un.isNumber=os,Un.isObject=ns,Un.isObjectLike=rs,Un.isPlainObject=as,Un.isRegExp=ss,Un.isSafeInteger=function(t){return ts(t)&&t>=-9007199254740991&&t<=m},Un.isSet=us,Un.isString=ls,Un.isSymbol=cs,Un.isTypedArray=fs,Un.isUndefined=function(t){return t===o},Un.isWeakMap=function(t){return rs(t)&&go(t)==M},Un.isWeakSet=function(t){return rs(t)&&"[object WeakSet]"==Sr(t)},Un.join=function(t,e){return null==t?"":yn.call(t,e)},Un.kebabCase=Ws,Un.last=Jo,Un.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=gs(n))<0?bn(r+i,0):_n(i,r-1)),e===e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Ue(t,qe,i,!0)},Un.lowerCase=Xs,Un.lowerFirst=Ys,Un.lt=hs,Un.lte=ps,Un.max=function(t){return t&&t.length?gr(t,ou,Pr):o},Un.maxBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Pr):o},Un.mean=function(t){return He(t,ou)},Un.meanBy=function(t,e){return He(t,lo(e,2))},Un.min=function(t){return t&&t.length?gr(t,ou,Br):o},Un.minBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Br):o},Un.stubArray=yu,Un.stubFalse=vu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Eu,Un.nth=function(t,e){return t&&t.length?qr(t,gs(e)):o},Un.noConflict=function(){return de._===this&&(de._=Gt),this},Un.noop=cu,Un.now=Ca,Un.pad=function(t,e,n){t=_s(t);var r=(e=gs(e))?pn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Hi(ve(i),n)+t+Hi(ge(i),n)},Un.padEnd=function(t,e,n){t=_s(t);var r=(e=gs(e))?pn(t):0;return e&&r<e?t+Hi(e-r,n):t},Un.padStart=function(t,e,n){t=_s(t);var r=(e=gs(e))?pn(t):0;return e&&r<e?Hi(e-r,n)+t:t},Un.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),wn(_s(t).replace(ut,""),e||0)},Un.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Ao(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=ms(t),e===o?(e=t,t=0):e=ms(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=xn();return _n(t+i*(e-t+ce("1e-"+((i+"").length-1))),e)}return Zr(t,e)},Un.reduce=function(t,e,n){var r=Wa(t)?Ne:Ye,i=arguments.length<3;return r(t,lo(e,4),n,i,pr)},Un.reduceRight=function(t,e,n){var r=Wa(t)?De:Ye,i=arguments.length<3;return r(t,lo(e,4),n,i,dr)},Un.repeat=function(t,e,n){return e=(n?Ao(t,e,n):e===o)?1:gs(e),Kr(_s(t),e)},Un.replace=function(){var t=arguments,e=_s(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Un.result=function(t,e,n){var r=-1,i=(e=_i(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[Bo(e[r])];a===o&&(r=i,a=n),t=Qa(a)?a.call(t):a}return t},Un.round=Ou,Un.runInContext=t,Un.sample=function(t){return(Wa(t)?Jn:Jr)(t)},Un.size=function(t){if(null==t)return 0;if(Ya(t))return ls(t)?pn(t):t.length;var e=go(t);return e==S||e==I?t.size:Dr(t).length},Un.snakeCase=Zs,Un.some=function(t,e,n){var r=Wa(t)?Fe:oi;return n&&Ao(t,e,n)&&(e=o),r(t,lo(e,3))},Un.sortedIndex=function(t,e){return ai(t,e)},Un.sortedIndexBy=function(t,e,n){return si(t,e,lo(n,2))},Un.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&Ga(t[r],e))return r}return-1},Un.sortedLastIndex=function(t,e){return ai(t,e,!0)},Un.sortedLastIndexBy=function(t,e,n){return si(t,e,lo(n,2),!0)},Un.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ai(t,e,!0)-1;if(Ga(t[n],e))return n}return-1},Un.startCase=Ks,Un.startsWith=function(t,e,n){return t=_s(t),n=null==n?0:ur(gs(n),0,t.length),e=ci(e),t.slice(n,n+e.length)==e},Un.subtract=Su,Un.sum=function(t){return t&&t.length?Ze(t,ou):0},Un.sumBy=function(t,e){return t&&t.length?Ze(t,lo(e,2)):0},Un.template=function(t,e,n){var r=Un.templateSettings;n&&Ao(t,e,n)&&(e=o),t=_s(t),e=xs({},e,r,Qi);var i,a,s=xs({},e.imports,r.imports,Qi),u=js(s),l=Je(s,u),c=0,f=e.interpolate||xt,h="__p += '",p=Tt((e.escape||xt).source+"|"+f.source+"|"+(f===et?mt:xt).source+"|"+(e.evaluate||xt).source+"|$","g"),d="//# sourceURL="+(Dt.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(p,(function(e,n,r,o,s,u){return r||(r=o),h+=t.slice(c,u).replace(Et,an),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var m=Dt.call(e,"variable")&&e.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(W,""):h).replace(X,"$1").replace(Y,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=tu((function(){return St(u,d+"return "+h).apply(o,l)}));if(g.source=h,Ja(g))throw g;return g},Un.times=function(t,e){if((t=gs(t))<1||t>m)return[];var n=y,r=_n(t,y);e=lo(e),t-=y;for(var i=Ke(r,e);++n<t;)e(n);return i},Un.toFinite=ms,Un.toInteger=gs,Un.toLength=ys,Un.toLower=function(t){return _s(t).toLowerCase()},Un.toNumber=vs,Un.toSafeInteger=function(t){return t?ur(gs(t),-9007199254740991,m):0===t?t:0},Un.toString=_s,Un.toUpper=function(t){return _s(t).toUpperCase()},Un.trim=function(t,e,n){if((t=_s(t))&&(n||e===o))return t.replace(st,"");if(!t||!(e=ci(e)))return t;var r=dn(t),i=dn(e);return wi(r,tn(r,i),en(r,i)+1).join("")},Un.trimEnd=function(t,e,n){if((t=_s(t))&&(n||e===o))return t.replace(lt,"");if(!t||!(e=ci(e)))return t;var r=dn(t);return wi(r,0,en(r,dn(e))+1).join("")},Un.trimStart=function(t,e,n){if((t=_s(t))&&(n||e===o))return t.replace(ut,"");if(!t||!(e=ci(e)))return t;var r=dn(t);return wi(r,tn(r,dn(e))).join("")},Un.truncate=function(t,e){var n=30,r="...";if(ns(e)){var i="separator"in e?e.separator:i;n="length"in e?gs(e.length):n,r="omission"in e?ci(e.omission):r}var a=(t=_s(t)).length;if(sn(t)){var s=dn(t);a=s.length}if(n>=a)return t;var u=n-pn(r);if(u<1)return r;var l=s?wi(s,0,u).join(""):t.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),ss(i)){if(t.slice(u).search(i)){var c,f=l;for(i.global||(i=Tt(i.source,_s(gt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(t.indexOf(ci(i),u)!=u){var p=l.lastIndexOf(i);p>-1&&(l=l.slice(0,p))}return l+r},Un.unescape=function(t){return(t=_s(t))&&$.test(t)?t.replace(Z,mn):t},Un.uniqueId=function(t){var e=++Ft;return _s(t)+e},Un.upperCase=$s,Un.upperFirst=Js,Un.each=_a,Un.eachRight=Aa,Un.first=Yo,lu(Un,(xu={},Ar(Un,(function(t,e){Dt.call(Un.prototype,e)||(xu[e]=t)})),xu),{chain:!1}),Un.VERSION="4.17.15",Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Un[t].placeholder=Un})),Ce(["drop","take"],(function(t,e){Hn.prototype[t]=function(n){n=n===o?1:bn(gs(n),0);var r=this.__filtered__&&!e?new Hn(this):this.clone();return r.__filtered__?r.__takeCount__=_n(n,r.__takeCount__):r.__views__.push({size:_n(n,y),type:t+(r.__dir__<0?"Right":"")}),r},Hn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ce(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Hn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:lo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ce(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Hn.prototype[t]=function(){return this[n](1).value()[0]}})),Ce(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Hn.prototype[t]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(ou)},Hn.prototype.find=function(t){return this.filter(t).head()},Hn.prototype.findLast=function(t){return this.reverse().find(t)},Hn.prototype.invokeMap=$r((function(t,e){return"function"==typeof t?new Hn(this):this.map((function(n){return Ir(n,t,e)}))})),Hn.prototype.reject=function(t){return this.filter(Da(lo(t)))},Hn.prototype.slice=function(t,e){t=gs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Hn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=gs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Hn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Hn.prototype.toArray=function(){return this.take(y)},Ar(Hn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Un[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(Un.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Hn,l=s[0],c=u||Wa(e),f=function(t){var e=i.apply(Un,Re([t],s));return r&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,d=a&&!h,m=u&&!p;if(!a&&c){e=m?e:new Hn(this);var g=t.apply(e,s);return g.__actions__.push({func:ma,args:[f],thisArg:o}),new qn(g,h)}return d&&m?t.apply(this,s):(g=this.thru(f),d?r?g.value()[0]:g.value():g)})})),Ce(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Lt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Un.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Wa(i)?i:[],t)}return this[n]((function(n){return e.apply(Wa(n)?n:[],t)}))}})),Ar(Hn.prototype,(function(t,e){var n=Un[e];if(n){var r=n.name+"";Dt.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:e,func:n})}})),Ln[Ui(o,2).name]=[{name:"wrapper",func:o}],Hn.prototype.clone=function(){var t=new Hn(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Hn.prototype.reverse=function(){if(this.__filtered__){var t=new Hn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Hn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Wa(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=_n(e,t+a);break;case"takeRight":t=bn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,f=c.length,h=0,p=_n(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return mi(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var m=-1,g=t[l+=e];++m<f;){var y=c[m],v=y.iteratee,b=y.type,_=v(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}d[h++]=g}return d},Un.prototype.at=ga,Un.prototype.chain=function(){return da(this)},Un.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===o&&(this.__values__=ds(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Un.prototype.plant=function(t){for(var e,n=this;n instanceof Vn;){var r=Uo(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Un.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Hn){var e=t;return this.__actions__.length&&(e=new Hn(this)),(e=e.reverse()).__actions__.push({func:ma,args:[na],thisArg:o}),new qn(e,this.__chain__)}return this.thru(na)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,ee&&(Un.prototype[ee]=function(){return this}),Un}();de._=gn,(i=function(){return gn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(36),n(484)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(159),i=n(22),o=n(181);class a extends r.a{get x(){return this[0]}set x(t){this[0]=Object(i.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(i.a)(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 Object(i.a)(e)}dot(t){let e=0;for(let n=0;n<this.ELEMENTS;++n)e+=this[n]*t[n];return Object(i.a)(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 Object(o.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(i.a)(this[t])}setComponent(t,e){return Object(o.a)(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))}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(70);e.default=function(t){var e=t.contentType,n=t.viewType;return"item"===n?i.a.createElement(i.a.Fragment,null,i.a.createElement(a.default,null,i.a.createElement("h1",null,"Sorry! There was an issue loading this ",e,".")),i.a.createElement("p",null,"You could try ",i.a.createElement(o.a,{to:"/map/search/"},"searching")," for it, or return to ",i.a.createElement(o.a,{to:"/map/browse/"},"browsing"),".")):"index"===n?i.a.createElement(i.a.Fragment,null,i.a.createElement(a.default,null,i.a.createElement("h1",null,"Sorry! There was an issue loading the ",e," list.")),i.a.createElement("p",null,"You could try a ",i.a.createElement(o.a,{to:"/map/search/"},"search"),", or return to ",i.a.createElement(o.a,{to:"/map/"},"the map root"),".")):i.a.createElement(a.default,null,I18n.t("error"))}},function(t,e,n){"use strict";var r=n(15),i=n(170),o=n(61),a=n(100),s=n(131),u=n(24);const l=Object(s.a)((function({viewport:t,center:e}){return new o.a(t.viewProjectionMatrix).invert().transform(e)})),c=Object(s.a)((function({viewport:t,shadowMatrices:e}){const n=[],r=t.pixelUnprojectionMatrix,i=t.isGeospatial?void 0:1,s=[[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=>function(t,e){const[n,r,i]=t,o=Object(u.o)([n,r,i],e);if(Number.isFinite(i))return o;return[o[0],o[1],0]}(t,r)));for(const u of e){const e=u.clone().translate(new a.a(t.center).negate()),r=s.map((t=>e.transform(t))),i=(new o.a).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(u))}return n})),f=[0,0,0,1],h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];e.a={name:"shadow",dependencies:[i.a],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={})=>"viewport"in t&&(t.drawToShadowMap||t.shadowMaps&&t.shadowMaps.length>0)?function(t,e){const{shadowEnabled:n=!0}=t;if(!n||!t.shadowMatrices||!t.shadowMatrices.length)return{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1};const i={shadow_uDrawShadowMap:Boolean(t.drawToShadowMap),shadow_uUseShadowMap:!!t.shadowMaps&&t.shadowMaps.length>0,shadow_uColor:t.shadowColor||f,shadow_uLightId:t.shadowLightId||0,shadow_uLightCount:t.shadowMatrices.length},o=l({viewport:t.viewport,center:e.project_uCenter}),s=[],u=c({shadowMatrices:t.shadowMatrices,viewport:t.viewport}).slice();for(let l=0;l<t.shadowMatrices.length;l++){const n=u[l],i=n.clone().translate(new a.a(t.viewport.center).negate());e.project_uCoordinateSystem===r.a.LNGLAT&&e.project_uProjectionMode===r.d.WEB_MERCATOR?(u[l]=i,s[l]=o):(u[l]=n.clone().multiplyRight(h),s[l]=i.transform(o))}for(let r=0;r<u.length;r++)i["shadow_uViewProjectionMatrices[".concat(r,"]")]=u[r],i["shadow_uProjectCenters[".concat(r,"]")]=s[r],t.shadowMaps&&t.shadowMaps.length>0?i["shadow_uShadowMap".concat(r)]=t.shadowMaps[r]:i["shadow_uShadowMap".concat(r)]=t.dummyShadowMap;return i}(t,e):{}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model("LocationModel",{type:r.types.string,coordinates:r.types.array(r.types.number,[])}).views((function(t){return{get longitude(){return t.coordinates[0]},get latitude(){return t.coordinates[1]},get centroid(){return"".concat(t.coordinates[0]," ").concat(t.coordinates[1])}}}));e.default=i},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;(u=new Error(e.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e,n){var r,i,o;i=[],void 0===(o="function"===typeof(r=function(){"use strict";function t(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var n={},r={};function i(t,e){var i,o,s;return e?(s=0<=(t>>>=0)&&t<256)&&(o=r[t])?o:(i=a(t,(0|t)<0?-1:0,!0),s&&(r[t]=i),i):(s=-128<=(t|=0)&&t<128)&&(o=n[t])?o:(i=a(t,t<0?-1:0,!1),s&&(n[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?g:m;if(e){if(t<0)return g;if(t>=h)return A}else{if(t<=-p)return w;if(t+1>=p)return _}return t<0?o(-t,e).neg():a(t%f|0,t/f|0,e)}function a(e,n,r){return new t(e,n,r)}t.fromInt=i,t.fromNumber=o,t.fromBits=a;var s=Math.pow;function u(t,e,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return m;if("number"===typeof e?(n=e,e=!1):e=!!e,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return u(t.substring(1),e,n).neg();for(var i=o(s(n,8)),a=m,l=0;l<t.length;l+=8){var c=Math.min(8,t.length-l),f=parseInt(t.substring(l,l+c),n);if(c<8){var h=o(s(n,c));a=a.mul(h).add(o(f))}else a=(a=a.mul(i)).add(o(f))}return a.unsigned=e,a}function l(e){return e instanceof t?e:"number"===typeof e?o(e):"string"===typeof e?u(e):a(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=l;var c=65536,f=c*c,h=f*f,p=h/2,d=i(1<<24),m=i(0);t.ZERO=m;var g=i(0,!0);t.UZERO=g;var y=i(1);t.ONE=y;var v=i(1,!0);t.UONE=v;var b=i(-1);t.NEG_ONE=b;var _=a(-1,2147483647,!1);t.MAX_VALUE=_;var A=a(-1,-1,!0);t.MAX_UNSIGNED_VALUE=A;var w=a(0,-2147483648,!1);t.MIN_VALUE=w;var x=t.prototype;return x.toInt=function(){return this.unsigned?this.low>>>0:this.low},x.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},x.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),n=this.div(e),r=n.mul(e).sub(this);return n.toString(t)+r.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(s(t,6),this.unsigned),a=this,u="";;){var l=a.div(i),c=(a.sub(l.mul(i)).toInt()>>>0).toString(t);if((a=l).isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}},x.getHighBits=function(){return this.high},x.getHighBitsUnsigned=function(){return this.high>>>0},x.getLowBits=function(){return this.low},x.getLowBitsUnsigned=function(){return this.low>>>0},x.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},x.isZero=function(){return 0===this.high&&0===this.low},x.isNegative=function(){return!this.unsigned&&this.high<0},x.isPositive=function(){return this.unsigned||this.high>=0},x.isOdd=function(){return 1===(1&this.low)},x.isEven=function(){return 0===(1&this.low)},x.equals=function(t){return e(t)||(t=l(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&this.high===t.high&&this.low===t.low},x.eq=x.equals,x.notEquals=function(t){return!this.eq(t)},x.neq=x.notEquals,x.lessThan=function(t){return this.comp(t)<0},x.lt=x.lessThan,x.lessThanOrEqual=function(t){return this.comp(t)<=0},x.lte=x.lessThanOrEqual,x.greaterThan=function(t){return this.comp(t)>0},x.gt=x.greaterThan,x.greaterThanOrEqual=function(t){return this.comp(t)>=0},x.gte=x.greaterThanOrEqual,x.compare=function(t){if(e(t)||(t=l(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},x.comp=x.compare,x.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(y)},x.neg=x.negate,x.add=function(t){e(t)||(t=l(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,u=65535&t.high,c=t.low>>>16,f=0,h=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,h+=(p+=i+c)>>>16,f+=(h+=r+u)>>>16,f+=n+s,a((p&=65535)<<16|(d&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},x.subtract=function(t){return e(t)||(t=l(t)),this.add(t.neg())},x.sub=x.subtract,x.multiply=function(t){if(this.isZero())return m;if(e(t)||(t=l(t)),t.isZero())return m;if(this.eq(w))return t.isOdd()?w:m;if(t.eq(w))return this.isOdd()?w:m;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(d)&&t.lt(d))return o(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,u=t.high>>>16,c=65535&t.high,f=t.low>>>16,h=65535&t.low,p=0,g=0,y=0,v=0;return y+=(v+=s*h)>>>16,g+=(y+=i*h)>>>16,y&=65535,g+=(y+=s*f)>>>16,p+=(g+=r*h)>>>16,g&=65535,p+=(g+=i*f)>>>16,g&=65535,p+=(g+=s*c)>>>16,p+=n*h+r*f+i*c+s*u,a((y&=65535)<<16|(v&=65535),(p&=65535)<<16|(g&=65535),this.unsigned)},x.mul=x.multiply,x.divide=function(t){if(e(t)||(t=l(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?g:m;var n,r,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return g;if(t.gt(this.shru(1)))return v;i=g}else{if(this.eq(w))return t.eq(y)||t.eq(b)?w:t.eq(w)?y:(n=this.shr(1).div(t).shl(1)).eq(m)?t.isNegative()?y:b:(r=this.sub(t.mul(n)),i=n.add(r.div(t)));if(t.eq(w))return this.unsigned?g:m;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=m}for(r=this;r.gte(t);){n=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),u=a<=48?1:s(2,a-48),c=o(n),f=c.mul(t);f.isNegative()||f.gt(r);)f=(c=o(n-=u,this.unsigned)).mul(t);c.isZero()&&(c=y),i=i.add(c),r=r.sub(f)}return i},x.div=x.divide,x.modulo=function(t){return e(t)||(t=l(t)),this.sub(this.div(t).mul(t))},x.mod=x.modulo,x.not=function(){return a(~this.low,~this.high,this.unsigned)},x.and=function(t){return e(t)||(t=l(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},x.or=function(t){return e(t)||(t=l(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},x.xor=function(t){return e(t)||(t=l(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},x.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?a(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):a(0,this.low<<t-32,this.unsigned)},x.shl=x.shiftLeft,x.shiftRight=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},x.shr=x.shiftRight,x.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var n=this.high;return t<32?a(this.low>>>t|n<<32-t,n>>>t,this.unsigned):a(32===t?n:n>>>t-32,0,this.unsigned)},x.shru=x.shiftRightUnsigned,x.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},x.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},x.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},x.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},x.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return f}));var r=n(87),i=n(15);const o=Math.PI/180,a=new Float32Array(16),s=new Float32Array(12);function u(t,e,n){const r=e[0]*o,i=e[1]*o,a=e[2]*o,s=Math.sin(a),u=Math.sin(r),l=Math.sin(i),c=Math.cos(a),f=Math.cos(r),h=Math.cos(i),p=n[0],d=n[1],m=n[2];t[0]=p*h*f,t[1]=p*l*f,t[2]=p*-u,t[3]=d*(-l*c+h*u*s),t[4]=d*(h*c+l*u*s),t[5]=d*f*s,t[6]=m*(l*s+h*u*c),t[7]=m*(-h*s+l*u*c),t[8]=m*f*c}function l(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 c={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:i,getOrientation:o,getScale:c,getTranslation:f,getTransformMatrix:h}=this.props,p=Array.isArray(h),d=p&&16===h.length,m=Array.isArray(c),g=Array.isArray(o),y=Array.isArray(f),v=d||!p&&Boolean(h(i[0]));t.constant=v?d:g&&m&&y;const b=t.value;if(t.constant){let e;if(v)a.set(h),e=l(a);else{e=s;u(e,o,c),e.set(f,9)}t.value=new Float32Array(e)}else{let p=e*t.size;const{iterable:_,objectInfo:A}=Object(r.a)(i,e,n);for(const t of _){let e;if(A.index++,v)a.set(d?h:h(t,A)),e=l(a);else{e=s;u(e,g?o:o(t,A),m?c:c(t,A)),e.set(y?f:f(t,A),9)}b[p++]=e[0],b[p++]=e[1],b[p++]=e[2],b[p++]=e[3],b[p++]=e[4],b[p++]=e[5],b[p++]=e[6],b[p++]=e[7],b[p++]=e[8],b[p++]=e[9],b[p++]=e[10],b[p++]=e[11]}}}};function f(t,e){return e===i.a.CARTESIAN||e===i.a.METER_OFFSETS||e===i.a.DEFAULT&&!t.isGeospatial}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u}));var r=n(6),i=n(124),o=n(244);const a="8.5.16";class s{constructor(){this.stats=new Map}get(t){return this.stats.has(t)||this.stats.set(t,new i.a({id:t})),this.stats.get(t)}}const u=new s;if(globalThis.luma&&globalThis.luma.VERSION!==a)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(a));globalThis.luma||(Object(o.a)()&&r.k.log(1,"luma.gl ".concat(a," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),globalThis.luma=globalThis.luma||{VERSION:a,version:a,log:r.k,stats:u,globals:{modules:{},nodeIO:{}}});globalThis.luma},function(t,e){},function(t,e,n){t.exports={EmbedSettings:"EmbedSettings-module__EmbedSettings___2_Bc1",controls:"EmbedSettings-module__controls___J9L3f",demoEmbed:"EmbedSettings-module__demoEmbed___18VAN",loading:"EmbedSettings-module__loading___8J_u5",loaded:"EmbedSettings-module__loaded___234N3",displayMode:"EmbedSettings-module__displayMode___2Z9aP",labelSubstitute:"EmbedSettings-module__labelSubstitute___4ImJr",outputCode:"EmbedSettings-module__outputCode___1yC7A",copyControls:"EmbedSettings-module__copyControls___2Intz",copyResponse:"EmbedSettings-module__copyResponse___3wFRz",spinner:"EmbedSettings-module__spinner___10LIt"}},function(t,e,n){t.exports={Toolbar:"Toolbar-module__Toolbar___2Uhtg",hasPagemakerSiteHeaderForMap:"Toolbar-module__hasPagemakerSiteHeaderForMap___fW5X3",wrap:"Toolbar-module__wrap___1H8zj",lowerItem:"Toolbar-module__lowerItem___2ZyPf",mobileOverflowMenuItem:"Toolbar-module__mobileOverflowMenuItem___r3bZ_",introButton:"Toolbar-module__introButton___3KDxf",browseButton:"Toolbar-module__browseButton___15lhv",searchButton:"Toolbar-module__searchButton___11PQx",overlaysButton:"Toolbar-module__overlaysButton___3INmu",trailsButton:"Toolbar-module__trailsButton___3-tZ2",helpButton:"Toolbar-module__helpButton___3v5nu",contributeButton:"Toolbar-module__contributeButton___KMYGQ",overflowButton:"Toolbar-module__overflowButton___2shK3",languageButton:"Toolbar-module__languageButton___3cg-M"}},function(t,e,n){t.exports={MediaGallerySketchfabEmbed:"MediaGallerySketchfabEmbed-module__MediaGallerySketchfabEmbed___37Vn8",sidebar:"MediaGallerySketchfabEmbed-module__sidebar___DeOsH",pane:"MediaGallerySketchfabEmbed-module__pane___1f4QE",caption:"MediaGallerySketchfabEmbed-module__caption___3LylR",transcription:"MediaGallerySketchfabEmbed-module__transcription___2-piS",attribution:"MediaGallerySketchfabEmbed-module__attribution___3ACnu",item:"MediaGallerySketchfabEmbed-module__item___1uLvd"}},function(t,e,n){"use strict";n.r(e),n.d(e,"hexToRGB",(function(){return r}));var r=function(t){var e=0,n=0,r=0;if(4===t.length)e="0x"+t[1]+t[1],n="0x"+t[2]+t[2],r="0x"+t[3]+t[3];else{if(7!==t.length)return[255,0,0];e="0x"+t[1]+t[2],n="0x"+t[3]+t[4],r="0x"+t[5]+t[6]}return[+e,+n,+r]}},function(t,e,n){(function(e){var n;"undefined"!==typeof self&&self,n=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),s=n(46),u=n(47),l=n(48),c=n(49),f=n(12),h=n(32),p=n(33),d=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:l.default,Scroll:a.default,Block:u.default,Inline:s.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:p.default,Store:d.default}};e.default=g},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=o;var a,s={},u={},l={},c={};function f(t,e){var n;if(void 0===e&&(e=a.ANY),"string"===typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"===typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||l[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new o("Unable to create "+t+" blot");var r=n,i=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(i,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=f,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var r=e[0];if("string"!==typeof r.blotName&&"string"!==typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");if(c[r.blotName||r.attrName]=r,"string"===typeof r.keyName)s[r.keyName]=r;else if(null!=r.className&&(u[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase();var i=Array.isArray(r.tagName)?r.tagName:[r.tagName];i.forEach((function(t){null!=l[t]&&null!=r.className||(l[t]=r)}))}return r}},function(t,e,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),u=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};u.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},u.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},u.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},u.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"===typeof n){if("number"===typeof t.delete&&"number"===typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"===typeof n.delete&&null!=t.insert&&(e-=1,"object"!==typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"===typeof t.insert&&"string"===typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"===typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"===typeof t.retain&&"number"===typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"===typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},u.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},u.prototype.filter=function(t){return this.ops.filter(t)},u.prototype.forEach=function(t){this.ops.forEach(t)},u.prototype.map=function(t){return this.ops.map(t)},u.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},u.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},u.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},u.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},u.prototype.slice=function(t,e){t=t||0,"number"!==typeof e&&(e=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i<e&&r.hasNext();){var o;i<t?o=r.next(t-i):(o=r.next(e-i),n.push(o)),i+=a.length(o)}return new u(n)},u.prototype.compose=function(t){var e=a.iterator(this.ops),n=a.iterator(t.ops),r=[],o=n.peek();if(null!=o&&"number"===typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===e.peekType()&&e.peekLength()<=s;)s-=e.peekLength(),r.push(e.next());o.retain-s>0&&n.next(o.retain-s)}for(var l=new u(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===e.peekType())l.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),h=n.next(c);if("number"===typeof h.retain){var p={};"number"===typeof f.retain?p.retain=c:p.insert=f.insert;var d=a.attributes.compose(f.attributes,h.attributes,"number"===typeof f.retain);if(d&&(p.attributes=d),l.push(p),!n.hasNext()&&i(l.ops[l.ops.length-1],p)){var m=new u(e.rest());return l.concat(m).chop()}}else"number"===typeof h.delete&&"number"===typeof f.retain&&l.push(h)}return l.chop()},u.prototype.concat=function(t){var e=new u(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},u.prototype.diff=function(t,e){if(this.ops===t.ops)return new u;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new u,l=r(n[0],n[1],e),c=a.iterator(this.ops),f=a.iterator(t.ops);return l.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),o.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var s=c.next(n),u=f.next(n);i(s.insert,u.insert)?o.retain(n,a.attributes.diff(s.attributes,u.attributes)):o.push(u).delete(n)}e-=n}})),o.chop()},u.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),r=new u,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),l="string"===typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new u}}r.length()>0&&t(r,{},i)},u.prototype.transform=function(t,e){if(e=!!e,"number"===typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),r=a.iterator(t.ops),i=new u;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),l=r.next(o);if(s.delete)continue;l.delete?i.push(l):i.retain(o,a.attributes.transform(s.attributes,l.attributes,e))}else i.retain(a.length(n.next()));return i.chop()},u.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<t||!e)&&(t+=i),r+=i):t-=Math.min(i,t-r)}return t},t.exports=u},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(t){return"function"===typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},s=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e,i=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!i&&!o)return!1;for(e in t);return"undefined"===typeof e||n.call(t,e)},u=function(t,e){i&&"__proto__"===e.name?i(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},l=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(o)return o(t,e).value}return t[e]};t.exports=function t(){var e,n,r,i,o,c,f=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"===typeof f&&(d=f,f=arguments[1]||{},h=2),(null==f||"object"!==typeof f&&"function"!==typeof f)&&(f={});h<p;++h)if(null!=(e=arguments[h]))for(n in e)r=l(f,n),f!==(i=l(e,n))&&(d&&i&&(s(i)||(o=a(i)))?(o?(o=!1,c=r&&a(r)?r:[]):c=r&&s(r)?r:{},u(f,{name:n,newValue:t(d,c,i)})):"undefined"!==typeof i&&u(f,{name:n,newValue:i}));return f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=f(n(3)),a=f(n(2)),s=f(n(0)),u=f(n(16)),l=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function d(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),r(e,[{key:"attach",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=s.default.query(t,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,n,r){if("string"===typeof n&&n.endsWith("\n")){var o=s.default.create(g.blotName);this.parent.insertBefore(o,0===t?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)}}]),e}(s.default.Embed);m.scope=s.default.Scope.BLOCK_BLOT;var g=function(t){function e(t){h(this,e);var n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return d(e,t),r(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),y(e))}),new a.default).insert("\n",y(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,r,o){n<=0||(s.default.query(r,s.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,o):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,o),this.cache={})}},{key:"insertAt",value:function(t,n,r){if(null!=r)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(t<this.length()-1||null==this.children.tail?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;o.reduce((function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length}),t+a.length)}}},{key:"insertBefore",value:function(t,n){var r=this.children.head;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),r instanceof u.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(s.default.Block);function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"===typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:y(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[l.default,s.default.Embed,c.default],e.bubbleFormats=y,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(50);var a=g(n(2)),s=g(n(14)),u=g(n(8)),l=g(n(9)),c=g(n(0)),f=n(15),h=g(f),p=g(n(3)),d=g(n(10)),m=g(n(34));function g(t){return t&&t.__esModule?t:{default:t}}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var b=(0,d.default)("quill"),_=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(v(this,t),this.options=A(e,r),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u.default.events.EDITOR_CHANGE,(function(t){t===u.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(u.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;w.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),d.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&b.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof t){var i=t.attrName||t.blotName;"string"===typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"===typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=x(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;return w.call(this,(function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(t,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,y({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,y({},t,e))}return n.setSelection(r,u.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(t,e,n,r,o){var a,s=this,u=x(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],w.call(this,(function(){return s.editor.formatLine(t,e,a)}),o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var a,s=this,u=x(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],w.call(this,(function(){return s.editor.formatText(t,e,a)}),o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"===typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!==typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),o,e)}},{key:"insertText",value:function(t,e,n,r,o){var a,s=this,u=x(t,0,n,r,o),l=i(u,4);return t=l[0],a=l[2],o=l[3],w.call(this,(function(){return s.editor.insertText(t,e,a)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=x(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return w.call(this,(function(){t=new a.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),o=i.ops[i.ops.length-1];return null!=o&&"string"===typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=x(e,n,r),a=i(o,4);e=a[0],n=a[1],r=a[3],this.selection.setRange(new f.Range(e,n),r),r!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return w.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function A(t,e){if((e=(0,p.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==_.DEFAULTS.theme){if(e.theme=_.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,p.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=_.import("modules/"+e);return null==n?b.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,p.default)(!0,{},_.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"===typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function w(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===u.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=E(i,s,e):0!==r&&(i=E(i,n,r,e)),this.setSelection(i,u.default.sources.SILENT)),s.length()>0){var l,c,f=[u.default.events.TEXT_CHANGE,s,o,e];(l=this.emitter).emit.apply(l,[u.default.events.EDITOR_CHANGE].concat(f)),e!==u.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return s}function x(t,e,n,i,o){var a={};return"number"===typeof t.index&&"number"===typeof t.length?"number"!==typeof e?(o=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!==typeof e&&(o=i,i=n,n=e,e=0),"object"===("undefined"===typeof n?"undefined":r(n))?(a=n,o=i):"string"===typeof n&&(null!=i?a[n]=i:o=n),[t,e,a,o=o||u.default.sources.API]}function E(t,e,n,r){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var l=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==u.default.sources.USER)})),c=i(l,2);o=c[0],s=c[1]}else{var h=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&r===u.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),p=i(h,2);o=p[0],s=p[1]}return new f.Range(o,s-o)}_.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},_.events=u.default.events,_.sources=u.default.sources,_.version="1.3.7",_.imports={delta:a.default,parchment:c.default,"core/module":l.default,"core/theme":m.default},e.expandConfig=A,e.overload=x,e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(7)),a=s(n(0));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var c=function(t){function e(){return u(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"formatAt",value:function(t,n,r,o){if(e.compare(this.statics.blotName,r)<0&&a.default.query(r,a.default.Scope.BLOT)){var s=this.isolate(t,n);o&&s.wrap(r,o)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o)}},{key:"optimize",value:function(t){if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}}]),e}(a.default.Inline);c.allowedChildren=[c,a.default.Embed,o.default],c.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(0);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var s=function(t){function e(){return o(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=i)&&r.__esModule?r:{default:r}).default.Text);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=a(n(54));function a(t){return t&&t.__esModule?t:{default:t}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var u=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",s.error),t}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"emit",value:function(){s.log.apply(s,arguments),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.listeners[t.type]||[]).forEach((function(e){var r=e.node,i=e.handler;(t.target===r||r.contains(t.target))&&i.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(o.default);u.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},u.sources={API:"api",SILENT:"silent",USER:"user"},e.default=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(t){if(r.indexOf(t)<=r.indexOf(i)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(e=console)[t].apply(e,o)}}function a(t){return r.reduce((function(e,n){return e[n]=o.bind(console,n,t),e}),{})}o.level=a.level=function(t){i=t},e.default=a},function(t,e,n){var r=Array.prototype.slice,i=n(52),o=n(53),a=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var l,c;if(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=r.call(t),e=r.call(e),a(t,e,n));if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(l=0;l<t.length;l++)if(t[l]!==e[l])return!1;return!0}try{var f=i(t),h=i(e)}catch(p){return!1}if(f.length!=h.length)return!1;for(f.sort(),h.sort(),l=f.length-1;l>=0;l--)if(f[l]!=h[l])return!1;for(l=f.length-1;l>=0;l--)if(c=f[l],!a(t[c],e[c],n))return!1;return typeof t===typeof e}(t,e,n))};function s(t){return null===t||void 0===t}function u(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&"function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"===typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=f(n(2)),s=f(n(0)),u=f(n(4)),l=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function d(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),e}(l.default);m.blotName="code",m.tagName="CODE";var g=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),i(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new a.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var i=this.descendant(c.default,this.length()-1),a=r(i,1)[0];null!=a&&a.deleteAt(a.length()-1,1),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,r,i){if(0!==n&&null!=s.default.query(r,s.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+n)){var a=this.newlineIndex(t,!0)+1,u=o-a+1,l=this.isolate(a,u),c=l.next;l.format(r,i),c instanceof e&&c.formatAt(0,t-a+n-u,r,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(c.default,t),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(u.default);g.blotName="code-block",g.tagName="PRE",g.TAB="  ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=y(n(2)),s=y(n(20)),u=y(n(0)),l=y(n(13)),c=y(n(24)),f=n(4),h=y(f),p=y(n(16)),d=y(n(21)),m=y(n(11)),g=y(n(3));function y(t){return t&&t.__esModule?t:{default:t}}var v=/^[ -~]*$/,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return o(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,d.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,d.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"===typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new a.default)}(t)).reduce((function(t,a){var l=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"===typeof a.insert){var p=a.insert;p.endsWith("\n")&&n&&(n=!1,p=p.slice(0,-1)),t>=o&&!p.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,p);var d=e.scroll.line(t),m=i(d,2),y=m[0],v=m[1],b=(0,g.default)({},(0,f.bubbleFormats)(y));if(y instanceof h.default){var _=y.descendant(u.default.Leaf,v),A=i(_,1)[0];b=(0,g.default)(b,(0,f.bubbleFormats)(A))}c=s.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var w=Object.keys(a.insert)[0];if(null==w)return t;e.scroll.insertAt(t,w,a.insert[w])}o+=l}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,l,n,c[n])})),t+l}),0),t.reduce((function(t,n){return"number"===typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach((function(e){var o=e.length();if(e instanceof l.default){var s=t-e.offset(n.scroll),u=e.newlineIndex(s+a)-s+1;e.formatAt(s,u,i,r[i])}else e.format(i,r[i]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])})),this.update((new a.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=i(t,1)[0];e instanceof h.default?n.push(e):e instanceof u.default.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(u.default.Leaf,t,e));var o=[n,r].map((function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,f.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"===typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new a.default).retain(t).insert(e,(0,d.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===h.default.blotName&&!(t.children.length>1)&&t.children.head instanceof p.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=i(r,2),s=o[0],u=o[1],c=0,f=new a.default;null!=s&&(c=s instanceof l.default?s.newlineIndex(u)-u+1:s.length()-u,f=s.delta().slice(u,u+c-1).insert("\n"));var h=this.getContents(t,e+c).diff((new a.default).insert(n).concat(f)),p=(new a.default).retain(t).concat(h);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(v)&&u.default.find(e[0].target)){var i=u.default.find(e[0].target),o=(0,f.bubbleFormats)(i),s=i.offset(this.scroll),l=e[0].oldValue.replace(c.default.CONTENTS,""),h=(new a.default).insert(l),p=(new a.default).insert(i.value()),d=(new a.default).retain(s).concat(h.diff(p,n));t=d.reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new a.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=l(n(0)),a=l(n(21)),s=l(n(11)),u=l(n(8));function l(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var h=(0,l(n(10)).default)("quill:selection"),p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},d=function(){function t(e,n){var r=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,u.default.sources.USER),1)})),this.emitter.on(u.default.events.EDITOR_CHANGE,(function(t,e){t===u.default.events.TEXT_CHANGE&&e.length()>0&&r.update(u.default.sources.SILENT)})),this.emitter.on(u.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(u.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}}))}})),this.emitter.on(u.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}})),this.update(u.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(u.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,o=this.scroll.leaf(t),a=r(o,2),s=a[0],u=a[1];if(null==s)return null;var l=s.position(u,!0),c=r(l,2);i=c[0],u=c[1];var f=document.createRange();if(e>0){f.setStart(i,u);var h=this.scroll.leaf(t+e),p=r(h,2);if(s=p[0],u=p[1],null==s)return null;var d=s.position(u,!0),m=r(d,2);return i=m[0],u=m[1],f.setEnd(i,u),f.getBoundingClientRect()}var g="left",y=void 0;return i instanceof Text?(u<i.data.length?(f.setStart(i,u),f.setEnd(i,u+1)):(f.setStart(i,u-1),f.setEnd(i,u),g="right"),y=f.getBoundingClientRect()):(y=s.domNode.getBoundingClientRect(),u>0&&(g="right")),{bottom:y.top+y.height,height:y.height,left:y[g],right:y[g],top:y.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=r(t,2),i=n[0],a=n[1],s=o.default.find(i,!0),u=s.offset(e.scroll);return 0===a?u:s instanceof o.default.Container?u+s.length():u+s.index(i,a)})),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(i)));return new p(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),u=r(s,2),l=u[0],c=u[1],f=l.position(c,0!==n),h=r(f,2);a=h[0],c=h[1],i.push(a,c)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,i)),a=r(o,1)[0],s=a;if(e.length>0){var u=this.scroll.line(Math.min(e.index+e.length,i));s=r(u,1)[0]}if(null!=a&&null!=s){var l=t.getBoundingClientRect();n.top<l.top?t.scrollTop-=l.top-n.top:n.bottom>l.bottom&&(t.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"===typeof e&&(n=e,e=!1),h.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],l=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=l&&l.native.collapsed&&l.start.node!==this.cursor.textNode&&this.cursor.restore();var f,h=[u.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[u.default.events.EDITOR_CHANGE].concat(h)),t!==u.default.sources.SILENT&&(f=this.emitter).emit.apply(f,h)}}}]),t}();function m(t,e){try{e.parentNode}catch(n){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=p,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var l=function(t){function e(){return s(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"insertInto",value:function(t,n){0===t.children.length?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default.Embed);l.blotName="break",l.tagName="BR",e.default=l},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(44),a=n(30),s=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=l(e);t.insertBefore(n,t.children.head||void 0)}catch(r){if(r instanceof s.ParchmentError)return;throw r}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var r=this.children.find(n),i=r[0],o=r[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,o]:i instanceof e?i.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,(function(n,r,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,o))),o-=a})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),i=r[0],o=r[1];if(i)i.insertAt(o,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),i=r[0],o=r[1],a=[[this,t]];return i instanceof e?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,i){t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],i=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),r.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var r=l(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))}))},e}(a.default);function l(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=u},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),a=n(31),s=n(17),u=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new a.default(n.domNode),n}return i(e,t),e.formats=function(t){return"string"===typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=u.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var i=t.prototype.wrap.call(this,n,r);return i instanceof e&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},e}(s.default);e.default=l},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(30),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var r=n(11),i=n(3),o={attributes:{compose:function(t,e,n){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});var r=i(!0,{},e);for(var o in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,i){return r(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!==typeof t)return e;if("object"===typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"===typeof t.delete?t.delete:"number"===typeof t.retain?t.retain:"string"===typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=o.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"===typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"===typeof e.retain?i.retain=t:"string"===typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"===typeof this.ops[this.index].delete?"delete":"number"===typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=o},function(t,n){var r=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,r,i;try{n=Map}catch(u){n=function(){}}try{r=Set}catch(u){r=function(){}}try{i=Promise}catch(u){i=function(){}}function o(a,u,l,c,f){"object"===typeof u&&(l=u.depth,c=u.prototype,f=u.includeNonEnumerable,u=u.circular);var h=[],p=[],d="undefined"!=typeof e;return"undefined"==typeof u&&(u=!0),"undefined"==typeof l&&(l=1/0),function a(l,m){if(null===l)return null;if(0===m)return l;var g,y;if("object"!=typeof l)return l;if(t(l,n))g=new n;else if(t(l,r))g=new r;else if(t(l,i))g=new i((function(t,e){l.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(o.__isArray(l))g=[];else if(o.__isRegExp(l))g=new RegExp(l.source,s(l)),l.lastIndex&&(g.lastIndex=l.lastIndex);else if(o.__isDate(l))g=new Date(l.getTime());else{if(d&&e.isBuffer(l))return g=e.allocUnsafe?e.allocUnsafe(l.length):new e(l.length),l.copy(g),g;t(l,Error)?g=Object.create(l):"undefined"==typeof c?(y=Object.getPrototypeOf(l),g=Object.create(y)):(g=Object.create(c),y=c)}if(u){var v=h.indexOf(l);if(-1!=v)return p[v];h.push(l),p.push(g)}for(var b in t(l,n)&&l.forEach((function(t,e){var n=a(e,m-1),r=a(t,m-1);g.set(n,r)})),t(l,r)&&l.forEach((function(t){var e=a(t,m-1);g.add(e)})),l){var _;y&&(_=Object.getOwnPropertyDescriptor(y,b)),_&&null==_.set||(g[b]=a(l[b],m-1))}if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(l);for(b=0;b<A.length;b++){var w=A[b];(!(E=Object.getOwnPropertyDescriptor(l,w))||E.enumerable||f)&&(g[w]=a(l[w],m-1),E.enumerable||Object.defineProperty(g,w,{enumerable:!1}))}}if(f){var x=Object.getOwnPropertyNames(l);for(b=0;b<x.length;b++){var E,O=x[b];(E=Object.getOwnPropertyDescriptor(l,O))&&E.enumerable||(g[O]=a(l[O],m-1),Object.defineProperty(g,O,{enumerable:!1}))}}return g}(a,l)}function a(t){return Object.prototype.toString.call(t)}function s(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return o.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},o.__objToStr=a,o.__isDate=function(t){return"object"===typeof t&&"[object Date]"===a(t)},o.__isArray=function(t){return"object"===typeof t&&"[object Array]"===a(t)},o.__isRegExp=function(t){return"object"===typeof t&&"[object RegExp]"===a(t)},o.__getRegExpFlags=s,o}();"object"===typeof t&&t.exports&&(t.exports=r)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=p(n(0)),s=p(n(8)),u=n(4),l=p(u),c=p(n(16)),f=p(n(13)),h=p(n(25));function p(t){return t&&t.__esModule?t:{default:t}}function d(t){return t instanceof l.default||t instanceof u.BlockEmbed}var m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),r.optimize(),r.enable(),r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var i=this.line(t),a=r(i,2),s=a[0],l=a[1],h=this.line(t+n),p=r(h,1)[0];if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=p&&s!==p&&l>0){if(s instanceof u.BlockEmbed||p instanceof u.BlockEmbed)return void this.optimize();if(s instanceof f.default){var d=s.newlineIndex(s.length(),!0);if(d>-1&&(s=s.split(d+1))===p)return void this.optimize()}else if(p instanceof f.default){var m=p.newlineIndex(0);m>-1&&p.split(m+1)}var g=p.children.head instanceof c.default?null:p.children.head;s.moveChildren(p,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(t),t=r}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(d,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,r){var i=[],o=r;return e.children.forEachAt(n,r,(function(e,n,r){d(e)?i.push(e):e instanceof a.default.Container&&(i=i.concat(t(e,n,o))),o-=r})),i};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"===typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[l.default,u.BlockEmbed,h.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var r="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=m(n(21)),s=m(n(11)),u=m(n(3)),l=m(n(2)),c=m(n(20)),f=m(n(0)),h=m(n(5)),p=m(n(10)),d=m(n(9));function m(t){return t&&t.__esModule?t:{default:t}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=(0,p.default)("quill:keyboard"),v=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.bindings={},Object.keys(r.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&r.options.bindings[e]&&r.addBinding(r.options.bindings[e])})),r.addBinding({key:e.keys.ENTER,shiftKey:null},E),r.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},A),r.addBinding({key:e.keys.DELETE},{collapsed:!0},w)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},A),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},w)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},x),r.addBinding({key:e.keys.DELETE},{collapsed:!1},x),r.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},A),r.listen(),r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"match",value:function(t,e){return e=P(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),o(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=P(t);if(null==r||null==r.key)return y.warn("Attempted to add invalid keyboard binding",r);"function"===typeof e&&(e={handler:e}),"function"===typeof n&&(n={handler:n}),r=(0,u.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var u=t.quill.getSelection();if(null!=u&&t.quill.hasFocus()){var l=t.quill.getLine(u.index),c=i(l,2),h=c[0],p=c[1],d=t.quill.getLeaf(u.index),m=i(d,2),g=m[0],y=m[1],v=0===u.length?[g,y]:t.quill.getLeaf(u.index+u.length),b=i(v,2),_=b[0],A=b[1],w=g instanceof f.default.Text?g.value().slice(0,y):"",x=_ instanceof f.default.Text?_.value().slice(A):"",E={collapsed:0===u.length,empty:0===u.length&&h.length()<=1,format:t.quill.getFormat(u),offset:p,prefix:w,suffix:x};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==E.collapsed)return!1;if(null!=e.empty&&e.empty!==E.empty)return!1;if(null!=e.offset&&e.offset!==E.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==E.format[t]})))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=E.format[t]:!1===e.format[t]?null==E.format[t]:(0,s.default)(e.format[t],E.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(E.prefix))&&!(null!=e.suffix&&!e.suffix.test(E.suffix))&&!0!==e.handler.call(t,u,E)}))&&n.preventDefault()}}}}))}}]),e}(d.default);function _(t,e){var n,r=t===b.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},r,/^$/),g(n,"handler",(function(n){var r=n.index;t===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof f.default.Embed)||(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),!1)})),n}function A(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=i(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var u=r.formats(),l=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(u,l)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,h.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-f,f,o,h.default.sources.USER),this.quill.focus()}}function w(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(t.index),s=i(a,1)[0];if(e.offset>=s.length()-1){var u=this.quill.getLine(t.index+1),l=i(u,1)[0];if(l){var f=s.formats(),p=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(f,p)||{},o=l.length()}}this.quill.deleteText(t.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+o-1,n,r,h.default.sources.USER)}}function x(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),i=e[e.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(t,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,h.default.sources.USER),this.quill.setSelection(t.index,h.default.sources.SILENT),this.quill.focus()}function E(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],h.default.sources.USER))}))}function O(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),r=e.index,o=e.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),u=s[0],l=s[1];if(null!=u){var c=this.quill.getIndex(u),p=u.newlineIndex(l,!0)+1,d=u.newlineIndex(c+l+o),m=u.domNode.textContent.slice(p,d).split("\n");l=0,m.forEach((function(e,i){t?(u.insertAt(p+l,n.TAB),l+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(u.deleteAt(p+l,n.TAB.length),l-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),l+=e.length+1})),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,o,h.default.sources.SILENT)}}}}function S(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],h.default.sources.USER)}}}function P(t){if("string"===typeof t||"number"===typeof t)return P({key:t});if("object"===("undefined"===typeof t?"undefined":r(t))&&(t=(0,a.default)(t,!1)),"string"===typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[v]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:S("bold"),italic:S("italic"),underline:S("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":O(!0),"outdent code-block":O(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,h.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new l.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,h.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,h.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(0,u.default)({},r.formats(),{list:"checked"}),s=(new l.default).retain(t.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=i(n,2),o=r[0],a=r[1],s=(new l.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var u=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":u="unchecked";break;case"[x]":u="checked";break;case"-":case"*":u="bullet";break;default:u="ordered"}this.quill.insertText(t.index," ",h.default.sources.USER),this.quill.history.cutoff();var c=(new l.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:u});this.quill.updateContents(c,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,h.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(new l.default).retain(t.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,h.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=u(n(0)),s=u(n(7));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.selection=n,r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"value",value:function(){}}]),o(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var r=this,o=0;null!=r&&r.statics.scope!==a.default.Scope.BLOCK_BLOT;)o+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=e.CONTENTS.length,r.optimize(),r.formatAt(o,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),i=void 0,o=void 0,u=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var l=[t,n.start.offset,n.end.offset];i=l[0],o=l[1],u=l[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof s.default?(i=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var f=[o,u].map((function(t){return Math.max(0,Math.min(i.data.length,t-1))})),h=r(f,2);return o=h[0],u=h[1],{startNode:i,startOffset:o,endNode:i,endOffset:u}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){return""}}]),e}(a.default.Embed);l.blotName="cursor",l.className="ql-cursor",l.tagName="span",l.CONTENTS="\ufeff",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(0)),i=n(4),o=a(i);function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var l=function(t){function e(){return s(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(r.default.Container);l.allowedChildren=[o.default,i.BlockEmbed,l],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var c=function(t){function e(){return u(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"value",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):n}}]),e}(s.default.Attributor.Style),f=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),h=new c("color","color",{scope:s.default.Scope.INLINE});e.ColorAttributor=c,e.ColorClass=f,e.ColorStyle=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var l=function(t){function e(){return s(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return c(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);function c(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=l,e.sanitize=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="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},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(23)),a=s(n(107));function s(t){return t&&t.__esModule?t:{default:t}}var u=0;function l(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return i(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),l(this.label,"aria-expanded"),l(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case o.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=a.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var r=t.buildItem(n);e.appendChild(r),!0===n.selected&&t.selectItem(r)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"===typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"===typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(n(0)),i=y(n(5)),o=n(4),a=y(o),s=y(n(16)),u=y(n(25)),l=y(n(24)),c=y(n(35)),f=y(n(6)),h=y(n(22)),p=y(n(7)),d=y(n(55)),m=y(n(42)),g=y(n(23));function y(t){return t&&t.__esModule?t:{default:t}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":u.default,"blots/cursor":l.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":h.default,"blots/text":p.default,"modules/clipboard":d.default,"modules/history":m.default,"modules/keyboard":g.default}),r.default.register(a.default,s.default,l.default,f.default,h.default,p.default),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"===typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"===typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var o=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),o=this.split(t);this.parent.insertBefore(i,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"===typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"===typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return r(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();i.DEFAULTS={modules:{}},i.themes={default:i},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var u="\ufeff",l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(u),n.rightGuard=document.createTextNode(u),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,r=t.data.split(u).join("");if(t===this.leftGuard)if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,r),e={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data=u,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var r=n.restore(t.target);r&&(e.range=r)}}))}}]),e}(o.default.Embed);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new o.default.Attributor.Attribute("align","align",a),u=new o.default.Attributor.Class("align","ql-align",a),l=new o.default.Attributor.Style("align","text-align",a);e.AlignAttribute=s,e.AlignClass=u,e.AlignStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a=n(26),s=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),u=new a.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});e.BackgroundClass=s,e.BackgroundStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},s=new o.default.Attributor.Attribute("direction","dir",a),u=new o.default.Attributor.Class("direction","ql-direction",a),l=new o.default.Attributor.Style("direction","direction",a);e.DirectionAttribute=s,e.DirectionClass=u,e.DirectionStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var c={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},f=new s.default.Attributor.Class("font","ql-font",c),h=function(t){function e(){return u(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"value",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(s.default.Attributor.Style),p=new h("font","font-family",c);e.FontStyle=p,e.FontClass=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=a,e.SizeStyle=s},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,(function(t,e,n,i){t!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(e):r.record(e,n))})),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],o.default.sources.USER),this.ignoreChange=!1;var r=u(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function u(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"===typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=i.default.query(t,i.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=d(n(3)),a=d(n(2)),s=d(n(8)),u=d(n(23)),l=d(n(34)),c=d(n(59)),f=d(n(60)),h=d(n(28)),p=d(n(61));function d(t){return t&&t.__esModule?t:{default:t}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function y(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],_=[!1,"serif","monospace"],A=["1","2","3",!1],w=["small",!1,"large","huge"],x=function(t){function e(t,n){m(this,e);var r=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),r}return y(e,t),r(e,[{key:"addModule",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"===typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&O(t,v),new f.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&O(t,b,"background"===n?"#ffffff":"#000000"),new c.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?O(t,_):t.classList.contains("ql-header")?O(t,A):t.classList.contains("ql-size")&&O(t,w)),new h.default(t)})),this.quill.on(s.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(l.default);x.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new a.default).retain(r.index).delete(r.length).insert({image:n.target.result}),s.default.sources.USER),t.quill.setSelection(r.index+1,s.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var E=function(t){function e(t,n){m(this,e);var r=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return y(e,t),r(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){u.default.match(e,"enter")?(t.save(),e.preventDefault()):u.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",s.default.sources.USER),this.quill.setSelection(o+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(p.default);function O(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}e.BaseTooltip=E,e.default=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(t<i||e&&t===i&&(null==n.next||0!==n.next.length()))return[n,t];t-=i}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var r,i=this.find(t),o=i[0],a=t-i[1],s=this.iterator(o);(r=s())&&a<t+e;){var u=r.length();t>a?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,i){this.update(),t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},u=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(u),t.optimize(n))},l=e,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(u),i=(l=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=u},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var r=a.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e),o=a.create(n,r);i.parent.insertBefore(o,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)===!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!==typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!==typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(e=n[o],t.call(i,e,o,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1;function r(t,e,u){if(t==e)return t?[[0,t]]:[];(u<0||t.length<u)&&(u=null);var c=o(t,e),f=t.substring(0,c);c=a(t=t.substring(c),e=e.substring(c));var h=t.substring(t.length-c),p=function(t,e){var s;if(!t)return[[1,e]];if(!e)return[[n,t]];var u=t.length>e.length?t:e,l=t.length>e.length?e:t,c=u.indexOf(l);if(-1!=c)return s=[[1,u.substring(0,c)],[0,l],[1,u.substring(c+l.length)]],t.length>e.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[[n,t],[1,e]];var f=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;function i(t,e,n){for(var r,i,s,u,l=t.substring(n,n+Math.floor(t.length/4)),c=-1,f="";-1!=(c=e.indexOf(l,c+1));){var h=o(t.substring(n),e.substring(c)),p=a(t.substring(0,n),e.substring(0,c));f.length<p+h&&(f=e.substring(c-p,c)+e.substring(c,c+h),r=t.substring(0,n-p),i=t.substring(n+h),s=e.substring(0,c-p),u=e.substring(c+h))}return 2*f.length>=t.length?[r,i,s,u,f]:null}var s,u,l,c,f,h=i(n,r,Math.ceil(n.length/4)),p=i(n,r,Math.ceil(n.length/2));if(!h&&!p)return null;s=p?h&&h[4].length>p[4].length?h:p:h,t.length>e.length?(u=s[0],l=s[1],c=s[2],f=s[3]):(c=s[0],f=s[1],u=s[2],l=s[3]);var d=s[4];return[u,l,c,f,d]}(t,e);if(f){var h=f[0],p=f[1],d=f[2],m=f[3],g=f[4],y=r(h,d),v=r(p,m);return y.concat([[0,g]],v)}return function(t,e){for(var r=t.length,o=e.length,a=Math.ceil((r+o)/2),s=a,u=2*a,l=new Array(u),c=new Array(u),f=0;f<u;f++)l[f]=-1,c[f]=-1;l[s+1]=0,c[s+1]=0;for(var h=r-o,p=h%2!=0,d=0,m=0,g=0,y=0,v=0;v<a;v++){for(var b=-v+d;b<=v-m;b+=2){for(var _=s+b,A=(S=b==-v||b!=v&&l[_-1]<l[_+1]?l[_+1]:l[_-1]+1)-b;S<r&&A<o&&t.charAt(S)==e.charAt(A);)S++,A++;if(l[_]=S,S>r)m+=2;else if(A>o)d+=2;else if(p&&(E=s+h-b)>=0&&E<u&&-1!=c[E]&&S>=(x=r-c[E]))return i(t,e,S,A)}for(var w=-v+g;w<=v-y;w+=2){for(var x,E=s+w,O=(x=w==-v||w!=v&&c[E-1]<c[E+1]?c[E+1]:c[E-1]+1)-w;x<r&&O<o&&t.charAt(r-x-1)==e.charAt(o-O-1);)x++,O++;if(c[E]=x,x>r)y+=2;else if(O>o)g+=2;else if(!p){var S;if((_=s+h-w)>=0&&_<u&&-1!=l[_])if(A=s+(S=l[_])-_,S>=(x=r-x))return i(t,e,S,A)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-c),e=e.substring(0,e.length-c));return f&&p.unshift([0,f]),h&&p.push([0,h]),s(p),null!=u&&(p=function(t,e){var r=function(t,e){if(0===e)return[0,t];for(var r=0,i=0;i<t.length;i++){var o=t[i];if(o[0]===n||0===o[0]){var a=r+o[1].length;if(e===a)return[i+1,t];if(e<a){t=t.slice();var s=e-r,u=[o[0],o[1].slice(0,s)],l=[o[0],o[1].slice(s)];return t.splice(i,1,u,l),[i+1,t]}r=a}}throw new Error("cursor_pos is out of bounds!")}(t,e),i=r[1],o=r[0],a=i[o],s=i[o+1];if(null==a)return t;if(0!==a[0])return t;if(null!=s&&a[1]+s[1]===s[1]+a[1])return i.splice(o,2,s,a),l(i,o,2);if(null!=s&&0===s[1].indexOf(a[1])){i.splice(o,2,[s[0],a[1]],[0,a[1]]);var u=s[1].slice(a[1].length);return u.length>0&&i.splice(o+2,0,[s[0],u]),l(i,o,3)}return t}(p,u)),p=function(t){for(var e=!1,r=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},i=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},o=2;o<t.length;o+=1)0===t[o-2][0]&&i(t[o-2][1])&&t[o-1][0]===n&&r(t[o-1][1])&&1===t[o][0]&&r(t[o][1])&&(e=!0,t[o-1][1]=t[o-2][1].slice(-1)+t[o-1][1],t[o][1]=t[o-2][1].slice(-1)+t[o][1],t[o-2][1]=t[o-2][1].slice(0,-1));if(!e)return t;var a=[];for(o=0;o<t.length;o+=1)t[o][1].length>0&&a.push(t[o]);return a}(p)}function i(t,e,n,i){var o=t.substring(0,n),a=e.substring(0,i),s=t.substring(n),u=e.substring(i),l=r(o,a),c=r(s,u);return l.concat(c)}function o(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n<i;)t.substring(o,i)==e.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function a(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n<i;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function s(t){t.push([0,""]);for(var e,r=0,i=0,u=0,l="",c="";r<t.length;)switch(t[r][0]){case 1:u++,c+=t[r][1],r++;break;case n:i++,l+=t[r][1],r++;break;case 0:i+u>1?(0!==i&&0!==u&&(0!==(e=o(c,l))&&(r-i-u>0&&0==t[r-i-u-1][0]?t[r-i-u-1][1]+=c.substring(0,e):(t.splice(0,0,[0,c.substring(0,e)]),r++),c=c.substring(e),l=l.substring(e)),0!==(e=a(c,l))&&(t[r][1]=c.substring(c.length-e)+t[r][1],c=c.substring(0,c.length-e),l=l.substring(0,l.length-e))),0===i?t.splice(r-u,i+u,[1,c]):0===u?t.splice(r-i,i+u,[n,l]):t.splice(r-i-u,i+u,[n,l],[1,c]),r=r-i-u+(i?1:0)+(u?1:0)+1):0!==r&&0==t[r-1][0]?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,u=0,i=0,l="",c=""}""===t[t.length-1][1]&&t.pop();var f=!1;for(r=1;r<t.length-1;)0==t[r-1][0]&&0==t[r+1][0]&&(t[r][1].substring(t[r][1].length-t[r-1][1].length)==t[r-1][1]?(t[r][1]=t[r-1][1]+t[r][1].substring(0,t[r][1].length-t[r-1][1].length),t[r+1][1]=t[r-1][1]+t[r+1][1],t.splice(r-1,1),f=!0):t[r][1].substring(0,t[r+1][1].length)==t[r+1][1]&&(t[r-1][1]+=t[r+1][1],t[r][1]=t[r][1].substring(t[r+1][1].length)+t[r+1][1],t.splice(r+1,1),f=!0)),r++;f&&s(t)}var u=r;function l(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1<t.length){var i=t[r],o=t[r+1];i[0]===o[1]&&t.splice(r,2,[i[0],i[1]+o[1]])}return t}u.INSERT=1,u.DELETE=n,u.EQUAL=0,t.exports=u},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"===typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function i(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?r:i).supported=r,e.unsupported=i},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t,e){var n=r?r+t:t,i=this._events[n];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,a=i.length,s=new Array(a);o<a;o++)s[o]=i[o].fn;return s},a.prototype.emit=function(t,e,n,i,o,a){var s=r?r+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,i),!0;case 5:return c.fn.call(c.context,e,n,i,o),!0;case 6:return c.fn.call(c.context,e,n,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(t,e,n){var i=new o(e,n||this),a=r?r+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.once=function(t,e,n){var i=new o(e,n||this,!0),a=r?r+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.removeListener=function(t,e,n,o){var a=r?r+t:t;if(!this._events[a])return this;if(!e)return 0===--this._eventsCount?this._events=new i:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||o&&!s.once||n&&s.context!==n||(0===--this._eventsCount?this._events=new i:delete this._events[a]);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||o&&!s[u].once||n&&s[u].context!==n)&&l.push(s[u]);l.length?this._events[a]=1===l.length?l[0]:l:0===--this._eventsCount?this._events=new i:delete this._events[a]}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&(0===--this._eventsCount?this._events=new i:delete this._events[e])):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,"undefined"!==typeof t&&(t.exports=a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var r="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=b(n(3)),s=b(n(2)),u=b(n(0)),l=b(n(5)),c=b(n(10)),f=b(n(9)),h=n(36),p=n(37),d=b(n(13)),m=n(26),g=n(38),y=n(39),v=n(40);function b(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=(0,c.default)("quill:clipboard"),w="__ql-matcher",x=[[Node.TEXT_NODE,D],[Node.TEXT_NODE,R],["br",function(t,e){return T(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===C(t).fontStyle&&(n.italic=!0),r.fontWeight&&(C(t).fontWeight.startsWith("bold")||parseInt(C(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=P(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=u.default.query(t);if(null==n||"list-item"!==n.blotName||!T(e,"\n"))return e;for(var r=-1,i=t.parentNode;!i.classList.contains("ql-clipboard");)"list"===(u.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",L.bind(L,"bold")],["i",L.bind(L,"italic")],["style",function(){return new s.default}]],E=[h.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),O=[h.AlignStyle,p.BackgroundStyle,m.ColorStyle,g.DirectionStyle,y.FontStyle,v.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),S=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],x.concat(r.options.matchers).forEach((function(t){var e=i(t,2),o=e[0],a=e[1];(n.matchVisual||a!==N)&&r.addMatcher(o,a)})),r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"===typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[d.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},d.default.blotName,e[d.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],u=o[1],l=I(this.container,a,u);return T(l,"\n")&&null==l.ops[l.ops.length-1].attributes&&(l=l.compose((new s.default).retain(l.length()-1).delete(1))),A.log("convert",this.container.innerHTML,l),this.container.innerHTML="",l}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"===typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,l.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),l.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(l.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,l.default.sources.USER),e.quill.setSelection(r.length()-n.length,l.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[w]=t[w]||[],t[w].push(s)}))}})),[e,n]}}]),e}(f.default);function P(t,e,n){return"object"===("undefined"===typeof e?"undefined":r(e))?Object.keys(e).reduce((function(t,n){return P(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,a.default)({},_({},e,n),r.attributes))}),new s.default)}function C(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function T(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var i=t.ops[r];if("string"!==typeof i.insert)break;n=i.insert+n}return n.slice(-1*e.length)===e}function k(t){if(0===t.childNodes.length)return!1;var e=C(t);return["block","list-item"].indexOf(e.display)>-1}function I(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(r,i){var o=I(i,e,n);return i.nodeType===t.ELEMENT_NODE&&(o=e.reduce((function(t,e){return e(i,t)}),o),o=(i[w]||[]).reduce((function(t,e){return e(i,t)}),o)),r.concat(o)}),new s.default):new s.default}function L(t,e,n){return P(n,t,!0)}function j(t,e){var n=u.default.Attributor.Attribute.keys(t),r=u.default.Attributor.Class.keys(t),i=u.default.Attributor.Style.keys(t),o={};return n.concat(r).concat(i).forEach((function(e){var n=u.default.query(e,u.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=O[e])||n.attrName!==e&&n.keyName!==e||(n=O[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=P(e,o)),e}function M(t,e){var n=u.default.query(t);if(null==n)return e;if(n.prototype instanceof u.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new s.default).insert(r,n.formats(t)))}else"function"===typeof n.formats&&(e=P(e,n.blotName,n.formats(t)));return e}function R(t,e){return T(e,"\n")||(k(t)||e.length()>0&&t.nextSibling&&k(t.nextSibling))&&e.insert("\n"),e}function N(t,e){if(k(t)&&null!=t.nextElementSibling&&!T(e,"\n\n")){var n=t.offsetHeight+parseFloat(C(t).marginTop)+parseFloat(C(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function D(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!C(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&k(t.parentNode)||null!=t.previousSibling&&k(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&k(t.parentNode)||null!=t.nextSibling&&k(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}S.DEFAULTS={matchers:[],matchVisual:!0},e.default=S,e.matchAttributor=j,e.matchBlot=M,e.matchNewline=R,e.matchSpacing=N,e.matchText=D},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var l=function(t){function e(){return s(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);l.blotName="bold",l.tagName=["STRONG","B"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=c(n(2)),a=c(n(0)),s=c(n(5)),u=c(n(10)),l=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var h=(0,u.default)("quill:toolbar"),p=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i,o=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");m(a,o.options.container),t.container.parentNode.insertBefore(a,t.container),o.container=a}else"string"===typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach((function(t){o.addHandler(t,o.options.handlers[t])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(t){o.attach(t)})),o.quill.on(s.default.events.EDITOR_CHANGE,(function(t,e){t===s.default.events.SELECTION_CHANGE&&o.update(e)})),o.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){var t=o.quill.selection.getRange(),e=r(t,1)[0];o.update(e)})),o):(i=h.error("Container required for toolbar",o.options),f(o,i))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void h.warn("ignoring attaching to disabled format",n,t);if(null==a.default.query(n))return void h.warn("ignoring attaching to nonexistent format",n,t)}var i="SELECT"===t.tagName?"change":"click";t.addEventListener(i,(function(i){var u=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var l=t.options[t.selectedIndex];u=!l.hasAttribute("selected")&&(l.value||!1)}else u=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),i.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),f=r(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,u);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(u=prompt("Enter "+n)))return;e.quill.updateContents((new o.default).retain(f.index).delete(f.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,u)),s.default.sources.USER)}else e.quill.format(n,u,s.default.sources.USER);e.update(f)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var i=r(n,2),o=i[0],a=i[1];if("SELECT"===a.tagName){var s=void 0;if(null==t)s=null;else if(null==e[o])s=a.querySelector("option[selected]");else if(!Array.isArray(e[o])){var u=e[o];"string"===typeof u&&(u=u.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+u+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==t)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var l=e[o]===a.getAttribute("value")||null!=e[o]&&e[o].toString()===a.getAttribute("value")||null==e[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",l)}else a.classList.toggle("ql-active",null!=e[o])}))}}]),e}(l.default);function d(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function m(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"===typeof t)d(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):d(n,e,r)}})),t.appendChild(n)}))}p.DEFAULTS={},p.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=a.default.query(e,a.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,s.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",s.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",t,s.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){var i="+1"===t?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,s.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,s.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",t,s.default.sources.USER)}}},e.default=p,e.addControls=m},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"buildItem",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=e+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=e+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=p(n(3)),s=p(n(8)),u=n(43),l=p(u),c=p(n(27)),f=n(15),h=p(n(41));function p(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function g(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],v=function(t){function e(t,n){d(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=y);var r=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-snow"),r}return g(e,t),o(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),h.default),this.tooltip=new b(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(l.default);v.DEFAULTS=(0,a.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){d(this,e);var r=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return g(e,t),o(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,s.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(s.default.events.SELECTION_CHANGE,(function(e,n,i){if(null!=e){if(0===e.length&&i===s.default.sources.USER){var o=t.quill.scroll.descendant(c.default,e.index),a=r(o,2),u=a[0],l=a[1];if(null!=u){t.linkRange=new f.Range(e.index-l,u.length());var h=c.default.formats(u.domNode);return t.preview.textContent=h,t.preview.setAttribute("href",h),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(u.BaseTooltip);b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=R(n(29)),i=n(36),o=n(38),a=n(64),s=R(n(65)),u=R(n(66)),l=n(67),c=R(l),f=n(37),h=n(26),p=n(39),d=n(40),m=R(n(56)),g=R(n(68)),y=R(n(27)),v=R(n(69)),b=R(n(70)),_=R(n(71)),A=R(n(72)),w=R(n(73)),x=n(13),E=R(x),O=R(n(74)),S=R(n(75)),P=R(n(57)),C=R(n(41)),T=R(n(28)),k=R(n(59)),I=R(n(60)),L=R(n(61)),j=R(n(108)),M=R(n(62));function R(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":d.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":d.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":p.FontClass,"formats/size":d.SizeClass,"formats/blockquote":s.default,"formats/code-block":E.default,"formats/header":u.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":x.Code,"formats/italic":g.default,"formats/link":y.default,"formats/script":v.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":A.default,"formats/video":w.default,"formats/list/item":l.ListItem,"modules/formula":O.default,"modules/syntax":S.default,"modules/toolbar":P.default,"themes/bubble":j.default,"themes/snow":M.default,"ui/icons":C.default,"ui/picker":T.default,"ui/icon-picker":I.default,"ui/color-picker":k.default,"ui/tooltip":L.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var c=function(t){function e(){return u(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var r=this.value(t)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(t),!0):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(s.default.Attributor.Class),f=new c("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(4);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var s=function(t){function e(){return o(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=i)&&r.__esModule?r:{default:r}).default);s.blotName="blockquote",s.tagName="blockquote",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(4);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var u=function(t){function e(){return a(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(((r=o)&&r.__esModule?r:{default:r}).default);u.blotName="header",u.tagName=["H1","H2","H3","H4","H5","H6"],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(0)),a=u(n(4)),s=u(n(25));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function f(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),r(e,[{key:"format",value:function(t,n){t!==p.blotName||n?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:i(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(a.default);h.blotName="list-item",h.tagName="LI";var p=function(t){function e(t){l(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=function(e){if(e.target.parentNode===t){var r=n.statics.formats(t),i=o.default.find(e.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return t.addEventListener("touchstart",r),t.addEventListener("mousedown",r),n}return f(e,t),r(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",r=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof h)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);p.blotName="list",p.scope=o.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[h],e.ListItem=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(56);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var s=function(t){function e(){return o(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=i)&&r.__esModule?r:{default:r}).default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var l=function(t){function e(){return s(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);l.blotName="script",l.tagName=["SUB","SUP"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(6);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var s=function(t){function e(){return o(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=i)&&r.__esModule?r:{default:r}).default);s.blotName="strike",s.tagName="S",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(6);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var s=function(t){function e(){return o(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=i)&&r.__esModule?r:{default:r}).default);s.blotName="underline",s.tagName="U",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},u=n(27);function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var f=["alt","height","width"],h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"format",value:function(t,n){f.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"===typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,u.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);h.blotName="image",h.tagName="IMG",e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(4),s=n(27),u=(r=s)&&r.__esModule?r:{default:r};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var f=["height","width"],h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"format",value:function(t,n){f.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return u.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(35)),a=u(n(5)),s=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function f(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),r(e,null,[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"===typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(o.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var p=function(t){function e(){l(this,e);var t=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return f(e,t),r(e,null,[{key:"register",value:function(){a.default.register(h,!0)}}]),e}(s.default);e.FormulaBlot=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(0)),a=u(n(5)),s=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function f(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),r(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(u(n(13)).default);h.className="ql-syntax";var p=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),d=function(t){function e(t,n){l(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!==typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){r.highlight(),i=null}),r.options.interval)})),r.highlight(),r}return f(e,t),r(e,null,[{key:"register",value:function(){a.default.register(p,!0),a.default.register(h,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(h).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(s.default);d.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=h,e.CodeToken=p,e.default=d},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=f(n(3)),a=f(n(8)),s=n(43),u=f(s),l=n(15),c=f(n(41));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function d(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(t){function e(t,n){h(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-bubble"),r}return d(e,t),i(e,[{key:"extendToolbar",value:function(t){this.tooltip=new y(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}(u.default);g.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var y=function(t){function e(t,n){h(this,e);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e,n,i){if(t===a.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(e.index,e.length);if(1===o.length)r.position(r.quill.getBounds(e));else{var s=o[o.length-1],u=r.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-u),f=r.quill.getBounds(new l.Range(u,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return d(e,t),i(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);y.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=y,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=n()}).call(this,n(422).Buffer)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(17),a=n(7),s=n(600),u=n.n(s);e.default=Object(a.a)((function(t){var e=Object(o.useStore)().uiSettings.trayVisible;return i.a.createElement("div",{className:"".concat(u.a.TrayOverview," ").concat(e?u.a.isHidden:u.a.isVisible)},t.children)}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return f}));var r=n(1),i=n(12),o=n(113),a=n(219),s=n(24),u=n(42),l=n(98);class c extends a.a{constructor(t){const{width:e,height:n,latitude:i,longitude:o,zoom:a,bearing:s=0,pitch:l=0,altitude:c=1.5,position:f=[0,0,0],maxZoom:h=20,minZoom:p=0,maxPitch:d=60,minPitch:m=0,startPanLngLat:g,startZoomLngLat:y,startRotatePos:v,startBearing:b,startPitch:_,startZoom:A,normalize:w=!0}=t;Object(u.a)(Number.isFinite(o)),Object(u.a)(Number.isFinite(i)),Object(u.a)(Number.isFinite(a)),super({width:e,height:n,latitude:i,longitude:o,zoom:a,bearing:s,pitch:l,altitude:c,maxZoom:h,minZoom:p,maxPitch:d,minPitch:m,normalize:w,position:f},{startPanLngLat:g,startZoomLngLat:y,startRotatePos:v,startBearing:b,startPitch:_,startZoom:A}),Object(r.a)(this,"makeViewport",void 0),this.makeViewport=t.makeViewport}panStart({pos:t}){return this._getUpdatedState({startPanLngLat:this._unproject(t)})}pan({pos:t,startPos:e}){const n=this.getState().startPanLngLat||this._unproject(e);if(!n)return this;const r=this.makeViewport(this.getViewportProps()).panByPosition(n,t);return this._getUpdatedState(r)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:t,deltaAngleX:e=0,deltaAngleY:n=0}){const{startRotatePos:r,startBearing:i,startPitch:o}=this.getState();if(!r||void 0===i||void 0===o)return this;let a;return a=t?this._getNewRotation(t,r,o,i):{bearing:i+e,pitch:o+n},this._getUpdatedState(a)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart({pos:t}){return this._getUpdatedState({startZoomLngLat:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom({pos:t,startPos:e,scale:n}){let{startZoom:r,startZoomLngLat:o}=this.getState();if(o||(r=this.getViewportProps().zoom,o=this._unproject(e)||this._unproject(t)),!o)return this;const{maxZoom:a,minZoom:s}=this.getViewportProps();let u=r+Math.log2(n);u=Object(i.d)(u,s,a);const l=this.makeViewport({...this.getViewportProps(),zoom:u});return this._getUpdatedState({zoom:u,...l.panByPosition(o,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.getViewportProps().bearing-t})}rotateRight(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+t})}rotateUp(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+t})}rotateDown(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-t})}shortestPathFrom(t){const e=t.getViewportProps(),n={...this.getViewportProps()},{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}applyConstraints(t){const{maxZoom:e,minZoom:n,zoom:r}=t;t.zoom=Object(i.d)(r,n,e);const{maxPitch:o,minPitch:a,pitch:u}=t;t.pitch=Object(i.d)(u,a,o);const{normalize:l=!0}=t;return l&&Object.assign(t,Object(s.n)(t)),t}_zoomFromCenter(t){const{width:e,height:n}=this.getViewportProps();return this.zoom({pos:[e/2,n/2],scale:t})}_panFromCenter(t){const{width:e,height:n}=this.getViewportProps();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.getViewportProps(),...this.getState(),...t})}_unproject(t){const e=this.makeViewport(this.getViewportProps());return t&&e.unproject(t)}_getNewRotation(t,e,n,r){const o=t[0]-e[0],a=t[1]-e[1],s=t[1],u=e[1],{width:l,height:c}=this.getViewportProps(),f=o/l;let h=0;a>0?Math.abs(c-u)>5&&(h=a/(u-c)*1.2):a<0&&u>5&&(h=1-s/u),h=Object(i.d)(h,-1,1);const{minPitch:p,maxPitch:d}=this.getViewportProps();let m=n;return h>0?m=n+h*(d-n):h<0&&(m=n-h*(p-n)),{pitch:m,bearing:r+180*f}}}class f extends o.a{constructor(...t){super(...t),Object(r.a)(this,"ControllerState",c),Object(r.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new l.a({transitionProps:{compare:["longitude","latitude","zoom","bearing","pitch","position"],required:["longitude","latitude","zoom"]}})}),Object(r.a)(this,"dragMode","pan")}setProps(t){t.position=t.position||[0,0,0];const e=this.props;super.setProps(t);(!e||e.height!==t.height)&&this.updateViewport(new this.ControllerState({makeViewport:this.makeViewport,...t,...this.state}))}}},function(t,e,n){!function(t){"use strict";function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=e((function(t,e){!function(e){t.exports=e()}((function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,a,s,u,l=t.length,c=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=l;e+=64)n(c,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(c,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(c,o),c}function a(t){var e,r,o,a,s,u,l=t.length,c=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=l;e+=64)n(c,i(t.subarray(e-64,e)));for(r=(t=e-64<l?t.subarray(e-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(c,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(c,o),c}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function u(t){var e;for(e=0;e<t.length;e+=1)t[e]=s(t[e]);return t.join("")}function l(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function c(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function f(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function h(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function p(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function d(){this.reset()}return u(o("hello")),"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,l=e(n,u),c=u;return r!==t&&(c=e(r,u)),l>c?new ArrayBuffer(0):(i=c-l,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,l,i),a.set(s),o)}}(),d.prototype.append=function(t){return this.appendBinary(l(t)),this},d.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},d.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=p(n)),this.reset(),n},d.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},d.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},d.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},d.prototype._finish=function(t,e){var r,i,o,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,t),a=0;a<16;a+=1)t[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},d.hash=function(t,e){return d.hashBinary(l(t),e)},d.hashBinary=function(t,e){var n=u(o(t));return e?p(n):n},d.ArrayBuffer=function(){this.reset()},d.ArrayBuffer.prototype.append=function(t){var e,r=h(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},d.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=p(n)),this.reset(),n},d.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.ArrayBuffer.prototype.getState=function(){var t=d.prototype.getState.call(this);return t.buff=f(t.buff),t},d.ArrayBuffer.prototype.setState=function(t){return t.buff=c(t.buff,!0),d.prototype.setState.call(this,t)},d.ArrayBuffer.prototype.destroy=d.prototype.destroy,d.ArrayBuffer.prototype._finish=d.prototype._finish,d.ArrayBuffer.hash=function(t,e){var n=u(a(new Uint8Array(t)));return e?p(n):n},d}))})),r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,a=function(){function t(e){r(this,t),this.file=e,this.chunkSize=2097152,this.chunkCount=Math.ceil(this.file.size/this.chunkSize),this.chunkIndex=0}return i(t,null,[{key:"create",value:function(e,n){new t(e).create(n)}}]),i(t,[{key:"create",value:function(t){var e=this;this.callback=t,this.md5Buffer=new n.ArrayBuffer,this.fileReader=new FileReader,this.fileReader.addEventListener("load",(function(t){return e.fileReaderDidLoad(t)})),this.fileReader.addEventListener("error",(function(t){return e.fileReaderDidError(t)})),this.readNextChunk()}},{key:"fileReaderDidLoad",value:function(t){if(this.md5Buffer.append(t.target.result),!this.readNextChunk()){var e=this.md5Buffer.end(!0),n=btoa(e);this.callback(null,n)}}},{key:"fileReaderDidError",value:function(t){this.callback("Error reading "+this.file.name)}},{key:"readNextChunk",value:function(){if(this.chunkIndex<this.chunkCount||0==this.chunkIndex&&0==this.chunkCount){var t=this.chunkIndex*this.chunkSize,e=Math.min(t+this.chunkSize,this.file.size),n=o.call(this.file,t,e);return this.fileReader.readAsArrayBuffer(n),this.chunkIndex++,!0}return!1}}]),t}();function s(t){var e=l(document.head,'meta[name="'+t+'"]');if(e)return e.getAttribute("content")}function u(t,e){return"string"==typeof t&&(e=t,t=document),f(t.querySelectorAll(e))}function l(t,e){return"string"==typeof t&&(e=t,t=document),t.querySelector(e)}function c(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.disabled,i=n.bubbles,o=n.cancelable,a=n.detail,s=document.createEvent("Event");s.initEvent(e,i||!0,o||!0),s.detail=a||{};try{t.disabled=!1,t.dispatchEvent(s)}finally{t.disabled=r}return s}function f(t){return Array.isArray(t)?t:Array.from?Array.from(t):[].slice.call(t)}var h=function(){function t(e,n,i){var o=this;r(this,t),this.file=e,this.attributes={filename:e.name,content_type:e.type||"application/octet-stream",byte_size:e.size,checksum:n},this.xhr=new XMLHttpRequest,this.xhr.open("POST",i,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");var a=s("csrf-token");void 0!=a&&this.xhr.setRequestHeader("X-CSRF-Token",a),this.xhr.addEventListener("load",(function(t){return o.requestDidLoad(t)})),this.xhr.addEventListener("error",(function(t){return o.requestDidError(t)}))}return i(t,[{key:"create",value:function(t){this.callback=t,this.xhr.send(JSON.stringify({blob:this.attributes}))}},{key:"requestDidLoad",value:function(t){if(this.status>=200&&this.status<300){var e=this.response,n=e.direct_upload;delete e.direct_upload,this.attributes=e,this.directUploadData=n,this.callback(null,this.toJSON())}else this.requestDidError(t)}},{key:"requestDidError",value:function(t){this.callback('Error creating Blob for "'+this.file.name+'". Status: '+this.status)}},{key:"toJSON",value:function(){var t={};for(var e in this.attributes)t[e]=this.attributes[e];return t}},{key:"status",get:function(){return this.xhr.status}},{key:"response",get:function(){var t=this.xhr,e=t.responseType,n=t.response;return"json"==e?n:JSON.parse(n)}}]),t}(),p=function(){function t(e){var n=this;r(this,t),this.blob=e,this.file=e.file;var i=e.directUploadData,o=i.url,a=i.headers;for(var s in this.xhr=new XMLHttpRequest,this.xhr.open("PUT",o,!0),this.xhr.responseType="text",a)this.xhr.setRequestHeader(s,a[s]);this.xhr.addEventListener("load",(function(t){return n.requestDidLoad(t)})),this.xhr.addEventListener("error",(function(t){return n.requestDidError(t)}))}return i(t,[{key:"create",value:function(t){this.callback=t,this.xhr.send(this.file.slice())}},{key:"requestDidLoad",value:function(t){var e=this.xhr,n=e.status,r=e.response;n>=200&&n<300?this.callback(null,r):this.requestDidError(t)}},{key:"requestDidError",value:function(t){this.callback('Error storing "'+this.file.name+'". Status: '+this.xhr.status)}}]),t}(),d=0,m=function(){function t(e,n,i){r(this,t),this.id=++d,this.file=e,this.url=n,this.delegate=i}return i(t,[{key:"create",value:function(t){var e=this;a.create(this.file,(function(n,r){if(n)t(n);else{var i=new h(e.file,r,e.url);g(e.delegate,"directUploadWillCreateBlobWithXHR",i.xhr),i.create((function(n){if(n)t(n);else{var r=new p(i);g(e.delegate,"directUploadWillStoreFileWithXHR",r.xhr),r.create((function(e){e?t(e):t(null,i.toJSON())}))}}))}}))}}]),t}();function g(t,e){if(t&&"function"==typeof t[e]){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return t[e].apply(t,r)}}var y=function(){function t(e,n){r(this,t),this.input=e,this.file=n,this.directUpload=new m(this.file,this.url,this),this.dispatch("initialize")}return i(t,[{key:"start",value:function(t){var e=this,n=document.createElement("input");n.type="hidden",n.name=this.input.name,this.input.insertAdjacentElement("beforebegin",n),this.dispatch("start"),this.directUpload.create((function(r,i){r?(n.parentNode.removeChild(n),e.dispatchError(r)):n.value=i.signed_id,e.dispatch("end"),t(r)}))}},{key:"uploadRequestDidProgress",value:function(t){var e=t.loaded/t.total*100;e&&this.dispatch("progress",{progress:e})}},{key:"dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.file=this.file,e.id=this.directUpload.id,c(this.input,"direct-upload:"+t,{detail:e})}},{key:"dispatchError",value:function(t){this.dispatch("error",{error:t}).defaultPrevented||alert(t)}},{key:"directUploadWillCreateBlobWithXHR",value:function(t){this.dispatch("before-blob-request",{xhr:t})}},{key:"directUploadWillStoreFileWithXHR",value:function(t){var e=this;this.dispatch("before-storage-request",{xhr:t}),t.upload.addEventListener("progress",(function(t){return e.uploadRequestDidProgress(t)}))}},{key:"url",get:function(){return this.input.getAttribute("data-direct-upload-url")}}]),t}(),v="input[type=file][data-direct-upload-url]:not([disabled])",b=function(){function t(e){r(this,t),this.form=e,this.inputs=u(e,v).filter((function(t){return t.files.length}))}return i(t,[{key:"start",value:function(t){var e=this,n=this.createDirectUploadControllers(),r=function r(){var i=n.shift();i?i.start((function(n){n?(t(n),e.dispatch("end")):r()})):(t(),e.dispatch("end"))};this.dispatch("start"),r()}},{key:"createDirectUploadControllers",value:function(){var t=[];return this.inputs.forEach((function(e){f(e.files).forEach((function(n){var r=new y(e,n);t.push(r)}))})),t}},{key:"dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(this.form,"direct-uploads:"+t,{detail:e})}}]),t}(),_="data-direct-uploads-processing",A=new WeakMap,w=!1;function x(){w||(w=!0,document.addEventListener("click",E,!0),document.addEventListener("submit",O),document.addEventListener("ajax:before",S))}function E(t){var e=t.target;"INPUT"!=e.tagName&&"BUTTON"!=e.tagName||"submit"!=e.type||!e.form||A.set(e.form,e)}function O(t){P(t)}function S(t){"FORM"==t.target.tagName&&P(t)}function P(t){var e=t.target;if(e.hasAttribute(_))t.preventDefault();else{var n=new b(e),r=n.inputs;r.length&&(t.preventDefault(),e.setAttribute(_,""),r.forEach(T),n.start((function(t){e.removeAttribute(_),t?r.forEach(k):C(e)})))}}function C(t){var e=A.get(t)||l(t,"input[type=submit], button[type=submit]");if(e){var n=e.disabled;e.disabled=!1,e.focus(),e.click(),e.disabled=n}else(e=document.createElement("input")).type="submit",e.style.display="none",t.appendChild(e),e.click(),t.removeChild(e);A.delete(t)}function T(t){t.disabled=!0}function k(t){t.disabled=!1}function I(){window.ActiveStorage&&x()}setTimeout(I,1),t.start=x,t.DirectUpload=m,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return d}));var r=n(13),i=n(33),o=n(15),a=n(131);const s=[0,0,0,0],u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c=[0,0,0],f=[0,0,0],h=Object(a.a)((function({viewport:t,devicePixelRatio:e,coordinateSystem:n,coordinateOrigin:a}){const{projectionCenter:f,viewProjectionMatrix:h,originCommon:d,cameraPosCommon:m,shaderCoordinateOrigin:g,geospatialOrigin:y}=function(t,e,n){const{viewMatrixUncentered:o,projectionMatrix:a}=t;let{viewMatrix:l,viewProjectionMatrix:c}=t,f=s,h=s,d=t.cameraPosition;const{geospatialOrigin:m,shaderCoordinateOrigin:g,offsetMode:y}=p(t,e,n);y&&(h=t.projectPosition(m||g),d=[d[0]-h[0],d[1]-h[1],d[2]-h[2]],h[3]=1,f=i.n([],h,c),l=o||l,c=r.h([],a,l),c=r.h([],c,u));return{viewMatrix:l,viewProjectionMatrix:c,projectionCenter:f,originCommon:h,cameraPosCommon:d,shaderCoordinateOrigin:g,geospatialOrigin:m}}(t,n,a),v=t.getDistanceScales(),b=[t.width*e,t.height*e],_=i.n([],[0,0,-t.focalDistance,1],t.projectionMatrix)[3]||1,A={project_uCoordinateSystem:n,project_uProjectionMode:t.projectionMode,project_uCoordinateOrigin:g,project_uCommonOrigin:d.slice(0,3),project_uCenter:f,project_uPseudoMeters:Boolean(t._pseudoMeters),project_uViewportSize:b,project_uDevicePixelRatio:e,project_uFocalDistance:_,project_uCommonUnitsPerMeter:v.unitsPerMeter,project_uCommonUnitsPerWorldUnit:v.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:c,project_uScale:t.scale,project_uWrapLongitude:!1,project_uViewProjectionMatrix:h,project_uModelMatrix:l,project_uCameraPosition:m};if(y){const e=t.getDistanceScales(y);switch(n){case o.a.METER_OFFSETS:A.project_uCommonUnitsPerWorldUnit=e.unitsPerMeter,A.project_uCommonUnitsPerWorldUnit2=e.unitsPerMeter2;break;case o.a.LNGLAT:case o.a.LNGLAT_OFFSETS:t._pseudoMeters||(A.project_uCommonUnitsPerMeter=e.unitsPerMeter),A.project_uCommonUnitsPerWorldUnit=e.unitsPerDegree,A.project_uCommonUnitsPerWorldUnit2=e.unitsPerDegree2;break;case o.a.CARTESIAN:A.project_uCommonUnitsPerWorldUnit=[1,1,e.unitsPerMeter[2]],A.project_uCommonUnitsPerWorldUnit2=[0,0,e.unitsPerMeter2[2]]}}return A}));function p(t,e,n=f){n.length<3&&(n=[n[0],n[1],0]);let r,i=n,a=!0;switch(r=e===o.a.LNGLAT_OFFSETS||e===o.a.METER_OFFSETS?n:t.isGeospatial?[Math.fround(t.longitude),Math.fround(t.latitude),0]:null,t.projectionMode){case o.d.WEB_MERCATOR:e!==o.a.LNGLAT&&e!==o.a.CARTESIAN||(r=[0,0,0],a=!1);break;case o.d.WEB_MERCATOR_AUTO_OFFSET:e===o.a.LNGLAT?i=r:e===o.a.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.d.IDENTITY:i=t.position.map(Math.fround),i[2]=i[2]||0;break;case o.d.GLOBE:a=!1,r=null;break;default:a=!1}return{geospatialOrigin:r,shaderCoordinateOrigin:i,offsetMode:a}}function d({viewport:t,devicePixelRatio:e=1,modelMatrix:n=null,coordinateSystem:r=o.a.DEFAULT,coordinateOrigin:i=f,autoWrapLongitude:a=!1}){r===o.a.DEFAULT&&(r=t.isGeospatial?o.a.LNGLAT:o.a.CARTESIAN);const s=h({viewport:t,devicePixelRatio:e,coordinateSystem:r,coordinateOrigin:i});return s.project_uWrapLongitude=a,s.project_uModelMatrix=n||l,s}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1);class i{constructor(t,e){Object(r.a)(this,"_viewportProps",void 0),Object(r.a)(this,"_state",void 0),this._viewportProps=this.applyConstraints(t),this._state=e}getViewportProps(){return this._viewportProps}getState(){return this._state}}},function(t,e,n){"use strict";n.r(e),n.d(e,"createFeatureMutation",(function(){return i})),n.d(e,"updateFeatureGeometryMutation",(function(){return o})),n.d(e,"updateFeatureAnnotationDataMutation",(function(){return a})),n.d(e,"destroyFeatureMutation",(function(){return s})),n.d(e,"destroyFeaturesMutation",(function(){return u}));var r=n(147),i=function(t){return r.default.request("\n  #graphql\n  mutation CreateFeature($square_id:Int!, $feature_layer_id:bigint!,$annotation_data:jsonb!, $properties:jsonb!,$geometry:geometry!, $embed_metadata:jsonb) {\n    insert: create_placemaker_feature(\n      object: {\n        annotation_data: $annotation_data,\n        geometry: $geometry,\n        properties: $properties,\n        square_id: $square_id,\n        feature_layer_id: $feature_layer_id,\n        embed_metadata: $embed_metadata\n      }) {\n      id\n      properties\n      annotation_data\n      geometry\n      square_id\n      feature_layer_id\n      embed_metadata\n    }\n  }\n",t)},o=function(t){return r.default.request("\n  #graphql\n  mutation UpdateFeatureGeometry($id:bigint!, $properties:jsonb!, $geometry:geometry!, $embed_metadata:jsonb) {\n    updated: update_placemaker_feature(\n      pk_columns: {\n        id: $id\n      },\n      _set: {\n        properties: $properties,\n        geometry: $geometry,\n        embed_metadata: $embed_metadata\n      }) {\n      id\n      properties\n      annotation_data\n      geometry\n      square_id\n      feature_layer_id,\n      embed_metadata\n    }\n  }\n",t)},a=function(t){return r.default.request("\n  #graphql\n  mutation UpdateFeatureAnnotationData($id:bigint!, $annotation_data:jsonb!, $embed_metadata:jsonb) {\n    updated: update_placemaker_feature(\n      pk_columns: {\n        id: $id\n      },\n      _set: {\n        annotation_data: $annotation_data,\n        embed_metadata: $embed_metadata\n      }) {\n      id\n      annotation_data\n      embed_metadata\n    }\n  }\n",t)},s=function(t){return r.default.request("\n  #graphql\n  mutation DestroyFeature($id: bigint!) {\n    destroyed: destroy_placemaker_feature(id: $id) {\n      id\n    }\n  }\n",t)},u=function(t){return r.default.request("\n  #graphql\n  mutation DestroyFeatures($ids: [bigint!]!) {\n    destroy_placemaker_features(where: {id: {_in: $ids}}) {\n      affected_rows\n    }\n  }\n",t)}},function(t,e,n){t.exports={TrailCreatorGuidance:"TrailCreatorGuidance-module__TrailCreatorGuidance___1b3c2",step:"TrailCreatorGuidance-module__step___3x5NU",secondary:"TrailCreatorGuidance-module__secondary___26mOV",distance:"TrailCreatorGuidance-module__distance___2_Z1Z"}},function(t,e,n){t.exports={ContributeProjectsList:"ContributeProjectsList-module__ContributeProjectsList___BpO1k",actions:"ContributeProjectsList-module__actions___3BknN",badge:"ContributeProjectsList-module__badge___2FRsH"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),i=n.n(r).a.createContext(void 0)},function(t,e,n){"use strict";n.r(e);function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!o(t[0])||!o(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function o(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function a(t,e,n){if(null!==t)for(var r,i,o,s,u,l,c,f,h=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,y=m?t.features.length:1,v=0;v<y;v++){u=(f=!!(c=m?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<u;b++){var _=0,A=0;if(null!==(s=f?c.geometries[b]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,v,_,A))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,v,_,A))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===e(l[r][i],p,v,_,A))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&A++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(A=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===e(l[r][i][o],p,v,_,A))return!1;p++}A++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===a(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function s(t){var e=[1/0,1/0,-1/0,-1/0];return a(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}s.default=s;var u=s;e.default=function(t,e){void 0===e&&(e={});var n=u(t);return i([(n[0]+n[2])/2,(n[1]+n[3])/2],e.properties,e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(183);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(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)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";t.exports=n(880)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(14),u=n(605),l=n.n(u);e.default=Object(o.a)((function(){var t=Object(s.e)(),e=Object(a.useStore)(),n=e.place,r=e.isAdminMode;if(!n)return null;var o=function(e){var n=e.href;return"/placemaker"!==n&&t.pathname.includes(n)||"/placemaker"===n&&t.pathname===n?{className:"".concat(l.a.isActive)}:null};return i.a.createElement("div",{className:l.a.BaseNavigation},i.a.createElement(s.a,{to:"/placemaker",getProps:o},"Grid"),i.a.createElement(s.a,{to:"/placemaker/all-features",getProps:o},"All features"),r&&i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{to:"/placemaker/edit-grid",getProps:o},"Edit grid"),i.a.createElement(s.a,{to:"/placemaker/search-by-user",getProps:o},"Search by user"),i.a.createElement(s.a,{to:"/placemaker/update-recency",getProps:o},"Update recency")))}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(85);function i(t){var e=function(t,e){if("object"!==Object(r.a)(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==Object(r.a)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Object(r.a)(e)?e:String(e)}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return h}));var r=n(39),i=n(40),o=n(1),a=n(3),s=n(72),u=n(230);var l={container:a.object,gl:a.object,mapboxApiAccessToken:a.string,mapboxApiUrl:a.string,attributionControl:a.bool,preserveDrawingBuffer:a.bool,reuseMaps:a.bool,transformRequest:a.func,mapOptions:a.object,mapStyle:a.oneOfType([a.string,a.object]),preventStyleDiffing:a.bool,visible:a.bool,asyncRender:a.bool,onLoad:a.func,onError:a.func,width:a.number,height:a.number,viewState:a.object,longitude:a.number,latitude:a.number,zoom:a.number,bearing:a.number,pitch:a.number,altitude:a.number},c={container:s.a.body,mapboxApiAccessToken:function(){var e=null;if("undefined"!==typeof window&&window.location){var n=window.location.search.match(/access_token=([^&\/]*)/);e=n&&n[1]}e||"undefined"===typeof t||(e=e||t.env.MapboxAccessToken||t.env.REACT_APP_MAPBOX_ACCESS_TOKEN);return e||"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 f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&a.checkPropTypes(l,t,"prop",e)}var h=function(){function t(e){var n=this;if(Object(r.a)(this,t),Object(o.a)(this,"props",c),Object(o.a)(this,"width",0),Object(o.a)(this,"height",0),Object(o.a)(this,"_fireLoadEvent",(function(){n.props.onLoad({type:"load",target:n._map})})),Object(o.a)(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 Object(i.a)(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(Object(u.a)(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:Object(u.a)(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;f(t=Object.assign({},c,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||c.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{configurable:!0,get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{configurable:!0,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){f(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(Object(u.a)(e.mapStyle),{diff:!e.preventStyleDiffing})}},{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,a=void 0===o?0:o,s=e.bearing,u=void 0===s?0:s,l=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:a,bearing:u,altitude:void 0===l?1.5:l}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if("undefined"!==typeof s.a)try{var e=s.a.createElement("div");e.className="mapboxgl-map",e.style.display="none",s.a.body.appendChild(e);var n="static"!==window.getComputedStyle(e).position;if(!n){var r=s.a.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")),s.a.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}();Object(o.a)(h,"initialized",!1),Object(o.a)(h,"propTypes",l),Object(o.a)(h,"defaultProps",c),Object(o.a)(h,"savedMap",null)}).call(this,n(68))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1);function i(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 o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(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 s(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 s(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,a=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function s(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 u=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function l(t){if(!t)return null;if("string"===typeof t)return t;t.toJS&&(t=t.toJS());var e,n={},r=a(t.layers);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.id]=i}}catch(l){r.e(l)}finally{r.f()}var s=t.layers.map((function(t){var e=n[t.ref],r=null;if("interactive"in t&&delete(r=o({},t)).interactive,e){delete(r=r||o({},t)).ref;var i,s=a(u);try{for(s.s();!(i=s.n()).done;){var c=i.value;c in e&&(r[c]=e[c])}}catch(l){s.e(l)}finally{s.f()}}return r||t}));return o(o({},t),{},{layers:s})}},,,function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.TwoClickPolygonMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"handleClick",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw||(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"handleStartDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),t.cancelPan())}},{key:"handleStopDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"checkAndFinishPolygon",value:function(t){var e=this.getClickSequence(),n=this.getTentativeGuide(t);if(e.length>1&&n&&"Polygon"===n.geometry.type){var r={type:"Feature",properties:{shape:n.properties.shape},geometry:{type:"Polygon",coordinates:n.geometry.coordinates}},i=this.getAddFeatureOrBooleanPolygonAction(r,t);this.resetClickSequence(),i&&t.onEdit(i)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var o=r[0],a=e.mapCoords,s=this.getTwoClickPolygon(o,a,n);return s&&i.features.push({type:"Feature",properties:{shape:s.properties&&s.properties.shape,guideType:"tentative"},geometry:s.geometry}),i}},{key:"getTwoClickPolygon",value:function(t,e,n){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),a(l(p.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length&&(e=this.getTwoClickPolygon(r[0],i[0],t.modeConfig)),e}}])&&o(n.prototype,r),f&&o(n,f),p}(n(64).GeoJsonEditMode);e.TwoClickPolygonMode=f},function(t,e,n){(function(e){var n="Expected a function",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),f=Object.prototype.toString,h=Math.max,p=Math.min,d=function(){return c.Date.now()};function m(t,e,r){var i,o,a,s,u,l,c=0,f=!1,m=!1,v=!0;if("function"!=typeof t)throw new TypeError(n);function b(e){var n=i,r=o;return i=o=void 0,c=e,s=t.apply(r,n)}function _(t){return c=t,u=setTimeout(w,e),f?b(t):s}function A(t){var n=t-l;return void 0===l||n>=e||n<0||m&&t-c>=a}function w(){var t=d();if(A(t))return x(t);u=setTimeout(w,function(t){var n=e-(t-l);return m?p(n,a-(t-c)):n}(t))}function x(t){return u=void 0,v&&i?b(t):(i=o=void 0,s)}function E(){var t=d(),n=A(t);if(i=arguments,o=this,l=t,n){if(void 0===u)return _(l);if(m)return u=setTimeout(w,e),b(l)}return void 0===u&&(u=setTimeout(w,e)),s}return e=y(e)||0,g(r)&&(f=!!r.leading,a=(m="maxWait"in r)?h(y(r.maxWait)||0,e):a,v="trailing"in r?!!r.trailing:v),E.cancel=function(){void 0!==u&&clearTimeout(u),c=0,i=l=o=u=void 0},E.flush=function(){return void 0===u?s:x(d())},E}function g(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==f.call(t)}(t))return NaN;if(g(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=g(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var n=o.test(t);return n||a.test(t)?s(t.slice(2),n?2:8):i.test(t)?NaN:+t}t.exports=function(t,e,r){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(n);return g(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),m(t,e,{leading:i,maxWait:e,trailing:o})}}).call(this,n(36))},function(t,e,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&t.push(a)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&t.push(s);else t.push(r.toString())}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){"use strict";n.r(e);var r=n(370),i=n(60);e.default=function(t,e,n){void 0===n&&(n={});var o=Object(r.getCoord)(t),a=Object(r.getCoord)(e),s=Object(i.degreesToRadians)(a[1]-o[1]),u=Object(i.degreesToRadians)(a[0]-o[0]),l=Object(i.degreesToRadians)(o[1]),c=Object(i.degreesToRadians)(a[1]),f=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return Object(i.radiansToLength)(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)}},function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return i(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var n=0;return i(t,n,e)}return""}function i(t,e,n){if(t.byteLength<=e+n)return"";for(var r=new DataView(t),i="",o=0;o<n;o++)i+=String.fromCharCode(r.getUint8(e+o));return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(1),i=n(12),o=n(42);class a{constructor(t){Object(r.a)(this,"_propsToCompare",void 0),Object(r.a)(this,"_propsToExtract",void 0),Object(r.a)(this,"_requiredProps",void 0);const{compare:e,extract:n,required:i}=t;this._propsToCompare=e,this._propsToExtract=n||e,this._requiredProps=i}arePropsEqual(t,e){for(const n of this._propsToCompare)if(!(n in t)||!(n in e)||!Object(i.j)(t[n],e[n]))return!1;return!0}initializeProps(t,e){const n={},r={};for(const i of this._propsToExtract)(i in t||i in e)&&(n[i]=t[i],r[i]=e[i]);return this._checkRequiredProps(n),this._checkRequiredProps(r),{start:n,end:r}}getDuration(t,e){return e.transitionDuration}_checkRequiredProps(t){this._requiredProps&&this._requiredProps.forEach((e=>{const n=t[e];Object(o.a)(Number.isFinite(n)||Array.isArray(n),"".concat(e," is required for transition"))}))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c}));var r=n(1),i=n(12),o=n(113),a=n(219),s=n(55),u=n(98);class l extends a.a{constructor(t){const{width:e,height:n,rotationX:i=0,rotationOrbit:o=0,target:a=[0,0,0],zoom:s=0,minRotationX:u=-90,maxRotationX:l=90,minZoom:c=-1/0,maxZoom:f=1/0,startPanPosition:h,startRotatePos:p,startRotationX:d,startRotationOrbit:m,startZoomPosition:g,startZoom:y}=t;super({width:e,height:n,rotationX:i,rotationOrbit:o,target:a,zoom:s,minRotationX:u,maxRotationX:l,minZoom:c,maxZoom:f},{startPanPosition:h,startRotatePos:p,startRotationX:d,startRotationOrbit:m,startZoomPosition:g,startZoom:y}),Object(r.a)(this,"makeViewport",void 0),this.makeViewport=t.makeViewport}panStart({pos:t}){return this._getUpdatedState({startPanPosition:this._unproject(t)})}pan({pos:t,startPosition:e}){const n=this.getState().startPanPosition||e;if(!n)return this;const r=this.makeViewport(this.getViewportProps()).panByPosition(n,t);return this._getUpdatedState(r)}panEnd(){return this._getUpdatedState({startPanPosition:null})}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startRotationX:this.getViewportProps().rotationX,startRotationOrbit:this.getViewportProps().rotationOrbit})}rotate({pos:t,deltaAngleX:e=0,deltaAngleY:n=0}){const{startRotatePos:r,startRotationX:i,startRotationOrbit:o}=this.getState(),{width:a,height:s}=this.getViewportProps();if(!r||void 0===i||void 0===o)return this;let u;if(t){let e=(t[0]-r[0])/a;const n=(t[1]-r[1])/s;(i<-90||i>90)&&(e*=-1),u={rotationX:i+180*n,rotationOrbit:o+180*e}}else u={rotationX:i+n,rotationOrbit:o+e};return this._getUpdatedState(u)}rotateEnd(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}shortestPathFrom(t){const e=t.getViewportProps(),n={...this.getViewportProps()},{rotationOrbit:r}=n;return Math.abs(r-e.rotationOrbit)>180&&(n.rotationOrbit=r<0?r+360:r-360),n}zoomStart({pos:t}){return this._getUpdatedState({startZoomPosition:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom({pos:t,startPos:e,scale:n}){let{startZoom:r,startZoomPosition:i}=this.getState();if(i||(r=this.getViewportProps().zoom,i=this._unproject(e)||this._unproject(t)),!i)return this;const o=this._calculateNewZoom({scale:n,startZoom:r}),a=this.makeViewport({...this.getViewportProps(),zoom:o});return this._getUpdatedState({zoom:o,...a.panByPosition(i,t)})}zoomEnd(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}zoomIn(t=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:t})})}zoomOut(t=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:1/t})})}moveLeft(t=50){return this._panFromCenter([-t,0])}moveRight(t=50){return this._panFromCenter([t,0])}moveUp(t=50){return this._panFromCenter([0,-t])}moveDown(t=50){return this._panFromCenter([0,t])}rotateLeft(t=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit-t})}rotateRight(t=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit+t})}rotateUp(t=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX-t})}rotateDown(t=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX+t})}_unproject(t){const e=this.makeViewport(this.getViewportProps());return t&&e.unproject(t)}_calculateNewZoom({scale:t,startZoom:e}){const{maxZoom:n,minZoom:r}=this.getViewportProps();void 0===e&&(e=this.getViewportProps().zoom);const o=e+Math.log2(t);return Object(i.d)(o,r,n)}_panFromCenter(t){const{width:e,height:n,target:r}=this.getViewportProps();return this.pan({startPosition:r,pos:[e/2+t[0],n/2+t[1]]})}_getUpdatedState(t){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...t})}applyConstraints(t){const{maxZoom:e,minZoom:n,zoom:r,maxRotationX:o,minRotationX:a,rotationOrbit:u}=t;return t.zoom=Array.isArray(r)?[Object(i.d)(r[0],n,e),Object(i.d)(r[1],n,e)]:Object(i.d)(r,n,e),t.rotationX=Object(i.d)(t.rotationX,a,o),(u<-180||u>180)&&(t.rotationOrbit=Object(s.e)(u+180,360)-180),t}}class c extends o.a{constructor(...t){super(...t),Object(r.a)(this,"ControllerState",l),Object(r.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new u.a({transitionProps:{compare:["target","zoom","rotationX","rotationOrbit"],required:["target","zoom"]}})})}}},function(t,e,n){"use strict";(function(t){function r(){let e;if("undefined"!==typeof window&&window.performance)e=window.performance.now();else if("undefined"!==typeof t&&t.hrtime){const n=t.hrtime();e=1e3*n[0]+n[1]/1e6}else e=Date.now();return e}n.d(e,"a",(function(){return r}))}).call(this,n(68))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return h}));var r=n(1),i=n(297),o=n(57),a=n(394),s=n(61),u=n(12),l=n(131);const c="best-available",f={[c]:function(t){for(const e of t)e.state=0;for(const e of t)e.isSelected&&!p(e)&&d(e);for(const e of t)e.isVisible=Boolean(2&e.state)},"no-overlap":function(t){for(const n of t)n.state=0;for(const n of t)n.isSelected&&p(n);const e=Array.from(t).sort(((t,e)=>t.zoom-e.zoom));for(const n of e)if(n.isVisible=Boolean(2&n.state),n.children&&(n.isVisible||1&n.state))for(const t of n.children)t.state=1;else n.isSelected&&d(n)},never:()=>{}};class h{constructor(t){Object(r.a)(this,"opts",void 0),Object(r.a)(this,"_requestScheduler",void 0),Object(r.a)(this,"_cache",void 0),Object(r.a)(this,"_dirty",void 0),Object(r.a)(this,"_tiles",void 0),Object(r.a)(this,"_cacheByteSize",void 0),Object(r.a)(this,"_viewport",void 0),Object(r.a)(this,"_zRange",void 0),Object(r.a)(this,"_selectedTiles",void 0),Object(r.a)(this,"_frameNumber",void 0),Object(r.a)(this,"_modelMatrix",void 0),Object(r.a)(this,"_modelMatrixInverse",void 0),Object(r.a)(this,"_maxZoom",void 0),Object(r.a)(this,"_minZoom",void 0),Object(r.a)(this,"onTileLoad",void 0),Object(r.a)(this,"_getCullBounds",Object(l.a)(o.a)),this.opts=t,this.onTileLoad=t=>{this.opts.onTileLoad(t),this.opts.maxCacheByteSize&&(this._cacheByteSize+=t.byteLength,this._resizeCache())},this._requestScheduler=new a.a({maxRequests:t.maxRequests,throttleRequests:t.maxRequests>0}),this._cache=new Map,this._tiles=[],this._dirty=!1,this._cacheByteSize=0,this._viewport=null,this._selectedTiles=null,this._frameNumber=0,this._modelMatrix=new s.a,this._modelMatrixInverse=new s.a,this.setOptions(t)}get tiles(){return this._tiles}get selectedTiles(){return this._selectedTiles}get isLoaded(){return null!==this._selectedTiles&&this._selectedTiles.every((t=>t.isLoaded))}get needsReload(){return null!==this._selectedTiles&&this._selectedTiles.some((t=>t.needsReload))}setOptions(t){Object.assign(this.opts,t),Number.isFinite(t.maxZoom)&&(this._maxZoom=Math.floor(t.maxZoom)),Number.isFinite(t.minZoom)&&(this._minZoom=Math.ceil(t.minZoom))}finalize(){for(const t of this._cache.values())t.isLoading&&t.abort();this._cache.clear(),this._tiles=[],this._selectedTiles=null}reloadAll(){for(const t of this._cache.keys()){const e=this._cache.get(t);this._selectedTiles&&this._selectedTiles.includes(e)?e.setNeedsReload():this._cache.delete(t)}}update(t,{zRange:e,modelMatrix:n}={}){const r=new s.a(n),i=!r.equals(this._modelMatrix);if(this._viewport&&t.equals(this._viewport)&&Object(u.j)(this._zRange,e)&&!i)this.needsReload&&(this._selectedTiles=this._selectedTiles.map((t=>this._getTile(t.index,!0))));else{i&&(this._modelMatrixInverse=r.clone().invert(),this._modelMatrix=r),this._viewport=t,this._zRange=e;const n=this.getTileIndices({viewport:t,maxZoom:this._maxZoom,minZoom:this._minZoom,zRange:e,modelMatrix:this._modelMatrix,modelMatrixInverse:this._modelMatrixInverse});this._selectedTiles=n.map((t=>this._getTile(t,!0))),this._dirty&&this._rebuildTree()}const o=this.updateTileStates();return this._pruneRequests(),this._dirty&&this._resizeCache(),o&&this._frameNumber++,this._frameNumber}isTileVisible(t,e){if(!t.isVisible)return!1;if(e&&this._viewport){const[n,r,i,a]=Object(o.a)({viewport:this._viewport,z:this._zRange,cullRect:e}),{bbox:s}=t;if("west"in s)return s.west<i&&s.east>n&&s.south<a&&s.north>r;const u=Math.min(s.top,s.bottom),l=Math.max(s.top,s.bottom);return s.left<i&&s.right>n&&u<a&&l>r}return!0}getTileIndices({viewport:t,maxZoom:e,minZoom:n,zRange:r,modelMatrix:i,modelMatrixInverse:a}){const{tileSize:s,extent:u,zoomOffset:l}=this.opts;return Object(o.b)({viewport:t,maxZoom:e,minZoom:n,zRange:r,tileSize:s,extent:u,modelMatrix:i,modelMatrixInverse:a,zoomOffset:l})}getTileId(t){return"".concat(t.x,"-").concat(t.y,"-").concat(t.z)}getTileZoom(t){return t.z}getTileMetadata(t){const{tileSize:e}=this.opts;return{bbox:Object(o.g)(this._viewport,t.x,t.y,t.z,e)}}getParentIndex(t){return{x:Math.floor(t.x/2),y:Math.floor(t.y/2),z:t.z-1}}updateTileStates(){const t=this.opts.refinementStrategy||c,e=new Array(this._cache.size);let n=0;for(const r of this._cache.values())e[n++]=r.isVisible,r.isSelected=!1,r.isVisible=!1;for(const r of this._selectedTiles)r.isSelected=!0,r.isVisible=!0;("function"===typeof t?t:f[t])(Array.from(this._cache.values())),n=0;for(const r of this._cache.values())if(e[n++]!==r.isVisible)return!0;return!1}_pruneRequests(){const{maxRequests:t}=this.opts,e=[];let n=0;for(const r of this._cache.values())r.isLoading&&(n++,r.isSelected||r.isVisible||e.push(r));for(;t>0&&n>t&&e.length>0;){e.shift().abort(),n--}}_rebuildTree(){const{_cache:t}=this;for(const e of t.values())e.parent=null,e.children&&(e.children.length=0);for(const e of t.values()){const t=this._getNearestAncestor(e);e.parent=t,null!==t&&void 0!==t&&t.children&&t.children.push(e)}}_resizeCache(){const{_cache:t,opts:e}=this,n=e.maxCacheSize||(e.maxCacheByteSize?1/0:5*this.selectedTiles.length),r=e.maxCacheByteSize||1/0;if(t.size>n||this._cacheByteSize>r){for(const[i,o]of t)if(o.isVisible||o.isSelected||(this._cacheByteSize-=e.maxCacheByteSize?o.byteLength:0,t.delete(i),this.opts.onTileUnload(o)),t.size<=n&&this._cacheByteSize<=r)break;this._rebuildTree(),this._dirty=!0}this._dirty&&(this._tiles=Array.from(this._cache.values()).sort(((t,e)=>t.zoom-e.zoom)),this._dirty=!1)}_getTile(t,e){const n=this.getTileId(t);let r=this._cache.get(n),o=!1;return!r&&e?(r=new i.a(t),Object.assign(r,this.getTileMetadata(r.index)),Object.assign(r,{id:n,zoom:this.getTileZoom(r.index)}),o=!0,this._cache.set(n,r),this._dirty=!0):r&&r.needsReload&&(o=!0),r&&o&&r.loadData({getData:this.opts.getTileData,requestScheduler:this._requestScheduler,onLoad:this.onTileLoad,onError:this.opts.onTileError}),r}_getNearestAncestor(t){const{_minZoom:e=0}=this;let n=t.index;for(;this.getTileZoom(n)>e;){n=this.getParentIndex(n);const t=this._getTile(n);if(t)return t}return null}}function p(t){let e=t;for(;e;){if(e.isLoaded||e.content)return e.state|=2,!0;e=e.parent}return!1}function d(t){for(const e of t.children)e.isLoaded||e.content?e.state|=2:d(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(1),i=n(357),o=n(491),a=n(492),s=n(15),u=n(366),l=n(130);const c=[0,0,0,255],f={radiusUnits:"meters",radiusScale:{type:"number",min:0,value:1},radiusMinPixels:{type:"number",min:0,value:0},radiusMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},lineWidthUnits:"meters",lineWidthScale:{type:"number",min:0,value:1},lineWidthMinPixels:{type:"number",min:0,value:0},lineWidthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},stroked:!1,filled:!0,billboard:!1,antialiasing:!0,getPosition:{type:"accessor",value:t=>t.position},getRadius:{type:"accessor",value:1},getFillColor:{type:"accessor",value:c},getLineColor:{type:"accessor",value:c},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class h extends i.a{getShaders(){return super.getShaders({vs:"#define SHADER_NAME scatterplot-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceRadius;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float lineWidthScale;\nuniform float lineWidthMinPixels;\nuniform float lineWidthMaxPixels;\nuniform float stroked;\nuniform bool filled;\nuniform bool antialiasing;\nuniform bool billboard;\nuniform int radiusUnits;\nuniform int lineWidthUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n\n  // Multiply out radius and clamp to limits\n  outerRadiusPixels = clamp(\n    project_size_to_pixel(radiusScale * instanceRadius, radiusUnits),\n    radiusMinPixels, radiusMaxPixels\n  );\n  \n  // Multiply out line width and clamp to limits\n  float lineWidthPixels = clamp(\n    project_size_to_pixel(lineWidthScale * instanceLineWidths, lineWidthUnits),\n    lineWidthMinPixels, lineWidthMaxPixels\n  );\n\n  // outer radius needs to offset by half stroke width\n  outerRadiusPixels += stroked * lineWidthPixels / 2.0;\n\n  // Expand geometry to accomodate edge smoothing\n  float edgePadding = antialiasing ? (outerRadiusPixels + SMOOTH_EDGE_RADIUS) / outerRadiusPixels : 1.0;\n\n  // position on the containing square in [-1, 1] space\n  unitPosition = edgePadding * positions.xy;\n  geometry.uv = unitPosition;\n  geometry.pickingColor = instancePickingColors;\n\n  innerUnitRadius = 1.0 - stroked * lineWidthPixels / outerRadiusPixels;\n  \n  if (billboard) {\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n    vec3 offset = edgePadding * positions * outerRadiusPixels;\n    DECKGL_FILTER_SIZE(offset, geometry);\n    gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n  } else {\n    vec3 offset = edgePadding * positions * project_pixel_size(outerRadiusPixels);\n    DECKGL_FILTER_SIZE(offset, geometry);\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);\n  }\n\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  // Apply opacity to instance color, or return instance picking color\n  vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n  DECKGL_FILTER_COLOR(vFillColor, geometry);\n  vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n  DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME scatterplot-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool filled;\nuniform float stroked;\nuniform bool antialiasing;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n  geometry.uv = unitPosition;\n\n  float distToCenter = length(unitPosition) * outerRadiusPixels;\n  float inCircle = antialiasing ? \n    smoothedge(distToCenter, outerRadiusPixels) : \n    step(distToCenter, outerRadiusPixels);\n\n  if (inCircle == 0.0) {\n    discard;\n  }\n\n  if (stroked > 0.5) {\n    float isLine = antialiasing ? \n      smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter) :\n      step(innerUnitRadius * outerRadiusPixels, distToCenter);\n\n    if (filled) {\n      gl_FragColor = mix(vFillColor, vLineColor, isLine);\n    } else {\n      if (isLine == 0.0) {\n        discard;\n      }\n      gl_FragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);\n    }\n  } else if (filled) {\n    gl_FragColor = vFillColor;\n  } else {\n    discard;\n  }\n\n  gl_FragColor.a *= inCircle;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceRadius:{size:1,transition:!0,accessor:"getRadius",defaultValue:1},instanceFillColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(t){if(super.updateState(t),t.changeFlags.extensionsChanged){var e;const{gl:t}=this.context;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}){const{radiusUnits:e,radiusScale:n,radiusMinPixels:r,radiusMaxPixels:i,stroked:o,filled:a,billboard:u,antialiasing:l,lineWidthUnits:c,lineWidthScale:f,lineWidthMinPixels:h,lineWidthMaxPixels:p}=this.props;this.state.model.setUniforms(t).setUniforms({stroked:o?1:0,filled:a,billboard:u,antialiasing:l,radiusUnits:s.e[e],radiusScale:n,radiusMinPixels:r,radiusMaxPixels:i,lineWidthUnits:s.e[c],lineWidthScale:f,lineWidthMinPixels:h,lineWidthMaxPixels:p}).draw()}_getModel(t){return new u.a(t,{...this.getShaders(),id:this.props.id,geometry:new l.a({drawMode:6,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0})}}Object(r.a)(h,"defaultProps",f),Object(r.a)(h,"layerName","ScatterplotLayer")},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return i}));var r=n(304);function i(){return!("object"===typeof t&&"[object process]"===String(t)&&!t.browser)||Object(r.a)()}}).call(this,n(68))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(6);function i(t,e,n){const{removedProps:i={},deprecatedProps:o={},replacedProps:a={}}=n;for(const u in i)if(u in e){const e=i[u]?"".concat(t,".").concat(i[u]):"N/A";r.k.removed("".concat(t,".").concat(u),e)()}for(const u in o)if(u in e){const e=o[u];r.k.deprecated("".concat(t,".").concat(u),"".concat(t,".").concat(e))()}let s=null;for(const u in a)if(u in e){const n=a[u];r.k.deprecated("".concat(t,".").concat(u),"".concat(t,".").concat(n))(),s=s||Object.assign({},e),s[n]=e[u],delete s[u]}return s||e}},function(t,e,n){"use strict";n.r(e),n.d(e,"calculatePositionAndZoom",(function(){return i})),n.d(e,"wrapLineStringAsCollection",(function(){return o})),n.d(e,"wrapCoordinatesAsLineStringInCollection",(function(){return a}));var r=n(115),i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:780,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400,i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;t.forEach((function(t){i=Math.min(i,t.position[0]),a=Math.min(a,t.position[1]),o=Math.max(o,t.position[0]),s=Math.max(s,t.position[1])}));var u=new r.a,l=u.fitBounds([[i,a],[o,s]],{width:e,height:n,padding:70});return{latitude:l.latitude,longitude:l.longitude,zoom:l.zoom}},o=function(t){return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}},a=function(t){return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}}]}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r="#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 i={lightSources:{}};function o(){let{color:t=[0,0,0],intensity:e=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.map((t=>t*e/255))}function a(t){let{ambientLight:e,pointLights:n=[],directionalLights:r=[]}=t;const i={};return i["lighting_uAmbientLight.color"]=e?o(e):[0,0,0],n.forEach(((t,e)=>{i["lighting_uPointLight[".concat(e,"].color")]=o(t),i["lighting_uPointLight[".concat(e,"].position")]=t.position,i["lighting_uPointLight[".concat(e,"].attenuation")]=t.attenuation||[1,0,0]})),i.lighting_uPointLightCount=n.length,r.forEach(((t,e)=>{i["lighting_uDirectionalLight[".concat(e,"].color")]=o(t),i["lighting_uDirectionalLight[".concat(e,"].direction")]=t.direction})),i.lighting_uDirectionalLightCount=r.length,i}const s={name:"lights",vs:r,fs:r,getUniforms:function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;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({},a({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}}},function(t,e,n){"use strict";n.r(e),n.d(e,"rehydrateStoreFromURL",(function(){return s})),n.d(e,"persistStoreToURL",(function(){return u})),n.d(e,"readSnapshotFromURL",(function(){return l})),n.d(e,"writeSnapshotToURL",(function(){return c}));var r=n(2),i=n(184),o=n.n(i),a=n(200),s=function(t,e){if("object"===typeof window&&o.a.parse(window.location.search)[t])try{var n=l(t);Object(r.applySnapshot)(e,n)}catch(i){}},u=function(t,e){Object(r.onPatch)(e,(function(n){var i=Object(r.getSnapshot)(e);c(t,i)}))},l=function(t){if("object"===typeof window&&o.a.parse(window.location.search)[t])try{var e=atob(o.a.parse(window.location.search)[t]);return JSON.parse(e)}catch(n){}},c=Object(a.throttle)((function(t,e){var n=btoa(JSON.stringify(e)),r=o.a.parse(window.location.search);r[t]=n;var i=new URL(window.location);i.search=o.a.stringify(r),window.history.pushState(null,null,i.toString())}),500)},function(t,e,n){t.exports={OverlayCreatorAddLayerPanel:"OverlayCreatorAddLayerPanel-module__OverlayCreatorAddLayerPanel___3oXnR",wrap:"OverlayCreatorAddLayerPanel-module__wrap___pK2g5",panel:"OverlayCreatorAddLayerPanel-module__panel___1lT1O",tabs:"OverlayCreatorAddLayerPanel-module__tabs___2FpEs",uploadButton:"OverlayCreatorAddLayerPanel-module__uploadButton___1ucr2",urlButton:"OverlayCreatorAddLayerPanel-module__urlButton___eFipz",existingButton:"OverlayCreatorAddLayerPanel-module__existingButton___1Q8uo",isActive:"OverlayCreatorAddLayerPanel-module__isActive___16BSf",isDisabled:"OverlayCreatorAddLayerPanel-module__isDisabled___3-Lmw",uploadInputs:"OverlayCreatorAddLayerPanel-module__uploadInputs___-erMW",urlInputs:"OverlayCreatorAddLayerPanel-module__urlInputs___t0XbI"}},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/sprites/map-points@1-2fdb26b40ad3ea206f56f8636c13e9e0.png"},function(t,e,n){"use strict";n.d(e,"a",(function(){return z}));var r=n(185);const i={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)}}(r.PointerEventInput),r.MouseInput.prototype.handler=function(t){let e=i[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 o=r.Manager;var a=r;class s{constructor(t,e,n){this.element=t,this.callback=e,this.options={enable:!0,...n}}}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,l={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},c={doubletap:["tap"]},f={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},h={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},p={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"},d={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"};var m=n(141);const g=-1!==m.b.indexOf("firefox"),{WHEEL_EVENTS:y}=h,v="wheel",b=4.000244140625;class _ extends s{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{if(!this.options.enable)return;let e=t.deltaY;m.c.WheelEvent&&(g&&t.deltaMode===m.c.WheelEvent.DOM_DELTA_PIXEL&&(e/=m.c.devicePixelRatio),t.deltaMode===m.c.WheelEvent.DOM_DELTA_LINE&&(e*=40)),0!==e&&e%b===0&&(e=Math.floor(e/b)),t.shiftKey&&e&&(e*=.25),this.callback({type:v,center:{x:t.clientX,y:t.clientY},delta:-e,srcEvent:t,pointerType:"mouse",target:t.target})},this.events=(this.options.events||[]).concat(y),this.events.forEach((e=>t.addEventListener(e,this.handleEvent,!!m.a&&{passive:!1})))}destroy(){this.events.forEach((t=>this.element.removeEventListener(t,this.handleEvent)))}enableEventType(t,e){t===v&&(this.options.enable=e)}}const{MOUSE_EVENTS:A}=h,w="pointermove",x="pointerover",E="pointerout",O="pointerenter",S="pointerleave";class P extends s{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{this.handleOverEvent(t),this.handleOutEvent(t),this.handleEnterEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)},this.pressed=!1;const{enable:r}=this.options;this.enableMoveEvent=r,this.enableLeaveEvent=r,this.enableEnterEvent=r,this.enableOutEvent=r,this.enableOverEvent=r,this.events=(this.options.events||[]).concat(A),this.events.forEach((e=>t.addEventListener(e,this.handleEvent)))}destroy(){this.events.forEach((t=>this.element.removeEventListener(t,this.handleEvent)))}enableEventType(t,e){t===w&&(this.enableMoveEvent=e),t===x&&(this.enableOverEvent=e),t===E&&(this.enableOutEvent=e),t===O&&(this.enableEnterEvent=e),t===S&&(this.enableLeaveEvent=e)}handleOverEvent(t){this.enableOverEvent&&"mouseover"===t.type&&this._emit(x,t)}handleOutEvent(t){this.enableOutEvent&&"mouseout"===t.type&&this._emit(E,t)}handleEnterEvent(t){this.enableEnterEvent&&"mouseenter"===t.type&&this._emit(O,t)}handleLeaveEvent(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this._emit(S,t)}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._emit(w,t);break;case"mouseup":this.pressed=!1}}_emit(t,e){this.callback({type:t,center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})}}const{KEY_EVENTS:C}=h,T="keydown",k="keyup";class I extends s{constructor(t,e,n){super(t,e,n),this.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:T,srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:k,srcEvent:t,key:t.key,target:t.target}))},this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=(this.options.events||[]).concat(C),t.tabIndex=this.options.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===T&&(this.enableDownEvent=e),t===k&&(this.enableUpEvent=e)}}const L="contextmenu";class j extends s{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{this.options.enable&&this.callback({type:L,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})},t.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(t,e){t===L&&(this.options.enable=e)}}const M={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};function R(t){const e=M[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r,which:i}=t.srcEvent;let o=!1,a=!1,s=!1;return 4===e||2===e&&!Number.isFinite(n)?(o=1===i,a=2===i,s=3===i):2===e?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===e&&(o=0===r,a=1===r,s=2===r),{leftButton:o,middleButton:a,rightButton:s}}function N(t,e){const n=t.center;if(!n)return null;const r=e.getBoundingClientRect(),i=r.width/e.offsetWidth||1,o=r.height/e.offsetHeight||1;return{center:n,offsetCenter:{x:(n.x-r.left-e.clientLeft)/i,y:(n.y-r.top-e.clientTop)/o}}}const D={srcElement:"root",priority:0};class F{constructor(t){this.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")},this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this._active=!1}isEmpty(){return!this._active}add(t,e,n,r=!1,i=!1){const{handlers:o,handlersByElement:a}=this;let s=D;"string"===typeof n||n&&n.addEventListener?s={...D,srcElement:n}:n&&(s={...D,...n});let u=a.get(s.srcElement);u||(u=[],a.set(s.srcElement,u));const l={type:t,handler:e,srcElement:s.srcElement,priority:s.priority};r&&(l.once=!0),i&&(l.passive=!0),o.push(l),this._active=this._active||!l.passive;let c=u.length-1;for(;c>=0&&!(u[c].priority>=l.priority);)c--;u.splice(c+1,0,l)}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))}_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 a=0;a<n.length;a++){const{type:s,handler:u,once:l}=n[a];if(u({...t,type:s,stopPropagation:r,stopImmediatePropagation:i}),l&&o.push(n[a]),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.getElement();return{...t,...R(t),...N(t,e),preventDefault:()=>{t.srcEvent.preventDefault()},stopImmediatePropagation:null,stopPropagation:null,handled:!1,rootElement:e}}}const B={events:null,recognizers:null,recognizerOptions:{},Manager:o,touchAction:"none",tabIndex:0};class z{constructor(t=null,e){this._onBasicInput=t=>{const{srcEvent:e}=t,n=f[e.type];n&&this.manager.emit(n,t)},this._onOtherEvent=t=>{this.manager.emit(t.type,t)},this.options={...B,...e},this.events=new Map,this.setElement(t);const{events:n}=this.options;n&&this.on(n)}getElement(){return this.element}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(l).forEach((t=>{const e=this.manager.get(t);e&&l[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 _(t,this._onOtherEvent,{enable:!1}),this.moveInput=new P(t,this._onOtherEvent,{enable:!1}),this.keyInput=new I(t,this._onOtherEvent,{enable:!1,tabIndex:e.tabIndex}),this.contextmenuInput=new j(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=c[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:a}=this,s=d[t]||t;let u=a.get(s);u||(u=new F(this),a.set(s,u),u.recognizerName=p[s]||s,o&&o.on(s,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=d[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)}}}},function(t,e,n){"use strict";n.r(e),n.d(e,"ActivityLogEntry",(function(){return b})),n.d(e,"ActivityLog",(function(){return _}));var r=n(0),i=n.n(r),o=n(14),a=n(117),s=n.n(a),u=n(62),l=n(559),c=n(367),f=n(82),h=n(54),p=n(560);function d(){d=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function m(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function g(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return y(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 y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(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=function(t){return f.DateTime.fromISO(t).toLocaleString(f.DateTime.DATE_FULL)},b=function(t){var e=t.entry,n=t.subjectMeta,r=t.key,o=void 0===r?10*Math.random():r,a=t.html,u=void 0===a?Object(p.activityStringForEntity)({entry:e,subjectMeta:n}):a;return i.a.createElement("li",{key:"".concat(o)},i.a.createElement("span",{className:s.a.action,dangerouslySetInnerHTML:{__html:u}}),i.a.createElement("span",{className:s.a.date},v(e.time)))},_=function(t){var e=t.children;return i.a.createElement("div",{className:s.a.ActivityLog},i.a.createElement("h3",null,"Recent activity"),i.a.createElement("ul",null,e))};e.default=function(t){var e=t.item,n=t.showActivityLog,a=void 0!==n&&n,f=t.showFavourites,p=void 0===f||f,y=t.showViewcounts,A=void 0===y||y,w=t.showColophon,x=void 0===w||w,E=g(Object(r.useState)([]),2),O=E[0],S=E[1],P=g(Object(r.useState)(0),2),C=P[0],T=P[1],k=g(Object(r.useState)(0),2),I=k[0],L=k[1],j=g(Object(r.useState)({}),2),M=j[0],R=j[1],N=g(Object(r.useState)(!1),2),D=N[0],F=N[1];return Object(r.useEffect)((function(){var t=function(){var t,n=(t=d().mark((function t(){var n;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(l.fetchItemEventsQuery)({gid:Object(c.toGid)(e)});case 2:n=t.sent,F(!0),T(n.favourites.aggregate.count),L(n.views.aggregate.count),n.activity_logs.length>0&&(S(n.activity_logs[0].entries),R(n.activity_logs[0].subject_meta));case 7:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){m(o,r,i,a,s,"next",t)}function s(t){m(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();t()}),[e]),i.a.createElement(i.a.Fragment,null,D&&i.a.createElement(i.a.Fragment,null,x&&i.a.createElement("div",{className:s.a.Colophon},i.a.createElement("div",{className:s.a.row},i.a.createElement("div",{className:s.a.counts},A&&i.a.createElement("span",{className:s.a.views},I),p&&i.a.createElement("span",{className:s.a.favourites},C)),M.user_name&&M.user_path&&i.a.createElement("div",{className:s.a.profile},i.a.createElement("div",{className:s.a.textContent},i.a.createElement("span",null,"Created by "),i.a.createElement(o.a,{to:M.user_path},M.user_name),M.created_at&&i.a.createElement("span",{className:s.a.date}," on ",v(M.created_at)," ")),M.user_image_url&&i.a.createElement(u.default,{url:M.user_image_url,parameters:{w:60,h:60,fit:"crop"}})))),a&&O.length>0&&i.a.createElement(_,null,O.map((function(t,e){return b({entry:t,subjectMeta:M,key:"entry-".concat(e)})})))),!D&&i.a.createElement(h.default,null))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1088),s=n.n(a);e.default=Object(o.a)((function(t){var e=t.children;return i.a.createElement("div",{className:s.a.SidebarTextContent},e)}))},function(t,e,n){"use strict";n.r(e),n.d(e,"BrowseIndexTrayOverview",(function(){return S}));var r=n(0),i=n.n(r),o=n(7),a=n(30),s=n(17),u=n(307),l=n(77),c=n(8),f=n.n(c),h=n(680),p=n.n(h),d=n(148),m=n(63),g=n(54),y=n(70),v=n(78),b=n(277),_=n(144),A=n(202),w=["filterByType","title"];function x(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return E(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 E(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(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(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}var S=Object(o.a)((function(t){var e=Object(s.useStore)().cardItems.count;return!e>0?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{className:p.a.BrowseIndexTrayOverview},i.a.createElement("h1",null,f.a.t(t.type)),i.a.createElement(b.default,{counts:{item:e}}))}));e.default=Object(o.a)((function(t){var e=t.filterByType,n=t.title,o=(O(t,w),Object(s.useStore)()),c=o.adjustLayoutScroll,h=o.cardItems,b=o.reloadCardItems,E=(o.searchResults,o.mapRefIsSet),S=o.cardItems.loading,P=o.contentTypes,C=o.mapViewport,T=C.latitude,k=C.longitude,I=C.zoom,L=C.pitch,j=C.bearing,M=x(Object(u.default)(h,S),1)[0];Object(l.useParentContext)({clear:!0}),Object(r.useEffect)((function(){c("bottom")}));var R=e?[].concat(e):P.contentTypeValues;if(h.filter.setSearchParameter("type",R),Object(r.useEffect)((function(){E&&b()}),[E]),Object(r.useEffect)((function(){E&&b()}),[T,k,I,L,j]),S.didFail)return i.a.createElement(m.default,null,i.a.createElement(A.default,{contentType:"browse",viewType:"index"}));var N=h.results.map((function(t,e){var n="/map/".concat(t.type,"s/").concat(t.slug);return i.a.createElement(_.default,{key:"card-".concat(e,"-").concat(t.slug),path:n,randomEnterDelay:!0,item:t})}));return i.a.createElement("div",{className:p.a.BrowseIndex},i.a.createElement(v.default,{title:n,description:f.a.t("components.browse.description"),appendSiteDescription:!0}),i.a.createElement(a.a,null,i.a.createElement(a.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(m.default,null,i.a.createElement(y.default,null,i.a.createElement("h1",null,n)),0===N.length&&S.isLoading&&i.a.createElement(g.default,null),0===N.length&&!S.isLoading&&i.a.createElement("p",null,f.a.t("components.global.empty")),N.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement(d.default,null,N),S.isLoading&&i.a.createElement(g.default,null)),i.a.createElement("div",{style:{margin:0},ref:M})))))}))},function(t,e,n){"use strict";n.r(e),n.d(e,"CollectionViewTrayOverview",(function(){return z}));var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(17),u=n(307),l=n(8),c=n.n(l),f=n(18),h=n(102),p=n(77),d=n(558),m=n(373),g=n.n(m),y=n(193),v=n(339),b=n(194),_=n(280),A=n(63),w=n(62),x=n(54),E=n(70),O=n(127),S=n(148),P=n(731),C=n(471),T=n(78),k=n(283),I=n(431),L=n(252),j=n(144),M=n(202),R=n(616),N=n(733);function D(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return F(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 F(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(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 B=Object(o.a)((function(t){var e=t.collection,n=Object(f.hasFeature)("ugc");return i.a.createElement(b.default,{title:c.a.t(e.type)},n&&e.user&&i.a.createElement("span",null,c.a.t("by")," ",i.a.createElement(a.a,{to:"/map/contribute/user/".concat(e.user.id)},e.user.name)),!e.isTrail&&i.a.createElement("span",{className:g.a.date},"".concat(e.items.count," ").concat(1===e.items.count?c.a.t("item"):c.a.t("items"))),e.isTrail&&i.a.createElement("span",{className:g.a.date},"".concat(e.items.count," ").concat(1===e.items.count?c.a.t("stop"):c.a.t("stops"))),e.isTrail&&e.metadata.distance&&i.a.createElement("span",null,e.metadata.distance),e.isTrail&&e.metadata.duration&&i.a.createElement("span",null,e.metadata.duration),function(){var t;if(e.isTrail?t=c.a.t("start_trail"):e.isRoute?t=c.a.t("start_route"):e.isTimeline&&(t=c.a.t("start_timeline")),e.items.results.length&&!e.isCollection){var n=e.items.results.length>0?Object(h.getPath)(e.items.results[0]):"/";return i.a.createElement(a.a,{className:"button",to:n},t)}return null}())})),z=Object(o.a)((function(t){var e=Object(s.useStore)().collection;return e?i.a.createElement("div",{className:g.a.CollectionViewTrayOverview},i.a.createElement(B,{collection:e}),i.a.createElement("h1",null,e.name),e.terms.length>0&&i.a.createElement(v.default,{terms:e.terms}),i.a.createElement("article",{dangerouslySetInnerHTML:{__html:e.excerpt}}),Object(f.hasFeature)("booth_map_features")&&i.a.createElement(i.a.Fragment,null,i.a.createElement(N.default,null),i.a.createElement(R.default,{collection:e})),i.a.createElement("button",{className:g.a.openTrayButton,onClick:function(){return setTrayVisible(!trayVisible)}},c.a.t("open_tray_to_read_in_full"))):null}));e.default=Object(o.a)((function(t){t.location;var e=Object(s.useStore)(),n=e.setCollectionSlug,r=e.unlockPoints,o=e.collection,a=e.loading,l=Object(p.useParentContext)({currentItem:o}),h=D(Object(u.default)(o.items,a),1)[0],m=Object(f.hasFeature)("activity_logs"),v=c.a.t(o.type).toLocaleLowerCase(c.a.locale);Object(d.default)(null!==o&&void 0!==o&&o.associated_overlay_group_slug?o:l||null);var b=Object(f.hasFeature)("routes"),N=Object(f.hasFeature)("timelines");if(a.didFail)return i.a.createElement(A.default,null,i.a.createElement(M.default,{contentType:"collection",viewType:"item"}));return i.a.createElement("div",{className:g.a.CollectionView},i.a.createElement(T.default,{title:o.name,description:o.sanitised_content,image:o&&o.image?o.image.url:void 0}),i.a.createElement(A.default,null,!!l&&i.a.createElement(i.a.Fragment,null,i.a.createElement(k.default,null),(b||N)&&(l.isRoute||l.isTimeline)&&i.a.createElement(I.default,{entity:l,currentItem:o})),!l&&(b||N)&&(o.isTimeline||o.isRoute)&&i.a.createElement(I.default,{entity:o}),i.a.createElement("div",{className:g.a.trayHeader},i.a.createElement(y.default,{callback:function(){n(null),r()}}," ",c.a.t("close_collection")," "),i.a.createElement(E.default,null,i.a.createElement("h1",null,o.name)),i.a.createElement(B,{collection:o})),o.image&&i.a.createElement(_.default,null,i.a.createElement(w.default,Object.assign({},o.image,{parameters:{ar:"3:2"},options:{minWidth:400,maxWidth:1024},sizes:{"(min-width:1400px)":"840px","(max-width: 399px)":"400px","(max-width: 599px)":"600px","(max-width: 799px)":"800px","(max-width:1024px)":"1024px","(max-width:1199px)":"600px","(max-width:1399px)":"700px"},loading:"eager"}))),o.sanitised_content&&i.a.createElement(O.default,{layoutType:"centred"},i.a.createElement("div",{dangerouslySetInnerHTML:{__html:o.sanitised_content}})),o.items.loading.isLoading&&i.a.createElement(x.default,null),o.items&&i.a.createElement(i.a.Fragment,null,(o.sanitised_content||o.image)&&i.a.createElement("h2",null,c.a.t("components.collections.collection_view.subtitle",{type:v})),i.a.createElement(S.default,null,o.items.results.map((function(t,e){return i.a.createElement(j.default,{key:"card-".concat(e,"-").concat(t.slug),path:t.path,item:t,trailOrdinalPosition:o.isTrail?e+1:null})})))),Object(f.hasFeature)("booth_map_features")&&i.a.createElement(R.default,{collection:o}),o.hasCTA&&i.a.createElement(C.default,{title:o.cta.title,buttonText:o.cta.button_text,description:o.cta.description,url:o.cta.url}),m&&i.a.createElement(L.default,{item:o,showActivityLog:!0}),i.a.createElement(P.default,{collection:o}),i.a.createElement("div",{style:{margin:0},ref:h})))}))},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}var i=n(517);t.exports=function(){function t(t){var e=this;this.locale={strings:{},pluralize:function(t){return 1===t?0:1}},Array.isArray(t)?t.forEach((function(t){return e._apply(t)})):this._apply(t)}var e=t.prototype;return e._apply=function(t){if(t&&t.strings){var e=this.locale;this.locale=r({},e,{strings:r({},e.strings,t.strings)}),this.locale.pluralize=t.pluralize||e.pluralize}},e.interpolate=function(t,e){var n=String.prototype,r=n.split,o=n.replace,a=/\$/g,s=[t];for(var u in e)if("_"!==u&&i(e,u)){var l=e[u];"string"===typeof l&&(l=o.call(e[u],a,"$$$$")),s=c(s,new RegExp("%\\{"+u+"\\}","g"),l)}return s;function c(t,e,n){var i=[];return t.forEach((function(t){if("string"!==typeof t)return i.push(t);r.call(t,e).forEach((function(t,e,r){""!==t&&i.push(t),e<r.length-1&&i.push(n)}))})),i}},e.translate=function(t,e){return this.translateArray(t,e).join("")},e.translateArray=function(t,e){if(!i(this.locale.strings,t))throw new Error("missing string: "+t);var n=this.locale.strings[t];if("object"===typeof n){if(e&&"undefined"!==typeof e.smart_count){var r=this.locale.pluralize(e.smart_count);return this.interpolate(n[r],e)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return this.interpolate(n,e)},t}()},function(t,e){t.exports=function(t){return Array.prototype.slice.call(t||[],0)}},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return i(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(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.")}()}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){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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(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 u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.ImmutableFeatureCollection=void 0;var l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,"featureCollection",void 0),this.featureCollection=e}var e,n,i;return e=t,(n=[{key:"getObject",value:function(){return this.featureCollection}},{key:"replacePosition",value:function(t,e,n){var r=this.featureCollection.features[t].geometry,i="Polygon"===r.type||"MultiPolygon"===r.type,o=a({},r,{coordinates:f(r.coordinates,e,n,i)});return this.replaceGeometry(t,o)}},{key:"removePosition",value:function(t,e){var n=this.featureCollection.features[t].geometry;if("Point"===n.type)throw Error("Can't remove a position from a Point or there'd be nothing left");if("MultiPoint"===n.type&&n.coordinates.length<2)throw Error("Can't remove the last point of a MultiPoint or there'd be nothing left");if("LineString"===n.type&&n.coordinates.length<3)throw Error("Can't remove position. LineString must have at least two positions");if("Polygon"===n.type&&n.coordinates[0].length<5&&Array.isArray(e)&&0===e[0])throw Error("Can't remove position. Polygon's outer ring must have at least four positions");if("MultiLineString"===n.type&&1===n.coordinates.length&&n.coordinates[0].length<3)throw Error("Can't remove position. MultiLineString must have at least two positions");if("MultiPolygon"===n.type&&1===n.coordinates.length&&n.coordinates[0][0].length<5&&Array.isArray(e)&&0===e[0]&&0===e[1])throw Error("Can't remove position. MultiPolygon's outer ring must have at least four positions");var r="Polygon"===n.type||"MultiPolygon"===n.type,i=a({},n,{coordinates:h(n.coordinates,e,r)});return function(t){switch(t.type){case"Polygon":!function(t){for(var e=t.coordinates,n=1;n<e.length;n++)d(e,n)&&n--}(t);break;case"MultiLineString":!function(t){for(var e=0;e<t.coordinates.length;e++)1===t.coordinates[e].length&&(t.coordinates.splice(e,1),e--)}(t);break;case"MultiPolygon":!function(t){for(var e=0;e<t.coordinates.length;e++){var n=t.coordinates[e];n[0].length<=3&&(t.coordinates.splice(e,1),e--);for(var r=1;r<n.length;r++)d(n,r)&&r--}}(t)}}(i),this.replaceGeometry(t,i)}},{key:"addPosition",value:function(t,e,n){var r=this.featureCollection.features[t].geometry;if("Point"===r.type)throw new Error("Unable to add a position to a Point feature");var i="Polygon"===r.type||"MultiPolygon"===r.type,o=a({},r,{coordinates:p(r.coordinates,e,n,i)});return this.replaceGeometry(t,o)}},{key:"replaceGeometry",value:function(e,n){var i=a({},this.featureCollection.features[e],{geometry:n});return new t(a({},this.featureCollection,{features:[].concat(r(this.featureCollection.features.slice(0,e)),[i],r(this.featureCollection.features.slice(e+1)))}))}},{key:"addFeature",value:function(t){return this.addFeatures([t])}},{key:"addFeatures",value:function(e){return new t(a({},this.featureCollection,{features:[].concat(r(this.featureCollection.features),r(e))}))}},{key:"deleteFeature",value:function(t){return this.deleteFeatures([t])}},{key:"deleteFeatures",value:function(e){var n=r(this.featureCollection.features);e.sort();for(var i=e.length-1;i>=0;i--){var o=e[i];o>=0&&o<n.length&&n.splice(o,1)}return new t(a({},this.featureCollection,{features:n}))}}])&&s(e.prototype,n),i&&s(e,i),t}();function c(t,e){if(2===t.length&&3===e.length){var n=e[2];return[t[0],t[1],n]}return t}function f(t,e,n,i){if(!e)return t;if(0===e.length)return c(n,t);if(1===e.length){var o=[].concat(r(t.slice(0,e[0])),[c(n,t[e[0]])],r(t.slice(e[0]+1)));return!i||0!==e[0]&&e[0]!==t.length-1||(o[0]=c(n,t[0]),o[t.length-1]=c(n,t[0])),o}return[].concat(r(t.slice(0,e[0])),[f(t[e[0]],e.slice(1,e.length),n,i)],r(t.slice(e[0]+1)))}function h(t,e,n){if(!e)return t;if(0===e.length)throw Error("Must specify the index of the position to remove");if(1===e.length){var i=[].concat(r(t.slice(0,e[0])),r(t.slice(e[0]+1)));return!n||0!==e[0]&&e[0]!==t.length-1||(0===e[0]?i[i.length-1]=i[0]:e[0]===t.length-1&&(i[0]=i[i.length-1])),i}return[].concat(r(t.slice(0,e[0])),[h(t[e[0]],e.slice(1,e.length),n)],r(t.slice(e[0]+1)))}function p(t,e,n,i){if(!e)return t;if(0===e.length)throw Error("Must specify the index of the position to remove");return 1===e.length?[].concat(r(t.slice(0,e[0])),[n],r(t.slice(e[0]))):[].concat(r(t.slice(0,e[0])),[p(t[e[0]],e.slice(1,e.length),n,i)],r(t.slice(e[0]+1)))}function d(t,e){return t[e].length<=3&&(t.splice(e,1),!0)}e.ImmutableFeatureCollection=l},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(t,e,n){"use strict";n.r(e);function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!s(t[0])||!s(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function o(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:t},e,n)}function a(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function s(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function u(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function l(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function c(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function f(t,e){c(t,(function(t,n,i,o,a){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(r(t,i,{bbox:o,id:a}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l];if(!1===e(r({type:s,coordinates:c},i),n,l))return!1}}))}var h=function(t){if(!t)throw new Error("geojson is required");var e=[];return f(t,(function(t){!function(t,e){var n=[],r=t.geometry;if(null!==r){switch(r.type){case"Polygon":n=u(r);break;case"LineString":n=[u(r)]}n.forEach((function(n){var r=function(t,e){var n=[];return t.reduce((function(t,r){var i,a,s,u,l,c,f=o([t,r],e);return f.bbox=(a=r,s=(i=t)[0],u=i[1],l=a[0],c=a[1],[s<l?s:l,u<c?u:c,s>l?s:l,u>c?u:c]),n.push(f),r})),n}(n,t.properties);r.forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),a(e)},p=n(846),d=n.n(p);function m(t,e){var n=u(t),r=u(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var o=n[0][0],a=n[0][1],s=n[1][0],l=n[1][1],c=r[0][0],f=r[0][1],h=r[1][0],p=r[1][1],d=(p-f)*(s-o)-(h-c)*(l-a),m=(h-c)*(a-f)-(p-f)*(o-c),g=(s-o)*(a-f)-(l-a)*(o-c);if(0===d)return null;var y=m/d,v=g/d;return y>=0&&y<=1&&v>=0&&v<=1?i([o+y*(s-o),a+y*(l-a)]):null}e.default=function(t,e){var n={},i=[];if("LineString"===t.type&&(t=r(t)),"LineString"===e.type&&(e=r(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var o=m(t,e);return o&&i.push(o),a(i)}var s=d()();return s.load(h(e)),l(h(t),(function(t){l(s.search(t),(function(e){var r=m(t,e);if(r){var o=u(r).join(",");n[o]||(n[o]=!0,i.push(r))}}))})),a(i)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var r=n(1),i=n(368),o=n(87),a=n(300),s=n(566),u=n.n(s),l=n(27);const c=[];function f(t,e,n,r){let i=0;for(let a=e;a<n;a++){var o;i+=(null===(o=r[t[a]])||void 0===o?void 0:o.width)||0}return i}function h(t,e,n,r,i,o){let a=e,s=0;for(let u=e;u<n;u++){const e=f(t,u,u+1,i);s+e>r&&(a<u&&o.push(u),a=u,s=0),s+=e}return s}function p(t,e,n,r,i=0,o){void 0===o&&(o=t.length);const a=[];return"break-all"===e?h(t,i,o,n,r,a):function(t,e,n,r,i,o){let a=e,s=e,u=e,l=0;for(let c=e;c<n;c++)if(" "===t[c]?u=c+1:" "!==t[c+1]&&c+1!==n||(u=c+1),u>s){let e=f(t,s,u,i);l+e>r&&(a<s&&(o.push(s),a=s,l=0),e>r&&(e=h(t,s,u,r,i,o),a=o[o.length-1])),s=u,l+=e}}(t,i,o,n,r,a),a}function d(t,e,n,r,i,o){let a=0,s=0;for(let u=e;u<n;u++){const e=t[u],n=r[e];n?(s||(s=n.height),i[u]=a+n.width/2,a+=n.width):(l.a.warn("Missing character: ".concat(e," (").concat(e.codePointAt(0),")"))(),i[u]=a,a+=32)}o[0]=a,o[1]=s}function m(t,e,n,r,i){const o=Array.from(t),a=o.length,s=new Array(a),u=new Array(a),l=new Array(a),f=("break-word"===n||"break-all"===n)&&isFinite(r)&&r>0,h=[0,0],m=[0,0];let g=0,y=0,v=0;for(let b=0;b<=a;b++){const t=o[b];if("\n"!==t&&b!==a||(v=b),v>y){const t=f?p(o,n,r,i,y,v):c;for(let n=0;n<=t.length;n++){const r=0===n?y:t[n-1],a=n<t.length?t[n]:v;d(o,r,a,i,s,m);for(let t=r;t<a;t++)u[t]=g+m[1]/2,l[t]=m[0];g+=m[1]*e,h[0]=Math.max(h[0],m[0])}y=v}"\n"===t&&(s[y]=0,u[y]=0,l[y]=0,y++)}return h[1]=g,{x:s,y:u,rowWidth:l,size:h}}class g{constructor(t=5){Object(r.a)(this,"limit",void 0),Object(r.a)(this,"_cache",{}),Object(r.a)(this,"_order",[]),this.limit=t}get(t){const e=this._cache[t];return e&&(this._deleteOrder(t),this._appendOrder(t)),e}set(t,e){this._cache[t]?(this.delete(t),this._cache[t]=e,this._appendOrder(t)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[t]=e,this._appendOrder(t))}delete(t){this._cache[t]&&(delete this._cache[t],this._deleteOrder(t))}_deleteOrder(t){const e=this._order.indexOf(t);e>=0&&this._order.splice(e,1)}_appendOrder(t){this._order.push(t)}}const y={fontFamily:"Monaco, monospace",fontWeight:"normal",characterSet:function(){const t=[];for(let e=32;e<128;e++)t.push(String.fromCharCode(e));return t}(),fontSize:64,buffer:4,sdf:!1,cutoff:.25,radius:12,smoothing:.1};let v=new g(3);function b(t,e){for(let n=0;n<t.length;n++)e.data[4*n+3]=t[n]}function _(t,e,n,r){t.font="".concat(r," ").concat(n,"px ").concat(e),t.fillStyle="#000",t.textBaseline="alphabetic",t.textAlign="left"}class A{constructor(){Object(r.a)(this,"props",{...y}),Object(r.a)(this,"_key",void 0),Object(r.a)(this,"_atlas",void 0)}get texture(){return this._atlas}get mapping(){return this._atlas&&this._atlas.mapping}get scale(){return 1.2}setProps(t={}){Object.assign(this.props,t);const e=this._key;this._key=this._getKey();const n=function(t,e){let n;n="string"===typeof e?new Set(Array.from(e)):new Set(e);const r=v.get(t);if(!r)return n;for(const i in r.mapping)n.has(i)&&n.delete(i);return n}(this._key,this.props.characterSet),r=v.get(this._key);if(r&&0===n.size)return void(this._key!==e&&(this._atlas=r));const i=this._generateFontAtlas(this._key,n,r);this._atlas=i,v.set(this._key,i)}_generateFontAtlas(t,e,n){const{fontFamily:r,fontWeight:i,fontSize:o,buffer:a,sdf:s,radius:l,cutoff:c}=this.props;let f=n&&n.data;f||(f=document.createElement("canvas"),f.width=1024);const h=f.getContext("2d");_(h,r,o,i);const{mapping:p,canvasHeight:d,xOffset:m,yOffset:g}=function({characterSet:t,getFontWidth:e,fontHeight:n,buffer:r,maxCanvasWidth:i,mapping:o={},xOffset:a=0,yOffset:s=0}){let u=0,l=a;for(const h of t)if(!o[h]){const t=e(h);l+t+2*r>i&&(l=0,u++),o[h]={x:l+r,y:s+u*(n+2*r)+r,width:t,height:n},l+=t+2*r}const c=n+2*r;return{mapping:o,xOffset:l,yOffset:s+u*c,canvasHeight:(f=s+(u+1)*c,Math.pow(2,Math.ceil(Math.log2(f))))};var f}({getFontWidth:t=>h.measureText(t).width,fontHeight:1.2*o,buffer:a,characterSet:e,maxCanvasWidth:1024,...n&&{mapping:n.mapping,xOffset:n.xOffset,yOffset:n.yOffset}});if(f.height!==d){const t=h.getImageData(0,0,f.width,f.height);f.height=d,h.putImageData(t,0,0)}if(_(h,r,o,i),s){const t=new u.a(o,a,l,c,r,i),n=h.getImageData(0,0,t.size,t.size);for(const r of e)b(t.draw(r),n),h.putImageData(n,p[r].x-a,p[r].y+a)}else for(const u of e)h.fillText(u,p[u].x,p[u].y+.9*o);return{xOffset:m,yOffset:g,mapping:p,data:f,width:f.width,height:f.height}}_getKey(){const{fontFamily:t,fontWeight:e,fontSize:n,buffer:r,sdf:i,radius:o,cutoff:a}=this.props;return i?"".concat(t," ").concat(e," ").concat(n," ").concat(r," ").concat(o," ").concat(a):"".concat(t," ").concat(e," ").concat(n," ").concat(r)}}var w=n(299);const x={start:1,middle:0,end:-1},E={top:1,center:0,bottom:-1},O=[0,0,0,255],S={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,background:!1,getBackgroundColor:{type:"accessor",value:[255,255,255,255]},getBorderColor:{type:"accessor",value:O},getBorderWidth:{type:"accessor",value:0},backgroundPadding:{type:"array",value:[0,0,0,0]},characterSet:{type:"object",value:y.characterSet},fontFamily:y.fontFamily,fontWeight:y.fontWeight,lineHeight:1,outlineWidth:{type:"number",value:0,min:0},outlineColor:{type:"color",value:O},fontSettings:{},wordBreak:"break-word",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:t=>t.text},getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:O},getSize:{type:"accessor",value:32},getAngle:{type:"accessor",value:0},getTextAnchor:{type:"accessor",value:"middle"},getAlignmentBaseline:{type:"accessor",value:"center"},getPixelOffset:{type:"accessor",value:[0,0]},backgroundColor:{deprecatedFor:["background","getBackgroundColor"]}};class P extends i.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0),Object(r.a)(this,"getBoundingRect",((t,e)=>{const n=this.state.fontAtlasManager.mapping,r=this.state.getText,{wordBreak:i,maxWidth:o,lineHeight:a,getTextAnchor:s,getAlignmentBaseline:u}=this.props,l=r(t,e)||"",{size:[c,f]}=m(l,a,i,o,n);return[(x["function"===typeof s?s(t,e):s]-1)*c/2,(E["function"===typeof u?u(t,e):u]-1)*f/2,c,f]})),Object(r.a)(this,"getIconOffsets",((t,e)=>{const n=this.state.fontAtlasManager.mapping,r=this.state.getText,{wordBreak:i,maxWidth:o,lineHeight:a,getTextAnchor:s,getAlignmentBaseline:u}=this.props,l=r(t,e)||"",{x:c,y:f,rowWidth:h,size:[p,d]}=m(l,a,i,o,n),g=x["function"===typeof s?s(t,e):s],y=E["function"===typeof u?u(t,e):u],v=c.length,b=new Array(2*v);let _=0;for(let m=0;m<v;m++){const t=(1-g)*(p-h[m])/2;b[_++]=(g-1)*p/2+t+c[m],b[_++]=(y-1)*d/2+f[m]}return b}))}initializeState(){this.state={styleVersion:0,fontAtlasManager:new A}}updateState(t){const{props:e,oldProps:n,changeFlags:r}=t;(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getText))&&this._updateText();(this._updateFontAtlas()||e.lineHeight!==n.lineHeight||e.wordBreak!==n.wordBreak||e.maxWidth!==n.maxWidth)&&this.setState({styleVersion:this.state.styleVersion+1})}getPickingInfo({info:t}){return t.object=t.index>=0?this.props.data[t.index]:null,t}_updateFontAtlas(){const{fontSettings:t,fontFamily:e,fontWeight:n}=this.props,{fontAtlasManager:r,characterSet:i}=this.state,o={...t,characterSet:i,fontFamily:e,fontWeight:n};if(!r.mapping)return r.setProps(o),!0;for(const a in o)if(o[a]!==r.props[a])return r.setProps(o),!0;return!1}_updateText(){var t;const{data:e,characterSet:n}=this.props,r=null===(t=e.attributes)||void 0===t?void 0:t.getText;let i,{getText:a}=this.props,s=e.startIndices;const u="auto"===n&&new Set;if(r&&s){const{texts:t,characterCount:n}=function({value:t,length:e,stride:n,offset:r,startIndices:i,characterSet:o}){const a=t.BYTES_PER_ELEMENT,s=n?n/a:1,u=r?r/a:0,l=i[e]||Math.ceil((t.length-u)/s),c=o&&new Set,f=new Array(e);let h=t;if(s>1||u>0){h=new(0,t.constructor)(l);for(let e=0;e<l;e++)h[e]=t[e*s+u]}for(let p=0;p<e;p++){const t=i[p],e=i[p+1]||l,n=h.subarray(t,e);f[p]=String.fromCodePoint.apply(null,n),c&&n.forEach(c.add,c)}if(c)for(const p of c)o.add(String.fromCodePoint(p));return{texts:f,characterCount:l}}({...ArrayBuffer.isView(r)?{value:r}:r,length:e.length,startIndices:s,characterSet:u});i=n,a=(e,{index:n})=>t[n]}else{const{iterable:t,objectInfo:n}=Object(o.a)(e);s=[0],i=0;for(const e of t){n.index++;const t=Array.from(a(e,n)||"");u&&t.forEach(u.add,u),i+=t.length,s.push(i)}}this.setState({getText:a,startIndices:s,numInstances:i,characterSet:u||n})}renderLayers(){const{startIndices:t,numInstances:e,getText:n,fontAtlasManager:{scale:r,texture:i,mapping:o},styleVersion:s}=this.state,{data:u,_dataDiff:l,getPosition:c,getColor:f,getSize:h,getAngle:p,getPixelOffset:d,getBackgroundColor:m,getBorderColor:g,getBorderWidth:v,backgroundPadding:b,background:_,billboard:A,fontSettings:x,outlineWidth:E,outlineColor:O,sizeScale:S,sizeUnits:P,sizeMinPixels:C,sizeMaxPixels:T,transitions:k,updateTriggers:I}=this.props,L=this.getSubLayerClass("characters",a.a),j=this.getSubLayerClass("background",w.a);return[_&&new j({getFillColor:m,getLineColor:g,getLineWidth:v,padding:b,getPosition:c,getSize:h,getAngle:p,getPixelOffset:d,billboard:A,sizeScale:S/this.state.fontAtlasManager.props.fontSize,sizeUnits:P,sizeMinPixels:C,sizeMaxPixels:T,transitions:k&&{getPosition:k.getPosition,getAngle:k.getAngle,getSize:k.getSize,getFillColor:k.getBackgroundColor,getLineColor:k.getBorderColor,getLineWidth:k.getBorderWidth,getPixelOffset:k.getPixelOffset}},this.getSubLayerProps({id:"background",updateTriggers:{getPosition:I.getPosition,getAngle:I.getAngle,getSize:I.getSize,getFillColor:I.getBackgroundColor,getLineColor:I.getBorderColor,getLineWidth:I.getBorderWidth,getPixelOffset:I.getPixelOffset,getBoundingRect:{getText:I.getText,getTextAnchor:I.getTextAnchor,getAlignmentBaseline:I.getAlignmentBaseline,styleVersion:s}}}),{data:u.attributes&&u.attributes.background?{length:u.length,attributes:u.attributes.background}:u,_dataDiff:l,autoHighlight:!1,getBoundingRect:this.getBoundingRect}),new L({sdf:x.sdf,smoothing:Number.isFinite(x.smoothing)?x.smoothing:y.smoothing,outlineWidth:E,outlineColor:O,iconAtlas:i,iconMapping:o,getPosition:c,getColor:f,getSize:h,getAngle:p,getPixelOffset:d,billboard:A,sizeScale:S*r,sizeUnits:P,sizeMinPixels:C*r,sizeMaxPixels:T*r,transitions:k&&{getPosition:k.getPosition,getAngle:k.getAngle,getColor:k.getColor,getSize:k.getSize,getPixelOffset:k.getPixelOffset}},this.getSubLayerProps({id:"characters",updateTriggers:{getIcon:I.getText,getPosition:I.getPosition,getAngle:I.getAngle,getColor:I.getColor,getSize:I.getSize,getPixelOffset:I.getPixelOffset,getIconOffsets:{getText:I.getText,getTextAnchor:I.getTextAnchor,getAlignmentBaseline:I.getAlignmentBaseline,styleVersion:s}}}),{data:u,_dataDiff:l,startIndices:t,numInstances:e,getIconOffsets:this.getIconOffsets,getIcon:n})]}static set fontAtlasCacheLimit(t){!function(t){l.a.assert(Number.isFinite(t)&&t>=3,"Invalid cache limit"),v=new g(t)}(t)}}Object(r.a)(P,"defaultProps",S),Object(r.a)(P,"layerName","TextLayer")},function(t){t.exports=JSON.parse('{"collection":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":0},"collection-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":0},"collection-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":124},"overlay":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":124},"overlay-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":0},"overlay-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":0},"pin-02":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":124},"pin-02-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":124},"pin-03":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":248},"pin-03-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":248},"pin-04":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":248},"pin-04-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":248},"pin-05":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":372},"pin-05-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":372},"pin-06":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":372},"pin-06-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":372},"pin-07":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":0},"pin-07-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":0},"pin-08":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":0},"pin-08-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":0},"pin-09":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":124},"pin-09-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":124},"pin-10":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":124},"pin-10-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":124},"pin-100":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":248},"pin-100-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":248},"pin-10k":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":248},"pin-10k-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":248},"pin-1k":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":372},"pin-1k-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":372},"pin-20":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":372},"pin-20-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":372},"pin-250":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":496},"pin-250-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":496},"pin-30":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":496},"pin-30-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":496},"pin-40":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":496},"pin-40-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":496},"pin-50":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":496},"pin-50-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":496},"pin-500":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":620},"pin-500-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":620},"pin-5k":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":620},"pin-5k-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":620},"pin-60":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":620},"pin-60-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":620},"pin-70":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":620},"pin-70-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":620},"pin-80":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":744},"pin-80-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":744},"pin-90":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":744},"pin-90-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":744},"point-02":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":744},"point-02-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":744},"point-02-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":744},"point-03":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":744},"point-03-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":868},"point-03-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":868},"point-04":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":868},"point-04-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":868},"point-04-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":868},"point-05":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":868},"point-05-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":868},"point-05-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":868},"point-06":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":0},"point-06-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":0},"point-06-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":0},"point-07":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":0},"point-07-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":0},"point-07-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":0},"point-08":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":0},"point-08-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":0},"point-08-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":124},"point-09":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":124},"point-09-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":124},"point-09-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":124},"point-10":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":124},"point-10-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":124},"point-10-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":124},"point-100":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":124},"point-100-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":248},"point-100-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":248},"point-10k":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":248},"point-10k-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":248},"point-10k-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":248},"point-1k":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":248},"point-1k-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":248},"point-1k-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":248},"point-20":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":372},"point-20-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":372},"point-20-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":372},"point-250":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":372},"point-250-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":372},"point-250-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":372},"point-30":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":372},"point-30-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":372},"point-30-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":496},"point-40":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":496},"point-40-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":496},"point-40-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":496},"point-50":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":496},"point-50-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":496},"point-50-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":496},"point-500":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":496},"point-500-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":620},"point-500-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":620},"point-5k":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":620},"point-5k-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":620},"point-5k-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":620},"point-60":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":620},"point-60-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":620},"point-60-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":620},"point-70":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":744},"point-70-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":744},"point-70-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":744},"point-80":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":744},"point-80-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":744},"point-80-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":744},"point-90":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":744},"point-90-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":744},"point-90-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":868},"record":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":868},"record-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":868},"record-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":868},"trail":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":868},"trail-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":868},"trail-unrelated":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":868},"trailpin-01":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":868},"trailpin-01-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":992},"trailpin-02":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":992},"trailpin-02-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":992},"trailpin-03":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":992},"trailpin-03-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":992},"trailpin-04":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":992},"trailpin-04-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":992},"trailpin-05":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":992},"trailpin-05-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":992},"trailpin-06":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":992},"trailpin-06-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":992},"trailpin-07":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":992},"trailpin-07-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":992},"trailpin-08":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":992},"trailpin-08-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":992},"trailpin-09":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":992},"trailpin-09-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":1116},"trailpin-10":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":1116},"trailpin-10-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":1116},"trailpin-11":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":1116},"trailpin-11-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":1116},"trailpin-12":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":1116},"trailpin-12-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":1116},"trailpin-13":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":1116},"trailpin-13-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":1116},"trailpin-14":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":1116},"trailpin-14-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":1116},"trailpin-15":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":1116},"trailpin-15-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":1116},"trailpin-16":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":1116},"trailpin-16-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":1116},"trailpin-17":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":1116},"trailpin-17-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":1240},"trailpin-18":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":1240},"trailpin-18-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":1240},"trailpin-19":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":1240},"trailpin-19-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":1240},"trailpin-20":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":1240},"trailpin-20-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":1240},"trailpin-21":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":1240},"trailpin-21-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":1240},"trailpin-22":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":1240},"trailpin-22-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":1240},"trailpin-23":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":1240},"trailpin-23-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":1240},"trailpin-24":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":1240},"trailpin-24-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":1240},"trailpin-25":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":1240},"trailpin-25-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":1364},"trailpin-26":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":1364},"trailpin-26-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":1364},"trailpin-27":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":1364},"trailpin-27-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":1364},"trailpin-28":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":1364},"trailpin-28-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":1364},"trailpin-29":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":1364},"trailpin-29-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":1364},"trailpin-30":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":1364},"trailpin-30-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":1364},"trailpin-31":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":1364},"trailpin-31-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":1364},"trailpin-32":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":1364},"trailpin-32-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":1364},"trailpin-33":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":1364},"trailpin-33-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":1488},"trailpin-34":{"height":124,"pixelRatio":1,"width":86,"x":86,"y":1488},"trailpin-34-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":172,"y":1488},"trailpin-35":{"height":124,"pixelRatio":1,"width":86,"x":258,"y":1488},"trailpin-35-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":344,"y":1488},"trailpin-36":{"height":124,"pixelRatio":1,"width":86,"x":430,"y":1488},"trailpin-36-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":516,"y":1488},"trailpin-37":{"height":124,"pixelRatio":1,"width":86,"x":602,"y":1488},"trailpin-37-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":688,"y":1488},"trailpin-38":{"height":124,"pixelRatio":1,"width":86,"x":774,"y":1488},"trailpin-38-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":860,"y":1488},"trailpin-39":{"height":124,"pixelRatio":1,"width":86,"x":946,"y":1488},"trailpin-39-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1032,"y":1488},"trailpin-40":{"height":124,"pixelRatio":1,"width":86,"x":1118,"y":1488},"trailpin-40-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":1204,"y":1488},"trailpin-unknown":{"height":124,"pixelRatio":1,"width":86,"x":1290,"y":1488},"trailpin-unknown-highlighted":{"height":124,"pixelRatio":1,"width":86,"x":0,"y":1612}}')},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var r=n(31);function i(t){const e=f(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]))}}function o(t,e){const n=s({newProps:t,oldProps:e,propTypes:f(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=!1;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{all:!0};if("all"in t.updateTriggers){if(c(t,e,"all"))return{all:!0}}const n={};let r=!1;for(const i in t.updateTriggers)if("all"!==i){c(t,e,i)&&(n[i]=!0,r=!0)}return!!r&&n}(t,e)),{dataChanged:r,propsChanged:n,updateTriggersChanged:i,extensionsChanged:l(t,e),transitionsChanged:a(t,e)}}function a(t,e){if(!t.transitions)return!1;const n={},r=f(t);let i=!1;for(const o in t.transitions){const a=r[o],s=a&&a.type;("number"===s||"color"===s||"array"===s)&&u(t[o],e[o],a)&&(n[o]=!0,i=!0)}return!!i&&n}function s({newProps:t,oldProps:e,ignoreProps:n={},propTypes:r={},triggerName:i="props"}){if(e===t)return!1;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=u(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=u(t[o],e[o],r[o]);if(n)return"".concat(i,".").concat(o," ").concat(n)}}return!1}function u(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 l(t,e){if(null===e)return!0;const n=e.extensions,{extensions:r}=t;if(r===n)return!1;if(!n||!r)return!0;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 c(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 s({oldProps:i,newProps:r,triggerName:n})}function f(t){const e=t[r.d],n=e&&e.constructor;return n?n._propTypes:{}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(1),i=n(410),o=n(173),a=n(353),s=n(199),u=n(61),l=n(100),c=n(129),f=n(176),h=n(123),p=n(6);class d extends c.a{constructor(t,e){super(t,e),Object(r.a)(this,"shadowMap",void 0),Object(r.a)(this,"depthBuffer",void 0),Object(r.a)(this,"fbo",void 0),this.shadowMap=new o.a(t,{width:1,height:1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.depthBuffer=new f.a(t,{format:33189,width:1,height:1}),this.fbo=new h.a(t,{id:"shadowmap",width:1,height:1,attachments:{36064:this.shadowMap,36096:this.depthBuffer}})}render(t){const e=this.fbo;Object(p.o)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(()=>{const n=t.viewports[0],r=Object(p.e)(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 m=n(203);const g={color:[255,255,255],intensity:1},y=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],v=[0,0,0,200/255];class b{constructor(t={}){Object(r.a)(this,"id","lighting-effect"),Object(r.a)(this,"props",null),Object(r.a)(this,"shadowColor",v),Object(r.a)(this,"shadow",void 0),Object(r.a)(this,"ambientLight",null),Object(r.a)(this,"directionalLights",[]),Object(r.a)(this,"pointLights",[]),Object(r.a)(this,"shadowPasses",[]),Object(r.a)(this,"shadowMaps",[]),Object(r.a)(this,"dummyShadowMap",null),Object(r.a)(this,"programManager",void 0),Object(r.a)(this,"shadowMatrices",void 0);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:r,onViewportActive:a,views:s}){if(this.shadow){this.shadowMatrices=this._calculateMatrices(),0===this.shadowPasses.length&&this._createShadowPasses(t),this.programManager||(this.programManager=i.a.getDefaultProgramManager(t),m.a&&this.programManager.addDefaultModule(m.a)),this.dummyShadowMap||(this.dummyShadowMap=new o.a(t,{width:1,height:1}));for(let t=0;t<this.shadowPasses.length;t++){this.shadowPasses[t].render({layers:e,layerFilter:n,viewports:r,onViewportActive:a,views:s,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(m.a),this.programManager=null)}_calculateMatrices(){const t=[];for(const e of this.directionalLights){const n=(new u.a).lookAt({eye:new l.a(e.direction).negate()});t.push(n)}return t}_createShadowPasses(t){for(let e=0;e<this.directionalLights.length;e++){const n=new d(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 a.a(g),this.directionalLights.push(new s.a(y[0]),new s.a(y[1])))}}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchPlaceQuery",(function(){return i})),n.d(e,"fetchGridSquareFeatures",(function(){return o})),n.d(e,"fetchNearbyFeatures",(function(){return s})),n.d(e,"fetchAllFeatures",(function(){return a}));var r=n(147),i=function(t){return r.default.request('\n    #graphql\n    query Place($place_id: bigint!) {\n        placemaker_place(id: $place_id) {\n            id\n            name\n            description\n            bbox_ne\n            bbox_sw\n            allow_direct_access\n            embed_token\n            intro_text: settings(path: "intro_text")\n            enable_markers: settings(path: "enable_markers")\n            enable_polygons: settings(path: "enable_polygons")\n            enable_trace: settings(path: "enable_trace")\n            enable_lines: settings(path: "enable_lines")\n            grid {\n                tile_url\n                id\n            }\n            feature_layers(order_by: {position: asc}) {\n                feature_layer {\n                    id\n                    name\n                    description\n                    url\n                    annotation_field_data\n                }\n            }\n            reference_layers(order_by: {position: asc}) {\n                reference_layer {\n                    id\n                    name\n                    description\n                    url\n                    layer_type\n                    layer_color\n                    show_on_grid\n                    fill_polygons\n                    min_zoom\n                    max_zoom\n                    custom_coloring\n                }\n            }\n        }\n    }\n',t)},o=function(t){return r.default.request("\n    #graphql\n    query FeaturesQuery($grid_square_id: Int!) {\n        features: placemaker_features(where: {square_id: {_eq: $grid_square_id}}) {\n            id\n            geometry\n            properties\n            annotation_data\n            embed_metadata\n            square {\n                completed_by\n                validated_by\n            }\n        }\n    }\n",t)},a=function(t){return r.default.request("\n    #graphql\n    query AllFeaturesQuery($feature_layer_id: bigint!) {\n        features: placemaker_features(where: { feature_layer_id: { _eq: $feature_layer_id } }) {\n            id\n            geometry\n            properties\n            annotation_data\n            embed_metadata\n            square_id\n            square {\n                memorable_name\n                completed_by\n                validated_by\n            }\n        }\n    }\n",t)},s=function(t){return r.default.request("\n    #graphql\n    mutation NearbyFeaturesMutation($exclude_square_id: Int!, $specified_feature_layer_id: Int!, $bounding_box_geojson: jsonb!) {\n        nearby_features(args: { exclude_square_id: $exclude_square_id, specified_feature_layer_id: $specified_feature_layer_id, bounding_box_geojson: $bounding_box_geojson }) {\n            id\n            geometry\n            properties\n            annotation_data\n            embed_metadata\n            square {\n                completed_by\n                validated_by\n            }\n        }\n    }\n\n",t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"RouteCreatorStore",(function(){return s})),n.d(e,"routeCreatorStore",(function(){return u})),n.d(e,"RouteCreatorStoreProvider",(function(){return c})),n.d(e,"useStore",(function(){return f}));var r=n(0),i=n.n(r),o=n(2),a=n(659),s=o.types.model("RouteCreatorStore",{id:o.types.maybeNull(o.types.integer),slug:o.types.maybeNull(o.types.string),stops:o.types.array(a.default),exportedWaypoints:o.types.maybeNull(o.types.string),lines:o.types.frozen({})}).actions((function(t){return{setLines:function(e){t.lines=e,t.setExportJSON()},setStops:function(e){t.stops=e},setExportJSON:function(){var e={};t.lines.features.map((function(t){var n=t.geometry.coordinates.slice(1,-1);n.length&&(e[t.properties.id]=n)})),t.exportedWaypoints=JSON.stringify(e)},resetLines:function(){var e=t.lines;e.features.forEach((function(t){var e=t.geometry.coordinates;e.length>2&&(e=[e[0],e[e.length-1]]),t.geometry.coordinates=e})),t.setLines(e)}}})).views((function(t){return{get getLines(){return t.lines}}})),u=s.create(),l=i.a.createContext(u),c=l.Provider;function f(){var t=i.a.useContext(l);if(null===t)throw new Error("Store cannot be null, please add a context provider");return t}},function(t,e,n){"use strict";n.r(e),n.d(e,"TrailCreatorStore",(function(){return d})),n.d(e,"trailCreatorStore",(function(){return m})),n.d(e,"TrailCreatorStoreProvider",(function(){return y})),n.d(e,"useStore",(function(){return v}));var r=n(0),i=n.n(r),o=n(2),a=n(661),s=n(1333),u=n.n(s),l=n(45),c=n(246);function f(){f=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function h(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return p(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 p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(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 d=o.types.model("TrailCreatorStore",{id:o.types.maybeNull(o.types.integer),slug:o.types.maybeNull(o.types.string),stops:o.types.array(a.default),loading:o.types.maybeNull(o.types.boolean),route:o.types.array(o.types.array(o.types.number)),reorderPath:o.types.maybeNull(o.types.string),mode:o.types.maybeNull(o.types.string),trailLine:o.types.frozen({}),token:o.types.maybeNull(o.types.string)}).volatile((function(t){return{initialised:!1}})).actions((function(t){return{afterCreate:function(){t.resetTrailLine()},initialise:function(e){var n=e.stops,r=e.reorderPath,i=e.mode,o=e.trailLine,a=e.token;t.reorderPath=r,t.mode=i,t.trailLine=o?Object(c.wrapLineStringAsCollection)(o):null,t.token=a,t.stops=n,t.initialised=!0},setStopOrder:function(e){var n=t.stops.find((function(t){return t.id===e}));if(!n.order){var r=t.stops.reduce((function(t,e){return t.order>e.order?t:e}));n.order=r.order+1,t.saveStopOrder(n)}t.setLineFromStops()},clearStopsAndLine:function(){t.resetTrailLine(),t.stops.forEach((function(t){return t.order=0}))},resetTrailLine:function(){t.trailLine={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{}}]}},setLineFromStops:function(){var e=t.sortedStops.filter((function(t){return 0!==t.order})).slice().map((function(t){return[t.lng,t.lat]}));t.trailLine=Object(c.wrapCoordinatesAsLineStringInCollection)(e)},setLineFromMapData:function(e){t.trailLine=e},getMapboxRoute:Object(o.flow)(f().mark((function e(){var n,r,i,o,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"https://api.mapbox.com/directions/v5/mapbox/walking/",n="",t.sortedStops.forEach((function(e,r){n+="".concat(e.lng,",").concat(e.lat),r<t.stops.length-1&&(n+=";")})),t.loading=!0,e.next=7,fetch("".concat("https://api.mapbox.com/directions/v5/mapbox/walking/").concat(n,"?access_token=").concat("pk.eyJ1IjoiaHVtYXAtaG9zdGluZyIsImEiOiJja2MyNTRraGYxMmJnMzFtcnI1c3VrMm5uIn0.BN87tr4QlV7jPUrIyeIC6g"));case 7:if((r=e.sent).ok){e.next=10;break}throw new Error("Failed to fetch route data: ".concat(r.statusText));case 10:return e.next=12,r.json();case 12:i=e.sent,o=i.routes[0].geometry,a=u.a.decode(o),s=a.map((function(t){var e=h(t,2),n=e[0];return[e[1],n]})),t.route=s,e.next=22;break;case 19:e.prev=19,e.t0=e.catch(0),console.error("Error calculating route:",e.t0);case 22:return e.prev=22,t.loading=!1,e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[0,19,22,25]])}))),saveStopOrder:Object(o.flow)(f().mark((function e(n){var r,i,o,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(r=new URL(t.reorderPath,window.location)).searchParams.set("gid",n.id),i=r.toString(),(o=new FormData).append("position",n.order),(a=new Headers).append("X-CSRF-Token",t.token),e.next=10,fetch(i,{method:"PATCH",body:o,headers:a});case 10:(s=e.sent).ok||s.json().then((function(t){var e="Failed to update item position: ".concat(t.message);throw new Error(e)})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.error("Error saving item position:",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})))}})).views((function(t){return{get sortedStops(){return t.stops.sort((function(t,e){return t.order<e.order?-1:t.order>e.order?1:0}))},get markerData(){return t.stops.map((function(t){return{position:[t.lng,t.lat],id:t.id,order:t.order}}))},get getTrailLine(){return t.trailLine},get getTrailLineLineString(){if(getTrailLine.features[0].geometry)return t.trailLine},get trailDistanceRaw(){var e,n=0;return null!==t&&void 0!==t&&null!==(e=t.trailLine)&&void 0!==e&&e.features[0]&&(n=parseFloat(Object(l.length)(t.trailLine.features[0].geometry).toFixed(1))),n},get trailDistance(){return"".concat(t.trailDistanceRaw,"km")},get walkingTime(){var e=(7.5*t.trailDistanceRaw).toFixed(0);e<30&&(e=30);var n=Math.round(e/30),r=Math.floor(n/2),i=n%2,o="";return r&&(o+="".concat(r,"h")),i&&(o+="30m"),o},get allItemsAreOrdered(){var e=t.stops.filter((function(t){return 0==t.order}));return Boolean(!e.length)},get isRouteLoaded(){return!t.loading&&t.route.length>0},get mapboxRoute(){return t.route.toJSON()},get isInitialised(){return t.initialised},get itemCount(){return t.stops.length},get orderedItemCount(){return t.stops.filter((function(t){return 0!=t.order})).length}}})),m=d.create(),g=i.a.createContext(m),y=g.Provider;function v(){var t=i.a.useContext(g);if(null===t)throw new Error("Store cannot be null, please add a context provider");return t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return It}));var r=n(1),i=n(15),o=n(27),a=n(126),s=n(61),u=n(533),l=n(369),c=n.n(l);function f(t){for(var e,n,r=0,i=0,o=t.length-1;i<t.length;o=i++)e=t[i],r+=((n=t[o])[0]-e[0])*(e[1]+n[1]);return r}function h(t,e,n){e&&n&&(1===t?e.id=n.readVarint():2===t?function(t,e){var n=t.readVarint()+t.pos;for(;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3===t?e.type=n.readVarint():4===t&&(e._geometry=n.pos))}function p(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)}}var d=function(){function t(e,n,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"properties",void 0),Object(r.a)(this,"extent",void 0),Object(r.a)(this,"type",void 0),Object(r.a)(this,"id",void 0),Object(r.a)(this,"_pbf",void 0),Object(r.a)(this,"_geometry",void 0),Object(r.a)(this,"_keys",void 0),Object(r.a)(this,"_values",void 0),this.properties={},this.extent=i,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=o,this._values=a,e.readFields(h,this,n)}var e,n,i;return e=t,n=[{key:"loadGeometry",value:function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,r=1,i=0,o=0,a=0,s=[];t.pos<n;){if(i<=0){var u=t.readVarint();r=7&u,i=u>>3}if(i--,1===r||2===r)o+=t.readSVarint(),a+=t.readSVarint(),1===r&&(e&&s.push(e),e=[]),e&&e.push([o,a]);else{if(7!==r)throw new Error("unknown command ".concat(r));e&&e.push(e[0].slice())}}return e&&s.push(e),s}},{key:"bbox",value:function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command ".concat(n))}return[a,u,s,l]}},{key:"_toGeoJSON",value:function(e){var n,r,i=this.loadGeometry(),o=t.types[this.type];switch(this.type){case 1:var a=[];for(n=0;n<i.length;n++)a[n]=i[n][0];e(i=a,this);break;case 2:for(n=0;n<i.length;n++)e(i[n],this);break;case 3:for(i=function(t){var e=t.length;if(e<=1)return[t];for(var n,r,i=[],o=0;o<e;o++){var a=f(t[o]);0!==a&&(void 0===r&&(r=a<0),r===a<0?(n&&i.push(n),n=[t[o]]):n&&n.push(t[o]))}return n&&i.push(n),i}(i),n=0;n<i.length;n++)for(r=0;r<i[n].length;r++)e(i[n][r],this)}1===i.length?i=i[0]:o="Multi".concat(o);var s={type:"Feature",geometry:{type:o,coordinates:i},properties:this.properties};return null!==this.id&&(s.id=this.id),s}},{key:"toGeoJSON",value:function(t){if("function"===typeof t)return this._toGeoJSON(t);var e=t.x,n=t.y,r=t.z,i=this.extent*Math.pow(2,r),o=this.extent*e,a=this.extent*n;return this._toGeoJSON((function(t){for(var e=0;e<t.length;e++){var n=t[e];n[0]=360*(n[0]+o)/i-180;var r=180-360*(n[1]+a)/i;n[1]=360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90}}))}}],i=[{key:"types",get:function(){return["Unknown","Point","LineString","Polygon"]}}],n&&p(e.prototype,n),i&&p(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function m(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)}}var g=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"version",void 0),Object(r.a)(this,"name",void 0),Object(r.a)(this,"extent",void 0),Object(r.a)(this,"length",void 0),Object(r.a)(this,"_pbf",void 0),Object(r.a)(this,"_keys",void 0),Object(r.a)(this,"_values",void 0),Object(r.a)(this,"_features",void 0),this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(y,this,n),this.length=this._features.length}var e,n,i;return e=t,(n=[{key:"feature",value:function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new d(this._pbf,e,this.extent,this._keys,this._values)}}])&&m(e.prototype,n),i&&m(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t,e,n){e&&n&&(15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){var e=null,n=t.readVarint()+t.pos;for(;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n)))}function v(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 b(t,e,n){return e&&v(t.prototype,e),n&&v(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var _=b((function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"layers",void 0),this.layers=e.readFields(A,{},n)}));function A(t,e,n){if(3===t&&n){var r=new g(n,n.readVarint()+n.pos);r.length&&e&&(e[r.name]=r)}}var w,x,E,O,S,P,C,T=n(53);function k(t){var e=t.indices.length,n="Polygon";if(e<=1)return{type:n,data:t.data,areas:[[Object(T.getPolygonSignedArea)(t.data)]],indices:[t.indices]};for(var r,i,o,a=[],s=[],u=[],l=[],c=0,f=0;f<e;f++){o=t.indices[f]-c,i=t.indices[f+1]-c||t.data.length;var h=t.data.slice(o,i),p=Object(T.getPolygonSignedArea)(h);if(0!==p)void 0===r&&(r=p<0),r===p<0?(l.length&&(a.push(u),s.push(l)),l=[o],u=[p]):(u.push(p),l.push(o));else{var d=t.data.slice(0,o),m=t.data.slice(i);t.data=d.concat(m),c+=i-o}}return u&&a.push(u),l.length&&s.push(l),{type:n,areas:a,indices:s,data:t.data}}function I(t,e,n){e&&n&&(1===t?e.id=n.readVarint():2===t?function(t,e){var n=t.readVarint()+t.pos;for(;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3===t?e.type=n.readVarint():4===t&&(e._geometry=n.pos))}function L(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return j(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 j(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function j(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 M(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 R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){N(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function N(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D(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)}}var F=function(){function t(e,n,i,o,a,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"properties",void 0),Object(r.a)(this,"extent",void 0),Object(r.a)(this,"type",void 0),Object(r.a)(this,"id",void 0),Object(r.a)(this,"_pbf",void 0),Object(r.a)(this,"_geometry",void 0),Object(r.a)(this,"_keys",void 0),Object(r.a)(this,"_values",void 0),Object(r.a)(this,"_geometryInfo",void 0),this.properties={},this.extent=i,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=o,this._values=a,this._geometryInfo=s,e.readFields(I,this,n)}var e,n,i;return e=t,(n=[{key:"loadGeometry",value:function(){var t=this._pbf;t.pos=this._geometry,w=t.readVarint()+t.pos,x=1,O=0,S=0,P=0,C=0;for(var e=[],n=[];t.pos<w;)if(O<=0&&(E=t.readVarint(),x=7&E,O=E>>3),O--,1===x||2===x)S+=t.readSVarint(),P+=t.readSVarint(),1===x&&e.push(C),n.push(S,P),C+=2;else{if(7!==x)throw new Error("unknown command ".concat(x));if(C>0){var r=e[e.length-1];n.push(n[r],n[r+1]),C+=2}}return{data:n,indices:e}}},{key:"_toBinaryCoordinates",value:function(t){var e,n=this.loadGeometry();switch(t(n.data,this),this.type){case 1:this._geometryInfo.pointFeaturesCount++,this._geometryInfo.pointPositionsCount+=n.indices.length,e=R({type:"Point"},n);break;case 2:this._geometryInfo.lineFeaturesCount++,this._geometryInfo.linePathsCount+=n.indices.length,this._geometryInfo.linePositionsCount+=n.data.length/2,e=R({type:"LineString"},n);break;case 3:e=k(n),this._geometryInfo.polygonFeaturesCount++,this._geometryInfo.polygonObjectsCount+=e.indices.length;var r,i=L(e.indices);try{for(i.s();!(r=i.n()).done;){var o=r.value;this._geometryInfo.polygonRingsCount+=o.length}}catch(s){i.e(s)}finally{i.f()}this._geometryInfo.polygonPositionsCount+=e.data.length/2;break;default:throw new Error("Invalid geometry type: ".concat(this.type))}var a={type:"Feature",geometry:e,properties:this.properties};return null!==this.id&&(a.id=this.id),a}},{key:"toBinaryCoordinates",value:function(t){if("function"===typeof t)return this._toBinaryCoordinates(t);var e=t.x,n=t.y,r=t.z,i=this.extent*Math.pow(2,r),o=this.extent*e,a=this.extent*n;return this._toBinaryCoordinates((function(t){return function(t,e,n,r){for(var i=0,o=t.length;i<o;i+=2){t[i]=360*(t[i]+e)/r-180;var a=180-360*(t[i+1]+n)/r;t[i+1]=360/Math.PI*Math.atan(Math.exp(a*Math.PI/180))-90}}(t,o,a,i)}))}}])&&D(e.prototype,n),i&&D(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function B(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)}}var z=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"version",void 0),Object(r.a)(this,"name",void 0),Object(r.a)(this,"extent",void 0),Object(r.a)(this,"length",void 0),Object(r.a)(this,"_pbf",void 0),Object(r.a)(this,"_keys",void 0),Object(r.a)(this,"_values",void 0),Object(r.a)(this,"_features",void 0),this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(U,this,n),this.length=this._features.length}var e,n,i;return e=t,(n=[{key:"feature",value:function(t,e){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var n=this._pbf.readVarint()+this._pbf.pos;return new F(this._pbf,n,this.extent,this._keys,this._values,e)}}])&&B(e.prototype,n),i&&B(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function U(t,e,n){e&&n&&(15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){var e=null,n=t.readVarint()+t.pos;for(;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n)))}function G(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 V(t,e,n){return e&&G(t.prototype,e),n&&G(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var q=V((function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"layers",void 0),this.layers=e.readFields(H,{},n)}));function H(t,e,n){if(3===t&&n){var r=new z(n,n.readVarint()+n.pos);r.length&&e&&(e[r.name]=r)}}function W(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return X(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 X(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(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 Y(t,e){var n,r,i=function(t){var e;if(null===t||void 0===t||!t.mvt)throw new Error("mvt options required");var n="wgs84"===(null===(e=t.mvt)||void 0===e?void 0:e.coordinates),r=t.mvt.tileIndex,i=r&&Number.isFinite(r.x)&&Number.isFinite(r.y)&&Number.isFinite(r.z);if(n&&!i)throw new Error("MVT Loader: WGS84 coordinates need tileIndex property");return t.mvt}(e),o=(null===e||void 0===e||null===(n=e.gis)||void 0===n?void 0:n.format)||(null===e||void 0===e||null===(r=e.mvt)||void 0===r?void 0:r.shape);switch(o){case"columnar-table":return{shape:"columnar-table",data:Z(t,i)};case"geojson-row-table":return{shape:"geojson-row-table",data:K(t,i)};case"geojson":return K(t,i);case"binary-geometry":case"binary":return Z(t,i);default:throw new Error(o)}}function Z(t,e){var n=function(t,e){var n=[],r={coordLength:2,pointPositionsCount:0,pointFeaturesCount:0,linePositionsCount:0,linePathsCount:0,lineFeaturesCount:0,polygonPositionsCount:0,polygonObjectsCount:0,polygonRingsCount:0,polygonFeaturesCount:0};if(t.byteLength<=0)return[n,r];var i=new q(new c.a(t));return(e&&Array.isArray(e.layers)?e.layers:Object.keys(i.layers)).forEach((function(t){var o=i.layers[t];if(o)for(var a=0;a<o.length;a++){var s=J(o.feature(a,r),e,t);n.push(s)}})),[n,r]}(t,e),r=W(n,2),i=r[0],o=r[1],a=Object(u.a)(i,o);return a.byteLength=t.byteLength,a}function K(t,e){if(t.byteLength<=0)return[];var n=[],r=new _(new c.a(t));return(Array.isArray(e.layers)?e.layers:Object.keys(r.layers)).forEach((function(t){var i=r.layers[t];if(i)for(var o=0;o<i.length;o++){var a=$(i.feature(o),e,t);n.push(a)}})),n}function $(t,e,n){var r=t.toGeoJSON("wgs84"===e.coordinates?e.tileIndex:Q);return e.layerProperty&&(r.properties[e.layerProperty]=n),r}function J(t,e,n){var r=t.toBinaryCoordinates("wgs84"===e.coordinates?e.tileIndex:tt);return e.layerProperty&&r.properties&&(r.properties[e.layerProperty]=n),r}function Q(t,e){for(var n=e.extent,r=0;r<t.length;r++){var i=t[r];i[0]/=n,i[1]/=n}}function tt(t,e){for(var n=e.extent,r=0,i=t.length;r<i;++r)t[r]/=n}function et(t){return et="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},et(t)}function nt(){nt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==et(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function rt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function it(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 ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){at(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function at(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var st,ut,lt={name:"Mapbox Vector Tile",id:"mvt",module:"mvt",version:"3.2.12",extensions:["mvt","pbf"],mimeTypes:["application/vnd.mapbox-vector-tile","application/x-protobuf"],worker:!0,category:"geometry",options:{mvt:{shape:"geojson",coordinates:"local",layerProperty:"layerName",layers:void 0,tileIndex:null}}},ct=(ot(ot({},lt),{},{parse:(st=nt().mark((function t(e,n){return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Y(e,n));case 1:case"end":return t.stop()}}),t)})),ut=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=st.apply(t,e);function o(t){rt(i,n,r,o,a,"next",t)}function a(t){rt(i,n,r,o,a,"throw",t)}o(void 0)}))},function(t,e){return ut.apply(this,arguments)}),parseSync:Y,binary:!0}),n(493)),ft=n(641);const ht={clipBounds:[0,0,1,1]},pt="\nuniform vec4 clip_bounds;\n\nbool clip_isInBounds(vec2 position) {\n  return position.x >= clip_bounds[0] && position.y >= clip_bounds[1] && position.x < clip_bounds[2] && position.y < clip_bounds[3];\n}\n",dt={name:"clip-vs",vs:pt},mt={"vs:#decl":"\nvarying float clip_isVisible;\n","vs:DECKGL_FILTER_GL_POSITION":"\n  clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n","fs:#decl":"\nvarying float clip_isVisible;\n","fs:DECKGL_FILTER_COLOR":"\n  if (clip_isVisible < 0.5) discard;\n"},gt={name:"clip-fs",fs:pt},yt={"vs:#decl":"\nvarying vec2 clip_commonPosition;\n","vs:DECKGL_FILTER_GL_POSITION":"\n  clip_commonPosition = geometry.position.xy;\n","fs:#decl":"\nvarying vec2 clip_commonPosition;\n","fs:DECKGL_FILTER_COLOR":"\n  if (!clip_isInBounds(clip_commonPosition)) discard;\n"};class vt extends ft.a{getShaders(){let t="instancePositions"in this.getAttributeManager().attributes;return"clipByInstance"in this.props&&(t=this.props.clipByInstance),this.state.clipByInstance=t,t?{modules:[dt],inject:mt}:{modules:[gt],inject:yt}}draw({uniforms:t}){const{clipBounds:e=ht.clipBounds}=this.props;if(this.state.clipByInstance)t.clip_bounds=e;else{const n=this.projectPosition([e[0],e[1],0]),r=this.projectPosition([e[2],e[3],0]);t.clip_bounds=[Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.max(n[0],r[0]),Math.max(n[1],r[1])]}}}Object(r.a)(vt,"defaultProps",ht),Object(r.a)(vt,"extensionName","ClipExtension");var bt=n(145),_t=n(57),At=n(12);const wt={Point:xt,MultiPoint:function(t,e,n){return Et(t,e,n)},LineString:Ot,MultiLineString:function(t,e,n){return t.map((t=>Ot(t,e,n)))},Polygon:St,MultiPolygon:function(t,e,n){return t.map((t=>St(t,e,n)))}};function xt([t,e],[n,r],i){const o=Object(At.n)(n[0],r[0],t),a=Object(At.n)(n[1],r[1],e);return i.unprojectFlat([o,a])}function Et(t,e,n){return t.map((t=>xt(t,e,n)))}function Ot(t,e,n){return Et(t,e,n)}function St(t,e,n){return t.map((t=>Et(t,e,n)))}const Pt=["points","lines","polygons"];function Ct(t,e,n,r){const i=t.featureIds.value;if(!i.length)return-1;let o=0,a=i[i.length-1]+1;if(r){const e=function(t,e){if(!t.__layers){const e={},{properties:n}=t;for(let t=0;t<n.length;t++){const{layerName:r}=n[t];r&&(e[r]?e[r][1]=t:e[r]=[t,t])}t.__layers=e}return t.__layers[e]}(t,r);if(!e)return-1;o=e[0],a=e[1]+1}let s=-1;if(e in t.numericProps){const r=t.numericProps[e].value.findIndex(((t,e)=>t===n&&i[e]>=o&&i[e]<a));return r>=0?t.globalFeatureIds.value[r]:-1}return e?s=Tt(t.properties,(t=>t[e]===n),o,a):t.fields&&(s=Tt(t.fields,(t=>t.id===n),o,a)),s>=0?function(t,e){if(!t.__ids){const e=[],n=t.featureIds.value,r=t.globalFeatureIds.value;for(let t=0;t<n.length;t++)e[n[t]]=r[t];t.__ids=e}return t.__ids[e]}(t,s):-1}function Tt(t,e,n,r){for(let i=n;i<r;i++)if(e(t[i],i))return i;return-1}const kt={...a.a.defaultProps,onDataLoad:{type:"function",value:null,optional:!0,compare:!1},uniqueIdProperty:"",highlightedFeatureId:null,loaders:[lt],binary:!0};class It extends bt.a{initializeState(){super.initializeState();const t=void 0===this.context.viewport.resolution&&this.props.binary;this.setState({binary:t,data:null,tileJSON:null})}get isLoaded(){return this.state&&this.state.data&&this.state.tileset&&super.isLoaded}updateState({props:t,oldProps:e,context:n,changeFlags:r}){var i;r.dataChanged&&this._updateTileData(),null!==(i=this.state)&&void 0!==i&&i.data&&(super.updateState({props:t,oldProps:e,context:n,changeFlags:r}),this._setWGS84PropertyForTiles());const{highlightColor:o}=t;o!==e.highlightColor&&Array.isArray(o)&&this.setState({highlightColor:o})}async _updateTileData(){let t=this.props.data,e=null;if("string"!==typeof t||Object(_t.e)(t))t.tilejson&&(e=t);else{const{onDataLoad:r,fetch:i}=this.props;this.setState({data:null,tileJSON:null});try{e=await i(t,{propName:"data",layer:this,loaders:[]})}catch(n){this.raiseError(n,"loading TileJSON"),t=null}r&&r(e,{propName:"data",layer:this})}e&&(t=e.tiles),this.setState({data:t,tileJSON:e})}_getTilesetOptions(){const t=super._getTilesetOptions(),e=this.state.tileJSON,{minZoom:n,maxZoom:r}=this.props;return e&&(Number.isFinite(e.minzoom)&&e.minzoom>n&&(t.minZoom=e.minzoom),Number.isFinite(e.maxzoom)&&(!Number.isFinite(r)||e.maxzoom<r)&&(t.maxZoom=e.maxzoom)),t}renderLayers(){var t;return null!==(t=this.state)&&void 0!==t&&t.data?super.renderLayers():null}getTileData(t){var e;const{data:n,binary:r}=this.state,{index:i,signal:o}=t,a=Object(_t.c)(n,t);if(!a)return Promise.reject("Invalid URL");let s=this.getLoadOptions();const{fetch:u}=this.props;return s={...s,mimeType:"application/x-protobuf",mvt:{...null===(e=s)||void 0===e?void 0:e.mvt,coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:i},gis:r?{format:"binary"}:{}},u(a,{propName:"data",layer:this,loadOptions:s,signal:o})}renderSubLayers(t){const{x:e,y:n,z:r}=t.tile.index,u=Math.pow(2,r),l=512/u,c=-l,f=512*e/u,h=512*(1-n/u),p=(new s.a).scale([l,c,1]);t.autoHighlight=!1,this.context.viewport.resolution||(t.modelMatrix=p,t.coordinateOrigin=[f,h,0],t.coordinateSystem=i.a.CARTESIAN,t.extensions=[...t.extensions||[],new vt]);const d=super.renderSubLayers(t);return!this.state.binary||d instanceof a.a||o.a.warn("renderSubLayers() must return GeoJsonLayer when using binary:true")(),d}_updateAutoHighlight(t){const{uniqueIdProperty:e}=this.props,{hoveredFeatureId:n,hoveredFeatureLayerName:r}=this.state,i=t.object;let o,a;i&&(o=Lt(i,e),a=jt(i));let{highlightColor:s}=this.props;"function"===typeof s&&(s=s(t)),n===o&&r===a||this.setState({highlightColor:s,hoveredFeatureId:o,hoveredFeatureLayerName:a})}getPickingInfo(t){const e=super.getPickingInfo(t),n=Boolean(this.context.viewport.resolution);if(this.state.binary&&-1!==e.index){const{data:n}=t.sourceLayer.props;e.object=Object(ct.b)(n,{globalFeatureId:e.index})}return e.object&&!n&&(e.object=Rt(e.object,e.tile.bbox,this.context.viewport)),e}getSubLayerPropsByTile(t){return{highlightedObjectIndex:this.getHighlightedObjectIndex(t),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(t){const{hoveredFeatureId:e,hoveredFeatureLayerName:n,binary:r}=this.state,{uniqueIdProperty:i,highlightedFeatureId:o}=this.props,a=t.content,s=Mt(o);if(!(Mt(e)||s))return-1;const u=s?o:e;return Array.isArray(a)?a.findIndex((t=>{const e=Lt(t,i)===u,r=s||jt(t)===n;return e&&r})):a&&r?function(t,e,n,r){for(const i of Pt){const o=t[i]&&Ct(t[i],e,n,r);if(o>=0)return o}return-1}(a,i,u,s?"":n):-1}_pickObjects(t){const{deck:e,viewport:n}=this.context,r=n.width,i=n.height,o=n.x,a=n.y,s=[this.id];return e.pickObjects({x:o,y:a,width:r,height:i,layerIds:s,maxObjects:t})}getRenderedFeatures(t=null){const e=this._pickObjects(t),n=new Set,r=[];for(const i of e){const t=Lt(i.object,this.props.uniqueIdProperty);void 0===t?r.push(i.object):n.has(t)||(n.add(t),r.push(i.object))}return r}_setWGS84PropertyForTiles(){const t="dataInWGS84";this.state.tileset.selectedTiles.forEach((e=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:()=>{if(!e.content)return null;if(this.state.binary&&Array.isArray(e.content)&&!e.content.length)return[];const{bbox:t}=e;if(void 0===e._contentWGS84&&Object(_t.d)(t)){const n=this.state.binary?Object(ct.b)(e.content):e.content;e._contentWGS84=n.map((e=>Rt(e,t,this.context.viewport)))}return e._contentWGS84}})}))}}function Lt(t,e){return t.properties&&e?t.properties[e]:"id"in t?t.id:void 0}function jt(t){var e;return(null===(e=t.properties)||void 0===e?void 0:e.layerName)||null}function Mt(t){return void 0!==t&&null!==t&&""!==t}function Rt(t,e,n){const r={...t,geometry:{type:t.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>{const r=function(t,e,n){const r=[n.projectFlat([e.west,e.north]),n.projectFlat([e.east,e.south])];return{...t,coordinates:wt[t.type](t.coordinates,r,n)}}(t.geometry,e,n);return r.coordinates}}),r}Object(r.a)(It,"layerName","MVTLayer"),Object(r.a)(It,"defaultProps",kt)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return f}));var r=n(15),i=n(218),o=n(115),a=n(33),s=n(23),u=n(24);function l(t,e,n=!1){const r=e.projectPosition(t);if(n&&e instanceof o.a){const[n,i,o=0]=t,a=e.getDistanceScales([n,i]);r[2]=o*a.unitsPerMeter[2]}return r}function c(t,{viewport:e,modelMatrix:n,coordinateSystem:i,coordinateOrigin:o,offsetMode:s}){let[c,f,h=0]=t;switch(n&&([c,f,h]=a.n([],[c,f,h,1],n)),i){case r.a.LNGLAT:return l([c,f,h],e,s);case r.a.LNGLAT_OFFSETS:return l([c+o[0],f+o[1],h+(o[2]||0)],e,s);case r.a.METER_OFFSETS:return l(Object(u.b)(o,[c,f,h]),e,s);case r.a.CARTESIAN:default:return e.isGeospatial?[c+o[0],f+o[1],h+o[2]]:e.projectPosition([c,f,h])}}function f(t,e){const{viewport:n,coordinateSystem:o,coordinateOrigin:a,modelMatrix:u,fromCoordinateSystem:l,fromCoordinateOrigin:f}=function(t){const{viewport:e,modelMatrix:n,coordinateOrigin:i}=t;let{coordinateSystem:o,fromCoordinateSystem:a,fromCoordinateOrigin:s}=t;return o===r.a.DEFAULT&&(o=e.isGeospatial?r.a.LNGLAT:r.a.CARTESIAN),void 0===a&&(a=o),void 0===s&&(s=i),{viewport:e,coordinateSystem:o,coordinateOrigin:i,modelMatrix:n,fromCoordinateSystem:a,fromCoordinateOrigin:s}}(e),{geospatialOrigin:h,shaderCoordinateOrigin:p,offsetMode:d}=Object(i.a)(n,o,a),m=c(t,{viewport:n,modelMatrix:u,coordinateSystem:l,coordinateOrigin:f,offsetMode:d});if(d){const t=n.projectPosition(h||p);s.r(m,m,t)}return m}},function(t,e,n){"use strict";n.r(e),n.d(e,"hexToRGB",(function(){return r})),n.d(e,"addUniqueObjects",(function(){return i})),n.d(e,"humanize",(function(){return o}));var r=function(t){var e=0,n=0,r=0;if(4===t.length)e="0x"+t[1]+t[1],n="0x"+t[2]+t[2],r="0x"+t[3]+t[3];else{if(7!==t.length)return[255,0,0];e="0x"+t[1]+t[2],n="0x"+t[3]+t[4],r="0x"+t[5]+t[6]}return[+e,+n,+r]},i=function(t,e){var n=new Set(t.map((function(t){return JSON.stringify(t)})));return n.add(JSON.stringify(e)),Array.from(n).map((function(t){return JSON.parse(t)}))},o=function(t){var e=t.split("_");return e.length>0&&(e[0]=e[0].charAt(0).toUpperCase()+e[0].slice(1)),e.join(" ")}},function(t,e,n){t.exports={SearchForm:"SearchForm-module__SearchForm___3I7L7",primaryWrap:"SearchForm-module__primaryWrap___3Wm-G",checkBoxesWrap:"SearchForm-module__checkBoxesWrap___1RY-f",toggleWrap:"SearchForm-module__toggleWrap___3P2U-",extraLabel:"SearchForm-module__extraLabel___3TVX9",YearSlider:"SearchForm-module__YearSlider___H0jhr"}},function(t,e,n){t.exports={UserTenantProfile:"UserTenantProfile-module__UserTenantProfile___1M1fr",meta:"UserTenantProfile-module__meta___3tT7n",logoImage:"UserTenantProfile-module__logoImage___1PlX6",aboutArea:"UserTenantProfile-module__aboutArea___3E-zo",joinedDate:"UserTenantProfile-module__joinedDate___1XIBw",links:"UserTenantProfile-module__links___HsxfR",website:"UserTenantProfile-module__website___2lc6C",description:"UserTenantProfile-module__description___wvmyW"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return T}));var r=n(0),i=n.n(r),o=n(4),a=n(403),s=n(51),u=n(32),l=n(436),c=n(1676),f=n(1317);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},h.apply(this,arguments)}var p=Object(r.forwardRef)((function(t,e){var n=t.children,a=t.content,s=t.dropProps,u=t.plain,p=Object(r.useContext)(o.ThemeContext),d=Object(r.useState)(!1),m=d[0],g=d[1],y=Object(f.a)(e),v=1===r.Children.count(n)?i.a.isValidElement(n)?n:i.a.createElement("span",null,n):r.Children.only(n);return[Object(r.cloneElement)(v,{onMouseOver:function(){return g(!0)},onMouseLeave:function(){return g(!1)},onFocus:function(){return g(!0)},onBlur:function(){return g(!1)},key:"tip-child",ref:function(t){"function"===typeof y?y(t):y&&(y.current=t);var e=v.ref;"function"===typeof e?e(t):e&&(e.current=t)}}),m&&i.a.createElement(c.a,h({target:y.current,trapFocus:!1,key:"tip-drop",plain:!0},p.tip.drop,s),u?a:i.a.createElement(l.a,p.tip.content,a))]}));p.displayName="Tip";var d=p,m=n(1594),g=function(t){var e=t.hasIcon&&!t.hasLabel,n=t.sizeProp;return!e&&n&&t.theme.button.size&&t.theme.button.size[n]?t.theme.button.size[n].border.radius:t.theme.button.border.radius},y=function(t){return Object(o.css)(["border:"," solid ",";border-radius:",";color:",";padding:",";",""],t.theme.button.border.width,Object(s.c)(t.colorValue||t.theme.button.border.color||"control",t.theme),g(t),Object(s.c)(t.theme.button.color||"text",t.theme),function(t){var e=t.sizeProp;return e&&t.theme.button.size&&t.theme.button.size[e]?Object(o.css)([""," ",""],t.theme.button.size[e].pad.vertical,t.theme.button.size[e].pad.horizontal):Object(o.css)([""," ",""],t.theme.button.padding.vertical,t.theme.button.padding.horizontal)}(t),function(t){var e=t.sizeProp||"medium",n=t.theme.text[e];return Object(o.css)(["font-size:",";line-height:",";"],n.size,n.height)}(t))};var v=Object(o.css)(["&:hover{"," ",";}"],(function(t){return t.hoverIndicator&&Object(a.e)(t.hoverIndicator,t.theme)}),(function(t){return!t.plain&&Object(o.css)(["box-shadow:0px 0px 0px 2px ",";"],function(t){return t.colorValue?Object(s.c)(t.colorValue,t.theme):t.active&&t.primary&&t.theme.button.primary&&t.theme.button.primary.active&&t.theme.button.primary.active.border&&t.theme.button.primary.active.border.color?Object(s.c)(t.theme.button.primary.active.border.color,t.theme):Object(s.c)(t.theme.button.border.color||"control",t.theme)}(t))})),b=o.default.button.withConfig({displayName:"StyledButton",componentId:"sc-323bzc-0"})(["display:inline-block;box-sizing:border-box;cursor:pointer;font:inherit;text-decoration:none;margin:0;background:transparent;overflow:visible;text-transform:none;"," "," "," "," "," "," "," &:focus{","}"," "," "," "," ",""],m.g,(function(t){return t.plain&&function(t){return Object(o.css)(["color:",";outline:none;border:none;padding:0;text-align:inherit;"],Object(s.c)(t.colorValue||"inherit",t.theme))}(t)}),(function(t){return!t.plain&&y(t)}),(function(t){return t.primary&&function(t){return Object(o.css)([""," border-radius:",";",""],Object(a.d)(Object(s.c)(t.colorValue||t.theme.button.primary&&t.theme.button.primary.color||"control",t.theme),t.theme,t.theme.button.color),g(t),t.theme.button.primary&&t.theme.button.primary.extend)}(t)}),(function(t){return!t.disabled&&!t.focus&&v}),(function(t){return!t.disabled&&t.active&&function(t){return Object(o.css)([""," "," ",""],a.a,t.primary&&t.theme.button.primary&&t.theme.button.primary.active&&t.theme.button.primary.active.border&&t.theme.button.primary.active.border.color&&"border: "+t.theme.button.border.width+" solid\n    "+Object(s.c)(t.theme.button.primary.active.border.color,t.theme)+";\n    ",t.primary&&t.theme.button.primary&&t.theme.button.primary.active&&t.theme.button.primary.active.extend)}(t)}),(function(t){return t.disabled&&t.theme.button&&t.theme.button.disabled&&function(t){return Object(o.css)([""," "," "," ",""],Object(m.c)(t.theme.button.disabled.opacity),!t.plain&&t.theme.button.disabled.border&&t.theme.button.disabled.border.color&&"border: "+t.theme.button.border.width+" solid\n    "+Object(s.c)(t.theme.button.disabled.border.color,t.theme)+";",t.theme.button.disabled.color&&(t.primary?Object(a.d)(Object(s.c)(t.theme.button.disabled.color,t.theme),t.theme,t.theme.button.color):"color: "+Object(s.c)(t.theme.button.disabled.color,t.theme)+";"),t.theme.button.disabled&&t.theme.button.disabled.extend)}(t)}),(function(t){return(!t.plain||t.focusIndicator)&&Object(m.f)()}),(function(t){return!t.plain&&t.theme.button.transition&&"\n    transition-property: "+t.theme.button.transition.properties.join(",")+";\n    transition-duration: "+t.theme.button.transition.duration+"s;\n    transition-timing-function: "+t.theme.button.transition.timing+";\n  "}),(function(t){return t.fillContainer&&("horizontal"===(e=t.fillContainer)?"width: 100%;":"vertical"===e?"height: 100%;":e?"\n      width: 100%;\n      height: 100%;\n      max-width: none;\n      flex: 1 0 auto;\n    ":void 0);var e}),(function(t){return t.hasIcon&&!t.hasLabel&&"\n    line-height: 0;\n  "}),(function(t){return t.pad&&t.hasIcon&&!t.hasLabel&&"\n    padding: "+t.theme.global.edgeSize.small+";\n  "}),(function(t){return t.theme.button&&t.theme.button.extend}));b.defaultProps={},Object.setPrototypeOf(b.defaultProps,u.a);var _=n(56),A=function(t,e){return t&&e.button.size&&e.button.size[t]&&e.button.size[t].pad?{vertical:e.button.size[t].pad.vertical,horizontal:e.button.size[t].pad.horizontal}:e.button.padding?{vertical:e.global.edgeSize[e.button.padding.vertical]||e.button.padding.vertical,horizontal:e.global.edgeSize[e.button.padding.horizontal]||e.button.padding.horizontal}:void 0},w=function(t){return Object(o.css)(["border:none;",";"," "," > svg{vertical-align:bottom;}"],function(t){var e=t.sizeProp;return e&&t.theme.button.size&&t.theme.button.size[e]?Object(o.css)(["border-radius:",";"],t.theme.button.size[e].border.radius):t.theme.button.border&&t.theme.button.border.radius?Object(o.css)(["border-radius:",";"],t.theme.button.border.radius):""}(t),(n=(e=t).sizeProp,r=e.theme,(i=A(n,r))?Object(o.css)(["padding:"," ",";"],i.vertical,i.horizontal):""),function(t){var e=t.sizeProp||"medium",n=t.theme.text[e];return Object(o.css)(["font-size:",";line-height:",";"],n.size,n.height)}(t));var e,n,r,i},x=function(t,e){var n;if(e){n=t;for(var r=e.split(".");n&&r.length;)n=n[r.shift()]}return n},E=function(t,e){var n=Object(_.b)(e);return Object(o.css)(["padding:","px ","px;"],Object(_.b)(t.vertical)-n,Object(_.b)(t.horizontal)-n)},O=o.default.button.attrs((function(){return{kind:void 0}})).withConfig({displayName:"StyledButtonKind",componentId:"sc-1vhfpnt-0"})(["display:inline-block;box-sizing:border-box;cursor:pointer;font:inherit;text-decoration:none;margin:0;background:transparent;overflow:visible;text-transform:none;"," "," "," "," "," "," "," "," &:focus{","}"," "," ",""],m.g,(function(t){return t.plain&&Object(o.css)(["outline:none;border:none;padding:0;text-align:inherit;color:inherit;> svg{vertical-align:bottom;}"])}),(function(t){return!t.disabled&&t.active&&a.a}),(function(t){return!t.plain&&w(t)}),(function(t){return!t.plain&&(n=(e=t).colorValue,r=e.sizeProp,i=e.themePaths,a=e.theme,s=[],u=A(r,a),i.base.forEach((function(t){var e=x(a,"button."+t);e&&(s.push(Object(m.j)(e,a,n)),e.border&&e.border.width&&u&&!e.padding&&s.push(E(u,e.border.width)))})),i.hover.forEach((function(t){var e=x(a,"button."+t);if(e){var n=Object(m.j)(e,a),r="";e.border&&e.border.width&&u&&!e.padding&&(r=E(u,e.border.width)),n.length>0&&s.push(Object(o.css)(["&:hover{"," ","}"],n,r))}})),s);var e,n,r,i,a,s,u}),(function(t){return!t.plain&&t.align&&"\n    text-align: "+t.align+";\n    "}),(function(t){return!t.disabled&&t.hoverIndicator&&function(t){var e=t.hoverIndicator,n=t.theme,r={};r.background=!0===e||"background"===e?n.global.hover.background:e;var i=Object(m.j)(r,n);return i.length>0?Object(o.css)(["&:hover{","}"],i):""}(t)}),(function(t){return t.disabled&&Object(m.c)(t.theme.button.disabled.opacity)}),(function(t){return(!t.plain||t.focusIndicator)&&Object(m.f)()}),(function(t){return!t.plain&&t.theme.button.transition&&"\n    transition-property: "+t.theme.button.transition.properties.join(",")+";\n    transition-duration: "+t.theme.button.transition.duration+"s;\n    transition-timing-function: "+t.theme.button.transition.timing+";\n  "}),(function(t){return t.fillContainer&&("horizontal"===(e=t.fillContainer)?"width: 100%;":"vertical"===e?"height: 100%;":e?"\n      width: 100%;\n      height: 100%;\n      max-width: none;\n      flex: 1 0 auto;\n    ":void 0);var e}),(function(t){return t.theme.button&&t.theme.button.extend}));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},S.apply(this,arguments)}O.defaultProps={},Object.setPrototypeOf(O.defaultProps,u.a);var P=function(t,e,n){void 0===t&&(t=[]);for(var r=[],i=t.length-1;i>=0&&!r[1];){var o=e.button;if(t[i])for(var s=t[i].split(".");o&&s.length;)o=o[s.shift()];if(o){var u=n&&o.background&&o.background.color?n:o.background,l=o.color||(!Object.prototype.hasOwnProperty.call(o,"color")||void 0!==o.color)&&void 0,c=!n||o.background&&o.background.color||o.border&&o.border.color?l:n;r=Object(a.b)(u,c,e)}i-=1}return r[1]||void 0},C=Object(r.forwardRef)((function(t,e){var n=t.a11yTitle,c=t.active,f=t.align,h=void 0===f?"center":f,p=t.color,m=t.children,g=t.disabled,y=t.icon,v=t.focusIndicator,_=void 0===v||v,A=t.gap,w=void 0===A?"small":A,x=t.fill,E=t.href,C=t.kind,T=t.label,k=t.onBlur,I=t.onClick,L=t.onFocus,j=t.onMouseOut,M=t.onMouseOver,R=t.plain,N=t.primary,D=t.reverse,F=t.secondary,B=t.selected,z=t.size,U=t.tip,G=t.type,V=void 0===G?"button":G,q=t.as,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,["a11yTitle","active","align","color","children","disabled","icon","focusIndicator","gap","fill","href","kind","label","onBlur","onClick","onFocus","onMouseOut","onMouseOver","plain","primary","reverse","secondary","selected","size","tip","type","as"]),W=Object(r.useContext)(o.ThemeContext)||u.a.theme,X=Object(r.useState)(),Y=X[0],Z=X[1],K=Object(r.useState)(!1),$=K[0],J=K[1];(y||T)&&m&&console.warn("Button should not have children if icon or label is provided");var Q,tt=Object(r.useMemo)((function(){if(W.button.default)return C||(N?"primary":F?"secondary":"default")}),[C,N,F,W.button.default]),et=Object(r.useMemo)((function(){if(tt&&!R){var t={base:[],hover:[]};return t.base.push(tt),B&&t.base.push("selected","selected."+tt),g?t.base.push("disabled","disabled."+tt):(c&&t.base.push("active","active."+tt),t.hover.push("hover","hover."+tt),c&&t.hover.push("hover.active","hover.active."+tt)),t}}),[c,g,tt,R,B]),nt=function(t){J(!0),M&&M(t)},rt=function(t){J(!1),j&&j(t)},it=y;if(y&&!y.props.color)if(tt){if(!R){var ot=$&&P(et.hover,W)||P(et.base,W,p);ot&&(it=Object(r.cloneElement)(y,{color:ot}))}}else N&&(it=Object(r.cloneElement)(y,{color:W.global.colors.text[(Q=Object(a.f)(Object(s.c)(p||W.button.primary&&W.button.primary.color||W.global.colors.control||"brand",W),W),Object(s.a)(Q,W)?"dark":"light")]}));var at,st,ut=!q&&E?"a":q,lt=D?T:it,ct=D?it:T;return at=lt&&ct?i.a.createElement(l.a,{direction:"row",align:"center",justify:"center"===h?"center":"between",gap:w,responsive:!1},lt,ct):"function"===typeof m?m({disabled:g,hover:$,focus:Y}):lt||ct||m,st=tt?i.a.createElement(O,S({},H,{as:ut,ref:e,active:c,align:h,"aria-label":n,colorValue:p,disabled:g,gap:w,fillContainer:x,focus:Y,focusIndicator:_,href:E,kind:tt,themePaths:et,onClick:I,onFocus:function(t){Z(!0),L&&L(t)},onBlur:function(t){Z(!1),k&&k(t)},onMouseOver:nt,onMouseOut:rt,plain:R||r.Children.count(m)>0,primary:N,sizeProp:z,type:E?void 0:V}),at):i.a.createElement(b,S({},H,{as:ut,ref:e,"aria-label":n,colorValue:p,active:c,selected:B,disabled:g,hasIcon:!!y,gap:w,hasLabel:!!T,fillContainer:x,focus:Y,focusIndicator:_,href:E,kind:tt,themePaths:et,onClick:I,onFocus:function(t){Z(!0),L&&L(t)},onBlur:function(t){Z(!1),k&&k(t)},onMouseOver:nt,onMouseOut:rt,pad:!R,plain:"undefined"!==typeof R?R:r.Children.count(m)>0||y&&!T,primary:N,sizeProp:z,type:E?void 0:V}),at),U?"string"===typeof U?i.a.createElement(d,{content:U},st):i.a.createElement(d,U,st):st}));C.displayName="Button";var T=C},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},function(t,e,n){"use strict";n.r(e),n.d(e,"GreatCircleLayer",(function(){return o})),n.d(e,"S2Layer",(function(){return A})),n.d(e,"QuadkeyLayer",(function(){return E})),n.d(e,"TileLayer",(function(){return O.a})),n.d(e,"TripsLayer",(function(){return P})),n.d(e,"H3ClusterLayer",(function(){return D})),n.d(e,"H3HexagonLayer",(function(){return N})),n.d(e,"Tile3DLayer",(function(){return ca})),n.d(e,"TerrainLayer",(function(){return ya})),n.d(e,"MVTLayer",(function(){return va.a})),n.d(e,"GeohashLayer",(function(){return wa})),n.d(e,"_GeoCellLayer",(function(){return l})),n.d(e,"_getURLFromTemplate",(function(){return pa.c})),n.d(e,"_Tileset2D",(function(){return xa.b})),n.d(e,"_Tile2DHeader",(function(){return Ea.a}));var r=n(1),i=n(529);class o extends i.a{}Object(r.a)(o,"layerName","GreatCircleLayer"),Object(r.a)(o,"defaultProps",{getHeight:{type:"accessor",value:0},greatCircle:!0});var a=n(368),s=n(494);const u={...s.a.defaultProps};class l extends a.a{indexToBounds(){return null}renderLayers(){const{elevationScale:t,extruded:e,wireframe:n,filled:r,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:u,lineWidthMaxPixels:l,lineJointRounded:c,lineMiterLimit:f,lineDashJustified:h,getElevation:p,getFillColor:d,getLineColor:m,getLineWidth:g}=this.props,{updateTriggers:y,material:v,transitions:b}=this.props;return new(this.getSubLayerClass("cell",s.a))({filled:r,wireframe:n,extruded:e,elevationScale:t,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:u,lineWidthMaxPixels:l,lineJointRounded:c,lineMiterLimit:f,lineDashJustified:h,material:v,transitions:b,getElevation:p,getFillColor:d,getLineColor:m,getLineWidth:g},this.getSubLayerProps({id:"cell",updateTriggers:y&&{getElevation:y.getElevation,getFillColor:y.getFillColor,getLineColor:y.getLineColor,getLineWidth:y.getLineWidth}}),this.indexToBounds())}}Object(r.a)(l,"layerName","GeoCellLayer"),Object(r.a)(l,"defaultProps",u);var c=n(206),f=n.n(c);const h=180/Math.PI;function p(t,e,n){const r=1<<e;return[(t[0]+n[0])/r,(t[1]+n[1])/r]}function d(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function m(t){return[d(t[0]),d(t[1])]}function g(t,[e,n]){switch(t){case 0:return[1,e,n];case 1:return[-e,1,n];case 2:return[-e,-n,1];case 3:return[-1,-n,-e];case 4:return[n,-1,-e];case 5:return[n,e,-1];default:throw new Error("Invalid face")}}function y([t,e,n]){const r=Math.atan2(n,Math.sqrt(t*t+e*e));return[Math.atan2(e,t)*h,r*h]}function v(t,e,n,r){if(0===r){1===n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const r=e[0];e[0]=e[1],e[1]=r}}function b(t){if("string"===typeof t){if(t.indexOf("/")>0)return t;t=function(t){const e=t.padEnd(16,"0");return f.a.fromString(e,16)}(t)}return function(t){let e=f.a.fromString(t,!0,10).toString(2);for(;e.length<64;)e="0"+e;const n=e.lastIndexOf("1"),r=e.substring(0,3),i=e.substring(3,n),o=i.length/2,a=f.a.fromString(r,!0,2).toString(10);let s=f.a.fromString(i,!0,2).toString(4);for(;s.length<o;)s="0"+s;return"".concat(a,"/").concat(s)}(t.toString())}function _(t){return function({face:t,ij:e,level:n}){const r=[[0,0],[0,1],[1,1],[1,0],[0,0]],i=Math.max(1,Math.ceil(100*Math.pow(2,-n))),o=new Float64Array(4*i*2+2);let a=0,s=0;for(let u=0;u<4;u++){const l=r[u].slice(0),c=r[u+1],f=(c[0]-l[0])/i,h=(c[1]-l[1])/i;for(let r=0;r<i;r++){l[0]+=f,l[1]+=h;const r=y(g(t,m(p(e,n,l))));Math.abs(r[1])>89.999&&(r[0]=s);const i=r[0]-s;r[0]+=i>180?-360:i<-180?360:0,o[a++]=r[0],o[a++]=r[1],s=r[0]}}return o[a++]=o[0],o[a++]=o[1],o}(function(t){const e=t.split("/"),n=parseInt(e[0],10),r=e[1],i=r.length,o=[0,0];let a;for(let s=i-1;s>=0;s--){a=i-s;const t=r[s];let e=0,n=0;"1"===t?n=1:"2"===t?(e=1,n=1):"3"===t&&(e=1);const u=Math.pow(2,a-1);v(u,o,e,n),o[0]+=u*e,o[1]+=u*n}if(n%2===1){const t=o[0];o[0]=o[1],o[1]=t}return{face:n,ij:o,level:a}}(b(t)))}class A extends l{indexToBounds(){const{data:t,getS2Token:e}=this.props;return{data:t,_normalize:!1,positionFormat:"XY",getPolygon:(t,n)=>_(e(t,n))}}}Object(r.a)(A,"layerName","S2Layer"),Object(r.a)(A,"defaultProps",{getS2Token:{type:"accessor",value:t=>t.token}});var w=n(24);function x(t){const[e,n]=function(t){let e=0,n=0,r=1<<t.length;const i=r/512;for(let o=0;o<t.length;o++){r>>=1;const i=parseInt(t[o]);i%2&&(e|=r),i>1&&(n|=r)}return[[e/i,512-n/i],[(e+.99)/i,512-(n+.99)/i]]}(t),[r,i]=Object(w.p)(e),[o,a]=Object(w.p)(n);return[o,i,o,a,r,a,r,i,o,i]}class E extends l{indexToBounds(){const{data:t,getQuadkey:e}=this.props;return{data:t,_normalize:!1,positionFormat:"XY",getPolygon:(t,n)=>x(e(t,n))}}}Object(r.a)(E,"layerName","QuadkeyLayer"),Object(r.a)(E,"defaultProps",{getQuadkey:{type:"accessor",value:t=>t.quadkey}});var O=n(145),S=n(198);class P extends S.a{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(){super.initializeState();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)}}Object(r.a)(P,"layerName","TripsLayer"),Object(r.a)(P,"defaultProps",{fadeTrail:!0,trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:t=>t.timestamps}});var C=n(96),T=n(87),k=n(12),I=n(298);function L(t,e){e=void 0===e?t[0][0]:e;for(const n of t){const t=n[0]-e;t>180?n[0]-=360:t<-180&&(n[0]+=360)}}function j(t,e,n){const r=t(e,n),[i,o]=Object(C.h3ToGeo)(r);return[o,i]}function M(t,e=1){const n=Object(C.h3ToGeoBoundary)(t,!0);return 1!==e?function(t,e,n){const[r,i]=Object(C.h3ToGeo)(t),o=e.length;L(e,i);const a=e[0]===e[o-1]?o-1:o;for(let s=0;s<a;s++)e[s][0]=Object(k.n)(i,e[s][0],n),e[s][1]=Object(k.n)(r,e[s][1],n)}(t,n,e):L(n),n}const R={...s.a.defaultProps,highPrecision:"auto",coverage:{type:"number",min:0,max:1,value:1},centerHexagon:null,getHexagon:{type:"accessor",value:t=>t.hexagon},extruded:!0};class N extends a.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}initializeState(){N._checkH3Lib(),this.state={edgeLengthKM:0,resolution:-1}}shouldUpdateState({changeFlags:t}){return this._shouldUseHighPrecision()?t.propsOrDataChanged:t.somethingChanged}updateState({props:t,changeFlags:e}){if(!0!==t.highPrecision&&(e.dataChanged||e.updateTriggersChanged&&e.updateTriggersChanged.getHexagon)){const t=this._calculateH3DataProps();this.setState(t)}this._updateVertices(this.context.viewport)}_calculateH3DataProps(){let t=-1,e=!1,n=!1;const{iterable:r,objectInfo:i}=Object(T.a)(this.props.data);for(const o of r){i.index++;const r=this.props.getHexagon(o,i),a=Object(C.h3GetResolution)(r);if(t<0){if(t=a,!this.props.highPrecision)break}else if(t!==a){n=!0;break}if(Object(C.h3IsPentagon)(r)){e=!0;break}}return{resolution:t,edgeLengthKM:t>=0?Object(C.edgeLength)(t,"km"):0,hasMultipleRes:n,hasPentagon:e}}_shouldUseHighPrecision(){if("auto"===this.props.highPrecision){const{resolution:t,hasPentagon:e,hasMultipleRes:n}=this.state,{viewport:r}=this.context;return Boolean(null===r||void 0===r?void 0:r.resolution)||n||e||t>=0&&t<=5}return this.props.highPrecision}_updateVertices(t){if(this._shouldUseHighPrecision())return;const{resolution:e,edgeLengthKM:n,centerHex:r}=this.state;if(e<0)return;const i=this.props.centerHexagon||Object(C.geoToH3)(t.latitude,t.longitude,e);if(r===i)return;if(r){const t=Object(C.h3Distance)(r,i);if(t>=0&&t*n<10)return}const{unitsPerMeter:o}=t.distanceScales;let a=M(i);const[s,u]=Object(C.h3ToGeo)(i),[l,c]=t.projectFlat([u,s]);a=a.map((e=>{const n=t.projectFlat(e);return[(n[0]-l)/o[0],(n[1]-c)/o[1]]})),this.setState({centerHex:i,vertices:a})}renderLayers(){return this._shouldUseHighPrecision()?this._renderPolygonLayer():this._renderColumnLayer()}_getForwardProps(){const{elevationScale:t,material:e,coverage:n,extruded:r,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:u,lineWidthMinPixels:l,lineWidthMaxPixels:c,getFillColor:f,getElevation:h,getLineColor:p,getLineWidth:d,transitions:m,updateTriggers:g}=this.props;return{elevationScale:t,extruded:r,coverage:n,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:u,lineWidthMinPixels:l,lineWidthMaxPixels:c,material:e,getElevation:h,getFillColor:f,getLineColor:p,getLineWidth:d,transitions:m,updateTriggers:{getFillColor:g.getFillColor,getElevation:g.getElevation,getLineColor:g.getLineColor,getLineWidth:g.getLineWidth}}}_renderPolygonLayer(){const{data:t,getHexagon:e,updateTriggers:n,coverage:r}=this.props,i=this.getSubLayerClass("hexagon-cell-hifi",s.a),o=this._getForwardProps();return o.updateTriggers.getPolygon=function(t,e){let n;return n=void 0===t||null===t?e:"object"===typeof t?{...t,coverage:e}:{getHexagon:t,coverage:e},n}(n.getHexagon,r),new i(o,this.getSubLayerProps({id:"hexagon-cell-hifi",updateTriggers:o.updateTriggers}),{data:t,_normalize:!1,_windingOrder:"CCW",positionFormat:"XY",getPolygon:(t,n)=>function(t){const e=new Float64Array(2*t.length);let n=0;for(const r of t)e[n++]=r[0],e[n++]=r[1];return e}(M(e(t,n),r))})}_renderColumnLayer(){const{data:t,getHexagon:e,updateTriggers:n}=this.props,r=this.getSubLayerClass("hexagon-cell",I.a),i=this._getForwardProps();return i.updateTriggers.getPosition=n.getHexagon,new r(i,this.getSubLayerProps({id:"hexagon-cell",flatShading:!0,updateTriggers:i.updateTriggers}),{data:t,diskResolution:6,radius:1,vertices:this.state.vertices,getPosition:j.bind(null,e)})}}Object(r.a)(N,"defaultProps",R),Object(r.a)(N,"layerName","H3HexagonLayer"),Object(r.a)(N,"_checkH3Lib",(()=>{}));class D extends l{initializeState(){N._checkH3Lib()}updateState({props:t,changeFlags:e}){if(e.dataChanged||e.updateTriggersChanged&&e.updateTriggersChanged.getHexagons){const{data:e,getHexagons:n}=t,r=[],{iterable:i,objectInfo:o}=Object(T.a)(e);for(const t of i){o.index++;const e=n(t,o),i=Object(C.h3SetToMultiPolygon)(e,!0);for(const n of i)r.push(this.getSubLayerRow({polygon:n},t,o.index))}this.setState({polygons:r})}}indexToBounds(){return{data:this.state.polygons,getPolygon:t=>t.polygon}}}Object(r.a)(D,"layerName","H3ClusterLayer"),Object(r.a)(D,"defaultProps",{getHexagons:{type:"accessor",value:t=>t.hexagons}});var F=n(130),B=n(27),z=n(15),U=n(530),G=n(648),V=n(569),q=n(1535),H=n(366),W=n(650);class X extends W.a{getShaders(){const t=super.getShaders();return t.modules.push(q.a),{...t,vs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\nuniform bool composeModelMatrix;\nuniform bool pickFeatureIds;\n\n// Primitive attributes\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\nin vec4 uvRegions;\nin vec3 featureIdsPickingColors;\n\n// Instance attributes\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\n\n// Outputs to fragment shader\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvec2 applyUVRegion(vec2 uv) {\n  #ifdef HAS_UV_REGIONS\n    // https://github.com/Esri/i3s-spec/blob/master/docs/1.7/geometryUVRegion.cmn.md\n    return fract(uv) * (uvRegions.zw - uvRegions.xy) + uvRegions.xy;\n  #else\n    return uv;\n  #endif\n}\n\nvoid main(void) {\n  vec2 uv = applyUVRegion(texCoords);\n  geometry.uv = uv;\n\n  if (pickFeatureIds) {\n    geometry.pickingColor = featureIdsPickingColors;\n  } else {\n    geometry.pickingColor = instancePickingColors;\n  }\n\n  vTexCoord = uv;\n  cameraPosition = project_uCameraPosition;\n  vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n\n  vec3 pos = (instanceModelMatrix * positions) * sizeScale;\n  vec3 projectedPosition = project_position(positions);\n  position_commonspace = vec4(projectedPosition, 1.0);\n  gl_Position = project_common_position_to_clipspace(position_commonspace);\n\n  geometry.position = position_commonspace;\n  normals_commonspace = project_normal(instanceModelMatrix * normals);\n  geometry.normal = normals_commonspace;\n\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  #ifdef MODULE_PBR\n    // set PBR data\n    pbr_vPosition = geometry.position.xyz;\n    #ifdef HAS_NORMALS\n      pbr_vNormal = geometry.normal;\n    #endif\n\n    #ifdef HAS_UV\n      pbr_vUV = uv;\n    #else\n      pbr_vUV = vec2(0., 0.);\n    #endif\n    geometry.uv = pbr_vUV;\n  #endif\n\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n  \n#ifdef MODULE_PBR\n\n  fragColor = vColor * pbr_filterColor(vec4(0));\n  geometry.uv = pbr_vUV;\n  fragColor.a *= opacity;\n\n#else\n\n  geometry.uv = vTexCoord;\n\n  vec3 normal;\n  if (flatShading) {\n\n// NOTE(Tarek): This is necessary because\n// headless.gl reports the extension as\n// available but does not support it in\n// the shader.\n#ifdef DERIVATIVES_AVAILABLE\n    normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n    normal = vec3(0.0, 0.0, 1.0);\n#endif\n  } else {\n    normal = normals_commonspace;\n  }\n\n  vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n  vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n  fragColor = vec4(lightColor, color.a * opacity);\n\n#endif\n\n  DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n"}}initializeState(){const{featureIds:t}=this.props;super.initializeState();const e=this.getAttributeManager();t&&e.add({featureIdsPickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateFeatureIdsPickingColors}})}updateState(t){super.updateState(t);const{props:e,oldProps:n}=t;e.pbrMaterial!==n.pbrMaterial&&this.updatePbrMaterialUniforms(e.pbrMaterial)}draw(t){const{featureIds:e}=this.props;this.state.model&&(this.state.model.setUniforms({u_Camera:this.state.model.getUniforms().project_uCameraPosition,pickFeatureIds:Boolean(e)}),super.draw(t))}getModel(t){const{id:e,pbrMaterial:n}=this.props,r=this.parseMaterial(n,t);this.setState({materialParser:r});const i=this.getShaders();var o;(o=t.attributes).COLOR_0||o.colors||(o.colors={constant:!0,value:new Float32Array([1,1,1])});return new H.a(this.context.gl,{...this.getShaders(),id:e,geometry:t,defines:{...i.defines,...null===r||void 0===r?void 0:r.defines,HAS_UV_REGIONS:t.attributes.uvRegions},parameters:null===r||void 0===r?void 0:r.parameters,isInstanced:!0})}updatePbrMaterialUniforms(t){const{model:e}=this.state;if(e){const{mesh:n}=this.props,r=this.parseMaterial(t,n);this.setState({materialParser:r}),e.setUniforms(r.uniforms)}}parseMaterial(t,e){var n;const r=Boolean(t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture);return null===(n=this.state.materialParser)||void 0===n||n.delete(),new V.a(this.context.gl,{attributes:{NORMAL:e.attributes.normals,TEXCOORD_0:e.attributes.texCoords},material:{unlit:r,...t},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1})}calculateFeatureIdsPickingColors(t){const e=this.props.featureIds,n=new Uint8ClampedArray(e.length*t.size),r=[];for(let i=0;i<e.length;i++)this.encodePickingColor(e[i],r),n[3*i]=r[0],n[3*i+1]=r[1],n[3*i+2]=r[2];t.value=n}finalizeState(t){var e;super.finalizeState(t),null===(e=this.state.materialParser)||void 0===e||e.delete(),this.setState({materialParser:null})}}Object(r.a)(X,"layerName","MeshLayer"),Object(r.a)(X,"defaultProps",{pbrMaterial:{type:"object",value:null},featureIds:{type:"array",value:null,optional:!0}});var Y=n(1529),Z=n(61),K=n(100),$=n(640),J=n(181),Q=n(23);const tt=6378137,et=6378137,nt=6356752.314245179;Math.max(tt,et,nt);function rt(t){return t}new K.a;function it(t,e=[],n=rt){return"longitude"in t?(e[0]=n(t.longitude),e[1]=n(t.latitude),e[2]=t.height):"x"in t?(e[0]=n(t.x),e[1]=n(t.y),e[2]=t.z):(e[0]=n(t[0]),e[1]=n(t[1]),e[2]=t[2]),e}function ot(t,e,n=rt){return"longitude"in e?(e.longitude=n(t[0]),e.latitude=n(t[1]),e.height=t[2]):"x"in e?(e.x=n(t[0]),e.y=n(t[1]),e.z=t[2]):(e[0]=n(t[0]),e[1]=n(t[1]),e[2]=t[2]),e}const at=new K.a,st=new K.a,ut=new K.a;const lt=new K.a,ct={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},ft={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},ht={east:new K.a,north:new K.a,up:new K.a,west:new K.a,south:new K.a,down:new K.a},pt=new K.a,dt=new K.a,mt=new K.a;function gt(t,e,n,r,i,o){const a=ct[e]&&ct[e][n];let s,u,l;Object(J.a)(a&&(!r||r===a));const c=lt.copy(i);if(Object(k.j)(c.x,0,1e-14)&&Object(k.j)(c.y,0,1e-14)){const t=Math.sign(c.z);s=pt.fromArray(ft[e]),"east"!==e&&"west"!==e&&s.scale(t),u=dt.fromArray(ft[n]),"east"!==n&&"west"!==n&&u.scale(t),l=mt.fromArray(ft[r]),"east"!==r&&"west"!==r&&l.scale(t)}else{const{up:i,east:o,north:a}=ht;o.set(-c.y,c.x,0).normalize(),t.geodeticSurfaceNormal(c,i),a.copy(i).cross(o);const{down:f,west:h,south:p}=ht;f.copy(i).scale(-1),h.copy(o).scale(-1),p.copy(a).scale(-1),s=ht[e],u=ht[n],l=ht[r]}return o[0]=s.x,o[1]=s.y,o[2]=s.z,o[3]=0,o[4]=u.x,o[5]=u.y,o[6]=u.z,o[7]=0,o[8]=l.x,o[9]=l.y,o[10]=l.z,o[11]=0,o[12]=c.x,o[13]=c.y,o[14]=c.z,o[15]=1,o}const yt=new K.a,vt=new K.a,bt=new K.a,_t=new K.a,At=new K.a,wt=new K.a;class xt{constructor(t=0,e=0,n=0){Object(r.a)(this,"radii",void 0),Object(r.a)(this,"radiiSquared",void 0),Object(r.a)(this,"radiiToTheFourth",void 0),Object(r.a)(this,"oneOverRadii",void 0),Object(r.a)(this,"oneOverRadiiSquared",void 0),Object(r.a)(this,"minimumRadius",void 0),Object(r.a)(this,"maximumRadius",void 0),Object(r.a)(this,"centerToleranceSquared",$.a.EPSILON1),Object(r.a)(this,"squaredXOverSquaredZ",void 0),Object(J.a)(t>=0),Object(J.a)(e>=0),Object(J.a)(n>=0),this.radii=new K.a(t,e,n),this.radiiSquared=new K.a(t*t,e*e,n*n),this.radiiToTheFourth=new K.a(t*t*t*t,e*e*e*e,n*n*n*n),this.oneOverRadii=new K.a(0===t?0:1/t,0===e?0:1/e,0===n?0:1/n),this.oneOverRadiiSquared=new K.a(0===t?0:1/(t*t),0===e?0:1/(e*e),0===n?0:1/(n*n)),this.minimumRadius=Math.min(t,e,n),this.maximumRadius=Math.max(t,e,n),0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const n=vt,r=bt,[,,i]=t;this.geodeticSurfaceNormalCartographic(t,n),r.copy(this.radiiSquared).scale(n);const o=Math.sqrt(n.dot(r));return r.scale(1/o),n.scale(i),r.add(n),r.to(e)}cartesianToCartographic(t,e=[0,0,0]){wt.from(t);const n=this.scaleToGeodeticSurface(wt,_t);if(!n)return;const r=this.geodeticSurfaceNormal(n,vt),i=At;i.copy(wt).subtract(n);const o=Math.atan2(r.y,r.x),a=Math.asin(r.z),s=Math.sign(Q.f(i,wt))*Q.i(i);return ot([o,a,s],e,k.f._cartographicRadians?rt:k.r)}eastNorthUpToFixedFrame(t,e=new Z.a){return gt(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,n,r,i=new Z.a){return gt(this,t,e,n,r,i)}geocentricSurfaceNormal(t,e=[0,0,0]){return yt.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const n=function(t,e=[]){return it(t,e,k.f._cartographicRadians?rt:k.s)}(t),r=n[0],i=n[1],o=Math.cos(i);return yt.set(o*Math.cos(r),o*Math.sin(r),Math.sin(i)).normalize(),yt.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return yt.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,n=[]){const{oneOverRadii:r,oneOverRadiiSquared:i,centerToleranceSquared:o}=e;at.from(t);const a=at.x,s=at.y,u=at.z,l=r.x,c=r.y,f=r.z,h=a*a*l*l,p=s*s*c*c,d=u*u*f*f,m=h+p+d,g=Math.sqrt(1/m);if(!Number.isFinite(g))return;const y=st;if(y.copy(t).scale(g),m<o)return y.to(n);const v=i.x,b=i.y,_=i.z,A=ut;A.set(y.x*v*2,y.y*b*2,y.z*_*2);let w,x,E,O,S=(1-g)*at.len()/(.5*A.len()),P=0;do{S-=P,w=1/(1+S*v),x=1/(1+S*b),E=1/(1+S*_);const t=w*w,e=x*x,n=E*E;O=h*t+p*e+d*n-1,P=O/(-2*(h*(t*w)*v+p*(e*x)*b+d*(n*E)*_))}while(Math.abs(O)>$.a.EPSILON12);return at.scale([w,x,E]).to(n)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){_t.from(t);const n=_t.x,r=_t.y,i=_t.z,o=this.oneOverRadiiSquared,a=1/Math.sqrt(n*n*o.x+r*r*o.y+i*i*o.z);return _t.multiplyScalar(a).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return _t.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return _t.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,n=[0,0,0]){Object(J.a)(Object(k.j)(this.radii.x,this.radii.y,$.a.EPSILON15)),Object(J.a)(this.radii.z>0),_t.from(t);const r=_t.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(r)>=this.radii.z-e))return _t.set(0,0,r).to(n)}}Object(r.a)(xt,"WGS84",new xt(tt,et,nt));var Et=n(124),Ot=n(172),St=n(37),Pt=n(394);function Ct(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 Tt(t,e,n){return e&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var kt=Tt((function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"item",void 0),Object(r.a)(this,"previous",void 0),Object(r.a)(this,"next",void 0),this.item=e,this.previous=n,this.next=i}));function It(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)}}var Lt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"head",null),Object(r.a)(this,"tail",null),Object(r.a)(this,"_length",0)}var e,n,i;return e=t,(n=[{key:"length",get:function(){return this._length}},{key:"add",value:function(t){var e=new kt(t,this.tail,null);return this.tail?(this.tail.next=e,this.tail=e):(this.head=e,this.tail=e),++this._length,e}},{key:"remove",value:function(t){t&&(t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=null,this.tail=t.previous):t.next?(t.next.previous=null,this.head=t.next):(this.head=null,this.tail=null),t.next=null,t.previous=null,--this._length)}},{key:"splice",value:function(t,e){t!==e&&(this.remove(e),this._insert(t,e))}},{key:"_insert",value:function(t,e){var n=t.next;t.next=e,this.tail===t?this.tail=e:n.previous=e,e.next=n,e.previous=t,++this._length}}])&&It(e.prototype,n),i&&It(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jt(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 Mt(t){return void 0!==t&&null!==t}var Rt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"_list",void 0),Object(r.a)(this,"_sentinel",void 0),Object(r.a)(this,"_trimTiles",void 0),this._list=new Lt,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}var e,n,i;return e=t,(n=[{key:"reset",value:function(){this._list.splice(this._list.tail,this._sentinel)}},{key:"touch",value:function(t){var e=t._cacheNode;Mt(e)&&this._list.splice(this._sentinel,e)}},{key:"add",value:function(t,e,n){Mt(e._cacheNode)||(e._cacheNode=this._list.add(e),n&&n(t,e))}},{key:"unloadTile",value:function(t,e,n){var r=e._cacheNode;Mt(r)&&(this._list.remove(r),e._cacheNode=void 0,n&&n(t,e))}},{key:"unloadTiles",value:function(t,e){var n=this._trimTiles;this._trimTiles=!1;for(var r=this._list,i=1024*t.maximumMemoryUsage*1024,o=this._sentinel,a=r.head;a!==o&&(t.gpuMemoryUsageInBytes>i||n);){var s=a.item;a=a.next,this.unloadTile(t,s,e)}}},{key:"trim",value:function(){this._trimTiles=!0}}])&&jt(e.prototype,n),i&&jt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();var Nt=n(47);function Dt(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||Ft(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ft(t,e){if(t){if("string"===typeof t)return Bt(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)?Bt(t,e):void 0}}function Bt(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 zt=new K.a,Ut=new K.a,Gt=new Nt.c([new Nt.e,new Nt.e,new Nt.e,new Nt.e,new Nt.e,new Nt.e]);function Vt(t,e){var n=t.cameraDirection,r=t.cameraUp,i=t.height,o=t.distanceScales.metersPerUnit,a=Wt(t,t.center),s=xt.WGS84.eastNorthUpToFixedFrame(a),u=t.unprojectPosition(t.cameraPosition),l=xt.WGS84.cartographicToCartesian(u,new K.a),c=new K.a(s.transformAsVector(new K.a(n).scale(o))).normalize(),f=new K.a(s.transformAsVector(new K.a(r).scale(o))).normalize();return function(t){var e=t.getFrustumPlanes(),n=Ht(e.near,t.cameraPosition),r=Wt(t,n),i=Wt(t,t.cameraPosition,Ut),o=0;for(var a in Gt.planes[o++].fromPointNormal(r,zt.copy(r).subtract(i)),e)if("near"!==a){var s=Wt(t,Ht(e[a],n,Ut),Ut);Gt.planes[o++].fromPointNormal(s,zt.copy(r).subtract(s))}}(t),{camera:{position:l,direction:c,up:f},viewport:t,topDownViewport:new(0,t.constructor)({longitude:t.longitude,latitude:t.latitude,height:i,width:t.width,bearing:t.bearing,zoom:t.zoom,pitch:0}),height:i,cullingVolume:Gt,frameNumber:e,sseDenominator:1.15}}function qt(t,e,n){if(0===n||t.length<=n)return[t,[]];var r,i=[],o=e.viewport,a=o.longitude,s=o.latitude,u=function(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ft(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t.entries());try{for(u.s();!(r=u.n()).done;){var l=Dt(r.value,2),c=l[0],f=Dt(l[1].header.mbs,2),h=f[0],p=f[1],d=Math.abs(a-h),m=Math.abs(s-p),g=Math.sqrt(m*m+d*d);i.push([c,g])}}catch(w){u.e(w)}finally{u.f()}for(var y=i.sort((function(t,e){return t[1]-e[1]})),v=[],b=0;b<n;b++)v.push(t[y[b][0]]);for(var _=[],A=n;A<y.length;A++)_.push(t[y[A][0]]);return[v,_]}function Ht(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new K.a,r=t.normal.dot(e);return n.copy(t.normal).scale(t.distance-r).add(e),n}function Wt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new K.a,r=t.unprojectPosition(e);return xt.WGS84.cartographicToCartesian(r,n)}function Xt(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return Yt(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 Yt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yt(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 Zt=6356752.314245179,Kt=new K.a;function $t(t,e){if(t instanceof Nt.d){var n=function(t){t.getColumn(0,Kt);var e=t.getColumn(1),n=t.getColumn(2);return Kt.add(e).add(n).len()}(t.halfAxes);return Math.log2(Zt/(n+e[2]))}if(t instanceof Nt.b){var r=t.radius;return Math.log2(Zt/(r+e[2]))}if(t.width&&t.height){var i=t.width,o=t.height;return(Math.log2(6378137/i)+Math.log2(6378137/o))/2}return 1}function Jt(t,e,n){var r=xt.WGS84.cartographicToCartesian([t.xmax,t.ymax,t.zmax],new K.a),i=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2)+Math.pow(r[2]-n[2],2));return Math.log2(Zt/(i+e[2]))}var Qt=0,te=1,ee=3,ne=4,re=5,ie=1,oe=2,ae="empty",se="scenegraph",ue="pointcloud",le="mesh",ce="I3S",fe="TILES3D",he="geometricError",pe=1,de=n(335),me=n(638);function ge(t){return function(t){if(Array.isArray(t))return be(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ve(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.")}()}function ye(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||ve(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(t,e){if(t){if("string"===typeof t)return be(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)?be(t,e):void 0}}function be(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 _e(t){return void 0!==t&&null!==t}var Ae=new K.a,we=new K.a,xe=new K.a;function Ee(t,e,n){if(Object(Ot.a)(t,"3D Tile: boundingVolume must be defined"),t.box)return function(t,e,n){var r=new K.a(t[0],t[1],t[2]);e.transform(r,r);var i=[];if(10===t.length){var o=t.slice(3,6),a=new de.a;a.fromArray(t,6);var s=new K.a([1,0,0]),u=new K.a([0,1,0]),l=new K.a([0,0,1]);s.transformByQuaternion(a),s.scale(o[0]),u.transformByQuaternion(a),u.scale(o[1]),l.transformByQuaternion(a),l.scale(o[2]),i=[].concat(ge(s.toArray()),ge(u.toArray()),ge(l.toArray()))}else i=[].concat(ge(t.slice(3,6)),ge(t.slice(6,9)),ge(t.slice(9,12)));var c=e.transformAsVector(i.slice(0,3)),f=e.transformAsVector(i.slice(3,6)),h=e.transformAsVector(i.slice(6,9)),p=new me.a([c[0],c[1],c[2],f[0],f[1],f[2],h[0],h[1],h[2]]);if(_e(n))return n.center=r,n.halfAxes=p,n;return new Nt.d(r,p)}(t.box,e,n);if(t.region){var r=ye(t.region,6),i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],l=r[5],c=xt.WGS84.cartographicToCartesian([Object(k.i)(i),Object(k.i)(s),u],we),f=xt.WGS84.cartographicToCartesian([Object(k.i)(a),Object(k.i)(o),l],xe),h=(new K.a).addVectors(c,f).multiplyScalar(.5),p=(new K.a).subVectors(c,f).len()/2;return Oe([h[0],h[1],h[2],p],new Z.a)}if(t.sphere)return Oe(t.sphere,e,n);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function Oe(t,e,n){var r=new K.a(t[0],t[1],t[2]);e.transform(r,r);var i=e.getScale(Ae),o=Math.max(Math.max(i[0],i[1]),i[2]),a=t[3]*o;return _e(n)?(n.center=r,n.radius=a,n):new Nt.b(r,a)}new K.a,new K.a,new Z.a,new K.a,new K.a,new K.a;function Se(t,e){if(t.dynamicScreenSpaceError&&t.dynamicScreenSpaceErrorComputedDensity){var n=t.dynamicScreenSpaceErrorComputedDensity,r=t.dynamicScreenSpaceErrorFactor,i=function(t,e){var n=t*e;return 1-Math.exp(-n*n)}(e,n)*r;return i}return 0}function Pe(t){return function(t){if(Array.isArray(t))return Ce(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)return;if("string"===typeof t)return Ce(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 Ce(t,e)}(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.")}()}function Ce(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 Te=new K.a,ke=new K.a,Ie=new K.a,Le=new K.a,je=new K.a,Me=new Z.a,Re=new Z.a;function Ne(t,e){var n=e.topDownViewport,r=t.header.mbs[1],i=t.header.mbs[0],o=t.header.mbs[2],a=t.header.mbs[3],s=Pe(t.boundingVolume.center),u=n.unprojectPosition(n.cameraPosition);xt.WGS84.cartographicToCartesian(u,Te),ke.copy(Te).subtract(s).normalize(),xt.WGS84.eastNorthUpToFixedFrame(s,Me),Re.copy(Me).invert(),Ie.copy(Te).transform(Re);var l=Math.sqrt(Ie[0]*Ie[0]+Ie[1]*Ie[1]),c=l*l/Ie[2];Le.copy([Ie[0],Ie[1],c]);var f=Le.transform(Me).subtract(s).normalize(),h=ke.cross(f).normalize().scale(a).add(s),p=xt.WGS84.cartesianToCartographic(h),d=n.project([i,r,o]),m=n.project(p);return je.copy(d).subtract(m).magnitude()}function De(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fe(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)}}var Be=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;De(this,t),Object(r.a)(this,"_map",new Map),Object(r.a)(this,"_array",void 0),Object(r.a)(this,"_length",void 0),this._array=new Array(e),this._length=e}var e,n,i;return e=t,(n=[{key:"length",get:function(){return this._length},set:function(t){this._length=t,t>this._array.length&&(this._array.length=t)}},{key:"values",get:function(){return this._array}},{key:"get",value:function(t){return Object(Ot.a)(t<this._array.length),this._array[t]}},{key:"set",value:function(t,e){Object(Ot.a)(t>=0),t>=this.length&&(this.length=t+1),this._map.has(this._array[t])&&this._map.delete(this._array[t]),this._array[t]=e,this._map.set(e,t)}},{key:"delete",value:function(t){var e=this._map.get(t);e>=0&&(this._array.splice(e,1),this._map.delete(t),this.length--)}},{key:"peek",value:function(){return this._array[this._length-1]}},{key:"push",value:function(t){if(!this._map.has(t)){var e=this.length++;this._array[e]=t,this._map.set(t,e)}}},{key:"pop",value:function(){var t=this._array[--this.length];return this._map.delete(t),t}},{key:"reserve",value:function(t){Object(Ot.a)(t>=0),t>this._array.length&&(this._array.length=t)}},{key:"resize",value:function(t){Object(Ot.a)(t>=0),this.length=t}},{key:"trim",value:function(t){null!==t&&void 0!==t||(t=this.length),this._array.length=t}},{key:"reset",value:function(){this._array=[],this._map=new Map,this._length=0}},{key:"find",value:function(t){return this._map.has(t)}}])&&Fe(e.prototype,n),i&&Fe(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ze(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Ue(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 Ue(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ue(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 Ge(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 Ve(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ge(Object(n),!0).forEach((function(e){qe(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function qe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function He(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)}}var We={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2,updateTransforms:!0,onTraversalEnd:function(){},viewportTraversersMap:{},basePath:""},Xe=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"options",void 0),Object(r.a)(this,"root",void 0),Object(r.a)(this,"requestedTiles",void 0),Object(r.a)(this,"selectedTiles",void 0),Object(r.a)(this,"emptyTiles",void 0),Object(r.a)(this,"lastUpdate",(new Date).getTime()),Object(r.a)(this,"updateDebounceTime",1e3),Object(r.a)(this,"_traversalStack",void 0),Object(r.a)(this,"_emptyTraversalStack",void 0),Object(r.a)(this,"_frameNumber",void 0),this.options=Ve(Ve({},We),e),this._traversalStack=new Be,this._emptyTraversalStack=new Be,this._frameNumber=null,this.root=null,this.selectedTiles={},this.requestedTiles={},this.emptyTiles={}}var e,n,i;return e=t,n=[{key:"traversalFinished",value:function(t){return!0}},{key:"traverse",value:function(t,e,n){this.root=t,this.options=Ve(Ve({},this.options),n),this.reset(),this.updateTile(t,e),this._frameNumber=e.frameNumber,this.executeTraversal(t,e)}},{key:"reset",value:function(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}},{key:"executeTraversal",value:function(t,e){var n=this._traversalStack;for(t._selectionDepth=1,n.push(t);n.length>0;){var r=n.pop(),i=!1;this.canTraverse(r,e)&&(this.updateChildTiles(r,e),i=this.updateAndPushChildren(r,e,n,r.hasRenderContent?r._selectionDepth+1:r._selectionDepth));var o=r.parent,a=Boolean(!o||o._shouldRefine),s=!i;r.hasRenderContent?r.refine===ie?(this.loadTile(r,e),this.selectTile(r,e)):r.refine===oe&&(this.loadTile(r,e),s&&this.selectTile(r,e)):(this.emptyTiles[r.id]=r,this.loadTile(r,e),s&&this.selectTile(r,e)),this.touchTile(r,e),r._shouldRefine=i&&a}var u=(new Date).getTime();(this.traversalFinished(e)||u-this.lastUpdate>this.updateDebounceTime)&&(this.lastUpdate=u,this.options.onTraversalEnd(e))}},{key:"updateChildTiles",value:function(t,e){var n,r=ze(t.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.updateTile(i,e)}}catch(o){r.e(o)}finally{r.f()}return!0}},{key:"updateAndPushChildren",value:function(t,e,n,r){var i=this.options,o=i.loadSiblings,a=i.skipLevelOfDetail,s=t.children;s.sort(this.compareDistanceToCamera.bind(this));var u,l=t.refine===oe&&t.hasRenderContent&&!a,c=!1,f=!0,h=ze(s);try{for(h.s();!(u=h.n()).done;){var p=u.value;if(p._selectionDepth=r,p.isVisibleAndInRequestVolume?(n.find(p)&&n.delete(p),n.push(p),c=!0):(l||o)&&(this.loadTile(p,e),this.touchTile(p,e)),l){var d=void 0;if(d=!!p._inRequestVolume&&(p.hasRenderContent?p.contentAvailable:this.executeEmptyTraversal(p,e)),!(f=f&&d))return!1}}}catch(m){h.e(m)}finally{h.f()}return c||(f=!1),f}},{key:"updateTile",value:function(t,e){this.updateTileVisibility(t,e)}},{key:"selectTile",value:function(t,e){this.shouldSelectTile(t)&&(t._selectedFrame=e.frameNumber,this.selectedTiles[t.id]=t)}},{key:"loadTile",value:function(t,e){this.shouldLoadTile(t)&&(t._requestedFrame=e.frameNumber,t._priority=t._getPriority(),this.requestedTiles[t.id]=t)}},{key:"touchTile",value:function(t,e){t.tileset._cache.touch(t),t._touchedFrame=e.frameNumber}},{key:"canTraverse",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return!!t.hasChildren&&(t.hasTilesetContent?!t.contentExpired:!(!r&&!t.isVisibleAndInRequestVolume)&&this.shouldRefine(t,e,n))}},{key:"shouldLoadTile",value:function(t){return t.hasUnloadedContent||t.contentExpired}},{key:"shouldSelectTile",value:function(t){return t.contentAvailable&&!this.options.skipLevelOfDetail}},{key:"shouldRefine",value:function(t,e,n){var r=t._screenSpaceError;return n&&(r=t.getScreenSpaceError(e,!0)),r>this.options.maximumScreenSpaceError}},{key:"updateTileVisibility",value:function(t,e){var n=[];if(this.options.viewportTraversersMap)for(var r in this.options.viewportTraversersMap)this.options.viewportTraversersMap[r]===e.viewport.id&&n.push(r);else n.push(e.viewport.id);t.updateVisibility(e,n)}},{key:"compareDistanceToCamera",value:function(t,e){return t._distanceToCamera-e._distanceToCamera}},{key:"anyChildrenVisible",value:function(t,e){var n,r=!1,i=ze(t.children);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.updateVisibility(e),r=r||o.isVisibleAndInRequestVolume}}catch(a){i.e(a)}finally{i.f()}return r}},{key:"executeEmptyTraversal",value:function(t,e){var n=!0,r=this._emptyTraversalStack;for(r.push(t);r.length>0&&n;){var i=r.pop();if(this.updateTile(i,e),i.isVisibleAndInRequestVolume||this.loadTile(i,e),this.touchTile(i,e),!i.hasRenderContent&&this.canTraverse(i,e,!1,!0)){var o,a=ze(i.children);try{for(a.s();!(o=a.n()).done;){var s=o.value;r.find(s)&&r.delete(s),r.push(s)}}catch(u){a.e(u)}finally{a.f()}}else i.contentAvailable||(n=!1)}return n}}],n&&He(e.prototype,n),i&&He(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ye(t){return Ye="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},Ye(t)}function Ze(){Ze=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ye(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Ke(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 $e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ke(Object(n),!0).forEach((function(e){Je(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Je(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qe(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function tn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function en(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)}}var nn=new K.a;var rn=function(){function t(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";tn(this,t),Object(r.a)(this,"tileset",void 0),Object(r.a)(this,"header",void 0),Object(r.a)(this,"id",void 0),Object(r.a)(this,"url",void 0),Object(r.a)(this,"parent",void 0),Object(r.a)(this,"refine",void 0),Object(r.a)(this,"type",void 0),Object(r.a)(this,"contentUrl",void 0),Object(r.a)(this,"lodMetricType",void 0),Object(r.a)(this,"lodMetricValue",void 0),Object(r.a)(this,"boundingVolume",void 0),Object(r.a)(this,"content",void 0),Object(r.a)(this,"contentState",void 0),Object(r.a)(this,"gpuMemoryUsageInBytes",void 0),Object(r.a)(this,"children",void 0),Object(r.a)(this,"depth",void 0),Object(r.a)(this,"viewportIds",void 0),Object(r.a)(this,"transform",void 0),Object(r.a)(this,"extensions",void 0),Object(r.a)(this,"userData",void 0),Object(r.a)(this,"computedTransform",void 0),Object(r.a)(this,"hasEmptyContent",void 0),Object(r.a)(this,"hasTilesetContent",void 0),Object(r.a)(this,"traverser",void 0),Object(r.a)(this,"_cacheNode",void 0),Object(r.a)(this,"_frameNumber",void 0),Object(r.a)(this,"_lodJudge",void 0),Object(r.a)(this,"_expireDate",void 0),Object(r.a)(this,"_expiredContent",void 0),Object(r.a)(this,"_shouldRefine",void 0),Object(r.a)(this,"_distanceToCamera",void 0),Object(r.a)(this,"_centerZDepth",void 0),Object(r.a)(this,"_screenSpaceError",void 0),Object(r.a)(this,"_visibilityPlaneMask",void 0),Object(r.a)(this,"_visible",void 0),Object(r.a)(this,"_inRequestVolume",void 0),Object(r.a)(this,"_stackLength",void 0),Object(r.a)(this,"_selectionDepth",void 0),Object(r.a)(this,"_touchedFrame",void 0),Object(r.a)(this,"_visitedFrame",void 0),Object(r.a)(this,"_selectedFrame",void 0),Object(r.a)(this,"_requestedFrame",void 0),Object(r.a)(this,"_priority",void 0),Object(r.a)(this,"_contentBoundingVolume",void 0),Object(r.a)(this,"_viewerRequestVolume",void 0),Object(r.a)(this,"_initialTransform",void 0),this.header=n,this.tileset=e,this.id=o||n.id,this.url=n.url,this.parent=i,this.refine=this._getRefine(n.refine),this.type=n.type,this.contentUrl=n.contentUrl,this.lodMetricType="geometricError",this.lodMetricValue=0,this.boundingVolume=null,this.content=null,this.contentState=Qt,this.gpuMemoryUsageInBytes=0,this.children=[],this.hasEmptyContent=!1,this.hasTilesetContent=!1,this.depth=0,this.viewportIds=[],this.userData={},this.extensions=null,this._priority=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._screenSpaceError=0,this._cacheNode=null,this._frameNumber=null,this._cacheNode=null,this.traverser=new Xe({}),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._initialTransform=new Z.a,this.transform=new Z.a,this._initializeLodMetric(n),this._initializeTransforms(n),this._initializeBoundingVolumes(n),this._initializeContent(n),this._initializeRenderingState(n),this._lodJudge=null,this._expireDate=null,this._expiredContent=null,Object.seal(this)}var e,n,i,o,a;return e=t,n=[{key:"destroy",value:function(){this.header=null}},{key:"isDestroyed",value:function(){return null===this.header}},{key:"selected",get:function(){return this._selectedFrame===this.tileset._frameNumber}},{key:"isVisible",get:function(){return this._visible}},{key:"isVisibleAndInRequestVolume",get:function(){return this._visible&&this._inRequestVolume}},{key:"hasRenderContent",get:function(){return!this.hasEmptyContent&&!this.hasTilesetContent}},{key:"hasChildren",get:function(){return this.children.length>0||this.header.children&&this.header.children.length>0}},{key:"contentReady",get:function(){return this.contentState===ee||this.hasEmptyContent}},{key:"contentAvailable",get:function(){return Boolean(this.contentReady&&this.hasRenderContent||this._expiredContent&&!this.contentFailed)}},{key:"hasUnloadedContent",get:function(){return this.hasRenderContent&&this.contentUnloaded}},{key:"contentUnloaded",get:function(){return this.contentState===Qt}},{key:"contentExpired",get:function(){return this.contentState===ne}},{key:"contentFailed",get:function(){return this.contentState===re}},{key:"getScreenSpaceError",value:function(t,e){switch(this.tileset.type){case ce:return Ne(this,t);case fe:return function(t,e,n){var r=t.tileset,i=t.parent&&t.parent.lodMetricValue||t.lodMetricValue,o=n?i:t.lodMetricValue;if(0===o)return 0;var a=Math.max(t._distanceToCamera,1e-7),s=e.height,u=e.sseDenominator,l=o*s*(r.options.viewDistanceScale||1)/(a*u);return l-Se(r,a)}(this,t,e);default:throw new Error("Unsupported tileset type")}}},{key:"unselect",value:function(){this._selectedFrame=0}},{key:"_getPriority",value:function(){var t=this.tileset._traverser,e=t.options.skipLevelOfDetail,n=this.refine===ie||e;if(n&&!this.isVisible&&void 0!==this._visible)return-1;if(this.tileset._frameNumber-this._touchedFrame>=1)return-1;if(this.contentState===Qt)return-1;var r=this.parent,i=!r||n&&0!==this._screenSpaceError&&!r.hasTilesetContent?this._screenSpaceError:r._screenSpaceError,o=t.root?t.root._screenSpaceError:0;return Math.max(o-i,0)}},{key:"loadContent",value:(o=Ze().mark((function t(){var e,n,r,i;return Ze().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.hasEmptyContent){t.next=2;break}return t.abrupt("return",!1);case 2:if(!this.content){t.next=4;break}return t.abrupt("return",!0);case 4:return this.contentExpired&&(this._expireDate=null),this.contentState=te,t.next=9,this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority.bind(this));case 9:if(e=t.sent){t.next=13;break}return this.contentState=Qt,t.abrupt("return",!1);case 13:return t.prev=13,n=this.tileset.getTileUrl(this.contentUrl),r=this.tileset.loader,i=$e($e({},this.tileset.loadOptions),{},Je({},r.id,$e($e({},this.tileset.loadOptions[r.id]),{},{isTileset:"json"===this.type},this._getLoaderSpecificOptions(r.id)))),t.next=19,Object(Y.a)(n,r,i);case 19:if(this.content=t.sent,!this.tileset.options.contentLoader){t.next=23;break}return t.next=23,this.tileset.options.contentLoader(this);case 23:return this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this),this.contentState=ee,this._onContentLoaded(),t.abrupt("return",!0);case 29:throw t.prev=29,t.t0=t.catch(13),this.contentState=re,t.t0;case 33:return t.prev=33,e.done(),t.finish(33);case 36:case"end":return t.stop()}}),t,this,[[13,29,33,36]])})),a=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){Qe(i,n,r,a,s,"next",t)}function s(t){Qe(i,n,r,a,s,"throw",t)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"unloadContent",value:function(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.header.content&&this.header.content.destroy&&this.header.content.destroy(),this.header.content=null,this.contentState=Qt,!0}},{key:"updateVisibility",value:function(t,e){if(this._frameNumber!==t.frameNumber){var n=this.parent,r=n?n._visibilityPlaneMask:Nt.c.MASK_INDETERMINATE;if(this.tileset._traverser.options.updateTransforms){var i=n?n.computedTransform:this.tileset.modelMatrix;this._updateTransform(i)}this._distanceToCamera=this.distanceToTile(t),this._screenSpaceError=this.getScreenSpaceError(t,!1),this._visibilityPlaneMask=this.visibility(t,r),this._visible=this._visibilityPlaneMask!==Nt.c.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(t),this._frameNumber=t.frameNumber,this.viewportIds=e}}},{key:"visibility",value:function(t,e){var n=t.cullingVolume,r=this.boundingVolume;return n.computeVisibilityWithPlaneMask(r,e)}},{key:"contentVisibility",value:function(){return!0}},{key:"distanceToTile",value:function(t){var e=this.boundingVolume;return Math.sqrt(Math.max(e.distanceSquaredTo(t.camera.position),0))}},{key:"cameraSpaceZDepth",value:function(t){var e=t.camera,n=this.boundingVolume;return nn.subVectors(n.center,e.position),e.direction.dot(nn)}},{key:"insideViewerRequestVolume",value:function(t){var e=this._viewerRequestVolume;return!e||e.distanceSquaredTo(t.camera.position)<=0}},{key:"updateExpiration",value:function(){if(void 0!==(e=this._expireDate)&&null!==e&&this.contentReady&&!this.hasEmptyContent){var t=Date.now();Date.lessThan(this._expireDate,t)&&(this.contentState=ne,this._expiredContent=this.content)}var e}},{key:"extras",get:function(){return this.header.extras}},{key:"_initializeLodMetric",value:function(t){"lodMetricType"in t?this.lodMetricType=t.lodMetricType:(this.lodMetricType=this.parent&&this.parent.lodMetricType||this.tileset.lodMetricType,console.warn("3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType")),"lodMetricValue"in t?this.lodMetricValue=t.lodMetricValue:(this.lodMetricValue=this.parent&&this.parent.lodMetricValue||this.tileset.lodMetricValue,console.warn("3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue"))}},{key:"_initializeTransforms",value:function(t){this.transform=t.transform?new Z.a(t.transform):new Z.a;var e=this.parent,n=this.tileset,r=e&&e.computedTransform?e.computedTransform.clone():n.modelMatrix.clone();this.computedTransform=new Z.a(r).multiplyRight(this.transform);var i=e&&e._initialTransform?e._initialTransform.clone():new Z.a;this._initialTransform=new Z.a(i).multiplyRight(this.transform)}},{key:"_initializeBoundingVolumes",value:function(t){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(t)}},{key:"_initializeContent",value:function(t){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=Qt,this.hasTilesetContent=!1,t.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}},{key:"_initializeRenderingState",value:function(t){this.depth=t.level||(this.parent?this.parent.depth+1:0),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=Nt.c.MASK_INDETERMINATE,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._frameNumber=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._priority=0}},{key:"_getRefine",value:function(t){return t||this.parent&&this.parent.refine||oe}},{key:"_isTileset",value:function(){return-1!==this.contentUrl.indexOf(".json")}},{key:"_onContentLoaded",value:function(){switch(this.content&&this.content.type){case"vctr":case"geom":this.tileset._traverser.disableSkipLevelOfDetail=!0}this._isTileset()&&(this.hasTilesetContent=!0)}},{key:"_updateBoundingVolume",value:function(t){this.boundingVolume=Ee(t.boundingVolume,this.computedTransform,this.boundingVolume);var e=t.content;e&&(e.boundingVolume&&(this._contentBoundingVolume=Ee(e.boundingVolume,this.computedTransform,this._contentBoundingVolume)),t.viewerRequestVolume&&(this._viewerRequestVolume=Ee(t.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}},{key:"_updateTransform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Z.a,e=t.clone().multiplyRight(this.transform),n=!e.equals(this.computedTransform);n&&(this.computedTransform=e,this._updateBoundingVolume(this.header))}},{key:"_getLoaderSpecificOptions",value:function(t){return"i3s"===t?$e($e({},this.tileset.options.i3s),{},{tile:this.header,tileset:this.tileset.tileset,isTileHeader:!1}):{assetGltfUpAxis:(e=this.tileset.tileset).asset&&e.asset.gltfUpAxis||"Y"};var e}}],n&&en(e.prototype,n),i&&en(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function on(t){return on="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},on(t)}function an(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sn(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 un(){return un="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ln(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},un.apply(this,arguments)}function ln(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pn(t)););return t}function cn(t,e){return cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cn(t,e)}function fn(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pn(t);if(e){var i=pn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hn(this,n)}}function hn(t,e){if(e&&("object"===on(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pn(t){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pn(t)}var dn=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cn(t,e)}(o,t);var e,n,r,i=fn(o);function o(){return an(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"compareDistanceToCamera",value:function(t,e){return 0===e._distanceToCamera&&0===t._distanceToCamera?e._centerZDepth-t._centerZDepth:e._distanceToCamera-t._distanceToCamera}},{key:"updateTileVisibility",value:function(t,e){if(un(pn(o.prototype),"updateTileVisibility",this).call(this,t,e),t.isVisibleAndInRequestVolume){var n=t.children.length>0;if(t.hasTilesetContent&&n){var r=t.children[0];return this.updateTileVisibility(r,e),void(t._visible=r._visible)}if(this.meetsScreenSpaceErrorEarly(t,e))t._visible=!1;else{var i=t.refine===oe,a=t._optimChildrenWithinParent===pe;i&&a&&n&&!this.anyChildrenVisible(t,e)&&(t._visible=!1)}}}},{key:"meetsScreenSpaceErrorEarly",value:function(t,e){var n=t.parent;return!(!n||n.hasTilesetContent||n.refine!==ie)&&!this.shouldRefine(t,e,!0)}}])&&sn(e.prototype,n),r&&sn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Xe);function mn(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)}}var gn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"frameNumberMap",new Map)}var e,n,i;return e=t,(n=[{key:"register",value:function(t,e){var n=this.frameNumberMap.get(t)||new Map,r=n.get(e)||0;n.set(e,r+1),this.frameNumberMap.set(t,n)}},{key:"deregister",value:function(t,e){var n=this.frameNumberMap.get(t);if(n){var r=n.get(e)||1;n.set(e,r-1)}}},{key:"isZero",value:function(t,e){var n;return 0===((null===(n=this.frameNumberMap.get(t))||void 0===n?void 0:n.get(e))||0)}}])&&mn(e.prototype,n),i&&mn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yn(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)}}var vn="REQUESTED",bn="COMPLETED",_n="ERROR",An=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"_statusMap",void 0),Object(r.a)(this,"pendingTilesRegister",new gn),this._statusMap={}}var e,n,i;return e=t,(n=[{key:"add",value:function(t,e,n,r){var i=this;if(!this._statusMap[e]){var o=r.frameNumber,a=r.viewport.id;this._statusMap[e]={request:t,callback:n,key:e,frameState:r,status:vn},this.pendingTilesRegister.register(a,o),t().then((function(t){i._statusMap[e].status=bn;var n=i._statusMap[e].frameState,o=n.frameNumber,a=n.viewport.id;i.pendingTilesRegister.deregister(a,o),i._statusMap[e].callback(t,r)})).catch((function(t){i._statusMap[e].status=_n;var r=i._statusMap[e].frameState,o=r.frameNumber,a=r.viewport.id;i.pendingTilesRegister.deregister(a,o),n(t)}))}}},{key:"update",value:function(t,e){if(this._statusMap[t]){var n=this._statusMap[t].frameState,r=n.frameNumber,i=n.viewport.id;this.pendingTilesRegister.deregister(i,r);var o=e.frameNumber,a=e.viewport.id;this.pendingTilesRegister.register(a,o),this._statusMap[t].frameState=e}}},{key:"find",value:function(t){return this._statusMap[t]}},{key:"hasPendingTiles",value:function(t,e){return!this.pendingTilesRegister.isZero(t,e)}}])&&yn(e.prototype,n),i&&yn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function wn(t){return wn="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},wn(t)}function xn(){xn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==wn(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function En(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 On(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?En(Object(n),!0).forEach((function(e){Sn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Sn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pn(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Cn(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Tn(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 Tn(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Tn(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 kn(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 In(t,e){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},In(t,e)}function Ln(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Rn(t);if(e){var i=Rn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jn(this,n)}}function jn(t,e){if(e&&("object"===wn(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mn(t)}function Mn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rn(t){return Rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rn(t)}var Nn=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&In(t,e)}(u,t);var e,n,i,o,a,s=Ln(u);function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),e=s.call(this,t),Object(r.a)(Mn(e),"_tileManager",void 0),e._tileManager=new An,e}return e=u,n=[{key:"traversalFinished",value:function(t){return!this._tileManager.hasPendingTiles(t.viewport.id,this._frameNumber||0)}},{key:"shouldRefine",value:function(t,e){return t._lodJudge=function(t,e){if(0===t.lodMetricValue||isNaN(t.lodMetricValue))return"DIG";var n=2*Ne(t,e);return n<2?"OUT":!t.header.children||n<=t.lodMetricValue?"DRAW":t.header.children?"DIG":"OUT"}(t,e),"DIG"===t._lodJudge}},{key:"updateChildTiles",value:function(t,e){var n,r=this,i=t.header.children||[],o=t.children,a=t.tileset,s=Cn(i);try{var u=function(){var i=n.value,s="".concat(i.id,"-").concat(e.viewport.id),u=o&&o.find((function(t){return t.id===s}));if(u)u&&r.updateTile(u,e);else{var l=function(){return r._loadTile(i.id,a)};r._tileManager.find(s)?r._tileManager.update(s,e):(a.tileset.nodePages&&(l=function(){return a.tileset.nodePagesTile.formTileFromNodePages(i.id)}),r._tileManager.add(l,s,(function(e){return r._onTileLoad(e,t,s)}),e))}};for(s.s();!(n=s.n()).done;)u()}catch(l){s.e(l)}finally{s.f()}return!1}},{key:"_loadTile",value:(o=xn().mark((function t(e,n){var r,i,o;return xn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.loader,i=n.getTileUrl("".concat(n.url,"/nodes/").concat(e)),o=On(On({},n.loadOptions),{},{i3s:On(On({},n.loadOptions.i3s),{},{isTileHeader:!0,loadContent:!1})}),t.next=5,Object(Y.a)(i,r,o);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})),a=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){Pn(i,n,r,a,s,"next",t)}function s(t){Pn(i,n,r,a,s,"throw",t)}a(void 0)}))},function(t,e){return a.apply(this,arguments)})},{key:"_onTileLoad",value:function(t,e,n){var r=new rn(e.tileset,t,e,n);e.children.push(r);var i=this._tileManager.find(r.id).frameState;this.updateTile(r,i),this._frameNumber===i.frameNumber&&(this.traversalFinished(i)||(new Date).getTime()-this.lastUpdate>this.updateDebounceTime)&&this.executeTraversal(r,i)}}],n&&kn(e.prototype,n),i&&kn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),u}(Xe);function Dn(t){return Dn="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},Dn(t)}function Fn(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||zn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bn(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=zn(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function zn(t,e){if(t){if("string"===typeof t)return Un(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)?Un(t,e):void 0}}function Un(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 Gn(){Gn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Dn(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Vn(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function qn(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Vn(o,r,i,a,s,"next",t)}function s(t){Vn(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Hn(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 Wn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Hn(Object(n),!0).forEach((function(e){Xn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Xn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yn(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)}}var Zn={description:"",ellipsoid:xt.WGS84,modelMatrix:new Z.a,throttleRequests:!0,maxRequests:64,maximumMemoryUsage:32,maximumTilesSelected:0,debounceTime:0,onTileLoad:function(){},onTileUnload:function(){},onTileError:function(){},onTraversalComplete:function(t){return t},contentLoader:void 0,viewDistanceScale:1,maximumScreenSpaceError:8,loadTiles:!0,updateTransforms:!0,viewportTraversersMap:null,loadOptions:{fetch:{}},attributions:[],basePath:"",i3s:{}},Kn="Tiles In Tileset(s)",$n="Tiles In Memory",Jn="Tiles In View",Qn="Tiles To Render",tr="Tiles Loaded",er="Tiles Loading",nr="Tiles Unloaded",rr="Failed Tile Loads",ir="Points/Vertices",or="Tile Memory Use",ar=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"options",void 0),Object(r.a)(this,"loadOptions",void 0),Object(r.a)(this,"type",void 0),Object(r.a)(this,"tileset",void 0),Object(r.a)(this,"loader",void 0),Object(r.a)(this,"url",void 0),Object(r.a)(this,"basePath",void 0),Object(r.a)(this,"modelMatrix",void 0),Object(r.a)(this,"ellipsoid",void 0),Object(r.a)(this,"lodMetricType",void 0),Object(r.a)(this,"lodMetricValue",void 0),Object(r.a)(this,"refine",void 0),Object(r.a)(this,"root",void 0),Object(r.a)(this,"roots",void 0),Object(r.a)(this,"asset",void 0),Object(r.a)(this,"description",void 0),Object(r.a)(this,"properties",void 0),Object(r.a)(this,"extras",void 0),Object(r.a)(this,"attributions",void 0),Object(r.a)(this,"credits",void 0),Object(r.a)(this,"stats",void 0),Object(r.a)(this,"traverseCounter",void 0),Object(r.a)(this,"geometricError",void 0),Object(r.a)(this,"selectedTiles",void 0),Object(r.a)(this,"updatePromise",null),Object(r.a)(this,"tilesetInitializationPromise",void 0),Object(r.a)(this,"cartographicCenter",void 0),Object(r.a)(this,"cartesianCenter",void 0),Object(r.a)(this,"zoom",void 0),Object(r.a)(this,"boundingVolume",void 0),Object(r.a)(this,"gpuMemoryUsageInBytes",void 0),Object(r.a)(this,"dynamicScreenSpaceErrorComputedDensity",void 0),Object(r.a)(this,"_traverser",void 0),Object(r.a)(this,"_cache",void 0),Object(r.a)(this,"_requestScheduler",void 0),Object(r.a)(this,"_frameNumber",void 0),Object(r.a)(this,"_queryParamsString",void 0),Object(r.a)(this,"_queryParams",void 0),Object(r.a)(this,"_extensionsUsed",void 0),Object(r.a)(this,"_tiles",void 0),Object(r.a)(this,"_pendingCount",void 0),Object(r.a)(this,"lastUpdatedVieports",void 0),Object(r.a)(this,"_requestedTiles",void 0),Object(r.a)(this,"_emptyTiles",void 0),Object(r.a)(this,"frameStateData",void 0),Object(r.a)(this,"maximumMemoryUsage",void 0),Object(Ot.a)(e),this.options=Wn(Wn({},Zn),n),this.tileset=e,this.loader=e.loader,this.type=e.type,this.url=e.url,this.basePath=e.basePath||St.a.dirname(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=e.lodMetricType,this.lodMetricValue=e.lodMetricValue,this.refine=e.root.refine,this.loadOptions=this.options.loadOptions||{},this.root=null,this.roots={},this.cartographicCenter=null,this.cartesianCenter=null,this.zoom=1,this.boundingVolume=null,this.traverseCounter=0,this.geometricError=0,this._traverser=this._initializeTraverser(),this._cache=new Rt,this._requestScheduler=new Pt.a({throttleRequests:this.options.throttleRequests,maxRequests:this.options.maxRequests}),this._frameNumber=0,this._pendingCount=0,this._tiles={},this.selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this.frameStateData={},this.lastUpdatedVieports=null,this._queryParams={},this._queryParamsString="",this.maximumMemoryUsage=this.options.maximumMemoryUsage||32,this.gpuMemoryUsageInBytes=0,this.stats=new Et.a({id:this.url}),this._initializeStats(),this._extensionsUsed=void 0,this.dynamicScreenSpaceErrorComputedDensity=0,this.extras=null,this.asset={},this.credits={},this.description=this.options.description||"",this.tilesetInitializationPromise=this._initializeTileSet(e)}var e,n,i,o,a,s;return e=t,n=[{key:"destroy",value:function(){this._destroy()}},{key:"isLoaded",value:function(){return 0===this._pendingCount&&0!==this._frameNumber&&0===this._requestedTiles.length}},{key:"tiles",get:function(){return Object.values(this._tiles)}},{key:"frameNumber",get:function(){return this._frameNumber}},{key:"queryParams",get:function(){return this._queryParamsString||(this._queryParamsString=function(t){for(var e=[],n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];e.push("".concat(i,"=").concat(t[i]))}switch(e.length){case 0:return"";case 1:return"?".concat(e[0]);default:return"?".concat(e.join("&"))}}(this._queryParams)),this._queryParamsString}},{key:"setProps",value:function(t){this.options=Wn(Wn({},this.options),t)}},{key:"setOptions",value:function(t){this.options=Wn(Wn({},this.options),t)}},{key:"getTileUrl",value:function(t){return t.startsWith("data:")?t:"".concat(t).concat(this.queryParams)}},{key:"hasExtension",value:function(t){return Boolean(this._extensionsUsed&&this._extensionsUsed.indexOf(t)>-1)}},{key:"update",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.tilesetInitializationPromise.then((function(){!e&&t.lastUpdatedVieports?e=t.lastUpdatedVieports:t.lastUpdatedVieports=e,e&&t.doUpdate(e)}))}},{key:"selectTiles",value:(s=qn(Gn().mark((function t(){var e,n=this,r=arguments;return Gn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:null,t.next=3,this.tilesetInitializationPromise;case 3:return e&&(this.lastUpdatedVieports=e),this.updatePromise||(this.updatePromise=new Promise((function(t){setTimeout((function(){n.lastUpdatedVieports&&n.doUpdate(n.lastUpdatedVieports),t(n._frameNumber),n.updatePromise=null}),n.options.debounceTime)}))),t.abrupt("return",this.updatePromise);case 6:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"doUpdate",value:function(t){if((!("loadTiles"in this.options)||this.options.loadTiles)&&!(this.traverseCounter>0)){var e=t instanceof Array?t:[t];this._cache.reset(),this._frameNumber++,this.traverseCounter=e.length;var n,r=[],i=Bn(e);try{for(i.s();!(n=i.n()).done;){var o=n.value.id;this._needTraverse(o)?r.push(o):this.traverseCounter--}}catch(f){i.e(f)}finally{i.f()}var a,s=Bn(e);try{for(s.s();!(a=s.n()).done;){var u=a.value,l=u.id;if(this.roots[l]||(this.roots[l]=this._initializeTileHeaders(this.tileset,null)),r.includes(l)){var c=Vt(u,this._frameNumber);this._traverser.traverse(this.roots[l],c,this.options)}}}catch(f){s.e(f)}finally{s.f()}}}},{key:"_needTraverse",value:function(t){var e=t;return this.options.viewportTraversersMap&&(e=this.options.viewportTraversersMap[t]),e===t}},{key:"_onTraversalEnd",value:function(t){var e=t.viewport.id;this.frameStateData[e]||(this.frameStateData[e]={selectedTiles:[],_requestedTiles:[],_emptyTiles:[]});var n=this.frameStateData[e],r=Fn(qt(Object.values(this._traverser.selectedTiles),t,this.options.maximumTilesSelected),2),i=r[0],o=r[1];n.selectedTiles=i;var a,s=Bn(o);try{for(s.s();!(a=s.n()).done;)a.value.unselect()}catch(u){s.e(u)}finally{s.f()}n._requestedTiles=Object.values(this._traverser.requestedTiles),n._emptyTiles=Object.values(this._traverser.emptyTiles),this.traverseCounter--,this.traverseCounter>0||this._updateTiles()}},{key:"_updateTiles",value:function(){for(var t in this.selectedTiles=[],this._requestedTiles=[],this._emptyTiles=[],this.frameStateData){var e=this.frameStateData[t];this.selectedTiles=this.selectedTiles.concat(e.selectedTiles),this._requestedTiles=this._requestedTiles.concat(e._requestedTiles),this._emptyTiles=this._emptyTiles.concat(e._emptyTiles)}this.selectedTiles=this.options.onTraversalComplete(this.selectedTiles);var n,r=Bn(this.selectedTiles);try{for(r.s();!(n=r.n()).done;){var i=n.value;this._tiles[i.id]=i}}catch(o){r.e(o)}finally{r.f()}this._loadTiles(),this._unloadTiles(),this._updateStats()}},{key:"_tilesChanged",value:function(t,e){if(t.length!==e.length)return!0;var n=new Set(t.map((function(t){return t.id}))),r=new Set(e.map((function(t){return t.id}))),i=t.filter((function(t){return!r.has(t.id)})).length>0;return i=i||e.filter((function(t){return!n.has(t.id)})).length>0}},{key:"_loadTiles",value:function(){var t,e=Bn(this._requestedTiles);try{for(e.s();!(t=e.n()).done;){var n=t.value;n.contentUnloaded&&this._loadTile(n)}}catch(r){e.e(r)}finally{e.f()}}},{key:"_unloadTiles",value:function(){this._cache.unloadTiles(this,(function(t,e){return t._unloadTile(e)}))}},{key:"_updateStats",value:function(){var t,e=0,n=0,r=Bn(this.selectedTiles);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.contentAvailable&&i.content&&(e++,i.content.pointCount?n+=i.content.pointCount:n+=i.content.vertexCount)}}catch(o){r.e(o)}finally{r.f()}this.stats.get(Jn).count=this.selectedTiles.length,this.stats.get(Qn).count=e,this.stats.get(ir).count=n}},{key:"_initializeTileSet",value:(a=qn(Gn().mark((function t(e){return Gn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.type!==ce){t.next=5;break}return this.calculateViewPropsI3S(),t.next=4,e.root;case 4:e.root=t.sent;case 5:this.root=this._initializeTileHeaders(e,null),this.type===fe&&(this._initializeTiles3DTileset(e),this.calculateViewPropsTiles3D()),this.type===ce&&this._initializeI3STileset();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"calculateViewPropsI3S",value:function(){var t,e=this.tileset.fullExtent;if(e){var n=e.xmin,r=e.xmax,i=e.ymin,o=e.ymax,a=e.zmin,s=e.zmax;return this.cartographicCenter=new K.a(n+(r-n)/2,i+(o-i)/2,a+(s-a)/2),this.cartesianCenter=xt.WGS84.cartographicToCartesian(this.cartographicCenter,new K.a),void(this.zoom=Jt(e,this.cartographicCenter,this.cartesianCenter))}var u=null===(t=this.tileset.store)||void 0===t?void 0:t.extent;if(u){var l=Fn(u,4),c=l[0],f=l[1],h=l[2],p=l[3];return this.cartographicCenter=new K.a(c+(h-c)/2,f+(p-f)/2,0),this.cartesianCenter=xt.WGS84.cartographicToCartesian(this.cartographicCenter,new K.a),void(this.zoom=function(t,e,n){var r=Xt(t,4),i=r[0],o=r[1];return Jt({xmin:i,xmax:r[2],ymin:o,ymax:r[3],zmin:0,zmax:0},e,n)}(u,this.cartographicCenter,this.cartesianCenter))}console.warn("Extent is not defined in the tileset header"),this.cartographicCenter=new K.a,this.zoom=1}},{key:"calculateViewPropsTiles3D",value:function(){var t=this.root;Object(Ot.a)(t);var e=t.boundingVolume.center;if(!e)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new K.a,void(this.zoom=1);0!==e[0]||0!==e[1]||0!==e[2]?this.cartographicCenter=xt.WGS84.cartesianToCartographic(e,new K.a):this.cartographicCenter=new K.a(0,0,-xt.WGS84.radii[0]),this.cartesianCenter=e,this.zoom=$t(t.boundingVolume,this.cartographicCenter)}},{key:"_initializeStats",value:function(){this.stats.get(Kn),this.stats.get(er),this.stats.get($n),this.stats.get(Jn),this.stats.get(Qn),this.stats.get(tr),this.stats.get(nr),this.stats.get(rr),this.stats.get(ir),this.stats.get(or,"memory")}},{key:"_initializeTileHeaders",value:function(t,e){var n=new rn(this,t.root,e);if(e&&(e.children.push(n),n.depth=e.depth+1),this.type===fe){var r=[];for(r.push(n);r.length>0;){var i=r.pop();this.stats.get(Kn).incrementCount();var o,a=Bn(i.header.children||[]);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=new rn(this,s,i);i.children.push(u),u.depth=i.depth+1,r.push(u)}}catch(l){a.e(l)}finally{a.f()}}}return n}},{key:"_initializeTraverser",value:function(){var t;switch(this.type){case fe:t=dn;break;case ce:t=Nn;break;default:t=Xe}return new t({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}},{key:"_destroyTileHeaders",value:function(t){this._destroySubtree(t)}},{key:"_loadTile",value:(o=qn(Gn().mark((function t(e){var n;return Gn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this._onStartTileLoading(),t.next=4,e.loadContent();case 4:n=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),this._onTileLoadError(e,t.t0);case 10:return t.prev=10,this._onEndTileLoading(),this._onTileLoad(e,n),t.finish(10);case 14:case"end":return t.stop()}}),t,this,[[0,7,10,14]])}))),function(t){return o.apply(this,arguments)})},{key:"_onTileLoadError",value:function(t,e){this.stats.get(rr).incrementCount();var n=e.message||e.toString(),r=t.url;console.error("A 3D tile failed to load: ".concat(t.url," ").concat(n)),this.options.onTileError(t,n,r)}},{key:"_onTileLoad",value:function(t,e){if(e){if(this.type===ce){var n,r,i=(null===(n=this.tileset)||void 0===n||null===(r=n.nodePagesTile)||void 0===r?void 0:r.nodesInNodePages)||0;this.stats.get(Kn).reset(),this.stats.get(Kn).addCount(i)}t&&t.content&&function(t,e){Object(Ot.a)(t),Object(Ot.a)(e);var n=e.rtcCenter,r=e.gltfUpAxis,i=t.computedTransform,o=t.boundingVolume.center,a=new Z.a(i);switch(n&&a.translate(n),r){case"Z":default:break;case"Y":var s=(new Z.a).rotateX(Math.PI/2);a=a.multiplyRight(s);break;case"X":var u=(new Z.a).rotateY(-Math.PI/2);a=a.multiplyRight(u)}e.isQuantized&&a.translate(e.quantizedVolumeOffset).scale(e.quantizedVolumeScale);var l=new K.a(o);e.cartesianModelMatrix=a,e.cartesianOrigin=l;var c=xt.WGS84.cartesianToCartographic(l,new K.a),f=xt.WGS84.eastNorthUpToFixedFrame(l).invert();e.cartographicModelMatrix=f.multiplyRight(a),e.cartographicOrigin=c,e.coordinateSystem||(e.modelMatrix=e.cartographicModelMatrix)}(t,t.content),this._addTileToCache(t),this.options.onTileLoad(t)}}},{key:"_onStartTileLoading",value:function(){this._pendingCount++,this.stats.get(er).incrementCount()}},{key:"_onEndTileLoading",value:function(){this._pendingCount--,this.stats.get(er).decrementCount()}},{key:"_addTileToCache",value:function(t){this._cache.add(this,t,(function(e){return e._updateCacheStats(t)}))}},{key:"_updateCacheStats",value:function(t){this.stats.get(tr).incrementCount(),this.stats.get($n).incrementCount(),this.gpuMemoryUsageInBytes+=t.content.byteLength||0,this.stats.get(or).count=this.gpuMemoryUsageInBytes}},{key:"_unloadTile",value:function(t){this.gpuMemoryUsageInBytes-=t.content&&t.content.byteLength||0,this.stats.get($n).decrementCount(),this.stats.get(nr).incrementCount(),this.stats.get(or).count=this.gpuMemoryUsageInBytes,this.options.onTileUnload(t),t.unloadContent()}},{key:"_destroy",value:function(){var t=[];for(this.root&&t.push(this.root);t.length>0;){var e,n=t.pop(),r=Bn(n.children);try{for(r.s();!(e=r.n()).done;){var i=e.value;t.push(i)}}catch(o){r.e(o)}finally{r.f()}this._destroyTile(n)}this.root=null}},{key:"_destroySubtree",value:function(t){var e=t,n=[];for(n.push(e);n.length>0;){var r,i=Bn((t=n.pop()).children);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.push(o)}}catch(a){i.e(a)}finally{i.f()}t!==e&&this._destroyTile(t)}e.children=[]}},{key:"_destroyTile",value:function(t){this._cache.unloadTile(this,t),this._unloadTile(t),t.destroy()}},{key:"_initializeTiles3DTileset",value:function(t){if(this.asset=t.asset,!this.asset)throw new Error("Tileset must have an asset property.");if("0.0"!==this.asset.version&&"1.0"!==this.asset.version)throw new Error("The tileset must be 3D Tiles version 0.0 or 1.0.");"tilesetVersion"in this.asset&&(this._queryParams.v=this.asset.tilesetVersion),this.credits={attributions:this.options.attributions||[]},this.description=this.options.description||"",this.properties=t.properties,this.geometricError=t.geometricError,this._extensionsUsed=t.extensionsUsed,this.extras=t.extras}},{key:"_initializeI3STileset",value:function(){this.loadOptions.i3s&&"token"in this.loadOptions.i3s&&(this._queryParams.token=this.loadOptions.i3s.token)}}],n&&Yn(e.prototype,n),i&&Yn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();var sr="3.2.12",ur={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"};Object.keys(ur);function lr(t,e,n){Object(Ot.a)(t instanceof ArrayBuffer);var r=new TextDecoder("utf8"),i=new Uint8Array(t,e,n);return r.decode(i)}function cr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=new DataView(t);return"".concat(String.fromCharCode(n.getUint8(e+0))).concat(String.fromCharCode(n.getUint8(e+1))).concat(String.fromCharCode(n.getUint8(e+2))).concat(String.fromCharCode(n.getUint8(e+3)))}var fr=n(314);function hr(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 pr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hr(Object(n),!0).forEach((function(e){dr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function dr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var mr,gr={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},yr=pr(pr({},{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6}),gr);function vr(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 br(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _r=(br(mr={},gr.DOUBLE,Float64Array),br(mr,gr.FLOAT,Float32Array),br(mr,gr.UNSIGNED_SHORT,Uint16Array),br(mr,gr.UNSIGNED_INT,Uint32Array),br(mr,gr.UNSIGNED_BYTE,Uint8Array),br(mr,gr.BYTE,Int8Array),br(mr,gr.SHORT,Int16Array),br(mr,gr.INT,Int32Array),mr),Ar={DOUBLE:gr.DOUBLE,FLOAT:gr.FLOAT,UNSIGNED_SHORT:gr.UNSIGNED_SHORT,UNSIGNED_INT:gr.UNSIGNED_INT,UNSIGNED_BYTE:gr.UNSIGNED_BYTE,BYTE:gr.BYTE,SHORT:gr.SHORT,INT:gr.INT},wr="Failed to convert GL type",xr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"fromTypedArray",value:function(t){for(var e in t=ArrayBuffer.isView(t)?t.constructor:t,_r)if(_r[e]===t)return e;throw new Error(wr)}},{key:"fromName",value:function(t){var e=Ar[t];if(!e)throw new Error(wr);return e}},{key:"getArrayType",value:function(t){switch(t){case gr.UNSIGNED_SHORT_5_6_5:case gr.UNSIGNED_SHORT_4_4_4_4:case gr.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:var e=_r[t];if(!e)throw new Error(wr);return e}}},{key:"getByteSize",value:function(e){return t.getArrayType(e).BYTES_PER_ELEMENT}},{key:"validate",value:function(e){return Boolean(t.getArrayType(e))}},{key:"createTypedArray",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3?arguments[3]:void 0;void 0===i&&(i=(n.byteLength-r)/t.getByteSize(e));var o=t.getArrayType(e);return new o(n,r,i)}}],(n=null)&&vr(e.prototype,n),r&&vr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Er(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)}}var Or=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.a)(this,"json",void 0),Object(r.a)(this,"buffer",void 0),Object(r.a)(this,"featuresLength",0),Object(r.a)(this,"_cachedTypedArrays",{}),this.json=e,this.buffer=n}var e,n,i;return e=t,n=[{key:"getExtension",value:function(t){return this.json.extensions&&this.json.extensions[t]}},{key:"hasProperty",value:function(t){return Boolean(this.json[t])}},{key:"getGlobalProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yr.UNSIGNED_INT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.json[t];return r&&Number.isFinite(r.byteOffset)?this._getTypedArrayFromBinary(t,e,n,1,r.byteOffset):r}},{key:"getPropertyArray",value:function(t,e,n){var r=this.json[t];return r&&Number.isFinite(r.byteOffset)?("componentType"in r&&(e=xr.fromName(r.componentType)),this._getTypedArrayFromBinary(t,e,n,this.featuresLength,r.byteOffset)):this._getTypedArrayFromArray(t,e,r)}},{key:"getProperty",value:function(t,e,n,r,i){var o=this.json[t];if(!o)return o;var a=this.getPropertyArray(t,e,n);if(1===n)return a[r];for(var s=0;s<n;++s)i[s]=a[n*r+s];return i}},{key:"_getTypedArrayFromBinary",value:function(t,e,n,r,i){var o=this._cachedTypedArrays,a=o[t];return a||(a=xr.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+i,r*n),o[t]=a),a}},{key:"_getTypedArrayFromArray",value:function(t,e,n){var r=this._cachedTypedArrays,i=r[t];return i||(i=xr.createTypedArray(e,n),r[t]=i),i}}],n&&Er(e.prototype,n),i&&Er(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Sr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Pr={SCALAR:function(t,e){return t[e]},VEC2:function(t,e){return[t[2*e+0],t[2*e+1]]},VEC3:function(t,e){return[t[3*e+0],t[3*e+1],t[3*e+2]]},VEC4:function(t,e){return[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]]},MAT2:function(t,e){return[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]]},MAT3:function(t,e){return[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]]},MAT4:function(t,e){return[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]}},Cr={SCALAR:function(t,e,n){e[n]=t},VEC2:function(t,e,n){e[2*n+0]=t[0],e[2*n+1]=t[1]},VEC3:function(t,e,n){e[3*n+0]=t[0],e[3*n+1]=t[1],e[3*n+2]=t[2]},VEC4:function(t,e,n){e[4*n+0]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]},MAT2:function(t,e,n){e[4*n+0]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]},MAT3:function(t,e,n){e[9*n+0]=t[0],e[9*n+1]=t[1],e[9*n+2]=t[2],e[9*n+3]=t[3],e[9*n+4]=t[4],e[9*n+5]=t[5],e[9*n+6]=t[6],e[9*n+7]=t[7],e[9*n+8]=t[8],e[9*n+9]=t[9]},MAT4:function(t,e,n){e[16*n+0]=t[0],e[16*n+1]=t[1],e[16*n+2]=t[2],e[16*n+3]=t[3],e[16*n+4]=t[4],e[16*n+5]=t[5],e[16*n+6]=t[6],e[16*n+7]=t[7],e[16*n+8]=t[8],e[16*n+9]=t[9],e[16*n+10]=t[10],e[16*n+11]=t[11],e[16*n+12]=t[12],e[16*n+13]=t[13],e[16*n+14]=t[14],e[16*n+15]=t[15]}};var Tr=function(t){return void 0!==t};function kr(t,e,n){if(!e)return null;var r=t.getExtension("3DTILES_batch_table_hierarchy"),i=e.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=i,r=i),r?function(t,e){var n,r,i,o=t.instancesLength,a=t.classes,s=t.classIds,u=t.parentCounts,l=t.parentIds,c=o;Tr(s.byteOffset)&&(s.componentType=defaultValue(s.componentType,GL.UNSIGNED_SHORT),s.type=AttributeType.SCALAR,s=getBinaryAccessor(s).createArrayBufferView(e.buffer,e.byteOffset+s.byteOffset,o));if(Tr(u))for(Tr(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,u=getBinaryAccessor(u).createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,o)),i=new Uint16Array(o),c=0,n=0;n<o;++n)i[n]=c,c+=u[n];Tr(l)&&Tr(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,l=getBinaryAccessor(l).createArrayBufferView(e.buffer,e.byteOffset+l.byteOffset,c));var f=a.length;for(n=0;n<f;++n){var h=a[n].length,p=a[n].instances,d=getBinaryProperties(h,p,e);a[n].instances=combine(d,p)}var m=new Array(f).fill(0),g=new Uint16Array(o);for(n=0;n<o;++n)r=s[n],g[n]=m[r],++m[r];var y={classes:a,classIds:s,classIndexes:g,parentCounts:u,parentIndexes:i,parentIds:l};return function(t){for(var e=t.classIds.length,n=0;n<e;++n)Lr(t,n,stack)}(y),y}(r,n):null}function Ir(t,e,n){if(t){var r=t.parentCounts;return t.parentIds?n(t,e):r>0?function(t,e,n){var r=t.classIds,i=t.parentCounts,o=t.parentIds,a=t.parentIndexes,s=r.length,u=scratchVisited;u.length=Math.max(u.length,s);var l=++marker,c=scratchStack;c.length=0,c.push(e);for(;c.length>0;)if(u[e=c.pop()]!==l){u[e]=l;var f=n(t,e);if(Tr(f))return f;for(var h=i[e],p=a[e],d=0;d<h;++d){var m=o[p+d];m!==e&&c.push(m)}}return null}(t,e,n):function(t,e,n){var r=!0;for(;r;){var i=n(t,e);if(Tr(i))return i;var o=t.parentIds[e];r=o!==e,e=o}throw new Error("traverseHierarchySingleParent")}(t,e,n)}}function Lr(t,e,n){var r=t.parentCounts,i=t.parentIds,o=t.parentIndexes,a=t.classIds.length;if(Tr(i)){assert(e<a,"Parent index ".concat(e," exceeds the total number of instances: ").concat(a)),assert(-1===n.indexOf(e),"Circular dependency detected in the batch table hierarchy."),n.push(e);for(var s=Tr(r)?r[e]:1,u=Tr(r)?o[e]:e,l=0;l<s;++l){var c=i[u+l];c!==e&&Lr(t,c,n)}n.pop(e)}}function jr(t){return function(t){if(Array.isArray(t))return Mr(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)return;if("string"===typeof t)return Mr(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 Mr(t,e)}(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.")}()}function Mr(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 Rr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nr(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 Dr(t){return void 0!==t&&null!==t}var Fr=function(t,e){return t},Br={HIERARCHY:!0,extensions:!0,extras:!0},zr=function(){function t(e,n,i){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};for(var s in Rr(this,t),Object(r.a)(this,"json",void 0),Object(r.a)(this,"binary",void 0),Object(r.a)(this,"featureCount",void 0),Object(r.a)(this,"_extensions",void 0),Object(r.a)(this,"_properties",void 0),Object(r.a)(this,"_binaryProperties",void 0),Object(r.a)(this,"_hierarchy",void 0),Object(Ot.a)(i>=0),this.json=e||{},this.binary=n,this.featureCount=i,this._extensions=(null===(o=this.json)||void 0===o?void 0:o.extensions)||{},this._properties={},this.json)Br[s]||(this._properties[s]=this.json[s]);this._binaryProperties=this._initializeBinaryProperties(),a["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=kr(this,this.json,this.binary))}var e,n,i;return e=t,(n=[{key:"getExtension",value:function(t){return this.json&&this.json.extensions&&this.json.extensions[t]}},{key:"memorySizeInBytes",value:function(){return 0}},{key:"isClass",value:function(t,e){return this._checkBatchId(t),Object(Ot.a)("string"===typeof e,e),!!this._hierarchy&&Dr(Ir(this._hierarchy,t,(function(t,n){var r=t.classIds[n];return t.classes[r].name===e})))}},{key:"isExactClass",value:function(t,e){return Object(Ot.a)("string"===typeof e,e),this.getExactClassName(t)===e}},{key:"getExactClassName",value:function(t){if(this._checkBatchId(t),this._hierarchy){var e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}},{key:"hasProperty",value:function(t,e){return this._checkBatchId(t),Object(Ot.a)("string"===typeof e,e),Dr(this._properties[e])||this._hasPropertyInHierarchy(t,e)}},{key:"getPropertyNames",value:function(t,e){var n;this._checkBatchId(t),(e=Dr(e)?e:[]).length=0;var r=Object.keys(this._properties);return(n=e).push.apply(n,jr(r)),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}},{key:"getProperty",value:function(t,e){if(this._checkBatchId(t),Object(Ot.a)("string"===typeof e,e),this._binaryProperties){var n=this._binaryProperties[e];if(Dr(n))return this._getBinaryProperty(n,t)}var r=this._properties[e];if(Dr(r))return Fr(r[t]);if(this._hierarchy){var i=this._getHierarchyProperty(t,e);if(Dr(i))return i}}},{key:"setProperty",value:function(t,e,n){var r=this.featureCount;if(this._checkBatchId(t),Object(Ot.a)("string"===typeof e,e),this._binaryProperties){var i=this._binaryProperties[e];if(i)return void this._setBinaryProperty(i,t,n)}if(!this._hierarchy||!this._setHierarchyProperty(this,t,e,n)){var o=this._properties[e];Dr(o)||(this._properties[e]=new Array(r),o=this._properties[e]),o[t]=Fr(n)}}},{key:"_checkBatchId",value:function(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}},{key:"_getBinaryProperty",value:function(t,e){return t.unpack(t.typedArray,e)}},{key:"_setBinaryProperty",value:function(t,e,n){t.pack(n,t.typedArray,e)}},{key:"_initializeBinaryProperties",value:function(){var t=null;for(var e in this._properties){var n=this._properties[e],r=this._initializeBinaryProperty(e,n);r&&((t=t||{})[e]=r)}return t}},{key:"_initializeBinaryProperty",value:function(t,e){if("byteOffset"in e){var n=e;Object(Ot.a)(this.binary,"Property ".concat(t," requires a batch table binary.")),Object(Ot.a)(n.type,"Property ".concat(t," requires a type."));var r=function(t,e,n,r){var i=t.componentType;Object(Ot.a)(t.componentType);var o="string"===typeof i?xr.fromName(i):i,a=Sr[t.type],s=Pr[t.type],u=Cr[t.type];return n+=t.byteOffset,{values:xr.createTypedArray(o,e,n,a*r),type:o,size:a,unpacker:s,packer:u}}(n,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:r.values,componentCount:r.size,unpack:r.unpacker,pack:r.packer}}return null}},{key:"_hasPropertyInHierarchy",value:function(t,e){if(!this._hierarchy)return!1;var n=Ir(this._hierarchy,t,(function(t,n){var r=t.classIds[n];return Dr(t.classes[r].instances[e])}));return Dr(n)}},{key:"_getPropertyNamesInHierarchy",value:function(t,e){Ir(this._hierarchy,t,(function(t,n){var r=t.classIds[n],i=t.classes[r].instances;for(var o in i)i.hasOwnProperty(o)&&-1===e.indexOf(o)&&e.push(o)}))}},{key:"_getHierarchyProperty",value:function(t,e){var n=this;return Ir(this._hierarchy,t,(function(t,r){var i=t.classIds[r],o=t.classes[i],a=t.classIndexes[r],s=o.instances[e];return Dr(s)?Dr(s.typedArray)?n._getBinaryProperty(s,a):Fr(s[a]):null}))}},{key:"_setHierarchyProperty",value:function(t,e,n,r){var i=this,o=Ir(this._hierarchy,e,(function(t,o){var a=t.classIds[o],s=t.classes[a],u=t.classIndexes[o],l=s.instances[n];return!!Dr(l)&&(Object(Ot.a)(o===e,'Inherited property "'.concat(n,'" is read-only.')),Dr(l.typedArray)?i._setBinaryProperty(l,u,r):l[u]=Fr(r),!0)}));return Dr(o)}}])&&Nr(e.prototype,n),i&&Nr(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ur(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new DataView(e);if(t.magic=r.getUint32(n,!0),n+=4,t.version=r.getUint32(n,!0),n+=4,t.byteLength=r.getUint32(n,!0),n+=4,1!==t.version)throw new Error("3D Tile Version ".concat(t.version," not supported"));return n}var Gr="b3dm tile in legacy format.";function Vr(t,e,n){var r,i=new DataView(e);t.header=t.header||{};var o=i.getUint32(n,!0);n+=4;var a=i.getUint32(n,!0);n+=4;var s=i.getUint32(n,!0);n+=4;var u=i.getUint32(n,!0);return n+=4,s>=570425344?(n-=8,r=o,s=a,u=0,o=0,a=0,console.warn(Gr)):u>=570425344&&(n-=4,r=s,s=o,u=a,o=0,a=0,console.warn(Gr)),t.header.featureTableJsonByteLength=o,t.header.featureTableBinaryByteLength=a,t.header.batchTableJsonByteLength=s,t.header.batchTableBinaryByteLength=u,t.header.batchLength=r,n}function qr(t,e,n,r){return n=function(t,e,n,r){var i=t.header,o=i.featureTableJsonByteLength,a=i.featureTableBinaryByteLength,s=i.batchLength;if(t.featureTableJson={BATCH_LENGTH:s||0},o>0){var u=lr(e,n,o);t.featureTableJson=JSON.parse(u)}return n+=o,t.featureTableBinary=new Uint8Array(e,n,a),n+=a}(t,e,n),n=function(t,e,n,r){var i=t.header,o=i.batchTableJsonByteLength,a=i.batchTableBinaryByteLength;if(o>0){var s=lr(e,n,o);t.batchTableJson=JSON.parse(s),n+=o,a>0&&(t.batchTableBinary=new Uint8Array(e,n,a),t.batchTableBinary=new Uint8Array(t.batchTableBinary),n+=a)}return n}(t,e,n),n}function Hr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=t>>11&31,r=t>>5&63,i=31&t;return e[0]=n<<3,e[1]=r<<2,e[2]=i<<3,e}function Wr(t,e,n){if(!e&&(!t||!t.batchIds||!n))return null;var r=t.batchIds,i=t.isRGB565,o=t.pointCount;if(r&&n){for(var a=new Uint8ClampedArray(3*o),s=0;s<o;s++){var u=r[s],l=n.getProperty(u,"dimensions").map((function(t){return 255*t}));a[3*s]=l[0],a[3*s+1]=l[1],a[3*s+2]=l[2]}return{type:yr.UNSIGNED_BYTE,value:a,size:3,normalized:!0}}if(i){for(var c=new Uint8ClampedArray(3*o),f=0;f<o;f++){var h=Hr(e[f]);c[3*f]=h[0],c[3*f+1]=h[1],c[3*f+2]=h[2]}return{type:yr.UNSIGNED_BYTE,value:c,size:3,normalized:!0}}return e&&e.length===3*o?{type:yr.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:yr.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}var Xr=n(639);function Yr(t,e){if(!t)throw new Error("math.gl assertion failed. ".concat(e))}new Xr.a,new K.a,new Xr.a,new Xr.a,new Uint8Array(1);function Zr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:255;return Object(k.d)(t,0,e)/e*2-1}function Kr(t){return t<0?-1:1}function $r(t,e,n,r){if(Yr(r),t<0||t>n||e<0||e>n)throw new Error("x and y must be unsigned normalized integers between 0 and ".concat(n));if(r.x=Zr(t,n),r.y=Zr(e,n),r.z=1-(Math.abs(r.x)+Math.abs(r.y)),r.z<0){var i=r.x;r.x=(1-Math.abs(r.y))*Kr(i),r.y=(1-Math.abs(i))*Kr(r.y)}return r.normalize()}function Jr(t,e,n){return $r(t,e,255,n)}var Qr=new K.a;function ti(t,e,n){return t.isQuantized?n["3d-tiles"]&&n["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){for(var n=new K.a,r=new Float32Array(3*t.pointCount),i=0;i<t.pointCount;i++)n.set(e[3*i],e[3*i+1],e[3*i+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(r,3*i);return r}(t,e)):{type:yr.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}function ei(t){return ei="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},ei(t)}function ni(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 ri(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ni(Object(n),!0).forEach((function(e){ii(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ii(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oi(){oi=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ei(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function ai(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function si(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ai(o,r,i,a,s,"next",t)}function s(t){ai(o,r,i,a,s,"throw",t)}a(void 0)}))}}function ui(t,e,n,r,i){return li.apply(this,arguments)}function li(){return(li=si(oi().mark((function t(e,n,r,i,o){var a,s,u;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ur(e,n,r),r=Vr(e,n,r),r=qr(e,n,r),ci(e),a=fi(e),s=a.featureTable,u=a.batchTable,t.next=7,mi(e,s,u,i,o);case 7:return hi(e,s,i),pi(e,s,u),di(e,s),t.abrupt("return",r);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ci(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}function fi(t){var e=new Or(t.featureTableJson,t.featureTableBinary),n=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(n))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=n,t.featuresLength=n,t.pointsLength=n,t.pointCount=n,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",yr.FLOAT,3);var r=function(t,e){var n=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",yr.UNSIGNED_SHORT,1),t.batchIds)){var r=e.getGlobalProperty("BATCH_LENGTH");if(!r)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");var i=t.batchTableJson,o=t.batchTableBinary;n=new zr(i,o,r)}return n}(t,e);return{featureTable:e,batchTable:r}}function hi(t,e,n){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",yr.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){var r=e.getPropertyArray("POSITION_QUANTIZED",yr.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",yr.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",yr.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=ti(t,r,n)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}function pi(t,e,n){if(!t.attributes.colors){var r=null;e.hasProperty("RGBA")?(r=e.getPropertyArray("RGBA",yr.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?r=e.getPropertyArray("RGB",yr.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(r=e.getPropertyArray("RGB565",yr.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Wr(t,r,n)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",yr.UNSIGNED_BYTE,4))}function di(t,e){if(!t.attributes.normals){var n=null;e.hasProperty("NORMAL")?n=e.getPropertyArray("NORMAL",yr.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(n=e.getPropertyArray("NORMAL_OCT16P",yr.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){for(var n=new Float32Array(3*t.pointsLength),r=0;r<t.pointsLength;r++)Jr(e[2*r],e[2*r+1],Qr),Qr.toArray(n,3*r);return{type:yr.FLOAT,size:2,value:n}}return{type:yr.FLOAT,size:2,value:e}}(t,n)}}function mi(t,e,n,r,i){return gi.apply(this,arguments)}function gi(){return(gi=si(oi().mark((function t(e,n,r,i,o){var a,s,u,l,c,f,h,p;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((l=e.batchTableJson&&e.batchTableJson.extensions&&e.batchTableJson.extensions["3DTILES_draco_point_compression"])&&(u=l.properties),!(c=n.getExtension("3DTILES_draco_point_compression"))){t.next=15;break}if(s=c.properties,f=c.byteOffset,h=c.byteLength,s&&Number.isFinite(f)&&h){t.next=9;break}throw new Error("Draco properties, byteOffset, and byteLength must be defined");case 9:a=e.featureTableBinary.slice(f,f+h),e.hasPositions=Number.isFinite(s.POSITION),e.hasColors=Number.isFinite(s.RGB)||Number.isFinite(s.RGBA),e.hasNormals=Number.isFinite(s.NORMAL),e.hasBatchIds=Number.isFinite(s.BATCH_ID),e.isTranslucent=Number.isFinite(s.RGBA);case 15:if(a){t.next=17;break}return t.abrupt("return",!0);case 17:return p={buffer:a,properties:ri(ri({},s),u),featureTableProperties:s,batchTableProperties:u,dequantizeInShader:!1},t.next=20,yi(e,p,i,o);case 20:return t.abrupt("return",t.sent);case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yi(t,e,n,r){return vi.apply(this,arguments)}function vi(){return(vi=si(oi().mark((function t(e,n,r,i){var o,a,s,u,l,c,f,h,p,d,m,g,y,v,b;return oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i.parse,delete(a=ri(ri({},r),{},{draco:ri(ri({},r.draco),{},{extraAttributes:n.batchTableProperties||{}})}))["3d-tiles"],t.next=5,o(n.buffer,fr.a,a);case 5:if(s=t.sent,u=s.attributes.POSITION&&s.attributes.POSITION.value,l=s.attributes.COLOR_0&&s.attributes.COLOR_0.value,c=s.attributes.NORMAL&&s.attributes.NORMAL.value,f=s.attributes.BATCH_ID&&s.attributes.BATCH_ID.value,h=u&&s.attributes.POSITION.value.quantization,p=c&&s.attributes.NORMAL.value.quantization,h&&(d=s.POSITION.data.quantization,m=d.range,e.quantizedVolumeScale=new K.a(m,m,m),e.quantizedVolumeOffset=new K.a(d.minValues),e.quantizedRange=(1<<d.quantizationBits)-1,e.isQuantizedDraco=!0),p&&(e.octEncodedRange=(1<<s.NORMAL.data.quantization.quantizationBits)-1,e.isOctEncodedDraco=!0),g={},n.batchTableProperties)for(y=0,v=Object.keys(n.batchTableProperties);y<v.length;y++)b=v[y],s.attributes[b]&&s.attributes[b].value&&(g[b.toLowerCase()]=s.attributes[b].value);e.attributes=ri({positions:u,colors:Wr(e,l,void 0),normals:c,batchIds:f},g);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var bi=n(1528),_i=n(150);function Ai(t){return Ai="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},Ai(t)}function wi(){wi=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ai(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function xi(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ei(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){xi(o,r,i,a,s,"next",t)}function s(t){xi(o,r,i,a,s,"throw",t)}a(void 0)}))}}var Oi=0,Si=1;function Pi(t,e,n,r){t.rotateYtoZ=!0;var i=t.byteOffset+t.byteLength-n;if(0===i)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=r["3d-tiles"]&&r["3d-tiles"].assetGltfUpAxis?r["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=Object(_i.c)(e,n,i),t.gltfByteOffset=0,t.gltfByteLength=i,n%4===0||console.warn("".concat(t.type,": embedded glb is not aligned to a 4-byte boundary.")),t.byteOffset+t.byteLength}function Ci(t,e,n,r){return Ti.apply(this,arguments)}function Ti(){return(Ti=Ei(wi().mark((function t(e,n,r,i){var o,a,s;return wi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=r["3d-tiles"]||{},ki(e,n,r),!o.loadGLTF){t.next=16;break}if(a=i.parse,s=i.fetch,!e.gltfUrl){t.next=9;break}return t.next=7,s(e.gltfUrl,r);case 7:e.gltfArrayBuffer=t.sent,e.gltfByteOffset=0;case 9:if(!e.gltfArrayBuffer){t.next=16;break}return t.next=12,a(e.gltfArrayBuffer,bi.a,r,i);case 12:e.gltf=t.sent,delete e.gltfArrayBuffer,delete e.gltfByteOffset,delete e.gltfByteLength;case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ki(t,e,n){switch(e){case Oi:var r=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),i=(new TextDecoder).decode(r);t.gltfUrl=i.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case Si:break;default:throw new Error("b3dm: Illegal glTF format field")}}function Ii(t){return Ii="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},Ii(t)}function Li(){Li=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ii(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function ji(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Mi(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ji(o,r,i,a,s,"next",t)}function s(t){ji(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Ri(t,e,n,r,i){return Ni.apply(this,arguments)}function Ni(){return(Ni=Mi(Li().mark((function t(e,n,r,i,o){var a,s;return Li().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Di(e,n,r,i,o),t.next=3,Ci(e,Si,i,o);case 3:return(s=null===e||void 0===e||null===(a=e.gltf)||void 0===a?void 0:a.extensions)&&s.CESIUM_RTC&&(e.rtcCenter=s.CESIUM_RTC.center),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Di(t,e,n,r,i){n=Pi(t,e,n=qr(t,e,n=Vr(t,e,n=Ur(t,e,n))),r);var o=new Or(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=o.getGlobalProperty("RTC_CENTER",yr.FLOAT,3),n}function Fi(t){return Fi="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},Fi(t)}function Bi(){Bi=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Fi(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function zi(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ui(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){zi(o,r,i,a,s,"next",t)}function s(t){zi(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Gi(t,e,n,r,i){return Vi.apply(this,arguments)}function Vi(){return(Vi=Ui(Bi().mark((function t(e,n,r,i,o){return Bi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=qi(e,n,r,i,o),t.next=3,Ci(e,e.gltfFormat,i,o);case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qi(t,e,n,r,i){if(n=Ur(t,e,n),1!==t.version)throw new Error("Instanced 3D Model version ".concat(t.version," is not supported"));n=Vr(t,e,n);var o=new DataView(e);if(t.gltfFormat=o.getUint32(n,!0),n=Pi(t,e,n=qr(t,e,n+=4),r),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");var a=new Or(t.featureTableJson,t.featureTableBinary),s=a.getGlobalProperty("INSTANCES_LENGTH");if(a.featuresLength=s,!Number.isFinite(s))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=a.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=a.getGlobalProperty("RTC_CENTER",yr.FLOAT,3);new zr(t.batchTableJson,t.batchTableBinary,s);return function(t,e,n,r){for(var i=[new Array(r),t._batchTable][0],o=new K.a,a=new K.a,s=new K.a,u=new K.a,l=new me.a,c=new de.a,f=new K.a,h={},p=new Z.a,d=[],m=[],g=new K.a,y=new K.a,v=0;v<r;v++){var b=void 0;if(e.hasProperty("POSITION"))b=e.getProperty("POSITION",yr.FLOAT,3,v,o);else if(e.hasProperty("POSITION_QUANTIZED")){b=e.getProperty("POSITION_QUANTIZED",yr.UNSIGNED_SHORT,3,v,o);var _=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",yr.FLOAT,3,g);if(!_)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var A=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",yr.FLOAT,3,y);if(!A)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var w=65535,x=0;x<3;x++)b[x]=b[x]/w*A[x]+_[x]}if(!b)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");o.copy(b),h.translation=o,t.normalUp=e.getProperty("NORMAL_UP",yr.FLOAT,3,v,d),t.normalRight=e.getProperty("NORMAL_RIGHT",yr.FLOAT,3,v,m);var E=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",yr.UNSIGNED_SHORT,2,d),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",yr.UNSIGNED_SHORT,2,m),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(xt.WGS84.eastNorthUpToFixedFrame(o,p),p.getRotationMatrix3(l)):l.identity()}E&&(u.copy(a).cross(s).normalize(),l.setColumn(0,a),l.setColumn(1,s),l.setColumn(2,u)),c.fromMatrix3(l),h.rotation=c,f.set(1,1,1);var O=e.getProperty("SCALE",yr.FLOAT,1,v);Number.isFinite(O)&&f.multiplyByScalar(O);var S=e.getProperty("SCALE_NON_UNIFORM",yr.FLOAT,3,v,d);S&&f.scale(S),h.scale=f;var P=e.getProperty("BATCH_ID",yr.UNSIGNED_SHORT,1,v);void 0===P&&(P=v);var C=(new Z.a).fromQuaternion(h.rotation);p.identity(),p.translate(h.translation),p.multiplyRight(C),p.scale(h.scale);var T=p.clone();i[v]={modelMatrix:T,batchId:P}}t.instances=i}(t,a,0,s),n}function Hi(t){return Hi="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},Hi(t)}function Wi(){Wi=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Hi(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Xi(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Yi(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Xi(o,r,i,a,s,"next",t)}function s(t){Xi(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Zi(t,e,n,r,i,o){return Ki.apply(this,arguments)}function Ki(){return(Ki=Yi(Wi().mark((function t(e,n,r,i,o,a){var s,u;return Wi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Ur(e,n,r),s=new DataView(n),e.tilesLength=s.getUint32(r,!0),r+=4,e.tiles=[];case 5:if(!(e.tiles.length<e.tilesLength&&e.byteLength-r>12)){t.next=13;break}return u={},e.tiles.push(u),t.next=10,a(n,r,i,o,u);case 10:r=t.sent,t.next=5;break;case 13:return t.abrupt("return",r);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $i(t){return $i="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},$i(t)}function Ji(){Ji=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==$i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Qi(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function to(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Qi(o,r,i,a,s,"next",t)}function s(t){Qi(o,r,i,a,s,"throw",t)}a(void 0)}))}}function eo(t,e,n,r){return no.apply(this,arguments)}function no(){return(no=to(Ji().mark((function t(e,n,r,i){var o;return Ji().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.rotateYtoZ=!0,e.gltfUpAxis=r["3d-tiles"]&&r["3d-tiles"].assetGltfUpAxis?r["3d-tiles"].assetGltfUpAxis:"Y",o=i.parse,t.next=5,o(n,bi.a,r,i);case 5:e.gltf=t.sent;case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ro(t){return ro="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},ro(t)}function io(){io=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ro(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function oo(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function ao(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){oo(o,r,i,a,s,"next",t)}function s(t){oo(o,r,i,a,s,"throw",t)}a(void 0)}))}}function so(t){return uo.apply(this,arguments)}function uo(){return uo=ao(io().mark((function t(e){var n,r,i,o,a=arguments;return io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2?a[2]:void 0,i=a.length>3?a[3]:void 0,(o=a.length>4&&void 0!==a[4]?a[4]:{}).byteOffset=n,o.type=cr(e,n),t.t0=o.type,t.next=t.t0===ur.COMPOSITE?9:t.t0===ur.BATCHED_3D_MODEL?12:t.t0===ur.GLTF?15:t.t0===ur.INSTANCED_3D_MODEL?18:t.t0===ur.POINT_CLOUD?21:24;break;case 9:return t.next=11,Zi(o,e,n,r,i,so);case 11:case 14:case 17:case 20:case 23:return t.abrupt("return",t.sent);case 12:return t.next=14,Ri(o,e,n,r,i);case 15:return t.next=17,eo(o,e,r,i);case 18:return t.next=20,Gi(o,e,n,r,i);case 21:return t.next=23,ui(o,e,n,r,i);case 24:throw new Error("3DTileLoader: unknown type ".concat(o.type));case 25:case"end":return t.stop()}}),t)}))),uo.apply(this,arguments)}var lo=n(405);function co(t){return co="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},co(t)}function fo(){fo=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==co(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function ho(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function po(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ho(o,r,i,a,s,"next",t)}function s(t){ho(o,r,i,a,s,"throw",t)}a(void 0)}))}}var mo=1952609651;function go(){return(go=po(fo().mark((function t(e){var n,r,i,o,a,s,u;return fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(new Uint32Array(e.slice(0,4))[0]===mo){t.next=3;break}throw new Error("Wrong subtree file magic number");case 3:if(1===new Uint32Array(e.slice(4,8))[0]){t.next=6;break}throw new Error("Wrong subtree file verson, must be 1");case 6:if(n=bo(e.slice(8,16)),r=new Uint8Array(e,24,n),i=new TextDecoder("utf8"),o=i.decode(r),a=JSON.parse(o),s=bo(e.slice(16,24)),u=new ArrayBuffer(0),s&&(u=e.slice(24+n)),!("bufferView"in a.tileAvailability)){t.next=18;break}return t.next=17,yo(a,"tileAvailability",u);case 17:a.tileAvailability.explicitBitstream=t.sent;case 18:if(!("bufferView"in a.contentAvailability)){t.next=22;break}return t.next=21,yo(a,"contentAvailability",u);case 21:a.contentAvailability.explicitBitstream=t.sent;case 22:if(!("bufferView"in a.childSubtreeAvailability)){t.next=26;break}return t.next=25,yo(a,"childSubtreeAvailability",u);case 25:a.childSubtreeAvailability.explicitBitstream=t.sent;case 26:return t.abrupt("return",a);case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yo(t,e,n){return vo.apply(this,arguments)}function vo(){return(vo=po(fo().mark((function t(e,n,r){var i,o,a,s,u;return fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e[n].bufferView,o=e.bufferViews[i],!(a=e.buffers[o.buffer]).uri){t.next=11;break}return t.next=6,Object(lo.a)(a.uri);case 6:return s=t.sent,t.next=9,s.arrayBuffer();case 9:return u=t.sent,t.abrupt("return",new Uint8Array(u,o.byteOffset,o.byteLength));case 11:return t.abrupt("return",new Uint8Array(r,o.byteOffset,o.byteLength));case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bo(t){var e=new DataView(t),n=e.getUint32(0,!0),r=e.getUint32(4,!0);return n+Math.pow(2,32)*r}var _o={id:"3d-tiles-subtree",name:"3D Tiles Subtree",module:"3d-tiles",version:sr,extensions:["subtree"],mimeTypes:["application/octet-stream"],tests:["subtree"],parse:function(t){return go.apply(this,arguments)},options:{}};function Ao(t){return Ao="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},Ao(t)}function wo(){wo=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ao(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function xo(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return Eo(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 Eo(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eo(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 Oo(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function So(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Oo(o,r,i,a,s,"next",t)}function s(t){Oo(o,r,i,a,s,"throw",t)}a(void 0)}))}}var Po={QUADTREE:4,OCTREE:8};function Co(t){return To.apply(this,arguments)}function To(){return(To=So(wo().mark((function t(e){var n,r,i,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_,A,w,x,E,O,S,P,C,T,k,I,L,j,M,R,N,D,F,B,z,U;return wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.options,r=e.parentData,i=void 0===r?{mortonIndex:0,x:0,y:0,z:0}:r,o=e.childIndex,a=void 0===o?0:o,s=e.globalData,u=void 0===s?{level:0,mortonIndex:0,x:0,y:0,z:0}:s,l=e.subtree,c=e.level,f=void 0===c?0:c,h=n.subdivisionScheme,p=n.subtreeLevels,d=n.maximumLevel,m=n.contentUrlTemplate,g=n.subtreesUriTemplate,y=n.basePath,v={children:[],lodMetricValue:0,contentUrl:""},b=Po[h],_=1&a,A=a>>1&1,w=a>>2&1,x=(Math.pow(b,f)-1)/(b-1),E=Lo(i.mortonIndex,a),O=x+E,S=Lo(i.x,_),P=Lo(i.y,A),C=Lo(i.z,w),T=!1,f+1>p&&(T=ko(l.childSubtreeAvailability,E)),k=Lo(u.x,S),I=Lo(u.y,P),L=Lo(u.z,C),j=f+u.level,!T){t.next=38;break}return M="".concat(y,"/").concat(g),R=jo(M,j,k,I,L),t.next=25,Object(Y.a)(R,_o);case 25:N=t.sent,l=N,u.mortonIndex=E,u.x=S,u.y=P,u.z=C,u.level=f,E=0,O=0,S=0,P=0,C=0,f=0;case 38:if(ko(l.tileAvailability,O)&&!(f>d)){t.next=41;break}return t.abrupt("return",v);case 41:ko(l.contentAvailability,O)&&(v.contentUrl=jo(m,j,k,I,L)),D=f+1,F={mortonIndex:E,x:S,y:P,z:C},B=0;case 46:if(!(B<b)){t.next=54;break}return t.next=49,Co({subtree:l,options:n,parentData:F,childIndex:B,level:D,globalData:u});case 49:((z=t.sent).contentUrl||z.children.length)&&(U=Io(z,j+1,{childTileX:S,childTileY:P,childTileZ:C},n),v.children.push(U));case 51:B++,t.next=46;break;case 54:return t.abrupt("return",v);case 55:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ko(t,e){return"constant"in t?Boolean(t.constant):!!t.explicitBitstream&&(n=e,r=t.explicitBitstream,i=Math.floor(n/8),o=n%8,1===(r[i]>>o&1));var n,r,i,o}function Io(t,e,n,r){var i=r.basePath,o=r.refine,a=r.getRefine,s=r.lodMetricType,u=r.getTileType,l=r.rootLodMetricValue,c=r.rootBoundingVolume,f=t.contentUrl&&t.contentUrl.replace("".concat(i,"/"),""),h=l/Math.pow(2,e),p=function(t,e,n){if(e.region){var r=n.childTileX,i=n.childTileY,o=n.childTileZ,a=xo(e.region,6),s=a[0],u=a[1],l=a[2],c=a[3],f=a[4],h=a[5],p=Math.pow(2,t),d=(l-s)/p,m=(c-u)/p,g=(h-f)/p;return{region:[s+d*r,u+m*i,s+d*(r+1),u+m*(i+1),f+g*o,f+g*(o+1)]}}return console.warn("Unsupported bounding volume type: ",e),null}(e,c,n);return{children:t.children,contentUrl:t.contentUrl,content:{uri:f},id:t.contentUrl,refine:a(o),type:u(t),lodMetricType:s,lodMetricValue:h,boundingVolume:p}}function Lo(t,e){return parseInt(t.toString(2)+e.toString(2),2)}function jo(t,e,n,r,i){var o=function(t){var e={};for(var n in t)e["{".concat(n,"}")]=t[n];return e}({level:e,x:n,y:r,z:i});return t.replace(/{level}|{x}|{y}|{z}/gi,(function(t){return o[t]}))}function Mo(t){return Mo="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},Mo(t)}function Ro(){Ro=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Mo(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function No(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Do(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){No(o,r,i,a,s,"next",t)}function s(t){No(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Fo(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Bo(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 Bo(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Bo(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 zo(t){if(!t.contentUrl)return ae;var e=t.contentUrl.split(".").pop();switch(e){case"pnts":return ue;case"i3dm":case"b3dm":case"glb":case"gltf":return se;default:return e}}function Uo(t){switch(t){case"REPLACE":case"replace":return oe;case"ADD":case"add":return ie;default:return t}}function Go(t,e){if(/^[a-z][0-9a-z+.-]*:/i.test(e)){var n=new URL(t,"".concat(e,"/"));return decodeURI(n.toString())}return t.startsWith("/")?t:"".concat(e,"/").concat(t)}function Vo(t,e){if(!t)return null;if(t.content){var n=t.content.uri||t.content.url;t.contentUrl=Go(n,e.basePath)}return t.id=t.contentUrl,t.lodMetricType=he,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=zo(t),t.refine=Uo(t.refine),t}function qo(t){var e=t.basePath,n=Vo(t.root,t),r=[];for(r.push(n);r.length>0;){var i,o=Fo((r.pop()||{}).children||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;Vo(a,{basePath:e}),r.push(a)}}catch(s){o.e(s)}finally{o.f()}}return n}function Ho(t){return Wo.apply(this,arguments)}function Wo(){return(Wo=Do(Ro().mark((function t(e){var n,r,i,o,a,s,u,l,c,f,h,p,d,m;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.root){t.next=2;break}return t.abrupt("return",null);case 2:return n=e.basePath,r=e.root.extensions["3DTILES_implicit_tiling"],i=r.subdivisionScheme,o=r.maximumLevel,a=r.subtreeLevels,s=r.subtrees.uri,u=jo(s,0,0,0,0),l=Go(u,n),t.next=9,Object(Y.a)(l,_o);case 9:return c=t.sent,f=Go(e.root.content.uri,n),h=e.root.refine,p=e.root.geometricError,d=e.root.boundingVolume,m={contentUrlTemplate:f,subtreesUriTemplate:s,subdivisionScheme:i,subtreeLevels:a,maximumLevel:o,refine:h,basePath:n,lodMetricType:he,rootLodMetricValue:p,rootBoundingVolume:d,getTileType:zo,getRefine:Uo},t.next=17,Xo(e.root,c,m);case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xo(t,e,n){return Yo.apply(this,arguments)}function Yo(){return(Yo=Do(Ro().mark((function t(e,n,r){var i,o,a;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return",null);case 2:return e.lodMetricType=he,e.lodMetricValue=e.geometricError,e.transformMatrix=e.transform,t.next=7,Co({subtree:n,options:r});case 7:return i=t.sent,o=i.children,(a=i.contentUrl)&&(e.contentUrl=a,e.content={uri:a.replace("".concat(r.basePath,"/"),"")}),e.refine=Uo(e.refine),e.type=zo(e),e.children=o,e.id=e.contentUrl,t.abrupt("return",e);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Zo(t){return Zo="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},Zo(t)}function Ko(){Ko=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Zo(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function $o(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Jo(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){$o(o,r,i,a,s,"next",t)}function s(t){$o(o,r,i,a,s,"throw",t)}a(void 0)}))}}var Qo="3DTILES_implicit_tiling",ta={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:sr,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:function(t,e,n){return aa.apply(this,arguments)},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};function ea(t){return St.a.dirname(t.url)}function na(t,e,n){return ra.apply(this,arguments)}function ra(){return(ra=Jo(Ko().mark((function t(e,n,r){var i;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={content:{featureIds:null}},0,t.next=4,so(e,0,n,r,i.content);case 4:return t.abrupt("return",i.content);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ia(t,e,n){return oa.apply(this,arguments)}function oa(){return(oa=Jo(Ko().mark((function t(e,n,r){var i,o;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((o=JSON.parse((new TextDecoder).decode(e))).loader=n.loader||ta,o.url=r.url,o.basePath=ea(o),!sa(o)){t.next=10;break}return t.next=7,Ho(o);case 7:t.t0=t.sent,t.next=11;break;case 10:t.t0=qo(o);case 11:return o.root=t.t0,o.type=fe,o.lodMetricType=he,o.lodMetricValue=(null===(i=o.root)||void 0===i?void 0:i.lodMetricValue)||0,t.abrupt("return",o);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function aa(){return(aa=Jo(Ko().mark((function t(e,n,r){var i;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n["3d-tiles"]||{},!("auto"===i.isTileset?r.url&&-1!==r.url.indexOf(".json"):i.isTileset)){t.next=8;break}return t.next=5,ia(e,n,r);case 5:e=t.sent,t.next=11;break;case 8:return t.next=10,na(e,n,r);case 10:e=t.sent;case 11:return t.abrupt("return",e);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function sa(t){var e,n;return(null===t||void 0===t||null===(e=t.extensionsRequired)||void 0===e?void 0:e.includes(Qo))&&(null===t||void 0===t||null===(n=t.extensionsUsed)||void 0===n?void 0:n.includes(Qo))}const ua=[0],la={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:null,loader:ta,onTilesetLoad:{type:"function",value:t=>{},compare:!1},onTileLoad:{type:"function",value:t=>{},compare:!1},onTileUnload:{type:"function",value:t=>{},compare:!1},onTileError:{type:"function",value:(t,e,n)=>{},compare:!1},_getMeshColor:{type:"function",value:t=>[255,255,255],compare:!1}};class ca extends a.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}initializeState(){"onTileLoadFail"in this.props&&B.a.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){const{tileset3d:t}=this.state;return null!==t&&t.isLoaded()}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({props:t,oldProps:e,changeFlags:n}){if(t.data&&t.data!==e.data&&this._loadTileset(t.data),n.viewportChanged){const{activeViewports:t}=this.state;Object.keys(t).length&&(this._updateTileset(t),this.state.lastUpdatedViewports=t,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:t}=this.state;for(const e in t)t[e].needsUpdate=!0}}activateViewport(t){const{activeViewports:e,lastUpdatedViewports:n}=this.state;this.internalState.viewport=t,e[t.id]=t;const r=null===n||void 0===n?void 0:n[t.id];r&&t.equals(r)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:t,sourceLayer:e}){const{layerMap:n}=this.state,r=e&&e.id;if(r){const e=r.substring(this.id.length+1),i=e.substring(e.indexOf("-")+1);t.object=n[i]&&n[i].tile}return t}filterSubLayer({layer:t,viewport:e}){const{tile:n}=t.props,{id:r}=e;return n.selected&&n.viewportIds.includes(r)}_updateAutoHighlight(t){t.sourceLayer&&t.sourceLayer.updateAutoHighlight(t)}async _loadTileset(t){const{loadOptions:e={}}=this.props;let n=this.props.loader||this.props.loaders;Array.isArray(n)&&(n=n[0]);const r={loadOptions:{...e}};if(n.preload){const i=await n.preload(t,e);i.headers&&(r.loadOptions.fetch={...r.loadOptions.fetch,headers:i.headers}),Object.assign(r,i)}const i=await Object(Y.a)(t,n,r.loadOptions),o=new ar(i,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,...r});this.setState({tileset3d:o,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(o)}_onTileLoad(t){const{lastUpdatedViewports:e}=this.state;this.props.onTileLoad(t),this._updateTileset(e),this.setNeedsUpdate()}_onTileUnload(t){delete this.state.layerMap[t.id],this.props.onTileUnload(t)}_updateTileset(t){if(!t)return;const{tileset3d:e}=this.state,{timeline:n}=this.context,r=Object.keys(t).length;n&&r&&e&&e.selectTiles(Object.values(t)).then((t=>{this.state.frameNumber!==t&&this.setState({frameNumber:t})}))}_getSubLayer(t,e){if(!t.content)return null;switch(t.type){case ue:return this._makePointCloudLayer(t,e);case se:return this._make3DModelLayer(t);case le:return this._makeSimpleMeshLayer(t,e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(t.content.type))}}_makePointCloudLayer(t,e){const{attributes:n,pointCount:r,constantRGBA:i,cartographicOrigin:o,modelMatrix:a}=t.content,{positions:s,normals:u,colors:l}=n;if(!s)return null;const c=e&&e.props.data||{header:{vertexCount:r},attributes:{POSITION:s,NORMAL:u,COLOR_0:l}},{pointSize:f,getPointColor:h}=this.props;return new(this.getSubLayerClass("pointcloud",U.a))({pointSize:f},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(t.id),tile:t,data:c,coordinateSystem:z.a.METER_OFFSETS,coordinateOrigin:o,modelMatrix:a,getColor:i||h,_offset:0})}_make3DModelLayer(t){const{gltf:e,instances:n,cartographicOrigin:r,modelMatrix:i}=t.content;return new(this.getSubLayerClass("scenegraph",G.a))({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(t.id),tile:t,data:n||ua,scenegraph:e,coordinateSystem:z.a.METER_OFFSETS,coordinateOrigin:r,modelMatrix:i,getTransformMatrix:t=>t.modelMatrix,getPosition:[0,0,0],_offset:0})}_makeSimpleMeshLayer(t,e){const n=t.content,{attributes:r,indices:i,modelMatrix:o,cartographicOrigin:a,coordinateSystem:s=z.a.METER_OFFSETS,material:u,featureIds:l}=n,{_getMeshColor:c}=this.props,f=e&&e.props.mesh||new F.a({drawMode:4,attributes:fa(r),indices:i});return new(this.getSubLayerClass("mesh",X))(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(t.id),tile:t,mesh:f,data:ua,getColor:c(t),pbrMaterial:u,modelMatrix:o,coordinateOrigin:a,coordinateSystem:s,featureIds:l,_offset:0})}renderLayers(){const{tileset3d:t,layerMap:e}=this.state;return t?t.tiles.map((t=>{const n=e[t.id]=e[t.id]||{tile:t};let{layer:r}=n;return t.selected&&(r?n.needsUpdate&&(r=this._getSubLayer(t,r),n.needsUpdate=!1):r=this._getSubLayer(t)),n.layer=r,r})).filter(Boolean):null}}function fa(t){const e={};return e.positions={...t.positions,value:new Float32Array(t.positions.value)},t.normals&&(e.normals=t.normals),t.texCoords&&(e.texCoords=t.texCoords),t.colors&&(e.colors=t.colors),t.uvRegions&&(e.uvRegions=t.uvRegions),e}Object(r.a)(ca,"defaultProps",la),Object(r.a)(ca,"layerName","Tile3DLayer");var ha={name:"Terrain",id:"terrain",module:"terrain",version:"3.2.12",worker:!0,extensions:["png","pngraw","jpg","jpeg","gif","webp","bmp"],mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp"],options:{terrain:{tesselator:"auto",bounds:null,meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0},skirtHeight:null}}},pa=n(57);const da=[1],ma={...O.a.defaultProps,elevationData:pa.h,texture:{...pa.h,optional:!0},meshMaxError:{type:"number",value:4},bounds:{type:"array",value:null,optional:!0,compare:!0},color:{type:"color",value:[255,255,255]},elevationDecoder:{type:"object",value:{rScaler:1,gScaler:0,bScaler:0,offset:0}},workerUrl:{type:"string",value:null},wireframe:!1,material:!0,loaders:[ha]};function ga(t){return Array.isArray(t)?t.join(";"):t||""}class ya extends a.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}updateState({props:t,oldProps:e}){const n=t.elevationData!==e.elevationData;if(n){const{elevationData:e}=t,n=e&&(Array.isArray(e)||e.includes("{x}")&&e.includes("{y}"));this.setState({isTiled:n})}const r=n||t.meshMaxError!==e.meshMaxError||t.elevationDecoder!==e.elevationDecoder||t.bounds!==e.bounds;if(!this.state.isTiled&&r){const e=this.loadTerrain(t);this.setState({terrain:e})}t.workerUrl&&B.a.removed("workerUrl","loadOptions.terrain.workerUrl")()}loadTerrain({elevationData:t,bounds:e,elevationDecoder:n,meshMaxError:r,signal:i}){var o;if(!t)return null;let a=this.getLoadOptions();a={...a,terrain:{skirtHeight:this.state.isTiled?2*r:0,...null===(o=a)||void 0===o?void 0:o.terrain,bounds:e,meshMaxError:r,elevationDecoder:n}};const{fetch:s}=this.props;return s(t,{propName:"elevationData",layer:this,loadOptions:a,signal:i})}getTiledTerrainData(t){const{elevationData:e,fetch:n,texture:r,elevationDecoder:i,meshMaxError:o}=this.props,{viewport:a}=this.context,s=Object(pa.c)(e,t),u=r&&Object(pa.c)(r,t),{signal:l}=t;let c=[0,0],f=[0,0];if(a.isGeospatial){const e=t.bbox;c=a.projectFlat([e.west,e.south]),f=a.projectFlat([e.east,e.north])}else{const e=t.bbox;c=[e.left,e.bottom],f=[e.right,e.top]}const h=[c[0],c[1],f[0],f[1]],p=this.loadTerrain({elevationData:s,bounds:h,elevationDecoder:i,meshMaxError:o,signal:l}),d=u?n(u,{propName:"texture",layer:this,loaders:[],signal:l}).catch((t=>null)):Promise.resolve(null);return Promise.all([p,d])}renderSubLayers(t){const e=this.getSubLayerClass("mesh",W.a),{color:n,wireframe:r,material:i}=this.props,{data:o}=t;if(!o)return null;const[a,s]=o;return new e(t,{data:da,mesh:a,texture:s,_instanced:!1,coordinateSystem:z.a.CARTESIAN,getPosition:t=>[0,0,0],getColor:n,wireframe:r,material:i})}onViewportLoad(t){if(!t)return;const{zRange:e}=this.state,n=t.map((t=>t.content)).filter(Boolean).map((t=>t[0].header.boundingBox.map((t=>t[2]))));if(0===n.length)return;const r=Math.min(...n.map((t=>t[0]))),i=Math.max(...n.map((t=>t[1])));(!e||r<e[0]||i>e[1])&&this.setState({zRange:[r,i]})}renderLayers(){const{color:t,material:e,elevationData:n,texture:r,wireframe:i,meshMaxError:o,elevationDecoder:a,tileSize:s,maxZoom:u,minZoom:l,extent:c,maxRequests:f,onTileLoad:h,onTileUnload:p,onTileError:d,maxCacheSize:m,maxCacheByteSize:g,refinementStrategy:y}=this.props;if(this.state.isTiled)return new O.a(this.getSubLayerProps({id:"tiles"}),{getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:ga(n),texture:ga(r),meshMaxError:o,elevationDecoder:a}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:s,maxZoom:u,minZoom:l,extent:c,maxRequests:f,onTileLoad:h,onTileUnload:p,onTileError:d,maxCacheSize:m,maxCacheByteSize:g,refinementStrategy:y});return new(this.getSubLayerClass("mesh",W.a))(this.getSubLayerProps({id:"mesh"}),{data:da,mesh:this.state.terrain,texture:r,_instanced:!1,getPosition:t=>[0,0,0],getColor:t,material:e,wireframe:i})}}Object(r.a)(ya,"defaultProps",ma),Object(r.a)(ya,"layerName","TerrainLayer");var va=n(268);const ba="0123456789bcdefghjkmnpqrstuvwxyz",_a={};for(let Oa=0;Oa<ba.length;Oa++)_a[ba.charAt(Oa)]=Oa;function Aa(t){const[e,n,r,i]=function(t){let e,n=!0,r=90,i=-90,o=180,a=-180,s=0;for(let u=0,l=t.length;u<l;u++){const l=t[u].toLowerCase();s=_a[l];for(let t=4;t>=0;t--){const u=s>>t&1;n?(e=(o+a)/2,1===u?a=e:o=e):(e=(r+i)/2,1===u?i=e:r=e),n=!n}}return[i,a,r,o]}(t);return[i,r,i,e,n,e,n,r,i,r]}class wa extends l{indexToBounds(){const{data:t,getGeohash:e}=this.props;return{data:t,_normalize:!1,positionFormat:"XY",getPolygon:(t,n)=>Aa(e(t,n))}}}Object(r.a)(wa,"layerName","GeohashLayer"),Object(r.a)(wa,"defaultProps",{getGeohash:{type:"accessor",value:t=>t.geohash}});var xa=n(242),Ea=n(297)},function(t,e,n){t.exports=function(){"use strict";var t,e,n;function r(r,i){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),n=i(a),"undefined"!==typeof window&&(n.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else e=i;else t=i}return r(["exports"],(function(t){var e=n;function n(t,e,n,r){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=n,this.p2y=r}function r(t,n,r,i){const o=new e(t,n,r,i);return function(t){return o.solve(t)}}n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var n=t,r=0;r<8;r++){var i=this.sampleCurveX(n)-t;if(Math.abs(i)<e)return n;var o=this.sampleCurveDerivativeX(n);if(Math.abs(o)<1e-6)break;n-=i/o}var a=0,s=1;for(n=t,r=0;r<20&&(i=this.sampleCurveX(n),!(Math.abs(i-t)<e));r++)t>i?a=n:s=n,n=.5*(s-a)+a;return n},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};const i=r(.25,.1,.25,1);function o(t,e,n){return Math.min(n,Math.max(e,t))}function a(t,e,n){const r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i}function s(t,...e){for(const n of e)for(const e in n)t[e]=n[e];return t}let u=1;function l(t,e){t.forEach((t=>{e[t]&&(e[t]=e[t].bind(e))}))}function c(t,e,n){const r={};for(const i in t)r[i]=e.call(n||this,t[i],i,t);return r}function f(t,e,n){const r={};for(const i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r}function h(t){return Array.isArray(t)?t.map(h):"object"==typeof t&&t?c(t,h):t}const p={};function d(t){p[t]||("undefined"!=typeof console&&console.warn(t),p[t]=!0)}function m(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}function g(t){let e=0;for(let n,r,i=0,o=t.length,a=o-1;i<o;a=i++)n=t[i],r=t[a],e+=(r.x-n.x)*(n.y+r.y);return e}function y(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function v(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((t,n,r,i)=>{const o=r||i;return e[n]=!o||o.toLowerCase(),""})),e["max-age"]){const t=parseInt(e["max-age"],10);isNaN(t)?delete e["max-age"]:e["max-age"]=t}return e}let b,_,A=null;function w(t){if(null==A){const e=t.navigator?t.navigator.userAgent:null;A=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return A}function x(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap}const E={now:"undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(t){const e=requestAnimationFrame(t);return{cancel:()=>cancelAnimationFrame(e)}},getImageData(t,e=0){const n=window.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=t.width,n.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:t=>(b||(b=document.createElement("a")),b.href=t,b.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==_&&(_=matchMedia("(prefers-reduced-motion: reduce)")),_.matches)}};var O=S;function S(t,e){this.x=t,this.y=e}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=n*this.x+e*this.y;return this.x=e*this.x-n*this.y,this.y=r,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=e.x+n*(this.x-e.x)-r*(this.y-e.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},S.convert=function(t){return t instanceof S?t:Array.isArray(t)?new S(t[0],t[1]):t};const P={MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},C="mapbox-tiles";let T,k,I=500,L=50;function j(){"undefined"==typeof caches||T||(T=caches.open(C))}let M=1/0;const R={supported:!1,testSupport:function(t){!F&&D&&(B?z(t):N=t)}};let N,D,F=!1,B=!1;function z(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,D),t.isContextLost())return;R.supported=!0}catch(t){}t.deleteTexture(e),F=!0}"undefined"!=typeof document&&(D=document.createElement("img"),D.onload=function(){N&&z(N),N=null,B=!0},D.onerror=function(){F=!0,N=null},D.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const U={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(U);class G extends Error{constructor(t,e,n,r){super(`AJAXError: ${e} (${t}): ${n}`),this.status=t,this.statusText=e,this.url=n,this.body=r}}const V=y()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href;function q(t,e){const n=new AbortController,r=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:V(),signal:n.signal});let i=!1,o=!1;return"json"===t.type&&r.headers.set("Accept","application/json"),((n,a,s)=>{if(o)return;const u=Date.now();fetch(r).then((n=>n.ok?((n,a,s)=>{("arrayBuffer"===t.type?n.arrayBuffer():"json"===t.type?n.json():n.text()).then((t=>{o||(a&&s&&function(t,e,n){if(j(),!T)return;const r={status:e.status,statusText:e.statusText,headers:new Headers};e.headers.forEach(((t,e)=>r.headers.set(e,t)));const i=v(e.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&r.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-n<42e4||function(t,e){if(void 0===k)try{new Response(new ReadableStream),k=!0}catch(t){k=!1}k?e(t.body):t.blob().then(e)}(e,(e=>{const n=new Response(e,r);j(),T&&T.then((e=>e.put(function(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}(t.url),n))).catch((t=>d(t.message)))})))}(r,a,s),i=!0,e(null,t,n.headers.get("Cache-Control"),n.headers.get("Expires")))})).catch((t=>{o||e(new Error(t.message))}))})(n,null,u):n.blob().then((r=>e(new G(n.status,n.statusText,t.url,r)))))).catch((t=>{20!==t.code&&e(new Error(t.message))}))})(),{cancel:()=>{o=!0,i||n.abort()}}}const H=function(t,e){if(/:\/\//.test(t.url)&&!/^https?:|^file:/.test(t.url)){if(y()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e);if(!y()){const n=t.url.substring(0,t.url.indexOf("://"));return(P.REGISTERED_PROTOCOLS[n]||q)(t,e)}}if(!(/^file:/.test(n=t.url)||/^file:/.test(V())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return q(t,e);if(y()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var n;return function(t,e){const n=new XMLHttpRequest;n.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(n.responseType="arraybuffer");for(const r in t.headers)n.setRequestHeader(r,t.headers[r]);return"json"===t.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===t.credentials,n.onerror=()=>{e(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let r=n.response;if("json"===t.type)try{r=JSON.parse(n.response)}catch(t){return e(t)}e(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else{const r=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});e(new G(n.status,n.statusText,t.url,r))}},n.send(t.body),{cancel:()=>n.abort()}}(t,e)},W=function(t,e){return H(s(t,{type:"arrayBuffer"}),e)};function X(t){const e=window.document.createElement("a");return e.href=t,e.protocol===window.document.location.protocol&&e.host===window.document.location.host}const Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Z,K;Z=[],K=0;const $=function(t,e){if(R.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),K>=P.MAX_PARALLEL_IMAGE_REQUESTS){const n={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return Z.push(n),n}K++;let n=!1;const r=()=>{if(!n)for(n=!0,K--;Z.length&&K<P.MAX_PARALLEL_IMAGE_REQUESTS;){const t=Z.shift(),{requestParameters:e,callback:n,cancelled:r}=t;r||(t.cancel=$(e,n).cancel)}},i=W(t,((t,n,i,o)=>{r(),t?e(t):n&&function(t,e){"function"==typeof createImageBitmap?function(t,e){const n=new Blob([new Uint8Array(t)],{type:"image/png"});createImageBitmap(n).then((t=>{e(null,t)})).catch((t=>{e(new Error(`Could not load image because of ${t.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))}(t,e):function(t,e){const n=new Image;n.onload=()=>{e(null,n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame((()=>{n.src=Y}))},n.onerror=()=>e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const r=new Blob([new Uint8Array(t)],{type:"image/png"});n.src=t.byteLength?URL.createObjectURL(r):Y}(t,e)}(n,((t,n)=>{null!=t?e(t):null!=n&&e(null,n,{cacheControl:i,expires:o})}))}));return{cancel:()=>{i.cancel(),r()}}};function J(t,e,n){n[t]&&-1!==n[t].indexOf(e)||(n[t]=n[t]||[],n[t].push(e))}function Q(t,e,n){if(n&&n[t]){const r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}class tt{constructor(t,e={}){s(this,e),this.type=t}}class et extends tt{constructor(t,e={}){super("error",s({error:t},e))}}class nt{on(t,e){return this._listeners=this._listeners||{},J(t,e,this._listeners),this}off(t,e){return Q(t,e,this._listeners),Q(t,e,this._oneTimeListeners),this}once(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},J(t,e,this._oneTimeListeners),this}fire(t,e){"string"==typeof t&&(t=new tt(t,e||{}));const n=t.type;if(this.listens(n)){t.target=this;const e=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(const n of e)n.call(this,t);const r=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(const o of r)Q(n,o,this._oneTimeListeners),o.call(this,t);const i=this._eventedParent;i&&(s(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(t))}else t instanceof et&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}var rt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1},elevationOffset:{type:"number",default:450}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};class it{constructor(t,e,n,r){this.message=(t?`${t}: `:"")+n,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)}}function ot(t){const e=t.value;return e?[new it(t.key,e,"constants have been deprecated as of v8")]:[]}function at(t,...e){for(const n of e)for(const e in n)t[e]=n[e];return t}function st(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function ut(t){if(Array.isArray(t))return t.map(ut);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const n in t)e[n]=ut(t[n]);return e}return st(t)}class lt extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}class ct{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[n,r]of e)this.bindings[n]=r}concat(t){return new ct(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const ft={kind:"null"},ht={kind:"number"},pt={kind:"string"},dt={kind:"boolean"},mt={kind:"color"},gt={kind:"object"},yt={kind:"value"},vt={kind:"collator"},bt={kind:"formatted"},_t={kind:"padding"},At={kind:"resolvedImage"};function wt(t,e){return{kind:"array",itemType:t,N:e}}function xt(t){if("array"===t.kind){const e=xt(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const Et=[ft,ht,pt,dt,mt,bt,gt,wt(yt),_t,At];function Ot(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Ot(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of Et)if(!Ot(t,e))return null}return`Expected ${xt(t)} but found ${xt(e)} instead.`}function St(t,e){return e.some((e=>e.kind===t.kind))}function Pt(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}var Ct,Tt={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function kt(t){return(t=Math.round(t))<0?0:t>255?255:t}function It(t){return kt("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function Lt(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function jt(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{Ct={}.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in Tt)return Tt[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var r=n.indexOf("("),i=n.indexOf(")");if(-1!==r&&i+1===n.length){var o=n.substr(0,r),a=n.substr(r+1,i-(r+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=Lt(a.pop());case"rgb":return 3!==a.length?null:[It(a[0]),It(a[1]),It(a[2]),s];case"hsla":if(4!==a.length)return null;s=Lt(a.pop());case"hsl":if(3!==a.length)return null;var u=(parseFloat(a[0])%360+360)%360/360,l=Lt(a[1]),c=Lt(a[2]),f=c<=.5?c*(l+1):c+l-c*l,h=2*c-f;return[kt(255*jt(h,f,u+1/3)),kt(255*jt(h,f,u)),kt(255*jt(h,f,u-1/3)),s];default:return null}}return null}}catch(t){}class Mt{constructor(t,e,n,r=1){this.r=t,this.g=e,this.b=n,this.a=r}static parse(t){if(!t)return;if(t instanceof Mt)return t;if("string"!=typeof t)return;const e=Ct(t);return e?new Mt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,n,r]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(n)},${r})`}toArray(){const{r:t,g:e,b:n,a:r}=this;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*n/r,r]}}Mt.black=new Mt(0,0,0,1),Mt.white=new Mt(1,1,1,1),Mt.transparent=new Mt(0,0,0,0),Mt.red=new Mt(1,0,0,1);class Rt{constructor(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Nt{constructor(t,e,n,r,i){this.text=t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=i}}class Dt{constructor(t){this.sections=t}static fromString(t){return new Dt([new Nt(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof Dt?t:Dt.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}}class Ft{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Ft)return t;if("number"==typeof t)return new Ft([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const e of t)if("number"!=typeof e)return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new Ft(t)}}toString(){return JSON.stringify(this.values)}}class Bt{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Bt({name:t,available:!1}):null}}function zt(t,e,n,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[t,e,n,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ut(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Mt)return!0;if(t instanceof Rt)return!0;if(t instanceof Dt)return!0;if(t instanceof Ft)return!0;if(t instanceof Bt)return!0;if(Array.isArray(t)){for(const e of t)if(!Ut(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!Ut(t[e]))return!1;return!0}return!1}function Gt(t){if(null===t)return ft;if("string"==typeof t)return pt;if("boolean"==typeof t)return dt;if("number"==typeof t)return ht;if(t instanceof Mt)return mt;if(t instanceof Rt)return vt;if(t instanceof Dt)return bt;if(t instanceof Ft)return _t;if(t instanceof Bt)return At;if(Array.isArray(t)){const e=t.length;let n;for(const r of t){const t=Gt(r);if(n){if(n===t)continue;n=yt;break}n=t}return wt(n||yt,e)}return gt}function Vt(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Mt||t instanceof Dt||t instanceof Ft||t instanceof Bt?t.toString():JSON.stringify(t)}class qt{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Ut(t[1]))return e.error("invalid value");const n=t[1];let r=Gt(n);const i=e.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new qt(r,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Ht{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const Wt={string:pt,number:ht,boolean:dt,object:gt};class Xt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let n,r=1;const i=t[0];if("array"===i){let i,o;if(t.length>2){const n=t[1];if("string"!=typeof n||!(n in Wt)||"object"===n)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=Wt[n],r++}else i=yt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],r++}n=wt(i,o)}else n=Wt[i];const o=[];for(;r<t.length;r++){const n=e.parse(t[r],r,yt);if(!n)return null;o.push(n)}return new Xt(n,o)}evaluate(t){for(let e=0;e<this.args.length;e++){const n=this.args[e].evaluate(t);if(!Ot(this.type,Gt(n)))return n;if(e===this.args.length-1)throw new Ht(`Expected value to be of type ${xt(this.type)}, but found ${xt(Gt(n))} instead.`)}return null}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const Yt={"to-boolean":dt,"to-color":mt,"to-number":ht,"to-string":pt};class Zt{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[0];if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return e.error("Expected one argument.");const r=Yt[n],i=[];for(let o=1;o<t.length;o++){const n=e.parse(t[o],o,yt);if(!n)return null;i.push(n)}return new Zt(r,i)}evaluate(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){let e,n;for(const r of this.args){if(e=r.evaluate(t),n=null,e instanceof Mt)return e;if("string"==typeof e){const n=t.parseColor(e);if(n)return n}else if(Array.isArray(e)&&(n=e.length<3||e.length>4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:zt(e[0],e[1],e[2],e[3]),!n))return new Mt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Ht(n||`Could not parse color from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}if("padding"===this.type.kind){let e;for(const n of this.args){e=n.evaluate(t);const r=Ft.parse(e);if(r)return r}throw new Ht(`Could not parse padding from value '${"string"==typeof e?e:JSON.stringify(e)}'`)}if("number"===this.type.kind){let e=null;for(const n of this.args){if(e=n.evaluate(t),null===e)return 0;const r=Number(e);if(!isNaN(r))return r}throw new Ht(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?Dt.fromString(Vt(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?Bt.fromString(Vt(this.args[0].evaluate(t))):Vt(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const Kt=["Unknown","Point","LineString","Polygon"];class $t{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Kt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Mt.parse(t)),e}}class Jt{constructor(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,e){const n=t[0],r=Jt.definitions[n];if(!r)return e.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let s=null;for(const[u,l]of a){s=new Ae(e.registry,e.path,null,e.scope);const r=[];let o=!1;for(let e=1;e<t.length;e++){const n=t[e],i=Array.isArray(u)?u[e-1]:u.type,a=s.parse(n,1+r.length,i);if(!a){o=!0;break}r.push(a)}if(!o)if(Array.isArray(u)&&u.length!==r.length)s.error(`Expected ${u.length} arguments, but found ${r.length} instead.`);else{for(let t=0;t<r.length;t++){const e=Array.isArray(u)?u[t]:u.type,n=r[t];s.concat(t+1).checkSubtype(e,n.type)}if(0===s.errors.length)return new Jt(n,i,l,r)}}if(1===a.length)e.errors.push(...s.errors);else{const n=(a.length?a:o).map((([t])=>{return e=t,Array.isArray(e)?`(${e.map(xt).join(", ")})`:`(${xt(e.type)}...)`;var e})).join(" | "),r=[];for(let i=1;i<t.length;i++){const n=e.parse(t[i],1+r.length);if(!n)return null;r.push(xt(n.type))}e.error(`Expected arguments of type ${n}, but found (${r.join(", ")}) instead.`)}return null}static register(t,e){Jt.definitions=e;for(const n in e)t[n]=Jt}}class Qt{constructor(t,e,n){this.type=vt,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const n=t[1];if("object"!=typeof n||Array.isArray(n))return e.error("Collator options argument must be an object.");const r=e.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,dt);if(!r)return null;const i=e.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,dt);if(!i)return null;let o=null;return n.locale&&(o=e.parse(n.locale,1,pt),!o)?null:new Qt(r,i,o)}evaluate(t){return new Rt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}const te=8192;function ee(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function ne(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function re(t,e){const n=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,i=Math.pow(2,e.z);return[Math.round(n*i*te),Math.round(r*i*te)]}function ie(t,e,n){const r=t[0]-e[0],i=t[1]-e[1],o=t[0]-n[0],a=t[1]-n[1];return r*a-o*i==0&&r*o<=0&&i*a<=0}function oe(t,e){let n=!1;for(let a=0,s=e.length;a<s;a++){const s=e[a];for(let e=0,a=s.length;e<a-1;e++){if(ie(t,s[e],s[e+1]))return!1;(i=s[e])[1]>(r=t)[1]!=(o=s[e+1])[1]>r[1]&&r[0]<(o[0]-i[0])*(r[1]-i[1])/(o[1]-i[1])+i[0]&&(n=!n)}}var r,i,o;return n}function ae(t,e){for(let n=0;n<e.length;n++)if(oe(t,e[n]))return!0;return!1}function se(t,e,n,r){const i=r[0]-n[0],o=r[1]-n[1],a=(t[0]-n[0])*o-i*(t[1]-n[1]),s=(e[0]-n[0])*o-i*(e[1]-n[1]);return a>0&&s<0||a<0&&s>0}function ue(t,e,n){for(const l of n)for(let n=0;n<l.length-1;++n)if(0!=(s=[(a=l[n+1])[0]-(o=l[n])[0],a[1]-o[1]])[0]*(u=[(i=e)[0]-(r=t)[0],i[1]-r[1]])[1]-s[1]*u[0]&&se(r,i,o,a)&&se(o,a,r,i))return!0;var r,i,o,a,s,u;return!1}function le(t,e){for(let n=0;n<t.length;++n)if(!oe(t[n],e))return!1;for(let n=0;n<t.length-1;++n)if(ue(t[n],t[n+1],e))return!1;return!0}function ce(t,e){for(let n=0;n<e.length;n++)if(le(t,e[n]))return!0;return!1}function fe(t,e,n){const r=[];for(let i=0;i<t.length;i++){const o=[];for(let r=0;r<t[i].length;r++){const a=re(t[i][r],n);ee(e,a),o.push(a)}r.push(o)}return r}function he(t,e,n){const r=[];for(let i=0;i<t.length;i++){const o=fe(t[i],e,n);r.push(o)}return r}function pe(t,e,n,r){if(t[0]<n[0]||t[0]>n[2]){const e=.5*r;let i=t[0]-n[0]>e?-r:n[0]-t[0]>e?r:0;0===i&&(i=t[0]-n[2]>e?-r:n[2]-t[0]>e?r:0),t[0]+=i}ee(e,t)}function de(t,e,n,r){const i=Math.pow(2,r.z)*te,o=[r.x*te,r.y*te],a=[];for(const s of t)for(const t of s){const r=[t.x+o[0],t.y+o[1]];pe(r,e,n,i),a.push(r)}return a}function me(t,e,n,r){const i=Math.pow(2,r.z)*te,o=[r.x*te,r.y*te],a=[];for(const u of t){const t=[];for(const n of u){const r=[n.x+o[0],n.y+o[1]];ee(e,r),t.push(r)}a.push(t)}if(e[2]-e[0]<=i/2){(s=e)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const t of a)for(const r of t)pe(r,e,n,i)}var s;return a}class ge{constructor(t,e){this.type=dt,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ut(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t<e.features.length;++t){const n=e.features[t].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new ge(e,e.features[t].geometry)}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new ge(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new ge(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){const o=fe(e.coordinates,r,i),a=de(t.geometry(),n,r,i);if(!ne(n,r))return!1;for(const t of a)if(!oe(t,o))return!1}if("MultiPolygon"===e.type){const o=he(e.coordinates,r,i),a=de(t.geometry(),n,r,i);if(!ne(n,r))return!1;for(const t of a)if(!ae(t,o))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){const o=fe(e.coordinates,r,i),a=me(t.geometry(),n,r,i);if(!ne(n,r))return!1;for(const t of a)if(!le(t,o))return!1}if("MultiPolygon"===e.type){const o=he(e.coordinates,r,i),a=me(t.geometry(),n,r,i);if(!ne(n,r))return!1;for(const t of a)if(!ce(t,o))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}function ye(t){if(t instanceof Jt){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof ge)return!1;let e=!0;return t.eachChild((t=>{e&&!ye(t)&&(e=!1)})),e}function ve(t){if(t instanceof Jt&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!ve(t)&&(e=!1)})),e}function be(t,e){if(t instanceof Jt&&e.indexOf(t.name)>=0)return!1;let n=!0;return t.eachChild((t=>{n&&!be(t,e)&&(n=!1)})),n}class _e{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const n=t[1];return e.scope.has(n)?new _e(n,e.scope.get(n)):e.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class Ae{constructor(t,e=[],n,r=new ct,i=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=r,this.errors=i,this.expectedType=n}parse(t,e,n,r,i={}){return e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)}_parse(t,e){function n(t,e,n){return"assert"===n?new Xt(e,[t]):"coerce"===n?new Zt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=t[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[r];if(i){let r=i.parse(t,this);if(!r)return null;if(this.expectedType){const t=this.expectedType,i=r.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==i.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==i.kind&&"string"!==i.kind)if("padding"!==t.kind||"value"!==i.kind&&"number"!==i.kind&&"array"!==i.kind){if(this.checkSubtype(t,i))return null}else r=n(r,t,e.typeAnnotation||"coerce");else r=n(r,t,e.typeAnnotation||"coerce");else r=n(r,t,e.typeAnnotation||"assert")}if(!(r instanceof qt)&&"resolvedImage"!==r.type.kind&&we(r)){const e=new $t;try{r=new qt(r.type,r.evaluate(e))}catch(t){return this.error(t.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,e,n){const r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new Ae(this.registry,r,e||null,i,this.errors)}error(t,...e){const n=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new lt(n,t))}checkSubtype(t,e){const n=Ot(t,e);return n&&this.error(n),n}}function we(t){if(t instanceof _e)return we(t.boundExpression);if(t instanceof Jt&&"error"===t.name)return!1;if(t instanceof Qt)return!1;if(t instanceof ge)return!1;const e=t instanceof Zt||t instanceof Xt;let n=!0;return t.eachChild((t=>{n=e?n&&we(t):n&&t instanceof qt})),!!n&&ye(t)&&be(t,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function xe(t,e){const n=t.length-1;let r,i,o=0,a=n,s=0;for(;o<=a;)if(s=Math.floor((o+a)/2),r=t[s],i=t[s+1],r<=e){if(s===n||e<i)return s;o=s+1}else{if(!(r>e))throw new Ht("Input is not a number.");a=s-1}return 0}class Ee{constructor(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[r,i]of n)this.labels.push(r),this.outputs.push(i)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const n=e.parse(t[1],1,ht);if(!n)return null;const r=[];let i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(let o=1;o<t.length;o+=2){const n=1===o?-1/0:t[o],a=t[o+1],s=o,u=o+1;if("number"!=typeof n)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',s);if(r.length&&r[r.length-1][0]>=n)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const l=e.parse(a,u,i);if(!l)return null;i=i||l.type,r.push([n,l])}return new Ee(i,n,r)}evaluate(t){const e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);const i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[xe(e,r)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function Oe(t,e,n){return t*(1-n)+e*n}var Se=Object.freeze({__proto__:null,number:Oe,color:function(t,e,n){return new Mt(Oe(t.r,e.r,n),Oe(t.g,e.g,n),Oe(t.b,e.b,n),Oe(t.a,e.a,n))},array:function(t,e,n){return t.map(((t,r)=>Oe(t,e[r],n)))},padding:function(t,e,n){const r=t.values,i=e.values;return new Ft([Oe(r[0],i[0],n),Oe(r[1],i[1],n),Oe(r[2],i[2],n),Oe(r[3],i[3],n)])}});const Pe=.95047,Ce=1.08883,Te=4/29,ke=6/29,Ie=3*ke*ke,Le=Math.PI/180,je=180/Math.PI;function Me(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ie+Te}function Re(t){return t>ke?t*t*t:Ie*(t-Te)}function Ne(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function De(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Fe(t){const e=De(t.r),n=De(t.g),r=De(t.b),i=Me((.4124564*e+.3575761*n+.1804375*r)/Pe),o=Me((.2126729*e+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Me((.0193339*e+.119192*n+.9503041*r)/Ce)),alpha:t.a}}function Be(t){let e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*Re(e),n=Pe*Re(n),r=Ce*Re(r),new Mt(Ne(3.2404542*n-1.5371385*e-.4985314*r),Ne(-.969266*n+1.8760108*e+.041556*r),Ne(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}function ze(t,e,n){const r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}const Ue={forward:Fe,reverse:Be,interpolate:function(t,e,n){return{l:Oe(t.l,e.l,n),a:Oe(t.a,e.a,n),b:Oe(t.b,e.b,n),alpha:Oe(t.alpha,e.alpha,n)}}},Ge={forward:function(t){const{l:e,a:n,b:r}=Fe(t),i=Math.atan2(r,n)*je;return{h:i<0?i+360:i,c:Math.sqrt(n*n+r*r),l:e,alpha:t.a}},reverse:function(t){const e=t.h*Le,n=t.c;return Be({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:ze(t.h,e.h,n),c:Oe(t.c,e.c,n),l:Oe(t.l,e.l,n),alpha:Oe(t.alpha,e.alpha,n)}}};var Ve=Object.freeze({__proto__:null,lab:Ue,hcl:Ge});class qe{constructor(t,e,n,r,i){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(const[o,a]of i)this.labels.push(o),this.outputs.push(a)}static interpolationFactor(t,n,r,i){let o=0;if("exponential"===t.name)o=He(n,t.base,r,i);else if("linear"===t.name)o=He(n,1,r,i);else if("cubic-bezier"===t.name){const a=t.controlPoints;o=new e(a[0],a[1],a[2],a[3]).solve(He(n,1,r,i))}return o}static parse(t,e){let[n,r,i,...o]=t;if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){const t=r[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:t}}else{if("cubic-bezier"!==r[0])return e.error(`Unknown interpolation type ${String(r[0])}`,1,0);{const t=r.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(i=e.parse(i,2,ht),!i)return null;const a=[];let s=null;"interpolate-hcl"===n||"interpolate-lab"===n?s=mt:e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType);for(let u=0;u<o.length;u+=2){const t=o[u],n=o[u+1],r=u+3,i=u+4;if("number"!=typeof t)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',r);if(a.length&&a[a.length-1][0]>=t)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',r);const l=e.parse(n,i,s);if(!l)return null;s=s||l.type,a.push([t,l])}return"number"===s.kind||"color"===s.kind||"padding"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new qe(s,n,r,i,a):e.error(`Type ${xt(s)} is not interpolatable.`)}evaluate(t){const e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);const i=e.length;if(r>=e[i-1])return n[i-1].evaluate(t);const o=xe(e,r),a=qe.interpolationFactor(this.interpolation,r,e[o],e[o+1]),s=n[o].evaluate(t),u=n[o+1].evaluate(t);return"interpolate"===this.operator?Se[this.type.kind.toLowerCase()](s,u,a):"interpolate-hcl"===this.operator?Ge.reverse(Ge.interpolate(Ge.forward(s),Ge.forward(u),a)):Ue.reverse(Ue.interpolate(Ue.forward(s),Ue.forward(u),a))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function He(t,e,n,r){const i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}class We{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expectected at least one argument.");let n=null;const r=e.expectedType;r&&"value"!==r.kind&&(n=r);const i=[];for(const a of t.slice(1)){const t=e.parse(a,1+i.length,n,void 0,{typeAnnotation:"omit"});if(!t)return null;n=n||t.type,i.push(t)}const o=r&&i.some((t=>Ot(r,t.type)));return new We(o?yt:n,i)}evaluate(t){let e,n=null,r=0;for(const i of this.args)if(r++,n=i.evaluate(t),n&&n instanceof Bt&&!n.available&&(e||(e=n.name),n=null,r===this.args.length&&(n=e)),null!==n)break;return n}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}class Xe{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const n=[];for(let i=1;i<t.length-1;i+=2){const r=t[i];if("string"!=typeof r)return e.error(`Expected string, but found ${typeof r} instead.`,i);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);const o=e.parse(t[i+1],i+1);if(!o)return null;n.push([r,o])}const r=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return r?new Xe(n,r):null}outputDefined(){return this.result.outputDefined()}}class Ye{constructor(t,e,n){this.type=t,this.index=e,this.input=n}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,ht),r=e.parse(t[2],2,wt(e.expectedType||yt));return n&&r?new Ye(r.type.itemType,n,r):null}evaluate(t){const e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new Ht(`Array index out of bounds: ${e} < 0.`);if(e>=n.length)throw new Ht(`Array index out of bounds: ${e} > ${n.length-1}.`);if(e!==Math.floor(e))throw new Ht(`Array index must be an integer, but found ${e} instead.`);return n[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class Ze{constructor(t,e){this.type=dt,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,yt),r=e.parse(t[2],2,yt);return n&&r?St(n.type,[dt,pt,ht,ft,yt])?new Ze(n,r):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${xt(n.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!Pt(e,["boolean","string","number","null"]))throw new Ht(`Expected first argument to be of type boolean, string, number or null, but found ${xt(Gt(e))} instead.`);if(!Pt(n,["string","array"]))throw new Ht(`Expected second argument to be of type array or string, but found ${xt(Gt(n))} instead.`);return n.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Ke{constructor(t,e,n){this.type=ht,this.needle=t,this.haystack=e,this.fromIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,yt),r=e.parse(t[2],2,yt);if(!n||!r)return null;if(!St(n.type,[dt,pt,ht,ft,yt]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${xt(n.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,ht);return i?new Ke(n,r,i):null}return new Ke(n,r)}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Pt(e,["boolean","string","number","null"]))throw new Ht(`Expected first argument to be of type boolean, string, number or null, but found ${xt(Gt(e))} instead.`);if(!Pt(n,["string","array"]))throw new Ht(`Expected second argument to be of type array or string, but found ${xt(Gt(n))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class $e{constructor(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const i={},o=[];for(let u=2;u<t.length-1;u+=2){let a=t[u];const s=t[u+1];Array.isArray(a)||(a=[a]);const l=e.concat(u);if(0===a.length)return l.error("Expected at least one branch label.");for(const t of a){if("number"!=typeof t&&"string"!=typeof t)return l.error("Branch labels must be numbers or strings.");if("number"==typeof t&&Math.abs(t)>Number.MAX_SAFE_INTEGER)return l.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return l.error("Numeric branch labels must be integer values.");if(n){if(l.checkSubtype(n,Gt(t)))return null}else n=Gt(t);if(void 0!==i[String(t)])return l.error("Branch labels must be unique.");i[String(t)]=o.length}const c=e.parse(s,u,r);if(!c)return null;r=r||c.type,o.push(c)}const a=e.parse(t[1],1,yt);if(!a)return null;const s=e.parse(t[t.length-1],t.length-1,r);return s?"value"!==a.type.kind&&e.concat(1).checkSubtype(n,a.type)?null:new $e(n,r,a,i,o,s):null}evaluate(t){const e=this.input.evaluate(t);return(Gt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}}class Je{constructor(t,e,n){this.type=t,this.branches=e,this.otherwise=n}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const r=[];for(let o=1;o<t.length-1;o+=2){const i=e.parse(t[o],o,dt);if(!i)return null;const a=e.parse(t[o+1],o+1,n);if(!a)return null;r.push([i,a]),n=n||a.type}const i=e.parse(t[t.length-1],t.length-1,n);return i?new Je(n,r,i):null}evaluate(t){for(const[e,n]of this.branches)if(e.evaluate(t))return n.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,n]of this.branches)t(e),t(n);t(this.otherwise)}outputDefined(){return this.branches.every((([t,e])=>e.outputDefined()))&&this.otherwise.outputDefined()}}class Qe{constructor(t,e,n,r){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,yt),r=e.parse(t[2],2,ht);if(!n||!r)return null;if(!St(n.type,[wt(yt),pt,yt]))return e.error(`Expected first argument to be of type array or string, but found ${xt(n.type)} instead`);if(4===t.length){const i=e.parse(t[3],3,ht);return i?new Qe(n.type,n,r,i):null}return new Qe(n.type,n,r)}evaluate(t){const e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Pt(e,["string","array"]))throw new Ht(`Expected first argument to be of type array or string, but found ${xt(Gt(e))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function tn(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function en(t,e,n,r){return 0===r.compare(e,n)}function nn(t,e,n){const r="=="!==t&&"!="!==t;return class i{constructor(t,e,n){this.type=dt,this.lhs=t,this.rhs=e,this.collator=n,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const n=t[0];let o=e.parse(t[1],1,yt);if(!o)return null;if(!tn(n,o.type))return e.concat(1).error(`"${n}" comparisons are not supported for type '${xt(o.type)}'.`);let a=e.parse(t[2],2,yt);if(!a)return null;if(!tn(n,a.type))return e.concat(2).error(`"${n}" comparisons are not supported for type '${xt(a.type)}'.`);if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error(`Cannot compare types '${xt(o.type)}' and '${xt(a.type)}'.`);r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Xt(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Xt(o.type,[a])));let s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(s=e.parse(t[3],3,vt),!s)return null}return new i(o,a,s)}evaluate(i){const o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){const e=Gt(o),n=Gt(a);if(e.kind!==n.kind||"string"!==e.kind&&"number"!==e.kind)throw new Ht(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${n.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const t=Gt(o),n=Gt(a);if("string"!==t.kind||"string"!==n.kind)return e(i,o,a)}return this.collator?n(i,o,a,this.collator.evaluate(i)):e(i,o,a)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}}}const rn=nn("==",(function(t,e,n){return e===n}),en),on=nn("!=",(function(t,e,n){return e!==n}),(function(t,e,n,r){return!en(0,e,n,r)})),an=nn("<",(function(t,e,n){return e<n}),(function(t,e,n,r){return r.compare(e,n)<0})),sn=nn(">",(function(t,e,n){return e>n}),(function(t,e,n,r){return r.compare(e,n)>0})),un=nn("<=",(function(t,e,n){return e<=n}),(function(t,e,n,r){return r.compare(e,n)<=0})),ln=nn(">=",(function(t,e,n){return e>=n}),(function(t,e,n,r){return r.compare(e,n)>=0}));class cn{constructor(t,e,n,r,i){this.type=pt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const n=e.parse(t[1],1,ht);if(!n)return null;const r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");let i=null;if(r.locale&&(i=e.parse(r.locale,1,pt),!i))return null;let o=null;if(r.currency&&(o=e.parse(r.currency,1,pt),!o))return null;let a=null;if(r["min-fraction-digits"]&&(a=e.parse(r["min-fraction-digits"],1,ht),!a))return null;let s=null;return r["max-fraction-digits"]&&(s=e.parse(r["max-fraction-digits"],1,ht),!s)?null:new cn(n,i,o,a,s)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class fn{constructor(t){this.type=bt,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[1];if(!Array.isArray(n)&&"object"==typeof n)return e.error("First argument must be an image or text section.");const r=[];let i=!1;for(let o=1;o<=t.length-1;++o){const n=t[o];if(i&&"object"==typeof n&&!Array.isArray(n)){i=!1;let t=null;if(n["font-scale"]&&(t=e.parse(n["font-scale"],1,ht),!t))return null;let o=null;if(n["text-font"]&&(o=e.parse(n["text-font"],1,wt(pt)),!o))return null;let a=null;if(n["text-color"]&&(a=e.parse(n["text-color"],1,mt),!a))return null;const s=r[r.length-1];s.scale=t,s.font=o,s.textColor=a}else{const n=e.parse(t[o],1,yt);if(!n)return null;const a=n.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:n,scale:null,font:null,textColor:null})}}return new fn(r)}evaluate(t){return new Dt(this.sections.map((e=>{const n=e.content.evaluate(t);return Gt(n)===At?new Nt("",n,null,null,null):new Nt(Vt(n),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}}class hn{constructor(t){this.type=At,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const n=e.parse(t[1],1,pt);return n?new hn(n):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),n=Bt.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n}eachChild(t){t(this.input)}outputDefined(){return!1}}class pn{constructor(t){this.type=ht,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error(`Expected argument of type string or array, but found ${xt(n.type)} instead.`):new pn(n):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Ht(`Expected value to be of type string or array, but found ${xt(Gt(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const dn={"==":rn,"!=":on,">":sn,"<":an,">=":ln,"<=":un,array:Xt,at:Ye,boolean:Xt,case:Je,coalesce:We,collator:Qt,format:fn,image:hn,in:Ze,"index-of":Ke,interpolate:qe,"interpolate-hcl":qe,"interpolate-lab":qe,length:pn,let:Xe,literal:qt,match:$e,number:Xt,"number-format":cn,object:Xt,slice:Qe,step:Ee,string:Xt,"to-boolean":Zt,"to-color":Zt,"to-number":Zt,"to-string":Zt,var:_e,within:ge};function mn(t,[e,n,r,i]){e=e.evaluate(t),n=n.evaluate(t),r=r.evaluate(t);const o=i?i.evaluate(t):1,a=zt(e,n,r,o);if(a)throw new Ht(a);return new Mt(e/255*o,n/255*o,r/255*o,o)}function gn(t,e){return t in e}function yn(t,e){const n=e[t];return void 0===n?null:n}function vn(t){return{type:t}}function bn(t){return{result:"success",value:t}}function _n(t){return{result:"error",value:t}}function An(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function wn(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function xn(t){return!!t.expression&&t.expression.interpolated}function En(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function On(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Sn(t){return t}function Pn(t,e){const n="color"===e.type,r=t.stops&&"object"==typeof t.stops[0][0],i=r||!(r||void 0!==t.property),o=t.type||(xn(e)?"exponential":"interval");if(n||"padding"===e.type){const r=n?Mt.parse:Ft.parse;(t=at({},t)).stops&&(t.stops=t.stops.map((t=>[t[0],r(t[1])]))),t.default=r(t.default?t.default:e.default)}if(t.colorSpace&&"rgb"!==t.colorSpace&&!Ve[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let a,s,u;if("exponential"===o)a=In;else if("interval"===o)a=kn;else if("categorical"===o){a=Tn,s=Object.create(null);for(const e of t.stops)s[e[0]]=e[1];u=typeof t.stops[0][0]}else{if("identity"!==o)throw new Error(`Unknown function type "${o}"`);a=Ln}if(r){const n={},r=[];for(let e=0;e<t.stops.length;e++){const i=t.stops[e],o=i[0].zoom;void 0===n[o]&&(n[o]={zoom:o,type:t.type,property:t.property,default:t.default,stops:[]},r.push(o)),n[o].stops.push([i[0].value,i[1]])}const i=[];for(const t of r)i.push([n[t].zoom,Pn(n[t],e)]);const o={name:"linear"};return{kind:"composite",interpolationType:o,interpolationFactor:qe.interpolationFactor.bind(void 0,o),zoomStops:i.map((t=>t[0])),evaluate:({zoom:n},r)=>In({stops:i,base:t.base},e,n).evaluate(n,r)}}if(i){const n="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:n,interpolationFactor:qe.interpolationFactor.bind(void 0,n),zoomStops:t.stops.map((t=>t[0])),evaluate:({zoom:n})=>a(t,e,n,s,u)}}return{kind:"source",evaluate(n,r){const i=r&&r.properties?r.properties[t.property]:void 0;return void 0===i?Cn(t.default,e.default):a(t,e,i,s,u)}}}function Cn(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function Tn(t,e,n,r,i){return Cn(typeof n===i?r[n]:void 0,t.default,e.default)}function kn(t,e,n){if("number"!==En(n))return Cn(t.default,e.default);const r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];const i=xe(t.stops.map((t=>t[0])),n);return t.stops[i][1]}function In(t,e,n){const r=void 0!==t.base?t.base:1;if("number"!==En(n))return Cn(t.default,e.default);const i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];const o=xe(t.stops.map((t=>t[0])),n),a=function(t,e,n,r){const i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1];let l=Se[e.type]||Sn;if(t.colorSpace&&"rgb"!==t.colorSpace){const e=Ve[t.colorSpace];l=(t,n)=>e.reverse(e.interpolate(e.forward(t),e.forward(n),a))}return"function"==typeof s.evaluate?{evaluate(...t){const e=s.evaluate.apply(void 0,t),n=u.evaluate.apply(void 0,t);if(void 0!==e&&void 0!==n)return l(e,n,a)}}:l(s,u,a)}function Ln(t,e,n){switch(e.type){case"color":n=Mt.parse(n);break;case"formatted":n=Dt.fromString(n.toString());break;case"resolvedImage":n=Bt.fromString(n.toString());break;case"padding":n=Ft.parse(n);break;default:En(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0)}return Cn(n,t.default,e.default)}Jt.register(dn,{error:[{kind:"error"},[pt],(t,[e])=>{throw new Ht(e.evaluate(t))}],typeof:[pt,[yt],(t,[e])=>xt(Gt(e.evaluate(t)))],"to-rgba":[wt(ht,4),[mt],(t,[e])=>e.evaluate(t).toArray()],rgb:[mt,[ht,ht,ht],mn],rgba:[mt,[ht,ht,ht,ht],mn],has:{type:dt,overloads:[[[pt],(t,[e])=>gn(e.evaluate(t),t.properties())],[[pt,gt],(t,[e,n])=>gn(e.evaluate(t),n.evaluate(t))]]},get:{type:yt,overloads:[[[pt],(t,[e])=>yn(e.evaluate(t),t.properties())],[[pt,gt],(t,[e,n])=>yn(e.evaluate(t),n.evaluate(t))]]},"feature-state":[yt,[pt],(t,[e])=>yn(e.evaluate(t),t.featureState||{})],properties:[gt,[],t=>t.properties()],"geometry-type":[pt,[],t=>t.geometryType()],id:[yt,[],t=>t.id()],zoom:[ht,[],t=>t.globals.zoom],"heatmap-density":[ht,[],t=>t.globals.heatmapDensity||0],"line-progress":[ht,[],t=>t.globals.lineProgress||0],accumulated:[yt,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[ht,vn(ht),(t,e)=>{let n=0;for(const r of e)n+=r.evaluate(t);return n}],"*":[ht,vn(ht),(t,e)=>{let n=1;for(const r of e)n*=r.evaluate(t);return n}],"-":{type:ht,overloads:[[[ht,ht],(t,[e,n])=>e.evaluate(t)-n.evaluate(t)],[[ht],(t,[e])=>-e.evaluate(t)]]},"/":[ht,[ht,ht],(t,[e,n])=>e.evaluate(t)/n.evaluate(t)],"%":[ht,[ht,ht],(t,[e,n])=>e.evaluate(t)%n.evaluate(t)],ln2:[ht,[],()=>Math.LN2],pi:[ht,[],()=>Math.PI],e:[ht,[],()=>Math.E],"^":[ht,[ht,ht],(t,[e,n])=>Math.pow(e.evaluate(t),n.evaluate(t))],sqrt:[ht,[ht],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[ht,[ht],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[ht,[ht],(t,[e])=>Math.log(e.evaluate(t))],log2:[ht,[ht],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[ht,[ht],(t,[e])=>Math.sin(e.evaluate(t))],cos:[ht,[ht],(t,[e])=>Math.cos(e.evaluate(t))],tan:[ht,[ht],(t,[e])=>Math.tan(e.evaluate(t))],asin:[ht,[ht],(t,[e])=>Math.asin(e.evaluate(t))],acos:[ht,[ht],(t,[e])=>Math.acos(e.evaluate(t))],atan:[ht,[ht],(t,[e])=>Math.atan(e.evaluate(t))],min:[ht,vn(ht),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[ht,vn(ht),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[ht,[ht],(t,[e])=>Math.abs(e.evaluate(t))],round:[ht,[ht],(t,[e])=>{const n=e.evaluate(t);return n<0?-Math.round(-n):Math.round(n)}],floor:[ht,[ht],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[ht,[ht],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[dt,[pt,yt],(t,[e,n])=>t.properties()[e.value]===n.value],"filter-id-==":[dt,[yt],(t,[e])=>t.id()===e.value],"filter-type-==":[dt,[pt],(t,[e])=>t.geometryType()===e.value],"filter-<":[dt,[pt,yt],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r<i}],"filter-id-<":[dt,[yt],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n<r}],"filter->":[dt,[pt,yt],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r>i}],"filter-id->":[dt,[yt],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n>r}],"filter-<=":[dt,[pt,yt],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[dt,[yt],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n<=r}],"filter->=":[dt,[pt,yt],(t,[e,n])=>{const r=t.properties()[e.value],i=n.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[dt,[yt],(t,[e])=>{const n=t.id(),r=e.value;return typeof n==typeof r&&n>=r}],"filter-has":[dt,[yt],(t,[e])=>e.value in t.properties()],"filter-has-id":[dt,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[dt,[wt(pt)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[dt,[wt(yt)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[dt,[pt,wt(yt)],(t,[e,n])=>n.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[dt,[pt,wt(yt)],(t,[e,n])=>function(t,e,n,r){for(;n<=r;){const i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[e.value],n.value,0,n.value.length-1)],all:{type:dt,overloads:[[[dt,dt],(t,[e,n])=>e.evaluate(t)&&n.evaluate(t)],[vn(dt),(t,e)=>{for(const n of e)if(!n.evaluate(t))return!1;return!0}]]},any:{type:dt,overloads:[[[dt,dt],(t,[e,n])=>e.evaluate(t)||n.evaluate(t)],[vn(dt),(t,e)=>{for(const n of e)if(n.evaluate(t))return!0;return!1}]]},"!":[dt,[dt],(t,[e])=>!e.evaluate(t)],"is-supported-script":[dt,[pt],(t,[e])=>{const n=t.globals&&t.globals.isSupportedScript;return!n||n(e.evaluate(t))}],upcase:[pt,[pt],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[pt,[pt],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[pt,vn(yt),(t,e)=>e.map((e=>Vt(e.evaluate(t)))).join("")],"resolved-locale":[pt,[vt],(t,[e])=>e.evaluate(t).resolvedLocale()]});class jn{constructor(t,e){this.expression=t,this._warningHistory={},this._evaluator=new $t,this._defaultValue=e?function(t){return"color"===t.type&&On(t.default)?new Mt(0,0,0,0):"color"===t.type?Mt.parse(t.default)||null:"padding"===t.type?Ft.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,n,r,i,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(t,e,n,r,i,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new Ht(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function Mn(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in dn}function Rn(t,e){const n=new Ae(dn,[],e?function(t){const e={color:mt,string:pt,number:ht,enum:pt,boolean:dt,formatted:bt,padding:_t,resolvedImage:At};return"array"===t.type?wt(e[t.value]||yt,t.length):e[t.type]}(e):void 0),r=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?bn(new jn(r,e)):_n(n.errors)}class Nn{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!ve(e.expression)}evaluateWithoutErrorHandling(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)}evaluate(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)}}class Dn{constructor(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent="camera"!==t&&!ve(e.expression),this.interpolationType=r}evaluateWithoutErrorHandling(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)}evaluate(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)}interpolationFactor(t,e,n){return this.interpolationType?qe.interpolationFactor(this.interpolationType,t,e,n):0}}function Fn(t,e){const n=Rn(t,e);if("error"===n.result)return n;const r=n.value.expression,i=ye(r);if(!i&&!An(e))return _n([new lt("","data expressions not supported")]);const o=be(r,["zoom"]);if(!o&&!wn(e))return _n([new lt("","zoom expressions not supported")]);const a=zn(r);return a||o?a instanceof lt?_n([a]):a instanceof qe&&!xn(e)?_n([new lt("",'"interpolate" expressions cannot be used with this property')]):bn(a?new Dn(i?"camera":"composite",n.value,a.labels,a instanceof qe?a.interpolation:void 0):new Nn(i?"constant":"source",n.value)):_n([new lt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Bn{constructor(t,e){this._parameters=t,this._specification=e,at(this,Pn(this._parameters,this._specification))}static deserialize(t){return new Bn(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function zn(t){let e=null;if(t instanceof Xe)e=zn(t.result);else if(t instanceof We){for(const n of t.args)if(e=zn(n),e)break}else(t instanceof Ee||t instanceof qe)&&t.input instanceof Jt&&"zoom"===t.input.name&&(e=t);return e instanceof lt||t.eachChild((t=>{const n=zn(t);n instanceof lt?e=n:!e&&n?e=new lt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&n&&e!==n&&(e=new lt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Un(t){const e=t.key,n=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec;let s=[];const u=En(n);if("object"!==u)return[new it(e,n,`object expected, ${u} found`)];for(const l in n){const t=l.split(".")[0],u=r[t]||r["*"];let c;if(i[t])c=i[t];else if(r[t])c=mr;else if(i["*"])c=i["*"];else{if(!r["*"]){s.push(new it(e,n[l],`unknown property "${l}"`));continue}c=mr}s=s.concat(c({key:(e?`${e}.`:e)+l,value:n[l],valueSpec:u,style:o,styleSpec:a,object:n,objectKey:l},n))}for(const l in r)i[l]||r[l].required&&void 0===r[l].default&&void 0===n[l]&&s.push(new it(e,n,`missing required property "${l}"`));return s}function Gn(t){const e=t.value,n=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||mr;if("array"!==En(e))return[new it(o,e,`array expected, ${En(e)} found`)];if(n.length&&e.length!==n.length)return[new it(o,e,`array length ${n.length} expected, length ${e.length} found`)];if(n["min-length"]&&e.length<n["min-length"])return[new it(o,e,`array length at least ${n["min-length"]} expected, length ${e.length} found`)];let s={type:n.value,values:n.values};i.$version<7&&(s.function=n.function),"object"===En(n.value)&&(s=n.value);let u=[];for(let l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:r,styleSpec:i,key:`${o}[${l}]`}));return u}function Vn(t){const e=t.key,n=t.value,r=t.valueSpec;let i=En(n);return"number"===i&&n!=n&&(i="NaN"),"number"!==i?[new it(e,n,`number expected, ${i} found`)]:"minimum"in r&&n<r.minimum?[new it(e,n,`${n} is less than the minimum value ${r.minimum}`)]:"maximum"in r&&n>r.maximum?[new it(e,n,`${n} is greater than the maximum value ${r.maximum}`)]:[]}function qn(t){const e=t.valueSpec,n=st(t.value.type);let r,i,o,a={};const s="categorical"!==n&&void 0===t.value.property,u=!s,l="array"===En(t.value.stops)&&"array"===En(t.value.stops[0])&&"object"===En(t.value.stops[0][0]),c=Un({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===n)return[new it(t.key,t.value,'identity function may not have a "stops" property')];let e=[];const r=t.value;return e=e.concat(Gn({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===En(r)&&0===r.length&&e.push(new it(t.key,r,"array must have at least one stop")),e},default:function(t){return mr({key:t.key,value:t.value,valueSpec:e,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===n&&s&&c.push(new it(t.key,t.value,'missing required property "property"')),"identity"===n||t.value.stops||c.push(new it(t.key,t.value,'missing required property "stops"')),"exponential"===n&&t.valueSpec.expression&&!xn(t.valueSpec)&&c.push(new it(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!An(t.valueSpec)?c.push(new it(t.key,t.value,"property functions not supported")):s&&!wn(t.valueSpec)&&c.push(new it(t.key,t.value,"zoom functions not supported"))),"categorical"!==n&&!l||void 0!==t.value.property||c.push(new it(t.key,t.value,'"property" property is required')),c;function f(t){let n=[];const r=t.value,s=t.key;if("array"!==En(r))return[new it(s,r,`array expected, ${En(r)} found`)];if(2!==r.length)return[new it(s,r,`array length 2 expected, length ${r.length} found`)];if(l){if("object"!==En(r[0]))return[new it(s,r,`object expected, ${En(r[0])} found`)];if(void 0===r[0].zoom)return[new it(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new it(s,r,"object stop key must have value")];if(o&&o>st(r[0].zoom))return[new it(s,r[0].zoom,"stop zoom values must appear in ascending order")];st(r[0].zoom)!==o&&(o=st(r[0].zoom),i=void 0,a={}),n=n.concat(Un({key:`${s}[0]`,value:r[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Vn,value:h}}))}else n=n.concat(h({key:`${s}[0]`,value:r[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},r));return Mn(ut(r[1]))?n.concat([new it(`${s}[1]`,r[1],"expressions are not allowed in function stops.")]):n.concat(mr({key:`${s}[1]`,value:r[1],valueSpec:e,style:t.style,styleSpec:t.styleSpec}))}function h(t,o){const s=En(t.value),u=st(t.value),l=null!==t.value?t.value:o;if(r){if(s!==r)return[new it(t.key,l,`${s} stop domain type must match previous stop domain type ${r}`)]}else r=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new it(t.key,l,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==n){let r=`number expected, ${s} found`;return An(e)&&void 0===n&&(r+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new it(t.key,l,r)]}return"categorical"!==n||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==n&&"number"===s&&void 0!==i&&u<i?[new it(t.key,l,"stop domain values must appear in ascending order")]:(i=u,"categorical"===n&&u in a?[new it(t.key,l,"stop domain values must be unique")]:(a[u]=!0,[])):[new it(t.key,l,`integer expected, found ${u}`)]}}function Hn(t){const e=("property"===t.expressionContext?Fn:Rn)(ut(t.value),t.valueSpec);if("error"===e.result)return e.value.map((e=>new it(`${t.key}${e.key}`,t.value,e.message)));const n=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!n.outputDefined())return[new it(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===t.expressionContext&&"layout"===t.propertyType&&!ve(n))return[new it(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!ve(n))return[new it(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!be(n,["zoom","feature-state"]))return[new it(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!ye(n))return[new it(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wn(t){const e=t.key,n=t.value,r=t.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(st(n))&&i.push(new it(e,n,`expected one of [${r.values.join(", ")}], ${JSON.stringify(n)} found`)):-1===Object.keys(r.values).indexOf(st(n))&&i.push(new it(e,n,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(n)} found`)),i}function Xn(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Xn(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}const Yn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Zn(t){if(null==t)return{filter:()=>!0,needGeometry:!1};Xn(t)||(t=Jn(t));const e=Rn(t,Yn);if("error"===e.result)throw new Error(e.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return{filter:(t,n,r)=>e.value.evaluate(t,n,{},r),needGeometry:$n(t)}}function Kn(t,e){return t<e?-1:t>e?1:0}function $n(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e<t.length;e++)if($n(t[e]))return!0;return!1}function Jn(t){if(!t)return!0;const e=t[0];return t.length<=1?"any"!==e:"=="===e?Qn(t[1],t[2],"=="):"!="===e?nr(Qn(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?Qn(t[1],t[2],e):"any"===e?(n=t.slice(1),["any"].concat(n.map(Jn))):"all"===e?["all"].concat(t.slice(1).map(Jn)):"none"===e?["all"].concat(t.slice(1).map(Jn).map(nr)):"in"===e?tr(t[1],t.slice(2)):"!in"===e?nr(tr(t[1],t.slice(2))):"has"===e?er(t[1]):"!has"===e?nr(er(t[1])):"within"!==e||t;var n}function Qn(t,e,n){switch(t){case"$type":return[`filter-type-${n}`,e];case"$id":return[`filter-id-${n}`,e];default:return[`filter-${n}`,t,e]}}function tr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(Kn)]]:["filter-in-small",t,["literal",e]]}}function er(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function nr(t){return["!",t]}function rr(t){return Xn(ut(t.value))?Hn(at({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ir(t)}function ir(t){const e=t.value,n=t.key;if("array"!==En(e))return[new it(n,e,`array expected, ${En(e)} found`)];const r=t.styleSpec;let i,o=[];if(e.length<1)return[new it(n,e,"filter array must have at least 1 element")];switch(o=o.concat(Wn({key:`${n}[0]`,value:e[0],valueSpec:r.filter_operator,style:t.style,styleSpec:t.styleSpec})),st(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===st(e[1])&&o.push(new it(n,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":3!==e.length&&o.push(new it(n,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(i=En(e[1]),"string"!==i&&o.push(new it(`${n}[1]`,e[1],`string expected, ${i} found`)));for(let a=2;a<e.length;a++)i=En(e[a]),"$type"===st(e[1])?o=o.concat(Wn({key:`${n}[${a}]`,value:e[a],valueSpec:r.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&o.push(new it(`${n}[${a}]`,e[a],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let r=1;r<e.length;r++)o=o.concat(ir({key:`${n}[${r}]`,value:e[r],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":i=En(e[1]),2!==e.length?o.push(new it(n,e,`filter array for "${e[0]}" operator must have 2 elements`)):"string"!==i&&o.push(new it(`${n}[1]`,e[1],`string expected, ${i} found`));break;case"within":i=En(e[1]),2!==e.length?o.push(new it(n,e,`filter array for "${e[0]}" operator must have 2 elements`)):"object"!==i&&o.push(new it(`${n}[1]`,e[1],`object expected, ${i} found`))}return o}function or(t,e){const n=t.key,r=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[`${e}_${t.layerType}`];if(!s)return[];const u=a.match(/^(.*)-transition$/);if("paint"===e&&u&&s[u[1]]&&s[u[1]].transition)return mr({key:n,value:o,valueSpec:i.transition,style:r,styleSpec:i});const l=t.valueSpec||s[a];if(!l)return[new it(n,o,`unknown property "${a}"`)];let c;if("string"===En(o)&&An(l)&&!l.tokens&&(c=/^{([^}]+)}$/.exec(o)))return[new it(n,o,`"${a}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(c[1])} }\`.`)];const f=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&f.push(new it(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&On(ut(o))&&"identity"===st(o.type)&&f.push(new it(n,o,'"text-font" does not support identity functions'))),f.concat(mr({key:t.key,value:o,valueSpec:l,style:r,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:a}))}function ar(t){return or(t,"paint")}function sr(t){return or(t,"layout")}function ur(t){let e=[];const n=t.value,r=t.key,i=t.style,o=t.styleSpec;n.type||n.ref||e.push(new it(r,n,'either "type" or "ref" is required'));let a=st(n.type);const s=st(n.ref);if(n.id){const o=st(n.id);for(let a=0;a<t.arrayIndex;a++){const t=i.layers[a];st(t.id)===o&&e.push(new it(r,n.id,`duplicate layer id "${n.id}", previously used at line ${t.id.__line__}`))}}if("ref"in n){let t;["type","source","source-layer","filter","layout"].forEach((t=>{t in n&&e.push(new it(r,n[t],`"${t}" is prohibited for ref layers`))})),i.layers.forEach((e=>{st(e.id)===s&&(t=e)})),t?t.ref?e.push(new it(r,n.ref,"ref cannot reference another ref layer")):a=st(t.type):e.push(new it(r,n.ref,`ref layer "${s}" not found`))}else if("background"!==a)if(n.source){const t=i.sources&&i.sources[n.source],o=t&&st(t.type);t?"vector"===o&&"raster"===a?e.push(new it(r,n.source,`layer "${n.id}" requires a raster source`)):"raster"===o&&"raster"!==a?e.push(new it(r,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==o||n["source-layer"]?"raster-dem"===o&&"hillshade"!==a?e.push(new it(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!n.paint||!n.paint["line-gradient"]||"geojson"===o&&t.lineMetrics||e.push(new it(r,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new it(r,n,`layer "${n.id}" must specify a "source-layer"`)):e.push(new it(r,n.source,`source "${n.source}" not found`))}else e.push(new it(r,n,'missing required property "source"'));return e=e.concat(Un({key:r,value:n,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":()=>[],type:()=>mr({key:`${r}.type`,value:n.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"}),filter:rr,layout:t=>Un({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>sr(at({layerType:a},t))}}),paint:t=>Un({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>ar(at({layerType:a},t))}})}})),e}function lr(t){const e=t.value,n=t.key,r=En(e);return"string"!==r?[new it(n,e,`string expected, ${r} found`)]:[]}const cr={promoteId:function({key:t,value:e}){if("string"===En(e))return lr({key:t,value:e});{const n=[];for(const r in e)n.push(...lr({key:`${t}.${r}`,value:e[r]}));return n}}};function fr(t){const e=t.value,n=t.key,r=t.styleSpec,i=t.style;if(!e.type)return[new it(n,e,'"type" is required')];const o=st(e.type);let a;switch(o){case"vector":case"raster":case"raster-dem":return a=Un({key:n,value:e,valueSpec:r[`source_${o.replace("-","_")}`],style:t.style,styleSpec:r,objectElementValidators:cr}),a;case"geojson":if(a=Un({key:n,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r,objectElementValidators:cr}),e.cluster)for(const t in e.clusterProperties){const[r,i]=e.clusterProperties[t],o="string"==typeof r?[r,["accumulated"],["get",t]]:r;a.push(...Hn({key:`${n}.${t}.map`,value:i,expressionContext:"cluster-map"})),a.push(...Hn({key:`${n}.${t}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return a;case"video":return Un({key:n,value:e,valueSpec:r.source_video,style:i,styleSpec:r});case"image":return Un({key:n,value:e,valueSpec:r.source_image,style:i,styleSpec:r});case"canvas":return[new it(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wn({key:`${n}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:r})}}function hr(t){const e=t.value,n=t.styleSpec,r=n.light,i=t.style;let o=[];const a=En(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new it("light",e,`object expected, ${a} found`)]),o;for(const s in e){const t=s.match(/^(.*)-transition$/);o=o.concat(t&&r[t[1]]&&r[t[1]].transition?mr({key:s,value:e[s],valueSpec:n.transition,style:i,styleSpec:n}):r[s]?mr({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:n}):[new it(s,e[s],`unknown property "${s}"`)])}return o}function pr(t){const e=t.value,n=t.styleSpec,r=n.terrain,i=t.style;let o=[];const a=En(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new it("terrain",e,`object expected, ${a} found`)]),o;for(const s in e)o=o.concat(r[s]?mr({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:n}):[new it(s,e[s],`unknown property "${s}"`)]);return o}const dr={"*":()=>[],array:Gn,boolean:function(t){const e=t.value,n=t.key,r=En(e);return"boolean"!==r?[new it(n,e,`boolean expected, ${r} found`)]:[]},number:Vn,color:function(t){const e=t.key,n=t.value,r=En(n);return"string"!==r?[new it(e,n,`color expected, ${r} found`)]:null===Ct(n)?[new it(e,n,`color expected, "${n}" found`)]:[]},constants:ot,enum:Wn,filter:rr,function:qn,layer:ur,object:Un,source:fr,light:hr,terrain:pr,string:lr,formatted:function(t){return 0===lr(t).length?[]:Hn(t)},resolvedImage:function(t){return 0===lr(t).length?[]:Hn(t)},padding:function(t){const e=t.key,n=t.value;if("array"===En(n)){if(n.length<1||n.length>4)return[new it(e,n,`padding requires 1 to 4 values; ${n.length} values found`)];const t={type:"number"};let r=[];for(let i=0;i<n.length;i++)r=r.concat(mr({key:`${e}[${i}]`,value:n[i],valueSpec:t}));return r}return Vn({key:e,value:n,valueSpec:{}})}};function mr(t){const e=t.value,n=t.valueSpec,r=t.styleSpec;return n.expression&&On(st(e))?qn(t):n.expression&&Mn(ut(e))?Hn(t):n.type&&dr[n.type]?dr[n.type](t):Un(at({},t,{valueSpec:n.type?r[n.type]:n}))}function gr(t){const e=t.value,n=t.key,r=lr(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new it(n,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new it(n,e,'"glyphs" url must include a "{range}" token'))),r}function yr(t,e=rt){let n=[];return n=n.concat(mr({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:gr,"*":()=>[]}})),t.constants&&(n=n.concat(ot({key:"constants",value:t.constants,style:t,styleSpec:e}))),vr(n)}function vr(t){return[].concat(t).sort(((t,e)=>t.line-e.line))}function br(t){return function(...e){return vr(t.apply(this,e))}}yr.source=br(fr),yr.light=br(hr),yr.terrain=br(pr),yr.layer=br(ur),yr.filter=br(rr),yr.paintProperty=br(ar),yr.layoutProperty=br(sr);const _r=yr,Ar=_r.light,wr=_r.paintProperty,xr=_r.layoutProperty;function Er(t,e){let n=!1;if(e&&e.length)for(const r of e)t.fire(new et(new Error(r.message))),n=!0;return n}class Or{constructor(t,e,n){const r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const i=new Int32Array(this.arrayBuffer);t=i[0],this.d=(e=i[1])+2*(n=i[2]);for(let t=0;t<this.d*this.d;t++){const e=i[3+t],n=i[3+t+1];r.push(e===n?null:i.subarray(e,n))}const o=i[3+r.length+1];this.keys=i.subarray(i[3+r.length],o),this.bboxes=i.subarray(o),this.insert=this._insertReadonly}else{this.d=e+2*n;for(let t=0;t<this.d*this.d;t++)r.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=n,this.scale=e/t,this.uid=0;const i=n/e*t;this.min=-i,this.max=t+i}insert(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,e,n,r,i,o){this.cells[i].push(o)}query(t,e,n,r,i){const o=this.min,a=this.max;if(t<=o&&e<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);{const o=[];return this._forEachCell(t,e,n,r,this._queryCell,o,{},i),o}}_queryCell(t,e,n,r,i,o,a,s){const u=this.cells[i];if(null!==u){const i=this.keys,l=this.bboxes;for(let c=0;c<u.length;c++){const f=u[c];if(void 0===a[f]){const u=4*f;(s?s(l[u+0],l[u+1],l[u+2],l[u+3]):t<=l[u+2]&&e<=l[u+3]&&n>=l[u+0]&&r>=l[u+1])?(a[f]=!0,o.push(i[f])):a[f]=!1}}}}_forEachCell(t,e,n,r,i,o,a,s){const u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(n),f=this._convertToCellCoord(r);for(let h=u;h<=c;h++)for(let u=l;u<=f;u++){const l=this.d*u+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(u),this._convertFromCellCoord(h+1),this._convertFromCellCoord(u+1)))&&i.call(this,t,e,n,r,l,o,a,s))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,e=3+this.cells.length+1+1;let n=0;for(let o=0;o<this.cells.length;o++)n+=this.cells[o].length;const r=new Int32Array(e+n+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;let i=e;for(let o=0;o<t.length;o++){const e=t[o];r[3+o]=i,r.set(e,i),i+=e.length}return r[3+t.length]=i,r.set(this.keys,i),i+=this.keys.length,r[3+t.length+1]=i,r.set(this.bboxes,i),i+=this.bboxes.length,r.buffer}static serialize(t,e){const n=t.toArrayBuffer();return e&&e.push(n),{buffer:n}}static deserialize(t){return new Or(t.buffer)}}const Sr={};function Pr(t,e,n={}){Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Sr[t]={klass:e,omit:n.omit||[],shallow:n.shallow||[]}}Pr("Object",Object),Pr("TransferableGridIndex",Or),Pr("Color",Mt),Pr("Error",Error),Pr("AJAXError",G),Pr("ResolvedImage",Bt),Pr("StylePropertyFunction",Bn),Pr("StyleExpression",jn,{omit:["_evaluator"]}),Pr("ZoomDependentExpression",Dn),Pr("ZoomConstantExpression",Nn),Pr("CompoundExpression",Jt,{omit:["_evaluate"]});for(const Ac in dn)dn[Ac]._classRegistryKey||Pr(`Expression_${Ac}`,dn[Ac]);function Cr(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function Tr(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof Blob)return t;if(Cr(t))return e&&e.push(t),t;if(x(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){const n=t;return e&&e.push(n.buffer),n}if(t instanceof ImageData)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){const n=[];for(const r of t)n.push(Tr(r,e));return n}if("object"==typeof t){const n=t.constructor,r=n._classRegistryKey;if(!r)throw new Error("can't serialize object of unregistered class");const i=n.serialize?n.serialize(t,e):{};if(!n.serialize){for(const n in t){if(!t.hasOwnProperty(n))continue;if(Sr[r].omit.indexOf(n)>=0)continue;const o=t[n];i[n]=Sr[r].shallow.indexOf(n)>=0?o:Tr(o,e)}t instanceof Error&&(i.message=t.message)}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}throw new Error("can't serialize object of type "+typeof t)}function kr(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof Blob||Cr(t)||x(t)||ArrayBuffer.isView(t)||t instanceof ImageData)return t;if(Array.isArray(t))return t.map(kr);if("object"==typeof t){const e=t.$name||"Object";if(!Sr[e])throw new Error(`can't deserialize unregistered class ${e}`);const{klass:n}=Sr[e];if(!n)throw new Error(`can't deserialize unregistered class ${e}`);if(n.deserialize)return n.deserialize(t);const r=Object.create(n.prototype);for(const i of Object.keys(t)){if("$name"===i)continue;const n=t[i];r[i]=Sr[e].shallow.indexOf(i)>=0?n:kr(n)}return r}throw new Error("can't deserialize object of type "+typeof t)}class Ir{constructor(){this.first=!0}update(t,e){const n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=n,!0))}}const Lr={"Latin-1 Supplement":t=>t>=128&&t<=255,Arabic:t=>t>=1536&&t<=1791,"Arabic Supplement":t=>t>=1872&&t<=1919,"Arabic Extended-A":t=>t>=2208&&t<=2303,"Hangul Jamo":t=>t>=4352&&t<=4607,"Unified Canadian Aboriginal Syllabics":t=>t>=5120&&t<=5759,Khmer:t=>t>=6016&&t<=6143,"Unified Canadian Aboriginal Syllabics Extended":t=>t>=6320&&t<=6399,"General Punctuation":t=>t>=8192&&t<=8303,"Letterlike Symbols":t=>t>=8448&&t<=8527,"Number Forms":t=>t>=8528&&t<=8591,"Miscellaneous Technical":t=>t>=8960&&t<=9215,"Control Pictures":t=>t>=9216&&t<=9279,"Optical Character Recognition":t=>t>=9280&&t<=9311,"Enclosed Alphanumerics":t=>t>=9312&&t<=9471,"Geometric Shapes":t=>t>=9632&&t<=9727,"Miscellaneous Symbols":t=>t>=9728&&t<=9983,"Miscellaneous Symbols and Arrows":t=>t>=11008&&t<=11263,"CJK Radicals Supplement":t=>t>=11904&&t<=12031,"Kangxi Radicals":t=>t>=12032&&t<=12255,"Ideographic Description Characters":t=>t>=12272&&t<=12287,"CJK Symbols and Punctuation":t=>t>=12288&&t<=12351,Hiragana:t=>t>=12352&&t<=12447,Katakana:t=>t>=12448&&t<=12543,Bopomofo:t=>t>=12544&&t<=12591,"Hangul Compatibility Jamo":t=>t>=12592&&t<=12687,Kanbun:t=>t>=12688&&t<=12703,"Bopomofo Extended":t=>t>=12704&&t<=12735,"CJK Strokes":t=>t>=12736&&t<=12783,"Katakana Phonetic Extensions":t=>t>=12784&&t<=12799,"Enclosed CJK Letters and Months":t=>t>=12800&&t<=13055,"CJK Compatibility":t=>t>=13056&&t<=13311,"CJK Unified Ideographs Extension A":t=>t>=13312&&t<=19903,"Yijing Hexagram Symbols":t=>t>=19904&&t<=19967,"CJK Unified Ideographs":t=>t>=19968&&t<=40959,"Yi Syllables":t=>t>=40960&&t<=42127,"Yi Radicals":t=>t>=42128&&t<=42191,"Hangul Jamo Extended-A":t=>t>=43360&&t<=43391,"Hangul Syllables":t=>t>=44032&&t<=55215,"Hangul Jamo Extended-B":t=>t>=55216&&t<=55295,"Private Use Area":t=>t>=57344&&t<=63743,"CJK Compatibility Ideographs":t=>t>=63744&&t<=64255,"Arabic Presentation Forms-A":t=>t>=64336&&t<=65023,"Vertical Forms":t=>t>=65040&&t<=65055,"CJK Compatibility Forms":t=>t>=65072&&t<=65103,"Small Form Variants":t=>t>=65104&&t<=65135,"Arabic Presentation Forms-B":t=>t>=65136&&t<=65279,"Halfwidth and Fullwidth Forms":t=>t>=65280&&t<=65519};function jr(t){for(const e of t)if(Nr(e.charCodeAt(0)))return!0;return!1}function Mr(t){for(const e of t)if(!Rr(e.charCodeAt(0)))return!1;return!0}function Rr(t){return!(Lr.Arabic(t)||Lr["Arabic Supplement"](t)||Lr["Arabic Extended-A"](t)||Lr["Arabic Presentation Forms-A"](t)||Lr["Arabic Presentation Forms-B"](t))}function Nr(t){return!(746!==t&&747!==t&&(t<4352||!(Lr["Bopomofo Extended"](t)||Lr.Bopomofo(t)||Lr["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||Lr["CJK Compatibility Ideographs"](t)||Lr["CJK Compatibility"](t)||Lr["CJK Radicals Supplement"](t)||Lr["CJK Strokes"](t)||!(!Lr["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Lr["CJK Unified Ideographs Extension A"](t)||Lr["CJK Unified Ideographs"](t)||Lr["Enclosed CJK Letters and Months"](t)||Lr["Hangul Compatibility Jamo"](t)||Lr["Hangul Jamo Extended-A"](t)||Lr["Hangul Jamo Extended-B"](t)||Lr["Hangul Jamo"](t)||Lr["Hangul Syllables"](t)||Lr.Hiragana(t)||Lr["Ideographic Description Characters"](t)||Lr.Kanbun(t)||Lr["Kangxi Radicals"](t)||Lr["Katakana Phonetic Extensions"](t)||Lr.Katakana(t)&&12540!==t||!(!Lr["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Lr["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Lr["Unified Canadian Aboriginal Syllabics"](t)||Lr["Unified Canadian Aboriginal Syllabics Extended"](t)||Lr["Vertical Forms"](t)||Lr["Yijing Hexagram Symbols"](t)||Lr["Yi Syllables"](t)||Lr["Yi Radicals"](t))))}function Dr(t){return!(Nr(t)||function(t){return!!(Lr["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Lr["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Lr["Letterlike Symbols"](t)||Lr["Number Forms"](t)||Lr["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Lr["Control Pictures"](t)&&9251!==t||Lr["Optical Character Recognition"](t)||Lr["Enclosed Alphanumerics"](t)||Lr["Geometric Shapes"](t)||Lr["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Lr["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Lr["CJK Symbols and Punctuation"](t)||Lr.Katakana(t)||Lr["Private Use Area"](t)||Lr["CJK Compatibility Forms"](t)||Lr["Small Form Variants"](t)||Lr["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Fr(t){return t>=1424&&t<=2303||Lr["Arabic Presentation Forms-A"](t)||Lr["Arabic Presentation Forms-B"](t)}function Br(t,e){return!(!e&&Fr(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Lr.Khmer(t))}function zr(t){for(const e of t)if(Fr(e.charCodeAt(0)))return!0;return!1}const Ur="deferred",Gr="loading",Vr="loaded";let qr=null,Hr="unavailable",Wr=null;const Xr=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(Hr="error"),qr&&qr(t)};function Yr(){Zr.fire(new tt("pluginStateChange",{pluginStatus:Hr,pluginURL:Wr}))}const Zr=new nt,Kr=function(){return Hr},$r=function(){if(Hr!==Ur||!Wr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Hr=Gr,Yr(),Wr&&W({url:Wr},(t=>{t?Xr(t):(Hr=Vr,Yr())}))},Jr={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Hr===Vr||null!=Jr.applyArabicShaping,isLoading:()=>Hr===Gr,setState(t){Hr=t.pluginStatus,Wr=t.pluginURL},isParsed:()=>null!=Jr.applyArabicShaping&&null!=Jr.processBidirectionalText&&null!=Jr.processStyledBidirectionalText,getPluginURL:()=>Wr};class Qr{constructor(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ir,this.transition={})}isSupportedScript(t){return function(t,e){for(const n of t)if(!Br(n.charCodeAt(0),e))return!1;return!0}(t,Jr.isLoaded())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,e=t-Math.floor(t),n=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}}}class ti{constructor(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(On(t))return new Bn(t,e);if(Mn(t)){const n=Fn(t,e);if("error"===n.result)throw new Error(n.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return n.value}{let n=t;return"color"===e.type&&"string"==typeof t?n=Mt.parse(t):"padding"!==e.type||"number"!=typeof t&&!Array.isArray(t)||(n=Ft.parse(t)),{kind:"constant",evaluate:()=>n}}}(void 0===e?t.specification.default:e,t.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(t,e,n){return this.property.possiblyEvaluate(this,t,e,n)}}class ei{constructor(t){this.property=t,this.value=new ti(t,void 0)}transitioned(t,e){return new ri(this.property,this.value,e,s({},t.transition,this.transition),t.now)}untransitioned(){return new ri(this.property,this.value,null,{},0)}}class ni{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return h(this._values[t].value.value)}setValue(t,e){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new ei(this._values[t].property)),this._values[t].value=new ti(this._values[t].property,null===e?void 0:h(e))}getTransition(t){return h(this._values[t].transition)}setTransition(t,e){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new ei(this._values[t].property)),this._values[t].transition=h(e)||void 0}serialize(){const t={};for(const e of Object.keys(this._values)){const n=this.getValue(e);void 0!==n&&(t[e]=n);const r=this.getTransition(e);void 0!==r&&(t[`${e}-transition`]=r)}return t}transitioned(t,e){const n=new ii(this._properties);for(const r of Object.keys(this._values))n._values[r]=this._values[r].transitioned(t,e._values[r]);return n}untransitioned(){const t=new ii(this._properties);for(const e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}}class ri{constructor(t,e,n,r,i){this.property=t,this.value=e,this.begin=i+r.delay||0,this.end=this.begin+r.duration||0,t.specification.transition&&(r.delay||r.duration)&&(this.prior=n)}possiblyEvaluate(t,e,n){const r=t.now||0,i=this.value.possiblyEvaluate(t,e,n),o=this.prior;if(o){if(r>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r<this.begin)return o.possiblyEvaluate(t,e,n);{const a=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(t,e,n),i,function(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}(a))}}return i}}class ii{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,e,n){const r=new si(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(t,e,n);return r}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class oi{constructor(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}getValue(t){return h(this._values[t].value)}setValue(t,e){this._values[t]=new ti(this._values[t].property,null===e?void 0:h(e))}serialize(){const t={};for(const e of Object.keys(this._values)){const n=this.getValue(e);void 0!==n&&(t[e]=n)}return t}possiblyEvaluate(t,e,n){const r=new si(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(t,e,n);return r}}class ai{constructor(t,e,n){this.property=t,this.value=e,this.parameters=n}isConstant(){return"constant"===this.value.kind}constantOr(t){return"constant"===this.value.kind?this.value.value:t}evaluate(t,e,n,r){return this.property.evaluate(this.value,this.parameters,t,e,n,r)}}class si{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class ui{constructor(t){this.specification=t}possiblyEvaluate(t,e){return t.expression.evaluate(e)}interpolate(t,e,n){const r=Se[this.specification.type];return r?r(t,e,n):t}}class li{constructor(t,e){this.specification=t,this.overrides=e}possiblyEvaluate(t,e,n,r){return new ai(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},n,r)}:t.expression,e)}interpolate(t,e,n){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new ai(this,{kind:"constant",value:void 0},t.parameters);const r=Se[this.specification.type];return r?new ai(this,{kind:"constant",value:r(t.value.value,e.value.value,n)},t.parameters):t}evaluate(t,e,n,r,i,o){return"constant"===t.kind?t.value:t.evaluate(e,n,r,i,o)}}class ci extends li{possiblyEvaluate(t,e,n,r){if(void 0===t.value)return new ai(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){const i=t.expression.evaluate(e,null,{},n,r),o="resolvedImage"===t.property.specification.type&&"string"!=typeof i?i.name:i,a=this._calculate(o,o,o,e);return new ai(this,{kind:"constant",value:a},e)}if("camera"===t.expression.kind){const n=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new ai(this,{kind:"constant",value:n},e)}return new ai(this,t.expression,e)}evaluate(t,e,n,r,i,o){if("source"===t.kind){const a=t.evaluate(e,n,r,i,o);return this._calculate(a,a,a,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},n,r),t.evaluate({zoom:Math.floor(e.zoom)},n,r),t.evaluate({zoom:Math.floor(e.zoom)+1},n,r),e):t.value}_calculate(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}}interpolate(t){return t}}class fi{constructor(t){this.specification=t}possiblyEvaluate(t,e,n,r){if(void 0!==t.value){if("constant"===t.expression.kind){const i=t.expression.evaluate(e,null,{},n,r);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new Qr(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Qr(Math.floor(e.zoom),e)),t.expression.evaluate(new Qr(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}}interpolate(t){return t}}class hi{constructor(t){this.specification=t}possiblyEvaluate(t,e,n,r){return!!t.expression.evaluate(e,null,{},n,r)}interpolate(){return!1}}class pi{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const e in t){const n=t[e];n.specification.overridable&&this.overridableProperties.push(e);const r=this.defaultPropertyValues[e]=new ti(n,void 0),i=this.defaultTransitionablePropertyValues[e]=new ei(n);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}}}Pr("DataDrivenProperty",li),Pr("DataConstantProperty",ui),Pr("CrossFadedDataDrivenProperty",ci),Pr("CrossFadedProperty",fi),Pr("ColorRampProperty",hi);const di="-transition";class mi extends nt{constructor(t,e){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),e.layout&&(this._unevaluatedLayout=new oi(e.layout)),e.paint)){this._transitionablePaint=new ni(e.paint);for(const e in t.paint)this.setPaintProperty(e,t.paint[e],{validate:!1});for(const e in t.layout)this.setLayoutProperty(e,t.layout[e],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new si(e.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,e,n={}){null!=e&&this._validate(xr,`layers.${this.id}.layout.${t}`,t,e,n)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)}getPaintProperty(t){return t.endsWith(di)?this._transitionablePaint.getTransition(t.slice(0,-di.length)):this._transitionablePaint.getValue(t)}setPaintProperty(t,e,n={}){if(null!=e&&this._validate(wr,`layers.${this.id}.paint.${t}`,t,e,n))return!1;if(t.endsWith(di))return this._transitionablePaint.setTransition(t.slice(0,-di.length),e||void 0),!1;{const n=this._transitionablePaint._values[t],r="cross-faded-data-driven"===n.property.specification["property-type"],i=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);const a=this._transitionablePaint._values[t].value;return a.isDataDriven()||i||r||this._handleOverridablePaintPropertyUpdate(t,o,a)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,n){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){const t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),f(t,((t,e)=>!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)))}_validate(t,e,n,r,i={}){return(!i||!1!==i.validate)&&Er(this,t.call(_r,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:rt,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const e=this.paint.get(t);if(e instanceof ai&&An(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1}}const gi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class yi{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class vi{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function bi(t,e=1){let n=0,r=0;return{members:t.map((t=>{const i=gi[t.type].BYTES_PER_ELEMENT,o=n=_i(n,Math.max(e,i)),a=t.components||1;return r=Math.max(r,i),n+=i*a,{name:t.name,type:t.type,components:a,offset:o}})),size:_i(n,Math.max(r,e)),alignment:e}}function _i(t,e){return Math.ceil(t/e)*e}class Ai extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){const n=this.length;return this.resize(n+1),this.emplace(n,t,e)}emplace(t,e,n){const r=2*t;return this.int16[r+0]=e,this.int16[r+1]=n,t}}Ai.prototype.bytesPerElement=4,Pr("StructArrayLayout2i4",Ai);class wi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)}emplace(t,e,n,r,i){const o=4*t;return this.int16[o+0]=e,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,t}}wi.prototype.bytesPerElement=8,Pr("StructArrayLayout4i8",wi);class xi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)}emplace(t,e,n,r,i,o,a){const s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t}}xi.prototype.bytesPerElement=12,Pr("StructArrayLayout2i4i12",xi);class Ei extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)}emplace(t,e,n,r,i,o,a){const s=4*t,u=8*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.uint8[u+4]=r,this.uint8[u+5]=i,this.uint8[u+6]=o,this.uint8[u+7]=a,t}}Ei.prototype.bytesPerElement=8,Pr("StructArrayLayout2i4ub8",Ei);class Oi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){const n=this.length;return this.resize(n+1),this.emplace(n,t,e)}emplace(t,e,n){const r=2*t;return this.float32[r+0]=e,this.float32[r+1]=n,t}}Oi.prototype.bytesPerElement=8,Pr("StructArrayLayout2f8",Oi);class Si extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,u,l){const c=this.length;return this.resize(c+1),this.emplace(c,t,e,n,r,i,o,a,s,u,l)}emplace(t,e,n,r,i,o,a,s,u,l,c){const f=10*t;return this.uint16[f+0]=e,this.uint16[f+1]=n,this.uint16[f+2]=r,this.uint16[f+3]=i,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=u,this.uint16[f+8]=l,this.uint16[f+9]=c,t}}Si.prototype.bytesPerElement=20,Pr("StructArrayLayout10ui20",Si);class Pi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,u,l,c,f){const h=this.length;return this.resize(h+1),this.emplace(h,t,e,n,r,i,o,a,s,u,l,c,f)}emplace(t,e,n,r,i,o,a,s,u,l,c,f,h){const p=12*t;return this.int16[p+0]=e,this.int16[p+1]=n,this.int16[p+2]=r,this.int16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=u,this.int16[p+8]=l,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,t}}Pi.prototype.bytesPerElement=24,Pr("StructArrayLayout4i4ui4i24",Pi);class Ci extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)}emplace(t,e,n,r){const i=3*t;return this.float32[i+0]=e,this.float32[i+1]=n,this.float32[i+2]=r,t}}Ci.prototype.bytesPerElement=12,Pr("StructArrayLayout3f12",Ci);class Ti extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint32[1*t+0]=e,t}}Ti.prototype.bytesPerElement=4,Pr("StructArrayLayout1ul4",Ti);class ki extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,u){const l=this.length;return this.resize(l+1),this.emplace(l,t,e,n,r,i,o,a,s,u)}emplace(t,e,n,r,i,o,a,s,u,l){const c=10*t,f=5*t;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[f+3]=s,this.uint16[c+8]=u,this.uint16[c+9]=l,t}}ki.prototype.bytesPerElement=20,Pr("StructArrayLayout6i1ul2ui20",ki);class Ii extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)}emplace(t,e,n,r,i,o,a){const s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t}}Ii.prototype.bytesPerElement=12,Pr("StructArrayLayout2i2i2i12",Ii);class Li extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,n,r,i)}emplace(t,e,n,r,i,o){const a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,t}}Li.prototype.bytesPerElement=16,Pr("StructArrayLayout2f1f2i16",Li);class ji extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)}emplace(t,e,n,r,i){const o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,t}}ji.prototype.bytesPerElement=12,Pr("StructArrayLayout2ub2f12",ji);class Mi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)}emplace(t,e,n,r){const i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=n,this.uint16[i+2]=r,t}}Mi.prototype.bytesPerElement=6,Pr("StructArrayLayout3ui6",Mi);class Ri extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g){const y=this.length;return this.resize(y+1),this.emplace(y,t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g)}emplace(t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g,y){const v=24*t,b=12*t,_=48*t;return this.int16[v+0]=e,this.int16[v+1]=n,this.uint16[v+2]=r,this.uint16[v+3]=i,this.uint32[b+2]=o,this.uint32[b+3]=a,this.uint32[b+4]=s,this.uint16[v+10]=u,this.uint16[v+11]=l,this.uint16[v+12]=c,this.float32[b+7]=f,this.float32[b+8]=h,this.uint8[_+36]=p,this.uint8[_+37]=d,this.uint8[_+38]=m,this.uint32[b+10]=g,this.int16[v+22]=y,t}}Ri.prototype.bytesPerElement=48,Pr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ri);class Ni extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_,A,w,x,E,O,S,P){const C=this.length;return this.resize(C+1),this.emplace(C,t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_,A,w,x,E,O,S,P)}emplace(t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_,A,w,x,E,O,S,P,C){const T=34*t,k=17*t;return this.int16[T+0]=e,this.int16[T+1]=n,this.int16[T+2]=r,this.int16[T+3]=i,this.int16[T+4]=o,this.int16[T+5]=a,this.int16[T+6]=s,this.int16[T+7]=u,this.uint16[T+8]=l,this.uint16[T+9]=c,this.uint16[T+10]=f,this.uint16[T+11]=h,this.uint16[T+12]=p,this.uint16[T+13]=d,this.uint16[T+14]=m,this.uint16[T+15]=g,this.uint16[T+16]=y,this.uint16[T+17]=v,this.uint16[T+18]=b,this.uint16[T+19]=_,this.uint16[T+20]=A,this.uint16[T+21]=w,this.uint16[T+22]=x,this.uint32[k+12]=E,this.float32[k+13]=O,this.float32[k+14]=S,this.float32[k+15]=P,this.float32[k+16]=C,t}}Ni.prototype.bytesPerElement=68,Pr("StructArrayLayout8i15ui1ul4f68",Ni);class Di extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.float32[1*t+0]=e,t}}Di.prototype.bytesPerElement=4,Pr("StructArrayLayout1f4",Di);class Fi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,n){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)}emplace(t,e,n,r){const i=3*t;return this.int16[i+0]=e,this.int16[i+1]=n,this.int16[i+2]=r,t}}Fi.prototype.bytesPerElement=6,Pr("StructArrayLayout3i6",Fi);class Bi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,n){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)}emplace(t,e,n,r){const i=4*t;return this.uint32[2*t+0]=e,this.uint16[i+2]=n,this.uint16[i+3]=r,t}}Bi.prototype.bytesPerElement=8,Pr("StructArrayLayout1ul2ui8",Bi);class zi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){const n=this.length;return this.resize(n+1),this.emplace(n,t,e)}emplace(t,e,n){const r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=n,t}}zi.prototype.bytesPerElement=4,Pr("StructArrayLayout2ui4",zi);class Ui extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint16[1*t+0]=e,t}}Ui.prototype.bytesPerElement=2,Pr("StructArrayLayout1ui2",Ui);class Gi extends vi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)}emplace(t,e,n,r,i){const o=4*t;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,t}}Gi.prototype.bytesPerElement=16,Pr("StructArrayLayout4f16",Gi);class Vi extends yi{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new O(this.anchorPointX,this.anchorPointY)}}Vi.prototype.size=20;class qi extends ki{get(t){return new Vi(this,t)}}Pr("CollisionBoxArray",qi);class Hi extends yi{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Hi.prototype.size=48;class Wi extends Ri{get(t){return new Hi(this,t)}}Pr("PlacedSymbolArray",Wi);class Xi extends yi{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get textOffset0(){return this._structArray.float32[this._pos4+14]}get textOffset1(){return this._structArray.float32[this._pos4+15]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+16]}}Xi.prototype.size=68;class Yi extends Ni{get(t){return new Xi(this,t)}}Pr("SymbolInstanceArray",Yi);class Zi extends Di{getoffsetX(t){return this.float32[1*t+0]}}Pr("GlyphOffsetArray",Zi);class Ki extends Fi{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}Pr("SymbolLineVertexArray",Ki);class $i extends yi{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}$i.prototype.size=8;class Ji extends Bi{get(t){return new $i(this,t)}}Pr("FeatureIndexArray",Ji);class Qi extends Ai{}class to extends Ai{}class eo extends Ai{}class no extends xi{}class ro extends Ei{}class io extends Oi{}class oo extends Si{}class ao extends Pi{}class so extends Ci{}class uo extends Ti{}class lo extends Ii{}class co extends ji{}class fo extends Mi{}class ho extends zi{}const po=bi([{name:"a_pos",components:2,type:"Int16"}],4),{members:mo}=po;class go{constructor(t=[]){this.segments=t}prepareSegment(t,e,n,r){let i=this.segments[this.segments.length-1];return t>go.MAX_VERTEX_ARRAY_LENGTH&&d(`Max vertices per segment is ${go.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}`),(!i||i.vertexLength+t>go.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i}get(){return this.segments}destroy(){for(const t of this.segments)for(const e in t.vaos)t.vaos[e].destroy()}static simpleSegment(t,e,n,r){return new go([{vertexOffset:t,primitiveOffset:e,vertexLength:n,primitiveLength:r,vaos:{},sortKey:0}])}}function yo(t,e){return 256*(t=o(Math.floor(t),0,255))+o(Math.floor(e),0,255)}go.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Pr("SegmentVector",go);const vo=bi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var bo={exports:{}},_o={exports:{}};_o.exports=function(t,e){var n,r,i,o,a,s,u,l;for(r=t.length-(n=3&t.length),i=e,a=3432918353,s=461845907,l=0;l<r;)u=255&t.charCodeAt(l)|(255&t.charCodeAt(++l))<<8|(255&t.charCodeAt(++l))<<16|(255&t.charCodeAt(++l))<<24,++l,i=27492+(65535&(o=5*(65535&(i=(i^=u=(65535&(u=(u=(65535&u)*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(u=0,n){case 3:u^=(255&t.charCodeAt(l+2))<<16;case 2:u^=(255&t.charCodeAt(l+1))<<8;case 1:i^=u=(65535&(u=(u=(65535&(u^=255&t.charCodeAt(l)))*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0};var Ao={exports:{}};Ao.exports=function(t,e){for(var n,r=t.length,i=e^r,o=0;r>=4;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0};var wo=_o.exports,xo=Ao.exports;bo.exports=wo,bo.exports.murmur3=wo,bo.exports.murmur2=xo;class Eo{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,e,n,r){this.ids.push(Oo(t)),this.positions.push(e,n,r)}getPositions(t){const e=Oo(t);let n=0,r=this.ids.length-1;for(;n<r;){const t=n+r>>1;this.ids[t]>=e?r=t:n=t+1}const i=[];for(;this.ids[n]===e;)i.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return i}static serialize(t,e){const n=new Float64Array(t.ids),r=new Uint32Array(t.positions);return So(n,r,0,n.length-1),e&&e.push(n.buffer,r.buffer),{ids:n,positions:r}}static deserialize(t){const e=new Eo;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e}}function Oo(t){const e=+t;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:bo.exports(String(t))}function So(t,e,n,r){for(;n<r;){const i=t[n+r>>1];let o=n-1,a=r+1;for(;;){do{o++}while(t[o]<i);do{a--}while(t[a]>i);if(o>=a)break;Po(t,o,a),Po(e,3*o,3*a),Po(e,3*o+1,3*a+1),Po(e,3*o+2,3*a+2)}a-n<r-a?(So(t,e,n,a),n=a+1):(So(t,e,a+1,r),r=a)}}function Po(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}Pr("FeaturePositionMap",Eo);class Co{constructor(t,e){this.gl=t.gl,this.location=e}}class To extends Co{constructor(t,e){super(t,e),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class ko extends Co{constructor(t,e){super(t,e),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class Io extends Co{constructor(t,e){super(t,e),this.current=Mt.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const Lo=new Float32Array(16);function jo(t){return[yo(255*t.r,255*t.g),yo(255*t.b,255*t.a)]}class Mo{constructor(t,e,n){this.value=t,this.uniformNames=e.map((t=>`u_${t}`)),this.type=n}setUniform(t,e,n){t.set(n.constantOr(this.value))}getBinding(t,e,n){return"color"===this.type?new Io(t,e):new To(t,e)}}class Ro{constructor(t,e){this.uniformNames=e.map((t=>`u_${t}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setUniform(t,e,n,r){const i="u_pattern_to"===r?this.patternTo:"u_pattern_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;i&&t.set(i)}getBinding(t,e,n){return"u_pattern"===n.substr(0,9)?new ko(t,e):new To(t,e)}}class No{constructor(t,e,n,r){this.expression=t,this.type=n,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===n?2:1,offset:0}))),this.paintVertexArray=new r}populatePaintArray(t,e,n,r,i){const o=this.paintVertexArray.length,a=this.expression.evaluate(new Qr(0),e,{},r,[],i);this.paintVertexArray.resize(t),this._setPaintValue(o,t,a)}updatePaintArray(t,e,n,r){const i=this.expression.evaluate({zoom:0},n,r);this._setPaintValue(t,e,i)}_setPaintValue(t,e,n){if("color"===this.type){const r=jo(n);for(let n=t;n<e;n++)this.paintVertexArray.emplace(n,r[0],r[1])}else{for(let r=t;r<e;r++)this.paintVertexArray.emplace(r,n);this.maxValue=Math.max(this.maxValue,Math.abs(n))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Do{constructor(t,e,n,r,i,o){this.expression=t,this.uniformNames=e.map((t=>`u_${t}_t`)),this.type=n,this.useIntegerZoom=r,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===n?4:2,offset:0}))),this.paintVertexArray=new o}populatePaintArray(t,e,n,r,i){const o=this.expression.evaluate(new Qr(this.zoom),e,{},r,[],i),a=this.expression.evaluate(new Qr(this.zoom+1),e,{},r,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,o,a)}updatePaintArray(t,e,n,r){const i=this.expression.evaluate({zoom:this.zoom},n,r),o=this.expression.evaluate({zoom:this.zoom+1},n,r);this._setPaintValue(t,e,i,o)}_setPaintValue(t,e,n,r){if("color"===this.type){const i=jo(n),o=jo(r);for(let n=t;n<e;n++)this.paintVertexArray.emplace(n,i[0],i[1],o[0],o[1])}else{for(let i=t;i<e;i++)this.paintVertexArray.emplace(i,n,r);this.maxValue=Math.max(this.maxValue,Math.abs(n),Math.abs(r))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,e){const n=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,r=o(this.expression.interpolationFactor(n,this.zoom,this.zoom+1),0,1);t.set(r)}getBinding(t,e,n){return new To(t,e)}}class Fo{constructor(t,e,n,r,i,o){this.expression=t,this.type=e,this.useIntegerZoom=n,this.zoom=r,this.layerId=o,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i}populatePaintArray(t,e,n){const r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(r,t,e.patterns&&e.patterns[this.layerId],n)}updatePaintArray(t,e,n,r,i){this._setPaintValues(t,e,n.patterns&&n.patterns[this.layerId],i)}_setPaintValues(t,e,n,r){if(!r||!n)return;const{min:i,mid:o,max:a}=n,s=r[i],u=r[o],l=r[a];if(s&&u&&l)for(let c=t;c<e;c++)this.zoomInPaintVertexArray.emplace(c,u.tl[0],u.tl[1],u.br[0],u.br[1],s.tl[0],s.tl[1],s.br[0],s.br[1],u.pixelRatio,s.pixelRatio),this.zoomOutPaintVertexArray.emplace(c,u.tl[0],u.tl[1],u.br[0],u.br[1],l.tl[0],l.tl[1],l.br[0],l.br[1],u.pixelRatio,l.pixelRatio)}upload(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,vo.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,vo.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Bo{constructor(t,e,n){this.binders={},this._buffers=[];const r=[];for(const i in t.paint._values){if(!n(i))continue;const o=t.paint.get(i);if(!(o instanceof ai&&An(o.property.specification)))continue;const a=Uo(i,t.type),s=o.value,u=o.property.specification.type,l=o.property.useIntegerZoom,c=o.property.specification["property-type"],f="cross-faded"===c||"cross-faded-data-driven"===c;if("constant"===s.kind)this.binders[i]=f?new Ro(s.value,a):new Mo(s.value,a,u),r.push(`/u_${i}`);else if("source"===s.kind||f){const n=Go(i,u,"source");this.binders[i]=f?new Fo(s,u,l,e,n,t.id):new No(s,a,u,n),r.push(`/a_${i}`)}else{const t=Go(i,u,"composite");this.binders[i]=new Do(s,a,u,l,e,t),r.push(`/z_${i}`)}}this.cacheKey=r.sort().join("")}getMaxValue(t){const e=this.binders[t];return e instanceof No||e instanceof Do?e.maxValue:0}populatePaintArrays(t,e,n,r,i){for(const o in this.binders){const a=this.binders[o];(a instanceof No||a instanceof Do||a instanceof Fo)&&a.populatePaintArray(t,e,n,r,i)}}setConstantPatternPositions(t,e){for(const n in this.binders){const r=this.binders[n];r instanceof Ro&&r.setConstantPatternPositions(t,e)}}updatePaintArrays(t,e,n,r,i){let o=!1;for(const a in t){const s=e.getPositions(a);for(const e of s){const s=n.feature(e.index);for(const n in this.binders){const u=this.binders[n];if((u instanceof No||u instanceof Do||u instanceof Fo)&&!0===u.expression.isStateDependent){const l=r.paint.get(n);u.expression=l.value,u.updatePaintArray(e.start,e.end,s,t[a],i),o=!0}}}}return o}defines(){const t=[];for(const e in this.binders){const n=this.binders[e];(n instanceof Mo||n instanceof Ro)&&t.push(...n.uniformNames.map((t=>`#define HAS_UNIFORM_${t}`)))}return t}getBinderAttributes(){const t=[];for(const e in this.binders){const n=this.binders[e];if(n instanceof No||n instanceof Do)for(let e=0;e<n.paintVertexAttributes.length;e++)t.push(n.paintVertexAttributes[e].name);else if(n instanceof Fo)for(let e=0;e<vo.members.length;e++)t.push(vo.members[e].name)}return t}getBinderUniforms(){const t=[];for(const e in this.binders){const n=this.binders[e];if(n instanceof Mo||n instanceof Ro||n instanceof Do)for(const e of n.uniformNames)t.push(e)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){const n=[];for(const r in this.binders){const i=this.binders[r];if(i instanceof Mo||i instanceof Ro||i instanceof Do)for(const o of i.uniformNames)if(e[o]){const a=i.getBinding(t,e[o],o);n.push({name:o,property:r,binding:a})}}return n}setUniforms(t,e,n,r){for(const{name:i,property:o,binding:a}of e)this.binders[o].setUniform(a,r,n.get(o),i)}updatePaintBuffers(t){this._buffers=[];for(const e in this.binders){const n=this.binders[e];if(t&&n instanceof Fo){const e=2===t.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;e&&this._buffers.push(e)}else(n instanceof No||n instanceof Do)&&n.paintVertexBuffer&&this._buffers.push(n.paintVertexBuffer)}}upload(t){for(const e in this.binders){const n=this.binders[e];(n instanceof No||n instanceof Do||n instanceof Fo)&&n.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const e=this.binders[t];(e instanceof No||e instanceof Do||e instanceof Fo)&&e.destroy()}}}class zo{constructor(t,e,n=(()=>!0)){this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=new Bo(r,e,n);this.needsUpload=!1,this._featureMap=new Eo,this._bufferOffset=0}populatePaintArrays(t,e,n,r,i,o){for(const a in this.programConfigurations)this.programConfigurations[a].populatePaintArrays(t,e,r,i,o);void 0!==e.id&&this._featureMap.add(e.id,n,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,n,r){for(const i of n)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(t,this._featureMap,e,i,r)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function Uo(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}function Go(t,e,n){const r={color:{source:Oi,composite:Gi},number:{source:Di,composite:Oi}},i=function(t){return{"line-pattern":{source:oo,composite:oo},"fill-pattern":{source:oo,composite:oo},"fill-extrusion-pattern":{source:oo,composite:oo}}[t]}(t);return i&&i[n]||r[e][n]}Pr("ConstantBinder",Mo),Pr("CrossFadedConstantBinder",Ro),Pr("SourceExpressionBinder",No),Pr("CrossFadedCompositeBinder",Fo),Pr("CompositeExpressionBinder",Do),Pr("ProgramConfiguration",Bo,{omit:["_buffers"]}),Pr("ProgramConfigurationSet",zo);var Vo=8192;const qo=Math.pow(2,14)-1,Ho=-qo-1;function Wo(t){const e=Vo/t.extent,n=t.loadGeometry();for(let r=0;r<n.length;r++){const t=n[r];for(let n=0;n<t.length;n++){const r=t[n],i=Math.round(r.x*e),a=Math.round(r.y*e);r.x=o(i,Ho,qo),r.y=o(a,Ho,qo),(i<r.x||i>r.x+1||a<r.y||a>r.y+1)&&d("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return n}function Xo(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Wo(t):[]}}function Yo(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}class Zo{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new to,this.indexArray=new fo,this.segments=new go,this.programConfigurations=new zo(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,n){const r=this.layers[0],i=[];let o=null,a=!1;"circle"===r.type&&(o=r.layout.get("circle-sort-key"),a=!o.isConstant());for(const{feature:s,id:u,index:l,sourceLayerIndex:c}of t){const t=this.layers[0]._featureFilter.needGeometry,e=Xo(s,t);if(!this.layers[0]._featureFilter.filter(new Qr(this.zoom),e,n))continue;const r=a?o.evaluate(e,{},n):void 0,f={id:u,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:t?e.geometry:Wo(s),patterns:{},sortKey:r};i.push(f)}a&&i.sort(((t,e)=>t.sortKey-e.sortKey));for(const s of i){const{geometry:r,index:i,sourceLayerIndex:o}=s,a=t[i].feature;this.addFeature(s,r,i,n),e.featureIndex.insert(a,r,i,o,this.index)}}update(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,mo),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,n,r){for(const i of e)for(const e of i){const n=e.x,r=e.y;if(n<0||n>=Vo||r<0||r>=Vo)continue;const i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),o=i.vertexLength;Yo(this.layoutVertexArray,n,r,-1,-1),Yo(this.layoutVertexArray,n,r,1,-1),Yo(this.layoutVertexArray,n,r,1,1),Yo(this.layoutVertexArray,n,r,-1,1),this.indexArray.emplaceBack(o,o+1,o+2),this.indexArray.emplaceBack(o,o+3,o+2),i.vertexLength+=4,i.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{},r)}}function Ko(t,e){for(let n=0;n<t.length;n++)if(oa(e,t[n]))return!0;for(let n=0;n<e.length;n++)if(oa(t,e[n]))return!0;return!!ta(t,e)}function $o(t,e,n){return!!oa(t,e)||!!na(e,t,n)}function Jo(t,e){if(1===t.length)return ia(e,t[0]);for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.length;e++)if(oa(t,r[e]))return!0}for(let n=0;n<t.length;n++)if(ia(e,t[n]))return!0;for(let n=0;n<e.length;n++)if(ta(t,e[n]))return!0;return!1}function Qo(t,e,n){if(t.length>1){if(ta(t,e))return!0;for(let r=0;r<e.length;r++)if(na(e[r],t,n))return!0}for(let r=0;r<t.length;r++)if(na(t[r],e,n))return!0;return!1}function ta(t,e){if(0===t.length||0===e.length)return!1;for(let n=0;n<t.length-1;n++){const r=t[n],i=t[n+1];for(let t=0;t<e.length-1;t++)if(ea(r,i,e[t],e[t+1]))return!0}return!1}function ea(t,e,n,r){return m(t,n,r)!==m(e,n,r)&&m(t,e,n)!==m(t,e,r)}function na(t,e,n){const r=n*n;if(1===e.length)return t.distSqr(e[0])<r;for(let i=1;i<e.length;i++)if(ra(t,e[i-1],e[i])<r)return!0;return!1}function ra(t,e,n){const r=e.distSqr(n);if(0===r)return t.distSqr(e);const i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;return t.distSqr(i<0?e:i>1?n:n.sub(e)._mult(i)._add(e))}function ia(t,e){let n,r,i,o=!1;for(let a=0;a<t.length;a++){n=t[a];for(let t=0,a=n.length-1;t<n.length;a=t++)r=n[t],i=n[a],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(o=!o)}return o}function oa(t,e){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){const o=t[r],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function aa(t,e,n){const r=n[0],i=n[2];if(t.x<r.x&&e.x<r.x||t.x>i.x&&e.x>i.x||t.y<r.y&&e.y<r.y||t.y>i.y&&e.y>i.y)return!1;const o=m(t,e,n[0]);return o!==m(t,e,n[1])||o!==m(t,e,n[2])||o!==m(t,e,n[3])}function sa(t,e,n){const r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).getMaxValue(t)}function ua(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function la(t,e,n,r,i){if(!e[0]&&!e[1])return t;const o=O.convert(e)._mult(i);"viewport"===n&&o._rotate(-r);const a=[];for(let s=0;s<t.length;s++)a.push(t[s].sub(o));return a}Pr("CircleBucket",Zo,{omit:["layers"]});const ca=new pi({"circle-sort-key":new li(rt.layout_circle["circle-sort-key"])});var fa={paint:new pi({"circle-radius":new li(rt.paint_circle["circle-radius"]),"circle-color":new li(rt.paint_circle["circle-color"]),"circle-blur":new li(rt.paint_circle["circle-blur"]),"circle-opacity":new li(rt.paint_circle["circle-opacity"]),"circle-translate":new ui(rt.paint_circle["circle-translate"]),"circle-translate-anchor":new ui(rt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ui(rt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ui(rt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new li(rt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new li(rt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new li(rt.paint_circle["circle-stroke-opacity"])}),layout:ca},ha=1e-6,pa="undefined"!=typeof Float32Array?Float32Array:Array;function da(){var t=new pa(9);return pa!=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}function ma(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}function ga(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],m=e[12],g=e[13],y=e[14],v=e[15],b=n[0],_=n[1],A=n[2],w=n[3];return t[0]=b*r+_*s+A*f+w*m,t[1]=b*i+_*u+A*h+w*g,t[2]=b*o+_*l+A*p+w*y,t[3]=b*a+_*c+A*d+w*v,t[4]=(b=n[4])*r+(_=n[5])*s+(A=n[6])*f+(w=n[7])*m,t[5]=b*i+_*u+A*h+w*g,t[6]=b*o+_*l+A*p+w*y,t[7]=b*a+_*c+A*d+w*v,t[8]=(b=n[8])*r+(_=n[9])*s+(A=n[10])*f+(w=n[11])*m,t[9]=b*i+_*u+A*h+w*g,t[10]=b*o+_*l+A*p+w*y,t[11]=b*a+_*c+A*d+w*v,t[12]=(b=n[12])*r+(_=n[13])*s+(A=n[14])*f+(w=n[15])*m,t[13]=b*i+_*u+A*h+w*g,t[14]=b*o+_*l+A*p+w*y,t[15]=b*a+_*c+A*d+w*v,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ya,va=ga;function ba(){var t=new pa(3);return pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function _a(t,e,n){var r=new pa(3);return r[0]=t,r[1]=e,r[2]=n,r}function Aa(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function wa(){var t=new pa(4);return pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function xa(t,e){const n=Aa([],[t.x,t.y,0,1],e);return new O(n[0]/n[3],n[1]/n[3])}ba(),ya=new pa(4),pa!=Float32Array&&(ya[0]=0,ya[1]=0,ya[2]=0,ya[3]=0),ba(),_a(1,0,0),_a(0,1,0),wa(),wa(),da(),function(){var t;t=new pa(2),pa!=Float32Array&&(t[0]=0,t[1]=0)}();class Ea extends Zo{}Pr("HeatmapBucket",Ea,{omit:["layers"]});var Oa={paint:new pi({"heatmap-radius":new li(rt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new li(rt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ui(rt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new hi(rt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ui(rt.paint_heatmap["heatmap-opacity"])})};function Sa(t,{width:e,height:n},r,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==e*n*r)throw new RangeError(`mismatched image size. expected: ${i.length} but got: ${e*n*r}`)}else i=new Uint8Array(e*n*r);return t.width=e,t.height=n,t.data=i,t}function Pa(t,{width:e,height:n},r){if(e===t.width&&n===t.height)return;const i=Sa({},{width:e,height:n},r);Ca(t,i,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,n)},r),t.width=e,t.height=n,t.data=i.data}function Ca(t,e,n,r,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");const a=t.data,s=e.data;for(let u=0;u<i.height;u++){const l=((n.y+u)*t.width+n.x)*o,c=((r.y+u)*e.width+r.x)*o;for(let t=0;t<i.width*o;t++)s[c+t]=a[l+t]}return e}class Ta{constructor(t,e){Sa(this,t,1,e)}resize(t){Pa(this,t,1)}clone(){return new Ta({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,n,r,i){Ca(t,e,n,r,i,1)}}class ka{constructor(t,e){Sa(this,t,4,e)}resize(t){Pa(this,t,4)}replace(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new ka({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,n,r,i){Ca(t,e,n,r,i,4)}}function Ia(t){const e={},n=t.resolution||256,r=t.clips?t.clips.length:1,i=t.image||new ka({width:n,height:r}),o=(n,r,o)=>{e[t.evaluationKey]=o;const a=t.expression.evaluate(e);i.data[n+r+0]=Math.floor(255*a.r/a.a),i.data[n+r+1]=Math.floor(255*a.g/a.a),i.data[n+r+2]=Math.floor(255*a.b/a.a),i.data[n+r+3]=Math.floor(255*a.a)};if(t.clips)for(let a=0,s=0;a<r;++a,s+=4*n)for(let e=0,r=0;e<n;e++,r+=4){const i=e/(n-1),{start:u,end:l}=t.clips[a];o(s,r,u*(1-i)+l*i)}else for(let a=0,s=0;a<n;a++,s+=4)o(0,s,a/(n-1));return i}Pr("AlphaImage",Ta),Pr("RGBAImage",ka);var La={paint:new pi({"hillshade-illumination-direction":new ui(rt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ui(rt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ui(rt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ui(rt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ui(rt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ui(rt.paint_hillshade["hillshade-accent-color"])})};const ja=bi([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ma}=ja;var Ra={exports:{}};function Na(t,e,n){n=n||2;var r,i,o,a,s,u,l,c=e&&e.length,f=c?e[0]*n:t.length,h=Da(t,0,f,n,!0),p=[];if(!h||h.next===h.prev)return p;if(c&&(h=function(t,e,n,r){var i,o,a,s=[];for(i=0,o=e.length;i<o;i++)(a=Da(t,e[i]*r,i<o-1?e[i+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),s.push(Ya(a));for(s.sort(qa),i=0;i<s.length;i++)n=Ha(s[i],n);return n}(t,e,h,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var d=n;d<f;d+=n)(s=t[d])<r&&(r=s),(u=t[d+1])<i&&(i=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-r,a-i))?32767/l:0}return Ba(h,p,n,r,i,l,0),p}function Da(t,e,n,r,i){var o,a;if(i===ss(t,e,n,r)>0)for(o=e;o<n;o+=r)a=is(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=is(o,t[o],t[o+1],a);return a&&Ja(a,a.next)&&(os(a),a=a.next),a}function Fa(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Ja(r,r.next)&&0!==$a(r.prev,r,r.next))r=r.next;else{if(os(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ba(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=Xa(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,o);for(var s,u,l=t;t.prev!==t.next;)if(s=t.prev,u=t.next,o?Ua(t,r,i,o):za(t))e.push(s.i/n|0),e.push(t.i/n|0),e.push(u.i/n|0),os(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?Ba(t=Ga(Fa(t),e,n),e,n,r,i,o,2):2===a&&Va(t,e,n,r,i,o):Ba(Fa(t),e,n,r,i,o,1);break}}}function za(t){var e=t.prev,n=t,r=t.next;if($a(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,a=r.x,s=e.y,u=n.y,l=r.y,c=i<o?i<a?i:a:o<a?o:a,f=s<u?s<l?s:l:u<l?u:l,h=i>o?i>a?i:a:o>a?o:a,p=s>u?s>l?s:l:u>l?u:l,d=r.next;d!==e;){if(d.x>=c&&d.x<=h&&d.y>=f&&d.y<=p&&Za(i,s,o,u,a,l,d.x,d.y)&&$a(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Ua(t,e,n,r){var i=t.prev,o=t,a=t.next;if($a(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,l=a.x,c=i.y,f=o.y,h=a.y,p=s<u?s<l?s:l:u<l?u:l,d=c<f?c<h?c:h:f<h?f:h,m=s>u?s>l?s:l:u>l?u:l,g=c>f?c>h?c:h:f>h?f:h,y=Xa(p,d,e,n,r),v=Xa(m,g,e,n,r),b=t.prevZ,_=t.nextZ;b&&b.z>=y&&_&&_.z<=v;){if(b.x>=p&&b.x<=m&&b.y>=d&&b.y<=g&&b!==i&&b!==a&&Za(s,c,u,f,l,h,b.x,b.y)&&$a(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,_.x>=p&&_.x<=m&&_.y>=d&&_.y<=g&&_!==i&&_!==a&&Za(s,c,u,f,l,h,_.x,_.y)&&$a(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;b&&b.z>=y;){if(b.x>=p&&b.x<=m&&b.y>=d&&b.y<=g&&b!==i&&b!==a&&Za(s,c,u,f,l,h,b.x,b.y)&&$a(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;_&&_.z<=v;){if(_.x>=p&&_.x<=m&&_.y>=d&&_.y<=g&&_!==i&&_!==a&&Za(s,c,u,f,l,h,_.x,_.y)&&$a(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function Ga(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Ja(i,o)&&Qa(i,r,r.next,o)&&ns(i,o)&&ns(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),os(r),os(r.next),r=t=o),r=r.next}while(r!==t);return Fa(r)}function Va(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Ka(a,s)){var u=rs(a,s);return a=Fa(a,a.next),u=Fa(u,u.next),Ba(a,e,n,r,i,o,0),void Ba(u,e,n,r,i,o,0)}s=s.next}a=a.next}while(a!==t)}function qa(t,e){return t.x-e.x}function Ha(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===i))return n}r=r.next}while(r!==e);if(!n)return null;var u,l=n,c=n.x,f=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&Za(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),ns(r,t)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&Wa(n,r)))&&(n=r,h=u)),r=r.next}while(r!==l);return n}(t,e);if(!n)return e;var r=rs(n,t);return Fa(r,r.next),Fa(n,n.next)}function Wa(t,e){return $a(t.prev,t,e.prev)<0&&$a(e.next,t,t.next)<0}function Xa(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ya(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function Za(t,e,n,r,i,o,a,s){return(i-a)*(e-s)>=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function Ka(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Qa(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(ns(t,e)&&ns(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&($a(t.prev,t,e.prev)||$a(t,e.prev,e))||Ja(t,e)&&$a(t.prev,t,t.next)>0&&$a(e.prev,e,e.next)>0)}function $a(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Ja(t,e){return t.x===e.x&&t.y===e.y}function Qa(t,e,n,r){var i=es($a(t,e,n)),o=es($a(t,e,r)),a=es($a(n,r,t)),s=es($a(n,r,e));return i!==o&&a!==s||!(0!==i||!ts(t,n,e))||!(0!==o||!ts(t,r,e))||!(0!==a||!ts(n,t,r))||!(0!==s||!ts(n,e,r))}function ts(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function es(t){return t>0?1:t<0?-1:0}function ns(t,e){return $a(t.prev,t,t.next)<0?$a(t,e,t.next)>=0&&$a(t,t.prev,e)>=0:$a(t,e,t.prev)<0||$a(t,t.next,e)<0}function rs(t,e){var n=new as(t.i,t.x,t.y),r=new as(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function is(t,e,n,r){var i=new as(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function os(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function as(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ss(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}function us(t,e,n,r,i){ls(t,e,n||0,r||t.length-1,i||fs)}function ls(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=e-n+1,s=Math.log(o),u=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*u*(o-u)/o)*(a-o/2<0?-1:1);ls(t,e,Math.max(n,Math.floor(e-a*u/o+l)),Math.min(r,Math.floor(e+(o-a)*u/o+l)),i)}var c=t[e],f=n,h=r;for(cs(t,n,e),i(t[r],c)>0&&cs(t,n,r);f<h;){for(cs(t,f,h),f++,h--;i(t[f],c)<0;)f++;for(;i(t[h],c)>0;)h--}0===i(t[n],c)?cs(t,n,h):cs(t,++h,r),h<=e&&(n=h+1),e<=h&&(r=h-1)}}function cs(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function fs(t,e){return t<e?-1:t>e?1:0}function hs(t,e){const n=t.length;if(n<=1)return[t];const r=[];let i,o;for(let a=0;a<n;a++){const e=g(t[a]);0!==e&&(t[a].area=Math.abs(e),void 0===o&&(o=e<0),o===e<0?(i&&r.push(i),i=[t[a]]):i.push(t[a]))}if(i&&r.push(i),e>1)for(let a=0;a<r.length;a++)r[a].length<=e||(us(r[a],e,1,r[a].length-1,ps),r[a]=r[a].slice(0,e));return r}function ps(t,e){return e.area-t.area}function ds(t,e,n){const r=n.patternDependencies;let i=!1;for(const o of e){const e=o.paint.get(`${t}-pattern`);e.isConstant()||(i=!0);const n=e.constantOr(null);n&&(i=!0,r[n.to]=!0,r[n.from]=!0)}return i}function ms(t,e,n,r,i){const o=i.patternDependencies;for(const a of e){const e=a.paint.get(`${t}-pattern`).value;if("constant"!==e.kind){let t=e.evaluate({zoom:r-1},n,{},i.availableImages),s=e.evaluate({zoom:r},n,{},i.availableImages),u=e.evaluate({zoom:r+1},n,{},i.availableImages);t=t&&t.name?t.name:t,s=s&&s.name?s.name:s,u=u&&u.name?u.name:u,o[t]=!0,o[s]=!0,o[u]=!0,n.patterns[a.id]={min:t,mid:s,max:u}}}return n}Ra.exports=Na,Ra.exports.default=Na,Na.deviation=function(t,e,n,r){var i=e&&e.length,o=Math.abs(ss(t,0,i?e[0]*n:t.length,n));if(i)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(ss(t,e[a]*n,a<s-1?e[a+1]*n:t.length,n));var u=0;for(a=0;a<r.length;a+=3){var l=r[a]*n,c=r[a+1]*n,f=r[a+2]*n;u+=Math.abs((t[l]-t[f])*(t[c+1]-t[l+1])-(t[l]-t[c])*(t[f+1]-t[l+1]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},Na.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&n.holes.push(r+=t[i-1].length)}return n};class gs{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new eo,this.indexArray=new fo,this.indexArray2=new ho,this.programConfigurations=new zo(t.layers,t.zoom),this.segments=new go,this.segments2=new go,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,n){this.hasPattern=ds("fill",this.layers,e);const r=this.layers[0].layout.get("fill-sort-key"),i=!r.isConstant(),o=[];for(const{feature:a,id:s,index:u,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=Xo(a,t);if(!this.layers[0]._featureFilter.filter(new Qr(this.zoom),c,n))continue;const f=i?r.evaluate(c,{},n,e.availableImages):void 0,h={id:s,properties:a.properties,type:a.type,sourceLayerIndex:l,index:u,geometry:t?c.geometry:Wo(a),patterns:{},sortKey:f};o.push(h)}i&&o.sort(((t,e)=>t.sortKey-e.sortKey));for(const a of o){const{geometry:r,index:i,sourceLayerIndex:o}=a;if(this.hasPattern){const t=ms("fill",this.layers,a,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(a,r,i,n,{});e.featureIndex.insert(t[i].feature,r,i,o,this.index)}}update(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)}addFeatures(t,e,n){for(const r of this.patternFeatures)this.addFeature(r,r.geometry,r.index,e,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ma),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,n,r,i){for(const o of hs(e,500)){let t=0;for(const s of o)t+=s.length;const e=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),n=e.vertexLength,r=[],i=[];for(const s of o){if(0===s.length)continue;s!==o[0]&&i.push(r.length/2);const t=this.segments2.prepareSegment(s.length,this.layoutVertexArray,this.indexArray2),e=t.vertexLength;this.layoutVertexArray.emplaceBack(s[0].x,s[0].y),this.indexArray2.emplaceBack(e+s.length-1,e),r.push(s[0].x),r.push(s[0].y);for(let n=1;n<s.length;n++)this.layoutVertexArray.emplaceBack(s[n].x,s[n].y),this.indexArray2.emplaceBack(e+n-1,e+n),r.push(s[n].x),r.push(s[n].y);t.vertexLength+=s.length,t.primitiveLength+=s.length}const a=Ra.exports(r,i);for(let o=0;o<a.length;o+=3)this.indexArray.emplaceBack(n+a[o],n+a[o+1],n+a[o+2]);e.vertexLength+=t,e.primitiveLength+=a.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,r)}}Pr("FillBucket",gs,{omit:["layers","patternFeatures"]});const ys=new pi({"fill-sort-key":new li(rt.layout_fill["fill-sort-key"])});var vs={paint:new pi({"fill-antialias":new ui(rt.paint_fill["fill-antialias"]),"fill-opacity":new li(rt.paint_fill["fill-opacity"]),"fill-color":new li(rt.paint_fill["fill-color"]),"fill-outline-color":new li(rt.paint_fill["fill-outline-color"]),"fill-translate":new ui(rt.paint_fill["fill-translate"]),"fill-translate-anchor":new ui(rt.paint_fill["fill-translate-anchor"]),"fill-pattern":new ci(rt.paint_fill["fill-pattern"])}),layout:ys};const bs=bi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),_s=bi([{name:"a_centroid",components:2,type:"Int16"}],4),{members:As}=bs;var ws={},xs=O,Es=Os;function Os(t,e,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=i,t.readFields(Ss,this,e)}function Ss(t,e,n){1==t?e.id=n.readVarint():2==t?function(t,e){for(var n=t.readVarint()+t.pos;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}(n,e):3==t?e.type=n.readVarint():4==t&&(e._geometry=n.pos)}function Ps(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i<o;a=i++)r+=((n=t[a]).x-(e=t[i]).x)*(e.y+n.y);return r}Os.types=["Unknown","Point","LineString","Polygon"],Os.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,r=1,i=0,o=0,a=0,s=[];t.pos<n;){if(i<=0){var u=t.readVarint();r=7&u,i=u>>3}if(i--,1===r||2===r)o+=t.readSVarint(),a+=t.readSVarint(),1===r&&(e&&s.push(e),e=[]),e.push(new xs(o,a));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&s.push(e),s},Os.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,u,s,l]},Os.prototype.toGeoJSON=function(t,e,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*t,s=this.extent*e,u=this.loadGeometry(),l=Os.types[this.type];function c(t){for(var e=0;e<t.length;e++){var n=t[e];t[e]=[360*(n.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(n.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(r=0;r<u.length;r++)f[r]=u[r][0];c(u=f);break;case 2:for(r=0;r<u.length;r++)c(u[r]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var n,r,i=[],o=0;o<e;o++){var a=Ps(t[o]);0!==a&&(void 0===r&&(r=a<0),r===a<0?(n&&i.push(n),n=[t[o]]):n.push(t[o]))}return n&&i.push(n),i}(u),r=0;r<u.length;r++)for(i=0;i<u[r].length;i++)c(u[r][i])}1===u.length?u=u[0]:l="Multi"+l;var h={type:"Feature",geometry:{type:l,coordinates:u},properties:this.properties};return"id"in this&&(h.id=this.id),h};var Cs=Es,Ts=ks;function ks(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Is,this,e),this.length=this._features.length}function Is(t,e,n){15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){for(var e=null,n=t.readVarint()+t.pos;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n))}ks.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Cs(this._pbf,e,this.extent,this._keys,this._values)};var Ls=Ts;function js(t,e,n){if(3===t){var r=new Ls(n,n.readVarint()+n.pos);r.length&&(e[r.name]=r)}}ws.VectorTile=function(t,e){this.layers=t.readFields(js,{},e)},ws.VectorTileFeature=Es,ws.VectorTileLayer=Ts;const Ms=ws.VectorTileFeature.types,Rs=Math.pow(2,13);function Ns(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,2*Math.floor(r*Rs)+a,i*Rs*2,o*Rs*2,Math.round(s))}class Ds{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new no,this.centroidVertexArray=new Qi,this.indexArray=new fo,this.programConfigurations=new zo(t.layers,t.zoom),this.segments=new go,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,n){this.features=[],this.hasPattern=ds("fill-extrusion",this.layers,e);for(const{feature:r,id:i,index:o,sourceLayerIndex:a}of t){const t=this.layers[0]._featureFilter.needGeometry,s=Xo(r,t);if(!this.layers[0]._featureFilter.filter(new Qr(this.zoom),s,n))continue;const u={id:i,sourceLayerIndex:a,index:o,geometry:t?s.geometry:Wo(r),properties:r.properties,type:r.type,patterns:{}};this.hasPattern?this.features.push(ms("fill-extrusion",this.layers,u,this.zoom,e)):this.addFeature(u,u.geometry,o,n,{}),e.featureIndex.insert(r,u.geometry,o,a,this.index,!0)}}addFeatures(t,e,n){for(const r of this.features){const{geometry:t}=r;this.addFeature(r,t,r.index,e,n)}}update(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,As),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,_s.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,n,r,i){const o={x:0,y:0,vertexCount:0};for(const a of hs(e,500)){let e=0;for(const t of a)e+=t.length;let n=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const t of a){if(0===t.length)continue;if(Bs(t))continue;let e=0;for(let r=0;r<t.length;r++){const i=t[r];if(r>=1){const a=t[r-1];if(!Fs(i,a)){n.vertexLength+4>go.MAX_VERTEX_ARRAY_LENGTH&&(n=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const t=i.sub(a)._perp()._unit(),r=a.dist(i);e+r>32768&&(e=0),Ns(this.layoutVertexArray,i.x,i.y,t.x,t.y,0,0,e),Ns(this.layoutVertexArray,i.x,i.y,t.x,t.y,0,1,e),o.x+=2*i.x,o.y+=2*i.y,o.vertexCount+=2,e+=r,Ns(this.layoutVertexArray,a.x,a.y,t.x,t.y,0,0,e),Ns(this.layoutVertexArray,a.x,a.y,t.x,t.y,0,1,e),o.x+=2*a.x,o.y+=2*a.y,o.vertexCount+=2;const s=n.vertexLength;this.indexArray.emplaceBack(s,s+2,s+1),this.indexArray.emplaceBack(s+1,s+2,s+3),n.vertexLength+=4,n.primitiveLength+=2}}}}if(n.vertexLength+e>go.MAX_VERTEX_ARRAY_LENGTH&&(n=this.segments.prepareSegment(e,this.layoutVertexArray,this.indexArray)),"Polygon"!==Ms[t.type])continue;const r=[],i=[],s=n.vertexLength;for(const t of a)if(0!==t.length){t!==a[0]&&i.push(r.length/2);for(let e=0;e<t.length;e++){const n=t[e];Ns(this.layoutVertexArray,n.x,n.y,0,0,1,1,0),o.x+=n.x,o.y+=n.y,o.vertexCount+=1,r.push(n.x),r.push(n.y)}}const u=Ra.exports(r,i);for(let t=0;t<u.length;t+=3)this.indexArray.emplaceBack(s+u[t],s+u[t+2],s+u[t+1]);n.primitiveLength+=u.length/3,n.vertexLength+=e}for(let a=0;a<o.vertexCount;a++)this.centroidVertexArray.emplaceBack(Math.floor(o.x/o.vertexCount),Math.floor(o.y/o.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,r)}}function Fs(t,e){return t.x===e.x&&(t.x<0||t.x>Vo)||t.y===e.y&&(t.y<0||t.y>Vo)}function Bs(t){return t.every((t=>t.x<0))||t.every((t=>t.x>Vo))||t.every((t=>t.y<0))||t.every((t=>t.y>Vo))}Pr("FillExtrusionBucket",Ds,{omit:["layers","features"]});var zs={paint:new pi({"fill-extrusion-opacity":new ui(rt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new li(rt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ui(rt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ui(rt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ci(rt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new li(rt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new li(rt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ui(rt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function Us(t,e){return t.x*e.x+t.y*e.y}function Gs(t,e){if(1===t.length){let n=0;const r=e[n++];let i;for(;!i||r.equals(i);)if(i=e[n++],!i)return 1/0;for(;n<e.length;n++){const o=e[n],a=t[0],s=i.sub(r),u=o.sub(r),l=a.sub(r),c=Us(s,s),f=Us(s,u),h=Us(u,u),p=Us(l,s),d=Us(l,u),m=c*h-f*f,g=(h*p-f*d)/m,y=(c*d-f*p)/m,v=r.z*(1-g-y)+i.z*g+o.z*y;if(isFinite(v))return v}return 1/0}{let t=1/0;for(const n of e)t=Math.min(t,n.z);return t}}const Vs=bi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:qs}=Vs,Hs=bi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:Ws}=Hs,Xs=ws.VectorTileFeature.types,Ys=Math.cos(Math.PI/180*37.5),Zs=Math.pow(2,14)/.5;class Ks{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((t=>{this.gradients[t.id]={}})),this.layoutVertexArray=new ro,this.layoutVertexArray2=new io,this.indexArray=new fo,this.programConfigurations=new zo(t.layers,t.zoom),this.segments=new go,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,n){this.hasPattern=ds("line",this.layers,e);const r=this.layers[0].layout.get("line-sort-key"),i=!r.isConstant(),o=[];for(const{feature:a,id:s,index:u,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,e=Xo(a,t);if(!this.layers[0]._featureFilter.filter(new Qr(this.zoom),e,n))continue;const c=i?r.evaluate(e,{},n):void 0,f={id:s,properties:a.properties,type:a.type,sourceLayerIndex:l,index:u,geometry:t?e.geometry:Wo(a),patterns:{},sortKey:c};o.push(f)}i&&o.sort(((t,e)=>t.sortKey-e.sortKey));for(const a of o){const{geometry:r,index:i,sourceLayerIndex:o}=a;if(this.hasPattern){const t=ms("line",this.layers,a,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(a,r,i,n,{});e.featureIndex.insert(t[i].feature,r,i,o,this.index)}}update(t,e,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,n)}addFeatures(t,e,n){for(const r of this.patternFeatures)this.addFeature(r,r.geometry,r.index,e,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,Ws)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,qs),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,e,n,r,i){const o=this.layers[0].layout,a=o.get("line-join").evaluate(t,{}),s=o.get("line-cap"),u=o.get("line-miter-limit"),l=o.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const c of e)this.addLine(c,t,a,s,u,l);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,i,r)}addLine(t,e,n,r,i,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e<t.length-1;e++)this.totalDistance+=t[e].dist(t[e+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const a="Polygon"===Xs[e.type];let s=t.length;for(;s>=2&&t[s-1].equals(t[s-2]);)s--;let u=0;for(;u<s-1&&t[u].equals(t[u+1]);)u++;if(s<(a?3:2))return;"bevel"===n&&(i=1.05);const l=this.overscaling<=16?122880/(512*this.overscaling):0,c=this.segments.prepareSegment(10*s,this.layoutVertexArray,this.indexArray);let f,h,p,d,m;this.e1=this.e2=-1,a&&(f=t[s-2],m=t[u].sub(f)._unit()._perp());for(let g=u;g<s;g++){if(p=g===s-1?a?t[u+1]:void 0:t[g+1],p&&t[g].equals(p))continue;m&&(d=m),f&&(h=f),f=t[g],m=p?p.sub(f)._unit()._perp():d,d=d||m;let e=d.add(m);0===e.x&&0===e.y||e._unit();const y=d.x*m.x+d.y*m.y,v=e.x*m.x+e.y*m.y,b=0!==v?1/v:1/0,_=2*Math.sqrt(2-2*v),A=v<Ys&&h&&p,w=d.x*m.y-d.y*m.x>0;if(A&&g>u){const t=f.dist(h);if(t>2*l){const e=f.sub(f.sub(h)._mult(l/t)._round());this.updateDistance(h,e),this.addCurrentVertex(e,d,0,0,c),h=e}}const x=h&&p;let E=x?n:a?"butt":r;if(x&&"round"===E&&(b<o?E="miter":b<=2&&(E="fakeround")),"miter"===E&&b>i&&(E="bevel"),"bevel"===E&&(b>2&&(E="flipbevel"),b<i&&(E="miter")),h&&this.updateDistance(h,f),"miter"===E)e._mult(b),this.addCurrentVertex(f,e,0,0,c);else if("flipbevel"===E){if(b>100)e=m.mult(-1);else{const t=b*d.add(m).mag()/d.sub(m).mag();e._perp()._mult(t*(w?-1:1))}this.addCurrentVertex(f,e,0,0,c),this.addCurrentVertex(f,e.mult(-1),0,0,c)}else if("bevel"===E||"fakeround"===E){const t=-Math.sqrt(b*b-1),e=w?t:0,n=w?0:t;if(h&&this.addCurrentVertex(f,d,e,n,c),"fakeround"===E){const t=Math.round(180*_/Math.PI/20);for(let e=1;e<t;e++){let n=e/t;if(.5!==n){const t=n-.5;n+=n*t*(n-1)*((1.0904+y*(y*(3.55645-1.43519*y)-3.2452))*t*t+(.848013+y*(.215638*y-1.06021)))}const r=m.sub(d)._mult(n)._add(d)._unit()._mult(w?-1:1);this.addHalfVertex(f,r.x,r.y,!1,w,0,c)}}p&&this.addCurrentVertex(f,m,-e,-n,c)}else if("butt"===E)this.addCurrentVertex(f,e,0,0,c);else if("square"===E){const t=h?1:-1;this.addCurrentVertex(f,e,t,t,c)}else"round"===E&&(h&&(this.addCurrentVertex(f,d,0,0,c),this.addCurrentVertex(f,d,1,1,c,!0)),p&&(this.addCurrentVertex(f,m,-1,-1,c,!0),this.addCurrentVertex(f,m,0,0,c)));if(A&&g<s-1){const t=f.dist(p);if(t>2*l){const e=f.add(p.sub(f)._mult(l/t)._round());this.updateDistance(f,e),this.addCurrentVertex(e,m,0,0,c),f=e}}}}addCurrentVertex(t,e,n,r,i,o=!1){const a=e.y*r-e.x,s=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*n,e.y-e.x*n,o,!1,n,i),this.addHalfVertex(t,a,s,o,!0,-r,i),this.distance>Zs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,n,r,i,o))}addHalfVertex({x:t,y:e},n,r,i,o,a,s){const u=.5*(this.lineClips?this.scaledDistance*(Zs-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(i?1:0),(e<<1)+(o?1:0),Math.round(63*n)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&u)<<2,u>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const l=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),s.primitiveLength++),o?this.e2=l:this.e1=l}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}}Pr("LineBucket",Ks,{omit:["layers","patternFeatures"]});const $s=new pi({"line-cap":new ui(rt.layout_line["line-cap"]),"line-join":new li(rt.layout_line["line-join"]),"line-miter-limit":new ui(rt.layout_line["line-miter-limit"]),"line-round-limit":new ui(rt.layout_line["line-round-limit"]),"line-sort-key":new li(rt.layout_line["line-sort-key"])});var Js={paint:new pi({"line-opacity":new li(rt.paint_line["line-opacity"]),"line-color":new li(rt.paint_line["line-color"]),"line-translate":new ui(rt.paint_line["line-translate"]),"line-translate-anchor":new ui(rt.paint_line["line-translate-anchor"]),"line-width":new li(rt.paint_line["line-width"]),"line-gap-width":new li(rt.paint_line["line-gap-width"]),"line-offset":new li(rt.paint_line["line-offset"]),"line-blur":new li(rt.paint_line["line-blur"]),"line-dasharray":new fi(rt.paint_line["line-dasharray"]),"line-pattern":new ci(rt.paint_line["line-pattern"]),"line-gradient":new hi(rt.paint_line["line-gradient"])}),layout:$s};const Qs=new class extends li{possiblyEvaluate(t,e){return e=new Qr(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,n,r){return e=s({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,n,r)}}(Js.paint.properties["line-width"].specification);function tu(t,e){return e>0?e+2*t:t}Qs.useIntegerZoom=!0;const eu=bi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),nu=bi([{name:"a_projected_pos",components:3,type:"Float32"}],4);bi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const ru=bi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);bi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const iu=bi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),ou=bi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function au(t,e,n){return t.sections.forEach((t=>{t.text=function(t,e,n){const r=e.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),Jr.applyArabicShaping&&(t=Jr.applyArabicShaping(t)),t}(t.text,e,n)})),t}bi([{name:"triangle",components:3,type:"Uint16"}]),bi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),bi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),bi([{type:"Float32",name:"offsetX"}]),bi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const su={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};var uu=24,lu=hu,cu=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},fu=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*m};function hu(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}hu.Varint=0,hu.Fixed64=1,hu.Bytes=2,hu.Fixed32=5;var pu,du=4294967296,mu=1/du,gu="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function yu(t){return t.type===hu.Bytes?t.readVarint()+t.pos:t.pos+1}function vu(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function bu(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function _u(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function Au(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function wu(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function xu(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function Eu(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function Ou(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function Su(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function Pu(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function Cu(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function Tu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function ku(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function Iu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Lu(t,e,n){1===t&&n.readMessage(ju,e)}function ju(t,e,n){if(3===t){const{id:t,bitmap:r,width:i,height:o,left:a,top:s,advance:u}=n.readMessage(Mu,{});e.push({id:t,bitmap:new Ta({width:i+6,height:o+6},r),metrics:{width:i,height:o,left:a,top:s,advance:u}})}}function Mu(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}function Ru(t){let e=0,n=0;for(const a of t)e+=a.w*a.h,n=Math.max(n,a.w);t.sort(((t,e)=>e.h-t.h));const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),n),h:1/0}];let i=0,o=0;for(const a of t)for(let t=r.length-1;t>=0;t--){const e=r[t];if(!(a.w>e.w||a.h>e.h)){if(a.x=e.x,a.y=e.y,o=Math.max(o,a.y+a.h),i=Math.max(i,a.x+a.w),a.w===e.w&&a.h===e.h){const e=r.pop();t<r.length&&(r[t]=e)}else a.h===e.h?(e.x+=a.w,e.w-=a.w):a.w===e.w?(e.y+=a.h,e.h-=a.h):(r.push({x:e.x+a.w,y:e.y,w:e.w-a.w,h:a.h}),e.y+=a.h,e.h-=a.h);break}}return{w:i,h:o,fill:e/(i*o)||0}}hu.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Tu(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Iu(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Tu(this.buf,this.pos)+Tu(this.buf,this.pos+4)*du;return this.pos+=8,t},readSFixed64:function(){var t=Tu(this.buf,this.pos)+Iu(this.buf,this.pos+4)*du;return this.pos+=8,t},readFloat:function(){var t=cu(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=cu(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return vu(t,r,e);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return vu(t,r,e);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return vu(t,r,e);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return vu(t,r,e);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return vu(t,r,e);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return vu(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&gu?function(t,e,n){return gu.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var r="",i=e;i<n;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(a=t[i+2],128==(192&(o=t[i+1]))&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=t[i+2],s=t[i+3],128==(192&(o=t[i+1]))&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==hu.Bytes)return t.push(this.readVarint(e));var n=yu(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==hu.Bytes)return t.push(this.readSVarint());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==hu.Bytes)return t.push(this.readBoolean());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==hu.Bytes)return t.push(this.readFloat());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==hu.Bytes)return t.push(this.readDouble());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==hu.Bytes)return t.push(this.readFixed32());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==hu.Bytes)return t.push(this.readSFixed32());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==hu.Bytes)return t.push(this.readFixed64());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==hu.Bytes)return t.push(this.readSFixed64());var e=yu(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===hu.Varint)for(;this.buf[this.pos++]>127;);else if(e===hu.Bytes)this.pos=this.readVarint()+this.pos;else if(e===hu.Fixed32)this.pos+=4;else{if(e!==hu.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),ku(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),ku(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),ku(this.buf,-1&t,this.pos),ku(this.buf,Math.floor(t*mu),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),ku(this.buf,-1&t,this.pos),ku(this.buf,Math.floor(t*mu),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,n.buf[n.pos]=127&(t>>>=7)}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&bu(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),fu(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),fu(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&bu(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,hu.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,_u,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Au,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Eu,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,wu,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,xu,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Ou,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Su,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Pu,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Cu,e)},writeBytesField:function(t,e){this.writeTag(t,hu.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,hu.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,hu.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,hu.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,hu.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,hu.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,hu.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,hu.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,hu.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,hu.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};class Nu{constructor(t,{pixelRatio:e,version:n,stretchX:r,stretchY:i,content:o}){this.paddedRect=t,this.pixelRatio=e,this.stretchX=r,this.stretchY=i,this.content=o,this.version=n}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class Du{constructor(t,e){const n={},r={};this.haveRenderCallbacks=[];const i=[];this.addImages(t,n,i),this.addImages(e,r,i);const{w:o,h:a}=Ru(i),s=new ka({width:o||1,height:a||1});for(const u in t){const e=t[u],r=n[u].paddedRect;ka.copy(e.data,s,{x:0,y:0},{x:r.x+1,y:r.y+1},e.data)}for(const u in e){const t=e[u],n=r[u].paddedRect,i=n.x+1,o=n.y+1,a=t.data.width,l=t.data.height;ka.copy(t.data,s,{x:0,y:0},{x:i,y:o},t.data),ka.copy(t.data,s,{x:0,y:l-1},{x:i,y:o-1},{width:a,height:1}),ka.copy(t.data,s,{x:0,y:0},{x:i,y:o+l},{width:a,height:1}),ka.copy(t.data,s,{x:a-1,y:0},{x:i-1,y:o},{width:1,height:l}),ka.copy(t.data,s,{x:0,y:0},{x:i+a,y:o},{width:1,height:l})}this.image=s,this.iconPositions=n,this.patternPositions=r}addImages(t,e,n){for(const r in t){const i=t[r],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};n.push(o),e[r]=new Nu(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(r)}}patchUpdatedImages(t,e){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const n in t.updatedImages)this.patchUpdatedImage(this.iconPositions[n],t.getImage(n),e),this.patchUpdatedImage(this.patternPositions[n],t.getImage(n),e)}patchUpdatedImage(t,e,n){if(!t||!e)return;if(t.version===e.version)return;t.version=e.version;const[r,i]=t.tl;n.update(e.data,void 0,{x:r,y:i})}}Pr("ImagePosition",Nu),Pr("ImageAtlas",Du),t.WritingMode=void 0,(pu=t.WritingMode||(t.WritingMode={}))[pu.none=0]="none",pu[pu.horizontal=1]="horizontal",pu[pu.vertical=2]="vertical",pu[pu.horizontalOnly=3]="horizontalOnly";const Fu=-17;class Bu{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(t,e){const n=new Bu;return n.scale=t||1,n.fontStack=e,n}static forImage(t){const e=new Bu;return e.imageName=t,e}}class zu{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,e){const n=new zu;for(let r=0;r<t.sections.length;r++){const i=t.sections[r];i.image?n.addImageSection(i):n.addTextSection(i,e)}return n}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}getCharCode(t){return this.text.charCodeAt(t)}verticalizePunctuation(){this.text=function(t){let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n+1)||null,i=t.charCodeAt(n-1)||null;e+=r&&Dr(r)&&!su[t[n+1]]||i&&Dr(i)&&!su[t[n-1]]||!su[t[n]]?t[n]:su[t[n]]}return e}(this.text)}trim(){let t=0;for(let n=0;n<this.text.length&&Gu[this.text.charCodeAt(n)];n++)t++;let e=this.text.length;for(let n=this.text.length-1;n>=0&&n>=t&&Gu[this.text.charCodeAt(n)];n--)e--;this.text=this.text.substring(t,e),this.sectionIndex=this.sectionIndex.slice(t,e)}substring(t,e){const n=new zu;return n.text=this.text.substring(t,e),n.sectionIndex=this.sectionIndex.slice(t,e),n.sections=this.sections,n}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,e)=>Math.max(t,this.sections[e].scale)),0)}addTextSection(t,e){this.text+=t.text,this.sections.push(Bu.forText(t.scale,t.fontStack||e));const n=this.sections.length-1;for(let r=0;r<t.text.length;++r)this.sectionIndex.push(n)}addImageSection(t){const e=t.image?t.image.name:"";if(0===e.length)return void d("Can't add FormattedSection with an empty image.");const n=this.getNextImageSectionCharCode();n?(this.text+=String.fromCharCode(n),this.sections.push(Bu.forImage(e)),this.sectionIndex.push(this.sections.length-1)):d("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Uu(e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g){const y=zu.fromFeature(e,o);let v;h===t.WritingMode.vertical&&y.verticalizePunctuation();const{processBidirectionalText:b,processStyledBidirectionalText:_}=Jr;if(b&&1===y.sections.length){v=[];const t=b(y.toString(),Zu(y,c,a,n,i,d,m));for(const e of t){const t=new zu;t.text=e,t.sections=y.sections;for(let n=0;n<e.length;n++)t.sectionIndex.push(0);v.push(t)}}else if(_){v=[];const t=_(y.text,y.sectionIndex,Zu(y,c,a,n,i,d,m));for(const e of t){const t=new zu;t.text=e[0],t.sectionIndex=e[1],t.sections=y.sections,v.push(t)}}else v=function(t,e){const n=[],r=t.text;let i=0;for(const o of e)n.push(t.substring(i,o)),i=o;return i<r.length&&n.push(t.substring(i,r.length)),n}(y,Zu(y,c,a,n,i,d,m));const A=[],w={positionedLines:A,text:y.toString(),top:f[1],bottom:f[1],left:f[0],right:f[0],writingMode:h,iconsInText:!1,verticalizable:!1};return function(e,n,r,i,o,a,s,u,l,c,f,h){let p=0,d=Fu,m=0,g=0;const y="right"===u?1:"left"===u?0:.5;let v=0;for(const x of o){x.trim();const o=x.getMaxScale(),s=(o-1)*uu,u={positionedGlyphs:[],lineOffset:0};e.positionedLines[v]=u;const _=u.positionedGlyphs;let A=0;if(!x.length()){d+=a,++v;continue}for(let a=0;a<x.length();a++){const u=x.getSection(a),m=x.getSectionIndex(a),g=x.getCharCode(a);let y=0,v=null,w=null,E=null,O=uu;const S=!(l===t.WritingMode.horizontal||!f&&!Nr(g)||f&&(Gu[g]||(b=g,Lr.Arabic(b)||Lr["Arabic Supplement"](b)||Lr["Arabic Extended-A"](b)||Lr["Arabic Presentation Forms-A"](b)||Lr["Arabic Presentation Forms-B"](b))));if(u.imageName){const t=i[u.imageName];if(!t)continue;E=u.imageName,e.iconsInText=e.iconsInText||!0,w=t.paddedRect;const n=t.displaySize;u.scale=u.scale*uu/h,v={width:n[0],height:n[1],left:1,top:-3,advance:S?n[1]:n[0]},y=s+(uu-n[1]*u.scale),O=v.advance;const r=S?n[0]*u.scale-uu*o:n[1]*u.scale-uu*o;r>0&&r>A&&(A=r)}else{const t=r[u.fontStack],e=t&&t[g];if(e&&e.rect)w=e.rect,v=e.metrics;else{const t=n[u.fontStack],e=t&&t[g];if(!e)continue;v=e.metrics}y=(o-u.scale)*uu}S?(e.verticalizable=!0,_.push({glyph:g,imageName:E,x:p,y:d+y,vertical:S,scale:u.scale,fontStack:u.fontStack,sectionIndex:m,metrics:v,rect:w}),p+=O*u.scale+c):(_.push({glyph:g,imageName:E,x:p,y:d+y,vertical:S,scale:u.scale,fontStack:u.fontStack,sectionIndex:m,metrics:v,rect:w}),p+=v.advance*u.scale+c)}0!==_.length&&(m=Math.max(p-c,m),$u(_,0,_.length-1,y,A)),p=0;const w=a*o+A;u.lineOffset=Math.max(A,s),d+=w,g=Math.max(w,g),++v}var b;const _=d-Fu,{horizontalAlign:A,verticalAlign:w}=Ku(s);(function(t,e,n,r,i,o,a,s,u){const l=(e-n)*i;let c=0;c=o!==a?-s*r-Fu:(-r*u+.5)*a;for(const f of t)for(const t of f.positionedGlyphs)t.x+=l,t.y+=c})(e.positionedLines,y,A,w,m,g,a,_,o.length),e.top+=-w*_,e.bottom=e.top+_,e.left+=-A*m,e.right=e.left+m}(w,n,r,i,v,s,u,l,h,c,p,g),!function(t){for(const e of t)if(0!==e.positionedGlyphs.length)return!1;return!0}(A)&&w}const Gu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Vu={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function qu(t,e,n,r,i,o){if(e.imageName){const t=r[e.imageName];return t?t.displaySize[0]*e.scale*uu/o+i:0}{const r=n[e.fontStack],o=r&&r[t];return o?o.metrics.advance*e.scale+i:0}}function Hu(t,e,n,r){const i=Math.pow(t-e,2);return r?t<e?i/2:2*i:i+Math.abs(n)*n}function Wu(t,e,n){let r=0;return 10===t&&(r-=1e4),n&&(r+=150),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Xu(t,e,n,r,i,o){let a=null,s=Hu(e,n,i,o);for(const u of r){const t=Hu(e-u.x,n,i,o)+u.badness;t<=s&&(a=u,s=t)}return{index:t,x:e,priorBreak:a,badness:s}}function Yu(t){return t?Yu(t.priorBreak).concat(t.index):[]}function Zu(t,e,n,r,i,o,a){if("point"!==o)return[];if(!t)return[];const s=[],u=function(t,e,n,r,i,o){let a=0;for(let s=0;s<t.length();s++){const n=t.getSection(s);a+=qu(t.getCharCode(s),n,r,i,e,o)}return a/Math.max(1,Math.ceil(a/n))}(t,e,n,r,i,a),l=t.text.indexOf("\u200b")>=0;let c=0;for(let h=0;h<t.length();h++){const n=t.getSection(h),o=t.getCharCode(h);if(Gu[o]||(c+=qu(o,n,r,i,e,a)),h<t.length()-1){const e=!((f=o)<11904||!(Lr["Bopomofo Extended"](f)||Lr.Bopomofo(f)||Lr["CJK Compatibility Forms"](f)||Lr["CJK Compatibility Ideographs"](f)||Lr["CJK Compatibility"](f)||Lr["CJK Radicals Supplement"](f)||Lr["CJK Strokes"](f)||Lr["CJK Symbols and Punctuation"](f)||Lr["CJK Unified Ideographs Extension A"](f)||Lr["CJK Unified Ideographs"](f)||Lr["Enclosed CJK Letters and Months"](f)||Lr["Halfwidth and Fullwidth Forms"](f)||Lr.Hiragana(f)||Lr["Ideographic Description Characters"](f)||Lr["Kangxi Radicals"](f)||Lr["Katakana Phonetic Extensions"](f)||Lr.Katakana(f)||Lr["Vertical Forms"](f)||Lr["Yi Radicals"](f)||Lr["Yi Syllables"](f)));(Vu[o]||e||n.imageName)&&s.push(Xu(h+1,c,u,s,Wu(o,t.getCharCode(h+1),e&&l),!1))}}var f;return Yu(Xu(t.length(),c,u,s,0,!0))}function Ku(t){let e=.5,n=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:e,verticalAlign:n}}function $u(t,e,n,r,i){if(!r&&!i)return;const o=t[n],a=(t[n].x+o.metrics.advance*o.scale)*r;for(let s=e;s<=n;s++)t[s].x-=a,t[s].y+=i}function Ju(t,e,n){const{horizontalAlign:r,verticalAlign:i}=Ku(n),o=e[0]-t.displaySize[0]*r,a=e[1]-t.displaySize[1]*i;return{image:t,top:a,bottom:a+t.displaySize[1],left:o,right:o+t.displaySize[0]}}function Qu(t,e,n,r,i,o){const a=t.image;let s;if(a.content){const t=a.content,e=a.pixelRatio||1;s=[t[0]/e,t[1]/e,a.displaySize[0]-t[2]/e,a.displaySize[1]-t[3]/e]}const u=e.left*o,l=e.right*o;let c,f,h,p;"width"===n||"both"===n?(p=i[0]+u-r[3],f=i[0]+l+r[1]):(p=i[0]+(u+l-a.displaySize[0])/2,f=p+a.displaySize[0]);const d=e.top*o,m=e.bottom*o;return"height"===n||"both"===n?(c=i[1]+d-r[0],h=i[1]+m+r[2]):(c=i[1]+(d+m-a.displaySize[1])/2,h=c+a.displaySize[1]),{image:a,top:c,right:f,bottom:h,left:p,collisionPadding:s}}const tl=128;function el(t,e){const{expression:n}=e;if("constant"===n.kind)return{kind:"constant",layoutSize:n.evaluate(new Qr(t+1))};if("source"===n.kind)return{kind:"source"};{const{zoomStops:e,interpolationType:r}=n;let i=0;for(;i<e.length&&e[i]<=t;)i++;i=Math.max(0,i-1);let o=i;for(;o<e.length&&e[o]<t+1;)o++;o=Math.min(e.length-1,o);const a=e[i],s=e[o];return"composite"===n.kind?{kind:"composite",minZoom:a,maxZoom:s,interpolationType:r}:{kind:"camera",minZoom:a,maxZoom:s,minSize:n.evaluate(new Qr(a)),maxSize:n.evaluate(new Qr(s)),interpolationType:r}}}class nl extends O{constructor(t,e,n,r){super(t,e),this.angle=n,void 0!==r&&(this.segment=r)}clone(){return new nl(this.x,this.y,this.angle,this.segment)}}function rl(t,e,n,r,i){if(void 0===e.segment)return!0;let o=e,a=e.segment+1,s=0;for(;s>-n/2;){if(a--,a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;const u=[];let l=0;for(;s<n/2;){const e=t[a],n=t[a+1];if(!n)return!1;let o=t[a-1].angleTo(e)-e.angleTo(n);for(o=Math.abs((o+3*Math.PI)%(2*Math.PI)-Math.PI),u.push({distance:s,angleDelta:o}),l+=o;s-u[0].distance>r;)l-=u.shift().angleDelta;if(l>i)return!1;a++,s+=e.dist(n)}return!0}function il(t){let e=0;for(let n=0;n<t.length-1;n++)e+=t[n].dist(t[n+1]);return e}function ol(t,e,n){return t?.6*e*n:0}function al(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function sl(t,e,n,r,i,o){const a=ol(n,i,o),s=al(n,r)*o;let u=0;const l=il(t)/2;for(let c=0;c<t.length-1;c++){const n=t[c],r=t[c+1],i=n.dist(r);if(u+i>l){const o=(l-u)/i,f=Oe(n.x,r.x,o),h=Oe(n.y,r.y,o),p=new nl(f,h,r.angleTo(n),c);return p._round(),!a||rl(t,p,s,a,e)?p:void 0}u+=i}}function ul(t,e,n,r,i,o,a,s,u){const l=ol(r,o,a),c=al(r,i),f=c*a,h=0===t[0].x||t[0].x===u||0===t[0].y||t[0].y===u;return e-f<e/4&&(e=f+e/4),ll(t,h?e/2*s%e:(c/2+2*o)*a*s%e,e,l,n,f,h,!1,u)}function ll(t,e,n,r,i,o,a,s,u){const l=o/2,c=il(t);let f=0,h=e-n,p=[];for(let d=0;d<t.length-1;d++){const e=t[d],a=t[d+1],s=e.dist(a),m=a.angleTo(e);for(;h+n<f+s;){h+=n;const g=(h-f)/s,y=Oe(e.x,a.x,g),v=Oe(e.y,a.y,g);if(y>=0&&y<u&&v>=0&&v<u&&h-l>=0&&h+l<=c){const e=new nl(y,v,m,d);e._round(),r&&!rl(t,e,o,r,i)||p.push(e)}}f+=s}return s||p.length||a||(p=ll(t,f/2,n,r,i,o,a,!0,u)),p}function cl(t,e,n,r,i){const o=[];for(let a=0;a<t.length;a++){const s=t[a];let u;for(let t=0;t<s.length-1;t++){let a=s[t],l=s[t+1];a.x<e&&l.x<e||(a.x<e?a=new O(e,a.y+(e-a.x)/(l.x-a.x)*(l.y-a.y))._round():l.x<e&&(l=new O(e,a.y+(e-a.x)/(l.x-a.x)*(l.y-a.y))._round()),a.y<n&&l.y<n||(a.y<n?a=new O(a.x+(n-a.y)/(l.y-a.y)*(l.x-a.x),n)._round():l.y<n&&(l=new O(a.x+(n-a.y)/(l.y-a.y)*(l.x-a.x),n)._round()),a.x>=r&&l.x>=r||(a.x>=r?a=new O(r,a.y+(r-a.x)/(l.x-a.x)*(l.y-a.y))._round():l.x>=r&&(l=new O(r,a.y+(r-a.x)/(l.x-a.x)*(l.y-a.y))._round()),a.y>=i&&l.y>=i||(a.y>=i?a=new O(a.x+(i-a.y)/(l.y-a.y)*(l.x-a.x),i)._round():l.y>=i&&(l=new O(a.x+(i-a.y)/(l.y-a.y)*(l.x-a.x),i)._round()),u&&a.equals(u[u.length-1])||(u=[a],o.push(u)),u.push(l)))))}}return o}function fl(t,e,n,r){const i=[],o=t.image,a=o.pixelRatio,s=o.paddedRect.w-2,u=o.paddedRect.h-2,l=t.right-t.left,c=t.bottom-t.top,f=o.stretchX||[[0,s]],h=o.stretchY||[[0,u]],p=(t,e)=>t+e[1]-e[0],d=f.reduce(p,0),m=h.reduce(p,0),g=s-d,y=u-m;let v=0,b=d,_=0,A=m,w=0,x=g,E=0,S=y;if(o.content&&r){const t=o.content;v=hl(f,0,t[0]),_=hl(h,0,t[1]),b=hl(f,t[0],t[2]),A=hl(h,t[1],t[3]),w=t[0]-v,E=t[1]-_,x=t[2]-t[0]-b,S=t[3]-t[1]-A}const P=(r,i,s,u)=>{const f=dl(r.stretch-v,b,l,t.left),h=ml(r.fixed-w,x,r.stretch,d),p=dl(i.stretch-_,A,c,t.top),g=ml(i.fixed-E,S,i.stretch,m),y=dl(s.stretch-v,b,l,t.left),P=ml(s.fixed-w,x,s.stretch,d),C=dl(u.stretch-_,A,c,t.top),T=ml(u.fixed-E,S,u.stretch,m),k=new O(f,p),I=new O(y,p),L=new O(y,C),j=new O(f,C),M=new O(h/a,g/a),R=new O(P/a,T/a),N=e*Math.PI/180;if(N){const t=Math.sin(N),e=Math.cos(N),n=[e,-t,t,e];k._matMult(n),I._matMult(n),j._matMult(n),L._matMult(n)}const D=r.stretch+r.fixed,F=i.stretch+i.fixed;return{tl:k,tr:I,bl:j,br:L,tex:{x:o.paddedRect.x+1+D,y:o.paddedRect.y+1+F,w:s.stretch+s.fixed-D,h:u.stretch+u.fixed-F},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:M,pixelOffsetBR:R,minFontScaleX:x/a/l,minFontScaleY:S/a/c,isSDF:n}};if(r&&(o.stretchX||o.stretchY)){const t=pl(f,g,d),e=pl(h,y,m);for(let n=0;n<t.length-1;n++){const r=t[n],o=t[n+1];for(let t=0;t<e.length-1;t++)i.push(P(r,e[t],o,e[t+1]))}}else i.push(P({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:u+1}));return i}function hl(t,e,n){let r=0;for(const i of t)r+=Math.max(e,Math.min(n,i[1]))-Math.max(e,Math.min(n,i[0]));return r}function pl(t,e,n){const r=[{fixed:-1,stretch:0}];for(const[i,o]of t){const t=r[r.length-1];r.push({fixed:i-t.stretch,stretch:t.stretch}),r.push({fixed:i-t.stretch,stretch:t.stretch+(o-i)})}return r.push({fixed:e+1,stretch:n}),r}function dl(t,e,n,r){return t/e*n+r}function ml(t,e,n,r){return t-e*n/r}Pr("Anchor",nl);class gl{constructor(t,e,n,r,i,o,a,s,u,l){if(this.boxStartIndex=t.length,u){let t=o.top,e=o.bottom;const n=o.collisionPadding;n&&(t-=n[1],e+=n[3]);let r=e-t;r>0&&(r=Math.max(10,r),this.circleDiameter=r)}else{let u=o.top*a-s[0],c=o.bottom*a+s[2],f=o.left*a-s[3],h=o.right*a+s[1];const p=o.collisionPadding;if(p&&(f-=p[0]*a,u-=p[1]*a,h+=p[2]*a,c+=p[3]*a),l){const t=new O(f,u),e=new O(h,u),n=new O(f,c),r=new O(h,c),i=l*Math.PI/180;t._rotate(i),e._rotate(i),n._rotate(i),r._rotate(i),f=Math.min(t.x,e.x,n.x,r.x),h=Math.max(t.x,e.x,n.x,r.x),u=Math.min(t.y,e.y,n.y,r.y),c=Math.max(t.y,e.y,n.y,r.y)}t.emplaceBack(e.x,e.y,f,u,h,c,n,r,i)}this.boxEndIndex=t.length}}class yl{constructor(t=[],e=vl){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,r=e[t];for(;t>0;){const i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}_down(t){const{data:e,compare:n}=this,r=this.length>>1,i=e[t];for(;t<r;){let r=1+(t<<1),o=e[r];const a=r+1;if(a<this.length&&n(e[a],o)<0&&(r=a,o=e[a]),n(o,i)>=0)break;e[t]=o,t=r}e[t]=i}}function vl(t,e){return t<e?-1:t>e?1:0}function bl(t,e=1,n=!1){let r=1/0,i=1/0,o=-1/0,a=-1/0;const s=t[0];for(let p=0;p<s.length;p++){const t=s[p];(!p||t.x<r)&&(r=t.x),(!p||t.y<i)&&(i=t.y),(!p||t.x>o)&&(o=t.x),(!p||t.y>a)&&(a=t.y)}const u=Math.min(o-r,a-i);let l=u/2;const c=new yl([],_l);if(0===u)return new O(r,i);for(let p=r;p<o;p+=u)for(let e=i;e<a;e+=u)c.push(new Al(p+l,e+l,l,t));let f=function(t){let e=0,n=0,r=0;const i=t[0];for(let o=0,a=i.length,s=a-1;o<a;s=o++){const t=i[o],a=i[s],u=t.x*a.y-a.x*t.y;n+=(t.x+a.x)*u,r+=(t.y+a.y)*u,e+=3*u}return new Al(n/e,r/e,0,t)}(t),h=c.length;for(;c.length;){const r=c.pop();(r.d>f.d||!f.d)&&(f=r,n&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,h)),r.max-f.d<=e||(l=r.h/2,c.push(new Al(r.p.x-l,r.p.y-l,l,t)),c.push(new Al(r.p.x+l,r.p.y-l,l,t)),c.push(new Al(r.p.x-l,r.p.y+l,l,t)),c.push(new Al(r.p.x+l,r.p.y+l,l,t)),h+=4)}return n&&(console.log(`num probes: ${h}`),console.log(`best distance: ${f.d}`)),f.p}function _l(t,e){return e.max-t.max}function Al(t,e,n,r){this.p=new O(t,e),this.h=n,this.d=function(t,e){let n=!1,r=1/0;for(let i=0;i<e.length;i++){const o=e[i];for(let e=0,i=o.length,a=i-1;e<i;a=e++){const i=o[e],s=o[a];i.y>t.y!=s.y>t.y&&t.x<(s.x-i.x)*(t.y-i.y)/(s.y-i.y)+i.x&&(n=!n),r=Math.min(r,ra(t,i,s))}}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}const wl=Number.POSITIVE_INFINITY;function xl(t,e){return e[1]!==wl?function(t,e,n){let r=0,i=0;switch(e=Math.abs(e),n=Math.abs(n),t){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(t){case"top-right":case"bottom-right":case"right":r=-e;break;case"top-left":case"bottom-left":case"left":r=e}return[r,i]}(t,e[0],e[1]):function(t,e){let n=0,r=0;e<0&&(e=0);const i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-e;break;case"top":r=e-7}switch(t){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=e;break;case"right":n=-e}return[n,r]}(t,e[0])}function El(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Ol(e,n,r,i,o,a,s,u,l,c,f){let h=a.textMaxSize.evaluate(n,{});void 0===h&&(h=s);const p=e.layers[0].layout,m=p.get("icon-offset").evaluate(n,{},f),g=Cl(r.horizontal),y=s/24,v=e.tilePixelRatio*y,b=e.tilePixelRatio*h/24,_=e.tilePixelRatio*u,A=e.tilePixelRatio*p.get("symbol-spacing"),w=p.get("text-padding")*e.tilePixelRatio,x=function(t,e,n,r=1){const i=t.get("icon-padding").evaluate(e,{},n),o=i&&i.values;return[o[0]*r,o[1]*r,o[2]*r,o[3]*r]}(p,n,f,e.tilePixelRatio),E=p.get("text-max-angle")/180*Math.PI,O="viewport"!==p.get("text-rotation-alignment")&&"point"!==p.get("symbol-placement"),S="map"===p.get("icon-rotation-alignment")&&"point"!==p.get("symbol-placement"),P=p.get("symbol-placement"),C=A/2,T=p.get("icon-text-fit");let k;i&&"none"!==T&&(e.allowVerticalPlacement&&r.vertical&&(k=Qu(i,r.vertical,T,p.get("icon-text-fit-padding"),m,y)),g&&(i=Qu(i,g,T,p.get("icon-text-fit-padding"),m,y)));const I=(u,h)=>{h.x<0||h.x>=Vo||h.y<0||h.y>=Vo||function(e,n,r,i,o,a,s,u,l,c,f,h,p,m,g,y,v,b,_,A,w,x,E,O,S){const P=e.addToLineVertexArray(n,r);let C,T,k,I,L=0,j=0,M=0,R=0,N=-1,D=-1;const F={};let B=bo.exports(""),z=0,U=0;if(void 0===u._unevaluatedLayout.getValue("text-radial-offset")?[z,U]=u.layout.get("text-offset").evaluate(w,{},O).map((t=>t*uu)):(z=u.layout.get("text-radial-offset").evaluate(w,{},O)*uu,U=wl),e.allowVerticalPlacement&&i.vertical){const t=u.layout.get("text-rotate").evaluate(w,{},O)+90;k=new gl(l,n,c,f,h,i.vertical,p,m,g,t),s&&(I=new gl(l,n,c,f,h,s,v,b,g,t))}if(o){const r=u.layout.get("icon-rotate").evaluate(w,{}),i="none"!==u.layout.get("icon-text-fit"),a=fl(o,r,E,i),p=s?fl(s,r,E,i):void 0;T=new gl(l,n,c,f,h,o,v,b,!1,r),L=4*a.length;const m=e.iconSizeData;let g=null;"source"===m.kind?(g=[tl*u.layout.get("icon-size").evaluate(w,{})],g[0]>Sl&&d(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===m.kind&&(g=[tl*x.compositeIconSizes[0].evaluate(w,{},O),tl*x.compositeIconSizes[1].evaluate(w,{},O)],(g[0]>Sl||g[1]>Sl)&&d(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,a,g,A,_,w,t.WritingMode.none,n,P.lineStartIndex,P.lineLength,-1,O),N=e.icon.placedSymbolArray.length-1,p&&(j=4*p.length,e.addSymbols(e.icon,p,g,A,_,w,t.WritingMode.vertical,n,P.lineStartIndex,P.lineLength,-1,O),D=e.icon.placedSymbolArray.length-1)}const G=Object.keys(i.horizontal);for(const d of G){const r=i.horizontal[d];if(!C){B=bo.exports(r.text);const t=u.layout.get("text-rotate").evaluate(w,{},O);C=new gl(l,n,c,f,h,r,p,m,g,t)}const o=1===r.positionedLines.length;if(M+=Pl(e,n,r,a,u,g,w,y,P,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,o?G:[d],F,N,x,O),o)break}i.vertical&&(R+=Pl(e,n,i.vertical,a,u,g,w,y,P,t.WritingMode.vertical,["vertical"],F,D,x,O));const V=C?C.boxStartIndex:e.collisionBoxArray.length,q=C?C.boxEndIndex:e.collisionBoxArray.length,H=k?k.boxStartIndex:e.collisionBoxArray.length,W=k?k.boxEndIndex:e.collisionBoxArray.length,X=T?T.boxStartIndex:e.collisionBoxArray.length,Y=T?T.boxEndIndex:e.collisionBoxArray.length,Z=I?I.boxStartIndex:e.collisionBoxArray.length,K=I?I.boxEndIndex:e.collisionBoxArray.length;let $=-1;const J=(t,e)=>t&&t.circleDiameter?Math.max(t.circleDiameter,e):e;$=J(C,$),$=J(k,$),$=J(T,$),$=J(I,$);const Q=$>-1?1:0;Q&&($*=S/uu),e.glyphOffsetArray.length>=Dl.MAX_GLYPHS&&d("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==w.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,w.sortKey),e.symbolInstances.emplaceBack(n.x,n.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,N,D,B,V,q,H,W,X,Y,Z,K,c,M,R,L,j,Q,0,p,z,U,$)}(e,h,u,r,i,o,k,e.layers[0],e.collisionBoxArray,n.index,n.sourceLayerIndex,e.index,v,[w,w,w,w],O,l,_,x,S,m,n,a,c,f,s)};if("line"===P)for(const t of cl(n.geometry,0,0,Vo,Vo)){const n=ul(t,A,E,r.vertical||g,i,24,b,e.overscaling,Vo);for(const r of n){const n=g;n&&Tl(e,n.text,C,r)||I(t,r)}}else if("line-center"===P){for(const t of n.geometry)if(t.length>1){const e=sl(t,E,r.vertical||g,i,24,b);e&&I(t,e)}}else if("Polygon"===n.type)for(const t of hs(n.geometry,0)){const e=bl(t,16);I(t[0],new nl(e.x,e.y,0))}else if("LineString"===n.type)for(const t of n.geometry)I(t,new nl(t[0].x,t[0].y,0));else if("Point"===n.type)for(const t of n.geometry)for(const e of t)I([e],new nl(e.x,e.y,0))}const Sl=32640;function Pl(t,e,n,r,i,o,a,s,u,l,c,f,h,p,m){const g=function(t,e,n,r,i,o,a,s){const u=r.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,l=[];for(const c of e.positionedLines)for(const t of c.positionedGlyphs){if(!t.rect)continue;const r=t.rect||{};let o=4,f=!0,h=1,p=0;const d=(i||s)&&t.vertical,m=t.metrics.advance*t.scale/2;if(s&&e.verticalizable){const e=(t.scale-1)*uu,n=(uu-t.metrics.width*t.scale)/2;p=c.lineOffset/2-(t.imageName?-n:e)}if(t.imageName){const e=a[t.imageName];f=e.sdf,h=e.pixelRatio,o=1/h}const g=i?[t.x+m,t.y]:[0,0];let y=i?[0,0]:[t.x+m+n[0],t.y+n[1]-p],v=[0,0];d&&(v=y,y=[0,0]);const b=(t.metrics.left-o)*t.scale-m+y[0],_=(-t.metrics.top-o)*t.scale+y[1],A=b+r.w*t.scale/h,w=_+r.h*t.scale/h,x=new O(b,_),E=new O(A,_),S=new O(b,w),P=new O(A,w);if(d){const e=new O(-m,m-Fu),n=-Math.PI/2,r=12-m,i=new O(22-r,-(t.imageName?r:0)),o=new O(...v);x._rotateAround(n,e)._add(i)._add(o),E._rotateAround(n,e)._add(i)._add(o),S._rotateAround(n,e)._add(i)._add(o),P._rotateAround(n,e)._add(i)._add(o)}if(u){const t=Math.sin(u),e=Math.cos(u),n=[e,-t,t,e];x._matMult(n),E._matMult(n),S._matMult(n),P._matMult(n)}const C=new O(0,0),T=new O(0,0);l.push({tl:x,tr:E,bl:S,br:P,tex:r,writingMode:e.writingMode,glyphOffset:g,sectionIndex:t.sectionIndex,isSDF:f,pixelOffsetTL:C,pixelOffsetBR:T,minFontScaleX:0,minFontScaleY:0})}return l}(0,n,s,i,o,a,r,t.allowVerticalPlacement),y=t.textSizeData;let v=null;"source"===y.kind?(v=[tl*i.layout.get("text-size").evaluate(a,{})],v[0]>Sl&&d(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===y.kind&&(v=[tl*p.compositeTextSizes[0].evaluate(a,{},m),tl*p.compositeTextSizes[1].evaluate(a,{},m)],(v[0]>Sl||v[1]>Sl)&&d(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,g,v,s,o,a,l,e,u.lineStartIndex,u.lineLength,h,m);for(const d of c)f[d]=t.text.placedSymbolArray.length-1;return 4*g.length}function Cl(t){for(const e in t)return t[e];return null}function Tl(t,e,n,r){const i=t.compareText;if(e in i){const t=i[e];for(let e=t.length-1;e>=0;e--)if(r.dist(t[e])<n)return!0}else i[e]=[];return i[e].push(r),!1}const kl=ws.VectorTileFeature.types,Il=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Ll(t,e,n,r,i,o,a,s,u,l,c,f,h){const p=s?Math.min(Sl,Math.round(s[0])):0,d=s?Math.min(Sl,Math.round(s[1])):0;t.emplaceBack(e,n,Math.round(32*r),Math.round(32*i),o,a,(p<<1)+(u?1:0),d,16*l,16*c,256*f,256*h)}function jl(t,e,n){t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n),t.emplaceBack(e.x,e.y,n)}function Ml(t){for(const e of t.sections)if(zr(e.text))return!0;return!1}class Rl{constructor(t){this.layoutVertexArray=new ao,this.indexArray=new fo,this.programConfigurations=t,this.segments=new go,this.dynamicLayoutVertexArray=new so,this.opacityVertexArray=new uo,this.placedSymbolArray=new Wi}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(t,e,n,r){this.isEmpty()||(n&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,eu.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,nu.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Il,!0),this.opacityVertexBuffer.itemSize=1),(n||r)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Pr("SymbolBuffers",Rl);class Nl{constructor(t,e,n){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new n,this.segments=new go,this.collisionVertexArray=new co}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,ru.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Pr("CollisionBuffers",Nl);class Dl{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ma([]),this.placementViewportMatrix=ma([]);const n=this.layers[0]._unevaluatedLayout._values;this.textSizeData=el(this.zoom,n["text-size"]),this.iconSizeData=el(this.zoom,n["icon-size"]);const r=this.layers[0].layout,i=r.get("symbol-sort-key"),o=r.get("symbol-z-order");this.canOverlap="never"!==Gl(r,"text-overlap","text-allow-overlap")||"never"!==Gl(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==o&&!i.isConstant(),this.sortFeaturesByY=("viewport-y"===o||"auto"===o&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map((e=>t.WritingMode[e]))),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.sourceID=e.sourceID}createArrays(){this.text=new Rl(new zo(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new Rl(new zo(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new Zi,this.lineVertexArray=new Ki,this.symbolInstances=new Yi}calculateGlyphDependencies(t,e,n,r,i){for(let o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,(n||r)&&i){const n=su[t.charAt(o)];n&&(e[n.charCodeAt(0)]=!0)}}populate(e,n,r){const i=this.layers[0],o=i.layout,a=o.get("text-font"),s=o.get("text-field"),u=o.get("icon-image"),l=("constant"!==s.value.kind||s.value.value instanceof Dt&&!s.value.value.isEmpty()||s.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==u.value.kind||!!u.value.value||Object.keys(u.parameters).length>0,f=o.get("symbol-sort-key");if(this.features=[],!l&&!c)return;const h=n.iconDependencies,p=n.glyphDependencies,d=n.availableImages,m=new Qr(this.zoom);for(const{feature:g,id:y,index:v,sourceLayerIndex:b}of e){const e=i._featureFilter.needGeometry,n=Xo(g,e);if(!i._featureFilter.filter(m,n,r))continue;let s,u;if(e||(n.geometry=Wo(g)),l){const t=i.getValueAndResolveTokens("text-field",n,r,d),e=Dt.factory(t);Ml(e)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===Kr()||this.hasRTLText&&Jr.isParsed())&&(s=au(e,i,n))}if(c){const t=i.getValueAndResolveTokens("icon-image",n,r,d);u=t instanceof Bt?t:Bt.fromString(t)}if(!s&&!u)continue;const _=this.sortFeaturesByKey?f.evaluate(n,{},r):void 0;if(this.features.push({id:y,text:s,icon:u,index:v,sourceLayerIndex:b,geometry:n.geometry,properties:g.properties,type:kl[g.type],sortKey:_}),u&&(h[u.name]=!0),s){const e=a.evaluate(n,{},r).join(","),i="viewport"!==o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.WritingMode.vertical)>=0;for(const t of s.sections)if(t.image)h[t.image.name]=!0;else{const n=jr(s.toString()),r=t.fontStack||e,o=p[r]=p[r]||{};this.calculateGlyphDependencies(t.text,o,i,this.allowVerticalPlacement,n)}}}"line"===o.get("symbol-placement")&&(this.features=function(t){const e={},n={},r=[];let i=0;function o(e){r.push(t[e]),i++}function a(t,e,i){const o=n[t];return delete n[t],n[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(t,n,i){const o=e[n];return delete e[n],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function u(t,e,n){const r=n?e[0][e[0].length-1]:e[0][0];return`${t}:${r.x}:${r.y}`}for(let l=0;l<t.length;l++){const c=t[l],f=c.geometry,h=c.text?c.text.toString():null;if(!h){o(l);continue}const p=u(h,f),d=u(h,f,!0);if(p in n&&d in e&&n[p]!==e[d]){const t=s(p,d,f),i=a(p,d,r[t].geometry);delete e[p],delete n[d],n[u(h,r[i].geometry,!0)]=i,r[t].geometry=null}else p in n?a(p,d,f):d in e?s(p,d,f):(o(l),e[p]=i-1,n[d]=i-1)}return r.filter((t=>t.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((t,e)=>t.sortKey-e.sortKey))}update(t,e,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,n),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,n))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){const n=this.lineVertexArray.length;if(void 0!==t.segment){let n=t.dist(e[t.segment+1]),r=t.dist(e[t.segment]);const i={};for(let o=t.segment+1;o<e.length;o++)i[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:n},o<e.length-1&&(n+=e[o+1].dist(e[o]));for(let o=t.segment||0;o>=0;o--)i[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:r},o>0&&(r+=e[o-1].dist(e[o]));for(let t=0;t<e.length;t++){const e=i[t];this.lineVertexArray.emplaceBack(e.x,e.y,e.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}}addSymbols(e,n,r,i,o,a,s,u,l,c,f,h){const p=e.indexArray,d=e.layoutVertexArray,m=e.segments.prepareSegment(4*n.length,d,p,this.canOverlap?a.sortKey:void 0),g=this.glyphOffsetArray.length,y=m.vertexLength,v=this.allowVerticalPlacement&&s===t.WritingMode.vertical?Math.PI/2:0,b=a.text&&a.text.sections;for(let t=0;t<n.length;t++){const{tl:i,tr:o,bl:s,br:l,tex:c,pixelOffsetTL:f,pixelOffsetBR:g,minFontScaleX:y,minFontScaleY:_,glyphOffset:A,isSDF:w,sectionIndex:x}=n[t],E=m.vertexLength,O=A[1];Ll(d,u.x,u.y,i.x,O+i.y,c.x,c.y,r,w,f.x,f.y,y,_),Ll(d,u.x,u.y,o.x,O+o.y,c.x+c.w,c.y,r,w,g.x,f.y,y,_),Ll(d,u.x,u.y,s.x,O+s.y,c.x,c.y+c.h,r,w,f.x,g.y,y,_),Ll(d,u.x,u.y,l.x,O+l.y,c.x+c.w,c.y+c.h,r,w,g.x,g.y,y,_),jl(e.dynamicLayoutVertexArray,u,v),p.emplaceBack(E,E+1,E+2),p.emplaceBack(E+1,E+2,E+3),m.vertexLength+=4,m.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(A[0]),t!==n.length-1&&x===n[t+1].sectionIndex||e.programConfigurations.populatePaintArrays(d.length,a,a.index,{},h,b&&b[x])}e.placedSymbolArray.emplaceBack(u.x,u.y,g,this.glyphOffsetArray.length-g,y,l,c,u.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],s,0,!1,0,f)}_addCollisionDebugVertex(t,e,n,r,i,o){return e.emplaceBack(0,0),t.emplaceBack(n.x,n.y,r,i,Math.round(o.x),Math.round(o.y))}addCollisionDebugVertices(t,e,n,r,i,o,a){const s=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=s.vertexLength,l=i.layoutVertexArray,c=i.collisionVertexArray,f=a.anchorX,h=a.anchorY;this._addCollisionDebugVertex(l,c,o,f,h,new O(t,e)),this._addCollisionDebugVertex(l,c,o,f,h,new O(n,e)),this._addCollisionDebugVertex(l,c,o,f,h,new O(n,r)),this._addCollisionDebugVertex(l,c,o,f,h,new O(t,r)),s.vertexLength+=4;const p=i.indexArray;p.emplaceBack(u,u+1),p.emplaceBack(u+1,u+2),p.emplaceBack(u+2,u+3),p.emplaceBack(u+3,u),s.primitiveLength+=4}addDebugCollisionBoxes(t,e,n,r){for(let i=t;i<e;i++){const t=this.collisionBoxArray.get(i);this.addCollisionDebugVertices(t.x1,t.y1,t.x2,t.y2,r?this.textCollisionBox:this.iconCollisionBox,t.anchorPoint,n)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Nl(lo,iu.members,ho),this.iconCollisionBox=new Nl(lo,iu.members,ho);for(let t=0;t<this.symbolInstances.length;t++){const e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}}_deserializeCollisionBoxesForSymbol(t,e,n,r,i,o,a,s,u){const l={};for(let c=e;c<n;c++){const e=t.get(c);l.textBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,anchorPointX:e.anchorPointX,anchorPointY:e.anchorPointY},l.textFeatureIndex=e.featureIndex;break}for(let c=r;c<i;c++){const e=t.get(c);l.verticalTextBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,anchorPointX:e.anchorPointX,anchorPointY:e.anchorPointY},l.verticalTextFeatureIndex=e.featureIndex;break}for(let c=o;c<a;c++){const e=t.get(c);l.iconBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,anchorPointX:e.anchorPointX,anchorPointY:e.anchorPointY},l.iconFeatureIndex=e.featureIndex;break}for(let c=s;c<u;c++){const e=t.get(c);l.verticalIconBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,anchorPointX:e.anchorPointX,anchorPointY:e.anchorPointY},l.verticalIconFeatureIndex=e.featureIndex;break}return l}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let e=0;e<this.symbolInstances.length;e++){const n=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,n.textBoxStartIndex,n.textBoxEndIndex,n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n.iconBoxStartIndex,n.iconBoxEndIndex,n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){const n=t.placedSymbolArray.get(e),r=n.vertexStartIndex+4*n.numGlyphs;for(let i=n.vertexStartIndex;i<r;i+=4)t.indexArray.emplaceBack(i,i+1,i+2),t.indexArray.emplaceBack(i+1,i+2,i+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const e=Math.sin(t),n=Math.cos(t),r=[],i=[],o=[];for(let a=0;a<this.symbolInstances.length;++a){o.push(a);const t=this.symbolInstances.get(a);r.push(0|Math.round(e*t.anchorX+n*t.anchorY)),i.push(t.featureIndex)}return o.sort(((t,e)=>r[t]-r[e]||i[e]-i[t])),o}addToSortKeyRanges(t,e){const n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===e?n.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach(((t,e,n)=>{t>=0&&n.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)})),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Pr("SymbolBucket",Dl,{omit:["layers","collisionBoxArray","features","compareText"]}),Dl.MAX_GLYPHS=65535,Dl.addDynamicAttributes=jl;const Fl=new pi({"symbol-placement":new ui(rt.layout_symbol["symbol-placement"]),"symbol-spacing":new ui(rt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ui(rt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new li(rt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ui(rt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ui(rt.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ui(rt.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ui(rt.layout_symbol["icon-ignore-placement"]),"icon-optional":new ui(rt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ui(rt.layout_symbol["icon-rotation-alignment"]),"icon-size":new li(rt.layout_symbol["icon-size"]),"icon-text-fit":new ui(rt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ui(rt.layout_symbol["icon-text-fit-padding"]),"icon-image":new li(rt.layout_symbol["icon-image"]),"icon-rotate":new li(rt.layout_symbol["icon-rotate"]),"icon-padding":new li(rt.layout_symbol["icon-padding"]),"icon-keep-upright":new ui(rt.layout_symbol["icon-keep-upright"]),"icon-offset":new li(rt.layout_symbol["icon-offset"]),"icon-anchor":new li(rt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ui(rt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ui(rt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ui(rt.layout_symbol["text-rotation-alignment"]),"text-field":new li(rt.layout_symbol["text-field"]),"text-font":new li(rt.layout_symbol["text-font"]),"text-size":new li(rt.layout_symbol["text-size"]),"text-max-width":new li(rt.layout_symbol["text-max-width"]),"text-line-height":new ui(rt.layout_symbol["text-line-height"]),"text-letter-spacing":new li(rt.layout_symbol["text-letter-spacing"]),"text-justify":new li(rt.layout_symbol["text-justify"]),"text-radial-offset":new li(rt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ui(rt.layout_symbol["text-variable-anchor"]),"text-anchor":new li(rt.layout_symbol["text-anchor"]),"text-max-angle":new ui(rt.layout_symbol["text-max-angle"]),"text-writing-mode":new ui(rt.layout_symbol["text-writing-mode"]),"text-rotate":new li(rt.layout_symbol["text-rotate"]),"text-padding":new ui(rt.layout_symbol["text-padding"]),"text-keep-upright":new ui(rt.layout_symbol["text-keep-upright"]),"text-transform":new li(rt.layout_symbol["text-transform"]),"text-offset":new li(rt.layout_symbol["text-offset"]),"text-allow-overlap":new ui(rt.layout_symbol["text-allow-overlap"]),"text-overlap":new ui(rt.layout_symbol["text-overlap"]),"text-ignore-placement":new ui(rt.layout_symbol["text-ignore-placement"]),"text-optional":new ui(rt.layout_symbol["text-optional"])});var Bl={paint:new pi({"icon-opacity":new li(rt.paint_symbol["icon-opacity"]),"icon-color":new li(rt.paint_symbol["icon-color"]),"icon-halo-color":new li(rt.paint_symbol["icon-halo-color"]),"icon-halo-width":new li(rt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new li(rt.paint_symbol["icon-halo-blur"]),"icon-translate":new ui(rt.paint_symbol["icon-translate"]),"icon-translate-anchor":new ui(rt.paint_symbol["icon-translate-anchor"]),"text-opacity":new li(rt.paint_symbol["text-opacity"]),"text-color":new li(rt.paint_symbol["text-color"],{runtimeType:mt,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new li(rt.paint_symbol["text-halo-color"]),"text-halo-width":new li(rt.paint_symbol["text-halo-width"]),"text-halo-blur":new li(rt.paint_symbol["text-halo-blur"]),"text-translate":new ui(rt.paint_symbol["text-translate"]),"text-translate-anchor":new ui(rt.paint_symbol["text-translate-anchor"])}),layout:Fl};class zl{constructor(t){this.type=t.property.overrides?t.property.overrides.runtimeType:ft,this.defaultValue=t}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Pr("FormatSectionOverride",zl,{omit:["defaultValue"]});class Ul extends mi{constructor(t){super(t,Bl)}recalculate(t,e){if(super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const t=this.layout.get("text-writing-mode");if(t){const e=[];for(const n of t)e.indexOf(n)<0&&e.push(n);this.layout._values["text-writing-mode"]=e}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,e,n,r){const i=this.layout.get(t).evaluate(e,{},n,r),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||Mn(o.value)||!i?i:function(t,e){return e.replace(/{([^{}]+)}/g,((e,n)=>n in t?String(t[n]):""))}(e.properties,i)}createBucket(t){return new Dl(t)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const t of Bl.paint.overridableProperties){if(!Ul.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),n=new zl(e),r=new jn(n,e.property.specification);let i=null;i="constant"===e.value.kind||"source"===e.value.kind?new Nn("source",r):new Dn("composite",r,e.value.zoomStops,e.value._interpolationType),this.paint._values[t]=new ai(e.property,i,e.parameters)}}_handleOverridablePaintPropertyUpdate(t,e,n){return!(!this.layout||e.isDataDriven()||n.isDataDriven())&&Ul.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const n=t.get("text-field"),r=Bl.paint.properties[e];let i=!1;const o=t=>{for(const e of t)if(r.overrides&&r.overrides.hasOverride(e))return void(i=!0)};if("constant"===n.value.kind&&n.value.value instanceof Dt)o(n.value.value.sections);else if("source"===n.value.kind){const t=e=>{i||(e instanceof qt&&Gt(e.value)===bt?o(e.value.sections):e instanceof fn?o(e.sections):e.eachChild(t))},e=n.value;e._styleExpression&&t(e._styleExpression.expression)}return i}}function Gl(t,e,n){let r="never";const i=t.get(e);return i?r=i:t.get(n)&&(r="always"),r}var Vl={paint:new pi({"background-color":new ui(rt.paint_background["background-color"]),"background-pattern":new fi(rt.paint_background["background-pattern"]),"background-opacity":new ui(rt.paint_background["background-opacity"])})},ql={paint:new pi({"raster-opacity":new ui(rt.paint_raster["raster-opacity"]),"raster-hue-rotate":new ui(rt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ui(rt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ui(rt.paint_raster["raster-brightness-max"]),"raster-saturation":new ui(rt.paint_raster["raster-saturation"]),"raster-contrast":new ui(rt.paint_raster["raster-contrast"]),"raster-resampling":new ui(rt.paint_raster["raster-resampling"]),"raster-fade-duration":new ui(rt.paint_raster["raster-fade-duration"])})};class Hl extends mi{constructor(t){super(t,{}),this.onAdd=t=>{this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},this.onRemove=t=>{this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},this.implementation=t}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}}const Wl={circle:class extends mi{constructor(t){super(t,fa)}createBucket(t){return new Zo(t)}queryRadius(t){const e=t;return sa("circle-radius",this,e)+sa("circle-stroke-width",this,e)+ua(this.paint.get("circle-translate"))}queryIntersectsFeature(t,e,n,r,i,o,a,s){const u=la(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),l=this.paint.get("circle-radius").evaluate(e,n)+this.paint.get("circle-stroke-width").evaluate(e,n),c="map"===this.paint.get("circle-pitch-alignment"),f=c?u:function(t,e){return t.map((t=>xa(t,e)))}(u,s),h=c?l*a:l;for(const p of r)for(const t of p){const e=c?t:xa(t,s);let n=h;const r=Aa([],[t.x,t.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?n*=r[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(n*=o.cameraToCenterDistance/r[3]),$o(f,e,n))return!0}return!1}},heatmap:class extends mi{constructor(t){super(t,Oa),this._updateColorRamp()}createBucket(t){return new Ea(t)}_handleSpecialPaintPropertyUpdate(t){"heatmap-color"===t&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Ia({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}},hillshade:class extends mi{constructor(t){super(t,La)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}},fill:class extends mi{constructor(t){super(t,vs)}recalculate(t,e){super.recalculate(t,e);const n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new gs(t)}queryRadius(){return ua(this.paint.get("fill-translate"))}queryIntersectsFeature(t,e,n,r,i,o,a){return Jo(la(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),r)}isTileClipped(){return!0}},"fill-extrusion":class extends mi{constructor(t){super(t,zs)}createBucket(t){return new Ds(t)}queryRadius(){return ua(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(t,e,n,r,i,o,a,s){const u=la(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,a),l=this.paint.get("fill-extrusion-height").evaluate(e,n),c=this.paint.get("fill-extrusion-base").evaluate(e,n),f=function(t,e,n,r){const i=[];for(const o of t){const t=[o.x,o.y,0,1];Aa(t,t,e),i.push(new O(t[0]/t[3],t[1]/t[3]))}return i}(u,s),h=function(t,e,n,r){const i=[],o=[],a=r[8]*e,s=r[9]*e,u=r[10]*e,l=r[11]*e,c=r[8]*n,f=r[9]*n,h=r[10]*n,p=r[11]*n;for(const d of t){const t=[],e=[];for(const n of d){const i=n.x,o=n.y,d=r[0]*i+r[4]*o+r[12],m=r[1]*i+r[5]*o+r[13],g=r[2]*i+r[6]*o+r[14],y=r[3]*i+r[7]*o+r[15],v=g+u,b=y+l,_=d+c,A=m+f,w=g+h,x=y+p,E=new O((d+a)/b,(m+s)/b);E.z=v/b,t.push(E);const S=new O(_/x,A/x);S.z=w/x,e.push(S)}i.push(t),o.push(e)}return[i,o]}(r,c,l,s);return function(t,e,n){let r=1/0;Jo(n,e)&&(r=Gs(n,e[0]));for(let i=0;i<e.length;i++){const o=e[i],a=t[i];for(let t=0;t<o.length-1;t++){const e=o[t],i=[e,o[t+1],a[t+1],a[t],e];Ko(n,i)&&(r=Math.min(r,Gs(n,i)))}}return r!==1/0&&r}(h[0],h[1],f)}},line:class extends mi{constructor(t){super(t,Js),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(t){"line-gradient"===t&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Ee,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Qs.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Ks(t)}queryRadius(t){const e=t,n=tu(sa("line-width",this,e),sa("line-gap-width",this,e)),r=sa("line-offset",this,e);return n/2+Math.abs(r)+ua(this.paint.get("line-translate"))}queryIntersectsFeature(t,e,n,r,i,o,a){const s=la(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,a),u=a/2*tu(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),l=this.paint.get("line-offset").evaluate(e,n);return l&&(r=function(t,e){const n=[];for(let r=0;r<t.length;r++){const i=t[r],o=[];for(let t=0;t<i.length;t++){const n=i[t-1],r=i[t],a=i[t+1],s=0===t?new O(0,0):r.sub(n)._unit()._perp(),u=t===i.length-1?new O(0,0):a.sub(r)._unit()._perp(),l=s._add(u)._unit(),c=l.x*u.x+l.y*u.y;0!==c&&l._mult(1/c),o.push(l._mult(e)._add(r))}n.push(o)}return n}(r,l*a)),function(t,e,n){for(let r=0;r<e.length;r++){const i=e[r];if(t.length>=3)for(let e=0;e<i.length;e++)if(oa(t,i[e]))return!0;if(Qo(t,i,n))return!0}return!1}(s,r,u)}isTileClipped(){return!0}},symbol:Ul,background:class extends mi{constructor(t){super(t,Vl)}},raster:class extends mi{constructor(t){super(t,ql)}}};class Xl{constructor(t){this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))}remove(){delete this._channel,this._callback=()=>{}}}const Yl=6371008.8;class Zl{constructor(t,e){if(isNaN(t)||isNaN(e))throw new Error(`Invalid LngLat object: (${t}, ${e})`);if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Zl(a(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const e=Math.PI/180,n=this.lat*e,r=t.lat*e,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return Yl*Math.acos(Math.min(i,1))}toBounds(t=0){const e=360*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new Kl(new Zl(this.lng-n,this.lat-e),new Zl(this.lng+n,this.lat+e))}static convert(t){if(t instanceof Zl)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Zl(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Zl(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}class Kl{constructor(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))}setNorthEast(t){return this._ne=t instanceof Zl?new Zl(t.lng,t.lat):Zl.convert(t),this}setSouthWest(t){return this._sw=t instanceof Zl?new Zl(t.lng,t.lat):Zl.convert(t),this}extend(t){const e=this._sw,n=this._ne;let r,i;if(t instanceof Zl)r=t,i=t;else{if(!(t instanceof Kl))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Kl.convert(t)):this.extend(Zl.convert(t)):this;if(r=t._sw,i=t._ne,!r||!i)return this}return e||n?(e.lng=Math.min(r.lng,e.lng),e.lat=Math.min(r.lat,e.lat),n.lng=Math.max(i.lng,n.lng),n.lat=Math.max(i.lat,n.lat)):(this._sw=new Zl(r.lng,r.lat),this._ne=new Zl(i.lng,i.lat)),this}getCenter(){return new Zl((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Zl(this.getWest(),this.getNorth())}getSouthEast(){return new Zl(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(t){const{lng:e,lat:n}=Zl.convert(t);let r=this._sw.lng<=e&&e<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=e&&e>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&r}static convert(t){return t instanceof Kl?t:t?new Kl(t):t}}const $l=2*Math.PI*Yl;function Jl(t){return $l*Math.cos(t*Math.PI/180)}function Ql(t){return(180+t)/360}function tc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function ec(t,e){return t/Jl(e)}function nc(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}class rc{constructor(t,e,n=0){this.x=+t,this.y=+e,this.z=+n}static fromLngLat(t,e=0){const n=Zl.convert(t);return new rc(Ql(n.lng),tc(n.lat),ec(e,n.lat))}toLngLat(){return new Zl(360*this.x-180,nc(this.y))}toAltitude(){return this.z*Jl(nc(this.y))}meterInMercatorCoordinateUnits(){return 1/$l*(t=nc(this.y),1/Math.cos(t*Math.PI/180));var t}}function ic(t,e,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}class oc{constructor(t,e,n){this.z=t,this.x=e,this.y=n,this.key=uc(0,t,t,e,n)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,n){const r=(o=this.y,a=this.z,s=ic(256*(i=this.x),256*(o=Math.pow(2,a)-o-1),a),u=ic(256*(i+1),256*(o+1),a),s[0]+","+s[1]+","+u[0]+","+u[1]);var i,o,a,s,u;const l=function(t,e,n){let r,i="";for(let o=t;o>0;o--)r=1<<o-1,i+=(e&r?1:0)+(n&r?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===n?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,e>1?"@2x":"").replace(/{quadkey}/g,l).replace(/{bbox-epsg-3857}/g,r)}isChildOf(t){const e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){const e=Math.pow(2,this.z);return new O((t.x*e-this.x)*Vo,(t.y*e-this.y)*Vo)}toString(){return`${this.z}/${this.x}/${this.y}`}}class ac{constructor(t,e){this.wrap=t,this.canonical=e,this.key=uc(t,e.z,e.z,e.x,e.y)}}class sc{constructor(t,e,n,r,i){this.overscaledZ=t,this.wrap=e,this.canonical=new oc(n,+r,+i),this.key=uc(e,t,n,r,i)}clone(){return new sc(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){const e=this.canonical.z-t;return t>this.canonical.z?new sc(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new sc(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)}calculateScaledKey(t,e){const n=this.canonical.z-t;return t>this.canonical.z?uc(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):uc(this.wrap*+e,t,t,this.canonical.x>>n,this.canonical.y>>n)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}children(t){if(this.overscaledZ>=t)return[new sc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const e=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new sc(e,this.wrap,e,n,r),new sc(e,this.wrap,e,n+1,r),new sc(e,this.wrap,e,n,r+1),new sc(e,this.wrap,e,n+1,r+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new sc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new sc(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new ac(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new rc(t.x-this.wrap,t.y))}}function uc(t,e,n,r,i){(t*=2)<0&&(t=-1*t-1);const o=1<<n;return(o*o*t+o*i+r).toString(36)+n.toString(36)+e.toString(36)}Pr("CanonicalTileID",oc),Pr("OverscaledTileID",sc,{omit:["posMatrix"]});class lc{constructor(t,e,n){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(n&&"mapbox"!==n&&"terrarium"!==n)return void d(`"${n}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=e.height;const r=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=n||"mapbox";for(let i=0;i<r;i++)this.data[this._idx(-1,i)]=this.data[this._idx(0,i)],this.data[this._idx(r,i)]=this.data[this._idx(r-1,i)],this.data[this._idx(i,-1)]=this.data[this._idx(i,0)],this.data[this._idx(i,r)]=this.data[this._idx(i,r-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(r,-1)]=this.data[this._idx(r-1,0)],this.data[this._idx(-1,r)]=this.data[this._idx(0,r-1)],this.data[this._idx(r,r)]=this.data[this._idx(r-1,r-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let i=0;i<r;i++)for(let t=0;t<r;t++){const e=this.get(i,t);e>this.max&&(this.max=e),e<this.min&&(this.min=e)}}get(t,e){const n=new Uint8Array(this.data.buffer),r=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(n[r],n[r+1],n[r+2])}getUnpackVector(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]}_idx(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)}_unpackMapbox(t,e,n){return(256*t*256+256*e+n)/10-1e4}_unpackTerrarium(t,e,n){return 256*t+e+n/256-32768}getPixels(){return new ka({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,e,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let r=e*this.dim,i=e*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(e){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}const s=-e*this.dim,u=-n*this.dim;for(let l=o;l<a;l++)for(let e=r;e<i;e++)this.data[this._idx(e,l)]=t.data[this._idx(e+s,l+u)]}}Pr("DEMData",lc);class cc{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e<t.length;e++){const n=t[e];this._stringToNumber[n]=e,this._numberToString[e]=n}}encode(t){return this._stringToNumber[t]}decode(t){return this._numberToString[t]}}class fc{constructor(t,e,n,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=n,t._y=r,this.properties=t.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t}}class hc{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Or(Vo,16,0),this.grid3D=new Or(Vo,16,0),this.featureIndexArray=new Ji,this.promoteId=e}insert(t,e,n,r,i,o){const a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);const s=o?this.grid3D:this.grid;for(let u=0;u<e.length;u++){const t=e[u],n=[1/0,1/0,-1/0,-1/0];for(let e=0;e<t.length;e++){const r=t[e];n[0]=Math.min(n[0],r.x),n[1]=Math.min(n[1],r.y),n[2]=Math.max(n[2],r.x),n[3]=Math.max(n[3],r.y)}n[0]<Vo&&n[1]<Vo&&n[2]>=0&&n[3]>=0&&s.insert(a,n[0],n[1],n[2],n[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new ws.VectorTile(new lu(this.rawTileData)).layers,this.sourceLayerCoder=new cc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,e,n,r){this.loadVTLayers();const i=t.params||{},o=Vo/t.tileSize/t.scale,a=Zn(i.filter),s=t.queryGeometry,u=t.queryPadding*o,l=dc(s),c=this.grid.query(l.minX-u,l.minY-u,l.maxX+u,l.maxY+u),f=dc(t.cameraQueryGeometry),h=this.grid3D.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u,((e,n,r,i)=>function(t,e,n,r,i){for(const a of t)if(e<=a.x&&n<=a.y&&r>=a.x&&i>=a.y)return!0;const o=[new O(e,n),new O(e,i),new O(r,i),new O(r,n)];if(t.length>2)for(const a of o)if(oa(t,a))return!0;for(let a=0;a<t.length-1;a++)if(aa(t[a],t[a+1],o))return!0;return!1}(t.cameraQueryGeometry,e-u,n-u,r+u,i+u)));for(const m of h)c.push(m);c.sort(mc);const p={};let d;for(let m=0;m<c.length;m++){const u=c[m];if(u===d)continue;d=u;const l=this.featureIndexArray.get(u);let f=null;this.loadMatchingFeature(p,l.bucketIndex,l.sourceLayerIndex,l.featureIndex,a,i.layers,i.availableImages,e,n,r,((e,n,r)=>(f||(f=Wo(e)),n.queryIntersectsFeature(s,e,r,f,this.z,t.transform,o,t.pixelPosMatrix))))}return p}loadMatchingFeature(t,e,n,r,i,o,a,u,l,c,f){const h=this.bucketLayerIDs[e];if(o&&!function(t,e){for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1}(o,h))return;const p=this.sourceLayerCoder.decode(n),d=this.vtLayers[p].feature(r);if(i.needGeometry){const t=Xo(d,!0);if(!i.filter(new Qr(this.tileID.overscaledZ),t,this.tileID.canonical))return}else if(!i.filter(new Qr(this.tileID.overscaledZ),d))return;const m=this.getId(d,p);for(let g=0;g<h.length;g++){const e=h[g];if(o&&o.indexOf(e)<0)continue;const n=u[e];if(!n)continue;let i={};m&&c&&(i=c.getState(n.sourceLayer||"_geojsonTileLayer",m));const p=s({},l[e]);p.paint=pc(p.paint,n.paint,d,i,a),p.layout=pc(p.layout,n.layout,d,i,a);const y=!f||f(d,n,i);if(!y)continue;const v=new fc(d,this.z,this.x,this.y,m);v.layer=p;let b=t[e];void 0===b&&(b=t[e]=[]),b.push({featureIndex:r,feature:v,intersectionZ:y})}}lookupSymbolFeatures(t,e,n,r,i,o,a,s){const u={};this.loadVTLayers();const l=Zn(i);for(const c of t)this.loadMatchingFeature(u,n,r,c,l,o,a,s,e);return u}hasLayer(t){for(const e of this.bucketLayerIDs)for(const n of e)if(t===n)return!0;return!1}getId(t,e){let n=t.id;return this.promoteId&&(n=t.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[e]],"boolean"==typeof n&&(n=Number(n))),n}}function pc(t,e,n,r,i){return c(t,((t,o)=>{const a=e instanceof si?e.get(o):null;return a&&a.evaluate?a.evaluate(n,r,i):a}))}function dc(t){let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of t)e=Math.min(e,o.x),n=Math.min(n,o.y),r=Math.max(r,o.x),i=Math.max(i,o.y);return{minX:e,minY:n,maxX:r,maxY:i}}function mc(t,e){return e-t}var gc;Pr("FeatureIndex",hc,{omit:["rawTileData","sourceLayerCoder"]}),t.PerformanceMarkers=void 0,(gc=t.PerformanceMarkers||(t.PerformanceMarkers={})).create="create",gc.load="load",gc.fullLoad="fullLoad";let yc=null,vc=[];const bc=1e3/30,_c={mark(t){performance.mark(t)},frame(t){const e=t;null!=yc&&vc.push(e-yc),yc=e},clearMetrics(){yc=null,vc=[],performance.clearMeasures("loadTime"),performance.clearMeasures("fullLoadTime");for(const e in t.PerformanceMarkers)performance.clearMarks(t.PerformanceMarkers[e])},getPerformanceMetrics(){performance.measure("loadTime",t.PerformanceMarkers.create,t.PerformanceMarkers.load),performance.measure("fullLoadTime",t.PerformanceMarkers.create,t.PerformanceMarkers.fullLoad);const e=performance.getEntriesByName("loadTime")[0].duration,n=performance.getEntriesByName("fullLoadTime")[0].duration,r=vc.length,i=1/(vc.reduce(((t,e)=>t+e),0)/r/1e3),o=vc.filter((t=>t>bc)).reduce(((t,e)=>t+(e-bc)/bc),0);return{loadTime:e,fullLoadTime:n,fps:i,percentDroppedFrames:o/(r+o)*100}}};t.AJAXError=G,t.ARRAY_TYPE=pa,t.Actor=class{constructor(t,e,n){this.target=t,this.parent=e,this.mapId=n,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},l(["receive","process"],this),this.invoker=new Xl(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=y()?t:window}send(t,e,n,r,i=!1){const o=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(this.callbacks[o]=n);const a=w(this.globalScope)?void 0:[];return this.target.postMessage({id:o,type:t,hasCallback:!!n,targetMapId:r,mustQueue:i,sourceMapId:this.mapId,data:Tr(e,a)},a),{cancel:()=>{n&&delete this.callbacks[o],this.target.postMessage({id:o,type:"<cancel>",targetMapId:r,sourceMapId:this.mapId})}}}receive(t){const e=t.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){delete this.tasks[n];const t=this.cancelCallbacks[n];delete this.cancelCallbacks[n],t&&t()}else y()||e.mustQueue?(this.tasks[n]=e,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,e)}process(){if(!this.taskQueue.length)return;const t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,e){if("<response>"===e.type){const n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(kr(e.error)):n(null,kr(e.data)))}else{let n=!1;const r=w(this.globalScope)?void 0:[],i=e.hasCallback?(e,i)=>{n=!0,delete this.cancelCallbacks[t],this.target.postMessage({id:t,type:"<response>",sourceMapId:this.mapId,error:e?Tr(e):null,data:Tr(i,r)},r)}:t=>{n=!0};let o=null;const a=kr(e.data);if(this.parent[e.type])o=this.parent[e.type](e.sourceMapId,a,i);else if(this.parent.getWorkerSource){const t=e.type.split(".");o=this.parent.getWorkerSource(e.sourceMapId,t[0],a.source)[t[1]](a,i)}else i(new Error(`Could not find function ${e.type}`));!n&&o&&o.cancel&&(this.cancelCallbacks[t]=o.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},t.AlphaImage=Ta,t.CanonicalTileID=oc,t.CollisionBoxArray=qi,t.CollisionCircleLayoutArray=class extends Li{},t.Color=Mt,t.DEMData=lc,t.DataConstantProperty=ui,t.DictionaryCoder=cc,t.EXTENT=Vo,t.ErrorEvent=et,t.EvaluationParameters=Qr,t.Event=tt,t.Evented=nt,t.FeatureIndex=hc,t.FillBucket=gs,t.FillExtrusionBucket=Ds,t.GeoJSONFeature=fc,t.ImageAtlas=Du,t.ImagePosition=Nu,t.LineBucket=Ks,t.LineStripIndexArray=class extends Ui{},t.LngLat=Zl,t.LngLatBounds=Kl,t.MercatorCoordinate=rc,t.ONE_EM=uu,t.OverscaledTileID=sc,t.PerformanceUtils=_c,t.PosArray=Qi,t.Properties=pi,t.QuadTriangleArray=class extends Mi{},t.RGBAImage=ka,t.RasterBoundsArray=class extends wi{},t.RequestPerformance=class{constructor(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let t=performance.getEntriesByName(this._marks.measure);return 0===t.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),t=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),t}},t.ResourceType=U,t.SegmentVector=go,t.SymbolBucket=Dl,t.Transitionable=ni,t.TriangleIndexArray=fo,t.Uniform1f=To,t.Uniform1i=class extends Co{constructor(t,e){super(t,e),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))}},t.Uniform2f=class extends Co{constructor(t,e){super(t,e),this.current=[0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))}},t.Uniform3f=class extends Co{constructor(t,e){super(t,e),this.current=[0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))}},t.Uniform4f=ko,t.UniformColor=Io,t.UniformMatrix4f=class extends Co{constructor(t,e){super(t,e),this.current=Lo}set(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(let e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}}},t.UnwrappedTileID=ac,t.ValidationError=it,t.ZoomHistory=Ir,t.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},t.addDynamicAttributes=jl,t.asyncAll=function(t,e,n){if(!t.length)return n(null,[]);let r=t.length;const i=new Array(t.length);let o=null;t.forEach(((t,a)=>{e(t,((t,e)=>{t&&(o=t),i[a]=e,0==--r&&n(o,i)}))}))},t.bezier=r,t.bindAll=l,t.cacheEntryPossiblyAdded=function(t){M++,M>L&&(t.getActor().send("enforceCacheSizeLimit",I),M=0)},t.clamp=o,t.clearTileCache=function(t){const e=caches.delete(C);t&&e.catch(t).then((()=>t()))},t.clipLine=cl,t.clone=function(t){var e=new pa(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=h,t.clone$2=function(t){var e=new pa(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=ou,t.config=P,t.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],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},t.create=function(){var t=new pa(16);return pa!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=da,t.createExpression=Rn,t.createFilter=Zn,t.createLayout=bi,t.createStyleLayer=function(t){return"custom"===t.type?new Hl(t):new Wl[t.type](t)},t.cross=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.dot$1=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},t.ease=i,t.emitValidationErrors=Er,t.enforceCacheSizeLimit=function(t){j(),T&&T.then((e=>{e.keys().then((n=>{for(let r=0;r<n.length-t;r++)e.delete(n[r])}))}))},t.equals=function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],p=t[11],d=t[12],m=t[13],g=t[14],y=t[15],v=e[0],b=e[1],_=e[2],A=e[3],w=e[4],x=e[5],E=e[6],O=e[7],S=e[8],P=e[9],C=e[10],T=e[11],k=e[12],I=e[13],L=e[14],j=e[15];return Math.abs(n-v)<=ha*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-b)<=ha*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-_)<=ha*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-A)<=ha*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(a-w)<=ha*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-x)<=ha*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(u-E)<=ha*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(l-O)<=ha*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(c-S)<=ha*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-P)<=ha*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(h-C)<=ha*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(p-T)<=ha*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(d-k)<=ha*Math.max(1,Math.abs(d),Math.abs(k))&&Math.abs(m-I)<=ha*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(g-L)<=ha*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(y-j)<=ha*Math.max(1,Math.abs(y),Math.abs(j))},t.evaluateSizeForFeature=function(t,{uSize:e,uSizeT:n},{lowerSize:r,upperSize:i}){return"source"===t.kind?r/tl:"composite"===t.kind?Oe(r/tl,i/tl,n):e},t.evaluateSizeForZoom=function(t,e){let n=0,r=0;if("constant"===t.kind)r=t.layoutSize;else if("source"!==t.kind){const{interpolationType:i,minZoom:a,maxZoom:s}=t,u=i?o(qe.interpolationFactor(i,e,a,s),0,1):0;"camera"===t.kind?r=Oe(t.minSize,t.maxSize,u):n=u}return{uSizeT:n,uSize:r}},t.evaluateVariableOffset=xl,t.evented=Zr,t.exported=E,t.exported$1=R,t.extend=s,t.filterObject=f,t.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.getAnchorAlignment=Ku,t.getAnchorJustification=El,t.getArrayBuffer=W,t.getImage=$,t.getJSON=function(t,e){return H(s(t,{type:"json"}),e)},t.getOverlapMode=Gl,t.getRTLTextPluginStatus=Kr,t.getReferrer=V,t.getVideo=function(t,e){const n=window.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(let r=0;r<t.length;r++){const e=window.document.createElement("source");X(t[r])||(n.crossOrigin="Anonymous"),e.src=t[r],n.appendChild(e)}return{cancel:()=>{}}},t.identity=ma,t.invert=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],m=e[13],g=e[14],y=e[15],v=n*s-r*a,b=n*u-i*a,_=n*l-o*a,A=r*u-i*s,w=r*l-o*s,x=i*l-o*u,E=c*m-f*d,O=c*g-h*d,S=c*y-p*d,P=f*g-h*m,C=f*y-p*m,T=h*y-p*g,k=v*T-b*C+_*P+A*S-w*O+x*E;return k?(t[0]=(s*T-u*C+l*P)*(k=1/k),t[1]=(i*C-r*T-o*P)*k,t[2]=(m*x-g*w+y*A)*k,t[3]=(h*w-f*x-p*A)*k,t[4]=(u*S-a*T-l*O)*k,t[5]=(n*T-i*S+o*O)*k,t[6]=(g*_-d*x-y*b)*k,t[7]=(c*x-h*_+p*b)*k,t[8]=(a*C-s*S+l*E)*k,t[9]=(r*S-n*C-o*E)*k,t[10]=(d*w-m*_+y*v)*k,t[11]=(f*_-c*w-p*v)*k,t[12]=(s*O-a*P-u*E)*k,t[13]=(n*P-r*O+i*E)*k,t[14]=(m*b-d*A-g*v)*k,t[15]=(c*A-f*b+h*v)*k,t):null},t.isImageBitmap=x,t.isSafari=w,t.isWorker=y,t.keysDifference=function(t,e){const n=[];for(const r in t)r in e||n.push(r);return n},t.lazyLoadRTLTextPlugin=function(){Jr.isLoading()||Jr.isLoaded()||"deferred"!==Kr()||$r()},t.makeRequest=H,t.mapObject=c,t.mercatorXfromLng=Ql,t.mercatorYfromLat=tc,t.mercatorZfromAltitude=ec,t.mul=va,t.mul$1=function(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},t.multiply=ga,t.nextPowerOfTwo=function(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},t.normalize=function(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},t.number=Oe,t.ortho=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,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*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t},t.parseCacheControl=v,t.parseGlyphPbf=function(t){return new lu(t).readFields(Lu,[])},t.pbf=lu,t.performSymbolLayout=function(e){e.bucket.createArrays(),e.bucket.tilePixelRatio=Vo/(512*e.bucket.overscaling),e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;const n=e.bucket.layers[0].layout,r=e.bucket.layers[0]._unevaluatedLayout._values,i={layoutIconSize:r["icon-size"].possiblyEvaluate(new Qr(e.bucket.zoom+1),e.canonical),layoutTextSize:r["text-size"].possiblyEvaluate(new Qr(e.bucket.zoom+1),e.canonical),textMaxSize:r["text-size"].possiblyEvaluate(new Qr(18))};if("composite"===e.bucket.textSizeData.kind){const{minZoom:t,maxZoom:n}=e.bucket.textSizeData;i.compositeTextSizes=[r["text-size"].possiblyEvaluate(new Qr(t),e.canonical),r["text-size"].possiblyEvaluate(new Qr(n),e.canonical)]}if("composite"===e.bucket.iconSizeData.kind){const{minZoom:t,maxZoom:n}=e.bucket.iconSizeData;i.compositeIconSizes=[r["icon-size"].possiblyEvaluate(new Qr(t),e.canonical),r["icon-size"].possiblyEvaluate(new Qr(n),e.canonical)]}const o=n.get("text-line-height")*uu,a="viewport"!==n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement"),s=n.get("text-keep-upright"),u=n.get("text-size");for(const l of e.bucket.features){const r=n.get("text-font").evaluate(l,{},e.canonical).join(","),c=u.evaluate(l,{},e.canonical),f=i.layoutTextSize.evaluate(l,{},e.canonical),h=i.layoutIconSize.evaluate(l,{},e.canonical),p={horizontal:{},vertical:void 0},m=l.text;let g,y=[0,0];if(m){const i=m.toString(),u=n.get("text-letter-spacing").evaluate(l,{},e.canonical)*uu,h=Mr(i)?u:0,d=n.get("text-anchor").evaluate(l,{},e.canonical),g=n.get("text-variable-anchor");if(!g){const t=n.get("text-radial-offset").evaluate(l,{},e.canonical);y=t?xl(d,[t*uu,wl]):n.get("text-offset").evaluate(l,{},e.canonical).map((t=>t*uu))}let v=a?"center":n.get("text-justify").evaluate(l,{},e.canonical);const b=n.get("symbol-placement"),_="point"===b?n.get("text-max-width").evaluate(l,{},e.canonical)*uu:0,A=()=>{e.bucket.allowVerticalPlacement&&jr(i)&&(p.vertical=Uu(m,e.glyphMap,e.glyphPositions,e.imagePositions,r,_,o,d,"left",h,y,t.WritingMode.vertical,!0,b,f,c))};if(!a&&g){const n="auto"===v?g.map((t=>El(t))):[v];let i=!1;for(let a=0;a<n.length;a++){const s=n[a];if(!p.horizontal[s])if(i)p.horizontal[s]=p.horizontal[0];else{const n=Uu(m,e.glyphMap,e.glyphPositions,e.imagePositions,r,_,o,"center",s,h,y,t.WritingMode.horizontal,!1,b,f,c);n&&(p.horizontal[s]=n,i=1===n.positionedLines.length)}}A()}else{"auto"===v&&(v=El(d));const n=Uu(m,e.glyphMap,e.glyphPositions,e.imagePositions,r,_,o,d,v,h,y,t.WritingMode.horizontal,!1,b,f,c);n&&(p.horizontal[v]=n),A(),jr(i)&&a&&s&&(p.vertical=Uu(m,e.glyphMap,e.glyphPositions,e.imagePositions,r,_,o,d,v,h,y,t.WritingMode.vertical,!1,b,f,c))}}let v=!1;if(l.icon&&l.icon.name){const t=e.imageMap[l.icon.name];t&&(g=Ju(e.imagePositions[l.icon.name],n.get("icon-offset").evaluate(l,{},e.canonical),n.get("icon-anchor").evaluate(l,{},e.canonical)),v=!!t.sdf,void 0===e.bucket.sdfIcons?e.bucket.sdfIcons=v:e.bucket.sdfIcons!==v&&d("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.bucket.pixelRatio||0!==n.get("icon-rotate").constantOr(1))&&(e.bucket.iconsNeedLinear=!0))}const b=Cl(p.horizontal)||p.vertical;e.bucket.iconsInText=!!b&&b.iconsInText,(b||g)&&Ol(e.bucket,l,p,g,e.imageMap,i,f,h,y,v,e.canonical)}e.showCollisionBoxes&&e.bucket.generateCollisionDebugBuffers()},t.perspective=function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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?(t[10]=(i+r)*(o=1/(r-i)),t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},t.pick=function(t,e){const n={};for(let r=0;r<e.length;r++){const i=e[r];i in t&&(n[i]=t[i])}return n},t.plugin=Jr,t.pointGeometry=O,t.polygonIntersectsPolygon=Ko,t.potpack=Ru,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=Pr,t.registerForPluginStateChange=function(t){return t({pluginStatus:Hr,pluginURL:Wr}),Zr.on("pluginStateChange",t),t},t.renderColorRamp=Ia,t.rotateX=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],h=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+l*r,t[5]=a*i+c*r,t[6]=s*i+f*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=f*i-s*r,t[11]=h*i-u*r,t},t.rotateZ=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=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+l*r,t[1]=a*i+c*r,t[2]=s*i+f*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=f*i-s*r,t[7]=h*i-u*r,t},t.scale=function(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},t.scale$1=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},t.setCacheLimits=function(t,e){I=t,L=e},t.setRTLTextPlugin=function(t,e,n=!1){if(Hr===Ur||Hr===Gr||Hr===Vr)throw new Error("setRTLTextPlugin cannot be called multiple times.");Wr=E.resolveURL(t),Hr=Ur,qr=e,Yr(),n||$r()},t.spec=rt,t.sphericalToCartesian=function([t,e,n]){return e+=90,e*=Math.PI/180,n*=Math.PI/180,{x:t*Math.cos(e)*Math.sin(n),y:t*Math.sin(e)*Math.sin(n),z:t*Math.cos(n)}},t.sqrLen=function(t){var e=t[0],n=t[1];return e*e+n*n},t.sub=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},t.toEvaluationFeature=Xo,t.transformMat3=function(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},t.transformMat4=Aa,t.transformMat4$1=function(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},t.translate=function(t,e,n){var r,i,o,a,s,u,l,c,f,h,p,d,m=n[0],g=n[1],y=n[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*y+e[12],t[13]=e[1]*m+e[5]*g+e[9]*y+e[13],t[14]=e[2]*m+e[6]*g+e[10]*y+e[14],t[15]=e[3]*m+e[7]*g+e[11]*y+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=r=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=r*m+s*g+f*y+e[12],t[13]=i*m+u*g+h*y+e[13],t[14]=o*m+l*g+p*y+e[14],t[15]=a*m+c*g+d*y+e[15]),t},t.triggerPluginCompletionEvent=Xr,t.unicodeBlockLookup=Lr,t.uniqueId=function(){return u++},t.validateCustomStyleLayer=function(t){const e=[],n=t.id;return void 0===n&&e.push({message:`layers.${n}: missing required property "id"`}),void 0===t.render&&e.push({message:`layers.${n}: missing required method "render"`}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:`layers.${n}: property "renderingMode" must be either "2d" or "3d"`}),e},t.validateLight=Ar,t.validateStyle=_r,t.vectorTile=ws,t.warnOnce=d,t.wrap=a})),r(["./shared"],(function(t){function e(t){const n=typeof t;if("number"===n||"boolean"===n||"string"===n||null==t)return JSON.stringify(t);if(Array.isArray(t)){let n="[";for(const r of t)n+=`${e(r)},`;return`${n}]`}const r=Object.keys(t).sort();let i="{";for(let o=0;o<r.length;o++)i+=`${JSON.stringify(r[o])}:${e(t[r[o]])},`;return`${i}}`}function n(n){let r="";for(const i of t.refProperties)r+=`/${e(n[i])}`;return r}class r{constructor(t){this.keyCache={},t&&this.replace(t)}replace(t){this._layerConfigs={},this._layers={},this.update(t,[])}update(e,r){for(const n of e){this._layerConfigs[n.id]=n;const e=this._layers[n.id]=t.createStyleLayer(n);e._featureFilter=t.createFilter(e.filter),this.keyCache[n.id]&&delete this.keyCache[n.id]}for(const t of r)delete this.keyCache[t],delete this._layerConfigs[t],delete this._layers[t];this.familiesBySource={};const i=function(t,e){const r={};for(let o=0;o<t.length;o++){const i=e&&e[t[o].id]||n(t[o]);e&&(e[t[o].id]=i);let a=r[i];a||(a=r[i]=[]),a.push(t[o])}const i=[];for(const n in r)i.push(r[n]);return i}(Object.values(this._layerConfigs),this.keyCache);for(const t of i){const e=t.map((t=>this._layers[t.id])),n=e[0];if("none"===n.visibility)continue;const r=n.source||"";let i=this.familiesBySource[r];i||(i=this.familiesBySource[r]={});const o=n.sourceLayer||"_geojsonTileLayer";let a=i[o];a||(a=i[o]=[]),a.push(e)}}}class i{constructor(e){const n={},r=[];for(const t in e){const i=e[t],o=n[t]={};for(const t in i){const e=i[+t];if(!e||0===e.bitmap.width||0===e.bitmap.height)continue;const n={x:0,y:0,w:e.bitmap.width+2,h:e.bitmap.height+2};r.push(n),o[t]={rect:n,metrics:e.metrics}}}const{w:i,h:o}=t.potpack(r),a=new t.AlphaImage({width:i||1,height:o||1});for(const s in e){const r=e[s];for(const e in r){const i=r[+e];if(!i||0===i.bitmap.width||0===i.bitmap.height)continue;const o=n[s][e].rect;t.AlphaImage.copy(i.bitmap,a,{x:0,y:0},{x:o.x+1,y:o.y+1},i.bitmap)}}this.image=a,this.positions=n}}t.register("GlyphAtlas",i);class o{constructor(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId}parse(e,n,r,o,s){this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;const u=new t.DictionaryCoder(Object.keys(e.layers).sort()),l=new t.FeatureIndex(this.tileID,this.promoteId);l.bucketLayerIDs=[];const c={},f={featureIndex:l,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:r},h=n.familiesBySource[this.source];for(const i in h){const n=e.layers[i];if(!n)continue;1===n.version&&t.warnOnce(`Vector tile source "${this.source}" layer "${i}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const o=u.encode(i),s=[];for(let t=0;t<n.length;t++){const e=n.feature(t),r=l.getId(e,i);s.push({feature:e,id:r,index:t,sourceLayerIndex:o})}for(const t of h[i]){const e=t[0];e.minzoom&&this.zoom<Math.floor(e.minzoom)||e.maxzoom&&this.zoom>=e.maxzoom||"none"!==e.visibility&&(a(t,this.zoom,r),(c[e.id]=e.createBucket({index:l.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:o,sourceID:this.source})).populate(s,f,this.tileID.canonical),l.bucketLayerIDs.push(t.map((t=>t.id))))}}let p,d,m,g;const y=t.mapObject(f.glyphDependencies,(t=>Object.keys(t).map(Number)));Object.keys(y).length?o.send("getGlyphs",{uid:this.uid,stacks:y},((t,e)=>{p||(p=t,d=e,_.call(this))})):d={};const v=Object.keys(f.iconDependencies);v.length?o.send("getImages",{icons:v,source:this.source,tileID:this.tileID,type:"icons"},((t,e)=>{p||(p=t,m=e,_.call(this))})):m={};const b=Object.keys(f.patternDependencies);function _(){if(p)return s(p);if(d&&m&&g){const e=new i(d),n=new t.ImageAtlas(m,g);for(const i in c){const o=c[i];o instanceof t.SymbolBucket?(a(o.layers,this.zoom,r),t.performSymbolLayout({bucket:o,glyphMap:d,glyphPositions:e.positions,imageMap:m,imagePositions:n.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):o.hasPattern&&(o instanceof t.LineBucket||o instanceof t.FillBucket||o instanceof t.FillExtrusionBucket)&&(a(o.layers,this.zoom,r),o.addFeatures(f,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:Object.values(c).filter((t=>!t.isEmpty())),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?d:null,iconMap:this.returnDependencies?m:null,glyphPositions:this.returnDependencies?e.positions:null})}}b.length?o.send("getImages",{icons:b,source:this.source,tileID:this.tileID,type:"patterns"},((t,e)=>{p||(p=t,g=e,_.call(this))})):g={},_.call(this)}}function a(e,n,r){const i=new t.EvaluationParameters(n);for(const t of e)t.recalculate(i,r)}function s(e,n){const r=t.getArrayBuffer(e.request,((e,r,i,o)=>{e?n(e):r&&n(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(r)),rawData:r,cacheControl:i,expires:o})}));return()=>{r.cancel(),n()}}class u{constructor(t,e,n,r){this.actor=t,this.layerIndex=e,this.availableImages=n,this.loadVectorData=r||s,this.loading={},this.loaded={}}loadTile(e,n){const r=e.uid;this.loading||(this.loading={});const i=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),a=this.loading[r]=new o(e);a.abort=this.loadVectorData(e,((e,o)=>{if(delete this.loading[r],e||!o)return a.status="done",this.loaded[r]=a,n(e);const s=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);const l={};if(i){const t=i.finish();t&&(l.resourceTiming=JSON.parse(JSON.stringify(t)))}a.vectorTile=o.vectorTile,a.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,((e,r)=>{if(e||!r)return n(e);n(null,t.extend({rawTileData:s.slice(0)},r,u,l))})),this.loaded=this.loaded||{},this.loaded[r]=a}))}reloadTile(t,e){const n=this.loaded,r=t.uid,i=this;if(n&&n[r]){const o=n[r];o.showCollisionBoxes=t.showCollisionBoxes;const a=(t,n)=>{const r=o.reloadCallback;r&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,this.availableImages,i.actor,r)),e(t,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(t,e){const n=this.loading,r=t.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),e()}removeTile(t,e){const n=this.loaded,r=t.uid;n&&n[r]&&delete n[r],e()}}class l{constructor(){this.loaded={}}loadTile(e,n){const{uid:r,encoding:i,rawImageData:o}=e,a=t.isImageBitmap(o)?this.getImageData(o):o,s=new t.DEMData(r,a,i);this.loaded=this.loaded||{},this.loaded[r]=s,n(null,s)}getImageData(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);const n=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:n.width,height:n.height},n.data)}removeTile(t){const e=this.loaded,n=t.uid;e&&e[n]&&delete e[n]}}var c=function t(e,n){var r,i=e&&e.type;if("FeatureCollection"===i)for(r=0;r<e.features.length;r++)t(e.features[r],n);else if("GeometryCollection"===i)for(r=0;r<e.geometries.length;r++)t(e.geometries[r],n);else if("Feature"===i)t(e.geometry,n);else if("Polygon"===i)f(e.coordinates,n);else if("MultiPolygon"===i)for(r=0;r<e.coordinates.length;r++)f(e.coordinates[r],n);return e};function f(t,e){if(0!==t.length){h(t[0],e);for(var n=1;n<t.length;n++)h(t[n],!e)}}function h(t,e){for(var n=0,r=0,i=0,o=t.length,a=o-1;i<o;a=i++){var s=(t[i][0]-t[a][0])*(t[a][1]+t[i][1]),u=n+s;r+=Math.abs(n)>=Math.abs(s)?n-u+s:s-u+n,n=u}n+r>=0!=!!e&&t.reverse()}const p=t.vectorTile.VectorTileFeature.prototype.toGeoJSON;class d{constructor(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))}loadGeometry(){if(1===this._feature.type){const e=[];for(const n of this._feature.geometry)e.push([new t.pointGeometry(n[0],n[1])]);return e}{const e=[];for(const n of this._feature.geometry){const r=[];for(const e of n)r.push(new t.pointGeometry(e[0],e[1]));e.push(r)}return e}}toGeoJSON(t,e,n){return p.call(this,t,e,n)}}class m{constructor(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e}feature(t){return new d(this._features[t])}}var g={exports:{}},y=t.pointGeometry,v=t.vectorTile.VectorTileFeature,b=_;function _(t,e){this.options=e||{},this.features=t,this.length=t.length}function A(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}_.prototype.feature=function(t){return new A(this.features[t],this.options.extent)},A.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var n=t[e],r=[],i=0;i<n.length;i++)r.push(new y(n[i][0],n[i][1]));this.geometry.push(r)}return this.geometry},A.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,n=-1/0,r=1/0,i=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var u=a[s];e=Math.min(e,u.x),n=Math.max(n,u.x),r=Math.min(r,u.y),i=Math.max(i,u.y)}return[e,r,n,i]},A.prototype.toGeoJSON=v.prototype.toGeoJSON;var w=t.pbf,x=b;function E(t){var e=new w;return function(t,e){for(var n in t.layers)e.writeMessage(3,O,t.layers[n])}(t,e),e.finish()}function O(t,e){var n;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<t.length;n++)r.feature=t.feature(n),e.writeMessage(2,S,r);var i=r.keys;for(n=0;n<i.length;n++)e.writeStringField(3,i[n]);var o=r.values;for(n=0;n<o.length;n++)e.writeMessage(4,I,o[n])}function S(t,e){var n=t.feature;void 0!==n.id&&e.writeVarintField(1,n.id),e.writeMessage(2,P,t),e.writeVarintField(3,n.type),e.writeMessage(4,k,n)}function P(t,e){var n=t.feature,r=t.keys,i=t.values,o=t.keycache,a=t.valuecache;for(var s in n.properties){var u=n.properties[s],l=o[s];if(null!==u){void 0===l&&(r.push(s),o[s]=l=r.length-1),e.writeVarint(l);var c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var f=c+":"+u,h=a[f];void 0===h&&(i.push(u),a[f]=h=i.length-1),e.writeVarint(h)}}}function C(t,e){return(e<<3)+(7&t)}function T(t){return t<<1^t>>31}function k(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;s<a;s++){var u=n[s],l=1;1===r&&(l=u.length),e.writeVarint(C(1,l));for(var c=3===r?u.length-1:u.length,f=0;f<c;f++){1===f&&1!==r&&e.writeVarint(C(2,c-1));var h=u[f].x-i,p=u[f].y-o;e.writeVarint(T(h)),e.writeVarint(T(p)),i+=h,o+=p}3===r&&e.writeVarint(C(7,1))}}function I(t,e){var n=typeof t;"string"===n?e.writeStringField(1,t):"boolean"===n?e.writeBooleanField(7,t):"number"===n&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function L(t,e,n,r,i,o){if(i-r<=n)return;const a=r+i>>1;j(t,e,a,r,i,o%2),L(t,e,n,r,a-1,o+1),L(t,e,n,a+1,i,o+1)}function j(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);j(t,e,n,Math.max(r,Math.floor(n-s*l/a+c)),Math.min(i,Math.floor(n+(a-s)*l/a+c)),o)}const a=e[2*n+o];let s=r,u=i;for(M(t,e,r,n),e[2*i+o]>a&&M(t,e,r,i);s<u;){for(M(t,e,s,u),s++,u--;e[2*s+o]<a;)s++;for(;e[2*u+o]>a;)u--}e[2*r+o]===a?M(t,e,r,u):(u++,M(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function M(t,e,n,r){R(t,n,r),R(e,2*n,2*r),R(e,2*n+1,2*r+1)}function R(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function N(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}g.exports=E,g.exports.fromVectorTileJs=E,g.exports.fromGeojsonVt=function(t,e){e=e||{};var n={};for(var r in t)n[r]=new x(t[r].features,e),n[r].name=r,n[r].version=e.version,n[r].extent=e.extent;return E({layers:n})},g.exports.GeoJSONWrapper=x;const D=t=>t[0],F=t=>t[1];class B{constructor(t,e=D,n=F,r=64,i=Float64Array){this.nodeSize=r,this.points=t;const o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new i(2*t.length);for(let u=0;u<t.length;u++)a[u]=u,s[2*u]=e(t[u]),s[2*u+1]=n(t[u]);L(a,s,r,0,a.length-1,0)}range(t,e,n,r){return function(t,e,n,r,i,o,a){const s=[0,t.length-1,0],u=[];let l,c;for(;s.length;){const f=s.pop(),h=s.pop(),p=s.pop();if(h-p<=a){for(let a=p;a<=h;a++)l=e[2*a],c=e[2*a+1],l>=n&&l<=i&&c>=r&&c<=o&&u.push(t[a]);continue}const d=Math.floor((p+h)/2);l=e[2*d],c=e[2*d+1],l>=n&&l<=i&&c>=r&&c<=o&&u.push(t[d]);const m=(f+1)%2;(0===f?n<=l:r<=c)&&(s.push(p),s.push(d-1),s.push(m)),(0===f?i>=l:o>=c)&&(s.push(d+1),s.push(h),s.push(m))}return u}(this.ids,this.coords,t,e,n,r,this.nodeSize)}within(t,e,n){return function(t,e,n,r,i,o){const a=[0,t.length-1,0],s=[],u=i*i;for(;a.length;){const l=a.pop(),c=a.pop(),f=a.pop();if(c-f<=o){for(let i=f;i<=c;i++)N(e[2*i],e[2*i+1],n,r)<=u&&s.push(t[i]);continue}const h=Math.floor((f+c)/2),p=e[2*h],d=e[2*h+1];N(p,d,n,r)<=u&&s.push(t[h]);const m=(l+1)%2;(0===l?n-i<=p:r-i<=d)&&(a.push(f),a.push(h-1),a.push(m)),(0===l?n+i>=p:r+i>=d)&&(a.push(h+1),a.push(c),a.push(m))}return s}(this.ids,this.coords,t,e,n,this.nodeSize)}}const z={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},U=Math.fround||(G=new Float32Array(1),t=>(G[0]=+t,G[0]));var G;class V{constructor(t){this.options=$(Object.create(z),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:n,maxZoom:r,nodeSize:i}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;let a=[];for(let s=0;s<t.length;s++)t[s].geometry&&a.push(H(t[s],s));this.trees[r+1]=new B(a,J,Q,i,Float32Array),e&&console.timeEnd(o);for(let s=r;s>=n;s--){const t=+Date.now();a=this._cluster(a,s),this.trees[s]=new B(a,J,Q,i,Float32Array),e&&console.log("z%d: %d clusters in %dms",s,a.length,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const t=this.getClusters([n,r,180,o],e),a=this.getClusters([-180,r,i,o],e);return t.concat(a)}const a=this.trees[this._limitZoom(e)],s=a.range(Y(n),Z(o),Y(i),Z(r)),u=[];for(const l of s){const t=a.points[l];u.push(t.numPoints?W(t):this.points[t.index])}return u}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.points[e];if(!o)throw new Error(r);const a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i.within(o.x,o.y,a),u=[];for(const l of s){const e=i.points[l];e.parentId===t&&u.push(e.numPoints?W(e):this.points[e.index])}if(0===u.length)throw new Error(r);return u}getLeaves(t,e,n){const r=[];return this._appendLeaves(r,t,e=e||10,n=n||0,0),r}getTile(t,e,n){const r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:a}=this.options,s=a/o,u=(n-s)/i,l=(n+1+s)/i,c={features:[]};return this._addTileFeatures(r.range((e-s)/i,u,(e+1+s)/i,l),r.points,e,n,i,c),0===e&&this._addTileFeatures(r.range(1-s/i,u,1,l),r.points,i,n,i,c),e===i-1&&this._addTileFeatures(r.range(0,u,s/i,l),r.points,-1,n,i,c),c.features.length?c:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}_appendLeaves(t,e,n,r,i){const o=this.getChildren(e);for(const a of o){const e=a.properties;if(e&&e.cluster?i+e.point_count<=r?i+=e.point_count:i=this._appendLeaves(t,e.cluster_id,n,r,i):i<r?i++:t.push(a),t.length===n)break}return i}_addTileFeatures(t,e,n,r,i,o){for(const a of t){const t=e[a],s=t.numPoints;let u,l,c;if(s)u=X(t),l=t.x,c=t.y;else{const e=this.points[t.index];u=e.properties,l=Y(e.geometry.coordinates[0]),c=Z(e.geometry.coordinates[1])}const f={type:1,geometry:[[Math.round(this.options.extent*(l*i-n)),Math.round(this.options.extent*(c*i-r))]],tags:u};let h;s?h=t.id:this.options.generateId?h=t.index:this.points[t.index].id&&(h=this.points[t.index].id),void 0!==h&&(f.id=h),o.features.push(f)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const n=[],{radius:r,extent:i,reduce:o,minPoints:a}=this.options,s=r/(i*Math.pow(2,e));for(let u=0;u<t.length;u++){const r=t[u];if(r.zoom<=e)continue;r.zoom=e;const i=this.trees[e+1],l=i.within(r.x,r.y,s),c=r.numPoints||1;let f=c;for(const t of l){const n=i.points[t];n.zoom>e&&(f+=n.numPoints||1)}if(f>c&&f>=a){let t=r.x*c,a=r.y*c,s=o&&c>1?this._map(r,!0):null;const h=(u<<5)+(e+1)+this.points.length;for(const n of l){const u=i.points[n];if(u.zoom<=e)continue;u.zoom=e;const l=u.numPoints||1;t+=u.x*l,a+=u.y*l,u.parentId=h,o&&(s||(s=this._map(r,!0)),o(s,this._map(u)))}r.parentId=h,n.push(q(t/f,a/f,h,f,s))}else if(n.push(r),f>1)for(const t of l){const r=i.points[t];r.zoom<=e||(r.zoom=e,n.push(r))}}return n}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?$({},t.properties):t.properties;const n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?$({},r):r}}function q(t,e,n,r,i){return{x:U(t),y:U(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function H(t,e){const[n,r]=t.geometry.coordinates;return{x:U(Y(n)),y:U(Z(r)),zoom:1/0,index:e,parentId:-1}}function W(t){return{type:"Feature",id:t.id,properties:X(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),K(t.y)]}};var e}function X(t){const e=t.numPoints,n=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?Math.round(e/100)/10+"k":e;return $($({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function Y(t){return t/360+.5}function Z(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function K(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function $(t,e){for(const n in e)t[n]=e[n];return t}function J(t){return t.x}function Q(t){return t.y}function tt(t,e,n,r){for(var i,o=r,a=n-e>>1,s=n-e,u=t[e],l=t[e+1],c=t[n],f=t[n+1],h=e+3;h<n;h+=3){var p=et(t[h],t[h+1],u,l,c,f);if(p>o)i=h,o=p;else if(p===o){var d=Math.abs(h-a);d<s&&(i=h,s=d)}}o>r&&(i-e>3&&tt(t,e,i,r),t[i+2]=o,n-i>3&&tt(t,i,n,r))}function et(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var u=((t-n)*a+(e-r)*s)/(a*a+s*s);u>1?(n=i,r=o):u>0&&(n+=a*u,r+=s*u)}return(a=t-n)*a+(s=e-r)*s}function nt(t,e,n,r){var i={id:void 0===t?null:t,type:e,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)rt(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<e.length;r++)rt(t,e[r]);else if("MultiPolygon"===n)for(r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)rt(t,e[r][i])}(i),i}function rt(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function it(t,e,n,r){if(e.geometry){var i=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],u=e.id;if(n.promoteId?u=e.properties[n.promoteId]:n.generateId&&(u=r||0),"Point"===o)ot(i,s);else if("MultiPoint"===o)for(var l=0;l<i.length;l++)ot(i[l],s);else if("LineString"===o)at(i,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(l=0;l<i.length;l++)at(i[l],s=[],a,!1),t.push(nt(u,"LineString",s,e.properties));return}st(i,s,a,!1)}else if("Polygon"===o)st(i,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(l=0;l<e.geometry.geometries.length;l++)it(t,{id:u,geometry:e.geometry.geometries[l],properties:e.properties},n,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(l=0;l<i.length;l++){var c=[];st(i[l],c,a,!0),s.push(c)}}t.push(nt(u,o,s,e.properties))}}function ot(t,e){e.push(ut(t[0])),e.push(lt(t[1])),e.push(0)}function at(t,e,n,r){for(var i,o,a=0,s=0;s<t.length;s++){var u=ut(t[s][0]),l=lt(t[s][1]);e.push(u),e.push(l),e.push(0),s>0&&(a+=r?(i*l-u*o)/2:Math.sqrt(Math.pow(u-i,2)+Math.pow(l-o,2))),i=u,o=l}var c=e.length-3;e[2]=1,tt(e,0,c,n),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function st(t,e,n,r){for(var i=0;i<t.length;i++){var o=[];at(t[i],o,n,r),e.push(o)}}function ut(t){return t/360+.5}function lt(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function ct(t,e,n,r,i,o,a,s){if(r/=e,o>=(n/=e)&&a<r)return t;if(a<n||o>=r)return null;for(var u=[],l=0;l<t.length;l++){var c=t[l],f=c.geometry,h=c.type,p=0===i?c.minX:c.minY,d=0===i?c.maxX:c.maxY;if(p>=n&&d<r)u.push(c);else if(!(d<n||p>=r)){var m=[];if("Point"===h||"MultiPoint"===h)ft(f,m,n,r,i);else if("LineString"===h)ht(f,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===h)dt(f,m,n,r,i,!1);else if("Polygon"===h)dt(f,m,n,r,i,!0);else if("MultiPolygon"===h)for(var g=0;g<f.length;g++){var y=[];dt(f[g],y,n,r,i,!0),y.length&&m.push(y)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(g=0;g<m.length;g++)u.push(nt(c.id,h,m[g],c.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),u.push(nt(c.id,h,m,c.tags))}}}return u.length?u:null}function ft(t,e,n,r,i){for(var o=0;o<t.length;o+=3){var a=t[o+i];a>=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function ht(t,e,n,r,i,o,a){for(var s,u,l=pt(t),c=0===i?gt:yt,f=t.start,h=0;h<t.length-3;h+=3){var p=t[h],d=t[h+1],m=t[h+2],g=t[h+3],y=t[h+4],v=0===i?p:d,b=0===i?g:y,_=!1;a&&(s=Math.sqrt(Math.pow(p-g,2)+Math.pow(d-y,2))),v<n?b>n&&(u=c(l,p,d,g,y,n),a&&(l.start=f+s*u)):v>r?b<r&&(u=c(l,p,d,g,y,r),a&&(l.start=f+s*u)):mt(l,p,d,m),b<n&&v>=n&&(u=c(l,p,d,g,y,n),_=!0),b>r&&v<=r&&(u=c(l,p,d,g,y,r),_=!0),!o&&_&&(a&&(l.end=f+s*u),e.push(l),l=pt(t)),a&&(f+=s)}var A=t.length-3;p=t[A],d=t[A+1],m=t[A+2],(v=0===i?p:d)>=n&&v<=r&&mt(l,p,d,m),A=l.length-3,o&&A>=3&&(l[A]!==l[0]||l[A+1]!==l[1])&&mt(l,l[0],l[1],l[2]),l.length&&e.push(l)}function pt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function dt(t,e,n,r,i,o){for(var a=0;a<t.length;a++)ht(t[a],e,n,r,i,o,!1)}function mt(t,e,n,r){t.push(e),t.push(n),t.push(r)}function gt(t,e,n,r,i,o){var a=(o-e)/(r-e);return t.push(o),t.push(n+(i-n)*a),t.push(1),a}function yt(t,e,n,r,i,o){var a=(o-n)/(i-n);return t.push(e+(r-e)*a),t.push(o),t.push(1),a}function vt(t,e){for(var n=[],r=0;r<t.length;r++){var i,o=t[r],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)i=bt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){i=[];for(var s=0;s<o.geometry.length;s++)i.push(bt(o.geometry[s],e))}else if("MultiPolygon"===a)for(i=[],s=0;s<o.geometry.length;s++){for(var u=[],l=0;l<o.geometry[s].length;l++)u.push(bt(o.geometry[s][l],e));i.push(u)}n.push(nt(o.id,a,i,o.tags))}return n}function bt(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var r=0;r<t.length;r+=3)n.push(t[r]+e,t[r+1],t[r+2]);return n}function _t(t,e){if(t.transformed)return t;var n,r,i,o=1<<t.z,a=t.x,s=t.y;for(n=0;n<t.features.length;n++){var u=t.features[n],l=u.geometry,c=u.type;if(u.geometry=[],1===c)for(r=0;r<l.length;r+=2)u.geometry.push(At(l[r],l[r+1],e,o,a,s));else for(r=0;r<l.length;r++){var f=[];for(i=0;i<l[r].length;i+=2)f.push(At(l[r][i],l[r][i+1],e,o,a,s));u.geometry.push(f)}}return t.transformed=!0,t}function At(t,e,n,r,i,o){return[Math.round(n*(t*r-i)),Math.round(n*(e*r-o))]}function wt(t,e,n,r,i){for(var o=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:r,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,xt(a,t[s],o,i);var u=t[s].minX,l=t[s].minY,c=t[s].maxX,f=t[s].maxY;u<a.minX&&(a.minX=u),l<a.minY&&(a.minY=l),c>a.maxX&&(a.maxX=c),f>a.maxY&&(a.maxY=f)}return a}function xt(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)Et(a,i,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)Et(a,i[s],t,n,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var u=0;u<i.length;u++){var l=i[u];for(s=0;s<l.length;s++)Et(a,l[s],t,n,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&r.lineMetrics){for(var f in c={},e.tags)c[f]=e.tags[f];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function Et(t,e,n,r,i,o){var a=r*r;if(r>0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],u=0;u<e.length;u+=3)(0===r||e[u+2]>a)&&(n.numSimplified++,s.push(e[u]),s.push(e[u+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r<i;o=r,r+=2)n+=(t[r]-t[o])*(t[r+1]+t[o+1]);if(n>0===e)for(r=0,i=t.length;r<i/2;r+=2){var a=t[r],s=t[r+1];t[r]=t[i-2-r],t[r+1]=t[i-1-r],t[i-2-r]=a,t[i-1-r]=s}}(s,o),t.push(s)}}function Ot(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(this.options),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r<t.features.length;r++)it(n,t.features[r],e,r);else it(n,"Feature"===t.type?t:{geometry:t},e);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),r=function(t,e){var n=e.buffer/e.extent,r=t,i=ct(t,1,-1-n,n,0,-1,2,e),o=ct(t,1,1-n,2+n,0,-1,2,e);return(i||o)&&(r=ct(t,1,-n,1+n,0,-1,2,e)||[],i&&(r=vt(i,1).concat(r)),o&&(r=r.concat(vt(o,-1)))),r}(r,e),r.length&&this.splitTile(r,0,0,0),n&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function St(t,e,n){return 32*((1<<t)*n+e)+t}function Pt(t,e){const n=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);const r=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!r)return e(null,null);const i=new m(r.features);let o=g.exports(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:i,rawData:o.buffer})}Ot.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ot.prototype.splitTile=function(t,e,n,r,i,o,a){for(var s=[t,e,n,r],u=this.options,l=u.debug;s.length;){r=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,f=St(e,n,r),h=this.tiles[f];if(!h&&(l>1&&console.time("creation"),h=this.tiles[f]=wt(t,e,n,r,u),this.tileCoords.push({z:e,x:n,y:r}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===u.maxZoom||e===i)continue;var d=1<<i-e;if(n!==Math.floor(o/d)||r!==Math.floor(a/d))continue}else if(e===u.indexMaxZoom||h.numPoints<=u.indexMaxPoints)continue;if(h.source=null,0!==t.length){l>1&&console.time("clipping");var m,g,y,v,b,_,A=.5*u.buffer/u.extent,w=.5-A,x=.5+A,E=1+A;m=g=y=v=null,b=ct(t,c,n-A,n+x,0,h.minX,h.maxX,u),_=ct(t,c,n+w,n+E,0,h.minX,h.maxX,u),t=null,b&&(m=ct(b,c,r-A,r+x,1,h.minY,h.maxY,u),g=ct(b,c,r+w,r+E,1,h.minY,h.maxY,u),b=null),_&&(y=ct(_,c,r-A,r+x,1,h.minY,h.maxY,u),v=ct(_,c,r+w,r+E,1,h.minY,h.maxY,u),_=null),l>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*r),s.push(g||[],e+1,2*n,2*r+1),s.push(y||[],e+1,2*n+1,2*r),s.push(v||[],e+1,2*n+1,2*r+1)}}},Ot.prototype.getTile=function(t,e,n){var r=this.options,i=r.extent,o=r.debug;if(t<0||t>24)return null;var a=1<<t,s=St(t,e=(e%a+a)%a,n);if(this.tiles[s])return _t(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var u,l=t,c=e,f=n;!u&&l>0;)l--,c=Math.floor(c/2),f=Math.floor(f/2),u=this.tiles[St(l,c,f)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,c,f),o>1&&console.time("drilling down"),this.splitTile(u.source,l,c,f,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?_t(this.tiles[s],i):null):null};class Ct extends u{constructor(t,e,n,r){super(t,e,n,Pt),r&&(this.loadGeoJSON=r)}loadData(e,n){var r;null===(r=this._pendingRequest)||void 0===r||r.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const i=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request);this._pendingCallback=n,this._pendingRequest=this.loadGeoJSON(e,((r,o)=>{if(delete this._pendingCallback,delete this._pendingRequest,r||!o)return n(r);if("object"!=typeof o)return n(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`));{c(o,!0);try{if(e.filter){const n=t.createExpression(e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===n.result)throw new Error(n.value.map((t=>`${t.key}: ${t.message}`)).join(", "));const r=o.features.filter((t=>n.value.evaluate({zoom:0},t)));o={type:"FeatureCollection",features:r}}this._geoJSONIndex=e.cluster?new V(function({superclusterOptions:e,clusterProperties:n}){if(!n||!e)return e;const r={},i={},o={accumulated:null,zoom:0},a={properties:null},s=Object.keys(n);for(const u of s){const[e,o]=n[u],a=t.createExpression(o),s=t.createExpression("string"==typeof e?[e,["accumulated"],["get",u]]:e);r[u]=a.value,i[u]=s.value}return e.map=t=>{a.properties=t;const e={};for(const n of s)e[n]=r[n].evaluate(o,a);return e},e.reduce=(t,e)=>{a.properties=e;for(const n of s)o.accumulated=t[n],t[n]=i[n].evaluate(o,a)},e}(e)).load(o.features):function(t,e){return new Ot(t,e)}(o,e.geojsonVtOptions)}catch(r){return n(r)}this.loaded={};const a={};if(i){const t=i.finish();t&&(a.resourceTiming={},a.resourceTiming[e.source]=JSON.parse(JSON.stringify(t)))}n(null,a)}}))}reloadTile(t,e){const n=this.loaded;return n&&n[t.uid]?super.reloadTile(t,e):this.loadTile(t,e)}loadGeoJSON(e,n){if(e.request)return t.getJSON(e.request,n);if("string"==typeof e.data)try{n(null,JSON.parse(e.data))}catch(t){n(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`))}else n(new Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}}removeSource(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()}getClusterExpansionZoom(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}}getClusterChildren(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}}getClusterLeaves(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}}}class Tt{constructor(e){this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:u,geojson:Ct},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(t,e)=>{if(this.workerSourceTypes[t])throw new Error(`Worker source with name "${t}" already registered.`);this.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=e=>{if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}}setReferrer(t,e){this.referrer=e}setImages(t,e,n){this.availableImages[t]=e;for(const r in this.workerSources[t]){const n=this.workerSources[t][r];for(const t in n)n[t].availableImages=e}n()}setLayers(t,e,n){this.getLayerIndex(t).replace(e),n()}updateLayers(t,e,n){this.getLayerIndex(t).update(e.layers,e.removedIds),n()}loadTile(t,e,n){this.getWorkerSource(t,e.type,e.source).loadTile(e,n)}loadDEMTile(t,e,n){this.getDEMWorkerSource(t,e.source).loadTile(e,n)}reloadTile(t,e,n){this.getWorkerSource(t,e.type,e.source).reloadTile(e,n)}abortTile(t,e,n){this.getWorkerSource(t,e.type,e.source).abortTile(e,n)}removeTile(t,e,n){this.getWorkerSource(t,e.type,e.source).removeTile(e,n)}removeDEMTile(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)}removeSource(t,e,n){if(!this.workerSources[t]||!this.workerSources[t][e.type]||!this.workerSources[t][e.type][e.source])return;const r=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==r.removeSource?r.removeSource(e,n):n()}loadWorkerSource(t,e,n){try{this.self.importScripts(e.url),n()}catch(t){n(t.toString())}}syncRTLPluginState(e,n,r){try{t.plugin.setState(n);const e=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=e){this.self.importScripts(e);const n=t.plugin.isParsed();r(n?void 0:new Error(`RTL Text Plugin failed to import scripts from ${e}`),n)}}catch(t){r(t.toString())}}getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new r),e}getWorkerSource(t,e,n){if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][n]){const r={send:(e,n,r)=>{this.actor.send(e,n,r,t)}};this.workerSources[t][e][n]=new this.workerSourceTypes[e](r,this.getLayerIndex(t),this.getAvailableImages(t))}return this.workerSources[t][e][n]}getDEMWorkerSource(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new l),this.demWorkerSources[t][e]}enforceCacheSizeLimit(e,n){t.enforceCacheSizeLimit(n)}}return t.isWorker()&&(self.worker=new Tt(self)),Tt})),r(["./shared"],(function(t){var e=n;function n(t){return!function(t){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,n=new Blob([""],{type:"text/javascript"}),r=URL.createObjectURL(n);try{e=new Worker(r),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(r),t}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var n=e.getImageData(0,0,1,1);return n&&n.width===t.width}()?(void 0===r[e=t&&t.failIfMajorPerformanceCaveat]&&(r[e]=function(t){var e,r=function(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}(t);if(!r)return!1;try{e=r.createShader(r.VERTEX_SHADER)}catch(t){return!1}return!(!e||r.isContextLost())&&(r.shaderSource(e,"void main() {}"),r.compileShader(e),!0===r.getShaderParameter(e,r.COMPILE_STATUS))}(e)),r[e]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var e}(t)}var r={};function i(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!i(t[n],e[n]))return!1;return!0}return t===e}n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};class o{static testProp(t){if(!o.docStyle)return t[0];for(let e=0;e<t.length;e++)if(t[e]in o.docStyle)return t[e];return t[0]}static create(t,e,n){const r=window.document.createElement(t);return void 0!==e&&(r.className=e),n&&n.appendChild(r),r}static createNS(t,e){return window.document.createElementNS(t,e)}static disableDrag(){o.docStyle&&o.selectProp&&(o.userSelect=o.docStyle[o.selectProp],o.docStyle[o.selectProp]="none")}static enableDrag(){o.docStyle&&o.selectProp&&(o.docStyle[o.selectProp]=o.userSelect)}static setTransform(t,e){t.style[o.transformProp]=e}static addEventListener(t,e,n,r={}){t.addEventListener(e,n,"passive"in r?r:r.capture)}static removeEventListener(t,e,n,r={}){t.removeEventListener(e,n,"passive"in r?r:r.capture)}static suppressClickInternal(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener("click",o.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",o.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",o.suppressClickInternal,!0)}),0)}static mousePos(e,n){const r=e.getBoundingClientRect();return new t.pointGeometry(n.clientX-r.left-e.clientLeft,n.clientY-r.top-e.clientTop)}static touchPos(e,n){const r=e.getBoundingClientRect(),i=[];for(let o=0;o<n.length;o++)i.push(new t.pointGeometry(n[o].clientX-r.left-e.clientLeft,n[o].clientY-r.top-e.clientTop));return i}static mouseButton(t){return t.button}static remove(t){t.parentNode&&t.parentNode.removeChild(t)}}o.docStyle="undefined"!=typeof window&&window.document&&window.document.documentElement.style,o.selectProp=o.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),o.transformProp=o.testProp(["transform","WebkitTransform"]);class a{constructor(t){this._transformRequestFn=t}transformRequest(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}}normalizeSpriteURL(t,e,n){const r=function(t){const e=t.match(s);if(!e)throw new Error(`Unable to parse URL "${t}"`);return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}(t);return r.path+=`${e}${n}`,function(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}(r)}setTransformRequest(t){this._transformRequestFn=t}}const s=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;class u{constructor(t,e,n,r){this.context=t,this.format=n,this.texture=t.gl.createTexture(),this.update(e,r)}update(e,n,r){const{width:i,height:o}=e,a=!(this.size&&this.size[0]===i&&this.size[1]===o||r),{context:s}=this,{gl:u}=s;if(this.useMipmap=Boolean(n&&n.useMipmap),u.bindTexture(u.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===u.RGBA&&(!n||!1!==n.premultiply)),a)this.size=[i,o],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.isImageBitmap(e)?u.texImage2D(u.TEXTURE_2D,0,this.format,this.format,u.UNSIGNED_BYTE,e):u.texImage2D(u.TEXTURE_2D,0,this.format,i,o,0,this.format,u.UNSIGNED_BYTE,e.data);else{const{x:n,y:a}=r||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.isImageBitmap(e)?u.texSubImage2D(u.TEXTURE_2D,0,n,a,u.RGBA,u.UNSIGNED_BYTE,e):u.texSubImage2D(u.TEXTURE_2D,0,n,a,i,o,u.RGBA,u.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&u.generateMipmap(u.TEXTURE_2D)}bind(t,e,n){const{context:r}=this,{gl:i}=r;i.bindTexture(i.TEXTURE_2D,this.texture),n!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=i.LINEAR),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}function l(t){const{userImage:e}=t;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}class c extends t.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:t,callback:e}of this.requestors)this._notify(t,e);this.requestors=[]}}getImage(t){return this.images[t]}addImage(t,e){this._validate(t,e)&&(this.images[t]=e)}_validate(e,n){let r=!0;return this._validateStretch(n.stretchX,n.data&&n.data.width)||(this.fire(new t.ErrorEvent(new Error(`Image "${e}" has invalid "stretchX" value`))),r=!1),this._validateStretch(n.stretchY,n.data&&n.data.height)||(this.fire(new t.ErrorEvent(new Error(`Image "${e}" has invalid "stretchY" value`))),r=!1),this._validateContent(n.content,n)||(this.fire(new t.ErrorEvent(new Error(`Image "${e}" has invalid "content" value`))),r=!1),r}_validateStretch(t,e){if(!t)return!0;let n=0;for(const r of t){if(r[0]<n||r[1]<r[0]||e<r[1])return!1;n=r[1]}return!0}_validateContent(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))}updateImage(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0}removeImage(t){const e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(t,e){let n=!0;if(!this.isLoaded())for(const r of t)this.images[r]||(n=!1);this.isLoaded()||n?this._notify(t,e):this.requestors.push({ids:t,callback:e})}_notify(e,n){const r={};for(const i of e){this.images[i]||this.fire(new t.Event("styleimagemissing",{id:i}));const e=this.images[i];e?r[i]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,hasRenderCallback:Boolean(e.userImage&&e.userImage.render)}:t.warnOnce(`Image "${i}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}n(null,r)}getPixelSize(){const{width:t,height:e}=this.atlasImage;return{width:t,height:e}}getPattern(e){const n=this.patterns[e],r=this.getImage(e);if(!r)return null;if(n&&n.position.version===r.version)return n.position;if(n)n.position.version=r.version;else{const n={w:r.data.width+2,h:r.data.height+2,x:0,y:0},i=new t.ImagePosition(n,r);this.patterns[e]={bin:n,position:i}}return this._updatePatternAtlas(),this.patterns[e].position}bind(t){const e=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const t in this.patterns)e.push(this.patterns[t].bin);const{w:n,h:r}=t.potpack(e),i=this.atlasImage;i.resize({width:n||1,height:r||1});for(const o in this.patterns){const{bin:e}=this.patterns[o],n=e.x+1,r=e.y+1,a=this.images[o].data,s=a.width,u=a.height;t.RGBAImage.copy(a,i,{x:0,y:0},{x:n,y:r},{width:s,height:u}),t.RGBAImage.copy(a,i,{x:0,y:u-1},{x:n,y:r-1},{width:s,height:1}),t.RGBAImage.copy(a,i,{x:0,y:0},{x:n,y:r+u},{width:s,height:1}),t.RGBAImage.copy(a,i,{x:s-1,y:0},{x:n-1,y:r},{width:1,height:u}),t.RGBAImage.copy(a,i,{x:0,y:0},{x:n+s,y:r},{width:1,height:u})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(t){for(const e of t){if(this.callbackDispatchedThisFrame[e])continue;this.callbackDispatchedThisFrame[e]=!0;const t=this.images[e];l(t)&&this.updateImage(e,t)}}}const f=1e20;function h(t,e,n,r,i,o,a,s,u){for(let l=e;l<e+r;l++)p(t,n*o+l,o,i,a,s,u);for(let l=n;l<n+i;l++)p(t,l*o+e,1,r,a,s,u)}function p(t,e,n,r,i,o,a){o[0]=0,a[0]=-f,a[1]=f,i[0]=t[e];for(let s=1,u=0,l=0;s<r;s++){i[s]=t[e+s*n];const r=s*s;do{const t=o[u];l=(i[s]-i[t]+r-t*t)/(s-t)/2}while(l<=a[u]&&--u>-1);u++,o[u]=s,a[u]=l,a[u+1]=f}for(let s=0,u=0;s<r;s++){for(;a[u+1]<s;)u++;const r=o[u],l=s-r;t[e+s*n]=i[r]+l*l}}class d{constructor(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}}setURL(t){this.url=t}getGlyphs(e,n){const r=[];for(const t in e)for(const n of e[t])r.push({stack:t,id:n});t.asyncAll(r,(({stack:t,id:e},n)=>{let r=this.entries[t];r||(r=this.entries[t]={glyphs:{},requests:{},ranges:{}});let i=r.glyphs[e];if(void 0!==i)return void n(null,{stack:t,id:e,glyph:i});if(i=this._tinySDF(r,t,e),i)return r.glyphs[e]=i,void n(null,{stack:t,id:e,glyph:i});const o=Math.floor(e/256);if(256*o>65535)return void n(new Error("glyphs > 65535 not supported"));if(r.ranges[o])return void n(null,{stack:t,id:e,glyph:i});let a=r.requests[o];a||(a=r.requests[o]=[],d.loadGlyphRange(t,o,this.url,this.requestManager,((t,e)=>{if(e){for(const t in e)this._doesCharSupportLocalGlyph(+t)||(r.glyphs[+t]=e[+t]);r.ranges[o]=!0}for(const n of a)n(t,e);delete r.requests[o]}))),a.push(((r,i)=>{r?n(r):i&&n(null,{stack:t,id:e,glyph:i[e]||null})}))}),((t,e)=>{if(t)n(t);else if(e){const t={};for(const{stack:n,id:r,glyph:i}of e)(t[n]||(t[n]={}))[r]=i&&{id:i.id,bitmap:i.bitmap.clone(),metrics:i.metrics};n(null,t)}}))}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(t.unicodeBlockLookup["CJK Unified Ideographs"](e)||t.unicodeBlockLookup["Hangul Syllables"](e)||t.unicodeBlockLookup.Hiragana(e)||t.unicodeBlockLookup.Katakana(e))}_tinySDF(e,n,r){const i=this.localIdeographFontFamily;if(!i)return;if(!this._doesCharSupportLocalGlyph(r))return;let o=e.tinySDF;if(!o){let t="400";/bold/i.test(n)?t="900":/medium/i.test(n)?t="500":/light/i.test(n)&&(t="200"),o=e.tinySDF=new d.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:i,fontWeight:t})}const a=o.draw(String.fromCharCode(r));return{id:r,bitmap:new t.AlphaImage({width:a.width||30,height:a.height||30},a.data),metrics:{width:a.glyphWidth||24,height:a.glyphHeight||24,left:a.glyphLeft||0,top:a.glyphTop-27||-8,advance:a.glyphAdvance||24}}}}d.loadGlyphRange=function(e,n,r,i,o){const a=256*n,s=a+255,u=i.transformRequest(r.replace("{fontstack}",e).replace("{range}",`${a}-${s}`),t.ResourceType.Glyphs);t.getArrayBuffer(u,((e,n)=>{if(e)o(e);else if(n){const e={};for(const r of t.parseGlyphPbf(n))e[r.id]=r;o(null,e)}}))},d.TinySDF=class{constructor({fontSize:t=24,buffer:e=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}={}){this.buffer=e,this.cutoff=r,this.radius=n;const s=this.size=t+4*e,u=this._createCanvas(s),l=this.ctx=u.getContext("2d",{willReadFrequently:!0});l.font=`${a} ${o} ${t}px ${i}`,l.textBaseline="alphabetic",l.textAlign="left",l.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(t){const e=document.createElement("canvas");return e.width=e.height=t,e}draw(t){const{width:e,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(t),a=Math.ceil(n),s=Math.min(this.size-this.buffer,Math.ceil(o-i)),u=Math.min(this.size-this.buffer,a+Math.ceil(r)),l=s+2*this.buffer,c=u+2*this.buffer,p=Math.max(l*c,0),d=new Uint8ClampedArray(p),m={data:d,width:l,height:c,glyphWidth:s,glyphHeight:u,glyphTop:a,glyphLeft:0,glyphAdvance:e};if(0===s||0===u)return m;const{ctx:g,buffer:y,gridInner:v,gridOuter:b}=this;g.clearRect(y,y,s,u),g.fillText(t,y,y+a);const _=g.getImageData(y,y,s,u);b.fill(f,0,p),v.fill(0,0,p);for(let h=0;h<u;h++)for(let t=0;t<s;t++){const e=_.data[4*(h*s+t)+3]/255;if(0===e)continue;const n=(h+y)*l+t+y;if(1===e)b[n]=0,v[n]=f;else{const t=.5-e;b[n]=t>0?t*t:0,v[n]=t<0?t*t:0}}h(b,0,0,l,c,l,this.f,this.v,this.z),h(v,y,y,s,u,l,this.f,this.v,this.z);for(let f=0;f<p;f++){const t=Math.sqrt(b[f])-Math.sqrt(v[f]);d[f]=Math.round(255-255*(t/this.radius+this.cutoff))}return m}};const m=new t.Properties({anchor:new t.DataConstantProperty(t.spec.light.anchor),position:new class{constructor(){this.specification=t.spec.light.position}possiblyEvaluate(e,n){return t.sphericalToCartesian(e.expression.evaluate(n))}interpolate(e,n,r){return{x:t.number(e.x,n.x,r),y:t.number(e.y,n.y,r),z:t.number(e.z,n.z,r)}}},color:new t.DataConstantProperty(t.spec.light.color),intensity:new t.DataConstantProperty(t.spec.light.intensity)}),g="-transition";class y extends t.Evented{constructor(e){super(),this._transitionable=new t.Transitionable(m),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,n={}){if(!this._validate(t.validateLight,e,n))for(const t in e){const n=e[t];t.endsWith(g)?this._transitionable.setTransition(t.slice(0,-g.length),n):this._transitionable.setValue(t,n)}}updateTransitions(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(t){this.properties=this._transitioning.possiblyEvaluate(t)}_validate(e,n,r){return(!r||!1!==r.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:t.spec})))}}class v{constructor(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(t,e){const n=t.join(",")+String(e);return this.dashEntry[n]||(this.dashEntry[n]=this.addDash(t,e)),this.dashEntry[n]}getDashRanges(t,e,n){const r=[];let i=t.length%2==1?-t[t.length-1]*n:0,o=t[0]*n,a=!0;r.push({left:i,right:o,isDash:a,zeroLength:0===t[0]});let s=t[0];for(let u=1;u<t.length;u++){a=!a;const e=t[u];i=s*n,s+=e,o=s*n,r.push({left:i,right:o,isDash:a,zeroLength:0===e})}return r}addRoundDash(t,e,n){const r=e/2;for(let i=-n;i<=n;i++){const e=this.width*(this.nextRow+n+i);let o=0,a=t[o];for(let s=0;s<this.width;s++){s/a.right>1&&(a=t[++o]);const u=Math.abs(s-a.left),l=Math.abs(s-a.right),c=Math.min(u,l);let f;const h=i/n*(r+1);if(a.isDash){const t=r-Math.abs(h);f=Math.sqrt(c*c+t*t)}else f=r-Math.sqrt(c*c+h*h);this.data[e+s]=Math.max(0,Math.min(255,f+128))}}}addRegularDash(t){for(let a=t.length-1;a>=0;--a){const e=t[a],n=t[a+1];e.zeroLength?t.splice(a,1):n&&n.isDash===e.isDash&&(n.left=e.left,t.splice(a,1))}const e=t[0],n=t[t.length-1];e.isDash===n.isDash&&(e.left=n.left-this.width,n.right=e.right+this.width);const r=this.width*this.nextRow;let i=0,o=t[i];for(let a=0;a<this.width;a++){a/o.right>1&&(o=t[++i]);const e=Math.abs(a-o.left),n=Math.abs(a-o.right),s=Math.min(e,n);this.data[r+a]=Math.max(0,Math.min(255,(o.isDash?s:-s)+128))}}addDash(e,n){const r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;let o=0;for(let t=0;t<e.length;t++)o+=e[t];if(0!==o){const t=this.width/o,i=this.getDashRanges(e,this.width,t);n?this.addRoundDash(i,t,r):this.addRegularDash(i)}const a={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:o};return this.nextRow+=i,this.dirty=!0,a}bind(t){const e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))}}class b{constructor(e,n){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t.uniqueId();const r=this.workerPool.acquire(this.id);for(let t=0;t<r.length;t++){const e=new b.Actor(r[t],n,this.id);e.name=`Worker ${t}`,this.actors.push(e)}}broadcast(e,n,r){t.asyncAll(this.actors,((t,r)=>{t.send(e,n,r)}),r=r||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach((t=>{t.remove()})),this.actors=[],this.workerPool.release(this.id)}}function _(e,n,r){const i=function(n,i){if(n)return r(n);if(i){const n=t.pick(t.extend(i,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);i.vector_layers&&(n.vectorLayers=i.vector_layers,n.vectorLayerIds=n.vectorLayers.map((t=>t.id))),r(null,n)}};return e.url?t.getJSON(n.transformRequest(e.url,t.ResourceType.Source),i):t.exported.frame((()=>i(null,e)))}b.Actor=t.Actor;class A{constructor(e,n,r){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=n||0,this.maxzoom=r||24}validateBounds(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(e){const n=Math.pow(2,e.z),r=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*n),i=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*n),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*n),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*n);return e.x>=r&&e.x<o&&e.y>=i&&e.y<a}}class w extends t.Evented{constructor(e,n,r,i){if(super(),this.id=e,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(n,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(i)}load(){this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=_(this._options,this.map._requestManager,((e,n)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e?this.fire(new t.ErrorEvent(e)):n&&(t.extend(this,n),n.bounds&&(this.tileBounds=new A(n.bounds,this.minzoom,this.maxzoom)),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.load()}setTiles(t){return this.setSourceProperty((()=>{this._options.tiles=t})),this}setUrl(t){return this.setSourceProperty((()=>{this.url=t,this._options.url=t})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return t.extend({},this._options)}loadTile(e,n){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i={request:this.map._requestManager.transformRequest(r,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(r,i){return delete e.request,e.aborted?n(null):r&&404!==r.status?n(r):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),n(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=n:e.request=e.actor.send("reloadTile",i,o.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",i,o.bind(this)))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)}unloadTile(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class x extends t.Evented{constructor(e,n,r,i){super(),this.id=e,this.dispatcher=r,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},n),t.extend(this,t.pick(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=_(this._options,this.map._requestManager,((e,n)=>{this._tileJSONRequest=null,this._loaded=!0,e?this.fire(new t.ErrorEvent(e)):n&&(t.extend(this,n),n.bounds&&(this.tileBounds=new A(n.bounds,this.minzoom,this.maxzoom)),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return t.extend({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(e,n){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.request=t.getImage(this.map._requestManager.transformRequest(r,t.ResourceType.Tile),((r,i,o)=>{if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(r)e.state="errored",n(r);else if(i){this.map._refreshExpiredTiles&&e.setExpiryData(o);const r=this.map.painter.context,a=r.gl;e.texture=this.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new u(r,i,a.RGBA,{useMipmap:!0}),e.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),r.extTextureFilterAnisotropic&&a.texParameterf(a.TEXTURE_2D,r.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,r.extTextureFilterAnisotropicMax)),e.state="loaded",t.cacheEntryPossiblyAdded(this.dispatcher),n(null)}}))}abortTile(t,e){t.request&&(t.request.cancel(),delete t.request),e()}unloadTile(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()}hasTransition(){return!1}}let E;class O extends x{constructor(e,n,r,i){super(e,n,r,i),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(e,n){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function i(t,r){t&&(e.state="errored",n(t)),r&&(e.dem=r,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded",n(null))}e.request=t.getImage(this.map._requestManager.transformRequest(r,t.ResourceType.Tile),function(r,o){if(delete e.request,e.aborted)e.state="unloaded",n(null);else if(r)e.state="errored",n(r);else if(o){this.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;const n=t.isImageBitmap(o)&&(null==E&&(E="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),E)?o:t.exported.getImageData(o,1),r={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:n,encoding:this.encoding};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",r,i.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)}_getNeighboringTiles(e){const n=e.canonical,r=Math.pow(2,n.z),i=(n.x-1+r)%r,o=0===n.x?e.wrap-1:e.wrap,a=(n.x+1+r)%r,s=n.x+1===r?e.wrap+1:e.wrap,u={};return u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1<r&&(u[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y+1).key]={backfilled:!1}),u}unloadTile(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&t.actor.send("removeDEMTile",{uid:t.uid,source:this.id})}}class S extends t.Evented{constructor(e,n,r,i){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=r.getActor(),this.setEventedParent(i),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const o=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:t.EXTENT,radius:(n.clusterRadius||50)*o,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions)}load(){this._updateWorkerData("metadata")}onAdd(t){this.map=t,this.load()}setData(t){return this._data=t,this._updateWorkerData("content"),this}getClusterExpansionZoom(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this}getClusterChildren(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this}getClusterLeaves(t,e,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:n},r),this}_updateWorkerData(e){const n=t.extend({},this.workerOptions),r=this._data;"string"==typeof r?(n.request=this.map._requestManager.transformRequest(t.exported.resolveURL(r),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(r),this._pendingLoads++,this.fire(new t.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,n,((n,r)=>{if(this._pendingLoads--,this._removed||r&&r.abandoned)return void this.fire(new t.Event("dataabort",{dataType:"source",sourceDataType:e}));let i=null;if(r&&r.resourceTiming&&r.resourceTiming[this.id]&&(i=r.resourceTiming[this.id].slice(0)),n)return void this.fire(new t.ErrorEvent(n));const o={dataType:"source",sourceDataType:e};this._collectResourceTiming&&i&&i.length>0&&t.extend(o,{resourceTiming:i}),this.fire(new t.Event("data",o))}))}loaded(){return 0===this._pendingLoads}loadTile(t,e){const n=t.actor?"reloadTile":"loadTile";t.actor=this.actor;const r={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(n,r,((r,i)=>(delete t.request,t.unloadVectorData(),t.aborted?e(null):r?e(r):(t.loadVectorData(i,this.map.painter,"reloadTile"===n),e(null)))))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0}unloadTile(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}serialize(){return t.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var P=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class C extends t.Evented{constructor(t,e,n,r){super(),this.id=t,this.dispatcher=n,this.coordinates=e.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(r),this.options=e}load(e,n){this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),((r,i)=>{this._loaded=!0,r?this.fire(new t.ErrorEvent(r)):i&&(this.image=i,e&&(this.coordinates=e),n&&n(),this._finishLoading())}))}loaded(){return this._loaded}updateImage(t){return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}setCoordinates(e){this.coordinates=e;const n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){let n=1/0,r=1/0,i=-1/0,o=-1/0;for(const t of e)n=Math.min(n,t.x),r=Math.min(r,t.y),i=Math.max(i,t.x),o=Math.max(o,t.y);const a=Math.max(i-n,o-r),s=Math.max(0,Math.floor(-Math.log(a)/Math.LN2)),u=Math.pow(2,s);return new t.CanonicalTileID(s,Math.floor((n+i)/2*u),Math.floor((r+o)/2*u))}(n),this.minzoom=this.maxzoom=this.tileID.z;const r=n.map((t=>this.tileID.getTilePoint(t)._round()));return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(r[0].x,r[0].y,0,0),this._boundsArray.emplaceBack(r[1].x,r[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(r[3].x,r[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(r[2].x,r[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const e=this.map.painter.context,n=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u(e,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture)}}loadTile(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class T extends C{constructor(t,e,n,r){super(t,e,n,r),this.roundZoom=!0,this.type="video",this.options=e}load(){this._loaded=!1;const e=this.options;this.urls=[];for(const n of e.urls)this.urls.push(this.map._requestManager.transformRequest(n,t.ResourceType.Source).url);t.getVideo(this.urls,((e,n)=>{this._loaded=!0,e?this.fire(new t.ErrorEvent(e)):n&&(this.video=n,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading())}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const n=this.video.seekable;e<n.start(0)||e>n.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const e=this.map.painter.context,n=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new u(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture)}}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class k extends C{constructor(e,n,r,i){super(e,n,r,i),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((t=>!Array.isArray(t)||2!==t.length||t.some((t=>"number"!=typeof t))))||this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError(`sources.${e}`,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const n=this.map.painter.context,r=n.gl;this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u(n,this.canvas,r.RGBA,{premultiply:!0});for(const t in this.tiles){const e=this.tiles[t];"loaded"!==e.state&&(e.state="loaded",e.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}const I={vector:w,raster:x,"raster-dem":O,geojson:S,video:T,image:C,canvas:k};function L(e,n){const r=t.create();return t.translate(r,r,[1,1,0]),t.scale(r,r,[.5*e.width,.5*e.height,1]),t.multiply(r,r,e.calculatePosMatrix(n.toUnwrapped()))}function j(t,e,n,r,i,o){const a=function(t,e,n){if(t)for(const r of t){const t=e[r];if(t&&t.source===n&&"fill-extrusion"===t.type)return!0}else for(const r in e){const t=e[r];if(t.source===n&&"fill-extrusion"===t.type)return!0}return!1}(i&&i.layers,e,t.id),s=o.maxPitchScaleFactor(),u=t.tilesIn(r,s,a);u.sort(M);const l=[];for(const f of u)l.push({wrappedTileID:f.tileID.wrapped().key,queryResults:f.tile.queryRenderedFeatures(e,n,t._state,f.queryGeometry,f.cameraQueryGeometry,f.scale,i,o,s,L(t.transform,f.tileID))});const c=function(t){const e={},n={};for(const r of t){const t=r.queryResults,i=r.wrappedTileID,o=n[i]=n[i]||{};for(const n in t){const r=t[n],i=o[n]=o[n]||{},a=e[n]=e[n]||[];for(const t of r)i[t.featureIndex]||(i[t.featureIndex]=!0,a.push(t))}}return e}(l);for(const f in c)c[f].forEach((e=>{const n=e.feature,r=t.getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=r}));return c}function M(t,e){const n=t.tileID,r=e.tileID;return n.overscaledZ-r.overscaledZ||n.canonical.y-r.canonical.y||n.wrap-r.wrap||n.canonical.x-r.canonical.x}class R{constructor(e,n){this.tileID=e,this.uid=t.uniqueId(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.textures=[],this.textureCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const n=e+this.timeAdded;n<t.exported.now()||this.fadeEndTime&&n<this.fadeEndTime||(this.fadeEndTime=n)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(t){this.demTexture&&t.saveTileTexture(this.demTexture),this.textures.forEach((e=>t.saveTileTexture(e))),this.demTexture=null,this.textures=[],this.textureCoords={}}loadVectorData(e,n,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(t,e){const n={};if(!e)return n;for(const r of t){const t=r.layerIds.map((t=>e.getLayer(t))).filter(Boolean);if(0!==t.length){r.layers=t,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map((e=>t.filter((t=>t.id===e))[0])));for(const e of t)n[e.id]=r}}return n}(e.buckets,n.style),this.hasSymbolBuckets=!1;for(const e in this.buckets){const n=this.buckets[e];if(n instanceof t.SymbolBucket){if(this.hasSymbolBuckets=!0,!r)break;n.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const e in this.buckets){const n=this.buckets[e];if(n instanceof t.SymbolBucket&&n.hasRTLText){this.hasRTLText=!0,t.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const t in this.buckets){const e=this.buckets[t];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(t).queryRadius(e))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.CollisionBoxArray}unloadVectorData(){for(const t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(t){return this.buckets[t.id]}upload(t){for(const n in this.buckets){const e=this.buckets[n];e.uploadPending()&&e.upload(t)}const e=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new u(t,this.imageAtlas.image,e.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new u(t,this.glyphAtlasImage,e.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,e,n,r,i,o,a,s,u,l){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:i,scale:o,tileSize:this.tileSize,pixelPosMatrix:l,transform:s,params:a,queryPadding:this.queryPadding*u},t,e,n):{}}querySourceFeatures(e,n){const r=this.latestFeatureIndex;if(!r||!r.rawTileData)return;const i=r.loadVTLayers(),o=n?n.sourceLayer:"",a=i._geojsonTileLayer||i[o];if(!a)return;const s=t.createFilter(n&&n.filter),{z:u,x:l,y:c}=this.tileID.canonical,f={z:u,x:l,y:c};for(let h=0;h<a.length;h++){const n=a.feature(h);if(s.needGeometry){const e=t.toEvaluationFeature(n,!0);if(!s.filter(new t.EvaluationParameters(this.tileID.overscaledZ),e,this.tileID.canonical))continue}else if(!s.filter(new t.EvaluationParameters(this.tileID.overscaledZ),n))continue;const i=r.getId(n,o),p=new t.GeoJSONFeature(n,u,l,c,i);p.tile=f,e.push(p)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){const n=this.expirationTime;if(e.cacheControl){const n=t.parseCacheControl(e.cacheControl);n["max-age"]&&(this.expirationTime=Date.now()+1e3*n["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){const t=Date.now();let e=!1;if(this.expirationTime>t)e=!1;else if(n)if(this.expirationTime<n)e=!0;else{const r=this.expirationTime-n;r?this.expirationTime=t+Math.max(r,3e4):e=!0}else e=!0;e?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(t,e){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(t).length)return;const n=this.latestFeatureIndex.loadVTLayers();for(const r in this.buckets){if(!e.style.hasLayer(r))continue;const i=this.buckets[r],o=i.layers[0].sourceLayer||"_geojsonTileLayer",a=n[o],s=t[o];if(!a||!s||0===Object.keys(s).length)continue;i.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});const u=e&&e.style&&e.style.getLayer(r);u&&(this.queryPadding=Math.max(this.queryPadding,u.queryRadius(i)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<t.exported.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=t.exported.now()+e}setDependencies(t,e){const n={};for(const r of e)n[r]=!0;this.dependencies[t]=n}hasDependency(t,e){for(const n of t){const t=this.dependencies[n];if(t)for(const n of e)if(t[n])return!0}return!1}}class N{constructor(t,e){this.max=t,this.onRemove=e,this.reset()}reset(){for(const t in this.data)for(const e of this.data[t])e.timeout&&clearTimeout(e.timeout),this.onRemove(e.value);return this.data={},this.order=[],this}add(t,e,n){const r=t.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);const i={value:e,timeout:void 0};if(void 0!==n&&(i.timeout=setTimeout((()=>{this.remove(t,i)}),n)),this.data[r].push(i),this.order.push(r),this.order.length>this.max){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value}getByKey(t){const e=this.data[t];return e?e[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,e){if(!this.has(t))return this;const n=t.wrapped().key,r=void 0===e?0:this.data[n].indexOf(e),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(t){const e=[];for(const n in this.data)for(const r of this.data[n])t(r.value)||e.push(r);for(const n of e)this.remove(n.value.tileID,n)}}class D{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,n,r){const i=String(n);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][i]=this.stateChanges[e][i]||{},t.extend(this.stateChanges[e][i],r),null===this.deletedStates[e]){this.deletedStates[e]={};for(const t in this.state[e])t!==i&&(this.deletedStates[e][t]=null)}else if(this.deletedStates[e]&&null===this.deletedStates[e][i]){this.deletedStates[e][i]={};for(const t in this.state[e][i])r[t]||(this.deletedStates[e][i][t]=null)}else for(const t in r)this.deletedStates[e]&&this.deletedStates[e][i]&&null===this.deletedStates[e][i][t]&&delete this.deletedStates[e][i][t]}removeFeatureState(t,e,n){if(null===this.deletedStates[t])return;const r=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},n&&void 0!==e)null!==this.deletedStates[t][r]&&(this.deletedStates[t][r]=this.deletedStates[t][r]||{},this.deletedStates[t][r][n]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][r])for(n in this.deletedStates[t][r]={},this.stateChanges[t][r])this.deletedStates[t][r][n]=null;else this.deletedStates[t][r]=null;else this.deletedStates[t]=null}getState(e,n){const r=String(n),i=t.extend({},(this.state[e]||{})[r],(this.stateChanges[e]||{})[r]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){const t=this.deletedStates[e][n];if(null===t)return{};for(const e in t)delete i[e]}return i}initializeTileState(t,e){t.setFeatureState(this.state,e)}coalesceChanges(e,n){const r={};for(const i in this.stateChanges){this.state[i]=this.state[i]||{};const e={};for(const n in this.stateChanges[i])this.state[i][n]||(this.state[i][n]={}),t.extend(this.state[i][n],this.stateChanges[i][n]),e[n]=this.state[i][n];r[i]=e}for(const i in this.deletedStates){this.state[i]=this.state[i]||{};const e={};if(null===this.deletedStates[i])for(const t in this.state[i])e[t]={},this.state[i][t]={};else for(const t in this.deletedStates[i]){if(null===this.deletedStates[i][t])this.state[i][t]={};else for(const e of Object.keys(this.deletedStates[i][t]))delete this.state[i][t][e];e[t]=this.state[i][t]}r[i]=r[i]||{},t.extend(r[i],e)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(const t in e)e[t].setFeatureState(r,n)}}class F extends t.Evented{constructor(e,n,r){super(),this.id=e,this.dispatcher=r,this.on("data",(t=>{"source"===t.dataType&&"metadata"===t.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform,this.terrain))})),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=function(e,n,r,i){const o=new I[n.type](e,n,r,i);if(o.id!==e)throw new Error(`Expected Source id to be ${e} instead of ${o.id}`);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o}(e,n,r,this),this._tiles={},this._cache=new N(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new D}onAdd(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)}onRemove(t){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(t)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(const t in this._tiles){const e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,e){return this._source.loadTile(t,e)}_unloadTile(t){if(this._source.unloadTile)return this._source.unloadTile(t,(()=>{}))}_abortTile(e){this._source.abortTile&&this._source.abortTile(e,(()=>{})),this._source.fire(new t.Event("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const e in this._tiles){const n=this._tiles[e];n.upload(t),n.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((t=>t.tileID)).sort(B).map((t=>t.key))}getRenderableIds(e){const n=[];for(const t in this._tiles)this._isIdRenderable(t,e)&&n.push(this._tiles[t]);return e?n.sort(((e,n)=>{const r=e.tileID,i=n.tileID,o=new t.pointGeometry(r.canonical.x,r.canonical.y)._rotate(this.transform.angle),a=new t.pointGeometry(i.canonical.x,i.canonical.y)._rotate(this.transform.angle);return r.overscaledZ-i.overscaledZ||a.y-o.y||a.x-o.x})).map((t=>t.tileID.key)):n.map((t=>t.tileID)).sort(B).map((t=>t.key))}hasRenderableParent(t){const e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)}_isIdRenderable(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const t in this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")}}_reloadTile(t,e){const n=this._tiles[t];n&&("loading"!==n.state&&(n.state=e),this._loadTile(n,this._tileLoaded.bind(this,n,t,e)))}_tileLoaded(e,n,r,i){if(i)return e.state="errored",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform,this.terrain));e.timeAdded=t.exported.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(n,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(t){const e=this.getRenderableIds();for(let r=0;r<e.length;r++){const i=e[r];if(t.neighboringTiles&&t.neighboringTiles[i]){const e=this.getTileByID(i);n(t,e),n(e,t)}}function n(t,e){t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0;let n=e.tileID.canonical.x-t.tileID.canonical.x;const r=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===n&&0===r||Math.abs(r)>1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,n,r),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,e,n,r){for(const i in this._tiles){let o=this._tiles[i];if(r[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>n)continue;let a=o.tileID;for(;o&&o.tileID.overscaledZ>e+1;){const t=o.tileID.scaledTo(o.tileID.overscaledZ-1);o=this._tiles[t.key],o&&o.hasData()&&(a=t)}let s=a;for(;s.overscaledZ>e;)if(s=s.scaledTo(s.overscaledZ-1),t[s.key]){r[a.key]=a;break}}}findLoadedParent(t,e){if(t.key in this._loadedParentTiles){const n=this._loadedParentTiles[t.key];return n&&n.tileID.overscaledZ>=e?n:null}for(let n=t.overscaledZ-1;n>=e;n--){const e=t.scaledTo(n),r=this._getLoadedTile(e);if(r)return r}}_getLoadedTile(t){const e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)}updateCacheSize(t){const e=Math.ceil(t.width/this._source.tileSize)+1,n=Math.ceil(t.height/this._source.tileSize)+1,r=Math.floor(e*n*5),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)}handleWrapJump(t){const e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){const t={};for(const n in this._tiles){const r=this._tiles[n];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+e),t[r.tileID.key]=r}this._tiles=t;for(const e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(const e in this._tiles)this._setTileReloadTimer(e,this._tiles[e])}}update(e,n){if(this.transform=e,this.terrain=n,!this._sourceLoaded||this._paused)return;let r;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?r=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((e=>new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y))):(r=e.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:n}),this._source.hasTile&&(r=r.filter((t=>this._source.hasTile(t))))):r=[];const i=e.coveringZoomLevel(this._source),o=Math.max(i-F.maxOverzooming,this._source.minzoom),a=Math.max(i+F.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const t={};for(const e of r)if(e.canonical.z>this._source.minzoom){const n=e.scaledTo(e.canonical.z-1);t[n.key]=n;const r=e.scaledTo(Math.max(this._source.minzoom,Math.min(e.canonical.z,5)));t[r.key]=r}r=r.concat(Object.values(t))}const s=this._updateRetainedTiles(r,i);if(z(this._source.type)){const e={},u={},l=Object.keys(s);for(const n of l){const r=s[n],i=this._tiles[n];if(!i||i.fadeEndTime&&i.fadeEndTime<=t.exported.now())continue;const a=this.findLoadedParent(r,o);a&&(this._addTile(a.tileID),e[a.tileID.key]=a.tileID),u[n]=r}this._retainLoadedChildren(u,i,a,s);for(const t in e)s[t]||(this._coveredTiles[t]=!0,s[t]=e[t]);if(n){const t={},e={};for(const n of r)this._tiles[n.key].hasData()?t[n.key]=n:e[n.key]=n;for(const n in e){const r=e[n].children(this._source.maxzoom);this._tiles[r[0].key]&&this._tiles[r[1].key]&&this._tiles[r[2].key]&&this._tiles[r[3].key]&&(t[r[0].key]=s[r[0].key]=r[0],t[r[1].key]=s[r[1].key]=r[1],t[r[2].key]=s[r[2].key]=r[2],t[r[3].key]=s[r[3].key]=r[3],delete e[n])}for(const n in e){const r=this.findLoadedParent(e[n],this._source.minzoom);if(r){t[r.tileID.key]=s[r.tileID.key]=r.tileID;for(const e in t)t[e].isChildOf(r.tileID)&&delete t[e]}}for(const n in this._tiles)t[n]||(this._coveredTiles[n]=!0)}}for(const t in s)this._tiles[t].clearFadeHold();const u=t.keysDifference(this._tiles,s);for(const t of u){const e=this._tiles[t];e.hasSymbolBuckets&&!e.holdingForFade()?e.setHoldDuration(this.map._fadeDuration):e.hasSymbolBuckets&&!e.symbolFadeFinished()||this._removeTile(t)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)}_updateRetainedTiles(t,e){const n={},r={},i=Math.max(e-F.maxOverzooming,this._source.minzoom),o=Math.max(e+F.maxUnderzooming,this._source.minzoom),a={};for(const s of t){const t=this._addTile(s);n[s.key]=s,t.hasData()||e<this._source.maxzoom&&(a[s.key]=s)}this._retainLoadedChildren(a,e,o,n);for(const s of t){let t=this._tiles[s.key];if(t.hasData())continue;if(e+1>this._source.maxzoom){const t=s.children(this._source.maxzoom)[0],e=this.getTile(t);if(e&&e.hasData()){n[t.key]=t;continue}}else{const t=s.children(this._source.maxzoom);if(n[t[0].key]&&n[t[1].key]&&n[t[2].key]&&n[t[3].key])continue}let o=t.wasRequested();for(let e=s.overscaledZ-1;e>=i;--e){const i=s.scaledTo(e);if(r[i.key])break;if(r[i.key]=!0,t=this.getTile(i),!t&&o&&(t=this._addTile(i)),t&&(n[i.key]=i,o=t.wasRequested(),t.hasData()))break}}return n}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const e=[];let n,r=this._tiles[t].tileID;for(;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}e.push(r.key);const t=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(t),n)break;r=t}for(const t of e)this._loadedParentTiles[t]=n}}_addTile(e){let n=this._tiles[e.key];if(n)return n;n=this._cache.getAndRemove(e),n&&(this._setTileReloadTimer(e.key,n),n.tileID=e,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,n)));const r=n;return n||(n=new R(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,e.key,n.state))),n.uses++,this._tiles[e.key]=n,r||this._source.fire(new t.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(t,e){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout((()=>{this._reloadTile(t,"expired"),delete this._timers[t]}),n))}_removeTile(t){const e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(t);this._cache.reset()}tilesIn(e,n,r){const i=[],o=this.transform;if(!o)return i;const a=r?o.getCameraQueryGeometry(e):e,s=e.map((t=>o.pointCoordinate(t,this.terrain))),u=a.map((t=>o.pointCoordinate(t,this.terrain))),l=this.getIds();let c=1/0,f=1/0,h=-1/0,p=-1/0;for(const t of u)c=Math.min(c,t.x),f=Math.min(f,t.y),h=Math.max(h,t.x),p=Math.max(p,t.y);for(let d=0;d<l.length;d++){const e=this._tiles[l[d]];if(e.holdingForFade())continue;const r=e.tileID,a=Math.pow(2,o.zoom-e.tileID.overscaledZ),m=n*e.queryPadding*t.EXTENT/e.tileSize/a,g=[r.getTilePoint(new t.MercatorCoordinate(c,f)),r.getTilePoint(new t.MercatorCoordinate(h,p))];if(g[0].x-m<t.EXTENT&&g[0].y-m<t.EXTENT&&g[1].x+m>=0&&g[1].y+m>=0){const t=s.map((t=>r.getTilePoint(t))),n=u.map((t=>r.getTilePoint(t)));i.push({tile:e,tileID:r,queryGeometry:t,cameraQueryGeometry:n,scale:a})}}return i}getVisibleCoordinates(t){const e=this.getRenderableIds(t).map((t=>this._tiles[t].tileID));for(const n of e)n.posMatrix=this.transform.calculatePosMatrix(n.toUnwrapped());return e}hasTransition(){if(this._source.hasTransition())return!0;if(z(this._source.type))for(const e in this._tiles){const n=this._tiles[e];if(void 0!==n.fadeEndTime&&n.fadeEndTime>=t.exported.now())return!0}return!1}setFeatureState(t,e,n){this._state.updateState(t=t||"_geojsonTileLayer",e,n)}removeFeatureState(t,e,n){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,n)}getFeatureState(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)}setDependencies(t,e,n){const r=this._tiles[t];r&&r.setDependencies(e,n)}reloadTilesForDependencies(t,e){for(const n in this._tiles)this._tiles[n].hasDependency(t,e)&&this._reloadTile(n,"reloading");this._cache.filter((n=>!n.hasDependency(t,e)))}}function B(t,e){const n=Math.abs(2*t.wrap)-+(t.wrap<0),r=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||r-n||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function z(t){return"raster"===t||"image"===t||"video"===t}F.maxOverzooming=10,F.maxUnderzooming=3;const U="mapboxgl_preloaded_worker_pool";class G{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length<G.workerCount;)this.workers.push(new Worker(Ai.workerUrl));return this.active[t]=!0,this.workers.slice()}release(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach((t=>{t.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[U]}numActive(){return Object.keys(this.active).length}}const V=Math.floor(t.exported.hardwareConcurrency/2);let q;function H(){return q||(q=new G),q}function W(e,n){const r={};for(const t in e)"ref"!==t&&(r[t]=e[t]);return t.refProperties.forEach((t=>{t in n&&(r[t]=n[t])})),r}function X(t){t=t.slice();const e=Object.create(null);for(let n=0;n<t.length;n++)e[t[n].id]=t[n];for(let n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=W(t[n],e[t[n].ref]));return t}G.workerCount=Math.max(Math.min(V,6),1);const Y={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Z(t,e,n){n.push({command:Y.addSource,args:[t,e[t]]})}function K(t,e,n){e.push({command:Y.removeSource,args:[t]}),n[t]=!0}function $(t,e,n,r){K(t,n,r),Z(t,e,n)}function J(t,e,n){let r;for(r in t[n])if(Object.prototype.hasOwnProperty.call(t[n],r)&&"data"!==r&&!i(t[n][r],e[n][r]))return!1;for(r in e[n])if(Object.prototype.hasOwnProperty.call(e[n],r)&&"data"!==r&&!i(t[n][r],e[n][r]))return!1;return!0}function Q(t,e,n,r,o,a){let s;for(s in e=e||{},t=t||{})Object.prototype.hasOwnProperty.call(t,s)&&(i(t[s],e[s])||n.push({command:a,args:[r,s,e[s],o]}));for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&!Object.prototype.hasOwnProperty.call(t,s)&&(i(t[s],e[s])||n.push({command:a,args:[r,s,e[s],o]}))}function tt(t){return t.id}function et(t,e){return t[e.id]=e,t}class nt{constructor(t,e){this.reset(t,e)}reset(t,e){this.points=t||[],this._distances=[0];for(let n=1;n<this.points.length;n++)this._distances[n]=this._distances[n-1]+this.points[n].dist(this.points[n-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);let n=1,r=this._distances[n];const i=e*this.paddedLength+this.padding;for(;r<i&&n<this._distances.length;)r=this._distances[++n];const o=n-1,a=this._distances[o],s=r-a,u=s>0?(i-a)/s:0;return this.points[o].mult(1-u).add(this.points[n].mult(u))}}function rt(t,e){let n=!0;return"always"===t||"never"!==t&&"never"!==e||(n=!1),n}class it{constructor(t,e,n){const r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/n),this.yCellCount=Math.ceil(e/n);for(let o=0;o<this.xCellCount*this.yCellCount;o++)r.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)}insertCircle(t,e,n,r){this._forEachCell(e-r,n-r,e+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(n),this.circles.push(r)}_insertBoxCell(t,e,n,r,i,o){this.boxCells[i].push(o)}_insertCircleCell(t,e,n,r,i,o){this.circleCells[i].push(o)}_query(t,e,n,r,i,o,a){if(n<0||t>this.width||r<0||e>this.height)return[];const s=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r){if(i)return[{key:null,x1:t,y1:e,x2:n,y2:r}];for(let t=0;t<this.boxKeys.length;t++)s.push({key:this.boxKeys[t],x1:this.bboxes[4*t],y1:this.bboxes[4*t+1],x2:this.bboxes[4*t+2],y2:this.bboxes[4*t+3]});for(let t=0;t<this.circleKeys.length;t++){const e=this.circles[3*t],n=this.circles[3*t+1],r=this.circles[3*t+2];s.push({key:this.circleKeys[t],x1:e-r,y1:n-r,x2:e+r,y2:n+r})}}else this._forEachCell(t,e,n,r,this._queryCell,s,{hitTest:i,overlapMode:o,seenUids:{box:{},circle:{}}},a);return s}query(t,e,n,r){return this._query(t,e,n,r,!1,null)}hitTest(t,e,n,r,i,o){return this._query(t,e,n,r,!0,i,o).length>0}hitTestCircle(t,e,n,r,i){const o=t-n,a=t+n,s=e-n,u=e+n;if(a<0||o>this.width||u<0||s>this.height)return!1;const l=[];return this._forEachCell(o,s,a,u,this._queryCellCircle,l,{hitTest:!0,overlapMode:r,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}},i),l.length>0}_queryCell(t,e,n,r,i,o,a,s){const{seenUids:u,hitTest:l,overlapMode:c}=a,f=this.boxCells[i];if(null!==f){const i=this.bboxes;for(const a of f)if(!u.box[a]){u.box[a]=!0;const f=4*a,h=this.boxKeys[a];if(t<=i[f+2]&&e<=i[f+3]&&n>=i[f+0]&&r>=i[f+1]&&(!s||s(h))&&(!l||!rt(c,h.overlapMode))&&(o.push({key:h,x1:i[f],y1:i[f+1],x2:i[f+2],y2:i[f+3]}),l))return!0}}const h=this.circleCells[i];if(null!==h){const i=this.circles;for(const a of h)if(!u.circle[a]){u.circle[a]=!0;const f=3*a,h=this.circleKeys[a];if(this._circleAndRectCollide(i[f],i[f+1],i[f+2],t,e,n,r)&&(!s||s(h))&&(!l||!rt(c,h.overlapMode))){const t=i[f],e=i[f+1],n=i[f+2];if(o.push({key:h,x1:t-n,y1:e-n,x2:t+n,y2:e+n}),l)return!0}}}return!1}_queryCellCircle(t,e,n,r,i,o,a,s){const{circle:u,seenUids:l,overlapMode:c}=a,f=this.boxCells[i];if(null!==f){const t=this.bboxes;for(const e of f)if(!l.box[e]){l.box[e]=!0;const n=4*e,r=this.boxKeys[e];if(this._circleAndRectCollide(u.x,u.y,u.radius,t[n+0],t[n+1],t[n+2],t[n+3])&&(!s||s(r))&&!rt(c,r.overlapMode))return o.push(!0),!0}}const h=this.circleCells[i];if(null!==h){const t=this.circles;for(const e of h)if(!l.circle[e]){l.circle[e]=!0;const n=3*e,r=this.circleKeys[e];if(this._circlesCollide(t[n],t[n+1],t[n+2],u.x,u.y,u.radius)&&(!s||s(r))&&!rt(c,r.overlapMode))return o.push(!0),!0}}}_forEachCell(t,e,n,r,i,o,a,s){const u=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),c=this._convertToXCellCoord(n),f=this._convertToYCellCoord(r);for(let h=u;h<=c;h++)for(let u=l;u<=f;u++)if(i.call(this,t,e,n,r,this.xCellCount*u+h,o,a,s))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,e,n,r,i,o){const a=r-t,s=i-e,u=n+o;return u*u>a*a+s*s}_circleAndRectCollide(t,e,n,r,i,o,a){const s=(o-r)/2,u=Math.abs(t-(r+s));if(u>s+n)return!1;const l=(a-i)/2,c=Math.abs(e-(i+l));if(c>l+n)return!1;if(u<=s||c<=l)return!0;const f=u-s,h=c-l;return f*f+h*h<=n*n}}function ot(e,n,r,i,o){const a=t.create();return n?(t.scale(a,a,[1/o,1/o,1]),r||t.rotateZ(a,a,i.angle)):t.multiply(a,i.labelPlaneMatrix,e),a}function at(e,n,r,i,o){if(n){const n=t.clone(e);return t.scale(n,n,[o,o,1]),r||t.rotateZ(n,n,-i.angle),n}return i.glCoordMatrix}function st(e,n,r){let i;r?(i=[e.x,e.y,r(e.x,e.y),1],t.transformMat4(i,i,n)):(i=[e.x,e.y,0,1],vt(i,i,n));const o=i[3];return{point:new t.pointGeometry(i[0]/o,i[1]/o),signedDistanceFromCamera:o}}function ut(t,e){return.5+t/e*.5}function lt(t,e){const n=t[0]/t[3],r=t[1]/t[3];return n>=-e[0]&&n<=e[0]&&r>=-e[1]&&r<=e[1]}function ct(e,n,r,i,o,a,s,u,l,c){const f=i?e.textSizeData:e.iconSizeData,h=t.evaluateSizeForZoom(f,r.transform.zoom),p=[256/r.width*2+1,256/r.height*2+1],d=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;d.clear();const m=e.lineVertexArray,g=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,y=r.transform.width/r.transform.height;let v=!1;for(let b=0;b<g.length;b++){const i=g.get(b);if(i.hidden||i.writingMode===t.WritingMode.vertical&&!v){yt(i.numGlyphs,d);continue}let _;if(v=!1,c?(_=[i.anchorX,i.anchorY,c(i.anchorX,i.anchorY),1],t.transformMat4(_,_,n)):(_=[i.anchorX,i.anchorY,0,1],vt(_,_,n)),!lt(_,p)){yt(i.numGlyphs,d);continue}const A=ut(r.transform.cameraToCenterDistance,_[3]),w=t.evaluateSizeForFeature(f,h,i),x=s?w/A:w*A,E=new t.pointGeometry(i.anchorX,i.anchorY),O=st(E,o,c).point,S={},P=pt(i,x,!1,u,n,o,a,e.glyphOffsetArray,m,d,O,E,S,y,l,c);v=P.useVertical,(P.notEnoughRoom||v||P.needsFlipping&&pt(i,x,!0,u,n,o,a,e.glyphOffsetArray,m,d,O,E,S,y,l,c).notEnoughRoom)&&yt(i.numGlyphs,d)}i?e.text.dynamicLayoutVertexBuffer.updateData(d):e.icon.dynamicLayoutVertexBuffer.updateData(d)}function ft(t,e,n,r,i,o,a,s,u,l,c,f,h){const p=s.glyphStartIndex+s.numGlyphs,d=s.lineStartIndex,m=s.lineStartIndex+s.lineLength,g=e.getoffsetX(s.glyphStartIndex),y=e.getoffsetX(p-1),v=mt(t*g,n,r,i,o,a,s.segment,d,m,u,l,c,f,h);if(!v)return null;const b=mt(t*y,n,r,i,o,a,s.segment,d,m,u,l,c,f,h);return b?{first:v,last:b}:null}function ht(e,n,r,i){return e===t.WritingMode.horizontal&&Math.abs(r.y-n.y)>Math.abs(r.x-n.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?n.y<r.y:n.x>r.x)?{needsFlipping:!0}:null}function pt(e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g){const y=n/24,v=e.lineOffsetX*y,b=e.lineOffsetY*y;let _;if(e.numGlyphs>1){const t=e.glyphStartIndex+e.numGlyphs,n=e.lineStartIndex,o=e.lineStartIndex+e.lineLength,c=ft(y,u,v,b,r,f,h,e,l,a,p,m,g);if(!c)return{notEnoughRoom:!0};const A=st(c.first.point,s,g).point,w=st(c.last.point,s,g).point;if(i&&!r){const t=ht(e.writingMode,A,w,d);if(t)return t}_=[c.first];for(let i=e.glyphStartIndex+1;i<t-1;i++)_.push(mt(y*u.getoffsetX(i),v,b,r,f,h,e.segment,n,o,l,a,p,m,g));_.push(c.last)}else{if(i&&!r){const n=st(h,o,g).point,r=e.lineStartIndex+e.segment+1,i=new t.pointGeometry(l.getx(r),l.gety(r)),a=st(i,o,g),s=a.signedDistanceFromCamera>0?a.point:dt(h,i,n,1,o,g),u=ht(e.writingMode,n,s,d);if(u)return u}const n=mt(y*u.getoffsetX(e.glyphStartIndex),v,b,r,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,a,p,m,g);if(!n)return{notEnoughRoom:!0};_=[n]}for(const A of _)t.addDynamicAttributes(c,A.point,A.angle);return{}}function dt(t,e,n,r,i,o){const a=st(t.add(t.sub(e)._unit()),i,o).point,s=n.sub(a);return n.add(s._mult(r/s.mag()))}function mt(e,n,r,i,o,a,s,u,l,c,f,h,p,d){const m=i?e-n:e+n;let g=m>0?1:-1,y=0;i&&(g*=-1,y=Math.PI),g<0&&(y+=Math.PI);let v=g>0?u+s:u+s+1,b=o,_=o,A=0,w=0;const x=Math.abs(m),E=[];for(;A+w<=x;){if(v+=g,v<u||v>=l)return null;if(_=b,E.push(b),b=h[v],void 0===b){const e=new t.pointGeometry(c.getx(v),c.gety(v)),n=st(e,f,d);if(n.signedDistanceFromCamera>0)b=h[v]=n.point;else{const n=v-g;b=dt(0===A?a:new t.pointGeometry(c.getx(n),c.gety(n)),e,_,x-A+1,f,d)}}A+=w,w=_.dist(b)}const O=(x-A)/w,S=b.sub(_),P=S.mult(O)._add(_);P._add(S._unit()._perp()._mult(r*g));const C=y+Math.atan2(b.y-_.y,b.x-_.x);return E.push(P),{point:P,angle:p?C:0,path:E}}const gt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function yt(t,e){for(let n=0;n<t;n++){const t=e.length;e.resize(t+4),e.float32.set(gt,3*t)}}function vt(t,e,n){const 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[3]=n[3]*r+n[7]*i+n[15],t}const bt=100;class _t{constructor(t,e=new it(t.width+200,t.height+200,25),n=new it(t.width+200,t.height+200,25)){this.transform=t,this.grid=e,this.ignoredGrid=n,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+bt,this.screenBottomBoundary=t.height+bt,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(t,e,n,r,i,o){const a=this.projectAndGetPerspectiveRatio(r,t.anchorPointX,t.anchorPointY,o),s=n*a.perspectiveRatio,u=t.x1*s+a.point.x,l=t.y1*s+a.point.y,c=t.x2*s+a.point.x,f=t.y2*s+a.point.y;return!this.isInsideGrid(u,l,c,f)||"always"!==e&&this.grid.hitTest(u,l,c,f,e,i)||a.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[u,l,c,f],offscreen:this.isOffscreen(u,l,c,f)}}placeCollisionCircles(e,n,r,i,o,a,s,u,l,c,f,h,p,d){const m=[],g=new t.pointGeometry(n.anchorX,n.anchorY),y=st(g,a,d),v=ut(this.transform.cameraToCenterDistance,y.signedDistanceFromCamera),b=(c?o/v:o*v)/t.ONE_EM,_=st(g,s,d).point,A=ft(b,i,n.lineOffsetX*b,n.lineOffsetY*b,!1,_,g,n,r,s,{},!1,d);let w=!1,x=!1,E=!0;if(A){const n=.5*h*v+p,r=new t.pointGeometry(-100,-100),i=new t.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),o=new nt,a=A.first,s=A.last;let c=[];for(let t=a.path.length-1;t>=1;t--)c.push(a.path[t]);for(let t=1;t<s.path.length;t++)c.push(s.path[t]);const g=2.5*n;if(u){const t=c.map((t=>st(t,u,d)));c=t.some((t=>t.signedDistanceFromCamera<=0))?[]:t.map((t=>t.point))}let y=[];if(c.length>0){const e=c[0].clone(),n=c[0].clone();for(let t=1;t<c.length;t++)e.x=Math.min(e.x,c[t].x),e.y=Math.min(e.y,c[t].y),n.x=Math.max(n.x,c[t].x),n.y=Math.max(n.y,c[t].y);y=e.x>=r.x&&n.x<=i.x&&e.y>=r.y&&n.y<=i.y?[c]:n.x<r.x||e.x>i.x||n.y<r.y||e.y>i.y?[]:t.clipLine([c],r.x,r.y,i.x,i.y)}for(const t of y){o.reset(t,.25*n);let r=0;r=o.length<=.5*n?1:Math.ceil(o.paddedLength/g)+1;for(let t=0;t<r;t++){const i=t/Math.max(r-1,1),a=o.lerp(i),s=a.x+bt,u=a.y+bt;m.push(s,u,n,0);const c=s-n,h=u-n,p=s+n,d=u+n;if(E=E&&this.isOffscreen(c,h,p,d),x=x||this.isInsideGrid(c,h,p,d),"always"!==e&&this.grid.hitTestCircle(s,u,n,e,f)&&(w=!0,!l))return{circles:[],offscreen:!1,collisionDetected:w}}}}return{circles:!l&&w||!x||v<this.perspectiveRatioCutoff?[]:m,offscreen:E,collisionDetected:w}}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const n=[];let r=1/0,i=1/0,o=-1/0,a=-1/0;for(const c of e){const e=new t.pointGeometry(c.x+bt,c.y+bt);r=Math.min(r,e.x),i=Math.min(i,e.y),o=Math.max(o,e.x),a=Math.max(a,e.y),n.push(e)}const s=this.grid.query(r,i,o,a).concat(this.ignoredGrid.query(r,i,o,a)),u={},l={};for(const c of s){const e=c.key;if(void 0===u[e.bucketInstanceId]&&(u[e.bucketInstanceId]={}),u[e.bucketInstanceId][e.featureIndex])continue;const r=[new t.pointGeometry(c.x1,c.y1),new t.pointGeometry(c.x2,c.y1),new t.pointGeometry(c.x2,c.y2),new t.pointGeometry(c.x1,c.y2)];t.polygonIntersectsPolygon(n,r)&&(u[e.bucketInstanceId][e.featureIndex]=!0,void 0===l[e.bucketInstanceId]&&(l[e.bucketInstanceId]=[]),l[e.bucketInstanceId].push(e.featureIndex))}return l}insertCollisionBox(t,e,n,r,i,o){(n?this.ignoredGrid:this.grid).insert({bucketInstanceId:r,featureIndex:i,collisionGroupID:o,overlapMode:e},t[0],t[1],t[2],t[3])}insertCollisionCircles(t,e,n,r,i,o){const a=n?this.ignoredGrid:this.grid,s={bucketInstanceId:r,featureIndex:i,collisionGroupID:o,overlapMode:e};for(let u=0;u<t.length;u+=4)a.insertCircle(s,t[u],t[u+1],t[u+2])}projectAndGetPerspectiveRatio(e,n,r,i){let o;return i?(o=[n,r,i(n,r),1],t.transformMat4(o,o,e)):(o=[n,r,0,1],vt(o,o,e)),{point:new t.pointGeometry((o[0]/o[3]+1)/2*this.transform.width+bt,(-o[1]/o[3]+1)/2*this.transform.height+bt),perspectiveRatio:.5+this.transform.cameraToCenterDistance/o[3]*.5}}isOffscreen(t,e,n,r){return n<bt||t>=this.screenRightBoundary||r<bt||e>this.screenBottomBoundary}isInsideGrid(t,e,n,r){return n>=0&&t<this.gridRightBoundary&&r>=0&&e<this.gridBottomBoundary}getViewportMatrix(){const e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e}}function At(e,n,r){return n*(t.EXTENT/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}class wt{constructor(t,e,n,r){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):r&&n?1:0,this.placed=n}isHidden(){return 0===this.opacity&&!this.placed}}class xt{constructor(t,e,n,r,i){this.text=new wt(t?t.text:null,e,n,i),this.icon=new wt(t?t.icon:null,e,r,i)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Et{constructor(t,e,n){this.text=t,this.icon=e,this.skipFade=n}}class Ot{constructor(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]}}class St{constructor(t,e,n,r,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=n,this.bucketIndex=r,this.tileID=i}}class Pt{constructor(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}}get(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){const e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:t=>t.collisionGroupID===e}}return this.collisionGroups[t]}}function Ct(e,n,r,i,o){const{horizontalAlign:a,verticalAlign:s}=t.getAnchorAlignment(e),u=-(a-.5)*n,l=-(s-.5)*r,c=t.evaluateVariableOffset(e,i);return new t.pointGeometry(u+c[0]*o,l+c[1]*o)}function Tt(e,n,r,i,o,a){const{x1:s,x2:u,y1:l,y2:c,anchorPointX:f,anchorPointY:h}=e,p=new t.pointGeometry(n,r);return i&&p._rotate(o?a:-a),{x1:s+p.x,y1:l+p.y,x2:u+p.x,y2:c+p.y,anchorPointX:f,anchorPointY:h}}class kt{constructor(t,e,n,r,i){this.transform=t.clone(),this.terrain=e,this.collisionIndex=new _t(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=n,this.retainedQueryData={},this.collisionGroups=new Pt(r),this.collisionCircleArrays={},this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(e,n,r,i){const o=r.getBucket(n),a=r.latestFeatureIndex;if(!o||!a||n.id!==o.layerIds[0])return;const s=r.collisionBoxArray,u=o.layers[0].layout,l=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/t.EXTENT,f=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h="map"===u.get("text-pitch-alignment"),p="map"===u.get("text-rotation-alignment"),d=At(r,1,this.transform.zoom),m=ot(f,h,p,this.transform,d);let g=null;if(h){const e=at(f,h,p,this.transform,d);g=t.multiply([],this.transform.labelPlaneMatrix,e)}this.retainedQueryData[o.bucketInstanceId]=new St(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);const y={bucket:o,layout:u,posMatrix:f,textLabelPlaneMatrix:m,labelToScreenMatrix:g,scale:l,textPixelRatio:c,holdingForFade:r.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(i)for(const t of o.sortKeyRanges){const{sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i}=t;e.push({sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i,parameters:y})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:y})}attemptAnchorPlacement(t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m){const g=[f.textOffset0,f.textOffset1],y=Ct(t,n,r,g,i),v=this.collisionIndex.placeCollisionBox(Tt(e,y.x,y.y,o,a,this.transform.angle),c,s,u,l.predicate,m);if((!d||0!==this.collisionIndex.placeCollisionBox(Tt(d,y.x,y.y,o,a,this.transform.angle),c,s,u,l.predicate,m).box.length)&&v.box.length>0){let e;return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(e=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:g,width:n,height:r,anchor:t,textBoxScale:i,prevAnchor:e},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:y,placedGlyphBoxes:v}}}placeLayerBucketPart(e,n,r){const{bucket:i,layout:o,posMatrix:a,textLabelPlaneMatrix:s,labelToScreenMatrix:u,textPixelRatio:l,holdingForFade:c,collisionBoxArray:f,partiallyEvaluatedTextSize:h,collisionGroup:p}=e.parameters,d=o.get("text-optional"),m=o.get("icon-optional"),g=t.getOverlapMode(o,"text-overlap","text-allow-overlap"),y="always"===g,v=t.getOverlapMode(o,"icon-overlap","icon-allow-overlap"),b="always"===v,_="map"===o.get("text-rotation-alignment"),A="map"===o.get("text-pitch-alignment"),w="none"!==o.get("icon-text-fit"),x="viewport-y"===o.get("symbol-z-order"),E=y&&(b||!i.hasIconData()||m),O=b&&(y||!i.hasTextData()||d);!i.collisionArrays&&f&&i.deserializeCollisionBoxes(f);const S=(e,f)=>{if(n[e.crossTileID])return;if(c)return void(this.placements[e.crossTileID]=new Et(!1,!1,!1));let b=!1,x=!1,S=!0,P=null,C={box:null,offscreen:null},T={box:null,offscreen:null},k=null,I=null,L=null,j=0,M=0,R=0;f.textFeatureIndex?j=f.textFeatureIndex:e.useRuntimeCollisionCircles&&(j=e.featureIndex),f.verticalTextFeatureIndex&&(M=f.verticalTextFeatureIndex);const N=this.retainedQueryData[i.bucketInstanceId].tileID,D=this.terrain?(t,e)=>this.terrain.getElevation(N,t,e):null;for(const t of["textBox","verticalTextBox","iconBox","verticalIconBox"]){const e=f[t];e&&(e.elevation=D?D(e.anchorPointX,e.anchorPointY):0)}const F=f.textBox;if(F){const n=n=>{let r=t.WritingMode.horizontal;if(i.allowVerticalPlacement&&!n&&this.prevPlacement){const t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,r=t,this.markUsedOrientation(i,r,e))}return r},r=(n,r)=>{if(i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&f.verticalTextBox){for(const e of i.writingModes)if(e===t.WritingMode.vertical?(C=r(),T=C):C=n(),C&&C.box&&C.box.length)break}else C=n()};if(o.get("text-variable-anchor")){let s=o.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[e.crossTileID]){const t=this.prevPlacement.variableOffsets[e.crossTileID];s.indexOf(t.anchor)>0&&(s=s.filter((e=>e!==t.anchor)),s.unshift(t.anchor))}const u=(t,n,r)=>{const o=t.x2-t.x1,u=t.y2-t.y1,c=e.textBoxScale,f=w&&"never"===v?n:null;let h={box:[],offscreen:!1};const d="never"!==g?2*s.length:s.length;for(let m=0;m<d;++m){const n=this.attemptAnchorPlacement(s[m%s.length],t,o,u,c,_,A,l,a,p,m>=s.length?g:"never",e,i,r,f,D);if(n&&(h=n.placedGlyphBoxes,h&&h.box&&h.box.length)){b=!0,P=n.shift;break}}return h};r((()=>u(F,f.iconBox,t.WritingMode.horizontal)),(()=>{const n=f.verticalTextBox;return i.allowVerticalPlacement&&!(C&&C.box&&C.box.length)&&e.numVerticalGlyphVertices>0&&n?u(n,f.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),C&&(b=C.box,S=C.offscreen);const c=n(C&&C.box);if(!b&&this.prevPlacement){const t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(i,t.anchor,e,c))}}else{const o=(t,n)=>{const r=this.collisionIndex.placeCollisionBox(t,g,l,a,p.predicate,D);return r&&r.box&&r.box.length&&(this.markUsedOrientation(i,n,e),this.placedOrientations[e.crossTileID]=n),r};r((()=>o(F,t.WritingMode.horizontal)),(()=>{const n=f.verticalTextBox;return i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&n?o(n,t.WritingMode.vertical):{box:null,offscreen:null}})),n(C&&C.box&&C.box.length)}}if(k=C,b=k&&k.box&&k.box.length>0,S=k&&k.offscreen,e.useRuntimeCollisionCircles){const n=i.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),l=t.evaluateSizeForFeature(i.textSizeData,h,n),c=o.get("text-padding");I=this.collisionIndex.placeCollisionCircles(g,n,i.lineVertexArray,i.glyphOffsetArray,l,a,s,u,r,A,p.predicate,e.collisionCircleDiameter,c,D),b=y||I.circles.length>0&&!I.collisionDetected,S=S&&I.offscreen}if(f.iconFeatureIndex&&(R=f.iconFeatureIndex),f.iconBox){const t=t=>{const e=w&&P?Tt(t,P.x,P.y,_,A,this.transform.angle):t;return this.collisionIndex.placeCollisionBox(e,v,l,a,p.predicate,D)};T&&T.box&&T.box.length&&f.verticalIconBox?(L=t(f.verticalIconBox),x=L.box.length>0):(L=t(f.iconBox),x=L.box.length>0),S=S&&L.offscreen}const B=d||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,z=m||0===e.numIconVertices;if(B||z?z?B||(x=x&&b):b=x&&b:x=b=x&&b,b&&k&&k.box&&this.collisionIndex.insertCollisionBox(k.box,g,o.get("text-ignore-placement"),i.bucketInstanceId,T&&T.box&&M?M:j,p.ID),x&&L&&this.collisionIndex.insertCollisionBox(L.box,v,o.get("icon-ignore-placement"),i.bucketInstanceId,R,p.ID),I&&(b&&this.collisionIndex.insertCollisionCircles(I.circles,g,o.get("text-ignore-placement"),i.bucketInstanceId,j,p.ID),r)){const t=i.bucketInstanceId;let e=this.collisionCircleArrays[t];void 0===e&&(e=this.collisionCircleArrays[t]=new Ot);for(let n=0;n<I.circles.length;n+=4)e.circles.push(I.circles[n+0]),e.circles.push(I.circles[n+1]),e.circles.push(I.circles[n+2]),e.circles.push(I.collisionDetected?1:0)}this.placements[e.crossTileID]=new Et(b||E,x||O,S||i.justReloaded),n[e.crossTileID]=!0};if(x){const t=i.getSortedSymbolIndexes(this.transform.angle);for(let e=t.length-1;e>=0;--e){const n=t[e];S(i.symbolInstances.get(n),i.collisionArrays[n])}}else for(let t=e.symbolInstanceStart;t<e.symbolInstanceEnd;t++)S(i.symbolInstances.get(t),i.collisionArrays[t]);if(r&&i.bucketInstanceId in this.collisionCircleArrays){const e=this.collisionCircleArrays[i.bucketInstanceId];t.invert(e.invProjMatrix,a),e.viewportMatrix=this.collisionIndex.getViewportMatrix()}i.justReloaded=!1}markUsedJustification(e,n,r,i){let o;o=i===t.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:{left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex}[t.getAnchorJustification(n)];const a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];for(const t of a)t>=0&&(e.text.placedSymbolArray.get(t).crossTileID=o>=0&&t!==o?0:r.crossTileID)}markUsedOrientation(e,n,r){const i=n===t.WritingMode.horizontal||n===t.WritingMode.horizontalOnly?n:0,o=n===t.WritingMode.vertical?n:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];for(const t of a)e.text.placedSymbolArray.get(t).placedOrientation=i;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const e=this.prevPlacement;let n=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;const r=e?e.symbolFadeChange(t):1,i=e?e.opacities:{},o=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(const s in this.placements){const t=this.placements[s],e=i[s];e?(this.opacities[s]=new xt(e,r,t.text,t.icon),n=n||t.text!==e.text.placed||t.icon!==e.icon.placed):(this.opacities[s]=new xt(null,r,t.text,t.icon,t.skipFade),n=n||t.text||t.icon)}for(const s in i){const t=i[s];if(!this.opacities[s]){const e=new xt(t,r,!1,!1);e.isHidden()||(this.opacities[s]=e,n=n||t.text.placed||t.icon.placed)}}for(const s in o)this.variableOffsets[s]||!this.opacities[s]||this.opacities[s].isHidden()||(this.variableOffsets[s]=o[s]);for(const s in a)this.placedOrientations[s]||!this.opacities[s]||this.opacities[s].isHidden()||(this.placedOrientations[s]=a[s]);n?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)}updateLayerOpacities(t,e){const n={};for(const r of e){const e=r.getBucket(t);e&&r.latestFeatureIndex&&t.id===e.layerIds[0]&&this.updateBucketOpacities(e,n,r.collisionBoxArray)}}updateBucketOpacities(e,n,r){e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const i=e.layers[0].layout,o=new xt(null,0,!1,!1,!0),a=i.get("text-allow-overlap"),s=i.get("icon-allow-overlap"),u=i.get("text-variable-anchor"),l="map"===i.get("text-rotation-alignment"),c="map"===i.get("text-pitch-alignment"),f="none"!==i.get("icon-text-fit"),h=new xt(null,0,a&&(s||!e.hasIconData()||i.get("icon-optional")),s&&(a||!e.hasTextData()||i.get("text-optional")),!0);!e.collisionArrays&&r&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(r);const p=(t,e,n)=>{for(let r=0;r<e/4;r++)t.opacityVertexArray.emplaceBack(n)};for(let d=0;d<e.symbolInstances.length;d++){const r=e.symbolInstances.get(d),{numHorizontalGlyphVertices:i,numVerticalGlyphVertices:a,crossTileID:s}=r;let m=this.opacities[s];n[s]?m=o:m||(m=h,this.opacities[s]=m),n[s]=!0;const g=r.numIconVertices>0,y=this.placedOrientations[r.crossTileID],v=y===t.WritingMode.vertical,b=y===t.WritingMode.horizontal||y===t.WritingMode.horizontalOnly;if(i>0||a>0){const t=Bt(m.text);p(e.text,i,v?zt:t),p(e.text,a,b?zt:t);const n=m.text.isHidden();[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex].forEach((t=>{t>=0&&(e.text.placedSymbolArray.get(t).hidden=n||v?1:0)})),r.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).hidden=n||b?1:0);const o=this.variableOffsets[r.crossTileID];o&&this.markUsedJustification(e,o.anchor,r,y);const s=this.placedOrientations[r.crossTileID];s&&(this.markUsedJustification(e,"left",r,s),this.markUsedOrientation(e,s,r))}if(g){const t=Bt(m.icon),n=!(f&&r.verticalPlacedIconSymbolIndex&&v);r.placedIconSymbolIndex>=0&&(p(e.icon,r.numIconVertices,n?t:zt),e.icon.placedSymbolArray.get(r.placedIconSymbolIndex).hidden=m.icon.isHidden()),r.verticalPlacedIconSymbolIndex>=0&&(p(e.icon,r.numVerticalIconVertices,n?zt:t),e.icon.placedSymbolArray.get(r.verticalPlacedIconSymbolIndex).hidden=m.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const n=e.collisionArrays[d];if(n){let r=new t.pointGeometry(0,0);if(n.textBox||n.verticalTextBox){let t=!0;if(u){const e=this.variableOffsets[s];e?(r=Ct(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),l&&r._rotate(c?this.transform.angle:-this.transform.angle)):t=!1}n.textBox&&It(e.textCollisionBox.collisionVertexArray,m.text.placed,!t||v,r.x,r.y),n.verticalTextBox&&It(e.textCollisionBox.collisionVertexArray,m.text.placed,!t||b,r.x,r.y)}const i=Boolean(!b&&n.verticalIconBox);n.iconBox&&It(e.iconCollisionBox.collisionVertexArray,m.icon.placed,i,f?r.x:0,f?r.y:0),n.verticalIconBox&&It(e.iconCollisionBox.collisionVertexArray,m.icon.placed,!i,f?r.x:0,f?r.y:0)}}}if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){const t=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=t.invProjMatrix,e.placementViewportMatrix=t.viewportMatrix,e.collisionCircleArray=t.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}}symbolFadeChange(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(t,e){const n=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*n>t}setStale(){this.stale=!0}}function It(t,e,n,r,i){t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0),t.emplaceBack(e?1:0,n?1:0,r||0,i||0)}const Lt=Math.pow(2,25),jt=Math.pow(2,24),Mt=Math.pow(2,17),Rt=Math.pow(2,16),Nt=Math.pow(2,9),Dt=Math.pow(2,8),Ft=Math.pow(2,1);function Bt(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;const e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*Lt+e*jt+n*Mt+e*Rt+n*Nt+e*Dt+n*Ft+e}const zt=0;class Ut{constructor(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,e,n,r,i){const o=this._bucketParts;for(;this._currentTileIndex<t.length;)if(e.getBucketParts(o,r,t[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,i())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort(((t,e)=>t.sortKey-e.sortKey)));this._currentPartIndex<o.length;)if(e.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,n),this._currentPartIndex++,i())return!0;return!1}}class Gt{constructor(t,e,n,r,i,o,a,s){this.placement=new kt(t,e,o,a,s),this._currentPlacementIndex=n.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._done=!1}isDone(){return this._done}continuePlacement(e,n,r){const i=t.exported.now(),o=()=>{const e=t.exported.now()-i;return!this._forceFullPlacement&&e>2};for(;this._currentPlacementIndex>=0;){const t=n[e[this._currentPlacementIndex]],i=this.placement.collisionIndex.transform.zoom;if("symbol"===t.type&&(!t.minzoom||t.minzoom<=i)&&(!t.maxzoom||t.maxzoom>i)){if(this._inProgressLayer||(this._inProgressLayer=new Ut(t)),this._inProgressLayer.continuePlacement(r[t.source],this.placement,this._showCollisionBoxes,t,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const Vt=512/t.EXTENT/2;class qt{constructor(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(let r=0;r<e.length;r++){const n=e.get(r),i=n.key;this.indexedSymbolInstances[i]||(this.indexedSymbolInstances[i]=[]),this.indexedSymbolInstances[i].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}}getScaledCoordinates(e,n){const r=Vt/Math.pow(2,n.canonical.z-this.tileID.canonical.z);return{x:Math.floor((n.canonical.x*t.EXTENT+e.anchorX)*r),y:Math.floor((n.canonical.y*t.EXTENT+e.anchorY)*r)}}findMatches(t,e,n){const r=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z);for(let i=0;i<t.length;i++){const o=t.get(i);if(o.crossTileID)continue;const a=this.indexedSymbolInstances[o.key];if(!a)continue;const s=this.getScaledCoordinates(o,e);for(const t of a)if(Math.abs(t.coord.x-s.x)<=r&&Math.abs(t.coord.y-s.y)<=r&&!n[t.crossTileID]){n[t.crossTileID]=!0,o.crossTileID=t.crossTileID;break}}}}class Ht{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Wt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const e=Math.round((t-this.lng)/360);if(0!==e)for(const n in this.indexes){const t=this.indexes[n],r={};for(const n in t){const i=t[n];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),r[i.tileID.key]=i}this.indexes[n]=r}this.lng=t}addBucket(t,e,n){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let i=0;i<e.symbolInstances.length;i++)e.symbolInstances.get(i).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});const r=this.usedCrossTileIDs[t.overscaledZ];for(const i in this.indexes){const n=this.indexes[i];if(Number(i)>t.overscaledZ)for(const i in n){const o=n[i];o.tileID.isChildOf(t)&&o.findMatches(e.symbolInstances,t,r)}else{const o=n[t.scaledTo(Number(i)).key];o&&o.findMatches(e.symbolInstances,t,r)}}for(let i=0;i<e.symbolInstances.length;i++){const t=e.symbolInstances.get(i);t.crossTileID||(t.crossTileID=n.generate(),r[t.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new qt(t,e.symbolInstances,e.bucketInstanceId),!0}removeBucketCrossTileIDs(t,e){for(const n in e.indexedSymbolInstances)for(const r of e.indexedSymbolInstances[n])delete this.usedCrossTileIDs[t][r.crossTileID]}removeStaleBuckets(t){let e=!1;for(const n in this.indexes){const r=this.indexes[n];for(const i in r)t[r[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,r[i]),delete r[i],e=!0)}return e}}class Xt{constructor(){this.layerIndexes={},this.crossTileIDs=new Ht,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(t,e,n){let r=this.layerIndexes[t.id];void 0===r&&(r=this.layerIndexes[t.id]=new Wt);let i=!1;const o={};r.handleWrapJump(n);for(const a of e){const e=a.getBucket(t);e&&t.id===e.layerIds[0]&&(e.bucketInstanceId||(e.bucketInstanceId=++this.maxBucketInstanceId),r.addBucket(a.tileID,e,this.crossTileIDs)&&(i=!0),o[e.bucketInstanceId]=!0)}return r.removeStaleBuckets(o)&&(i=!0),i}pruneUnusedLayers(t){const e={};t.forEach((t=>{e[t]=!0}));for(const n in this.layerIndexes)e[n]||delete this.layerIndexes[n]}}var Yt=t.createLayout([{name:"a_pos",type:"Int16",components:2}]);class Zt extends t.Evented{constructor(t){super(),this.sourceCache=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.renderHistory=[],this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,this.renderHistorySize=t._cache.max,t.usedForTerrain=!0,t.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null;for(const t in this._tiles){const e=this._tiles[t];e.textures.forEach((t=>t.destroy())),e.textures=[]}}update(e,n){this.sourceCache.update(e,n),this._renderableTilesKeys=[];for(const r of e.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))this._renderableTilesKeys.push(r.key),this._tiles[r.key]||(r.posMatrix=new Float64Array(16),t.ortho(r.posMatrix,0,t.EXTENT,0,t.EXTENT,0,1),this._tiles[r.key]=new R(r,this.tileSize))}removeOutdated(t){const e={};this.renderHistory=this.renderHistory.filter(((t,e)=>this.renderHistory.indexOf(t)===e)).slice(0,this.renderHistorySize);for(const n of this._renderableTilesKeys)e[n]=!0;for(const n of this.renderHistory)e[n]=!0;for(const n in this._tiles)e[n]||(this._tiles[n].clearTextures(t),delete this._tiles[n])}getRenderableTiles(){return this._renderableTilesKeys.map((t=>this.getTileByID(t)))}getTileByID(t){return this._tiles[t]}getTerrainCoords(e){const n={};for(const r of this._renderableTilesKeys){const i=this._tiles[r].tileID;if(i.canonical.equals(e.canonical)){const i=e.clone();i.posMatrix=new Float64Array(16),t.ortho(i.posMatrix,0,t.EXTENT,0,t.EXTENT,0,1),n[r]=i}else if(i.canonical.isChildOf(e.canonical)){const o=e.clone();o.posMatrix=new Float64Array(16);const a=i.canonical.z-e.canonical.z,s=i.canonical.x-(i.canonical.x>>a<<a),u=i.canonical.y-(i.canonical.y>>a<<a),l=t.EXTENT>>a;t.ortho(o.posMatrix,0,l,0,l,0,1),t.translate(o.posMatrix,o.posMatrix,[-s*l,-u*l,0]),n[r]=o}else if(e.canonical.isChildOf(i.canonical)){const o=e.clone();o.posMatrix=new Float64Array(16);const a=e.canonical.z-i.canonical.z,s=e.canonical.x-(e.canonical.x>>a<<a),u=e.canonical.y-(e.canonical.y>>a<<a),l=t.EXTENT>>a;t.ortho(o.posMatrix,0,t.EXTENT,0,t.EXTENT,0,1),t.translate(o.posMatrix,o.posMatrix,[s*l,u*l,0]),t.scale(o.posMatrix,o.posMatrix,[1/2**a,1/2**a,0]),n[r]=o}}return n}getSourceTile(t,e){const n=this.sourceCache._source;let r=t.overscaledZ-this.deltaZoom;if(r>n.maxzoom&&(r=n.maxzoom),r<n.minzoom)return null;this._sourceTileCache[t.key]||(this._sourceTileCache[t.key]=t.scaledTo(r).key);let i=this.sourceCache.getTileByID(this._sourceTileCache[t.key]);if((!i||!i.dem)&&e)for(;r>=n.minzoom&&(!i||!i.dem);)i=this.sourceCache.getTileByID(t.scaledTo(r--).key);return i}tilesAfterTime(t=Date.now()){return Object.values(this._tiles).filter((e=>e.timeLoaded>=t))}}class Kt{constructor(t,e,n){this.style=t,this.sourceCache=new Zt(e),this.options=n,this.exaggeration="number"==typeof n.exaggeration?n.exaggeration:1,this.elevationOffset="number"==typeof n.elevationOffset?n.elevationOffset:450,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024,this.clearRerenderCache()}getDEMElevation(e,n,r,i=t.EXTENT){if(!(n>=0&&n<i&&r>=0&&r<i))return this.elevationOffset;let o=0;const a=this.getTerrainData(e);if(a.tile&&a.tile.dem){const e=t.transformMat4$1([],[n/i*t.EXTENT,r/i*t.EXTENT],a.u_terrain_matrix),s=[e[0]*a.tile.dem.dim,e[1]*a.tile.dem.dim],u=[Math.floor(s[0]),Math.floor(s[1])],l=a.tile.dem.get(u[0],u[1]),c=a.tile.dem.get(u[0],u[1]+1),f=a.tile.dem.get(u[0]+1,u[1]),h=a.tile.dem.get(u[0]+1,u[1]+1);o=t.number(t.number(l,c,s[0]-u[0]),t.number(f,h,s[0]-u[0]),s[1]-u[1])}return o}rememberForRerender(t,e){for(const n in this.sourceCache._tiles){const r=this.sourceCache._tiles[n];(r.tileID.equals(e)||r.tileID.isChildOf(e))&&(t===this.sourceCache.sourceCache.id&&(r.timeLoaded=Date.now()),this._rerender[t]=this._rerender[t]||{},this._rerender[t][r.tileID.key]=!0)}}needsRerender(t,e){return this._rerender[t]&&this._rerender[t][e.key]}clearRerenderCache(){this._rerender={}}getElevation(e,n,r,i=t.EXTENT){return(this.getDEMElevation(e,n,r,i)+this.elevationOffset)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){const e=this.style.map.painter.context,n=new t.RGBAImage({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new u(e,n,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new u(e,new t.RGBAImage({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.identity([])}const n=this.sourceCache.getSourceTile(e,!0);if(n&&n.dem&&(!n.demTexture||n.needsTerrainPrepare)){const t=this.style.map.painter.context;n.demTexture=this.style.map.painter.getTileTexture(n.dem.stride),n.demTexture?n.demTexture.update(n.dem.getPixels(),{premultiply:!1}):n.demTexture=new u(t,n.dem.getPixels(),t.gl.RGBA,{premultiply:!1}),n.demTexture.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),n.needsTerrainPrepare=!1}const r=n&&n+n.tileID.key+e.key;if(r&&!this._demMatrixCache[r]){const r=this.sourceCache.sourceCache._source.maxzoom;let i=e.canonical.z-n.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=r?i=e.canonical.z-r:t.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const o=e.canonical.x-(e.canonical.x>>i<<i),a=e.canonical.y-(e.canonical.y>>i<<i),s=t.fromScaling(new Float64Array(16),[1/(t.EXTENT<<i),1/(t.EXTENT<<i),0]);t.translate(s,s,[o*t.EXTENT,a*t.EXTENT,0]),this._demMatrixCache[e.key]={matrix:s,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:n&&n.dem&&n.dem.dim||1,u_terrain_matrix:r?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:n&&n.dem&&n.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_offset:this.elevationOffset,u_terrain_exaggeration:this.exaggeration,texture:(n&&n.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:n}}getRTTFramebuffer(){const t=this.style.map.painter;if(!this._rttFramebuffer){const e=this.sourceCache.tileSize*this.qualityFactor;this._rttFramebuffer=t.context.createFramebuffer(e,e,!0),this._rttFramebuffer.depthAttachment.set(t.context.createRenderbuffer(t.context.gl.DEPTH_COMPONENT16,e,e))}return this._rttFramebuffer}getFramebuffer(t){const e=this.style.map.painter,n=e.width/devicePixelRatio,r=e.height/devicePixelRatio;return!this._fbo||this._fbo.width===n&&this._fbo.height===r||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new u(e.context,{width:n,height:r,data:null},e.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(e.context.gl.NEAREST,e.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new u(e.context,{width:n,height:r,data:null},e.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(e.context.gl.NEAREST,e.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=e.context.createFramebuffer(n,r,!0),this._fbo.depthAttachment.set(e.context.createRenderbuffer(e.context.gl.DEPTH_COMPONENT16,n,r))),this._fbo.colorAttachment.set("coords"===t?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const e=this.style.map.painter.context;if(this._coordsTexture)return this._coordsTexture;const n=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let t=0,o=0;t<this._coordsTextureSize;t++)for(let e=0;e<this._coordsTextureSize;e++,o+=4)n[o+0]=255&e,n[o+1]=255&t,n[o+2]=e>>8<<4|t>>8,n[o+3]=0;const r=new t.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),i=new u(e,r,e.gl.RGBA,{premultiply:!1});return i.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=i,i}pointCoordinate(e){const n=new Uint8Array(4),r=this.style.map.painter,i=r.context,o=i.gl;i.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),o.readPixels(e.x,r.height/devicePixelRatio-e.y-1,1,1,o.RGBA,o.UNSIGNED_BYTE,n),i.bindFramebuffer.set(null);const a=n[0]+(n[2]>>4<<8),s=n[1]+((15&n[2])<<8),u=this.coordsIndex[255-n[3]],l=u&&this.sourceCache.getTileByID(u);if(!l)return null;const c=this._coordsTextureSize,f=(1<<l.tileID.canonical.z)*c;return new t.MercatorCoordinate((l.tileID.canonical.x*c+a)/f,(l.tileID.canonical.y*c+s)/f,this.getElevation(l.tileID,a,s,c))}getTerrainMesh(){if(this._mesh)return this._mesh;const e=this.style.map.painter.context,n=new t.PosArray,r=new t.TriangleIndexArray,i=this.meshSize,o=t.EXTENT/i,a=i*i;for(let t=0;t<=i;t++)for(let e=0;e<=i;e++)n.emplaceBack(e*o,t*o);for(let t=0;t<a;t+=i+1)for(let e=0;e<i;e++)r.emplaceBack(e+t,i+e+t+1,i+e+t+2),r.emplaceBack(e+t,i+e+t+2,e+t+1);return this._mesh={indexBuffer:e.createIndexBuffer(r),vertexBuffer:e.createVertexBuffer(n,Yt.members),segments:t.SegmentVector.simpleSegment(0,0,n.length,r.length)},this._mesh}getMinMaxElevation(t){const e=this.getTerrainData(t).tile,n={minElevation:null,maxElevation:null};return e&&e.dem&&(n.minElevation=(e.dem.min+this.elevationOffset)*this.exaggeration,n.maxElevation=(e.dem.max+this.elevationOffset)*this.exaggeration),n}}const $t=(e,n)=>t.emitValidationErrors(e,n&&n.filter((t=>"source.canvas"!==t.identifier))),Jt=t.pick(Y,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Qt=t.pick(Y,["setCenter","setZoom","setBearing","setPitch"]),te=function(){const e={},n=t.spec.$version;for(const r in t.spec.$root){const i=t.spec.$root[r];if(i.required){let t=null;t="version"===r?n:"array"===i.type?[]:{},null!=t&&(e[r]=t)}}return e}();class ee extends t.Evented{constructor(e,n={}){super(),this.map=e,this.dispatcher=new b(H(),this),this.imageManager=new c,this.imageManager.setEventedParent(this),this.glyphManager=new d(e._requestManager,n.localIdeographFontFamily),this.lineAtlas=new v(256,512),this.crossTileSymbolIndex=new Xt,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());const r=this;this._rtlTextPluginCallback=ee.registerForPluginStateChange((e=>{r.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:e.pluginStatus,pluginURL:e.pluginURL},((e,n)=>{if(t.triggerPluginCompletionEvent(e),n&&n.every((t=>t)))for(const t in r.sourceCaches)r.sourceCaches[t].reload()}))})),this.on("data",(t=>{if("source"!==t.dataType||"metadata"!==t.sourceDataType)return;const e=this.sourceCaches[t.sourceId];if(!e)return;const n=e.getSource();if(n&&n.vectorLayerIds)for(const r in this._layers){const t=this._layers[r];t.source===n.id&&this._validateLayer(t)}}))}loadURL(e,n={}){this.fire(new t.Event("dataloading",{dataType:"style"}));const r="boolean"!=typeof n.validate||n.validate,i=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(i,((e,n)=>{this._request=null,e?this.fire(new t.ErrorEvent(e)):n&&this._load(n,r)}))}loadJSON(e,n={}){this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.exported.frame((()=>{this._request=null,this._load(e,!1!==n.validate)}))}loadEmpty(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(te,!1)}_load(e,n){if(n&&$t(this,t.validateStyle(e)))return;this._loaded=!0,this.stylesheet=e;for(const t in e.sources)this.addSource(t,e.sources[t],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);const r=X(this.stylesheet.layers);this._order=r.map((t=>t.id)),this._layers={},this._serializedLayers={};for(let i of r)i=t.createStyleLayer(i),i.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=i,this._serializedLayers[i.id]=i.serialize();this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new y(this.stylesheet.light),this.setTerrain(this.stylesheet.terrain),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}_loadSprite(e){this._spriteRequest=function(e,n,r,i){let o,a,s;const u=r>1?"@2x":"";let l=t.getJSON(n.transformRequest(n.normalizeSpriteURL(e,u,".json"),t.ResourceType.SpriteJSON),((t,e)=>{l=null,s||(s=t,o=e,f())})),c=t.getImage(n.transformRequest(n.normalizeSpriteURL(e,u,".png"),t.ResourceType.SpriteImage),((t,e)=>{c=null,s||(s=t,a=e,f())}));function f(){if(s)i(s);else if(o&&a){const e=t.exported.getImageData(a),n={};for(const r in o){const{width:i,height:a,x:s,y:u,sdf:l,pixelRatio:c,stretchX:f,stretchY:h,content:p}=o[r],d=new t.RGBAImage({width:i,height:a});t.RGBAImage.copy(e,d,{x:s,y:u},{x:0,y:0},{width:i,height:a}),n[r]={data:d,pixelRatio:c,sdf:l,stretchX:f,stretchY:h,content:p}}i(null,n)}}return{cancel(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,this.map.getPixelRatio(),((e,n)=>{if(this._spriteRequest=null,e)this.fire(new t.ErrorEvent(e));else if(n)for(const t in n)this.imageManager.addImage(t,n[t]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))}))}_validateLayer(e){const n=this.sourceCaches[e.source];if(!n)return;const r=e.sourceLayer;if(!r)return;const i=n.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new t.ErrorEvent(new Error(`Source layer "${r}" does not exist on source "${i.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(t){const e=[];for(const n of t){const t=this._layers[n];"custom"!==t.type&&e.push(t.serialize())}return e}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const n=this._changed;if(this._changed){const t=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);(t.length||n.length)&&this._updateWorkerLayers(t,n);for(const e in this._updatedSources){const t=this._updatedSources[e];"reload"===t?this._reloadSource(e):"clear"===t&&this._clearSource(e)}this._updateTilesForChangedImages();for(const r in this._updatedPaintProps)this._layers[r].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}const r={};for(const t in this.sourceCaches){const e=this.sourceCaches[t];r[t]=e.used,e.used=!1}for(const t of this._order){const n=this._layers[t];n.recalculate(e,this._availableImages),!n.isHidden(e.zoom)&&n.source&&(this.sourceCaches[n.source].used=!0)}for(const i in r){const e=this.sourceCaches[i];r[i]!==e.used&&e.fire(new t.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:i}))}this.light.recalculate(e),this.z=e.zoom,n&&this.fire(new t.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateWorkerLayers(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setTerrain(e){if(this._checkLoaded(),this._terrainDataCallback&&this.off("data",this._terrainDataCallback),this._terrainfreezeElevationCallback&&this.map.off("freezeElevation",this._terrainfreezeElevationCallback),e){const t=this.sourceCaches[e.source];if(!t)throw new Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);this.terrain=new Kt(this,t,e),this.map.transform.updateElevation(this.terrain),this._terrainfreezeElevationCallback=t=>{t.freeze?this.map.transform.freezeElevation=!0:(this.map.transform.freezeElevation=!1,this.map.transform.recalculateZoom(this.terrain))},this._terrainDataCallback=t=>{t.tile&&(t.sourceId===e.source?(this.map.transform.updateElevation(this.terrain),this.terrain.rememberForRerender(t.sourceId,t.tile.tileID)):"geojson"===t.source.type&&this.terrain.rememberForRerender(t.sourceId,t.tile.tileID))},this.on("data",this._terrainDataCallback),this.map.on("freezeElevation",this._terrainfreezeElevationCallback)}else this.terrain=null,this.map.transform.updateElevation(this.terrain);this.map.fire(new t.Event("terrain",{terrain:e}))}setState(e){if(this._checkLoaded(),$t(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=X(e.layers);const n=function(t,e){if(!t)return[{command:Y.setStyle,args:[e]}];let n=[];try{if(!i(t.version,e.version))return[{command:Y.setStyle,args:[e]}];i(t.center,e.center)||n.push({command:Y.setCenter,args:[e.center]}),i(t.zoom,e.zoom)||n.push({command:Y.setZoom,args:[e.zoom]}),i(t.bearing,e.bearing)||n.push({command:Y.setBearing,args:[e.bearing]}),i(t.pitch,e.pitch)||n.push({command:Y.setPitch,args:[e.pitch]}),i(t.sprite,e.sprite)||n.push({command:Y.setSprite,args:[e.sprite]}),i(t.glyphs,e.glyphs)||n.push({command:Y.setGlyphs,args:[e.glyphs]}),i(t.transition,e.transition)||n.push({command:Y.setTransition,args:[e.transition]}),i(t.light,e.light)||n.push({command:Y.setLight,args:[e.light]});const r={},o=[];!function(t,e,n,r){let o;for(o in e=e||{},t=t||{})Object.prototype.hasOwnProperty.call(t,o)&&(Object.prototype.hasOwnProperty.call(e,o)||K(o,n,r));for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&(Object.prototype.hasOwnProperty.call(t,o)?i(t[o],e[o])||("geojson"===t[o].type&&"geojson"===e[o].type&&J(t,e,o)?n.push({command:Y.setGeoJSONSourceData,args:[o,e[o].data]}):$(o,e,n,r)):Z(o,e,n))}(t.sources,e.sources,o,r);const a=[];t.layers&&t.layers.forEach((t=>{r[t.source]?n.push({command:Y.removeLayer,args:[t.id]}):a.push(t)})),n=n.concat(o),function(t,e,n){e=e||[];const r=(t=t||[]).map(tt),o=e.map(tt),a=t.reduce(et,{}),s=e.reduce(et,{}),u=r.slice(),l=Object.create(null);let c,f,h,p,d,m,g;for(c=0,f=0;c<r.length;c++)h=r[c],Object.prototype.hasOwnProperty.call(s,h)?f++:(n.push({command:Y.removeLayer,args:[h]}),u.splice(u.indexOf(h,f),1));for(c=0,f=0;c<o.length;c++)h=o[o.length-1-c],u[u.length-1-c]!==h&&(Object.prototype.hasOwnProperty.call(a,h)?(n.push({command:Y.removeLayer,args:[h]}),u.splice(u.lastIndexOf(h,u.length-f),1)):f++,m=u[u.length-c],n.push({command:Y.addLayer,args:[s[h],m]}),u.splice(u.length-c,0,h),l[h]=!0);for(c=0;c<o.length;c++)if(h=o[c],p=a[h],d=s[h],!l[h]&&!i(p,d))if(i(p.source,d.source)&&i(p["source-layer"],d["source-layer"])&&i(p.type,d.type)){for(g in Q(p.layout,d.layout,n,h,null,Y.setLayoutProperty),Q(p.paint,d.paint,n,h,null,Y.setPaintProperty),i(p.filter,d.filter)||n.push({command:Y.setFilter,args:[h,d.filter]}),i(p.minzoom,d.minzoom)&&i(p.maxzoom,d.maxzoom)||n.push({command:Y.setLayerZoomRange,args:[h,d.minzoom,d.maxzoom]}),p)Object.prototype.hasOwnProperty.call(p,g)&&"layout"!==g&&"paint"!==g&&"filter"!==g&&"metadata"!==g&&"minzoom"!==g&&"maxzoom"!==g&&(0===g.indexOf("paint.")?Q(p[g],d[g],n,h,g.slice(6),Y.setPaintProperty):i(p[g],d[g])||n.push({command:Y.setLayerProperty,args:[h,g,d[g]]}));for(g in d)Object.prototype.hasOwnProperty.call(d,g)&&!Object.prototype.hasOwnProperty.call(p,g)&&"layout"!==g&&"paint"!==g&&"filter"!==g&&"metadata"!==g&&"minzoom"!==g&&"maxzoom"!==g&&(0===g.indexOf("paint.")?Q(p[g],d[g],n,h,g.slice(6),Y.setPaintProperty):i(p[g],d[g])||n.push({command:Y.setLayerProperty,args:[h,g,d[g]]}))}else n.push({command:Y.removeLayer,args:[h]}),m=u[u.lastIndexOf(h)+1],n.push({command:Y.addLayer,args:[d,m]})}(a,e.layers,n)}catch(t){console.warn("Unable to compute style diff:",t),n=[{command:Y.setStyle,args:[e]}]}return n}(this.serialize(),e).filter((t=>!(t.command in Qt)));if(0===n.length)return!1;const r=n.filter((t=>!(t.command in Jt)));if(r.length>0)throw new Error(`Unimplemented: ${r.map((t=>t.command)).join(", ")}.`);return n.forEach((t=>{"setTransition"!==t.command&&this[t.command].apply(this,t.args)})),this.stylesheet=e,!0}addImage(e,n){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,n),this._afterImageUpdated(e)}updateImage(t,e){this.imageManager.updateImage(t,e)}getImage(t){return this.imageManager.getImage(t)}removeImage(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,n,r={}){if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(`Source "${e}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(t.validateStyle.source,`sources.${e}`,n,null,r))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const i=this.sourceCaches[e]=new F(e,n,this.dispatcher);i.style=this,i.setEventedParent(this,(()=>({isSourceLoaded:this.loaded(),source:i.serialize(),sourceId:e}))),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(const r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));const n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0}getSource(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}addLayer(e,n,r={}){this._checkLoaded();const i=e.id;if(this.getLayer(i))return void this.fire(new t.ErrorEvent(new Error(`Layer "${i}" already exists on this map.`)));let o;if("custom"===e.type){if($t(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,`layers.${i}`,e,{arrayIndex:-1},r))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}const a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new t.ErrorEvent(new Error(`Cannot add layer "${i}" before non-existing layer "${n}".`)));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){const t=this._removedLayers[i];delete this._removedLayers[i],t.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}moveLayer(e,n){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.ErrorEvent(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===n)return;const r=this._order.indexOf(e);this._order.splice(r,1);const i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new t.ErrorEvent(new Error(`Cannot move layer "${e}" before non-existing layer "${n}".`))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const n=this._layers[e];if(!n)return void this.fire(new t.ErrorEvent(new Error(`Cannot remove non-existing layer "${e}".`)));n.setEventedParent(null);const r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map)}getLayer(t){return this._layers[t]}hasLayer(t){return t in this._layers}setLayerZoomRange(e,n,r){this._checkLoaded();const i=this.getLayer(e);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,n,r={}){this._checkLoaded();const o=this.getLayer(e);if(o){if(!i(o.filter,n))return null==n?(o.filter=void 0,void this._updateLayer(o)):void(this._validate(t.validateStyle.filter,`layers.${o.id}.filter`,n,null,r)||(o.filter=t.clone$1(n),this._updateLayer(o)))}else this.fire(new t.ErrorEvent(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.clone$1(this.getLayer(e).filter)}setLayoutProperty(e,n,r,o={}){this._checkLoaded();const a=this.getLayer(e);a?i(a.getLayoutProperty(n),r)||(a.setLayoutProperty(n,r,o),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,n){const r=this.getLayer(e);if(r)return r.getLayoutProperty(n);this.fire(new t.ErrorEvent(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,n,r,o={}){this._checkLoaded();const a=this.getLayer(e);a?i(a.getPaintProperty(n),r)||(a.setPaintProperty(n,r,o)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(t,e){return this.getLayer(t).getPaintProperty(e)}setFeatureState(e,n){this._checkLoaded();const r=e.source,i=e.sourceLayer,o=this.sourceCaches[r];if(void 0===o)return void this.fire(new t.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)));const a=o.getSource().type;"geojson"===a&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,e.id,n)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,n){this._checkLoaded();const r=e.source,i=this.sourceCaches[r];if(void 0===i)return void this.fire(new t.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)));const o=i.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?n&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(a,e.id,n):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();const n=e.source,r=e.sourceLayer,i=this.sourceCaches[n];if(void 0!==i)return"vector"!==i.getSource().type||r?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,e.id)):void this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(t=>t.serialize())),layers:this._serializeLayers(this._order)},(t=>void 0!==t))}_updateLayer(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0}_flattenAndSortRenderedFeatures(t){const e=t=>"fill-extrusion"===this._layers[t].type,n={},r=[];for(let o=this._order.length-1;o>=0;o--){const i=this._order[o];if(e(i)){n[i]=o;for(const e of t){const t=e[i];if(t)for(const e of t)r.push(e)}}}r.sort(((t,e)=>e.intersectionZ-t.intersectionZ));const i=[];for(let o=this._order.length-1;o>=0;o--){const a=this._order[o];if(e(a))for(let t=r.length-1;t>=0;t--){const e=r[t].feature;if(n[e.layer.id]<o)break;i.push(e),r.pop()}else for(const e of t){const t=e[a];if(t)for(const e of t)i.push(e.feature)}}return i}queryRenderedFeatures(e,n,r){n&&n.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",n.filter,null,n);const i={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const e of n.layers){const n=this._layers[e];if(!n)return this.fire(new t.ErrorEvent(new Error(`The layer '${e}' does not exist in the map's style and cannot be queried for features.`))),[];i[n.source]=!0}}const o=[];n.availableImages=this._availableImages;for(const t in this.sourceCaches)n.layers&&!i[t]||o.push(j(this.sourceCaches[t],this._layers,this._serializedLayers,e,n,r));return this.placement&&o.push(function(t,e,n,r,i,o,a){const s={},u=o.queryRenderedSymbols(r),l=[];for(const c of Object.keys(u).map(Number))l.push(a[c]);l.sort(M);for(const c of l){const n=c.featureIndex.lookupSymbolFeatures(u[c.bucketInstanceId],e,c.bucketIndex,c.sourceLayerIndex,i.filter,i.layers,i.availableImages,t);for(const t in n){const e=s[t]=s[t]||[],r=n[t];r.sort(((t,e)=>{const n=c.featureSortOrder;if(n){const r=n.indexOf(t.featureIndex);return n.indexOf(e.featureIndex)-r}return e.featureIndex-t.featureIndex}));for(const t of r)e.push(t)}}for(const c in s)s[c].forEach((e=>{const r=e.feature,i=n[t[c].source].getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}));return s}(this._layers,this._serializedLayers,this.sourceCaches,e,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(o)}querySourceFeatures(e,n){n&&n.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",n.filter,null,n);const r=this.sourceCaches[e];return r?function(t,e){const n=t.getRenderableIds().map((e=>t.getTileByID(e))),r=[],i={};for(let o=0;o<n.length;o++){const t=n[o],a=t.tileID.canonical.key;i[a]||(i[a]=!0,t.querySourceFeatures(r,e))}return r}(r,n):[]}addSourceType(t,e,n){return ee.getSourceType(t)?n(new Error(`A source type called "${t}" already exists.`)):(ee.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},n):n(null,null))}getLight(){return this.light.getLight()}setLight(e,n={}){this._checkLoaded();const r=this.light.getLight();let o=!1;for(const t in e)if(!i(e[t],r[t])){o=!0;break}if(!o)return;const a={now:t.exported.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,n),this.light.updateTransitions(a)}_validate(e,n,r,i,o={}){return(!o||!1!==o.validate)&&$t(this,e.call(t.validateStyle,t.extend({key:n,style:this.serialize(),value:r,styleSpec:t.spec},i)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const t in this._layers)this._layers[t].setEventedParent(null);for(const t in this.sourceCaches){const e=this.sourceCaches[t];e.setEventedParent(null),e.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(t){this.sourceCaches[t].clearTiles()}_reloadSource(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()}_updateSources(t){for(const e in this.sourceCaches)this.sourceCaches[e].update(t,this.terrain)}_generateCollisionBoxes(){for(const t in this.sourceCaches)this._reloadSource(t)}_updatePlacement(e,n,r,i,o=!1){let a=!1,s=!1;const u={};for(const t of this._order){const n=this._layers[t];if("symbol"!==n.type)continue;if(!u[n.source]){const t=this.sourceCaches[n.source];u[n.source]=t.getRenderableIds(!0).map((e=>t.getTileByID(e))).sort(((t,e)=>e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)))}const r=this.crossTileSymbolIndex.addLayer(n,u[n.source],e.center.lng);a=a||r}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.exported.now(),e.zoom))&&(this.pauseablePlacement=new Gt(e,this.terrain,this._order,o,n,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,u),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.exported.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(const t of this._order){const e=this._layers[t];"symbol"===e.type&&this.placement.updateLayerOpacities(e,u[e.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.exported.now())}_releaseSymbolFadeTiles(){for(const t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,e,n){this.imageManager.getImages(e.icons,n),this._updateTilesForChangedImages();const r=this.sourceCaches[e.source];r&&r.setDependencies(e.tileID.key,e.type,e.icons)}getGlyphs(t,e,n){this.glyphManager.getGlyphs(e.stacks,n)}getResource(e,n,r){return t.makeRequest(n,r)}}ee.getSourceType=function(t){return I[t]},ee.setSourceType=function(t,e){I[t]=e},ee.registerForPluginStateChange=t.registerForPluginStateChange;var ne="attribute vec2 a_pos;uniform mat4 u_matrix;varying vec2 v_texture_pos;varying float v_depth;void main() {v_texture_pos=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);v_depth=gl_Position.z/gl_Position.w;}";const re={prelude:ie("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_offset;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return (elevation+u_terrain_offset)*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:ie("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:ie("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ie("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:ie("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:ie("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),heatmapTexture:ie("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ie("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ie("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:ie("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:ie("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:ie("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:ie("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:ie("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:ie("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat baseDelta=10.0;float ele=get_elevation(a_centroid);\n#else\nfloat baseDelta=0.0;float ele=0.0;\n#endif\nbase=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:ie("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat baseDelta=10.0;float ele=get_elevation(a_centroid);\n#else\nfloat baseDelta=0.0;float ele=0.0;\n#endif\nbase=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:ie("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:ie("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:ie("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:ie("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:ie("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:ie("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:ie("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:ie("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:ie("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:ie("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:ie("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",ne),terrainDepth:ie("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",ne),terrainCoords:ie("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",ne)};function ie(t,e){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=e.match(/attribute ([\w]+) ([\w]+)/g),i=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=o?o.concat(i):i,s={};return{fragmentSource:t=t.replace(n,((t,e,n,r,i)=>(s[i]=!0,"define"===e?`\n#ifndef HAS_UNIFORM_u_${i}\nvarying ${n} ${r} ${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${i}\n    ${n} ${r} ${i} = u_${i};\n#endif\n`))),vertexSource:e=e.replace(n,((t,e,n,r,i)=>{const o="float"===r?"vec2":"vec4",a=i.match(/color/)?"color":o;return s[i]?"define"===e?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${n} ${o} a_${i};\nvarying ${n} ${r} ${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n    ${i} = a_${i};\n#else\n    ${n} ${r} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n    ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n    ${n} ${r} ${i} = u_${i};\n#endif\n`:"define"===e?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${n} ${o} a_${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n    ${n} ${r} ${i} = a_${i};\n#else\n    ${n} ${r} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n    ${n} ${r} ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n    ${n} ${r} ${i} = u_${i};\n#endif\n`})),staticAttributes:r,staticUniforms:a}}class oe{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(t,e,n,r,i,o,a,s,u){this.context=t;let l=this.boundPaintVertexBuffers.length!==r.length;for(let c=0;!l&&c<r.length;c++)this.boundPaintVertexBuffers[c]!==r[c]&&(l=!0);t.extVertexArrayObject&&this.vao&&this.boundProgram===e&&this.boundLayoutVertexBuffer===n&&!l&&this.boundIndexBuffer===i&&this.boundVertexOffset===o&&this.boundDynamicVertexBuffer===a&&this.boundDynamicVertexBuffer2===s&&this.boundDynamicVertexBuffer3===u?(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind(),u&&u.bind()):this.freshBind(e,n,r,i,o,a,s,u)}freshBind(t,e,n,r,i,o,a,s){let u;const l=t.numAttributes,c=this.context,f=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),u=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=r,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a,this.boundDynamicVertexBuffer3=s;else{u=c.currentNumAttributes||0;for(let t=l;t<u;t++)f.disableVertexAttribArray(t)}e.enableAttributes(f,t);for(const h of n)h.enableAttributes(f,t);o&&o.enableAttributes(f,t),a&&a.enableAttributes(f,t),s&&s.enableAttributes(f,t),e.bind(),e.setVertexAttribPointers(f,t,i);for(const h of n)h.bind(),h.setVertexAttribPointers(f,t,i);o&&(o.bind(),o.setVertexAttribPointers(f,t,i)),r&&r.bind(),a&&(a.bind(),a.setVertexAttribPointers(f,t,i)),s&&(s.bind(),s.setVertexAttribPointers(f,t,i)),c.currentNumAttributes=l}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function ae(t){const e=[];for(let n=0;n<t.length;n++){if(null===t[n])continue;const r=t[n].split(" ");e.push(r.pop())}return e}class se{constructor(e,n,r,i,o,a,s){const u=e.gl;this.program=u.createProgram();const l=ae(r.staticAttributes),c=i?i.getBinderAttributes():[],f=l.concat(c),h=re.prelude.staticUniforms?ae(re.prelude.staticUniforms):[],p=r.staticUniforms?ae(r.staticUniforms):[],d=i?i.getBinderUniforms():[],m=h.concat(p).concat(d),g=[];for(const t of m)g.indexOf(t)<0&&g.push(t);const y=i?i.defines():[];a&&y.push("#define OVERDRAW_INSPECTOR;"),s&&y.push("#define TERRAIN3D;");const v=y.concat(re.prelude.fragmentSource,r.fragmentSource).join("\n"),b=y.concat(re.prelude.vertexSource,r.vertexSource).join("\n"),_=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);u.shaderSource(_,v),u.compileShader(_),u.attachShader(this.program,_);const A=u.createShader(u.VERTEX_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);u.shaderSource(A,b),u.compileShader(A),u.attachShader(this.program,A),this.attributes={};const w={};this.numAttributes=f.length;for(let t=0;t<this.numAttributes;t++)f[t]&&(u.bindAttribLocation(this.program,t,f[t]),this.attributes[f[t]]=t);u.linkProgram(this.program),u.deleteShader(A),u.deleteShader(_);for(let t=0;t<g.length;t++){const e=g[t];if(e&&!w[e]){const t=u.getUniformLocation(this.program,e);t&&(w[e]=t)}}this.fixedUniforms=o(e,w),this.terrainUniforms=((e,n)=>({u_depth:new t.Uniform1i(e,n.u_depth),u_terrain:new t.Uniform1i(e,n.u_terrain),u_terrain_dim:new t.Uniform1f(e,n.u_terrain_dim),u_terrain_matrix:new t.UniformMatrix4f(e,n.u_terrain_matrix),u_terrain_unpack:new t.Uniform4f(e,n.u_terrain_unpack),u_terrain_offset:new t.Uniform1f(e,n.u_terrain_offset),u_terrain_exaggeration:new t.Uniform1f(e,n.u_terrain_exaggeration)}))(e,w),this.binderUniforms=i?i.getUniforms(e,w):[]}draw(t,e,n,r,i,o,a,s,u,l,c,f,h,p,d,m,g,y){const v=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(n),t.setStencilMode(r),t.setColorMode(i),t.setCullFace(o),s){t.activeTexture.set(v.TEXTURE2),v.bindTexture(v.TEXTURE_2D,s.depthTexture),t.activeTexture.set(v.TEXTURE3),v.bindTexture(v.TEXTURE_2D,s.texture);for(const t in this.terrainUniforms)this.terrainUniforms[t].set(s[t])}for(const _ in this.fixedUniforms)this.fixedUniforms[_].set(a[_]);d&&d.setUniforms(t,this.binderUniforms,h,{zoom:p});const b={[v.LINES]:2,[v.TRIANGLES]:3,[v.LINE_STRIP]:1}[e];for(const _ of f.get()){const n=_.vaos||(_.vaos={});(n[u]||(n[u]=new oe)).bind(t,this,l,d?d.getPaintVertexBuffers():[],c,_.vertexOffset,m,g,y),v.drawElements(e,_.primitiveLength*b,v.UNSIGNED_SHORT,_.primitiveOffset*b*2)}}}function ue(t,e,n){const r=1/At(n,1,e.transform.tileZoom),i=Math.pow(2,n.tileID.overscaledZ),o=n.tileSize*Math.pow(2,e.transform.tileZoom)/i,a=o*(n.tileID.canonical.x+n.tileID.wrap*i),s=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[r,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}const le=(e,n,r,i)=>{const o=n.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],u=t.create$1();"viewport"===o.properties.get("anchor")&&t.fromRotation(u,-n.transform.angle),t.transformMat3(s,s,u);const l=o.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+r,u_opacity:i}},ce=(e,n,r,i,o,a,s)=>t.extend(le(e,n,r,i),ue(a,n,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8}),fe=t=>({u_matrix:t}),he=(e,n,r,i)=>t.extend(fe(e),ue(r,n,i)),pe=(t,e)=>({u_matrix:t,u_world:e}),de=(e,n,r,i,o)=>t.extend(he(e,n,r,i),{u_world:o}),me=(t,e,n,r)=>{const i=t.transform;let o,a;if("map"===r.paint.get("circle-pitch-alignment")){const t=At(n,1,i.zoom);o=!0,a=[t,t]}else o=!1,a=i.pixelsToGLUnits;return{u_camera_to_center_distance:i.cameraToCenterDistance,u_scale_with_map:+("map"===r.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(e.posMatrix,n,r.paint.get("circle-translate"),r.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:t.pixelRatio,u_extrude_scale:a}},ge=(t,e,n)=>{const r=At(n,1,e.zoom),i=Math.pow(2,e.zoom-n.tileID.overscaledZ),o=n.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:r,u_extrude_scale:[e.pixelsToGLUnits[0]/(r*i),e.pixelsToGLUnits[1]/(r*i)],u_overscale_factor:o}},ye=(t,e,n=1)=>({u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:n}),ve=t=>({u_matrix:t}),be=(t,e,n,r)=>({u_matrix:t,u_extrude_scale:At(e,1,n),u_intensity:r});function _e(e,n){const r=Math.pow(2,n.canonical.z),i=n.canonical.y;return[new t.MercatorCoordinate(0,i/r).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/r).toLngLat().lat]}const Ae=(t,e,n,r)=>{const i=t.transform;return{u_matrix:Se(t,e,n,r),u_ratio:1/At(e,1,i.zoom),u_device_pixel_ratio:t.pixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},we=(e,n,r,i,o)=>t.extend(Ae(e,n,r,o),{u_image:0,u_image_height:i}),xe=(t,e,n,r,i)=>{const o=t.transform,a=Oe(e,o);return{u_matrix:Se(t,e,n,i),u_texsize:e.imageAtlasTexture.size,u_ratio:1/At(e,1,o.zoom),u_device_pixel_ratio:t.pixelRatio,u_image:0,u_scale:[a,r.fromScale,r.toScale],u_fade:r.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Ee=(e,n,r,i,o,a)=>{const s=e.lineAtlas,u=Oe(n,e.transform),l="round"===r.layout.get("line-cap"),c=s.getDash(i.from,l),f=s.getDash(i.to,l),h=c.width*o.fromScale,p=f.width*o.toScale;return t.extend(Ae(e,n,r,a),{u_patternscale_a:[u/h,-c.height/2],u_patternscale_b:[u/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*e.pixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:f.y,u_mix:o.t})};function Oe(t,e){return 1/At(t,1,e.tileZoom)}function Se(t,e,n,r){return t.translatePosMatrix(r?r.posMatrix:e.tileID.posMatrix,e,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const Pe=(t,e,n,r,i)=>{return{u_matrix:t,u_tl_parent:e,u_scale_parent:n,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Ce(i.paint.get("raster-hue-rotate"))};var o,a};function Ce(t){t*=Math.PI/180;const e=Math.sin(t),n=Math.cos(t);return[(2*n+1)/3,(-Math.sqrt(3)*e-n+1)/3,(Math.sqrt(3)*e-n+1)/3]}const Te=(t,e,n,r,i,o,a,s,u,l)=>{const c=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+u,u_pitch_with_map:+r,u_texsize:l,u_texture:0}},ke=(e,n,r,i,o,a,s,u,l,c,f)=>{const h=o.transform;return t.extend(Te(e,n,r,i,o,a,s,u,l,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:o.pixelRatio,u_is_halo:+f})},Ie=(e,n,r,i,o,a,s,u,l,c)=>t.extend(ke(e,n,r,i,o,a,s,u,!0,l,!0),{u_texsize_icon:c,u_texture_icon:1}),Le=(t,e,n)=>({u_matrix:t,u_opacity:e,u_color:n}),je=(e,n,r,i,o,a)=>t.extend(function(t,e,n,r){const i=n.imageManager.getPattern(t.from.toString()),o=n.imageManager.getPattern(t.to.toString()),{width:a,height:s}=n.imageManager.getPixelSize(),u=Math.pow(2,r.tileID.overscaledZ),l=r.tileSize*Math.pow(2,n.transform.tileZoom)/u,c=l*(r.tileID.canonical.x+r.tileID.wrap*u),f=l*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[a,s],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/At(r,1,n.transform.tileZoom),u_pixel_coord_upper:[c>>16,f>>16],u_pixel_coord_lower:[65535&c,65535&f]}}(i,a,r,o),{u_matrix:e,u_opacity:n}),Me={fillExtrusion:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_opacity:new t.Uniform1f(e,n.u_opacity)}),fillExtrusionPattern:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,n.u_height_factor),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade),u_opacity:new t.Uniform1f(e,n.u_opacity)}),fill:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}),fillPattern:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}),fillOutline:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world)}),fillOutlinePattern:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}),circle:(e,n)=>({u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,n.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}),collisionBox:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,n.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,n.u_overscale_factor)}),collisionCircle:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,n.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,n.u_viewport_size)}),debug:(e,n)=>({u_color:new t.UniformColor(e,n.u_color),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_overlay:new t.Uniform1i(e,n.u_overlay),u_overlay_scale:new t.Uniform1f(e,n.u_overlay_scale)}),clippingMask:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}),heatmap:(e,n)=>({u_extrude_scale:new t.Uniform1f(e,n.u_extrude_scale),u_intensity:new t.Uniform1f(e,n.u_intensity),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}),heatmapTexture:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_color_ramp:new t.Uniform1i(e,n.u_color_ramp),u_opacity:new t.Uniform1f(e,n.u_opacity)}),hillshade:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_latrange:new t.Uniform2f(e,n.u_latrange),u_light:new t.Uniform2f(e,n.u_light),u_shadow:new t.UniformColor(e,n.u_shadow),u_highlight:new t.UniformColor(e,n.u_highlight),u_accent:new t.UniformColor(e,n.u_accent)}),hillshadePrepare:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_dimension:new t.Uniform2f(e,n.u_dimension),u_zoom:new t.Uniform1f(e,n.u_zoom),u_unpack:new t.Uniform4f(e,n.u_unpack)}),line:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels)}),lineGradient:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_image:new t.Uniform1i(e,n.u_image),u_image_height:new t.Uniform1f(e,n.u_image_height)}),linePattern:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_texsize:new t.Uniform2f(e,n.u_texsize),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_image:new t.Uniform1i(e,n.u_image),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}),lineSDF:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,n.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,n.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,n.u_sdfgamma),u_image:new t.Uniform1i(e,n.u_image),u_tex_y_a:new t.Uniform1f(e,n.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,n.u_tex_y_b),u_mix:new t.Uniform1f(e,n.u_mix)}),raster:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_tl_parent:new t.Uniform2f(e,n.u_tl_parent),u_scale_parent:new t.Uniform1f(e,n.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,n.u_buffer_scale),u_fade_t:new t.Uniform1f(e,n.u_fade_t),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image0:new t.Uniform1i(e,n.u_image0),u_image1:new t.Uniform1i(e,n.u_image1),u_brightness_low:new t.Uniform1f(e,n.u_brightness_low),u_brightness_high:new t.Uniform1f(e,n.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,n.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,n.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,n.u_spin_weights)}),symbolIcon:(e,n)=>({u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture)}),symbolSDF:(e,n)=>({u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,n.u_is_halo)}),symbolTextAndIcon:(e,n)=>({u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texsize_icon:new t.Uniform2f(e,n.u_texsize_icon),u_texture:new t.Uniform1i(e,n.u_texture),u_texture_icon:new t.Uniform1i(e,n.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,n.u_is_halo)}),background:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_color:new t.UniformColor(e,n.u_color)}),backgroundPattern:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image:new t.Uniform1i(e,n.u_image),u_pattern_tl_a:new t.Uniform2f(e,n.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,n.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,n.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,n.u_pattern_br_b),u_texsize:new t.Uniform2f(e,n.u_texsize),u_mix:new t.Uniform1f(e,n.u_mix),u_pattern_size_a:new t.Uniform2f(e,n.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,n.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,n.u_scale_a),u_scale_b:new t.Uniform1f(e,n.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,n.u_tile_units_to_pixels)}),terrain:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_texture:new t.Uniform1i(e,n.u_texture)}),terrainDepth:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}),terrainCoords:(e,n)=>({u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_texture:new t.Uniform1i(e,n.u_texture),u_terrain_coords_id:new t.Uniform1f(e,n.u_terrain_coords_id)})};class Re{constructor(t,e,n){this.context=t;const r=t.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Ne={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class De{constructor(t,e,n,r){this.length=e.length,this.attributes=n,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.context=t;const i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){const e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,e){for(let n=0;n<this.attributes.length;n++){const r=e.attributes[this.attributes[n].name];void 0!==r&&t.enableVertexAttribArray(r)}}setVertexAttribPointers(t,e,n){for(let r=0;r<this.attributes.length;r++){const i=this.attributes[r],o=e.attributes[i.name];void 0!==o&&t.vertexAttribPointer(o,i.components,t[Ne[i.type]],!1,this.itemSize,i.offset+this.itemSize*(n||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Fe{constructor(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(t){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Be extends Fe{getDefault(){return t.Color.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class ze extends Fe{getDefault(){return 1}set(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)}}class Ue extends Fe{getDefault(){return 0}set(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)}}class Ge extends Fe{getDefault(){return[!0,!0,!0,!0]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class Ve extends Fe{getDefault(){return!0}set(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)}}class qe extends Fe{getDefault(){return 255}set(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)}}class He extends Fe{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(t){const e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)}}class We extends Fe{getDefault(){const t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)}}class Xe extends Fe{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}}class Ye extends Fe{getDefault(){return[0,1]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)}}class Ze extends Fe{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}}class Ke extends Fe{getDefault(){return this.gl.LESS}set(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)}}class $e extends Fe{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}}class Je extends Fe{getDefault(){const t=this.gl;return[t.ONE,t.ZERO]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)}}class Qe extends Fe{getDefault(){return t.Color.transparent}set(t){const e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class tn extends Fe{getDefault(){return this.gl.FUNC_ADD}set(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)}}class en extends Fe{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}}class nn extends Fe{getDefault(){return this.gl.BACK}set(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)}}class rn extends Fe{getDefault(){return this.gl.CCW}set(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)}}class on extends Fe{getDefault(){return null}set(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)}}class an extends Fe{getDefault(){return this.gl.TEXTURE0}set(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)}}class sn extends Fe{getDefault(){const t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class un extends Fe{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}}class ln extends Fe{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class cn extends Fe{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}}class fn extends Fe{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class hn extends Fe{getDefault(){return null}set(t){const e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class pn extends Fe{constructor(t){super(t),this.vao=t.extVertexArrayObject}getDefault(){return null}set(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)}}class dn extends Fe{getDefault(){return 4}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}}class mn extends Fe{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}}class gn extends Fe{getDefault(){return!1}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}}class yn extends Fe{constructor(t,e){super(t),this.context=t,this.parent=e}getDefault(){return null}}class vn extends yn{setDirty(){this.dirty=!0}set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}}class bn extends yn{set(t){if(t===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class _n{constructor(t,e,n,r){this.context=t,this.width=e,this.height=n;const i=this.framebuffer=t.gl.createFramebuffer();this.colorAttachment=new vn(t,i),r&&(this.depthAttachment=new bn(t,i))}destroy(){const t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){const e=this.depthAttachment.get();e&&t.deleteRenderbuffer(e)}t.deleteFramebuffer(this.framebuffer)}}class An{constructor(t,e,n){this.blendFunction=t,this.blendColor=e,this.mask=n}}An.Replace=[1,0],An.disabled=new An(An.Replace,t.Color.transparent,[!1,!1,!1,!1]),An.unblended=new An(An.Replace,t.Color.transparent,[!0,!0,!0,!0]),An.alphaBlended=new An([1,771],t.Color.transparent,[!0,!0,!0,!0]);class wn{constructor(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Be(this),this.clearDepth=new ze(this),this.clearStencil=new Ue(this),this.colorMask=new Ge(this),this.depthMask=new Ve(this),this.stencilMask=new qe(this),this.stencilFunc=new He(this),this.stencilOp=new We(this),this.stencilTest=new Xe(this),this.depthRange=new Ye(this),this.depthTest=new Ze(this),this.depthFunc=new Ke(this),this.blend=new $e(this),this.blendFunc=new Je(this),this.blendColor=new Qe(this),this.blendEquation=new tn(this),this.cullFace=new en(this),this.cullFaceSide=new nn(this),this.frontFace=new rn(this),this.program=new on(this),this.activeTexture=new an(this),this.viewport=new sn(this),this.bindFramebuffer=new un(this),this.bindRenderbuffer=new ln(this),this.bindTexture=new cn(this),this.bindVertexBuffer=new fn(this),this.bindElementBuffer=new hn(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new pn(this),this.pixelStoreUnpack=new dn(this),this.pixelStoreUnpackPremultiplyAlpha=new mn(this),this.pixelStoreUnpackFlipY=new gn(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(t.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(t,e){return new Re(this,t,e)}createVertexBuffer(t,e,n){return new De(this,t,e,n)}createRenderbuffer(t,e,n){const r=this.gl,i=r.createRenderbuffer();return this.bindRenderbuffer.set(i),r.renderbufferStorage(r.RENDERBUFFER,t,e,n),this.bindRenderbuffer.set(null),i}createFramebuffer(t,e,n){return new _n(this,t,e,n)}clear({color:t,depth:e}){const n=this.gl;let r=0;t&&(r|=n.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==e&&(r|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(e),this.depthMask.set(!0)),n.clear(r)}setCullFace(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))}setDepthMode(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)}setStencilMode(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)}setColorMode(t){i(t.blendFunction,An.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class xn{constructor(t,e,n){this.func=t,this.mask=e,this.range=n}}xn.ReadOnly=!1,xn.ReadWrite=!0,xn.disabled=new xn(519,xn.ReadOnly,[0,1]);const En=7680;class On{constructor(t,e,n,r,i,o){this.test=t,this.ref=e,this.mask=n,this.fail=r,this.depthFail=i,this.pass=o}}On.disabled=new On({func:519,mask:0},0,0,En,En,En);class Sn{constructor(t,e,n){this.enable=t,this.mode=e,this.frontFace=n}}let Pn;function Cn(e,n,r,i,o,a,s){const u=e.context,l=u.gl,c=e.useProgram("collisionBox"),f=[];let h=0,p=0;for(let _=0;_<i.length;_++){const d=i[_],m=n.getTile(d),g=m.getBucket(r);if(!g)continue;let y=d.posMatrix;0===o[0]&&0===o[1]||(y=e.translatePosMatrix(d.posMatrix,m,o,a));const v=s?g.textCollisionBox:g.iconCollisionBox,b=g.collisionCircleArray;if(b.length>0){const n=t.create(),r=y;t.mul(n,g.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(n,n,g.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:r,invTransform:n,coord:d}),h+=b.length/4,p=h}v&&c.draw(u,l.LINES,xn.disabled,On.disabled,e.colorModeForRenderPass(),Sn.disabled,ge(y,e.transform,m),e.style.terrain&&e.style.terrain.getTerrainData(d),r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,e.transform.zoom,null,null,v.collisionVertexBuffer)}if(!s||!f.length)return;const d=e.useProgram("collisionCircle"),m=new t.CollisionCircleLayoutArray;m.resize(4*h),m._trim();let g=0;for(const t of f)for(let e=0;e<t.circleArray.length/4;e++){const n=4*e,r=t.circleArray[n+0],i=t.circleArray[n+1],o=t.circleArray[n+2],a=t.circleArray[n+3];m.emplace(g++,r,i,o,a,0),m.emplace(g++,r,i,o,a,1),m.emplace(g++,r,i,o,a,2),m.emplace(g++,r,i,o,a,3)}(!Pn||Pn.length<2*h)&&(Pn=function(e){const n=2*e,r=new t.QuadTriangleArray;r.resize(n),r._trim();for(let t=0;t<n;t++){const e=6*t;r.uint16[e+0]=4*t+0,r.uint16[e+1]=4*t+1,r.uint16[e+2]=4*t+2,r.uint16[e+3]=4*t+2,r.uint16[e+4]=4*t+3,r.uint16[e+5]=4*t+0}return r}(h));const y=u.createIndexBuffer(Pn,!0),v=u.createVertexBuffer(m,t.collisionCircleLayout.members,!0);for(const _ of f){const n={u_matrix:_.transform,u_inv_matrix:_.invTransform,u_camera_to_center_distance:(b=e.transform).cameraToCenterDistance,u_viewport_size:[b.width,b.height]};d.draw(u,l.TRIANGLES,xn.disabled,On.disabled,e.colorModeForRenderPass(),Sn.disabled,n,e.style.terrain&&e.style.terrain.getTerrainData(_.coord),r.id,v,y,t.SegmentVector.simpleSegment(0,2*_.circleOffset,_.circleArray.length,_.circleArray.length/2),null,e.transform.zoom,null,null,null)}var b;v.destroy(),y.destroy()}Sn.disabled=new Sn(!1,1029,2305),Sn.backCCW=new Sn(!0,1029,2305);const Tn=t.identity(new Float32Array(16));function kn(e,n,r,i,o,a){const{horizontalAlign:s,verticalAlign:u}=t.getAnchorAlignment(e),l=-(s-.5)*n,c=-(u-.5)*r,f=t.evaluateVariableOffset(e,i);return new t.pointGeometry((l/o+f[0])*a,(c/o+f[1])*a)}function In(e,n,r,i,o,a,s,u,l,c,f){const h=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,d=e.icon.dynamicLayoutVertexArray,m={};p.clear();for(let g=0;g<h.length;g++){const d=h.get(g),y=e.allowVerticalPlacement&&!d.placedOrientation,v=d.hidden||!d.crossTileID||y?null:i[d.crossTileID];if(v){const i=new t.pointGeometry(d.anchorX,d.anchorY),h=st(i,r?s:a,f),g=ut(o.cameraToCenterDistance,h.signedDistanceFromCamera);let y=t.evaluateSizeForFeature(e.textSizeData,l,d)*g/t.ONE_EM;r&&(y*=e.tilePixelRatio/u);const{width:b,height:_,anchor:A,textOffset:w,textBoxScale:x}=v,E=kn(A,b,_,w,x,y),O=r?st(i.add(E),a,f).point:h.point.add(n?E.rotate(-o.angle):E),S=e.allowVerticalPlacement&&d.placedOrientation===t.WritingMode.vertical?Math.PI/2:0;for(let e=0;e<d.numGlyphs;e++)t.addDynamicAttributes(p,O,S);c&&d.associatedIconIndex>=0&&(m[d.associatedIconIndex]={shiftedAnchor:O,angle:S})}else yt(d.numGlyphs,p)}if(c){d.clear();const n=e.icon.placedSymbolArray;for(let e=0;e<n.length;e++){const r=n.get(e);if(r.hidden)yt(r.numGlyphs,d);else{const n=m[e];if(n)for(let e=0;e<r.numGlyphs;e++)t.addDynamicAttributes(d,n.shiftedAnchor,n.angle);else yt(r.numGlyphs,d)}}e.icon.dynamicLayoutVertexBuffer.updateData(d)}e.text.dynamicLayoutVertexBuffer.updateData(p)}function Ln(t,e,n){return n.iconsInText&&e?"symbolTextAndIcon":t?"symbolSDF":"symbolIcon"}function jn(e,n,r,i,o,a,s,u,l,c,f,h){const p=e.context,d=p.gl,m=e.transform,g="map"===u,y="map"===l,v="viewport"!==u&&"point"!==r.layout.get("symbol-placement"),b=g&&!y&&!v,_=!r.layout.get("symbol-sort-key").isConstant();let A=!1;const w=e.depthModeForSublayer(0,xn.ReadOnly),x=r.layout.get("text-variable-anchor"),E=[];for(const O of i){const i=n.getTile(O),u=i.getBucket(r);if(!u)continue;const l=o?u.text:u.icon;if(!l||!l.segments.get().length)continue;const f=l.programConfigurations.get(r.id),h=o||u.sdfIcons,p=o?u.textSizeData:u.iconSizeData,w=y||0!==m.pitch,S=e.useProgram(Ln(h,o,u),f),P=t.evaluateSizeForZoom(p,m.zoom),C=e.style.terrain&&e.style.terrain.getTerrainData(O);let T,k,I,L,j=[0,0],M=null;if(o){if(k=i.glyphAtlasTexture,I=d.LINEAR,T=i.glyphAtlasTexture.size,u.iconsInText){j=i.imageAtlasTexture.size,M=i.imageAtlasTexture;const t="composite"===p.kind||"camera"===p.kind;L=w||e.options.rotating||e.options.zooming||t?d.LINEAR:d.NEAREST}}else{const t=1!==r.layout.get("icon-size").constantOr(0)||u.iconsNeedLinear;k=i.imageAtlasTexture,I=h||e.options.rotating||e.options.zooming||t||w?d.LINEAR:d.NEAREST,T=i.imageAtlasTexture.size}const R=At(i,1,e.transform.zoom),N=ot(O.posMatrix,y,g,e.transform,R),D=at(O.posMatrix,y,g,e.transform,R),F=x&&u.hasTextData(),B="none"!==r.layout.get("icon-text-fit")&&F&&u.hasIconData();if(v){const t=e.style.terrain?(t,n)=>e.style.terrain.getElevation(O,t,n):null,n="map"===r.layout.get("text-rotation-alignment");ct(u,O.posMatrix,e,o,N,D,y,c,n,t)}const z=e.translatePosMatrix(O.posMatrix,i,a,s),U=v||o&&x||B?Tn:N,G=e.translatePosMatrix(D,i,a,s,!0),V=h&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1);let q;q=h?u.iconsInText?Ie(p.kind,P,b,y,e,z,U,G,T,j):ke(p.kind,P,b,y,e,z,U,G,o,T,!0):Te(p.kind,P,b,y,e,z,U,G,o,T);const H={program:S,buffers:l,uniformValues:q,atlasTexture:k,atlasTextureIcon:M,atlasInterpolation:I,atlasInterpolationIcon:L,isSDF:h,hasHalo:V};if(_&&u.canOverlap){A=!0;const e=l.segments.get();for(const n of e)E.push({segments:new t.SegmentVector([n]),sortKey:n.sortKey,state:H,terrainData:C})}else E.push({segments:l.segments,sortKey:0,state:H,terrainData:C})}A&&E.sort(((t,e)=>t.sortKey-e.sortKey));for(const t of E){const n=t.state;if(p.activeTexture.set(d.TEXTURE0),n.atlasTexture.bind(n.atlasInterpolation,d.CLAMP_TO_EDGE),n.atlasTextureIcon&&(p.activeTexture.set(d.TEXTURE1),n.atlasTextureIcon&&n.atlasTextureIcon.bind(n.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),n.isSDF){const i=n.uniformValues;n.hasHalo&&(i.u_is_halo=1,Mn(n.buffers,t.segments,r,e,n.program,w,f,h,i,t.terrainData)),i.u_is_halo=0}Mn(n.buffers,t.segments,r,e,n.program,w,f,h,n.uniformValues,t.terrainData)}}function Mn(t,e,n,r,i,o,a,s,u,l){const c=r.context;i.draw(c,c.gl.TRIANGLES,o,a,s,Sn.disabled,u,l,n.id,t.layoutVertexBuffer,t.indexBuffer,e,n.paint,r.transform.zoom,t.programConfigurations.get(n.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function Rn(t,e,n,r,i,o,a){const s=t.context.gl,u=n.paint.get("fill-pattern"),l=u&&u.constantOr(1),c=n.getCrossfadeParameters();let f,h,p,d,m;a?(h=l&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",f=s.LINES):(h=l?"fillPattern":"fill",f=s.TRIANGLES);for(const g of r){const r=e.getTile(g);if(l&&!r.patternsLoaded())continue;const y=r.getBucket(n);if(!y)continue;const v=y.programConfigurations.get(n.id),b=t.useProgram(h,v),_=t.style.terrain&&t.style.terrain.getTerrainData(g);l&&(t.context.activeTexture.set(s.TEXTURE0),r.imageAtlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE),v.updatePaintBuffers(c));const A=u.constantOr(null);if(A&&r.imageAtlas){const t=r.imageAtlas,e=t.patternPositions[A.to.toString()],n=t.patternPositions[A.from.toString()];e&&n&&v.setConstantPatternPositions(e,n)}const w=_?g:null,x=t.translatePosMatrix(w?w.posMatrix:g.posMatrix,r,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(a){d=y.indexBuffer2,m=y.segments2;const e=[s.drawingBufferWidth,s.drawingBufferHeight];p="fillOutlinePattern"===h&&l?de(x,t,c,r,e):pe(x,e)}else d=y.indexBuffer,m=y.segments,p=l?he(x,t,c,r):fe(x);b.draw(t.context,f,i,t.stencilModeForClipping(g),o,Sn.disabled,p,_,n.id,y.layoutVertexBuffer,d,m,n.paint,t.transform.zoom,v)}}function Nn(t,e,n,r,i,o,a){const s=t.context,u=s.gl,l=n.paint.get("fill-extrusion-pattern"),c=l.constantOr(1),f=n.getCrossfadeParameters(),h=n.paint.get("fill-extrusion-opacity");for(const p of r){const r=e.getTile(p),d=r.getBucket(n);if(!d)continue;const m=t.style.terrain&&t.style.terrain.getTerrainData(p),g=d.programConfigurations.get(n.id),y=t.useProgram(c?"fillExtrusionPattern":"fillExtrusion",g);c&&(t.context.activeTexture.set(u.TEXTURE0),r.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),g.updatePaintBuffers(f));const v=l.constantOr(null);if(v&&r.imageAtlas){const t=r.imageAtlas,e=t.patternPositions[v.to.toString()],n=t.patternPositions[v.from.toString()];e&&n&&g.setConstantPatternPositions(e,n)}const b=t.translatePosMatrix(p.posMatrix,r,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),_=n.paint.get("fill-extrusion-vertical-gradient"),A=c?ce(b,t,_,h,p,f,r):le(b,t,_,h);y.draw(s,s.gl.TRIANGLES,i,o,a,Sn.backCCW,A,m,n.id,d.layoutVertexBuffer,d.indexBuffer,d.segments,n.paint,t.transform.zoom,g,t.style.terrain&&d.centroidVertexBuffer)}}function Dn(t,e,n,r,i,o,a){const s=t.context,u=s.gl,l=n.fbo;if(!l)return;const c=t.useProgram("hillshade"),f=t.style.terrain&&t.style.terrain.getTerrainData(e);s.activeTexture.set(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,l.colorAttachment.get()),c.draw(s,u.TRIANGLES,i,o,a,Sn.disabled,((t,e,n,r)=>{const i=n.paint.get("hillshade-shadow-color"),o=n.paint.get("hillshade-highlight-color"),a=n.paint.get("hillshade-accent-color");let s=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(s-=t.transform.angle);const u=!t.options.moving;return{u_matrix:r?r.posMatrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),u),u_image:0,u_latrange:_e(0,e.tileID),u_light:[n.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:o,u_accent:a}})(t,n,r,f?e:null),f,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}function Fn(e,n,r,i,o,a){const s=e.context,l=s.gl,c=n.dem;if(c&&c.data){const f=c.dim,h=c.stride,p=c.getPixels();if(s.activeTexture.set(l.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||e.getTileTexture(h),n.demTexture){const t=n.demTexture;t.update(p,{premultiply:!1}),t.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else n.demTexture=new u(s,p,l.RGBA,{premultiply:!1}),n.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);s.activeTexture.set(l.TEXTURE0);let d=n.fbo;if(!d){const t=new u(s,{width:f,height:f,data:null},l.RGBA);t.bind(l.LINEAR,l.CLAMP_TO_EDGE),d=n.fbo=s.createFramebuffer(f,f,!0),d.colorAttachment.set(t.texture)}s.bindFramebuffer.set(d.framebuffer),s.viewport.set([0,0,f,f]),e.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,i,o,a,Sn.disabled,((e,n)=>{const r=n.stride,i=t.create();return t.ortho(i,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(i,i,[0,-t.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:e.overscaledZ,u_unpack:n.getUnpackVector()}})(n.tileID,c),null,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),n.needsHillshadePrepare=!1}}function Bn(e,n,r,i,o,a){const s=i.paint.get("raster-fade-duration");if(!a&&s>0){const i=t.exported.now(),a=(i-e.timeAdded)/s,u=n?(i-n.timeAdded)/s:-1,l=r.getSource(),c=o.coveringZoomLevel({tileSize:l.tileSize,roundZoom:l.roundZoom}),f=!n||Math.abs(n.tileID.overscaledZ-c)>Math.abs(e.tileID.overscaledZ-c),h=f&&e.refreshedUponExpiration?1:t.clamp(f?a:1-u,0,1);return e.refreshedUponExpiration&&a>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}const zn=new t.Color(1,0,0,1),Un=new t.Color(0,1,0,1),Gn=new t.Color(0,0,1,1),Vn=new t.Color(1,0,1,1),qn=new t.Color(0,1,1,1);function Hn(t,e,n,r){Xn(t,0,e+n/2,t.transform.width,n,r)}function Wn(t,e,n,r){Xn(t,e-n/2,0,n,t.transform.height,r)}function Xn(t,e,n,r,i,o){const a=t.context,s=a.gl;s.enable(s.SCISSOR_TEST),s.scissor(e*t.pixelRatio,n*t.pixelRatio,r*t.pixelRatio,i*t.pixelRatio),a.clear({color:o}),s.disable(s.SCISSOR_TEST)}function Yn(e,n,r){const i=e.context,o=i.gl,a=r.posMatrix,s=e.useProgram("debug"),u=xn.disabled,l=On.disabled,c=e.colorModeForRenderPass(),f="$debug",h=e.style.terrain&&e.style.terrain.getTerrainData(r);i.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE);const p=n.getTileByID(r.key).latestRawTileData,d=Math.floor((p&&p.byteLength||0)/1024),m=n.getTile(r).tileSize,g=512/Math.min(m,512)*(r.overscaledZ/e.transform.zoom)*.5;let y=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(y+=` => ${r.overscaledZ}`),function(t,e){t.initDebugOverlayCanvas();const n=t.debugOverlayCanvas,r=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(n),t.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(e,`${y} ${d}kB`),s.draw(i,o.TRIANGLES,u,l,An.alphaBlended,Sn.disabled,ye(a,t.Color.transparent,g),null,f,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),s.draw(i,o.LINE_STRIP,u,l,c,Sn.disabled,ye(a,t.Color.red),h,f,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function Zn(t,e,n){const r=t.context,i=r.gl,o=t.colorModeForRenderPass(),a=new xn(i.LEQUAL,xn.ReadWrite,t.depthRangeFor3D),s=t.useProgram("terrain"),u=e.getTerrainMesh(),l=e.getTerrainData(n.tileID);r.bindFramebuffer.set(null),r.viewport.set([0,0,t.width,t.height]),r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e.getRTTFramebuffer().colorAttachment.get());const c=t.transform.calculatePosMatrix(n.tileID.toUnwrapped());s.draw(r,i.TRIANGLES,a,On.disabled,o,Sn.backCCW,{u_matrix:c,u_texture:0},l,"terrain",u.vertexBuffer,u.indexBuffer,u.segments)}function Kn(t,e,n,r){const i=t.context,o=n.tileSize*e.qualityFactor;n.textures[r]||(n.textures[r]=t.getTileTexture(o)||new u(i,{width:o,height:o,data:null},i.gl.RGBA),n.textures[r].bind(i.gl.LINEAR,i.gl.CLAMP_TO_EDGE),0===r&&e.sourceCache.renderHistory.unshift(n.tileID.key));const a=e.getRTTFramebuffer();a.colorAttachment.set(n.textures[r].texture),i.bindFramebuffer.set(a.framebuffer),i.viewport.set([0,0,o,o])}class $n{constructor(t){this._coordsDescendingInv={},this._coordsDescendingInvStr={},this.painter=t,this._renderToTexture={background:!0,fill:!0,line:!0,raster:!0},this._coordsDescendingInv={},this._coordsDescendingInvStr={},this._stacks=[],this._prevType=null,this._rerender={},this._renderableTiles=t.style.terrain.sourceCache.getRenderableTiles(),this._init()}_init(){const t=this.painter.style,e=t.terrain;for(const n in t.sourceCaches){this._coordsDescendingInv[n]={};const r=t.sourceCaches[n].getVisibleCoordinates();for(const t of r){const r=e.sourceCache.getTerrainCoords(t);for(const t in r)this._coordsDescendingInv[n][t]||(this._coordsDescendingInv[n][t]=[]),this._coordsDescendingInv[n][t].push(r[t])}}for(const n of t._order){const e=t._layers[n],r=e.source;if(this._renderToTexture[e.type]&&!this._coordsDescendingInvStr[r]){this._coordsDescendingInvStr[r]={};for(const t in this._coordsDescendingInv[r])this._coordsDescendingInvStr[r][t]=this._coordsDescendingInv[r][t].map((t=>t.key)).sort().join()}}return this._renderableTiles.forEach((t=>{for(const n in this._coordsDescendingInvStr){const r=this._coordsDescendingInvStr[n][t.tileID.key];r&&r!==t.textureCoords[n]&&t.clearTextures(this.painter),e.needsRerender(n,t.tileID)&&t.clearTextures(this.painter)}this._rerender[t.tileID.key]=!t.textures.length})),e.clearRerenderCache(),e.sourceCache.removeOutdated(this.painter),this}renderLayer(e){const n=e.type,r=this.painter,i=r.style._order,o=r.currentLayer,a=o+1===i.length;if(this._renderToTexture[n]&&(this._prevType&&this._renderToTexture[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(i[o]),!a))return!0;if(this._renderToTexture[this._prevType]||"hillshade"===n||this._renderToTexture[n]&&a){this._prevType=n;const a=this._stacks.length-1,s=this._stacks[a]||[];for(const e of this._renderableTiles){if(Kn(r,r.style.terrain,e,a),this._rerender[e.tileID.key]){r.context.clear({color:t.Color.transparent});for(let t=0;t<s.length;t++){const n=r.style._layers[s[t]],i=n.source?this._coordsDescendingInv[n.source][e.tileID.key]:[e.tileID];r._renderTileClippingMasks(n,i),r.renderLayer(r,r.style.sourceCaches[n.source],n,i),n.source&&(e.textureCoords[n.source]=this._coordsDescendingInvStr[n.source][e.tileID.key])}}Zn(r,r.style.terrain,e)}if("hillshade"===n){this._stacks.push([i[o]]);for(const n of this._renderableTiles){const i=this._coordsDescendingInv[e.source][n.tileID.key];Kn(r,r.style.terrain,n,this._stacks.length-1),r.context.clear({color:t.Color.transparent}),r._renderTileClippingMasks(e,i),r.renderLayer(r,r.style.sourceCaches[e.source],e,i),Zn(r,r.style.terrain,n)}return!0}return this._renderToTexture[n]}return!1}}const Jn={symbol:function(e,n,r,i,o){if("translucent"!==e.renderPass)return;const a=On.disabled,s=e.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(e,n,r,i,o,a,s){const u=n.transform,l="map"===o,c="map"===a;for(const f of e){const e=i.getTile(f),o=e.getBucket(r);if(!o||!o.text||!o.text.segments.get().length)continue;const a=t.evaluateSizeForZoom(o.textSizeData,u.zoom),h=At(e,1,n.transform.zoom),p=ot(f.posMatrix,c,l,n.transform,h),d="none"!==r.layout.get("icon-text-fit")&&o.hasIconData();if(a){const t=Math.pow(2,u.zoom-e.tileID.overscaledZ);In(o,l,c,s,u,p,f.posMatrix,t,a,d,n.style.terrain?(t,e)=>n.style.terrain.getElevation(f,t,e):null)}}}(i,e,r,n,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&jn(e,n,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&jn(e,n,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),n.map.showCollisionBoxes&&(Cn(e,n,r,i,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),Cn(e,n,r,i,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))},circle:function(e,n,r,i){if("translucent"!==e.renderPass)return;const o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),u=!r.layout.get("circle-sort-key").isConstant();if(0===o.constantOr(1)&&(0===a.constantOr(1)||0===s.constantOr(1)))return;const l=e.context,c=l.gl,f=e.depthModeForSublayer(0,xn.ReadOnly),h=On.disabled,p=e.colorModeForRenderPass(),d=[];for(let m=0;m<i.length;m++){const o=i[m],a=n.getTile(o),s=a.getBucket(r);if(!s)continue;const l=s.programConfigurations.get(r.id),c=e.useProgram("circle",l),f=s.layoutVertexBuffer,h=s.indexBuffer,p=e.style.terrain&&e.style.terrain.getTerrainData(o),g={programConfiguration:l,program:c,layoutVertexBuffer:f,indexBuffer:h,uniformValues:me(e,o,a,r),terrainData:p};if(u){const e=s.segments.get();for(const n of e)d.push({segments:new t.SegmentVector([n]),sortKey:n.sortKey,state:g})}else d.push({segments:s.segments,sortKey:0,state:g})}u&&d.sort(((t,e)=>t.sortKey-e.sortKey));for(const t of d){const{programConfiguration:n,program:i,layoutVertexBuffer:o,indexBuffer:a,uniformValues:s,terrainData:u}=t.state;i.draw(l,c.TRIANGLES,f,h,p,Sn.disabled,s,u,r.id,o,a,t.segments,r.paint,e.transform.zoom,n)}},heatmap:function(e,n,r,i){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){const o=e.context,a=o.gl,s=On.disabled,u=new An([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,n){const r=t.gl;t.activeTexture.set(r.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);let i=n.heatmapFbo;if(i)r.bindTexture(r.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{const o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),i=n.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),function(t,e,n,r){const i=t.gl;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,e.width/4,e.height/4,0,i.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:i.UNSIGNED_BYTE,null),r.colorAttachment.set(n)}(t,e,o,i)}}(o,e,r),o.clear({color:t.Color.transparent});for(let t=0;t<i.length;t++){const l=i[t];if(n.hasRenderableParent(l))continue;const c=n.getTile(l),f=c.getBucket(r);if(!f)continue;const h=f.programConfigurations.get(r.id),p=e.useProgram("heatmap",h),{zoom:d}=e.transform;p.draw(o,a.TRIANGLES,xn.disabled,s,u,Sn.disabled,be(l.posMatrix,c,d,r.paint.get("heatmap-intensity")),null,r.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,r.paint,e.transform.zoom,h)}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,n){const r=e.context,i=r.gl,o=n.heatmapFbo;if(!o)return;r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1);let a=n.colorRampTexture;a||(a=n.colorRampTexture=new u(r,n.colorRamp,i.RGBA)),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,i.TRIANGLES,xn.disabled,On.disabled,e.colorModeForRenderPass(),Sn.disabled,((e,n,r,i)=>{const o=t.create();t.ortho(o,0,e.width,e.height,0,0,1);const a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:n.paint.get("heatmap-opacity")}})(e,n),null,n.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,n.paint,e.transform.zoom)}(e,r))},line:function(e,n,r,i){if("translucent"!==e.renderPass)return;const o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0===o.constantOr(1)||0===a.constantOr(1))return;const s=e.depthModeForSublayer(0,xn.ReadOnly),l=e.colorModeForRenderPass(),c=r.paint.get("line-dasharray"),f=r.paint.get("line-pattern"),h=f.constantOr(1),p=r.paint.get("line-gradient"),d=r.getCrossfadeParameters(),m=h?"linePattern":c?"lineSDF":p?"lineGradient":"line",g=e.context,y=g.gl;let v=!0;for(const b of i){const i=n.getTile(b);if(h&&!i.patternsLoaded())continue;const o=i.getBucket(r);if(!o)continue;const a=o.programConfigurations.get(r.id),_=e.context.program.get(),A=e.useProgram(m,a),w=v||A.program!==_,x=e.style.terrain&&e.style.terrain.getTerrainData(b),E=f.constantOr(null);if(E&&i.imageAtlas){const t=i.imageAtlas,e=t.patternPositions[E.to.toString()],n=t.patternPositions[E.from.toString()];e&&n&&a.setConstantPatternPositions(e,n)}const O=x?b:null,S=h?xe(e,i,r,d,O):c?Ee(e,i,r,c,d,O):p?we(e,i,r,o.lineClipsArray.length,O):Ae(e,i,r,O);if(h)g.activeTexture.set(y.TEXTURE0),i.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),a.updatePaintBuffers(d);else if(c&&(w||e.lineAtlas.dirty))g.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(g);else if(p){const i=o.gradients[r.id];let a=i.texture;if(r.gradientVersion!==i.version){let s=256;if(r.stepInterpolant){const r=n.getSource().maxzoom,i=b.canonical.z===r?Math.ceil(1<<e.transform.maxZoom-b.canonical.z):1;s=t.clamp(t.nextPowerOfTwo(o.maxLineLength/t.EXTENT*1024*i),256,g.maxTextureSize)}i.gradient=t.renderColorRamp({expression:r.gradientExpression(),evaluationKey:"lineProgress",resolution:s,image:i.gradient||void 0,clips:o.lineClipsArray}),i.texture?i.texture.update(i.gradient):i.texture=new u(g,i.gradient,y.RGBA),i.version=r.gradientVersion,a=i.texture}g.activeTexture.set(y.TEXTURE0),a.bind(r.stepInterpolant?y.NEAREST:y.LINEAR,y.CLAMP_TO_EDGE)}A.draw(g,y.TRIANGLES,s,e.stencilModeForClipping(b),l,Sn.disabled,S,x,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,r.paint,e.transform.zoom,a,o.layoutVertexBuffer2),v=!1}},fill:function(e,n,r,i){const o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0===a.constantOr(1))return;const s=e.colorModeForRenderPass(),u=r.paint.get("fill-pattern"),l=e.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===l){const t=e.depthModeForSublayer(1,"opaque"===e.renderPass?xn.ReadWrite:xn.ReadOnly);Rn(e,n,r,i,t,s,!1)}if("translucent"===e.renderPass&&r.paint.get("fill-antialias")){const t=e.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,xn.ReadOnly);Rn(e,n,r,i,t,s,!0)}},"fill-extrusion":function(t,e,n,r){const i=n.paint.get("fill-extrusion-opacity");if(0!==i&&"translucent"===t.renderPass){const o=new xn(t.context.gl.LEQUAL,xn.ReadWrite,t.depthRangeFor3D);if(1!==i||n.paint.get("fill-extrusion-pattern").constantOr(1))Nn(t,e,n,r,o,On.disabled,An.disabled),Nn(t,e,n,r,o,t.stencilModeFor3D(),t.colorModeForRenderPass());else{const i=t.colorModeForRenderPass();Nn(t,e,n,r,o,On.disabled,i)}}},hillshade:function(t,e,n,r){if("offscreen"!==t.renderPass&&"translucent"!==t.renderPass)return;const i=t.context,o=t.depthModeForSublayer(0,xn.ReadOnly),a=t.colorModeForRenderPass(),[s,u]="translucent"===t.renderPass?t.stencilConfigForOverlap(r):[{},r];for(const l of u){const r=e.getTile(l);void 0!==r.needsHillshadePrepare&&r.needsHillshadePrepare&&"offscreen"===t.renderPass?Fn(t,r,n,o,On.disabled,a):"translucent"===t.renderPass&&Dn(t,l,r,n,o,s[l.overscaledZ],a)}i.viewport.set([0,0,t.width,t.height])},raster:function(t,e,n,r){if("translucent"!==t.renderPass)return;if(0===n.paint.get("raster-opacity"))return;if(!r.length)return;const i=t.context,o=i.gl,a=e.getSource(),s=t.useProgram("raster"),u=t.colorModeForRenderPass(),[l,c]=a instanceof C?[{},r]:t.stencilConfigForOverlap(r),f=c[c.length-1].overscaledZ,h=!t.options.moving;for(const p of c){const r=t.depthModeForSublayer(p.overscaledZ-f,1===n.paint.get("raster-opacity")?xn.ReadWrite:xn.ReadOnly,o.LESS),c=e.getTile(p);c.registerFadeDuration(n.paint.get("raster-fade-duration"));const d=e.findLoadedParent(p,0),m=Bn(c,d,e,n,t.transform,t.style.terrain);let g,y;const v="nearest"===n.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;i.activeTexture.set(o.TEXTURE0),c.texture.bind(v,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),i.activeTexture.set(o.TEXTURE1),d?(d.texture.bind(v,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),g=Math.pow(2,d.tileID.overscaledZ-c.tileID.overscaledZ),y=[c.tileID.canonical.x*g%1,c.tileID.canonical.y*g%1]):c.texture.bind(v,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);const b=t.style.terrain&&t.style.terrain.getTerrainData(p),_=b?p:null,A=_?_.posMatrix:t.transform.calculatePosMatrix(p.toUnwrapped(),h),w=Pe(A,y||[0,0],g||1,m,n);a instanceof C?s.draw(i,o.TRIANGLES,r,On.disabled,u,Sn.disabled,w,b,n.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):s.draw(i,o.TRIANGLES,r,l[p.overscaledZ],u,Sn.disabled,w,b,n.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,n,r){const i=n.paint.get("background-color"),o=n.paint.get("background-opacity");if(0===o)return;const a=t.context,s=a.gl,u=t.transform,l=u.tileSize,c=n.paint.get("background-pattern");if(t.isPatternMissing(c))return;const f=!c&&1===i.a&&1===o&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass!==f)return;const h=On.disabled,p=t.depthModeForSublayer(0,"opaque"===f?xn.ReadWrite:xn.ReadOnly),d=t.colorModeForRenderPass(),m=t.useProgram(c?"backgroundPattern":"background"),g=r||u.coveringTiles({tileSize:l,terrain:t.style.terrain});c&&(a.activeTexture.set(s.TEXTURE0),t.imageManager.bind(t.context));const y=n.getCrossfadeParameters();for(const v of g){const e=r?v.posMatrix:t.transform.calculatePosMatrix(v.toUnwrapped()),u=c?je(e,o,t,c,{tileID:v,tileSize:l},y):Le(e,o,i),f=t.style.terrain&&t.style.terrain.getTerrainData(v);m.draw(a,s.TRIANGLES,p,h,d,Sn.disabled,u,f,n.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}},debug:function(t,e,n){for(let r=0;r<n.length;r++)Yn(t,e,n[r])},custom:function(t,e,n){const r=t.context,i=n.implementation;if("offscreen"===t.renderPass){const e=i.prerender;e&&(t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),e.call(i,r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),r.setColorMode(t.colorModeForRenderPass()),r.setStencilMode(On.disabled);const e="3d"===i.renderingMode?new xn(t.context.gl.LEQUAL,xn.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,xn.ReadOnly);r.setDepthMode(e),i.render(r.gl,t.transform.customLayerMatrix()),r.setDirty(),t.setBaseState(),r.bindFramebuffer.set(null)}}};class Qn{constructor(e,n){this.context=new wn(e),this.transform=n,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.create(),renderTime:0},this.setup(),this.numSublayers=F.maxUnderzooming+F.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xt,this.gpuTimers={}}resize(t,e,n){if(this.width=t*n,this.height=e*n,this.pixelRatio=n,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const r of this.style._order)this.style._layers[r].resize()}setup(){const e=this.context,n=new t.PosArray;n.emplaceBack(0,0),n.emplaceBack(t.EXTENT,0),n.emplaceBack(0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(n,Yt.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);const r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(r,Yt.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);const i=new t.RasterBoundsArray;i.emplaceBack(0,0,0,0),i.emplaceBack(t.EXTENT,0,t.EXTENT,0),i.emplaceBack(0,t.EXTENT,0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(i,P.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);const o=new t.PosArray;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Yt.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);const a=new t.LineStripIndexArray;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);const s=new t.TriangleIndexArray;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new u(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);const l=this.context.gl;this.stencilClearMode=new On({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)}clearStencil(){const e=this.context,n=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const r=t.create();t.ortho(r,0,this.width,this.height,0,0,1),t.scale(r,r,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,n.TRIANGLES,xn.disabled,this.stencilClearMode,An.disabled,Sn.disabled,ve(r),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,e){if(this.currentStencilSource===t.source||!t.isTileClipped()||!e||!e.length)return;this.currentStencilSource=t.source;const n=this.context,r=n.gl;this.nextStencilID+e.length>256&&this.clearStencil(),n.setColorMode(An.disabled),n.setDepthMode(xn.disabled);const i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const o of e){const t=this._tileClippingMaskIDs[o.key]=this.nextStencilID++,e=this.style.terrain&&this.style.terrain.getTerrainData(o);i.draw(n,r.TRIANGLES,xn.disabled,new On({func:r.ALWAYS,mask:0},t,255,r.KEEP,r.KEEP,r.REPLACE),An.disabled,Sn.disabled,ve(o.posMatrix),e,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,e=this.context.gl;return new On({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)}stencilModeForClipping(t){const e=this.context.gl;return new On({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)}stencilConfigForOverlap(t){const e=this.context.gl,n=t.sort(((t,e)=>e.overscaledZ-t.overscaledZ)),r=n[n.length-1].overscaledZ,i=n[0].overscaledZ-r+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();const t={};for(let n=0;n<i;n++)t[n+r]=new On({func:e.GEQUAL,mask:255},n+this.nextStencilID,255,e.KEEP,e.KEEP,e.REPLACE);return this.nextStencilID+=i,[t,n]}return[{[r]:On.disabled},n]}colorModeForRenderPass(){const e=this.context.gl;if(this._showOverdrawInspector){const n=1/8;return new An([e.CONSTANT_COLOR,e.ONE],new t.Color(n,n,n,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?An.unblended:An.alphaBlended}depthModeForSublayer(t,e,n){if(!this.opaquePassEnabledForLayer())return xn.disabled;const r=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new xn(n||this.context.gl.LEQUAL,e,[r,r])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,n){this.style=e,this.options=n,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.exported.now()),this.imageManager.beginFrame();const r=this.style._order,i=this.style.sourceCaches,o=this.style.terrain&&new $n(this);for(const t in i){const e=i[t];e.used&&e.prepare(this.context)}const a={},s={},u={};for(const t in i){const e=i[t];a[t]=e.getVisibleCoordinates(),s[t]=a[t].slice().reverse(),u[t]=e.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let t=0;t<r.length;t++)if(this.style._layers[r[t]].is3D()){this.opaquePassCutoff=t;break}if(o){this.opaquePassCutoff=0;const e=this.style.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime);(this.terrainFacilitator.dirty||!t.equals(this.terrainFacilitator.matrix,this.transform.projMatrix)||e.length)&&(t.copy(this.terrainFacilitator.matrix,this.transform.projMatrix),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(e,n){const r=e.context,i=r.gl,o=An.unblended,a=new xn(i.LEQUAL,xn.ReadWrite,[0,1]),s=n.getTerrainMesh(),u=n.sourceCache.getRenderableTiles(),l=e.useProgram("terrainDepth");r.bindFramebuffer.set(n.getFramebuffer("depth").framebuffer),r.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),r.clear({color:t.Color.transparent,depth:1});for(const t of u){const u=n.getTerrainData(t.tileID),c=e.transform.calculatePosMatrix(t.tileID.toUnwrapped());l.draw(r,i.TRIANGLES,a,On.disabled,o,Sn.backCCW,{u_matrix:c},u,"terrain",s.vertexBuffer,s.indexBuffer,s.segments)}r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height])}(this,this.style.terrain),function(e,n){const r=e.context,i=r.gl,o=An.unblended,a=new xn(i.LEQUAL,xn.ReadWrite,[0,1]),s=n.getTerrainMesh(),u=n.getCoordsTexture(),l=n.sourceCache.getRenderableTiles(),c=e.useProgram("terrainCoords");r.bindFramebuffer.set(n.getFramebuffer("coords").framebuffer),r.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),r.clear({color:t.Color.transparent,depth:1}),n.coordsIndex=[];for(const t of l){const l=n.getTerrainData(t.tileID);r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,u.texture);const f=e.transform.calculatePosMatrix(t.tileID.toUnwrapped());c.draw(r,i.TRIANGLES,a,On.disabled,o,Sn.backCCW,{u_matrix:f,u_terrain_coords_id:(255-n.coordsIndex.length)/255,u_texture:0},l,"terrain",s.vertexBuffer,s.indexBuffer,s.segments),n.coordsIndex.push(t.tileID.key)}r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height])}(this,this.style.terrain))}this.renderPass="offscreen";for(const t of r){const e=this.style._layers[t];if(!e.hasOffscreenPass()||e.isHidden(this.transform.zoom))continue;const n=s[e.source];("custom"===e.type||n.length)&&this.renderLayer(this,i[e.source],e,n)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:n.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=n.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!o)for(this.renderPass="opaque",this.currentLayer=r.length-1;this.currentLayer>=0;this.currentLayer--){const t=this.style._layers[r[this.currentLayer]],e=i[t.source],n=a[t.source];this._renderTileClippingMasks(t,n),this.renderLayer(this,e,t,n)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<r.length;this.currentLayer++){const t=this.style._layers[r[this.currentLayer]],e=i[t.source];if(o&&o.renderLayer(t))continue;const n=("symbol"===t.type?u:s)[t.source];this._renderTileClippingMasks(t,a[t.source]),this.renderLayer(this,e,t,n)}if(this.options.showTileBoundaries){let t,e;Object.values(this.style._layers).forEach((n=>{n.source&&!n.isHidden(this.transform.zoom)&&(n.source!==(e&&e.id)&&(e=this.style.sourceCaches[n.source]),(!t||t.getSource().maxzoom<e.getSource().maxzoom)&&(t=e))})),t&&Jn.debug(this,t,t.getVisibleCoordinates())}this.options.showPadding&&function(t){const e=t.transform.padding;Hn(t,t.transform.height-(e.top||0),3,zn),Hn(t,e.bottom||0,3,Un),Wn(t,e.left||0,3,Gn),Wn(t,t.transform.width-(e.right||0),3,Vn);const n=t.transform.centerPoint;!function(t,e,n,r){Xn(t,e-1,n-10,2,20,r),Xn(t,e-10,n-1,20,2,r)}(t,n.x,t.transform.height-n.y,qn)}(this),this.context.setDefault()}renderLayer(t,e,n,r){n.isHidden(this.transform.zoom)||("background"===n.type||"custom"===n.type||(r||[]).length)&&(this.id=n.id,this.gpuTimingStart(n),Jn[n.type](t,e,n,r,this.style.placement.variableOffsets),this.gpuTimingEnd())}gpuTimingStart(t){if(!this.options.gpuTiming)return;const e=this.context.extTimerQuery;let n=this.gpuTimers[t.id];n||(n=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}),n.calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,n.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}collectGpuTimers(){const t=this.gpuTimers;return this.gpuTimers={},t}queryGpuTimers(t){const e={};for(const n in t){const r=t[n],i=this.context.extTimerQuery,o=i.getQueryObjectEXT(r.query,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(r.query),e[n]=o}return e}translatePosMatrix(e,n,r,i,o){if(!r[0]&&!r[1])return e;const a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){const t=Math.sin(a),e=Math.cos(a);r=[r[0]*e-r[1]*t,r[0]*t+r[1]*e]}const s=[o?r[0]:At(n,r[0],this.transform.zoom),o?r[1]:At(n,r[1],this.transform.zoom),0],u=new Float32Array(16);return t.translate(u,e,s),u}saveTileTexture(t){const e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]}getTileTexture(t){const e=this._tileTextures[t];return e&&e.length>0?e.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const e=this.imageManager.getPattern(t.from.toString()),n=this.imageManager.getPattern(t.to.toString());return!e||!n}useProgram(t,e){this.cache=this.cache||{};const n=t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.terrain?"/terrain":"");return this.cache[n]||(this.cache[n]=new se(this.context,t,re[t],e,Me[t],this._showOverdrawInspector,this.style.terrain)),this.cache[n]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class tr{constructor(t,e){this.points=t,this.planes=e}static fromInvProjectionMatrix(e,n,r){const i=Math.pow(2,r),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((r=>{const o=1/(r=t.transformMat4([],r,e))[3]/n*i;return t.mul$1(r,r,[o,o,1/r[3],o])})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((e=>{const n=t.sub([],o[e[0]],o[e[1]]),r=t.sub([],o[e[2]],o[e[1]]),i=t.normalize([],t.cross([],n,r)),a=-t.dot(i,o[e[1]]);return i.concat(a)}));return new tr(o,a)}}class er{constructor(e,n){this.min=e,this.max=n,this.center=t.scale$1([],t.add([],this.min,this.max),.5)}quadrant(e){const n=[e%2==0,e<2],r=t.clone$2(this.min),i=t.clone$2(this.max);for(let t=0;t<n.length;t++)r[t]=n[t]?this.min[t]:this.center[t],i[t]=n[t]?this.center[t]:this.max[t];return i[2]=this.max[2],new er(r,i)}distanceX(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]}distanceY(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]}intersects(e){const n=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let r=!0;for(let i=0;i<e.planes.length;i++){const o=e.planes[i];let a=0;for(let e=0;e<n.length;e++)t.dot$1(o,n[e])>=0&&a++;if(0===a)return 0;a!==n.length&&(r=!1)}if(r)return 2;for(let t=0;t<3;t++){let n=Number.MAX_VALUE,r=-Number.MAX_VALUE;for(let i=0;i<e.points.length;i++){const o=e.points[i][t]-this.min[t];n=Math.min(n,o),r=Math.max(r,o)}if(r<0||n>this.max[t]-this.min[t])return 0}return 1}}class nr{constructor(t=0,e=0,n=0,r=0){if(isNaN(t)||t<0||isNaN(e)||e<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=n,this.right=r}interpolate(e,n,r){return null!=n.top&&null!=e.top&&(this.top=t.number(e.top,n.top,r)),null!=n.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,n.bottom,r)),null!=n.left&&null!=e.left&&(this.left=t.number(e.left,n.left,r)),null!=n.right&&null!=e.right&&(this.right=t.number(e.right,n.right,r)),this}getCenter(e,n){const r=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+n-this.bottom)/2,0,n);return new t.pointGeometry(r,i)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new nr(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class rr{constructor(e,n,r,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=void 0===o||!!o,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new nr,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const t=new rr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t._elevation=this._elevation,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t}get minZoom(){return this._minZoom}set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}get maxZoom(){return this._maxZoom}set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}get minPitch(){return this._minPitch}set minPitch(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))}get maxPitch(){return this._maxPitch}set maxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.pointGeometry(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){const n=-t.wrap(e,-180,180)*Math.PI/180;var r;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=(r=new t.ARRAY_TYPE(4),t.ARRAY_TYPE!=Float32Array&&(r[1]=0,r[2]=0),r[0]=1,r[3]=1,r),function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);t[0]=r*u+o*s,t[1]=i*u+a*s,t[2]=r*-s+o*u,t[3]=i*-s+a*u}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const n=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(t){const e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(t){t!==this._elevation&&(this._elevation=t,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,e,n){this._unmodified=!1,this._edgeInsets.interpolate(t,e,n),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)}getVisibleUnwrappedCoordinates(e){const n=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies){const r=this.pointCoordinate(new t.pointGeometry(0,0)),i=this.pointCoordinate(new t.pointGeometry(this.width,0)),o=this.pointCoordinate(new t.pointGeometry(this.width,this.height)),a=this.pointCoordinate(new t.pointGeometry(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),u=Math.floor(Math.max(r.x,i.x,o.x,a.x)),l=1;for(let c=s-l;c<=u+l;c++)0!==c&&n.push(new t.UnwrappedTileID(c,e))}return n}coveringTiles(e){var n,r;let i=this.coveringZoomLevel(e);const o=i;if(void 0!==e.minzoom&&i<e.minzoom)return[];void 0!==e.maxzoom&&i>e.maxzoom&&(i=e.maxzoom);const a=this.pointCoordinate(this.getCameraPoint()),s=t.MercatorCoordinate.fromLngLat(this.center),u=Math.pow(2,i),l=[u*a.x,u*a.y,0],c=[u*s.x,u*s.y,0],f=tr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,i);let h=e.minzoom||0;!e.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(h=i);const p=e.terrain?2/Math.min(this.tileSize,e.tileSize)*this.tileSize:3,d=t=>({aabb:new er([t*u,0,0],[(t+1)*u,u,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}),m=[],g=[],y=i,v=e.reparseOverscaled?o:i;if(this._renderWorldCopies)for(let t=1;t<=3;t++)m.push(d(-t)),m.push(d(t));for(m.push(d(0));m.length>0;){const i=m.pop(),o=i.x,a=i.y;let s=i.fullyVisible;if(!s){const t=i.aabb.intersects(f);if(0===t)continue;s=2===t}const u=e.terrain?l:c,d=i.aabb.distanceX(u),b=i.aabb.distanceY(u),_=Math.max(Math.abs(d),Math.abs(b)),A=p+(1<<y-i.zoom)-2;if(i.zoom===y||_>A&&i.zoom>=h){const e=y-i.zoom,n=l[0]-.5-(o<<e),r=l[1]-.5-(a<<e);g.push({tileID:new t.OverscaledTileID(i.zoom===y?v:i.zoom,i.wrap,i.zoom,o,a),distanceSq:t.sqrLen([c[0]-.5-o,c[1]-.5-a]),tileDistanceToCamera:Math.sqrt(n*n+r*r)})}else for(let l=0;l<4;l++){const u=(o<<1)+l%2,c=(a<<1)+(l>>1),f=i.zoom+1;let h=i.aabb.quadrant(l);if(e.terrain){const o=new t.OverscaledTileID(f,i.wrap,f,u,c),a=e.terrain.getMinMaxElevation(o),s=null!==(n=a.minElevation)&&void 0!==n?n:this.elevation,l=null!==(r=a.maxElevation)&&void 0!==r?r:this.elevation;h=new er([h.min[0],h.min[1],s],[h.max[0],h.max[1],l])}m.push({aabb:h,zoom:f,x:u,y:c,wrap:i.wrap,fullyVisible:s})}}return g.sort(((t,e)=>t.distanceSq-e.distanceSq)).map((t=>t.tileID))}resize(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(t){return Math.pow(2,t)}scaleZoom(t){return Math.log(t)/Math.LN2}project(e){const n=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.pointGeometry(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(n)*this.worldSize)}unproject(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(t){this.freezeElevation||(this.elevation=t?this.getElevation(this._center,t):0)}getElevation(e,n){const r=t.MercatorCoordinate.fromLngLat(e),i=(1<<this.tileZoom)*t.EXTENT,o=r.x*i,a=r.y*i,s=Math.floor(o/t.EXTENT),u=Math.floor(a/t.EXTENT),l=new t.OverscaledTileID(this.tileZoom,0,this.tileZoom,s,u);return n.getElevation(l,o%t.EXTENT,a%t.EXTENT,t.EXTENT)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(e){const n=this.pointLocation(this.centerPoint,e),r=this.getElevation(n,e);if(!(this.elevation-r))return;const i=this.getCameraPosition(),o=t.MercatorCoordinate.fromLngLat(i.lngLat,i.altitude),a=t.MercatorCoordinate.fromLngLat(n,r),s=o.x-a.x,u=o.y-a.y,l=o.z-a.z,c=Math.sqrt(s*s+u*u+l*l),f=this.scaleZoom(this.cameraToCenterDistance/c/this.tileSize);this._elevation=r,this._center=n,this.zoom=f}setLocationAtPoint(e,n){const r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(r.x-i.x),o.y-(r.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(t,e){return e?this.coordinatePoint(this.locationCoordinate(t),this.getElevation(t,e),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(t))}pointLocation(t,e){return this.coordinateLocation(this.pointCoordinate(t,e))}locationCoordinate(e){return t.MercatorCoordinate.fromLngLat(e)}coordinateLocation(t){return t&&t.toLngLat()}pointCoordinate(e,n){if(n){const t=n.pointCoordinate(e);if(null!=t)return t}const r=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(i,i,this.pixelMatrixInverse);const o=r[3],a=i[3],s=r[1]/o,u=i[1]/a,l=r[2]/o,c=i[2]/a,f=l===c?0:(0-l)/(c-l);return new t.MercatorCoordinate(t.number(r[0]/o,i[0]/a,f)/this.worldSize,t.number(s,u,f)/this.worldSize)}coordinatePoint(e,n=0,r=this.pixelMatrix){const i=[e.x*this.worldSize,e.y*this.worldSize,n,1];return t.transformMat4(i,i,r),new t.pointGeometry(i[0]/i[3],i[1]/i[3])}getBounds(){const e=Math.max(0,this.height/2-this.getHorizon());return(new t.LngLatBounds).extend(this.pointLocation(new t.pointGeometry(0,e))).extend(this.pointLocation(new t.pointGeometry(this.width,e))).extend(this.pointLocation(new t.pointGeometry(this.width,this.height))).extend(this.pointLocation(new t.pointGeometry(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(e,n=!1){const r=e.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];const o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,u=t.identity(new Float64Array(16));return t.translate(u,u,[s*a,o.y*a,0]),t.scale(u,u,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(u,n?this.alignedProjMatrix:this.projMatrix,u),i[r]=new Float32Array(u),i[r]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e,n,r,i,o=-90,a=90,s=-180,u=180;const l=this.size,c=this._unmodified;if(this.latRange){const n=this.latRange;o=t.mercatorYfromLat(n[1])*this.worldSize,a=t.mercatorYfromLat(n[0])*this.worldSize,e=a-o<l.y?l.y/(a-o):0}if(this.lngRange){const e=this.lngRange;s=t.wrap(t.mercatorXfromLng(e[0])*this.worldSize,0,this.worldSize),u=t.wrap(t.mercatorXfromLng(e[1])*this.worldSize,0,this.worldSize),u<s&&(u+=this.worldSize),n=u-s<l.x?l.x/(u-s):0}const f=this.point,h=Math.max(n||0,e||0);if(h)return this.center=this.unproject(new t.pointGeometry(n?(u+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(h),this._unmodified=c,void(this._constraining=!1);if(this.latRange){const t=f.y,e=l.y/2;t-e<o&&(i=o+e),t+e>a&&(i=a-e)}if(this.lngRange){const e=(s+u)/2,n=t.wrap(f.x,e-this.worldSize/2,e+this.worldSize/2),i=l.x/2;n-i<s&&(r=s+i),n+i>u&&(r=u-i)}void 0===r&&void 0===i||(this.center=this.unproject(new t.pointGeometry(void 0!==r?r:f.x,void 0!==i?i:f.y)).wrap()),this._unmodified=c,this._constraining=!1}_calcMatrices(){if(!this.height)return;const e=this.centerOffset,n=this.point.x,r=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let i=t.identity(new Float64Array(16));t.scale(i,i,[this.width/2,-this.height/2,1]),t.translate(i,i,[1,-1,0]),this.labelPlaneMatrix=i,i=t.identity(new Float64Array(16)),t.scale(i,i,[1,-1,1]),t.translate(i,i,[-1,-1,0]),t.scale(i,i,[2/this.width,2/this.height,1]),this.glCoordMatrix=i,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const o=Math.PI/2+this._pitch,a=this._fov*(.5+e.y/this.height),s=Math.sin(a)*this.cameraToSeaLevelDistance/Math.sin(t.clamp(Math.PI-o-a,.01,Math.PI-.01)),u=this.getHorizon(),l=2*Math.atan(u/this.cameraToCenterDistance)*(.5+e.y/(2*u)),c=Math.sin(l)*this.cameraToSeaLevelDistance/Math.sin(t.clamp(Math.PI-o-l,.01,Math.PI-.01)),f=Math.cos(Math.PI/2-this._pitch)*s+this.cameraToSeaLevelDistance,h=Math.cos(Math.PI/2-this._pitch)*c+this.cameraToSeaLevelDistance,p=1.01*Math.min(f,h),d=this.height/50;i=new Float64Array(16),t.perspective(i,this._fov,this.width/this.height,d,p),i[8]=2*-e.x/this.width,i[9]=2*e.y/this.height,t.scale(i,i,[1,-1,1]),t.translate(i,i,[0,0,-this.cameraToCenterDistance]),t.rotateX(i,i,this._pitch),t.rotateZ(i,i,this.angle),t.translate(i,i,[-n,-r,0]),this.mercatorMatrix=t.scale([],i,[this.worldSize,this.worldSize,this.worldSize]),t.scale(i,i,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,i),t.translate(i,i,[0,0,-this.elevation]),this.projMatrix=i,this.invProjMatrix=t.invert([],i),this.pixelMatrix3D=t.multiply(new Float64Array(16),this.labelPlaneMatrix,i);const m=this.width%2/2,g=this.height%2/2,y=Math.cos(this.angle),v=Math.sin(this.angle),b=n-Math.round(n)+y*m+v*g,_=r-Math.round(r)+y*g+v*m,A=new Float64Array(i);if(t.translate(A,A,[b>.5?b-1:b,_>.5?_-1:_,0]),this.alignedProjMatrix=A,i=t.invert(new Float64Array(16),this.pixelMatrix),!i)throw new Error("failed to invert matrix");this.pixelMatrixInverse=i,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const e=this.pointCoordinate(new t.pointGeometry(0,0)),n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.pointGeometry(0,e))}getCameraQueryGeometry(e){const n=this.getCameraPoint();if(1===e.length)return[e[0],n];{let r=n.x,i=n.y,o=n.x,a=n.y;for(const t of e)r=Math.min(r,t.x),i=Math.min(i,t.y),o=Math.max(o,t.x),a=Math.max(a,t.y);return[new t.pointGeometry(r,i),new t.pointGeometry(o,i),new t.pointGeometry(o,a),new t.pointGeometry(r,a),new t.pointGeometry(r,i)]}}}class ir{constructor(e){this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(t,e){let n=!1,r=null;const i=()=>{r=null,n&&(t(),r=setTimeout(i,300),n=!1)};return()=>(n=!0,r||i(),r)}(this._updateHashUnthrottled.bind(this))}addTo(t){return this._map=t,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(t){const e=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),o=Math.round(e.lng*i)/i,a=Math.round(e.lat*i)/i,s=this._map.getBearing(),u=this._map.getPitch();let l="";if(l+=t?`/${o}/${a}/${n}`:`${n}/${a}/${o}`,(s||u)&&(l+="/"+Math.round(10*s)/10),u&&(l+=`/${Math.round(u)}`),this._hashName){const t=this._hashName;let e=!1;const n=window.location.hash.slice(1).split("&").map((n=>{const r=n.split("=")[0];return r===t?(e=!0,`${r}=${l}`):n})).filter((t=>t));return e||n.push(`${t}=${l}`),`#${n.join("&")}`}return`#${l}`}_getCurrentHash(){const t=window.location.hash.replace("#","");if(this._hashName){let e;return t.split("&").map((t=>t.split("="))).forEach((t=>{t[0]===this._hashName&&(e=t)})),(e&&e[1]||"").split("/")}return t.split("/")}_onHashChange(){const t=this._getCurrentHash();if(t.length>=3&&!t.some((t=>isNaN(t)))){const e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1}_updateHashUnthrottled(){const t=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,t)}catch(t){}}}const or={linearity:.3,easing:t.bezier(0,0,.3,1)},ar=t.extend({deceleration:2500,maxSpeed:1400},or),sr=t.extend({deceleration:20,maxSpeed:1400},or),ur=t.extend({deceleration:1e3,maxSpeed:360},or),lr=t.extend({deceleration:1e3,maxSpeed:90},or);class cr{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.exported.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,n=t.exported.now();for(;e.length>0&&n-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new t.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:t}of this._inertiaBuffer)n.zoom+=t.zoomDelta||0,n.bearing+=t.bearingDelta||0,n.pitch+=t.pitchDelta||0,t.panDelta&&n.pan._add(t.panDelta),t.around&&(n.around=t.around),t.pinchAround&&(n.pinchAround=t.pinchAround);const r=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,i={};if(n.pan.mag()){const o=hr(n.pan.mag(),r,t.extend({},ar,e||{}));i.offset=n.pan.mult(o.amount/n.pan.mag()),i.center=this._map.transform.center,fr(i,o)}if(n.zoom){const t=hr(n.zoom,r,sr);i.zoom=this._map.transform.zoom+t.amount,fr(i,t)}if(n.bearing){const e=hr(n.bearing,r,ur);i.bearing=this._map.transform.bearing+t.clamp(e.amount,-179,179),fr(i,e)}if(n.pitch){const t=hr(n.pitch,r,lr);i.pitch=this._map.transform.pitch+t.amount,fr(i,t)}if(i.zoom||i.bearing){const t=void 0===n.pinchAround?n.around:n.pinchAround;i.around=t?this._map.unproject(t):this._map.getCenter()}return this.clear(),t.extend(i,{noMoveStart:!0})}}function fr(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function hr(e,n,r){const{maxSpeed:i,linearity:o,deceleration:a}=r,s=t.clamp(e*o/(n/1e3),-i,i),u=Math.abs(s)/(a*o);return{easing:r.easing,duration:1e3*u,amount:s*(u/2)}}class pr extends t.Event{constructor(e,n,r,i={}){const a=o.mousePos(n.getCanvasContainer(),r),s=n.unproject(a);super(e,t.extend({point:a,lngLat:s,originalEvent:r},i)),this._defaultPrevented=!1,this.target=n}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class dr extends t.Event{constructor(e,n,r){const i="touchend"===e?r.changedTouches:r.touches,a=o.touchPos(n.getCanvasContainer(),i),s=a.map((t=>n.unproject(t))),u=a.reduce(((t,e,n,r)=>t.add(e.div(r.length))),new t.pointGeometry(0,0));super(e,{points:a,point:u,lngLats:s,lngLat:n.unproject(u),originalEvent:r}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class mr extends t.Event{constructor(t,e,n){super(t,{originalEvent:n}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class gr{constructor(t,e){this._map=t,this._clickTolerance=e.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new mr(t.type,this._map,t))}mousedown(t,e){return this._mousedownPos=e,this._firePreventable(new pr(t.type,this._map,t))}mouseup(t){this._map.fire(new pr(t.type,this._map,t))}click(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new pr(t.type,this._map,t))}dblclick(t){return this._firePreventable(new pr(t.type,this._map,t))}mouseover(t){this._map.fire(new pr(t.type,this._map,t))}mouseout(t){this._map.fire(new pr(t.type,this._map,t))}touchstart(t){return this._firePreventable(new dr(t.type,this._map,t))}touchmove(t){this._map.fire(new dr(t.type,this._map,t))}touchend(t){this._map.fire(new dr(t.type,this._map,t))}touchcancel(t){this._map.fire(new dr(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class yr{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,delete this._contextMenuEvent}mousemove(t){this._map.fire(new pr(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new pr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new pr(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class vr{constructor(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(o.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)}mousemoveWindow(t,e){if(!this._active)return;const n=e;if(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)return;const r=this._startPos;this._lastPos=n,this._box||(this._box=o.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));const i=Math.min(r.x,n.x),a=Math.max(r.x,n.x),s=Math.min(r.y,n.y),u=Math.max(r.y,n.y);o.setTransform(this._box,`translate(${i}px,${s}px)`),this._box.style.width=a-i+"px",this._box.style.height=u-s+"px"}mouseupWindow(e,n){if(!this._active)return;if(0!==e.button)return;const r=this._startPos,i=n;if(this.reset(),o.suppressClick(),r.x!==i.x||r.y!==i.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:t=>t.fitScreenCoordinates(r,i,this._map.getBearing(),{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair","mapboxgl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,n){return this._map.fire(new t.Event(e,{originalEvent:n}))}}function br(t,e){const n={};for(let r=0;r<t.length;r++)n[t[r].identifier]=e[r];return n}class _r{constructor(t){this.reset(),this.numTouches=t.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,n,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){const n=new t.pointGeometry(0,0);for(const t of e)n._add(t);return n.div(e.length)}(n),this.touches=br(r,n)))}touchmove(t,e,n){if(this.aborted||!this.centroid)return;const r=br(n,e);for(const i in this.touches){const t=this.touches[i],e=r[i];(!e||e.dist(t)>30)&&(this.aborted=!0)}}touchend(t,e,n){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){const t=!this.aborted&&this.centroid;if(this.reset(),t)return t}}}class Ar{constructor(t){this.singleTap=new _r(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,e,n){this.singleTap.touchstart(t,e,n)}touchmove(t,e,n){this.singleTap.touchmove(t,e,n)}touchend(t,e,n){const r=this.singleTap.touchend(t,e,n);if(r){const e=t.timeStamp-this.lastTime<500,n=!this.lastTap||this.lastTap.dist(r)<30;if(e&&n||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}}class wr{constructor(){this._zoomIn=new Ar({numTouches:1,numTaps:2}),this._zoomOut=new Ar({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,e,n){this._zoomIn.touchstart(t,e,n),this._zoomOut.touchstart(t,e,n)}touchmove(t,e,n){this._zoomIn.touchmove(t,e,n),this._zoomOut.touchmove(t,e,n)}touchend(t,e,n){const r=this._zoomIn.touchend(t,e,n),i=this._zoomOut.touchend(t,e,n);return r?(this._active=!0,t.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:e=>e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(r)},{originalEvent:t})}):i?(this._active=!0,t.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:e=>e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(i)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const xr={0:1,2:2};class Er{constructor(t){this.reset(),this._clickTolerance=t.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(t,e){return!1}_move(t,e){return{}}mousedown(t,e){if(this._lastPoint)return;const n=o.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}mousemoveWindow(t,e){const n=this._lastPoint;if(n)if(t.preventDefault(),function(t,e){const n=xr[e];return void 0===t.buttons||(t.buttons&n)!==n}(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=e,this._move(n,e)}mouseupWindow(t){this._lastPoint&&o.mouseButton(t)===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Or extends Er{mousedown(t,e){super.mousedown(t,e),this._lastPoint&&(this._active=!0)}_correctButton(t,e){return 0===e&&!t.ctrlKey}_move(t,e){return{around:e,panDelta:e.sub(t)}}}class Sr extends Er{_correctButton(t,e){return 0===e&&t.ctrlKey||2===e}_move(t,e){const n=.8*(e.x-t.x);if(n)return this._active=!0,{bearingDelta:n}}contextmenu(t){t.preventDefault()}}class Pr extends Er{_correctButton(t,e){return 0===e&&t.ctrlKey||2===e}_move(t,e){const n=-.5*(e.y-t.y);if(n)return this._active=!0,{pitchDelta:n}}contextmenu(t){t.preventDefault()}}class Cr{constructor(t,e){this._minTouches=t.cooperativeGestures?2:1,this._clickTolerance=t.clickTolerance||1,this._map=e,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.pointGeometry(0,0),setTimeout((()=>{this._cancelCooperativeMessage=!1}),200)}touchstart(t,e,n){return this._calculateTransform(t,e,n)}touchmove(t,e,n){if(this._map._cooperativeGestures&&(2===this._minTouches&&n.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(t,!1,n.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(n.length<this._minTouches))return t.preventDefault(),this._calculateTransform(t,e,n)}touchend(t,e,n){this._calculateTransform(t,e,n),this._active&&n.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,n,r){r.length>0&&(this._active=!0);const i=br(r,n),o=new t.pointGeometry(0,0),a=new t.pointGeometry(0,0);let s=0;for(const t in i){const e=i[t],n=this._touches[t];n&&(o._add(e),a._add(e.sub(n)),s++,i[t]=e)}if(this._touches=i,s<this._minTouches||!a.mag())return;const u=a.div(s);return this._sum._add(u),this._sum.mag()<this._clickTolerance?void 0:{around:o.div(s),panDelta:u}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Tr{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(t){}_move(t,e,n){return{}}touchstart(t,e,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([e[0],e[1]]))}touchmove(t,e,n){if(!this._firstTwoTouches)return;t.preventDefault();const[r,i]=this._firstTwoTouches,o=kr(n,e,r),a=kr(n,e,i);if(!o||!a)return;const s=this._aroundCenter?null:o.add(a).div(2);return this._move([o,a],s,t)}touchend(t,e,n){if(!this._firstTwoTouches)return;const[r,i]=this._firstTwoTouches,a=kr(n,e,r),s=kr(n,e,i);a&&s||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function kr(t,e,n){for(let r=0;r<t.length;r++)if(t[r].identifier===n)return e[r]}function Ir(t,e){return Math.log(t/e)/Math.LN2}class Lr extends Tr{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(t){this._startDistance=this._distance=t[0].dist(t[1])}_move(t,e){const n=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(Ir(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ir(this._distance,n),pinchAround:e}}}function jr(t,e){return 180*t.angleWith(e)/Math.PI}class Mr extends Tr{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])}_move(t,e){const n=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:jr(this._vector,n),pinchAround:e}}_isBelowThreshold(t){this._minDiameter=Math.min(this._minDiameter,t.mag());const e=25/(Math.PI*this._minDiameter)*360,n=jr(t,this._startVector);return Math.abs(n)<e}}function Rr(t){return Math.abs(t.y)>Math.abs(t.x)}class Nr extends Tr{constructor(t){super(),this._map=t}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(t,e,n){super.touchstart(t,e,n),this._currentTouchCount=n.length}_start(t){this._lastPoints=t,Rr(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,e,n){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const r=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}):void 0}gestureBeginsVertically(t,e,n){if(void 0!==this._valid)return this._valid;const r=t.mag()>=2,i=e.mag()>=2;if(!r&&!i)return;if(!r||!i)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;const o=t.y>0==e.y>0;return Rr(t)&&Rr(e)&&o}}const Dr={panStep:100,bearingStep:15,pitchStep:10};class Fr{constructor(){const t=Dr;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let e=0,n=0,r=0,i=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?r=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?r=-1:(t.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,r=0),{cameraAnimation:a=>{const s=a.getZoom();a.easeTo({duration:300,easeId:"keyboardHandler",easing:Br,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+n*this._bearingStep,pitch:a.getPitch()+r*this._pitchStep,offset:[-i*this._panStep,-o*this._panStep],center:a.getCenter()},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Br(t){return t*(2-t)}const zr=4.000244140625;class Ur{constructor(e,n){this._map=e,this._el=e.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,t.bindAll(["_onTimeout"],this)}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(e){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!this._map._metaPress)return;e.preventDefault()}let n=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const r=t.exported.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%zr==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this._active||this._start(e)),e.preventDefault()}_onTimeout(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const n=o.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const e=this._map.transform;if(0!==this._delta){const t="wheel"===this._type&&Math.abs(this._delta)>zr?this._wheelZoomRate:this._defaultZoomRate;let n=2/(1+Math.exp(-Math.abs(this._delta*t)));this._delta<0&&0!==n&&(n=1/n);const r="number"==typeof this._targetZoom?e.zoomScale(this._targetZoom):e.scale;this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(r*n))),"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n="number"==typeof this._targetZoom?this._targetZoom:e.zoom,r=this._startZoom,i=this._easing;let o,a=!1;if("wheel"===this._type&&r&&i){const e=Math.min((t.exported.now()-this._lastWheelEventTime)/200,1),s=i(e);o=t.number(r,n,s),e<1?this._frameId||(this._frameId=!0):a=!0}else o=n,a=!0;return this._active=!0,a&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!a,zoomDelta:o-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let n=t.ease;if(this._prevEase){const e=this._prevEase,r=(t.exported.now()-e.start)/e.duration,i=e.easing(r+.01)-e.easing(r),o=.27/Math.sqrt(i*i+1e-4)*.01,a=Math.sqrt(.0729-o*o);n=t.bezier(o,a,.25,1)}return this._prevEase={start:t.exported.now(),duration:e,easing:n},n}reset(){this._active=!1}}class Gr{constructor(t,e){this._clickZoom=t,this._tapZoom=e}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Vr{constructor(){this.reset()}reset(){this._active=!1}dblclick(t,e){return t.preventDefault(),{cameraAnimation:n=>{n.easeTo({duration:300,zoom:n.getZoom()+(t.shiftKey?-1:1),around:n.unproject(e)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class qr{constructor(){this._tap=new Ar({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(t,e,n){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=e[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(t,e,n))}touchmove(t,e,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;const r=e[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,n)}touchend(t,e,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(t,e,n)&&(this._tapTime=t.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hr{constructor(t,e,n){this._el=t,this._mousePan=e,this._touchPan=n}enable(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Wr{constructor(t,e,n){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=n}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Xr{constructor(t,e,n,r){this._el=t,this._touchZoom=e,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Yr=t=>t.zoom||t.drag||t.pitch||t.rotate;class Zr extends t.Event{}function Kr(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}class $r{constructor(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new cr(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll(["handleEvent","handleWindowEvent"],this);const r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[window,"blur",void 0]];for(const[t,i,a]of this._listeners)o.addEventListener(t,i,t===document?this.handleWindowEvent:this.handleEvent,a)}destroy(){for(const[t,e,n]of this._listeners)o.removeEventListener(t,e,t===document?this.handleWindowEvent:this.handleEvent,n)}_addDefaultHandlers(t){const e=this._map,n=e.getCanvasContainer();this._add("mapEvent",new gr(e,t));const r=e.boxZoom=new vr(e,t);this._add("boxZoom",r);const i=new wr,o=new Vr;e.doubleClickZoom=new Gr(o,i),this._add("tapZoom",i),this._add("clickZoom",o);const a=new qr;this._add("tapDragZoom",a);const s=e.touchPitch=new Nr(e);this._add("touchPitch",s);const u=new Sr(t),l=new Pr(t);e.dragRotate=new Wr(t,u,l),this._add("mouseRotate",u,["mousePitch"]),this._add("mousePitch",l,["mouseRotate"]);const c=new Or(t),f=new Cr(t,e);e.dragPan=new Hr(n,c,f),this._add("mousePan",c),this._add("touchPan",f,["touchZoom","touchRotate"]);const h=new Mr,p=new Lr;e.touchZoomRotate=new Xr(n,p,h,a),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",p,["touchPan","touchRotate"]);const d=e.scrollZoom=new Ur(e,this);this._add("scrollZoom",d,["mousePan"]);const m=e.keyboard=new Fr;this._add("keyboard",m),this._add("blockableMapEvent",new yr(e));for(const g of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])t.interactive&&t[g]&&e[g].enable(t[g])}_add(t,e,n){this._handlers.push({handlerName:t,handler:e,allowed:n}),this._handlersById[t]=e}stop(t){if(!this._updatingCamera){for(const{handler:t}of this._handlers)t.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(Yr(this._eventsInProgress))||this.isZooming()}_blockedByActive(t,e,n){for(const r in t)if(r!==n&&(!e||e.indexOf(r)<0))return!0;return!1}handleWindowEvent(t){this.handleEvent(t,`${t.type}Window`)}_getMapTouches(t){const e=[];for(const n of t)this._el.contains(n.target)&&e.push(n);return e}handleEvent(t,e){if("blur"===t.type)return void this.stop(!0);this._updatingCamera=!0;const n="renderFrame"===t.type?void 0:t,r={needsRenderFrame:!1},i={},a={},s=t.touches,u=s?this._getMapTouches(s):void 0,l=u?o.touchPos(this._el,u):o.mousePos(this._el,t);for(const{handlerName:o,handler:h,allowed:p}of this._handlers){if(!h.isEnabled())continue;let s;this._blockedByActive(a,p,o)?h.reset():h[e||t.type]&&(s=h[e||t.type](t,l,u),this.mergeHandlerResult(r,i,s,o,n),s&&s.needsRenderFrame&&this._triggerRenderFrame()),(s||h.isActive())&&(a[o]=h)}const c={};for(const o in this._previousActiveHandlers)a[o]||(c[o]=n);this._previousActiveHandlers=a,(Object.keys(c).length||Kr(r))&&(this._changes.push([r,i,c]),this._triggerRenderFrame()),(Object.keys(a).length||Kr(r))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:f}=r;f&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],f(this._map))}mergeHandlerResult(e,n,r,i,o){if(!r)return;t.extend(e,r);const a={handlerName:i,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(n.zoom=a),void 0!==r.panDelta&&(n.drag=a),void 0!==r.pitchDelta&&(n.pitch=a),void 0!==r.bearingDelta&&(n.rotate=a)}_applyChanges(){const e={},n={},r={};for(const[i,o,a]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new t.pointGeometry(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),void 0!==i.around&&(e.around=i.around),void 0!==i.pinchAround&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),t.extend(n,o),t.extend(r,a);this._updateMapTransform(e,n,r),this._changes=[]}_updateMapTransform(e,n,r){const i=this._map,o=i.transform,a=i.style&&i.style.terrain;if(!(Kr(e)||a&&this._drag))return this._fireEvents(n,r,!0);let{panDelta:s,zoomDelta:u,bearingDelta:l,pitchDelta:c,around:f,pinchAround:h}=e;void 0!==h&&(f=h),i._stop(!0),f=f||i.transform.centerPoint;const p=o.pointLocation(s?f.sub(s):f);l&&(o.bearing+=l),c&&(o.pitch+=c),u&&(o.zoom+=u),a?n.drag&&!this._drag?(this._drag={center:o.centerPoint,lngLat:o.pointLocation(f),point:f,handlerName:n.drag.handlerName},i.fire(new t.Event("freezeElevation",{freeze:!0}))):this._drag&&r[this._drag.handlerName]?(i.fire(new t.Event("freezeElevation",{freeze:!1})),this._drag=null):n.drag&&this._drag&&(o.center=o.pointLocation(o.centerPoint.sub(s))):o.setLocationAtPoint(p,f),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(n,r,!0)}_fireEvents(e,n,r){const i=Yr(this._eventsInProgress),o=Yr(e),a={};for(const t in e){const{originalEvent:n}=e[t];this._eventsInProgress[t]||(a[`${t}start`]=n),this._eventsInProgress[t]=e[t]}!i&&o&&this._fireEvent("movestart",o.originalEvent);for(const t in a)this._fireEvent(t,a[t]);o&&this._fireEvent("move",o.originalEvent);for(const t in e){const{originalEvent:n}=e[t];this._fireEvent(t,n)}const s={};let u;for(const t in this._eventsInProgress){const{handlerName:e,originalEvent:r}=this._eventsInProgress[t];this._handlersById[e].isActive()||(delete this._eventsInProgress[t],u=n[e]||r,s[`${t}end`]=u)}for(const t in s)this._fireEvent(t,s[t]);const l=Yr(this._eventsInProgress);if(r&&(i||o)&&!l){this._updatingCamera=!0;const e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),n=t=>0!==t&&-this._bearingSnap<t&&t<this._bearingSnap;e?(n(e.bearing||this._map.getBearing())&&(e.bearing=0),this._map.easeTo(e,{originalEvent:u})):(this._map.fire(new t.Event("moveend",{originalEvent:u})),n(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(e,n){this._map.fire(new t.Event(e,n?{originalEvent:n}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((t=>{delete this._frameId,this.handleEvent(new Zr("renderFrame",{timeStamp:t})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const Jr={extend:(e,...n)=>t.extend(e,...n),run(t){t()},logToElement(t,e=!1,n="log"){const r=window.document.getElementById(n);r&&(e&&(r.innerHTML=""),r.innerHTML+=`<br>${t}`)}};class Qr extends t.Evented{constructor(e,n){super(),this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}getCenter(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(t,e){return this.jumpTo({center:t},e)}panBy(e,n,r){return e=t.pointGeometry.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},n),r)}panTo(e,n,r){return this.easeTo(t.extend({center:e},n),r)}getZoom(){return this.transform.zoom}setZoom(t,e){return this.jumpTo({zoom:t},e),this}zoomTo(e,n,r){return this.easeTo(t.extend({zoom:e},n),r)}zoomIn(t,e){return this.zoomTo(this.getZoom()+1,t,e),this}zoomOut(t,e){return this.zoomTo(this.getZoom()-1,t,e),this}getBearing(){return this.transform.bearing}setBearing(t,e){return this.jumpTo({bearing:t},e),this}getPadding(){return this.transform.padding}setPadding(t,e){return this.jumpTo({padding:t},e),this}rotateTo(e,n,r){return this.easeTo(t.extend({bearing:e},n),r)}resetNorth(e,n){return this.rotateTo(0,t.extend({duration:1e3},e),n),this}resetNorthPitch(e,n){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),n),this}snapToNorth(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this}getPitch(){return this.transform.pitch}setPitch(t,e){return this.jumpTo({pitch:t},e),this}cameraForBounds(e,n){e=t.LngLatBounds.convert(e);const r=n&&n.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),r,n)}_cameraForBoxAndBearing(e,n,r,i){const o={top:0,bottom:0,right:0,left:0};if("number"==typeof(i=t.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){const t=i.padding;i.padding={top:t,bottom:t,right:t,left:t}}i.padding=t.extend(o,i.padding);const a=this.transform,s=a.padding,u=a.project(t.LngLat.convert(e)),l=a.project(t.LngLat.convert(n)),c=u.rotate(-r*Math.PI/180),f=l.rotate(-r*Math.PI/180),h=new t.pointGeometry(Math.max(c.x,f.x),Math.max(c.y,f.y)),p=new t.pointGeometry(Math.min(c.x,f.x),Math.min(c.y,f.y)),d=h.sub(p),m=(a.width-(s.left+s.right+i.padding.left+i.padding.right))/d.x,g=(a.height-(s.top+s.bottom+i.padding.top+i.padding.bottom))/d.y;if(g<0||m<0)return void t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const y=Math.min(a.scaleZoom(a.scale*Math.min(m,g)),i.maxZoom),v=t.pointGeometry.convert(i.offset),b=new t.pointGeometry((i.padding.left-i.padding.right)/2,(i.padding.top-i.padding.bottom)/2).rotate(r*Math.PI/180),_=v.add(b).mult(a.scale/a.zoomScale(y));return{center:a.unproject(u.add(l).div(2).sub(_)),zoom:y,bearing:r}}fitBounds(t,e,n){return this._fitInternal(this.cameraForBounds(t,e),e,n)}fitScreenCoordinates(e,n,r,i,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.pointGeometry.convert(e)),this.transform.pointLocation(t.pointGeometry.convert(n)),r,i),i,o)}_fitInternal(e,n,r){return e?(delete(n=t.extend(e,n)).padding,n.linear?this.easeTo(n,r):this.flyTo(n,r)):this}jumpTo(e,n){this.stop();const r=this.transform;let i=!1,o=!1,a=!1;return"zoom"in e&&r.zoom!==+e.zoom&&(i=!0,r.zoom=+e.zoom),void 0!==e.center&&(r.center=t.LngLat.convert(e.center)),"bearing"in e&&r.bearing!==+e.bearing&&(o=!0,r.bearing=+e.bearing),"pitch"in e&&r.pitch!==+e.pitch&&(a=!0,r.pitch=+e.pitch),null==e.padding||r.isPaddingEqual(e.padding)||(r.padding=e.padding),this.fire(new t.Event("movestart",n)).fire(new t.Event("move",n)),i&&this.fire(new t.Event("zoomstart",n)).fire(new t.Event("zoom",n)).fire(new t.Event("zoomend",n)),o&&this.fire(new t.Event("rotatestart",n)).fire(new t.Event("rotate",n)).fire(new t.Event("rotateend",n)),a&&this.fire(new t.Event("pitchstart",n)).fire(new t.Event("pitch",n)).fire(new t.Event("pitchend",n)),this.fire(new t.Event("moveend",n))}easeTo(e,n){this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.exported.prefersReducedMotion)&&(e.duration=0);const r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),u="zoom"in e?+e.zoom:i,l="bearing"in e?this._normalizeBearing(e.bearing,o):o,c="pitch"in e?+e.pitch:a,f="padding"in e?e.padding:r.padding,h=t.pointGeometry.convert(e.offset);let p=r.centerPoint.add(h);const d=r.pointLocation(p),m=t.LngLat.convert(e.center||d);this._normalizeCenter(m);const g=r.project(d),y=r.project(m).sub(g),v=r.zoomScale(u-i);let b,_;e.around&&(b=t.LngLat.convert(e.around),_=r.locationPoint(b));const A={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||u!==i,this._rotating=this._rotating||o!==l,this._pitching=this._pitching||c!==a,this._padding=!r.isPaddingEqual(f),this._easeId=e.easeId,this._prepareEase(n,e.noMoveStart,A),this._ease((e=>{if(this._zooming&&(r.zoom=t.number(i,u,e)),this._rotating&&(r.bearing=t.number(o,l,e)),this._pitching&&(r.pitch=t.number(a,c,e)),this._padding&&(r.interpolatePadding(s,f,e),p=r.centerPoint.add(h)),b)r.setLocationAtPoint(b,_);else{const t=r.zoomScale(r.zoom-i),n=u>i?Math.min(2,v):Math.max(.5,v),o=Math.pow(n,1-e),a=r.unproject(g.add(y.mult(e*o)).mult(t));r.setLocationAtPoint(r.renderWorldCopies?a.wrap():a,p)}this._fireMoveEvents(n)}),(t=>{this._afterEase(n,t)}),e),this}_prepareEase(e,n,r={}){this._moving=!0,this.fire(new t.Event("freezeElevation",{freeze:!0})),n||r.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!r.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new t.Event("pitchstart",e))}_fireMoveEvents(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))}_afterEase(e,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId,this.fire(new t.Event("freezeElevation",{freeze:!1}));const r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}flyTo(e,n){if(!e.essential&&t.exported.prefersReducedMotion){const r=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(r,n)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);const r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),u="zoom"in e?t.clamp(+e.zoom,r.minZoom,r.maxZoom):i,l="bearing"in e?this._normalizeBearing(e.bearing,o):o,c="pitch"in e?+e.pitch:a,f="padding"in e?e.padding:r.padding,h=r.zoomScale(u-i),p=t.pointGeometry.convert(e.offset);let d=r.centerPoint.add(p);const m=r.pointLocation(d),g=t.LngLat.convert(e.center||m);this._normalizeCenter(g);const y=r.project(m),v=r.project(g).sub(y);let b=e.curve;const _=Math.max(r.width,r.height),A=_/h,w=v.mag();if("minZoom"in e){const n=t.clamp(Math.min(e.minZoom,i,u),r.minZoom,r.maxZoom),o=_/r.zoomScale(n-i);b=Math.sqrt(o/w*2)}const x=b*b;function E(t){const e=(A*A-_*_+(t?-1:1)*x*x*w*w)/(2*(t?A:_)*x*w);return Math.log(Math.sqrt(e*e+1)-e)}function O(t){return(Math.exp(t)-Math.exp(-t))/2}function S(t){return(Math.exp(t)+Math.exp(-t))/2}const P=E(0);let C=function(t){return S(P)/S(P+b*t)},T=function(t){return _*((S(P)*(O(e=P+b*t)/S(e))-O(P))/x)/w;var e},k=(E(1)-P)/b;if(Math.abs(w)<1e-6||!isFinite(k)){if(Math.abs(_-A)<1e-6)return this.easeTo(e,n);const t=A<_?-1:1;k=Math.abs(Math.log(A/_))/b,T=function(){return 0},C=function(e){return Math.exp(t*b*e)}}return e.duration="duration"in e?+e.duration:1e3*k/("screenSpeed"in e?+e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=o!==l,this._pitching=c!==a,this._padding=!r.isPaddingEqual(f),this._prepareEase(n,!1),this._ease((e=>{const h=e*k,m=1/C(h);r.zoom=1===e?u:i+r.scaleZoom(m),this._rotating&&(r.bearing=t.number(o,l,e)),this._pitching&&(r.pitch=t.number(a,c,e)),this._padding&&(r.interpolatePadding(s,f,e),d=r.centerPoint.add(p));const b=1===e?g:r.unproject(y.add(v.mult(T(h))).mult(m));r.setLocationAtPoint(r.renderWorldCopies?b.wrap():b,d),this._fireMoveEvents(n)}),(()=>this._afterEase(n)),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const t=this._onEaseEnd;delete this._onEaseEnd,t.call(this,e)}if(!t){const t=this.handlers;t&&t.stop(!1)}return this}_ease(e,n,r){!1===r.animate||0===r.duration?(e(1),n()):(this._easeStart=t.exported.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const e=Math.min((t.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(e,n){e=t.wrap(e,-180,180);const r=Math.abs(e-n);return Math.abs(e-360-n)<r&&(e-=360),Math.abs(e+360-n)<r&&(e+=360),e}_normalizeCenter(t){const e=this.transform;if(!e.renderWorldCopies||e.lngRange)return;const n=t.lng-e.center.lng;t.lng+=n>180?-360:n<-180?360:0}}class ti{constructor(e={}){this.options=e,t.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(t){return this._map=t,this._compact=this.options&&this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","maplibregl-ctrl-attrib-inner mapboxgl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(t,e){const n=this._map._getUIString(`AttributionControl.${e}`);t.title=n,t.setAttribute("aria-label",n)}_toggleAttribution(){this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")):(this._container.classList.add("maplibregl-compact-show","mapboxgl-compact-show"),this._container.removeAttribute("open")))}_updateData(t){!t||"metadata"!==t.sourceDataType&&"visibility"!==t.sourceDataType&&"style"!==t.dataType||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((t=>"string"!=typeof t?"":t))):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){const t=this._map.style.stylesheet;this.styleOwner=t.owner,this.styleId=t.id}const e=this._map.style.sourceCaches;for(const r in e){const n=e[r];if(n.used){const e=n.getSource();e.attribution&&t.indexOf(e.attribution)<0&&t.push(e.attribution)}}t=t.filter((t=>String(t).trim())),t.sort(((t,e)=>t.length-e.length)),t=t.filter(((e,n)=>{for(let r=n+1;r<t.length;r++)if(t[r].indexOf(e)>=0)return!1;return!0}));const n=t.join(" | ");n!==this._attribHTML&&(this._attribHTML=n,t.length?(this._innerContainer.innerHTML=n,this._container.classList.remove("maplibregl-attrib-empty","mapboxgl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty","mapboxgl-attrib-empty"),this._updateCompact(),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","mapboxgl-compact","maplibregl-compact-show","mapboxgl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show","mapboxgl-compact","mapboxgl-compact-show"))}_updateCompactMinimize(){this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")}}class ei{constructor(e={}){this.options=e,t.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl mapboxgl-ctrl");const e=o.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://maplibre.org/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}_updateCompact(){const t=this._container.children;if(t.length){const e=t[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&e.classList.add("maplibregl-compact","mapboxgl-compact"):e.classList.remove("maplibregl-compact","mapboxgl-compact")}}}class ni{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e}remove(t){const e=this._currentlyRunning,n=e?this._queue.concat(e):this._queue;for(const r of n)if(r.id===t)return void(r.cancelled=!0)}run(t=0){const e=this._currentlyRunning=this._queue;this._queue=[];for(const n of e)if(!n.cancelled&&(n.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const ri={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"},ii={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:void 0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},oi={showCompass:!0,showZoom:!0,visualizePitch:!1};class ai{constructor(e,n,r=!1){this._clickTolerance=10,this.element=n,this.mouseRotate=new Sr({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,r&&(this.mousePitch=new Pr({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),o.addEventListener(n,"mousedown",this.mousedown),o.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(n,"touchmove",this.touchmove),o.addEventListener(n,"touchend",this.touchend),o.addEventListener(n,"touchcancel",this.reset)}down(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),o.disableDrag()}move(t,e){const n=this.map,r=this.mouseRotate.mousemoveWindow(t,e);if(r&&r.bearingDelta&&n.setBearing(n.getBearing()+r.bearingDelta),this.mousePitch){const r=this.mousePitch.mousemoveWindow(t,e);r&&r.pitchDelta&&n.setPitch(n.getPitch()+r.pitchDelta)}}off(){const t=this.element;o.removeEventListener(t,"mousedown",this.mousedown),o.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(t,"touchmove",this.touchmove),o.removeEventListener(t,"touchend",this.touchend),o.removeEventListener(t,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup)}mousedown(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:()=>e.preventDefault()}),o.mousePos(this.element,e)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)}mousemove(t){this.move(t,o.mousePos(this.element,t))}mouseup(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()}touchstart(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>t.preventDefault()},this._startPos))}touchmove(t){1!==t.targetTouches.length?this.reset():(this._lastPos=o.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:()=>t.preventDefault()},this._lastPos))}touchend(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}function si(e,n,r){if(e=new t.LngLat(e.lng,e.lat),n){const i=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=r.locationPoint(e).distSqr(n);r.locationPoint(i).distSqr(n)<a?e=i:r.locationPoint(o).distSqr(n)<a&&(e=o)}for(;Math.abs(e.lng-r.center.lng)>180;){const t=r.locationPoint(e);if(t.x>=0&&t.y>=0&&t.x<=r.width&&t.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e}const ui={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function li(t,e,n){const r=t.classList;for(const i in ui)r.remove(`maplibregl-${n}-anchor-${i}`,`mapboxgl-${n}-anchor-${i}`);r.add(`maplibregl-${n}-anchor-${e}`,`mapboxgl-${n}-anchor-${e}`)}class ci extends t.Evented{constructor(e,n){if(super(),(e instanceof HTMLElement||n)&&(e=t.extend({element:e},n)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,e&&e.element)this._element=e.element,this._offset=t.pointGeometry.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");const n=o.createNS("http://www.w3.org/2000/svg","svg"),r=41,i=27;n.setAttributeNS(null,"display","block"),n.setAttributeNS(null,"height",`${r}px`),n.setAttributeNS(null,"width",`${i}px`),n.setAttributeNS(null,"viewBox",`0 0 ${i} ${r}`);const a=o.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");const s=o.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");const u=o.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(3.0, 29.0)"),u.setAttributeNS(null,"fill","#000000");const l=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const t of l){const e=o.createNS("http://www.w3.org/2000/svg","ellipse");e.setAttributeNS(null,"opacity","0.04"),e.setAttributeNS(null,"cx","10.5"),e.setAttributeNS(null,"cy","5.80029008"),e.setAttributeNS(null,"rx",t.rx),e.setAttributeNS(null,"ry",t.ry),u.appendChild(e)}const c=o.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"fill",this._color);const f=o.createNS("http://www.w3.org/2000/svg","path");f.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),c.appendChild(f);const h=o.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"opacity","0.25"),h.setAttributeNS(null,"fill","#000000");const p=o.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),h.appendChild(p);const d=o.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"transform","translate(6.0, 7.0)"),d.setAttributeNS(null,"fill","#FFFFFF");const m=o.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(8.0, 8.0)");const g=o.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");const y=o.createNS("http://www.w3.org/2000/svg","circle");y.setAttributeNS(null,"fill","#FFFFFF"),y.setAttributeNS(null,"cx","5.5"),y.setAttributeNS(null,"cy","5.5"),y.setAttributeNS(null,"r","5.4999962"),m.appendChild(g),m.appendChild(y),s.appendChild(u),s.appendChild(c),s.appendChild(h),s.appendChild(d),s.appendChild(m),n.appendChild(s),n.setAttributeNS(null,"height",r*this._scale+"px"),n.setAttributeNS(null,"width",i*this._scale+"px"),this._element.appendChild(n),this._offset=t.pointGeometry.convert(e&&e.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",(t=>{t.preventDefault()})),this._element.addEventListener("mousedown",(t=>{t.preventDefault()})),li(this._element,this._anchor,"marker"),this._popup=null}addTo(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const e=38.1,n=13.5,r=Math.sqrt(Math.pow(n,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-e],"bottom-left":[r,-1*(e-n+r)],"bottom-right":[-r,-1*(e-n+r)],left:[n,-1*(e-n)],right:[-n,-1*(e-n)]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}_onKeyPress(t){const e=t.code,n=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==n&&13!==n||this.togglePopup()}_onMapClick(t){const e=t.originalEvent.target,n=this._element;this._popup&&(e===n||n.contains(e))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this}_update(t){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=si(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let e="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(e=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let n="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?n="rotateX(0deg)":"map"===this._pitchAlignment&&(n=`rotateX(${this._map.getPitch()}deg)`),t&&"moveend"!==t.type||(this._pos=this._pos.round()),o.setTransform(this._element,`${ui[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${n} ${e}`),this._map.style&&this._map.style.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout((()=>{const t=this._map.unproject(this._pos),e=40075016.686*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=t.distanceTo(this._lngLat)>20*e?"0.2":"1.0",this._opacityTimeout=null}),100))}getOffset(){return this._offset}setOffset(e){return this._offset=t.pointGeometry.convert(e),this._update(),this}_onMove(e){if(!this._isDragging){const t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"}_addDragHandler(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))}setDraggable(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const fi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let hi,pi=0,di=!1;const mi={maxWidth:100,unit:"metric"};function gi(t,e,n){const r=n&&n.maxWidth||100,i=t._container.clientHeight/2,o=t.unproject([0,i]),a=t.unproject([r,i]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){const n=3.2808*s;n>5280?yi(e,r,n/5280,t._getUIString("ScaleControl.Miles")):yi(e,r,n,t._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?yi(e,r,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?yi(e,r,s/1e3,t._getUIString("ScaleControl.Kilometers")):yi(e,r,s,t._getUIString("ScaleControl.Meters"))}function yi(t,e,n,r){const i=function(t){const e=Math.pow(10,`${Math.floor(t)}`.length-1);let n=t/e;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:function(t){const e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(n),e*n}(n);t.style.width=e*(i/n)+"px",t.innerHTML=`${i}&nbsp;${r}`}const vi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},bi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function _i(e){if(e){if("number"==typeof e){const n=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new t.pointGeometry(0,0),top:new t.pointGeometry(0,e),"top-left":new t.pointGeometry(n,n),"top-right":new t.pointGeometry(-n,n),bottom:new t.pointGeometry(0,-e),"bottom-left":new t.pointGeometry(n,-n),"bottom-right":new t.pointGeometry(-n,-n),left:new t.pointGeometry(e,0),right:new t.pointGeometry(-e,0)}}if(e instanceof t.pointGeometry||Array.isArray(e)){const n=t.pointGeometry.convert(e);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.pointGeometry.convert(e.center||[0,0]),top:t.pointGeometry.convert(e.top||[0,0]),"top-left":t.pointGeometry.convert(e["top-left"]||[0,0]),"top-right":t.pointGeometry.convert(e["top-right"]||[0,0]),bottom:t.pointGeometry.convert(e.bottom||[0,0]),"bottom-left":t.pointGeometry.convert(e["bottom-left"]||[0,0]),"bottom-right":t.pointGeometry.convert(e["bottom-right"]||[0,0]),left:t.pointGeometry.convert(e.left||[0,0]),right:t.pointGeometry.convert(e.right||[0,0])}}return _i(new t.pointGeometry(0,0))}const Ai={supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:class extends Qr{constructor(e){var n;if(t.PerformanceUtils.mark(t.PerformanceMarkers.create),null!=(e=t.extend({},ii,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new rr(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies),{bearingSnap:e.bearingSnap}),this._interactive=e.interactive,this._cooperativeGestures=e.cooperativeGestures,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new ni,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},ri,e.locale),this._clickTolerance=e.clickTolerance,this._pixelRatio=null!==(n=e.pixelRatio)&&void 0!==n?n:devicePixelRatio,this._requestManager=new a(e.transformRequest),"string"==typeof e.container){if(this._container=document.getElementById(e.container),!this._container)throw new Error(`Container '${e.container}' not found.`)}else{if(!(e.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})),"undefined"!=typeof window&&(addEventListener("online",this._onWindowOnline,!1),addEventListener("resize",this._onWindowResize,!1),addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new $r(this,e),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=e.hash&&new ir("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new ti({customAttribution:e.customAttribution})),e.maplibreLogo&&this.addControl(new ei,e.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(e=>{this._update("style"===e.dataType),this.fire(new t.Event(`${e.dataType}data`,e))})),this.on("dataloading",(e=>{this.fire(new t.Event(`${e.dataType}dataloading`,e))})),this.on("dataabort",(e=>{this.fire(new t.Event("sourcedataabort",e))}))}_getMapId(){return this._mapId}addControl(e,n){if(void 0===n&&(n=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=e.onAdd(this);this._controls.push(e);const i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this}removeControl(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(e);return n>-1&&this._controls.splice(n,1),e.onRemove(this),this}hasControl(t){return this._controls.indexOf(t)>-1}resize(e){const n=this._containerDimensions(),r=n[0],i=n[1];this._resizeCanvas(r,i,this.getPixelRatio()),this.transform.resize(r,i),this.painter.resize(r,i,this.getPixelRatio());const o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(t){const[e,n]=this._containerDimensions();this._pixelRatio=t,this._resizeCanvas(e,n,t),this.painter.resize(e,n,t)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()}setMinZoom(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(t){if((t=null==t?60:t)>85)throw new Error("maxPitch must be less than or equal to 85");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(t){return this.transform.renderWorldCopies=t,this._update()}project(e){return this.transform.locationPoint(t.LngLat.convert(e),this.style&&this.style.terrain)}unproject(e){return this.transform.pointLocation(t.pointGeometry.convert(e),this.style&&this.style.terrain)}isMoving(){return this._moving||this.handlers.isMoving()}isZooming(){return this._zooming||this.handlers.isZooming()}isRotating(){return this._rotating||this.handlers.isRotating()}_createDelegatedListener(t,e,n){if("mouseenter"===t||"mouseover"===t){let r=!1;const i=i=>{const o=this.getLayer(e)?this.queryRenderedFeatures(i.point,{layers:[e]}):[];o.length?r||(r=!0,n.call(this,new pr(t,this,i.originalEvent,{features:o}))):r=!1};return{layer:e,listener:n,delegates:{mousemove:i,mouseout:()=>{r=!1}}}}if("mouseleave"===t||"mouseout"===t){let r=!1;const i=i=>{(this.getLayer(e)?this.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?r=!0:r&&(r=!1,n.call(this,new pr(t,this,i.originalEvent)))},o=e=>{r&&(r=!1,n.call(this,new pr(t,this,e.originalEvent)))};return{layer:e,listener:n,delegates:{mousemove:i,mouseout:o}}}{const r=t=>{const r=this.getLayer(e)?this.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,n.call(this,t),delete t.features)};return{layer:e,listener:n,delegates:{[t]:r}}}}on(t,e,n){if(void 0===n)return super.on(t,e);const r=this._createDelegatedListener(t,e,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(r);for(const i in r.delegates)this.on(i,r.delegates[i]);return this}once(t,e,n){if(void 0===n)return super.once(t,e);const r=this._createDelegatedListener(t,e,n);for(const i in r.delegates)this.once(i,r.delegates[i]);return this}off(t,e,n){return void 0===n?super.off(t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&(r=>{const i=this._delegatedListeners[t];for(let t=0;t<i.length;t++){const r=i[t];if(r.layer===e&&r.listener===n){for(const t in r.delegates)this.off(t,r.delegates[t]);return i.splice(t,1),this}}})(),this)}queryRenderedFeatures(e,n){if(!this.style)return[];let r;if(void 0!==n||void 0===e||e instanceof t.pointGeometry||Array.isArray(e)||(n=e,e=void 0),n=n||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.pointGeometry||"number"==typeof e[0])r=[t.pointGeometry.convert(e)];else{const n=t.pointGeometry.convert(e[0]),i=t.pointGeometry.convert(e[1]);r=[n,new t.pointGeometry(i.x,n.y),i,new t.pointGeometry(n.x,i.y),n]}return this.style.queryRenderedFeatures(r,n,this.transform)}querySourceFeatures(t,e){return this.style.querySourceFeatures(t,e)}setStyle(e,n){return!1!==(n=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},n)).diff&&n.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._updateStyle(e,n))}setTransformRequest(t){return this._requestManager.setTransformRequest(t),this}_getUIString(t){const e=this._locale[t];if(null==e)throw new Error(`Missing UI string '${t}'`);return e}_updateStyle(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new ee(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ee(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,n){if("string"==typeof e){const r=this._requestManager.transformRequest(e,t.ResourceType.Style);t.getJSON(r,((e,r)=>{e?this.fire(new t.ErrorEvent(e)):r&&this._updateDiff(r,n)}))}else"object"==typeof e&&this._updateDiff(e,n)}_updateDiff(e,n){try{this.style.setState(e)&&this._update(!0)}catch(r){t.warnOnce(`Unable to perform style diff: ${r.message||r.error||r}.  Rebuilding the style from scratch.`),this._updateStyle(e,n)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")}addSource(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)}isSourceLoaded(e){const n=this.style&&this.style.sourceCaches[e];if(void 0!==n)return n.loaded();this.fire(new t.ErrorEvent(new Error(`There is no source with ID '${e}'`)))}setTerrain(t){return this.style.setTerrain(t),this}getTerrain(){return this.style.terrain&&this.style.terrain.options}areTilesLoaded(){const t=this.style&&this.style.sourceCaches;for(const e in t){const n=t[e]._tiles;for(const t in n){const e=n[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}}return!0}addSourceType(t,e,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,n)}removeSource(t){return this.style.removeSource(t),this._update(!0)}getSource(t){return this.style.getSource(t)}addImage(e,n,{pixelRatio:r=1,sdf:i=!1,stretchX:o,stretchY:a,content:s}={}){if(this._lazyInitEmptyStyle(),n instanceof HTMLImageElement||t.isImageBitmap(n)){const{width:u,height:l,data:c}=t.exported.getImageData(n);this.style.addImage(e,{data:new t.RGBAImage({width:u,height:l},c),pixelRatio:r,stretchX:o,stretchY:a,content:s,sdf:i,version:0})}else{if(void 0===n.width||void 0===n.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:u,height:l,data:c}=n,f=n;this.style.addImage(e,{data:new t.RGBAImage({width:u,height:l},new Uint8Array(c)),pixelRatio:r,stretchX:o,stretchY:a,content:s,sdf:i,version:0,userImage:f}),f.onAdd&&f.onAdd(this,e)}}}updateImage(e,n){const r=this.style.getImage(e);if(!r)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const i=n instanceof HTMLImageElement||t.isImageBitmap(n)?t.exported.getImageData(n):n,{width:o,height:a,data:s}=i;if(void 0===o||void 0===a)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(o!==r.data.width||a!==r.data.height)return this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const u=!(n instanceof HTMLImageElement||t.isImageBitmap(n));r.data.replace(s,u),this.style.updateImage(e,r)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(t){this.style.removeImage(t)}loadImage(e,n){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),n)}listImages(){return this.style.listImages()}addLayer(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)}moveLayer(t,e){return this.style.moveLayer(t,e),this._update(!0)}removeLayer(t){return this.style.removeLayer(t),this._update(!0)}getLayer(t){return this.style.getLayer(t)}setLayerZoomRange(t,e,n){return this.style.setLayerZoomRange(t,e,n),this._update(!0)}setFilter(t,e,n={}){return this.style.setFilter(t,e,n),this._update(!0)}getFilter(t){return this.style.getFilter(t)}setPaintProperty(t,e,n,r={}){return this.style.setPaintProperty(t,e,n,r),this._update(!0)}getPaintProperty(t,e){return this.style.getPaintProperty(t,e)}setLayoutProperty(t,e,n,r={}){return this.style.setLayoutProperty(t,e,n,r),this._update(!0)}getLayoutProperty(t,e){return this.style.getLayoutProperty(t,e)}setLight(t,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(t,e){return this.style.setFeatureState(t,e),this._update()}removeFeatureState(t,e){return this.style.removeFeatureState(t,e),this._update()}getFeatureState(t){return this.style.getFeatureState(t)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]}_setupContainer(){const t=this._container;t.classList.add("maplibregl-map","mapboxgl-map");const e=this._canvasContainer=o.create("div","maplibregl-canvas-container mapboxgl-canvas-container",t);this._interactive&&e.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas mapboxgl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const n=this._containerDimensions();this._resizeCanvas(n[0],n[1],this.getPixelRatio());const r=this._controlContainer=o.create("div","maplibregl-control-container mapboxgl-control-container",t),i=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((t=>{i[t]=o.create("div",`maplibregl-ctrl-${t} mapboxgl-ctrl-${t}`,r)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){const t=this._container;this._metaPress=!1,this._cooperativeGesturesScreen=o.create("div","maplibregl-cooperative-gesture-screen",t);let e="Control",n="boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";0===navigator.platform.indexOf("Mac")&&(n="boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use \u2318 + scroll to zoom the map",e="Meta"),this._cooperativeGesturesScreen.innerHTML=`\n            <div class="maplibregl-desktop-message">${n}</div>\n            <div class="maplibregl-mobile-message">${"boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}</div>\n        `,document.addEventListener("keydown",(t=>{t.key===e&&(this._metaPress=!0)})),document.addEventListener("keyup",(t=>{t.key===e&&(this._metaPress=!1)})),this._canvasContainer.addEventListener("wheel",(t=>{this._onCooperativeGesture(t,this._metaPress,1)}),!1),this._canvasContainer.classList.remove("mapboxgl-touch-drag-pan","maplibregl-touch-drag-pan")}_resizeCanvas(t,e,n){this._canvas.width=n*t,this._canvas.height=n*e,this._canvas.style.width=`${t}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const n=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),r=this._canvas.getContext("webgl",n)||this._canvas.getContext("experimental-webgl",n);r?(this.painter=new Qn(r,this.transform),t.exported$1.testSupport(r)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))}_contextRestored(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))}_onMapScroll(t){if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(t,e,n){return!e&&n<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout((()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")}),100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(t){return this._update(),this._renderTaskQueue.add(t)}_cancelRenderFrame(t){this._renderTaskQueue.remove(t)}_render(e){let n,r=0;const i=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(n=i.createQueryEXT(),i.beginQueryEXT(i.TIME_ELAPSED_EXT,n),r=t.exported.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let o=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const e=this.transform.zoom,n=t.exported.now();this.style.zoomHistory.update(e,n);const r=new t.EvaluationParameters(e,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),i=r.crossFadingFactor();1===i&&i===this._crossFadingFactor||(o=!0,this._crossFadingFactor=i),this.style.update(r)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.style.terrain&&this.style.terrain.sourceCache.update(this.transform,this.style.terrain),this.transform.updateElevation(this.style.terrain),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.PerformanceUtils.mark(t.PerformanceMarkers.load),this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||o)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const e=t.exported.now()-r;i.endQueryEXT(i.TIME_ELAPSED_EXT,n),setTimeout((()=>{const r=i.getQueryObjectEXT(n,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(n),this.fire(new t.Event("gpu-timing-frame",{cpuTime:e,gpuTime:r}))}),50)}if(this.listens("gpu-timing-layer")){const e=this.painter.collectGpuTimers();setTimeout((()=>{const n=this.painter.queryGpuTimers(e);this.fire(new t.Event("gpu-timing-layer",{layerTimes:n}))}),50)}const a=this._sourcesDirty||this._styleDirty||this._placementDirty;return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,t.PerformanceUtils.mark(t.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&(removeEventListener("resize",this._onWindowResize,!1),removeEventListener("orientationchange",this._onWindowResize,!1),removeEventListener("online",this._onWindowOnline,!1));const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._cooperativeGestures&&o.remove(this._cooperativeGesturesScreen),this._container.classList.remove("maplibregl-map","mapboxgl-map"),t.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new t.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=t.exported.frame((e=>{t.PerformanceUtils.frame(e),this._frame=null,this._render(e)})))}_onWindowOnline(){this._update()}_onWindowResize(t){this._trackResize&&this.resize({originalEvent:t})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())}get showPadding(){return!!this._showPadding}set showPadding(t){this._showPadding!==t&&(this._showPadding=t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())}get repaint(){return!!this._repaint}set repaint(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(t){this._vertices=t,this._update()}_setCacheLimits(e,n){t.setCacheLimits(e,n)}get version(){return"2.3.0"}},NavigationControl:class{constructor(e){this.options=t.extend({},oi,e),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(t=>t.preventDefault())),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",(t=>this._map.zoomIn({},{originalEvent:t}))),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out mapboxgl-ctrl-zoom-out",(t=>this._map.zoomOut({},{originalEvent:t}))),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("maplibregl-ctrl-compass mapboxgl-ctrl-compass",(t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})})),this._compassIcon=o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const t=this._map.getZoom(),e=t===this._map.getMaxZoom(),n=t===this._map.getMinZoom();this._zoomInButton.disabled=e,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",e.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())}_rotateCompassArrow(){const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=t}onAdd(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ai(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(t,e){const n=o.create("button",t,this._container);return n.type="button",n.addEventListener("click",e),n}_setButtonTitle(t,e){const n=this._map._getUIString(`NavigationControl.${e}`);t.title=n,t.setAttribute("aria-label",n)}},GeolocateControl:class extends t.Evented{constructor(e){super(),this.options=t.extend({},fi,e),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(t){var e;return this._map=t,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),e=this._setupUI,void 0!==hi?e(hi):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then((t=>{hi="denied"!==t.state,e(hi)})):(hi=!!window.navigator.geolocation,e(hi)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,pi=0,di=!1}_isOutOfMapMaxBounds(t){const e=this._map.getMaxBounds(),n=t.coords;return e&&(n.longitude<e.getWest()||n.longitude>e.getEast()||n.latitude<e.getSouth()||n.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}}_updateCamera(e){const n=new t.LngLat(e.coords.longitude,e.coords.latitude),r=e.coords.accuracy,i=this._map.getBearing(),o=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),o,{geolocateSource:!0})}_updateMarker(e){if(e){const n=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),n=this._map.unproject([1,t]),r=e.distanceTo(n),i=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=`${i}px`,this._circleElement.style.height=`${i}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&di)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(e){if(this._container.addEventListener("contextmenu",(t=>t.preventDefault())),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate mapboxgl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot mapboxgl-user-location-dot"),this._userLocationDotMarker=new ci(this._dotElement),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ci({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(e=>{e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this.fire(new t.Event("trackuserlocationend")))}))}trigger(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pi--,di=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let t;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pi++,pi>1?(t={maximumAge:6e5,timeout:0},di=!0):(t=this.options.positionOptions,di=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:ti,LogoControl:ei,ScaleControl:class{constructor(e){this.options=t.extend({},mi,e),t.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){gi(this._map,this._container,this.options)}onAdd(t){return this._map=t,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}setUnit(t){this.options.unit=t,gi(this._map,this._container,this.options)}},FullscreenControl:class{constructor(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled)}_setupUI(){const t=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",t).setAttribute("aria-hidden","true"),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},TerrainControl:class{constructor(e){this.options=e,t.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(t){return this._map=t,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain mapboxgl-ctrl-terrain",this._container),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._map.style.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))}},Popup:class extends t.Evented{constructor(e){super(),this.options=t.extend(Object.create(vi),e),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this}isOpen(){return!!this._map}remove(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer","mapboxgl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")),this}getElement(){return this._container}setText(t){return this.setDOMContent(document.createTextNode(t))}setHTML(t){const e=document.createDocumentFragment(),n=document.createElement("body");let r;for(n.innerHTML=t;r=n.firstChild,r;)e.appendChild(r);return this.setDOMContent(e)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(t){return this.options.maxWidth=t,this._update(),this}setDOMContent(t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content mapboxgl-popup-content",this._container);return this._content.appendChild(t),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(t){this._container&&this._container.classList.add(t)}removeClassName(t){this._container&&this._container.classList.remove(t)}setOffset(t){return this.options.offset=t,this._update(),this}toggleClassName(t){if(this._container)return this._container.classList.toggle(t)}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_onMouseUp(t){this._update(t.point)}_onMouseMove(t){this._update(t.point)}_onDrag(t){this._update(t.point)}_update(t){if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(this._container||(this._container=o.create("div","maplibregl-popup mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((t=>this._container.classList.add(t))),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=si(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!t)return;const e=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat);let n=this.options.anchor;const r=_i(this.options.offset);if(!n){const t=this._container.offsetWidth,i=this._container.offsetHeight;let o;o=e.y+r.bottom.y<i?["top"]:e.y>this._map.transform.height-i?["bottom"]:[],e.x<t/2?o.push("left"):e.x>this._map.transform.width-t/2&&o.push("right"),n=0===o.length?"bottom":o.join("-")}const i=e.add(r[n]).round();o.setTransform(this._container,`${ui[n]} translate(${i.x}px,${i.y}px)`),li(this._container,n,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const t=this._container.querySelector(bi);t&&t.focus()}_onClose(){this.remove()}},Marker:ci,Style:ee,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.pointGeometry,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,AJAXError:t.AJAXError,config:t.config,CanvasSource:k,GeoJSONSource:S,ImageSource:C,RasterDEMTileSource:O,RasterTileSource:x,VectorTileSource:w,VideoSource:T,prewarm:function(){H().acquire(U)},clearPrewarmedResources:function(){const t=q;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(U),q=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get version(){return"2.3.0"},get workerCount(){return G.workerCount},set workerCount(t){G.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage(e){t.clearTileCache(e)},workerUrl:"",addProtocol(e,n){t.config.REGISTERED_PROTOCOLS[e]=n},removeProtocol(e){delete t.config.REGISTERED_PROTOCOLS[e]}};return Jr.extend(Ai,{isSafari:t.isSafari,getPerformanceMetrics:t.PerformanceUtils.getPerformanceMetrics}),Ai})),n}()},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(8),a=n.n(o),s=n(1022),u=n.n(s);e.default=function(t){var e=Object.keys(t.counts).map((function(e,n){var r=a.a.t("".concat(e).concat(1===t.counts[e]?"":"s"));if(t.counts[e]>0)return i.a.createElement("span",{key:"count-".concat(n)},t.counts[e]," ",r)}));return i.a.createElement("div",{className:u.a.Counts},e)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(71),a=n(324),s=n(109),u=n(1137),l=n(18),c=n(412),f=n.n(c),h=n(732);function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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}e.default=function(t){var e=p(Object(r.useState)(),2),n=e[0],c=e[1];return i.a.createElement("div",{className:f.a.ShareButtons},i.a.createElement("ul",null,Object(l.hasFeature)("embedded_content")&&i.a.createElement("li",{className:f.a.embed},i.a.createElement("a",{onClick:function(){c((function(t){return!t}))}},i.a.createElement("span",null,"Embed"),i.a.createElement(o.a,{icon:s.f}))),Object(l.hasFeature)("social_sharing")&&i.a.createElement(i.a.Fragment,null,i.a.createElement("li",{className:f.a.facebook},i.a.createElement("a",{target:"_blank",href:"https://www.facebook.com/sharer/sharer.php?u=".concat(t.URL)},i.a.createElement("span",null,"Facebook"),i.a.createElement(o.a,{icon:a.b}))),i.a.createElement("li",{className:f.a.twitter},i.a.createElement("a",{target:"_blank",href:"https://twitter.com/share?url=".concat(t.URL,"&text=").concat(t.excerpt)},i.a.createElement("span",null,"Twitter"),i.a.createElement(o.a,{icon:a.d}))),i.a.createElement("li",{className:f.a.email},i.a.createElement("a",{target:"_blank",href:"mailto:?subject=Check%20out%20this%20content%20from%20".concat(t.site_title,".&body=").concat(t.URL)},i.a.createElement("span",null,"Email"),i.a.createElement(o.a,{icon:s.g}))))),Object(l.hasFeature)("embedded_content")&&n&&i.a.createElement(u.a,{onEsc:function(){return c(!1)},onClickOutside:function(){return c(!1)},animation:"fadeIn",plain:!0,style:{borderRadius:"20px",background:"white"}},i.a.createElement(h.default,{item:t.item})))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(273),a=n(1137),s=n(1023),u=n.n(s);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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return c(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 c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(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}e.default=function(t){var e=l(Object(r.useState)(),2),n=e[0],s=e[1];return i.a.createElement("div",null,i.a.createElement(o.a,{onClick:function(){return s(!0)}},t.label),n&&i.a.createElement(a.a,{onEsc:function(){return s(!1)},onClickOutside:function(){return s(!1)},animation:"fadeIn"},i.a.createElement("div",{className:u.a.ModalWrapper},t.children(n,s))))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1029),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:a.a.TrayHero},t.children)}},function(t,e,n){(function(e){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(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 r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}var i=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return t}();function o(t,e){return t>e?1:t<e?-1:0}function a(t,e,n){for(var r=new i(null,null),o=r,a=r;;){var s=n(t,e.key);if(s<0){if(null===e.left)break;if(n(t,e.left.key)<0){var u=e.left;if(e.left=u.right,u.right=e,null===(e=u).left)break}a.left=e,a=e,e=e.left}else{if(!(s>0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(u=e.right,e.right=u.left,u.left=e,null===(e=u).right))break;o.right=e,o=e,e=e.right}}return o.right=e.left,a.left=e.right,e.left=r.right,e.right=r.left,e}function s(t,e,n,r){var o=new i(t,e);if(null===n)return o.left=o.right=null,o;var s=r(t,(n=a(t,n,r)).key);return s<0?(o.left=n.left,o.right=n,n.left=null):s>=0&&(o.right=n.right,o.left=n,n.right=null),o}function u(t,e,n){var r=null,i=null;if(e){var o=n((e=a(t,e,n)).key,t);0===o?(r=e.left,i=e.right):o<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function l(t,e,n){return null===e?t:(null===t||((e=a(t.key,e,n)).left=t),e)}function c(t,e,n,r,i){if(t){r(e+(n?"\u2514\u2500\u2500 ":"\u251c\u2500\u2500 ")+i(t)+"\n");var o=e+(n?"    ":"\u2502   ");t.left&&c(t.left,o,!1,r,i),t.right&&c(t.right,o,!0,r,i)}}var f=function(){function t(t){void 0===t&&(t=o),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new i(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=a(t,this._root,r),s=r(t,o.key);return 0===s?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=a(t,e,n)).key)?(null===e.left?r=e.right:(r=a(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=a(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=a(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.left;else{if(o((a=i.pop()).key,e)>0)break;if(o(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return d(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,i=this._comparator;if(n&&y(t,e,0,r-1,i),null===this._root)this._root=h(t,e,0,r),this._size=r;else{var o=g(this.toList(),p(t,e),i);r=this._size+r,this._root=m({head:o},0,r)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return c(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var r=this._comparator,i=u(t,this._root,r),o=i.left,a=i.right;r(t,e)<0?a=s(e,n,a,r):o=s(e,n,o,r),this._root=l(o,a,r)},t.prototype.split=function(t){return u(t,this._root,this._comparator)},t}();function h(t,e,n,r){var o=r-n;if(o>0){var a=n+Math.floor(o/2),s=t[a],u=e[a],l=new i(s,u);return l.left=h(t,e,n,a),l.right=h(t,e,a+1,r),l}return null}function p(t,e){for(var n=new i(null,null),r=n,o=0;o<t.length;o++)r=r.next=new i(t[o],e[o]);return r.next=null,n.next}function d(t){for(var e=t,n=[],r=!1,o=new i(null,null),a=o;!r;)e?(n.push(e),e=e.left):n.length>0?e=(e=a=a.next=n.pop()).right:r=!0;return a.next=null,o.next}function m(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=m(t,e,i),a=t.head;return a.left=o,t.head=t.head.next,a.right=m(t,i+1,n),a}return null}function g(t,e,n){for(var r=new i(null,null),o=r,a=t,s=e;null!==a&&null!==s;)n(a.key,s.key)<0?(o.next=a,a=a.next):(o.next=s,s=s.next),o=o.next;return null!==a?o.next=a:null!==s&&(o.next=s),r.next}function y(t,e,n,r,i){if(!(n>=r)){for(var o=t[n+r>>1],a=n-1,s=r+1;;){do{a++}while(i(t[a],o)<0);do{s--}while(i(t[s],o)>0);if(a>=s)break;var u=t[a];t[a]=t[s],t[s]=u,u=e[a],e[a]=e[s],e[s]=u}y(t,e,n,s,i),y(t,e,s+1,r,i)}}var v=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},b=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}},_=Number.EPSILON;void 0===_&&(_=Math.pow(2,-52));var A=_*_,w=function(t,e){if(-_<t&&t<_&&-_<e&&e<_)return 0;var n=t-e;return n*n<A*t*e?0:t<e?-1:1},x=function(){function e(){t(this,e),this.reset()}return r(e,[{key:"reset",value:function(){this.xRounder=new E,this.yRounder=new E}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),e}(),E=function(){function e(){t(this,e),this.tree=new f,this.round(0)}return r(e,[{key:"round",value:function(t){var e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===w(e.key,n.key))return this.tree.remove(t),n.key;var r=this.tree.next(e);return null!==r&&0===w(e.key,r.key)?(this.tree.remove(t),r.key):t}}]),e}(),O=new x,S=function(t,e){return t.x*e.y-t.y*e.x},P=function(t,e){return t.x*e.x+t.y*e.y},C=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y},o=S(r,i);return w(o,0)},T=function(t){return Math.sqrt(P(t,t))},k=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return S(i,r)/T(i)/T(r)},I=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return P(i,r)/T(i)/T(r)},L=function(t,e,n){return 0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},j=function(t,e,n){return 0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},M=function(t,e,n,r){if(0===e.x)return j(n,r,t.x);if(0===r.x)return j(t,e,n.x);if(0===e.y)return L(n,r,t.y);if(0===r.y)return L(t,e,n.y);var i=S(e,r);if(0==i)return null;var o={x:n.x-t.x,y:n.y-t.y},a=S(o,e)/i,s=S(o,r)/i;return{x:(t.x+s*e.x+(n.x+a*r.x))/2,y:(t.y+s*e.y+(n.y+a*r.y))/2}},R=function(){function e(n,r){t(this,e),void 0===n.events?n.events=[this]:n.events.push(this),this.point=n,this.isLeft=r}return r(e,null,[{key:"compare",value:function(t,n){var r=e.comparePoints(t.point,n.point);return 0!==r?r:(t.point!==n.point&&t.link(n),t.isLeft!==n.isLeft?t.isLeft?1:-1:D.compare(t.segment,n.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),r(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n<r;n++){var i=e[n];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var r=e+1;r<t;r++){var i=this.point.events[r];void 0===i.consumedBy&&n.otherSE.point.events===i.otherSE.point.events&&n.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var r=this.point.events[e];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&t.push(r)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,n=new Map,r=function(r){var i=r.otherSE;n.set(r,{sine:k(e.point,t.point,i.point),cosine:I(e.point,t.point,i.point)})};return function(t,e){n.has(t)||r(t),n.has(e)||r(e);var i=n.get(t),o=i.sine,a=i.cosine,s=n.get(e),u=s.sine,l=s.cosine;return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}]),e}(),N=0,D=function(){function e(n,r,i,o){t(this,e),this.id=++N,this.leftSE=n,n.segment=this,n.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=n,this.rings=i,this.windings=o}return r(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(i<r)return-1;var a=t.leftSE.point.y,s=e.leftSE.point.y,u=t.rightSE.point.y,l=e.rightSE.point.y;if(n<r){if(s<a&&s<u)return 1;if(s>a&&s>u)return-1;var c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=e.comparePoint(t.rightSE.point);return 0!==f?f:-1}if(n>r){if(a<s&&a<l)return-1;if(a>s&&a>l)return 1;var h=e.comparePoint(t.leftSE.point);if(0!==h)return h;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(a<s)return-1;if(a>s)return 1;if(i<o){var d=e.comparePoint(t.rightSE.point);if(0!==d)return d}if(i>o){var m=t.comparePoint(e.rightSE.point);if(m<0)return 1;if(m>0)return-1}if(i!==o){var g=u-a,y=i-n,v=l-s,b=o-r;if(g>y&&v<b)return 1;if(g<y&&v>b)return-1}return i>o?1:i<o||u<l?-1:u>l?1:t.id<e.id?-1:t.id>e.id?1:0}}]),r(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;var i=(t.y-e.y)/r.y,o=e.x+i*r.x;if(t.x===o)return 0;var a=(t.x-e.x)/r.x,s=e.y+a*r.y;return t.y===s?0:t.y<s?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),n=t.bbox(),r=b(e,n);if(null===r)return null;var i=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,s=t.rightSE.point,u=v(e,a)&&0===this.comparePoint(a),l=v(n,i)&&0===t.comparePoint(i),c=v(e,s)&&0===this.comparePoint(s),f=v(n,o)&&0===t.comparePoint(o);if(l&&u)return f&&!c?o:!f&&c?s:null;if(l)return c&&i.x===s.x&&i.y===s.y?null:i;if(u)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&c)return null;if(f)return o;if(c)return s;var h=M(i,this.vector(),a,t.vector());return null===h?null:v(r,h)?O.round(h.x,h.y):null}},{key:"split",value:function(t){var n=[],r=void 0!==t.events,i=new R(t,!0),o=new R(t,!1),a=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(i);var s=new e(i,a,this.rings.slice(),this.windings.slice());return R.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),R.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}},{key:"consume",value:function(t){for(var n=this,r=t;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var i=e.compare(n,r);if(0!==i){if(i>0){var o=n;n=r,r=o}if(n.prev===r){var a=n;n=r,r=a}for(var s=0,u=r.rings.length;s<u;s++){var l=r.rings[s],c=r.windings[s],f=n.rings.indexOf(l);-1===f?(n.rings.push(l),n.windings.push(c)):n.windings[f]+=c}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var a=this.rings[i],s=this.windings[i],u=e.indexOf(a);-1===u?(e.push(a),n.push(s)):n[u]+=s}for(var l=[],c=[],f=0,h=e.length;f<h;f++)if(0!==n[f]){var p=e[f],d=p.poly;if(-1===c.indexOf(d))if(p.isExterior)l.push(d);else{-1===c.indexOf(d)&&c.push(d);var m=l.indexOf(p.poly);-1!==m&&l.splice(m,1)}}for(var g=0,y=l.length;g<y;g++){var v=l[g].multiPoly;-1===r.indexOf(v)&&r.push(v)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(X.type){case"union":var n=0===t.length,r=0===e.length;this._isInResult=n!==r;break;case"intersection":var i,o;t.length<e.length?(i=t.length,o=e.length):(i=e.length,o=t.length),this._isInResult=o===X.numMultiPolys&&i<o;break;case"xor":var a=Math.abs(t.length-e.length);this._isInResult=a%2===1;break;case"difference":var s=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=s(t)!==s(e);break;default:throw new Error("Unrecognized operation type found ".concat(X.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,n,r){var i,o,a,s=R.comparePoints(t,n);if(s<0)i=t,o=n,a=1;else{if(!(s>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=n,o=t,a=-1}return new e(new R(i,!0),new R(o,!1),[r],[a])}}]),e}(),F=function(){function e(n,r,i){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=i,this.segments=[],"number"!==typeof n[0][0]||"number"!==typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=O.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var a=o,s=1,u=n.length;s<u;s++){if("number"!==typeof n[s][0]||"number"!==typeof n[s][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=O.round(n[s][0],n[s][1]);l.x===a.x&&l.y===a.y||(this.segments.push(D.fromRing(a,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),a=l)}o.x===a.x&&o.y===a.y||this.segments.push(D.fromRing(a,o,this))}return r(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var r=this.segments[e];t.push(r.leftSE),t.push(r.rightSE)}return t}}]),e}(),B=function(){function e(n,r){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new F(n[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var i=1,o=n.length;i<o;i++){var a=new F(n[i],this,!1);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=r}return r(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var r=this.interiorRings[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),e}(),z=function(){function e(n,r){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"===typeof n[0][0][0]&&(n=[n])}catch(s){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,o=n.length;i<o;i++){var a=new B(n[i],this);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=r}return r(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var r=this.polys[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),e}(),U=function(){function e(n){t(this,e),this.events=n;for(var r=0,i=n.length;r<i;r++)n[r].segment.ringOut=this;this.poly=null}return r(e,null,[{key:"factory",value:function(t){for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];if(o.isInResult()&&!o.ringOut){for(var a=null,s=o.leftSE,u=o.rightSE,l=[s],c=s.point,f=[];a=s,s=u,l.push(s),s.point!==c;)for(;;){var h=s.getAvailableLinkedEvents();if(0===h.length){var p=l[0].point,d=l[l.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(p.x,",")+" ".concat(p.y,"]. Last matching segment found ends at")+" [".concat(d.x,", ").concat(d.y,"]."))}if(1===h.length){u=h[0].otherSE;break}for(var m=null,g=0,y=f.length;g<y;g++)if(f[g].point===s.point){m=g;break}if(null===m){f.push({index:l.length,point:s.point});var v=s.getLeftmostComparator(a);u=h.sort(v)[0].otherSE;break}var b=f.splice(m)[0],_=l.splice(b.index);_.unshift(_[0].otherSE),n.push(new e(_.reverse()))}n.push(new e(l))}}return n}}]),r(e,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],n=1,r=this.events.length-1;n<r;n++){var i=this.events[n].point,o=this.events[n+1].point;0!==C(i,t,o)&&(e.push(i),t=i)}if(1===e.length)return null;var a=e[0],s=e[1];0===C(a,t,s)&&e.shift(),e.push(e[0]);for(var u=this.isExteriorRing()?1:-1,l=this.isExteriorRing()?0:e.length-1,c=this.isExteriorRing()?e.length:-1,f=[],h=l;h!=c;h+=u)f.push([e[h].x,e[h].y]);return f}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var r=this.events[e];R.compare(t,r)>0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),e}(),G=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return r(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e<n;e++){var r=this.interiorRings[e].getGeom();null!==r&&t.push(r)}return t}}]),e}(),V=function(){function e(n){t(this,e),this.rings=n,this.polys=this._composePolys(n)}return r(e,[{key:"getGeom",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var r=this.polys[e].getGeom();null!==r&&t.push(r)}return t}},{key:"_composePolys",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(!i.poly)if(i.isExteriorRing())e.push(new G(i));else{var o=i.enclosingRing();o.poly||e.push(new G(o)),o.poly.addInterior(i)}}return e}}]),e}(),q=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D.compare;t(this,e),this.queue=n,this.tree=new f(r),this.segments=[]}return r(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,a=void 0,s=void 0;void 0===a;)null===(i=this.tree.prev(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);for(;void 0===s;)null===(o=this.tree.next(o))?s=null:void 0===o.key.consumedBy&&(s=o.key);if(t.isLeft){var u=null;if(a){var l=a.getIntersection(e);if(null!==l&&(e.isAnEndpoint(l)||(u=l),!a.isAnEndpoint(l)))for(var c=this._splitSafely(a,l),f=0,h=c.length;f<h;f++)n.push(c[f])}var p=null;if(s){var d=s.getIntersection(e);if(null!==d&&(e.isAnEndpoint(d)||(p=d),!s.isAnEndpoint(d)))for(var m=this._splitSafely(s,d),g=0,y=m.length;g<y;g++)n.push(m[g])}if(null!==u||null!==p){var v=null;v=null===u?p:null===p||R.comparePoints(u,p)<=0?u:p,this.queue.remove(e.rightSE),n.push(e.rightSE);for(var b=e.split(v),_=0,A=b.length;_<A;_++)n.push(b[_])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&s){var w=a.getIntersection(s);if(null!==w){if(!a.isAnEndpoint(w))for(var x=this._splitSafely(a,w),E=0,O=x.length;E<O;E++)n.push(x[E]);if(!s.isAnEndpoint(w))for(var S=this._splitSafely(s,w),P=0,C=S.length;P<C;P++)n.push(S[P])}}this.tree.remove(e)}return n}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.insert(t),r}}]),e}(),H="undefined"!==typeof e&&e.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,W="undefined"!==typeof e&&e.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,X=new(function(){function e(){t(this,e)}return r(e,[{key:"run",value:function(t,e,n){X.type=t,O.reset();for(var r=[new z(e,!0)],i=0,o=n.length;i<o;i++)r.push(new z(n[i],!1));if(X.numMultiPolys=r.length,"difference"===X.type)for(var a=r[0],s=1;s<r.length;)null!==b(r[s].bbox,a.bbox)?s++:r.splice(s,1);if("intersection"===X.type)for(var u=0,l=r.length;u<l;u++)for(var c=r[u],h=u+1,p=r.length;h<p;h++)if(null===b(c.bbox,r[h].bbox))return[];for(var d=new f(R.compare),m=0,g=r.length;m<g;m++)for(var y=r[m].getSweepEvents(),v=0,_=y.length;v<_;v++)if(d.insert(y[v]),d.size>H)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var A=new q(d),w=d.size,x=d.pop();x;){var E=x.key;if(d.size===w){var S=E.segment;throw new Error("Unable to pop() ".concat(E.isLeft?"left":"right"," SweepEvent ")+"[".concat(E.point.x,", ").concat(E.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>H)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(A.segments.length>W)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var P=A.process(E),C=0,T=P.length;C<T;C++){var k=P[C];void 0===k.consumedBy&&d.insert(k)}w=d.size,x=d.pop()}O.reset();var I=U.factory(A.segments);return new V(I).getGeom()}}]),e}()),Y=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return X.run("union",t,n)},Z=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return X.run("intersection",t,n)},K=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return X.run("xor",t,n)},$=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return X.run("difference",t,n)};return{union:Y,intersection:Z,xor:K,difference:$}}()}).call(this,n(68))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(183);var i=n(225);function o(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Object(i.a)(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.")}()}},function(t,e,n){"use strict";n.r(e);var r=n(14),i=n(0),o=n.n(i),a=n(17),s=n(7),u=n(325),l=n.n(u);e.default=Object(s.a)((function(){var t=Object(a.useStore)().parentContext.parent;if(!t)return null;var e=t.nextItem,n=t.previousItem,i=!!t.nextItem&&t.count>t.ordinalPosition,s=!!t.previousItem&&t.ordinalPosition>1;return o.a.createElement("div",{className:l.a.ParentBar},o.a.createElement("h3",{className:l.a.title},o.a.createElement(r.a,{to:t.path},t.name)),o.a.createElement("nav",null,o.a.createElement(r.a,{className:"".concat(l.a.prev," ").concat(s?"":l.a.isDisabled," "),to:s?n.path:"#",title:s?n.name:""},I18n.t("prev")),o.a.createElement("div",{className:l.a.count},o.a.createElement("span",{className:"currentItem"},t.ordinalPosition)," / ",o.a.createElement("span",{className:"totalItems"},t.count)),o.a.createElement(r.a,{className:"".concat(l.a.next," ").concat(i?"":l.a.isDisabled," "),to:i?e.path:"#",title:i?e.name:""},I18n.t("next"))))}))},function(t,e,n){"use strict";function r(){return r=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},r.apply(this,arguments)}n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s}));var i=function(t){return t&&"object"===typeof t&&!Array.isArray(t)},o=function(t){return Object.keys(t).forEach((function(e){return e&&i(t[e])&&Object.freeze(t[e])})),Object.freeze(t)},a=function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];if(!o.length)return e;var s=r({},e);return o.forEach((function(e){i(e)&&Object.keys(e).forEach((function(n){i(e[n])?s[n]?s[n]=t(s[n],e[n]):s[n]=r({},e[n]):s[n]=e[n]}))})),s},s=function(t){var e={};return Object.keys(t).forEach((function(n){void 0!==t[n]&&(e[n]=t[n])})),e}},function(t,e,n){"use strict";e.__esModule=!0,e.FormDown=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.FormDown=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"FormDown"},t),i.default.createElement("polyline",{fill:"none",stroke:"#000",strokeWidth:"2",points:"18 9 12 15 6 9"}))}},,,,function(t,e){},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(172);function i(t,e){return Object(r.a)(t>=0),Object(r.a)(e>0),t+(e-1)&~(e-1)}function o(t,e,n){var r;if(t instanceof ArrayBuffer)r=new Uint8Array(t);else{var o=t.byteOffset,a=t.byteLength;r=new Uint8Array(t.buffer||t.arrayBuffer,o,a)}return e.set(r,n),n+i(r.byteLength,4)}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(233);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var r=n(888),i=n(507);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(503),i=n(504);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r="3.2.12"},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1),i=n(27);class o{constructor(t){Object(r.a)(this,"index",void 0),Object(r.a)(this,"isVisible",void 0),Object(r.a)(this,"isSelected",void 0),Object(r.a)(this,"parent",void 0),Object(r.a)(this,"children",void 0),Object(r.a)(this,"content",void 0),Object(r.a)(this,"state",void 0),Object(r.a)(this,"layers",void 0),Object(r.a)(this,"id",void 0),Object(r.a)(this,"bbox",void 0),Object(r.a)(this,"zoom",void 0),Object(r.a)(this,"userData",void 0),Object(r.a)(this,"_abortController",void 0),Object(r.a)(this,"_loader",void 0),Object(r.a)(this,"_loaderId",void 0),Object(r.a)(this,"_isLoaded",void 0),Object(r.a)(this,"_isCancelled",void 0),Object(r.a)(this,"_needsReload",void 0),this.index=t,this.isVisible=!1,this.isSelected=!1,this.parent=null,this.children=[],this.content=null,this._loader=void 0,this._abortController=null,this._loaderId=0,this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1}get data(){return this.isLoading&&this._loader?this._loader.then((()=>this.data)):this.content}get isLoaded(){return this._isLoaded&&!this._needsReload}get isLoading(){return Boolean(this._loader)&&!this._isCancelled}get needsReload(){return this._needsReload||this._isCancelled}get byteLength(){const t=this.content?this.content.byteLength:0;return Number.isFinite(t)||i.a.error("byteLength not defined in tile data")(),t}async _loadData({getData:t,requestScheduler:e,onLoad:n,onError:r}){const{index:i,id:o,bbox:a,userData:s,zoom:u}=this,l=this._loaderId;this._abortController=new AbortController;const{signal:c}=this._abortController,f=await e.scheduleRequest(this,(t=>t.isSelected?1:-1));if(!f)return void(this._isCancelled=!0);if(this._isCancelled)return void f.done();let h,p=null;try{p=await t({index:i,id:o,bbox:a,userData:s,zoom:u,signal:c})}catch(d){h=d||!0}finally{f.done()}l===this._loaderId&&(this._loader=void 0,this.content=p,!this._isCancelled||p?(this._isLoaded=!0,this._isCancelled=!1,h?r(h,this):n(this)):this._isLoaded=!1)}loadData(t){return this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1,this._loaderId++,this._loader=this._loadData(t),this._loader}setNeedsReload(){this.isLoading&&(this.abort(),this._loader=void 0),this._needsReload=!0}abort(){var t;this.isLoaded||(this._isCancelled=!0,null===(t=this._abortController)||void 0===t||t.abort())}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return _}));var r=n(1),i=n(357),o=n(491),a=n(531),s=n(492),u=n(15),l=n(6),c=n(608),f=n(315),h=n(366),p=n(27),d=n(130),m=n(73),g=n(53);class y extends d.a{constructor(t){const{id:e=Object(m.c)("column-geometry")}=t,{indices:n,attributes:r}=function(t){const{radius:e,height:n=1,nradial:r=10}=t;let{vertices:i}=t;i&&(p.a.assert(i.length>=r),i=i.flatMap((t=>[t[0],t[1]])),Object(g.modifyPolygonWindingDirection)(i,g.WINDING.COUNTER_CLOCKWISE));const o=n>0,a=r+1,s=o?3*a+1:r,u=2*Math.PI/r,l=new Uint16Array(o?3*r*2:0),c=new Float32Array(3*s),f=new Float32Array(3*s);let h=0;if(o){for(let t=0;t<a;t++){const o=t*u,a=t%r,s=Math.sin(o),l=Math.cos(o);for(let t=0;t<2;t++)c[h+0]=i?i[2*a]:l*e,c[h+1]=i?i[2*a+1]:s*e,c[h+2]=(.5-t)*n,f[h+0]=i?i[2*a]:l,f[h+1]=i?i[2*a+1]:s,h+=3}c[h+0]=c[h-3],c[h+1]=c[h-2],c[h+2]=c[h-1],h+=3}for(let p=o?0:1;p<a;p++){const t=Math.floor(p/2)*Math.sign(.5-p%2),o=t*u,a=(t+r)%r,s=Math.sin(o),l=Math.cos(o);c[h+0]=i?i[2*a]:l*e,c[h+1]=i?i[2*a+1]:s*e,c[h+2]=n/2,f[h+2]=1,h+=3}if(o){let t=0;for(let e=0;e<r;e++)l[t++]=2*e+0,l[t++]=2*e+2,l[t++]=2*e+0,l[t++]=2*e+1,l[t++]=2*e+1,l[t++]=2*e+3}return{indices:l,attributes:{POSITION:{size:3,value:c},NORMAL:{size:3,value:f}}}}(t);super({...t,id:e,indices:n,attributes:r})}}const v=[0,0,0,255],b={diskResolution:{type:"number",min:4,value:20},vertices:null,radius:{type:"number",min:0,value:1e3},angle:{type:"number",value:0},offset:{type:"array",value:[0,0]},coverage:{type:"number",min:0,max:1,value:1},elevationScale:{type:"number",min:0,value:1},radiusUnits:"meters",lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,extruded:!0,wireframe:!1,filled:!0,stroked:!1,getPosition:{type:"accessor",value:t=>t.position},getFillColor:{type:"accessor",value:v},getLineColor:{type:"accessor",value:v},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0,getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class _ extends i.a{getShaders(){const{gl:t}=this.context,e=!Object(l.j)(t),n={},r=this.props.flatShading&&Object(c.b)(t,f.a.GLSL_DERIVATIVES);return r&&(n.FLAT_SHADING=1),super.getShaders({vs:"#version 300 es\n\n#define SHADER_NAME column-layer-vertex-shader\n\nin vec3 positions;\nin vec3 normals;\n\nin vec3 instancePositions;\nin float instanceElevations;\nin vec3 instancePositions64Low;\nin vec4 instanceFillColors;\nin vec4 instanceLineColors;\nin float instanceStrokeWidths;\n\nin vec3 instancePickingColors;\n\n// Custom uniforms\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform bool extruded;\nuniform bool stroked;\nuniform bool isStroke;\nuniform float coverage;\nuniform float elevationScale;\nuniform float edgeDistance;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int radiusUnits;\nuniform int widthUnits;\n\n// Result\nout vec4 vColor;\n#ifdef FLAT_SHADING\nout vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n\n  vec4 color = isStroke ? instanceLineColors : instanceFillColors;\n  // rotate primitive position and normal\n  mat2 rotationMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n\n  // calculate elevation, if 3d not enabled set to 0\n  // cylindar gemoetry height are between -1.0 to 1.0, transform it to between 0, 1\n  float elevation = 0.0;\n  // calculate stroke offset\n  float strokeOffsetRatio = 1.0;\n\n  if (extruded) {\n    elevation = instanceElevations * (positions.z + 1.0) / 2.0 * elevationScale;\n  } else if (stroked) {\n    float widthPixels = clamp(\n      project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n      widthMinPixels, widthMaxPixels) / 2.0;\n    float halfOffset = project_pixel_size(widthPixels) / project_size(edgeDistance * coverage * radius);\n    if (isStroke) {\n      strokeOffsetRatio -= sign(positions.z) * halfOffset;\n    } else {\n      strokeOffsetRatio -= halfOffset;\n    }\n  }\n\n  // if alpha == 0.0 or z < 0.0, do not render element\n  float shouldRender = float(color.a > 0.0 && instanceElevations >= 0.0);\n  float dotRadius = radius * coverage * shouldRender;\n\n  geometry.pickingColor = instancePickingColors;\n\n  // project center of column\n  vec3 centroidPosition = vec3(instancePositions.xy, instancePositions.z + elevation);\n  vec3 centroidPosition64Low = instancePositions64Low;\n  vec2 offset = (rotationMatrix * positions.xy * strokeOffsetRatio + offset) * dotRadius;\n  if (radiusUnits == UNIT_METERS) {\n    offset = project_size(offset);\n  }\n  vec3 pos = vec3(offset, 0.);\n  DECKGL_FILTER_SIZE(pos, geometry);\n\n  gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n  geometry.normal = project_normal(vec3(rotationMatrix * normals.xy, normals.z));\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  // Light calculations\n  if (extruded && !isStroke) {\n#ifdef FLAT_SHADING\n    position_commonspace = geometry.position;\n    vColor = vec4(color.rgb, color.a * opacity);\n#else\n    vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n    vColor = vec4(lightColor, color.a * opacity);\n#endif\n  } else {\n    vColor = vec4(color.rgb, color.a * opacity);\n  }\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME column-layer-fragment-shader\n\nprecision highp float;\n\nuniform vec3 project_uCameraPosition;\nuniform bool extruded;\nuniform bool isStroke;\n\nout vec4 fragColor;\n\nin vec4 vColor;\n#ifdef FLAT_SHADING\nin vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n  fragColor = vColor;\n#ifdef FLAT_SHADING\n  if (extruded && !isStroke && !picking_uActive) {\n    vec3 normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n    fragColor.rgb = lighting_getLightColor(vColor.rgb, project_uCameraPosition, position_commonspace.xyz, normal);\n  }\n#endif\n  DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",defines:n,transpileToGLSL100:e,modules:[o.a,r?a.b:a.a,s.a]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getFillColor",defaultValue:v},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:v},instanceStrokeWidths:{size:1,accessor:"getLineWidth",transition:!0}})}updateState(t){super.updateState(t);const{props:e,oldProps:n,changeFlags:r}=t,i=r.extensionsChanged||e.flatShading!==n.flatShading;if(i){var o;const{gl:t}=this.context;null===(o=this.state.model)||void 0===o||o.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}(i||e.diskResolution!==n.diskResolution||e.vertices!==n.vertices||(e.extruded||e.stroked)!==(n.extruded||n.stroked))&&this._updateGeometry(e)}getGeometry(t,e,n){const r=new y({radius:1,height:n?2:0,vertices:e,nradial:t});let i=0;if(e)for(let o=0;o<t;o++){const n=e[o];i+=Math.sqrt(n[0]*n[0]+n[1]*n[1])/t}else i=1;return this.setState({edgeDistance:Math.cos(Math.PI/t)*i}),r}_getModel(t){return new h.a(t,{...this.getShaders(),id:this.props.id,isInstanced:!0})}_updateGeometry({diskResolution:t,vertices:e,extruded:n,stroked:r}){const i=this.getGeometry(t,e,n||r);this.setState({fillVertexCount:i.attributes.POSITION.value.length/3,wireframeVertexCount:i.indices.value.length}),this.state.model.setProps({geometry:i})}draw({uniforms:t}){const{lineWidthUnits:e,lineWidthScale:n,lineWidthMinPixels:r,lineWidthMaxPixels:i,radiusUnits:o,elevationScale:a,extruded:s,filled:l,stroked:c,wireframe:f,offset:h,coverage:p,radius:d,angle:m}=this.props,{model:g,fillVertexCount:y,wireframeVertexCount:v,edgeDistance:b}=this.state;g.setUniforms(t).setUniforms({radius:d,angle:m/180*Math.PI,offset:h,extruded:s,stroked:c,coverage:p,elevationScale:a,edgeDistance:b,radiusUnits:u.e[o],widthUnits:u.e[e],widthScale:n,widthMinPixels:r,widthMaxPixels:i}),s&&f&&(g.setProps({isIndexed:!0}),g.setVertexCount(v).setDrawMode(1).setUniforms({isStroke:!0}).draw()),l&&(g.setProps({isIndexed:!1}),g.setVertexCount(y).setDrawMode(5).setUniforms({isStroke:!1}).draw()),!s&&c&&(g.setProps({isIndexed:!1}),g.setVertexCount(2*y/3).setDrawMode(5).setUniforms({isStroke:!0}).draw())}}Object(r.a)(_,"layerName","ColumnLayer"),Object(r.a)(_,"defaultProps",b)},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(1),i=n(357),o=n(491),a=n(492),s=n(15),u=n(366),l=n(130);const c={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,padding:{type:"array",value:[0,0,0,0]},getPosition:{type:"accessor",value:t=>t.position},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},getBoundingRect:{type:"accessor",value:[0,0,0,0]},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:[0,0,0,255]},getLineWidth:{type:"accessor",value:1}};class f extends i.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME text-background-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec4 instanceRects;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec2 instancePixelOffsets;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform bool billboard;\nuniform float opacity;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform vec4 padding;\nuniform int sizeUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n  float angle_radian = radians(angle);\n  float cos_angle = cos(angle_radian);\n  float sin_angle = sin(angle_radian);\n  mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n  return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  geometry.uv = positions;\n  geometry.pickingColor = instancePickingColors;\n  uv = positions;\n  vLineWidth = instanceLineWidths;\n\n  // convert size in meters to pixels, then scaled and clamp\n\n  // project meters to pixels and clamp to limits\n  float sizePixels = clamp(\n    project_size_to_pixel(instanceSizes * sizeScale, sizeUnits),\n    sizeMinPixels, sizeMaxPixels\n  );\n\n  dimensions = instanceRects.zw * sizePixels + padding.xy + padding.zw;\n\n  vec2 pixelOffset = (positions * instanceRects.zw + instanceRects.xy) * sizePixels + mix(-padding.xy, padding.zw, positions);\n  pixelOffset = rotate_by_angle(pixelOffset, instanceAngles);\n  pixelOffset += instancePixelOffsets;\n  pixelOffset.y *= -1.0;\n\n  if (billboard)  {\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n    vec3 offset = vec3(pixelOffset, 0.0);\n    DECKGL_FILTER_SIZE(offset, geometry);\n    gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n  } else {\n    vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n    DECKGL_FILTER_SIZE(offset_common, geometry);\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position);\n  }\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  // Apply opacity to instance color, or return instance picking color\n  vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n  DECKGL_FILTER_COLOR(vFillColor, geometry);\n  vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n  DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME text-background-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool stroked;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvoid main(void) {\n  geometry.uv = uv;\n\n  vec2 pixelPosition = uv * dimensions;\n  if (stroked) {\n    float distToEdge = min(\n      min(pixelPosition.x, dimensions.x - pixelPosition.x),\n      min(pixelPosition.y, dimensions.y - pixelPosition.y)\n    );\n    float isBorder = smoothedge(distToEdge, vLineWidth);\n    gl_FragColor = mix(vFillColor, vLineColor, isBorder);\n  } else {\n    gl_FragColor = vFillColor;\n  }\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instanceRects:{size:4,accessor:"getBoundingRect"},instancePixelOffsets:{size:2,transition:!0,accessor:"getPixelOffset"},instanceFillColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(t){super.updateState(t);const{changeFlags:e}=t;if(e.extensionsChanged){var n;const{gl:t}=this.context;null===(n=this.state.model)||void 0===n||n.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}){const{billboard:e,sizeScale:n,sizeUnits:r,sizeMinPixels:i,sizeMaxPixels:o,getLineWidth:a}=this.props;let{padding:u}=this.props;u.length<4&&(u=[u[0],u[1],u[0],u[1]]),this.state.model.setUniforms(t).setUniforms({billboard:e,stroked:Boolean(a),padding:u,sizeUnits:s.e[r],sizeScale:n,sizeMinPixels:i,sizeMaxPixels:o}).draw()}_getModel(t){return new u.a(t,{...this.getShaders(),id:this.props.id,geometry:new l.a({drawMode:6,vertexCount:4,attributes:{positions:{size:2,value:new Float32Array([0,0,1,0,1,1,0,1])}}}),isInstanced:!0})}}Object(r.a)(f,"defaultProps",c),Object(r.a)(f,"layerName","TextBackgroundLayer")},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1),i=n(27),o=n(146);const a=[];class s extends o.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(){return{...super.getShaders(),fs:"#define SHADER_NAME multi-icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float gamma;\nuniform bool sdf;\nuniform float alphaCutoff;\nuniform float buffer;\nuniform float outlineBuffer;\nuniform vec4 outlineColor;\n\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n  geometry.uv = uv;\n\n  if (!picking_uActive) {\n    float alpha = texture2D(iconsTexture, vTextureCoords).a;\n    vec4 color = vColor;\n\n    // if enable sdf (signed distance fields)\n    if (sdf) {\n      float distance = alpha;\n      alpha = smoothstep(buffer - gamma, buffer + gamma, distance);\n\n      if (outlineBuffer > 0.0) {\n        float inFill = alpha;\n        float inBorder = smoothstep(outlineBuffer - gamma, outlineBuffer + gamma, distance);\n        color = mix(outlineColor, vColor, inFill);\n        alpha = inBorder;\n      }\n    }\n\n    // Take the global opacity and the alpha from color into account for the alpha component\n    float a = alpha * color.a;\n    \n    if (a < alphaCutoff) {\n      discard;\n    }\n\n    gl_FragColor = vec4(color.rgb, a * opacity);\n  }\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"}}initializeState(){super.initializeState();this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:(t,{index:e,target:n})=>this.encodePickingColor(e,n)}})}updateState(t){super.updateState(t);const{props:e,oldProps:n}=t;let{outlineColor:r}=e;r!==n.outlineColor&&(r=r.map((t=>t/255)),r[3]=Number.isFinite(r[3])?r[3]:1,this.setState({outlineColor:r})),!e.sdf&&e.outlineWidth&&i.a.warn("".concat(this.id,": fontSettings.sdf is required to render outline"))()}draw(t){const{sdf:e,smoothing:n,outlineWidth:r}=this.props,{outlineColor:i}=this.state;t.uniforms={...t.uniforms,buffer:.75,outlineBuffer:r?Math.max(n,.75*(1-r)):-1,gamma:n,sdf:Boolean(e),outlineColor:i},super.draw(t)}getInstanceOffset(t){return t?Array.from(t).flatMap((t=>super.getInstanceOffset(t))):a}getInstanceColorMode(t){return 1}getInstanceIconFrame(t){return t?Array.from(t).flatMap((t=>super.getInstanceIconFrame(t))):a}}Object(r.a)(s,"defaultProps",{getIconOffsets:{type:"accessor",value:t=>t.offsets},alphaCutoff:.001,smoothing:.1,outlineWidth:0,outlineColor:{type:"color",value:[0,0,0,255]}}),Object(r.a)(s,"layerName","MultiIconLayer")},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1),i=n(121),o=n(115),a=n(216);class s extends i.a{get ViewportType(){return o.a}get ControllerType(){return a.b}}Object(r.a)(s,"displayName","MapView")},function(t,e,n){"use strict";(function(t){function r(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 i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t){return o="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},o(t)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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},s.apply(this,arguments)}function u(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}n.d(e,"a",(function(){return Bt}));function l(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var c=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),f=l(/Edge/i),h=l(/firefox/i),p=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),d=l(/iP(ad|od|hone)/i),m=l(/chrome/i)&&l(/android/i),g={capture:!1,passive:!1};function y(t,e,n){t.addEventListener(e,n,!c&&g)}function v(t,e,n){t.removeEventListener(e,n,!c&&g)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function A(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||r&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var w,x=/\s+/g;function E(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(x," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(x," ")}}function O(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function S(t,e){var n="";if("string"===typeof t)n=t;else do{var r=O(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function P(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function C(){var t=document.scrollingElement;return t||document.documentElement}function T(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,s,u,l,f,h;if(t!==window&&t.parentNode&&t!==C()?(a=(o=t.getBoundingClientRect()).top,s=o.left,u=o.bottom,l=o.right,f=o.height,h=o.width):(a=0,s=0,u=window.innerHeight,l=window.innerWidth,f=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!c))do{if(i&&i.getBoundingClientRect&&("none"!==O(i,"transform")||n&&"static"!==O(i,"position"))){var p=i.getBoundingClientRect();a-=p.top+parseInt(O(i,"border-top-width")),s-=p.left+parseInt(O(i,"border-left-width")),u=a+o.height,l=s+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var d=S(i||t),m=d&&d.a,g=d&&d.d;d&&(u=(a/=g)+(f/=g),l=(s/=m)+(h/=m))}return{top:a,left:s,bottom:u,right:l,width:h,height:f}}}function k(t,e,n){for(var r=R(t,!0),i=T(t)[e];r;){var o=T(r)[n];if(!("top"===n||"left"===n?i>=o:i<=o))return r;if(r===C())break;r=R(r,!1)}return!1}function I(t,e,n,r){for(var i=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Bt.ghost&&(r||a[o]!==Bt.dragged)&&A(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function L(t,e){for(var n=t.lastElementChild;n&&(n===Bt.ghost||"none"===O(n,"display")||e&&!b(n,e));)n=n.previousElementSibling;return n||null}function j(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Bt.clone||e&&!b(t,e)||n++;return n}function M(t){var e=0,n=0,r=C();if(t)do{var i=S(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function R(t,e){if(!t||!t.getBoundingClientRect)return C();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=O(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return C();if(r||e)return n;r=!0}}}while(n=n.parentNode);return C()}function N(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function D(t,e){return function(){if(!w){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),w=setTimeout((function(){w=void 0}),e)}}}function F(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function B(e){var n=window.Polymer,r=t||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}var z="Sortable"+(new Date).getTime();function U(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==O(t,"display")&&t!==Bt.ghost){e.push({target:t,rect:T(t)});var n=i({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=S(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=T(n),u=n.prevFromRect,l=n.prevToRect,c=t.rect,f=S(n,!0);f&&(s.top-=f.f,s.left-=f.e),n.toRect=s,n.thisAnimationDuration&&N(u,s)&&!N(a,s)&&(c.top-s.top)/(c.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(e=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(c,u,l,r.options)),N(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=r.options.animation),r.animate(n,c,s,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"===typeof n&&n()}),o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){O(t,"transition",""),O(t,"transform","");var i=S(this.el),o=i&&i.a,a=i&&i.d,s=(e.left-n.left)/(o||1),u=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!u,O(t,"transform","translate3d("+s+"px,"+u+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),O(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),O(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){O(t,"transition",""),O(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}var G=[],V={initializeByDefault:!0},q={mount:function(t){for(var e in V)V.hasOwnProperty(e)&&!(e in t)&&(t[e]=V[e]);G.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),G.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";G.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](i({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](i({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in G.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,s(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return G.forEach((function(r){"function"===typeof r.eventProperties&&s(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return G.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};function H(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,a=t.cloneEl,s=t.toEl,u=t.fromEl,l=t.oldIndex,h=t.newIndex,p=t.oldDraggableIndex,d=t.newDraggableIndex,m=t.originalEvent,g=t.putSortable,y=t.extraEventProperties;if(e=e||n&&n[z]){var v,b=e.options,_="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||c||f?(v=document.createEvent("Event")).initEvent(r,!0,!0):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=s||n,v.from=u||n,v.item=o||n,v.clone=a,v.oldIndex=l,v.newIndex=h,v.oldDraggableIndex=p,v.newDraggableIndex=d,v.originalEvent=m,v.pullMode=g?g.lastPutMode:void 0;var A=i(i({},y),q.getEventProperties(r,e));for(var w in A)v[w]=A[w];n&&n.dispatchEvent(v),b[_]&&b[_].call(e,v)}}var W=["evt"],X=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=u(n,W);q.pluginEvent.bind(Bt)(t,e,i({dragEl:Z,parentEl:K,ghostEl:$,rootEl:J,nextEl:Q,lastDownEl:tt,cloneEl:et,cloneHidden:nt,dragStarted:mt,putSortable:ut,activeSortable:Bt.active,originalEvent:r,oldIndex:rt,oldDraggableIndex:ot,newIndex:it,newDraggableIndex:at,hideGhostForTarget:Rt,unhideGhostForTarget:Nt,cloneNowHidden:function(){nt=!0},cloneNowShown:function(){nt=!1},dispatchSortableEvent:function(t){Y({sortable:e,name:t,originalEvent:r})}},o))};function Y(t){H(i({putSortable:ut,cloneEl:et,targetEl:Z,rootEl:J,oldIndex:rt,oldDraggableIndex:ot,newIndex:it,newDraggableIndex:at},t))}var Z,K,$,J,Q,tt,et,nt,rt,it,ot,at,st,ut,lt,ct,ft,ht,pt,dt,mt,gt,yt,vt,bt,_t=!1,At=!1,wt=[],xt=!1,Et=!1,Ot=[],St=!1,Pt=[],Ct="undefined"!==typeof document,Tt=d,kt=f||c?"cssFloat":"float",It=Ct&&!m&&!d&&"draggable"in document.createElement("div"),Lt=function(){if(Ct){if(c)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),jt=function(t,e){var n=O(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=I(t,0,e),o=I(t,1,e),a=i&&O(i),s=o&&O(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=r&&"none"===n[kt]||o&&"none"===n[kt]&&u+l>r)?"vertical":"horizontal"},Mt=function(t){function e(t,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var u=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===u||t.join&&t.indexOf(u)>-1}}var n={},r=t.group;r&&"object"==o(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Rt=function(){!Lt&&$&&O($,"display","none")},Nt=function(){!Lt&&$&&O($,"display","")};Ct&&!m&&document.addEventListener("click",(function(t){if(At)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),At=!1,!1}),!0);var Dt=function(t){if(Z){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,o=t.clientY,wt.some((function(t){var e=t[z].options.emptyInsertThreshold;if(e&&!L(t)){var n=T(t),r=i>=n.left-e&&i<=n.right+e,s=o>=n.top-e&&o<=n.bottom+e;return r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[z]._onDragOver(n)}}var i,o,a},Ft=function(t){Z&&Z.parentNode[z]._isOutsideThisEl(t.target)};function Bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=s({},e),t[z]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return jt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bt.supportPointer&&"PointerEvent"in window&&!p,emptyInsertThreshold:5};for(var r in q.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Mt(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&It,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?y(t,"pointerdown",this._onTapStart):(y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),wt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),s(this,U())}function zt(t,e,n,r,i,o,a,s){var u,l,h=t[z],p=h.options.onMove;return!window.CustomEvent||c||f?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=r,u.related=i||e,u.relatedRect=o||T(e),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),p&&(l=p.call(h,u,a)),l}function Ut(t){t.draggable=!1}function Gt(){St=!1}function Vt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function qt(t){return setTimeout(t,0)}function Ht(t){return clearTimeout(t)}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,Z):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=r.filter;if(function(t){Pt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Pt.push(r)}}(n),!Z&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&(!(s=A(s,r.draggable,n,!1))||!s.animated)&&tt!==s){if(rt=j(s),ot=j(s,r.draggable),"function"===typeof l){if(l.call(this,t,s,this))return Y({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),X("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=A(u,r.trim(),n,!1))return Y({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),X("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());r.handle&&!A(u,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!Z&&n.parentNode===o){var u=T(n);if(J=o,K=(Z=n).parentNode,Q=Z.nextSibling,tt=n,st=a.group,Bt.dragged=Z,lt={target:Z,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=lt.clientX-u.left,dt=lt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Z.style["will-change"]="all",r=function(){X("delayEnded",i,{evt:t}),Bt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(Z.draggable=!0),i._triggerDragStart(t,e),Y({sortable:i,name:"choose",originalEvent:t}),E(Z,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){P(Z,t.trim(),Ut)})),y(s,"dragover",Dt),y(s,"mousemove",Dt),y(s,"touchmove",Dt),y(s,"mouseup",i._onDrop),y(s,"touchend",i._onDrop),y(s,"touchcancel",i._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),X("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(f||c))r();else{if(Bt.eventCanceled)return void this._onDrop();y(s,"mouseup",i._disableDelayedDrag),y(s,"touchend",i._disableDelayedDrag),y(s,"touchcancel",i._disableDelayedDrag),y(s,"mousemove",i._delayedDragTouchMoveHandler),y(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&y(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Ut(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;v(t,"mouseup",this._disableDelayedDrag),v(t,"touchend",this._disableDelayedDrag),v(t,"touchcancel",this._disableDelayedDrag),v(t,"mousemove",this._delayedDragTouchMoveHandler),v(t,"touchmove",this._delayedDragTouchMoveHandler),v(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?y(document,"pointermove",this._onTouchMove):y(document,e?"touchmove":"mousemove",this._onTouchMove):(y(Z,"dragend",this),y(J,"dragstart",this._onDragStart));try{document.selection?qt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(_t=!1,J&&Z){X("dragStarted",this,{evt:e}),this.nativeDraggable&&y(document,"dragover",Ft);var n=this.options;!t&&E(Z,n.dragClass,!1),E(Z,n.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),Y({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ct){this._lastX=ct.clientX,this._lastY=ct.clientY,Rt();for(var t=document.elementFromPoint(ct.clientX,ct.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ct.clientX,ct.clientY))!==e;)e=t;if(Z.parentNode[z]._isOutsideThisEl(t),e)do{if(e[z]){if(e[z]._onDragOver({clientX:ct.clientX,clientY:ct.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Nt()}},_onTouchMove:function(t){if(lt){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=$&&S($,!0),a=$&&o&&o.a,s=$&&o&&o.d,u=Tt&&bt&&M(bt),l=(i.clientX-lt.clientX+r.x)/(a||1)+(u?u[0]-Ot[0]:0)/(a||1),c=(i.clientY-lt.clientY+r.y)/(s||1)+(u?u[1]-Ot[1]:0)/(s||1);if(!Bt.active&&!_t){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if($){o?(o.e+=l-(ft||0),o.f+=c-(ht||0)):o={a:1,b:0,c:0,d:1,e:l,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");O($,"webkitTransform",f),O($,"mozTransform",f),O($,"msTransform",f),O($,"transform",f),ft=l,ht=c,ct=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!$){var t=this.options.fallbackOnBody?document.body:J,e=T(Z,!0,Tt,!0,t),n=this.options;if(Tt){for(bt=t;"static"===O(bt,"position")&&"none"===O(bt,"transform")&&bt!==document;)bt=bt.parentNode;bt!==document.body&&bt!==document.documentElement?(bt===document&&(bt=C()),e.top+=bt.scrollTop,e.left+=bt.scrollLeft):bt=C(),Ot=M(bt)}E($=Z.cloneNode(!0),n.ghostClass,!1),E($,n.fallbackClass,!0),E($,n.dragClass,!0),O($,"transition",""),O($,"transform",""),O($,"box-sizing","border-box"),O($,"margin",0),O($,"top",e.top),O($,"left",e.left),O($,"width",e.width),O($,"height",e.height),O($,"opacity","0.8"),O($,"position",Tt?"absolute":"fixed"),O($,"zIndex","100000"),O($,"pointerEvents","none"),Bt.ghost=$,t.appendChild($),O($,"transform-origin",pt/parseInt($.style.width)*100+"% "+dt/parseInt($.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;X("dragStart",this,{evt:t}),Bt.eventCanceled?this._onDrop():(X("setupClone",this),Bt.eventCanceled||((et=B(Z)).removeAttribute("id"),et.draggable=!1,et.style["will-change"]="",this._hideClone(),E(et,this.options.chosenClass,!1),Bt.clone=et),n.cloneId=qt((function(){X("clone",n),Bt.eventCanceled||(n.options.removeCloneOnHide||J.insertBefore(et,Z),n._hideClone(),Y({sortable:n,name:"clone"}))})),!e&&E(Z,i.dragClass,!0),e?(At=!0,n._loopId=setInterval(n._emulateDragOver,50)):(v(document,"mouseup",n._onDrop),v(document,"touchend",n._onDrop),v(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,Z)),y(document,"drop",n),O(Z,"transform","translateZ(0)")),_t=!0,n._dragStartId=qt(n._dragStarted.bind(n,e,t)),y(document,"selectstart",n),mt=!0,p&&O(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,a=this.el,s=t.target,u=this.options,l=u.group,c=Bt.active,f=st===l,h=u.sort,p=ut||c,d=this,m=!1;if(!St){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=A(s,u.draggable,a,!0),B("dragOver"),Bt.eventCanceled)return m;if(Z.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||d._ignoreWhileAnimating===s)return G(!1);if(At=!1,c&&!u.disabled&&(f?h||(r=K!==J):ut===this||(this.lastPutMode=st.checkPull(this,c,Z,t))&&l.checkPut(this,c,Z,t))){if(o="vertical"===this._getDirection(t,s),e=T(Z),B("dragOverValid"),Bt.eventCanceled)return m;if(r)return K=J,U(),this._hideClone(),B("revert"),Bt.eventCanceled||(Q?J.insertBefore(Z,Q):J.appendChild(Z)),G(!0);var g=L(a,u.draggable);if(!g||function(t,e,n){var r=T(L(n.el,n.options.draggable)),i=10;return e?t.clientX>r.right+i||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+i}(t,o,this)&&!g.animated){if(g===Z)return G(!1);if(g&&a===t.target&&(s=g),s&&(n=T(s)),!1!==zt(J,a,Z,e,s,n,t,!!s))return U(),g&&g.nextSibling?a.insertBefore(Z,g.nextSibling):a.appendChild(Z),K=a,V(),G(!0)}else if(g&&function(t,e,n){var r=T(I(n.el,0,n.options,!0)),i=10;return e?t.clientX<r.left-i||t.clientY<r.top&&t.clientX<r.right:t.clientY<r.top-i||t.clientY<r.bottom&&t.clientX<r.left}(t,o,this)){var y=I(a,0,u,!0);if(y===Z)return G(!1);if(n=T(s=y),!1!==zt(J,a,Z,e,s,n,t,!1))return U(),a.insertBefore(Z,y),K=a,V(),G(!0)}else if(s.parentNode===a){n=T(s);var v,b,_,w=Z.parentNode!==a,x=!function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,u=n?e.width:e.height;return r===a||i===s||r+o/2===a+u/2}(Z.animated&&Z.toRect||e,s.animated&&s.toRect||n,o),S=o?"top":"left",P=k(s,"top","top")||k(Z,"top","top"),C=P?P.scrollTop:void 0;if(gt!==s&&(b=n[S],xt=!1,Et=!x&&u.invertSwap||w),v=function(t,e,n,r,i,o,a,s){var u=r?t.clientY:t.clientX,l=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,h=!1;if(!a)if(s&&vt<l*i){if(!xt&&(1===yt?u>c+l*o/2:u<f-l*o/2)&&(xt=!0),xt)h=!0;else if(1===yt?u<c+vt:u>f-vt)return-yt}else if(u>c+l*(1-i)/2&&u<f-l*(1-i)/2)return function(t){return j(Z)<j(t)?1:-1}(e);if((h=h||a)&&(u<c+l*o/2||u>f-l*o/2))return u>c+l/2?1:-1;return 0}(t,s,n,o,x?1:u.swapThreshold,null==u.invertedSwapThreshold?u.swapThreshold:u.invertedSwapThreshold,Et,gt===s),0!==v){var M=j(Z);do{M-=v,_=K.children[M]}while(_&&("none"===O(_,"display")||_===$))}if(0===v||_===s)return G(!1);gt=s,yt=v;var R=s.nextElementSibling,N=!1,D=zt(J,a,Z,e,s,n,t,N=1===v);if(!1!==D)return 1!==D&&-1!==D||(N=1===D),St=!0,setTimeout(Gt,30),U(),N&&!R?a.appendChild(Z):s.parentNode.insertBefore(Z,N?R:s),P&&F(P,0,C-P.scrollTop),K=Z.parentNode,void 0===b||Et||(vt=Math.abs(b-T(s)[S])),V(),G(!0)}if(a.contains(Z))return G(!1)}return!1}function B(u,l){X(u,d,i({evt:t,isOwner:f,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:h,fromSortable:p,target:s,completed:G,onMove:function(n,r){return zt(J,a,Z,e,n,T(n),t,r)},changed:V},l))}function U(){B("dragOverAnimationCapture"),d.captureAnimationState(),d!==p&&p.captureAnimationState()}function G(e){return B("dragOverCompleted",{insertion:e}),e&&(f?c._hideClone():c._showClone(d),d!==p&&(E(Z,ut?ut.options.ghostClass:c.options.ghostClass,!1),E(Z,u.ghostClass,!0)),ut!==d&&d!==Bt.active?ut=d:d===Bt.active&&ut&&(ut=null),p===d&&(d._ignoreWhileAnimating=s),d.animateAll((function(){B("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(s===Z&&!Z.animated||s===a&&!s.animated)&&(gt=null),u.dragoverBubble||t.rootEl||s===document||(Z.parentNode[z]._isOutsideThisEl(t.target),!e&&Dt(t)),!u.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function V(){it=j(Z),at=j(Z,u.draggable),Y({sortable:d,name:"change",toEl:a,newIndex:it,newDraggableIndex:at,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",Dt),v(document,"mousemove",Dt),v(document,"touchmove",Dt)},_offUpEvents:function(){var t=this.el.ownerDocument;v(t,"mouseup",this._onDrop),v(t,"touchend",this._onDrop),v(t,"pointerup",this._onDrop),v(t,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;it=j(Z),at=j(Z,n.draggable),X("drop",this,{evt:t}),K=Z&&Z.parentNode,it=j(Z),at=j(Z,n.draggable),Bt.eventCanceled||(_t=!1,Et=!1,xt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ht(this.cloneId),Ht(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&O(document.body,"user-select",""),O(Z,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),$&&$.parentNode&&$.parentNode.removeChild($),(J===K||ut&&"clone"!==ut.lastPutMode)&&et&&et.parentNode&&et.parentNode.removeChild(et),Z&&(this.nativeDraggable&&v(Z,"dragend",this),Ut(Z),Z.style["will-change"]="",mt&&!_t&&E(Z,ut?ut.options.ghostClass:this.options.ghostClass,!1),E(Z,this.options.chosenClass,!1),Y({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:t}),J!==K?(it>=0&&(Y({rootEl:K,name:"add",toEl:K,fromEl:J,originalEvent:t}),Y({sortable:this,name:"remove",toEl:K,originalEvent:t}),Y({rootEl:K,name:"sort",toEl:K,fromEl:J,originalEvent:t}),Y({sortable:this,name:"sort",toEl:K,originalEvent:t})),ut&&ut.save()):it!==rt&&it>=0&&(Y({sortable:this,name:"update",toEl:K,originalEvent:t}),Y({sortable:this,name:"sort",toEl:K,originalEvent:t})),Bt.active&&(null!=it&&-1!==it||(it=rt,at=ot),Y({sortable:this,name:"end",toEl:K,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){X("nulling",this),J=Z=K=$=Q=et=tt=nt=lt=ct=mt=it=at=rt=ot=gt=yt=ut=st=Bt.dragged=Bt.ghost=Bt.clone=Bt.active=null,Pt.forEach((function(t){t.checked=!0})),Pt.length=ft=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)A(t=n[r],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Vt(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];A(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return A(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=q.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Mt(n)},destroy:function(){X("destroy",this);var t=this.el;t[z]=null,v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart),v(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),wt.splice(wt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!nt){if(X("hideClone",this),Bt.eventCanceled)return;O(et,"display","none"),this.options.removeCloneOnHide&&et.parentNode&&et.parentNode.removeChild(et),nt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(nt){if(X("showClone",this),Bt.eventCanceled)return;Z.parentNode!=J||this.options.group.revertClone?Q?J.insertBefore(et,Q):J.appendChild(et):J.insertBefore(et,Z),this.options.group.revertClone&&this.animate(Z,et),O(et,"display",""),nt=!1}}else this._hideClone()}},Ct&&y(document,"touchmove",(function(t){(Bt.active||_t)&&t.cancelable&&t.preventDefault()})),Bt.utils={on:y,off:v,css:O,find:P,is:function(t,e){return!!A(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:D,closest:A,toggleClass:E,clone:B,index:j,nextTick:qt,cancelNextTick:Ht,detectDirection:jt,getChild:I},Bt.get=function(t){return t[z]},Bt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Bt.utils=i(i({},Bt.utils),t.utils)),q.mount(t)}))},Bt.create=function(t,e){return new Bt(t,e)},Bt.version="1.15.0";var Wt,Xt,Yt,Zt,Kt,$t,Jt=[],Qt=!1;function te(){Jt.forEach((function(t){clearInterval(t.pid)})),Jt=[]}function ee(){clearInterval($t)}var ne=D((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,u=e.scrollSpeed,l=C(),c=!1;Xt!==n&&(Xt=n,te(),Wt=e.scroll,i=e.scrollFn,!0===Wt&&(Wt=R(n,!0)));var f=0,h=Wt;do{var p=h,d=T(p),m=d.top,g=d.bottom,y=d.left,v=d.right,b=d.width,_=d.height,A=void 0,w=void 0,x=p.scrollWidth,E=p.scrollHeight,S=O(p),P=p.scrollLeft,k=p.scrollTop;p===l?(A=b<x&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),w=_<E&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(A=b<x&&("auto"===S.overflowX||"scroll"===S.overflowX),w=_<E&&("auto"===S.overflowY||"scroll"===S.overflowY));var I=A&&(Math.abs(v-o)<=s&&P+b<x)-(Math.abs(y-o)<=s&&!!P),L=w&&(Math.abs(g-a)<=s&&k+_<E)-(Math.abs(m-a)<=s&&!!k);if(!Jt[f])for(var j=0;j<=f;j++)Jt[j]||(Jt[j]={});Jt[f].vx==I&&Jt[f].vy==L&&Jt[f].el===p||(Jt[f].el=p,Jt[f].vx=I,Jt[f].vy=L,clearInterval(Jt[f].pid),0==I&&0==L||(c=!0,Jt[f].pid=setInterval(function(){r&&0===this.layer&&Bt.active._onTouchMove(Kt);var e=Jt[this.layer].vy?Jt[this.layer].vy*u:0,n=Jt[this.layer].vx?Jt[this.layer].vx*u:0;"function"===typeof i&&"continue"!==i.call(Bt.dragged.parentNode[z],n,e,t,Kt,Jt[this.layer].el)||F(Jt[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==l&&(h=R(h,!1)));Qt=c}}),30),re=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var u=n||i;a();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(l.clientX,l.clientY);s(),u&&!u.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function ie(){}function oe(){}ie.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=I(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:re},s(ie,{pluginName:"revertOnSpill"}),oe.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:re},s(oe,{pluginName:"removeOnSpill"});Bt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):this.options.supportPointer?y(document,"pointermove",this._handleFallbackAutoScroll):e.touches?y(document,"touchmove",this._handleFallbackAutoScroll):y(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):(v(document,"pointermove",this._handleFallbackAutoScroll),v(document,"touchmove",this._handleFallbackAutoScroll),v(document,"mousemove",this._handleFallbackAutoScroll)),ee(),te(),clearTimeout(w),w=void 0},nulling:function(){Kt=Xt=Wt=Qt=$t=Yt=Zt=null,Jt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Kt=t,e||this.options.forceAutoScrollFallback||f||c||p){ne(t,this.options,o,e);var a=R(o,!0);!Qt||$t&&r===Yt&&i===Zt||($t&&ee(),$t=setInterval((function(){var o=R(document.elementFromPoint(r,i),!0);o!==a&&(a=o,te()),ne(t,n.options,o,e)}),10),Yt=r,Zt=i)}else{if(!this.options.bubbleScroll||R(o,!0)===C())return void te();ne(t,this.options,R(o,!1),!1)}}},s(t,{pluginName:"scroll",initializeByDefault:!0})}),Bt.mount(oe,ie),e.b=Bt}).call(this,n(155))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(159),i=n(22),o=n(12);class a extends r.a{toString(){let t="[";if(o.f.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]=Object(i.a)(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}}},function(t,e,n){"use strict";(function(t){function r(e){if("undefined"!==typeof window&&"object"===typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!==typeof t&&"object"===typeof t.versions&&Boolean(t.versions.electron))return!0;const n="object"===typeof navigator&&"string"===typeof navigator.userAgent&&navigator.userAgent,r=e||n;return!!(r&&r.indexOf("Electron")>=0)}n.d(e,"a",(function(){return r}))}).call(this,n(68))},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(551),o=r.types.model({id:r.types.number,name:r.types.string,has_duplicate_name:r.types.boolean,sub_terms:r.types.maybeNull(r.types.array(r.types.late((function(){return o})),[])),position:r.types.maybeNull(r.types.number)}).volatile((function(t){return{checked:!1}})).views((function(t){return{get partiallyChecked(){var e=t.sub_terms.map((function(t){return t.isChecked})).filter((function(t,e,n){return n.indexOf(t)===e}));return e.find((function(t){return!0===t}))&&e.length>1},get allChecked(){var e=t.sub_terms.map((function(t){return t.isChecked})).filter((function(t,e,n){return n.indexOf(t)===e}));return 1===e.length&&!0===e[0]},get isChecked(){return t.checked||t.sub_terms&&t.allChecked},get toQuery(){var e={},n=[];return Object(r.getParentOfType)(t,i.default).hasSubTerms&&((n=t.sub_terms.filter((function(t){return t.isChecked})).map((function(t){return t.id}))).length,n.length>0&&(e.taxonomy_term_ids=t.sub_terms.filter((function(t){return t.isChecked})).map((function(t){return t.id})))),e.taxonomy_term_ids=!1,t.isChecked&&n.push(t.id),e.taxonomy_term_ids=n,e},get toOption(){return{id:t.id,name:t.name}}}})).actions((function(t){return{setChecked:function(e){e!==t.isChecked&&(t.checked=e)},toggle:function(){t.checked=!t.checked},toggleAllSubTerms:function(){var e=t.sub_terms.filter((function(t){return t.isChecked})).length>0;t.sub_terms.map((function(t){return t.setChecked(!e)}))}}}));e.default=o},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(204),o=n(1001),a=n(102);function s(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 u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=r.types.model("CardItemResult",{name:r.types.string,slug:r.types.string,location:r.types.maybeNull(i.default),date_from:r.types.maybeNull(r.types.string),date_to:r.types.maybeNull(r.types.string),type:r.types.string,excerpt:r.types.maybeNull(r.types.string),image:r.types.maybeNull(o.default),image_url:r.types.maybeNull(r.types.string),hero_attachment_type:r.types.maybeNull(r.types.string)}).views((function(t){return{get path(){return Object(a.getPath)(t)}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return t.image||(e.image={name:t.name,url:t.image_url}),e}));e.default=l},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default=function(t,e){var n=Object(r.useRef)(null);return Object(r.useEffect)((function(){if(null!==n.current){new IntersectionObserver((function(n){n[0].intersectionRatio>.99&&n[0].intersectionRatio<=1&&t.hasMore&&!e.isLoading&&t.fetchNextPage()}),{root:null,rootMargin:"0px",threshold:1}).observe(n.current)}}),[n.current]),[n]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(6);function i(t,e,n,i){const o="See luma.gl ".concat(n," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),a=Object.getPrototypeOf(t);i.forEach((t=>{a.methodName||(a[t]=()=>{throw r.k.removed("Calling removed method ".concat(e,".").concat(t,": "),o)(),new Error(t)})}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=!1,i=!0;function o(t){var e=a(t);return function(t){var e=a(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){var e=a(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,r)&&255===e.getUint8(2)))return null;var n=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var n=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:n}}(),i=n.tableMarkers,o=n.sofMarkers,s=2;for(;s+9<e.byteLength;){var u=e.getUint16(s,r);if(o.has(u))return{mimeType:"image/jpeg",height:e.getUint16(s+5,r),width:e.getUint16(s+7,r)};if(!i.has(u))return null;s+=2,s+=e.getUint16(s,r)}return null}(e)||function(t){var e=a(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){var e=a(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 a(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")}},function(t,e,n){"use strict";function r({data:t,getIndex:e,dataRange:n,replace:r}){const{startRow:i=0,endRow:o=1/0}=n,a=t.length;let s=a,u=a;for(let f=0;f<a;f++){const n=e(t[f]);if(s>f&&n>=i&&(s=f),n>=o){u=f;break}}let l=s;const c=u-s!==r.length?t.slice(u):void 0;for(let f=0;f<r.length;f++)t[l++]=r[f];if(c){for(let e=0;e<c.length;e++)t[l++]=c[e];t.length=l}return{startRow:s,endRow:s+r.length}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1),i=n(129),o=n(6),a=n(15),s=n(27);const u={blendFunc:[1,0,32771,0],blendEquation:32774};class l extends i.a{constructor(...t){super(...t),Object(r.a)(this,"pickZ",void 0),Object(r.a)(this,"_colors",null)}render(t){return t.pickingFBO?this._drawPickingBuffer(t):super.render(t)}_drawPickingBuffer({layers:t,layerFilter:e,views:n,viewports:r,onViewportActive:i,pickingFBO:a,deviceRect:{x:s,y:l,width:f,height:h},cullRect:p,effects:d,pass:m="picking",pickZ:g}){const y=this.gl;this.pickZ=g;const v=g?null:{byLayer:new Map,byAlpha:[]};this._colors=v;const b=Object(o.o)(y,{scissorTest:!0,scissor:[s,l,f,h],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0],...u,blend:!g},(()=>super.render({target:a,layers:t,layerFilter:e,views:n,viewports:r,onViewportActive:i,cullRect:p,effects:null===d||void 0===d?void 0:d.filter((t=>t.useInPicking)),pass:m})));this._colors=null;return{decodePickingColor:v&&c.bind(null,v),stats:b}}shouldDrawLayer(t){return t.props.pickable&&t.props.operation===a.c.DRAW}getModuleParameters(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}getLayerParameters(t,e,n){const r={...t.props.parameters};return this._colors?(Object.assign(r,u),r.blend=!0,r.blendColor=function(t,e,n){const{byLayer:r,byAlpha:i}=t;let o,a=r.get(e);a?(a.viewports.push(n),o=a.a):(o=r.size+1,o<=255?(a={a:o,layer:e,viewports:[n]},r.set(e,a),i[o]=a):(s.a.warn("Too many pickable layers, only picking the first 255")(),o=0));return[0,0,0,o/255]}(this._colors,t,n)):r.blend=!1,r}}function c(t,e){const n=t.byAlpha[e[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(e)}}},function(t,e,n){t.exports=n(883)},function(t,e,n){"use strict";n.r(e),n.d(e,"buildCardItems",(function(){return v}));var r=n(0),i=n.n(r),o=n(7),a=n(54),s=n(174),u=n(148),l=n(21),c=n(14),f=n(144),h=["image_url"];function p(){p=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=d,s(v,"constructor",d),s(d,"constructor",h),h.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function d(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function m(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return g(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 g(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(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 y(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}var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e?t.filter((function(t){return"published"===t.state})):t;return n.map((function(t,e){var n=t.image_url,r=y(t,h);n&&(r.image={url:n});var o="/map/".concat(t.type,"s/").concat(t.slug);return i.a.createElement(f.default,{key:"record-card-".concat(e,"-").concat(t.slug),path:o,randomEnterDelay:!0,item:r,showDraftState:!0})}))},b=function(t){var e=m(Object(r.useState)(null),2),n=e[0],o=e[1];if(Object(r.useEffect)((function(){var e=function(){var e,n=(e=p().mark((function e(n){var r,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.asAuthenticatedUser?Object(l.buildHeaders)({"X-Hasura-User-Token":document.querySelector("meta[name=user-token]").content}):{},e.next=3,Object(s.fetchUserCardItemResultsQuery)(n,r);case 3:i=e.sent,o(i);case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(t){d(o,r,i,a,s,"next",t)}function s(t){d(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}();e({id:t.userId,limit:t.limit})}),[]),null===n)return i.a.createElement(i.a.Fragment,null,i.a.createElement(a.default,null));var f=v(n.results);v(n.draft_results);return i.a.createElement(i.a.Fragment,null,t.children&&"function"===typeof t.children&&t.children(f),t.asAuthenticatedUser&&i.a.createElement("h2",null,i.a.createElement(c.a,{to:"/map/contribute/user/".concat(t.userId)},I18n.t("components.user_generated_content.user_card_items.link"))),f.length>0&&i.a.createElement(i.a.Fragment,null,t.asAuthenticatedUser&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,I18n.t("components.user_generated_content.user_card_items.title"))),i.a.createElement(u.default,null,f)))};b.defaultProps={asAuthenticatedUser:!1},e.default=Object(o.a)(b)},function(t,e,n){"use strict";n.d(e,"a",(function(){return Mt}));var r="3.2.12";function i(t){return i="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},i(t)}var o={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:r,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"===typeof WebAssembly?"undefined":i(WebAssembly))?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}},a=n(1);function s(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=t.POSITION?t.POSITION.value:[],u=s&&s.length,l=0;l<u;l+=3){var c=s[l],f=s[l+1],h=s[l+2];e=c<e?c:e,n=f<n?f:n,r=h<r?h:r,i=c>i?c:i,o=f>o?f:o,a=h>a?h:a}return[[e,n,r],[i,o,a]]}function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(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.")}()}function l(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=c(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){if(t){if("string"===typeof t)return f(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)?f(t,e):void 0}}function f(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 h(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)}}var p=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(a.a)(this,"fields",void 0),Object(a.a)(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(e)),function(t){var e,n={},r=l(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.name]&&console.warn("Schema: duplicated field name",i.name,i),n[i.name]=!0}}catch(o){r.e(o)}finally{r.f()}}(e),this.fields=e,this.metadata=n||new Map}var e,n,r;return e=t,n=[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];e[s]=!0}var u=this.fields.filter((function(t){return e[t.name]}));return new t(u,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.map((function(t){return e.fields[t]})).filter(Boolean);return new t(o,this.metadata)}},{key:"assign",value:function(e){var n,r=this.metadata;if(e instanceof t){var i=e;n=i.fields,r=d(d(new Map,this.metadata),i.metadata)}else n=e;var o,a=Object.create(null),s=l(this.fields);try{for(s.s();!(o=s.n()).done;){var u=o.value;a[u.name]=u}}catch(p){s.e(p)}finally{s.f()}var c,f=l(n);try{for(f.s();!(c=f.n()).done;){var h=c.value;a[h.name]=h}}catch(p){f.e(p)}finally{f.f()}return new t(Object.values(a),r)}}],n&&h(e.prototype,n),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function d(t,e){return new Map([].concat(u(t||new Map),u(e||new Map)))}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(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)}}var y,v=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;m(this,t),Object(a.a)(this,"name",void 0),Object(a.a)(this,"type",void 0),Object(a.a)(this,"nullable",void 0),Object(a.a)(this,"metadata",void 0),this.name=e,this.type=n,this.nullable=r,this.metadata=i}var e,n,r;return e=t,(n=[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}])&&g(e.prototype,n),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function b(t){return b="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},b(t)}function _(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}function w(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O(t);if(e){var i=O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(t,e){if(e&&("object"===b(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return E(t)}function E(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(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 C(t,e,n){return e&&P(t.prototype,e),n&&P(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}!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"}(y||(y={}));var T=function(){function t(){S(this,t)}return C(t,[{key:"typeId",get:function(){return y.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===y.Null}},{key:"isInt",value:function(t){return t&&t.typeId===y.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===y.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===y.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===y.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===y.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===y.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===y.Date}},{key:"isTime",value:function(t){return t&&t.typeId===y.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===y.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===y.Interval}},{key:"isList",value:function(t){return t&&t.typeId===y.List}},{key:"isStruct",value:function(t){return t&&t.typeId===y.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===y.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===y.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===y.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===y.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===y.Dictionary}}]),t}(),k=(Symbol.toStringTag,Symbol.toStringTag,function(t,e){_(r,t);var n=w(r);function r(t,e){var i;return S(this,r),i=n.call(this),Object(a.a)(E(i),"isSigned",void 0),Object(a.a)(E(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=e,i}return C(r,[{key:"typeId",get:function(){return y.Int}},{key:e,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),r}(T,Symbol.toStringTag)),I=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,!0,8)}return C(n)}(k),L=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,!0,16)}return C(n)}(k),j=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,!0,32)}return C(n)}(k),M=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,!1,8)}return C(n)}(k),R=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,!1,16)}return C(n)}(k),N=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,!1,32)}return C(n)}(k),D=32,F=64,B=function(t,e){_(r,t);var n=w(r);function r(t){var e;return S(this,r),e=n.call(this),Object(a.a)(E(e),"precision",void 0),e.precision=t,e}return C(r,[{key:"typeId",get:function(){return y.Float}},{key:e,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),r}(T,Symbol.toStringTag),z=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,D)}return C(n)}(B),U=function(t){_(n,t);var e=w(n);function n(){return S(this,n),e.call(this,F)}return C(n)}(B),G=(Symbol.toStringTag,Symbol.toStringTag,{DAY:0,MILLISECOND:1}),V=(Symbol.toStringTag,{SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9}),q=(Symbol.toStringTag,Symbol.toStringTag,{DAY_TIME:0,YEAR_MONTH:1}),H=(Symbol.toStringTag,function(t,e){_(r,t);var n=w(r);function r(t,e){var i;return S(this,r),i=n.call(this),Object(a.a)(E(i),"listSize",void 0),Object(a.a)(E(i),"children",void 0),i.listSize=t,i.children=[e],i}return C(r,[{key:"typeId",get:function(){return y.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:e,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),r}(T,Symbol.toStringTag));Symbol.toStringTag;function W(t,e,n){var r=function(t){switch(t.constructor){case Int8Array:return new I;case Uint8Array:return new M;case Int16Array:return new L;case Uint16Array:return new R;case Int32Array:return new j;case Uint32Array:return new N;case Float32Array:return new z;case Float64Array:return new U;default:throw new Error("array type not supported")}}(e.value),i=n||function(t){var e=new Map;"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10));"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10));"normalized"in t&&e.set("normalized",t.normalized.toString());return e}(e);return new v(t,new H(e.size,new v("value",r)),!1,i)}function X(t,e,n){var r=Z(e.metadata),i=[],o=function(t){var e={};for(var n in t){var r=t[n];e[r.name||"undefined"]=r}return e}(e.attributes);for(var a in t){var s=Y(a,t[a],o[a]);i.push(s)}if(n){var u=Y("indices",n);i.push(u)}return new p(i,r)}function Y(t,e,n){return W(t,e,n?Z(n.metadata):void 0)}function Z(t){var e=new Map;for(var n in t)e.set("".concat(n,".string"),JSON.stringify(t[n]));return e}function K(t){return function(t){if(Array.isArray(t))return Q(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||J(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.")}()}function $(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||J(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){if(t){if("string"===typeof t)return Q(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)?Q(t,e):void 0}}function Q(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 tt(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 et(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tt(Object(n),!0).forEach((function(e){nt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rt(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)}}var it={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},ot={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},at=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(a.a)(this,"draco",void 0),Object(a.a)(this,"decoder",void 0),Object(a.a)(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}var e,n,r;return e=t,n=[{key:"destroy",value:function(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}},{key:"parseSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new this.draco.DecoderBuffer;n.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);var r=this.decoder.GetEncodedGeometryType(n),i=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{var o;switch(r){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(n,i);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(n,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!i.ptr){var a="DRACO decompression failed: ".concat(o.error_msg());throw new Error(a)}var u=this._getDracoLoaderData(i,r,e),l=this._getMeshData(i,u,e),c=s(l.attributes),f=X(l.attributes,u,l.indices),h=et(et({loader:"draco",loaderData:u,header:{vertexCount:i.num_points(),boundingBox:c}},l),{},{schema:f});return h}finally{this.draco.destroy(n),i&&this.draco.destroy(i)}}},{key:"_getDracoLoaderData",value:function(t,e,n){var 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}}},{key:"_getDracoAttributes",value:function(t,e){for(var n={},r=0;r<t.num_attributes();r++){var 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_components(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:r,metadata:o};var a=this._getQuantizationTransform(i,e);a&&(n[i.unique_id()].quantization_transform=a);var s=this._getOctahedronTransform(i,e);s&&(n[i.unique_id()].octahedron_transform=s)}return n}},{key:"_getMeshData",value:function(t,e,n){var r=this._getMeshAttributes(e,t,n);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return t instanceof this.draco.Mesh?"triangle-strip"===n.topology?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(t),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(t),size:1}}:{topology:"point-list",mode:0,attributes:r}}},{key:"_getMeshAttributes",value:function(t,e,n){for(var r={},i=0,o=Object.values(t.attributes);i<o.length;i++){var a=o[i],s=this._deduceAttributeName(a,n);a.name=s;var u=this._getAttributeValues(e,a),l=u.value,c=u.size;r[s]={value:l,size:c,byteOffset:a.byte_offset,byteStride:a.byte_stride,normalized:a.normalized}}return r}},{key:"_getTriangleListIndices",value:function(t){var 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)}}},{key:"_getTriangleStripIndices",value:function(t){var e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){for(var e=t.size(),n=new Int32Array(e),r=0;r<e;r++)n[r]=t.GetValue(r);return n}(e)}finally{this.draco.destroy(e)}}},{key:"_getAttributeValues",value:function(t,e){var n,r=ot[e.data_type],i=e.num_components,o=t.num_points()*i,a=o*r.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,r),u=this.draco._malloc(a);try{var l=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,l,s,a,u),n=new r(this.draco.HEAPF32.buffer,u,o).slice()}finally{this.draco._free(u)}return{value:n,size:i}}},{key:"_deduceAttributeName",value:function(t,e){for(var n=t.unique_id,r=0,i=Object.entries(e.extraAttributes||{});r<i.length;r++){var o=$(i[r],2),a=o[0];if(o[1]===n)return a}var s=t.attribute_type;for(var u in it)if(this.draco[u]===s)return it[u];var l=e.attributeNameEntry||"name";return t.metadata[l]?t.metadata[l].string:"CUSTOM_ATTRIBUTE_".concat(n)}},{key:"_getTopLevelMetadata",value:function(t){var e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}},{key:"_getAttributeMetadata",value:function(t,e){var n=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(n)}},{key:"_getDracoMetadata",value:function(t){if(!t||!t.ptr)return{};for(var e={},n=this.metadataQuerier.NumEntries(t),r=0;r<n;r++){var i=this.metadataQuerier.GetEntryName(t,r);e[i]=this._getDracoMetadataField(t,i)}return e}},{key:"_getDracoMetadataField",value:function(t,e){var n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,n);var r=function(t){for(var e=t.size(),n=new Int32Array(e),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)}}},{key:"_disableAttributeTransforms",value:function(t){var e,n=t.quantizedAttributes,r=void 0===n?[]:n,i=t.octahedronAttributes,o=void 0===i?[]:i,a=function(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=J(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}([].concat(K(r),K(o)));try{for(a.s();!(e=a.n()).done;){var s=e.value;this.decoder.SkipAttributeTransform(this.draco[s])}}catch(u){a.e(u)}finally{a.f()}}},{key:"_getQuantizationTransform",value:function(t,e){var n=this,r=e.quantizedAttributes,i=void 0===r?[]:r,o=t.attribute_type();if(i.map((function(t){return n.decoder[t]})).includes(o)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits(),range:a.range(),min_values:new Float32Array([1,2,3]).map((function(t){return a.min_value(t)}))}}finally{this.draco.destroy(a)}}return null}},{key:"_getOctahedronTransform",value:function(t,e){var n=this,r=e.octahedronAttributes,i=void 0===r?[]:r,o=t.attribute_type();if(i.map((function(t){return n.decoder[t]})).includes(o)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits()}}finally{this.draco.destroy(a)}}return null}}],n&&rt(e.prototype,n),r&&rt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();var st=n(1433);function ut(t){return ut="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},ut(t)}function lt(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return ct(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 ct(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(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 ft(){ft=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ut(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function ht(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 pt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(n),!0).forEach((function(e){dt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function gt(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){mt(o,r,i,a,s,"next",t)}function s(t){mt(o,r,i,a,s,"throw",t)}a(void 0)}))}}var yt,vt="1.4.1",bt="https://www.gstatic.com/draco/versioned/decoders/".concat(vt,"/draco_decoder.js"),_t="https://www.gstatic.com/draco/versioned/decoders/".concat(vt,"/draco_wasm_wrapper.js"),At="https://www.gstatic.com/draco/versioned/decoders/".concat(vt,"/draco_decoder.wasm");"https://raw.githubusercontent.com/google/draco/".concat(vt,"/javascript/draco_encoder.js");function wt(t){return xt.apply(this,arguments)}function xt(){return(xt=gt(ft().mark((function t(e){var n;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.modules||{},yt=n.draco3d?yt||n.draco3d.createDecoderModule({}).then((function(t){return{draco:t}})):yt||Et(e),t.next=4,yt;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Et(t){return Ot.apply(this,arguments)}function Ot(){return(Ot=gt(ft().mark((function t(e){var n,r,i,o;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.draco&&e.draco.decoderType,t.next="js"===t.t0?3:(t.t0,7);break;case 3:return t.next=5,Object(st.a)(bt,"draco",e);case 5:return n=t.sent,t.abrupt("break",21);case 7:return t.t1=Promise,t.next=10,Object(st.a)(_t,"draco",e);case 10:return t.t2=t.sent,t.next=13,Object(st.a)(At,"draco",e);case 13:return t.t3=t.sent,t.t4=[t.t2,t.t3],t.next=17,t.t1.all.call(t.t1,t.t4);case 17:i=t.sent,o=lt(i,2),n=o[0],r=o[1];case 21:return n=n||globalThis.DracoDecoderModule,t.next=24,St(n,r);case 24:return t.abrupt("return",t.sent);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function St(t,e){var n={};return e&&(n.wasmBinary=e),new Promise((function(e){t(pt(pt({},n),{},{onModuleLoaded:function(t){return e({draco:t})}}))}))}function Pt(t){return Pt="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},Pt(t)}function Ct(){Ct=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Pt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Tt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function kt(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Tt(o,r,i,a,s,"next",t)}function s(t){Tt(o,r,i,a,s,"throw",t)}a(void 0)}))}}function It(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 Lt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?It(Object(n),!0).forEach((function(e){jt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function jt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n(81).b;var Mt=Lt(Lt({},o),{},{parse:function(t,e){return Rt.apply(this,arguments)}});function Rt(){return(Rt=kt(Ct().mark((function t(e,n){var r,i,o;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,wt(n);case 2:return r=t.sent,i=r.draco,o=new at(i),t.prev=5,t.abrupt("return",o.parseSync(e,null===n||void 0===n?void 0:n.draco));case 7:return t.prev=7,o.destroy(),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[5,,7,10]])})))).apply(this,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(123),i=n(173);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.b={[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.a(t,{format:6408,type:5126,dataFormat:6408}),n=new r.a(t,{id:"test-framebuffer",check:!1,attachments:{36064:e}}),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]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return f}));var r=n(6),i=n(10);const o=6144,a=6145,s=6146,u=34041,l="clear: bad arguments";function c(t){let{framebuffer:e=null,color:n=null,depth:o=null,stencil:a=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s={};e&&(s.framebuffer=e);let u=0;n&&(u|=16384,!0!==n&&(s.clearColor=n)),o&&(u|=256,!0!==o&&(s.clearDepth=o)),a&&(u|=1024,!0!==o&&(s.clearStencil=o)),Object(i.a)(0!==u,l),Object(r.o)(t,s,(()=>{t.clear(u)}))}function f(t){let{framebuffer:e=null,buffer:n=o,drawBuffer:c=0,value:f=[0,0,0,0]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(t),Object(r.o)(t,{framebuffer:e},(()=>{switch(n){case o:switch(f.constructor){case Int32Array:t.clearBufferiv(n,c,f);break;case Uint32Array:t.clearBufferuiv(n,c,f);break;case Float32Array:default:t.clearBufferfv(n,c,f)}break;case a:t.clearBufferfv(a,0,[f]);break;case s:t.clearBufferiv(s,0,[f]);break;case u:const[e,r]=f;t.clearBufferfi(u,0,e,r);break;default:Object(i.a)(!1,l)}}))}},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.r(e),n.d(e,"getRoundedCount",(function(){return r})),n.d(e,"getNormalisedPosition",(function(){return i}));var r=function(t){return t>1&&t<10?String(t).padStart(2,"0"):t>=10&&t<100?"".concat(Math.floor(t/10),"0"):t>=100&&t<250?"100":t>=250&&t<500?"250":t>500&&t<1e3?"500":t>=1e3&&t<5e3?"1k":t>=5e3&&t<1e4?"5k":t>=1e4?"10k":void 0},i=function(t){return t<10?String(t).padStart(2,"0"):t}},function(t,e,n){t.exports=n(910)},function(t,e,n){t.exports={LayerItem:"ReferenceLayer-module__LayerItem___197jx",handle:"ReferenceLayer-module__handle___2N1VC",visibilityToggle:"ReferenceLayer-module__visibilityToggle___3cvSS",hiddenVisibilityToggle:"ReferenceLayer-module__hiddenVisibilityToggle___ylyt7"}},function(t,e,n){t.exports={OverlayCreatorCheckTilingErrorsPanel:"OverlayCreatorCheckTilingErrorsPanel-module__OverlayCreatorCheckTilingErrorsPanel___36fBI",wrap:"OverlayCreatorCheckTilingErrorsPanel-module__wrap___3zCjC",panel:"OverlayCreatorCheckTilingErrorsPanel-module__panel___1XOea",errors:"OverlayCreatorCheckTilingErrorsPanel-module__errors___1nG7v",geojsonErrors:"OverlayCreatorCheckTilingErrorsPanel-module__geojsonErrors___cnt6u",primary:"OverlayCreatorCheckTilingErrorsPanel-module__primary___qCuYn"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return L}));var r=n(0),i=n(703),o=n.n(i),a=n(3),s=n.n(a),u=n(91);const l=s.a.instanceOf(u.Uppy),c=s.a.arrayOf(s.a.string),f=s.a.shape({strings:s.a.object,pluralize:s.a.func}),h=s.a.shape({id:s.a.string.isRequired,name:s.a.string.isRequired,placeholder:s.a.string}),p=s.a.oneOfType([s.a.arrayOf(h),s.a.func]),d=s.a.oneOfType([s.a.string,s.a.number]),m={uppy:l,inline:s.a.bool,plugins:c,width:d,height:d,showProgressDetails:s.a.bool,hideUploadButton:s.a.bool,hideProgressAfterFinish:s.a.bool,note:s.a.string,metaFields:p,proudlyDisplayPoweredByUppy:s.a.bool,disableStatusBar:s.a.bool,disableInformer:s.a.bool,disableThumbnailGenerator:s.a.bool,thumbnailWidth:s.a.number,locale:f},g=["defaultChecked","defaultValue","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML","accessKey","className","contentEditable","contextMenu","dir","draggable","hidden","id","lang","placeholder","slot","spellCheck","style","tabIndex","title","translate","radioGroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","inputMode","is","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],y=/^(aria-|data-)/;var v=t=>Object.fromEntries(Object.entries(t).filter((t=>{let[e]=t;return y.test(e)||g.includes(e)})));function b(t,e){return Object.keys(t).some((n=>!Object.hasOwn(t,n)&&t[n]!==e[n]))}class _ extends r.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(t){if(t.uppy!==this.props.uppy)this.uninstallPlugin(t),this.installPlugin();else if(b(this.props,t)){const t={...this.props,target:this.container};delete t.uppy,this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:t}=this.props,e={id:"react:Dashboard",...this.props,target:this.container};delete e.uppy,t.use(o.a,e),this.plugin=t.getPlugin(e.id)}uninstallPlugin(t){void 0===t&&(t=this.props);const{uppy:e}=t;e.removePlugin(this.plugin)}render(){return Object(r.createElement)("div",{className:"uppy-Container",ref:t=>{this.container=t},...v(this.props)})}}_.propTypes=m,_.defaultProps={inline:!0};class A extends r.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(t){const{uppy:e,open:n,onRequestClose:r}=this.props;if(t.uppy!==e)this.uninstallPlugin(t),this.installPlugin();else if(b(this.props,t)){const t={...this.props,onRequestCloseModal:r};delete t.uppy,this.plugin.setOptions(t)}t.open&&!n?this.plugin.closeModal():!t.open&&n&&this.plugin.openModal()}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:t,target:e,open:n,onRequestClose:r,closeModalOnClickOutside:i,disablePageScrollWhenModalOpen:a,inline:s,plugins:u,width:l,height:c,showProgressDetails:f,note:h,metaFields:p,proudlyDisplayPoweredByUppy:d,autoOpenFileEditor:m,animateOpenClose:g,browserBackButtonClose:y,closeAfterFinish:v,disableStatusBar:b,disableInformer:_,disableThumbnailGenerator:A,disableLocalFiles:w,disabled:x,hideCancelButton:E,hidePauseResumeButton:O,hideProgressAfterFinish:S,hideRetryButton:P,hideUploadButton:C,showLinkToFileUploadResult:T,showRemoveButtonAfterComplete:k,showSelectedFiles:I,waitForThumbnailsBeforeUpload:L,fileManagerSelectionType:j,theme:M,thumbnailType:R,thumbnailWidth:N,locale:D}=this.props,F={id:"react:DashboardModal",target:e,closeModalOnClickOutside:i,disablePageScrollWhenModalOpen:a,inline:s,plugins:u,width:l,height:c,showProgressDetails:f,note:h,metaFields:p,proudlyDisplayPoweredByUppy:d,autoOpenFileEditor:m,animateOpenClose:g,browserBackButtonClose:y,closeAfterFinish:v,disableStatusBar:b,disableInformer:_,disableThumbnailGenerator:A,disableLocalFiles:w,disabled:x,hideCancelButton:E,hidePauseResumeButton:O,hideProgressAfterFinish:S,hideRetryButton:P,hideUploadButton:C,showLinkToFileUploadResult:T,showRemoveButtonAfterComplete:k,showSelectedFiles:I,waitForThumbnailsBeforeUpload:L,fileManagerSelectionType:j,theme:M,thumbnailType:R,thumbnailWidth:N,locale:D,onRequestCloseModal:r};F.target||(F.target=this.container),delete F.uppy,t.use(o.a,F),this.plugin=t.getPlugin(F.id),n&&this.plugin.openModal()}uninstallPlugin(t){void 0===t&&(t=this.props);const{uppy:e}=t;e.removePlugin(this.plugin)}render(){return Object(r.createElement)("div",{className:"uppy-Container",ref:t=>{this.container=t},...v(this.props)})}}A.propTypes={uppy:l.isRequired,target:"undefined"!==typeof window?s.a.instanceOf(window.HTMLElement):s.a.any,open:s.a.bool,onRequestClose:s.a.func,closeModalOnClickOutside:s.a.bool,disablePageScrollWhenModalOpen:s.a.bool,inline:s.a.bool,plugins:c,width:d,height:d,showProgressDetails:s.a.bool,note:s.a.string,metaFields:p,proudlyDisplayPoweredByUppy:s.a.bool,autoOpenFileEditor:s.a.bool,animateOpenClose:s.a.bool,browserBackButtonClose:s.a.bool,closeAfterFinish:s.a.bool,disableStatusBar:s.a.bool,disableInformer:s.a.bool,disableThumbnailGenerator:s.a.bool,disableLocalFiles:s.a.bool,disabled:s.a.bool,hideCancelButton:s.a.bool,hidePauseResumeButton:s.a.bool,hideProgressAfterFinish:s.a.bool,hideRetryButton:s.a.bool,hideUploadButton:s.a.bool,showLinkToFileUploadResult:s.a.bool,showRemoveButtonAfterComplete:s.a.bool,showSelectedFiles:s.a.bool,waitForThumbnailsBeforeUpload:s.a.bool,fileManagerSelectionType:s.a.string,theme:s.a.string,thumbnailType:s.a.string,thumbnailWidth:s.a.number,locale:f},A.defaultProps={metaFields:[],plugins:[],inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1,open:void 0,target:void 0,locale:null,onRequestClose:void 0};var w=n(400),x=n.n(w);class E extends r.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(t){if(t.uppy!==this.props.uppy)this.uninstallPlugin(t),this.installPlugin();else if(b(this.props,t)){const t={...this.props,target:this.container};delete t.uppy,this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:t,locale:e,inputName:n,width:r,height:i,note:o}=this.props,a={id:"react:DragDrop",locale:e,inputName:n,width:r,height:i,note:o,target:this.container};delete a.uppy,t.use(x.a,a),this.plugin=t.getPlugin(a.id)}uninstallPlugin(t){void 0===t&&(t=this.props);const{uppy:e}=t;e.removePlugin(this.plugin)}render(){return Object(r.createElement)("div",{className:"uppy-Container",ref:t=>{this.container=t},...v(this.props)})}}E.propTypes={uppy:l.isRequired,locale:f,inputName:s.a.string,width:s.a.string,height:s.a.string,note:s.a.string},E.defaultProps={locale:null,inputName:"files[]",width:"100%",height:"100%",note:null};var O=E,S=n(1330),P=n.n(S);class C extends r.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(t){if(t.uppy!==this.props.uppy)this.uninstallPlugin(t),this.installPlugin();else if(b(this.props,t)){const t={...this.props,target:this.container};delete t.uppy,this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:t,fixed:e,hideAfterFinish:n}=this.props,r={id:"react:ProgressBar",fixed:e,hideAfterFinish:n,target:this.container};delete r.uppy,t.use(P.a,r),this.plugin=t.getPlugin(r.id)}uninstallPlugin(t){void 0===t&&(t=this.props);const{uppy:e}=t;e.removePlugin(this.plugin)}render(){return Object(r.createElement)("div",{className:"uppy-Container",ref:t=>{this.container=t},...v(this.props)})}}C.propTypes={uppy:l.isRequired,fixed:s.a.bool,hideAfterFinish:s.a.bool},C.defaultProps={fixed:!1,hideAfterFinish:!0};var T=n(362),k=n.n(T);class I extends r.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(t){if(t.uppy!==this.props.uppy)this.uninstallPlugin(t),this.installPlugin();else if(b(this.props,t)){const t={...this.props,target:this.container};delete t.uppy,this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:t,hideUploadButton:e,hideRetryButton:n,hidePauseResumeButton:r,hideCancelButton:i,showProgressDetails:o,hideAfterFinish:a,doneButtonHandler:s}=this.props,u={id:"react:StatusBar",hideUploadButton:e,hideRetryButton:n,hidePauseResumeButton:r,hideCancelButton:i,showProgressDetails:o,hideAfterFinish:a,doneButtonHandler:s,target:this.container};delete u.uppy,t.use(k.a,u),this.plugin=t.getPlugin(u.id)}uninstallPlugin(t){void 0===t&&(t=this.props);const{uppy:e}=t;e.removePlugin(this.plugin)}render(){return Object(r.createElement)("div",{className:"uppy-Container",ref:t=>{this.container=t},...v(this.props)})}}I.propTypes={uppy:l.isRequired,hideUploadButton:s.a.bool,hideRetryButton:s.a.bool,hidePauseResumeButton:s.a.bool,hideCancelButton:s.a.bool,showProgressDetails:s.a.bool,hideAfterFinish:s.a.bool,doneButtonHandler:s.a.func},I.defaultProps={hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null};var L=I,j=n(1331),M=n.n(j);class R extends r.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(t){t.uppy!==this.props.uppy&&(this.uninstallPlugin(t),this.installPlugin())}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:t,locale:e,pretty:n,inputName:r}=this.props,i={id:"react:FileInput",locale:e,pretty:n,inputName:r,target:this.container};delete i.uppy,t.use(M.a,i),this.plugin=t.getPlugin(i.id)}uninstallPlugin(t){void 0===t&&(t=this.props);const{uppy:e}=t;e.removePlugin(this.plugin)}render(){return Object(r.createElement)("div",{className:"uppy-Container",ref:t=>{this.container=t}})}}R.propTypes={uppy:l.isRequired,locale:f,pretty:s.a.bool,inputName:s.a.string},R.defaultProps={locale:void 0,pretty:!0,inputName:"files[]"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return f}));var r=n(125),i=n(317);const o={[r.b]:"#ifdef MODULE_LOGDEPTH\n  logdepth_adjustPosition(gl_Position);\n#endif\n",[r.a]:"#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"},a="__LUMA_INJECT_DECLARATIONS__",s=/void\s+main\s*\([^)]*\)\s*\{\n?/,u=/}\n?[^{}]*$/,l=[];function c(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const c=e===r.b;for(const r in n){const e=n[r];e.sort(((t,e)=>t.order-e.order)),l.length=e.length;for(let t=0,n=e.length;t<n;++t)l[t]=e[t].injection;const i="".concat(l.join("\n"),"\n");switch(r){case"vs:#decl":c&&(t=t.replace(a,i));break;case"vs:#main-start":c&&(t=t.replace(s,(t=>t+i)));break;case"vs:#main-end":c&&(t=t.replace(u,(t=>i+t)));break;case"fs:#decl":c||(t=t.replace(a,i));break;case"fs:#main-start":c||(t=t.replace(s,(t=>t+i)));break;case"fs:#main-end":c||(t=t.replace(u,(t=>i+t)));break;default:t=t.replace(r,(t=>t+i))}}return t=t.replace(a,""),i&&(t=t.replace(/\}\s*$/,(t=>t+o[e]))),t}function f(t){const e={};return Object(i.a)(Array.isArray(t)&&t.length>1),t.forEach((t=>{for(const n in t)e[n]=e[n]?"".concat(e[n],"\n").concat(t[n]):t[n]})),e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a}));var r={prefix:"fab",iconName:"facebook",icon:[512,512,[],"f09a","M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"]},i={prefix:"fab",iconName:"facebook-f",icon:[320,512,[],"f39e","M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"]},o={prefix:"fab",iconName:"instagram",icon:[448,512,[],"f16d","M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]},a={prefix:"fab",iconName:"twitter",icon:[512,512,[],"f099","M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"]}},function(t,e,n){t.exports={ParentBar:"ParentBar-module__ParentBar___33WLC",title:"ParentBar-module__title___2OVsQ",isDisabled:"ParentBar-module__isDisabled___1MJs1",count:"ParentBar-module__count___3Ts_M",next:"ParentBar-module__next___1Kvdw",prev:"ParentBar-module__prev___1VLA5"}},function(t,e,n){t.exports={MediaGalleryIIIFEmbed:"MediaGalleryIIIFEmbed-module__MediaGalleryIIIFEmbed___3qyFB",sidebar:"MediaGalleryIIIFEmbed-module__sidebar___-E5L6",pane:"MediaGalleryIIIFEmbed-module__pane___2E4IF",caption:"MediaGalleryIIIFEmbed-module__caption___svvr0",transcription:"MediaGalleryIIIFEmbed-module__transcription___3TzO5",attribution:"MediaGalleryIIIFEmbed-module__attribution___1LDEO",item:"MediaGalleryIIIFEmbed-module__item___2HfRh"}},function(t,e,n){t.exports={MediaGallery:"MediaGallery-module__MediaGallery___3oomU",header:"MediaGallery-module__header___1mhpy",title:"MediaGallery-module__title___3quJ9",controls:"MediaGallery-module__controls___33Tuu",count:"MediaGallery-module__count___GHTzn",close:"MediaGallery-module__close___1yY-4"}},function(t,e,n){t.exports={UserActionsList:"UserActionsList-module__UserActionsList___17f7O",textContent:"UserActionsList-module__textContent___7kH51"}},function(t,e,n){t.exports={TitlePanel:"TitlePanel-module__TitlePanel___ESOTF",wrap:"TitlePanel-module__wrap___2gjwa",squareState:"TitlePanel-module__squareState___1OAxb",todo:"TitlePanel-module__todo___2WWJj",in_progress:"TitlePanel-module__in_progress___1UinB",ready_to_check:"TitlePanel-module__ready_to_check___2vKGF",check_in_progress:"TitlePanel-module__check_in_progress___tUmeB",completed:"TitlePanel-module__completed___3D8IK",closeButton:"TitlePanel-module__closeButton___14e1O",bookmarkButton:"TitlePanel-module__bookmarkButton___1uBui",isBookmarked:"TitlePanel-module__isBookmarked___2IEq0"}},function(t,e,n){(function(t){var r="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(483),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(36))},function(t,e,n){"use strict";n.r(e);var r=n(281),i=n.n(r);function o(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var a=i[r];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function s(t,e,n){return void 0===n&&(n={}),o({type:"MultiPolygon",coordinates:t},e,n)}function u(t){return"Feature"===t.type?t.geometry:t}e.default=function(t,e){var n=u(t),r=u(e),o=t.properties||{},l=i.a.difference(n.coordinates,r.coordinates);return 0===l.length?null:1===l.length?a(l[0],o):s(l,o)}},function(t,e,n){"use strict";n.r(e),function(t){var n=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}()}(),r="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,i="undefined"!==typeof t&&t.Math===Math?t:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),o="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!==typeof MutationObserver,u=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 a(){n&&(n=!1,t()),r&&u()}function s(){o(a)}function u(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return u}(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(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(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(){r&&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;a.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}(),l=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},c=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},f=y(0,0,0,0);function h(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+h(t["border-"+n+"-width"])}),0)}function d(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=c(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]=h(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=p(r,"left","right")+o),Math.round(u+a)!==n&&(u-=p(r,"top","bottom")+a)),!function(t){return t===c(t).document.documentElement}(t)){var l=Math.round(s+o)-e,d=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(d)&&(u-=d)}return y(i.left,i.top,s,u)}var m="undefined"!==typeof SVGGraphicsElement?function(t){return t instanceof c(t).SVGGraphicsElement}:function(t){return t instanceof c(t).SVGElement&&"function"===typeof t.getBBox};function g(t){return r?m(t)?function(t){var e=t.getBBox();return y(0,0,e.width,e.height)}(t):d(t):f}function y(t,e,n,r){return{x:t,y:e,width:n,height:r}}var v=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=g(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}(),b=function(t,e){var n,r,i,o,a,s,u,c=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:t,contentRect:c})},_=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}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 c(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new v(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 c(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 b(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}(),A="undefined"!==typeof WeakMap?new WeakMap:new n,w=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=u.getInstance(),r=new _(e,n,this);A.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=A.get(this))[t].apply(e,arguments)}}));var x="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:w;e.default=x}.call(this,n(36))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(88),a=(n(14),n(7)),s=n(1123),u=n(702),l=n.n(u);function c(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(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 f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(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 h=function(t){return t.layers.map((function(t,e){return i.a.createElement(s.default,{index:e,key:"reference-layer-".concat(e),layer:t})}))};e.default=Object(a.a)((function(t){var e=t.layersCollection;if(!e.sortedReferenceLayers.length||0==e.sortedReferenceLayers.length)return i.a.createElement(i.a.Fragment,null);return i.a.createElement("div",{className:l.a.LayersContainer},i.a.createElement("header",null,i.a.createElement("h3",null,I18n.t("placemaker.components.layers.reference_layers.title"))),i.a.createElement(o.a,{onDragEnd:function(t){var n=function(t,e,n){var r=Array.from(t),i=c(r.splice(e,1),1)[0];return r.splice(n,0,i),r}(e.sortOrder,t.source.index,t.destination.index);e.setSortOrder(n)}},i.a.createElement(o.c,{droppableId:"reference-layers"},(function(t,n){return i.a.createElement("div",Object.assign({className:l.a.layers,ref:t.innerRef},t.droppableProps),i.a.createElement(h,{layers:e.sortedReferenceLayers}),t.placeholder)}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(88),a=(n(71),n(14),n(1124)),s=n(7),u=n(1125),l=n.n(u),c=function(t){return t.layers.map((function(t,e){return i.a.createElement(a.default,{index:e,key:"layers-layer-".concat(e),layer:t})}))};e.default=Object(s.a)((function(t){var e=t.layers;return i.a.createElement("div",{className:l.a.FeatureLayersContainer},i.a.createElement("header",null,i.a.createElement("h3",null,I18n.t("placemaker.components.feature_layers.title"))),i.a.createElement(o.a,null,i.a.createElement(o.c,{droppableId:"feature-layers"},(function(t,n){return i.a.createElement("div",Object.assign({ref:t.innerRef},t.droppableProps),i.a.createElement(c,{layers:e}),t.placeholder)}))))}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var r=n(159),i=n(22),o=n(350),a=n(9),s=n(95),u=n(23),l=n(33);function c(){var t=new a.a(4);return a.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function f(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 h(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],l=n[2],c=n[3];return t[0]=r*c+a*s+i*l-o*u,t[1]=i*c+a*u+o*s-r*l,t[2]=o*c+a*l+r*u-i*s,t[3]=a*c-r*s-i*u-o*l,t}function p(t,e,n,r){var i,o,s,u,l,c=e[0],f=e[1],h=e[2],p=e[3],d=n[0],m=n[1],g=n[2],y=n[3];return(o=c*d+f*m+h*g+p*y)<0&&(o=-o,d=-d,m=-m,g=-g,y=-y),1-o>a.b?(i=Math.acos(o),s=Math.sin(i),u=Math.sin((1-r)*i)/s,l=Math.sin(r*i)/s):(u=1-r,l=r),t[0]=u*c+l*d,t[1]=u*f+l*m,t[2]=u*h+l*g,t[3]=u*p+l*y,t}function d(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,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}l.b,l.g,l.c,l.l;var m,g,y,v,b,_,A=l.a,w=l.k,x=l.d,E=l.i,O=l.h,S=l.m,P=l.j,C=(l.f,l.e,m=u.c(),g=u.g(1,0,0),y=u.g(0,1,0),function(t,e,n){var r=u.f(e,n);return r<-.999999?(u.d(m,g,e),u.h(m)<1e-6&&u.d(m,y,e),u.m(m,m),f(t,m,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(u.d(m,e,n),t[0]=m[0],t[1]=m[1],t[2]=m[2],t[3]=1+r,P(t,t))});v=c(),b=c(),_=s.a();const T=[0,0,0,1];class k extends r.a{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()}fromObject(t){return this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this.check()}fromMatrix3(t){return d(this,t),this.check()}fromAxisRotation(t,e){return f(this,t,e),this.check()}identity(){var t;return(t=this)[0]=0,t[1]=0,t[2]=0,t[3]=1,this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=Object(i.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(i.a)(t)}get z(){return this[2]}set z(t){this[2]=Object(i.a)(t)}get w(){return this[3]}set w(t){this[3]=Object(i.a)(t)}len(){return O(this)}lengthSquared(){return S(this)}dot(t){return x(this,t)}rotationTo(t,e){return C(this,t,e),this.check()}add(t){return A(this,this,t),this.check()}calculateW(){var t,e,n,r,i;return t=this,n=(e=this)[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.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(){var t,e,n,r,i,o,a,s;return t=this,n=(e=this)[0],r=e[1],i=e[2],o=e[3],s=(a=n*n+r*r+i*i+o*o)?1/a:0,t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,this.check()}lerp(t,e,n){return void 0===n?this.lerp(this,t,e):(E(this,t,e,n),this.check())}multiplyRight(t){return h(this,this,t),this.check()}multiplyLeft(t){return h(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],a=e[3],s=Math.sin(n),u=Math.cos(n);t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s}(this,this,t),this.check()}rotateY(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s}(this,this,t),this.check()}rotateZ(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s}(this,this,t),this.check()}scale(t){return w(this,this,t),this.check()}slerp(t,e,n){let r,i,o;switch(arguments.length){case 1:({start:r=T,target:i,ratio:o}=t);break;case 2:r=this,i=t,o=e;break;default:r=t,i=e,o=n}return p(this,r,i,o),this.check()}transformVector4(t,e=new o.a){return l.o(e,t,this),Object(i.b)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t){return this.multiplyLeft(t)}multiply(t){return this.multiplyRight(t)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=(n(1206),["children","linkLocation"]);function a(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}e.default=function(t){var e=t.children,n=t.linkLocation,r=a(t,o),s=document.querySelector("meta[name=tenant-slug]").getAttribute("content"),u=n,l=new URLSearchParams;l.append("ci","in-app"),l.append("cs",s),l.append("cn",u);var c="https://humap.me?".concat(l.toString());return i.a.createElement("a",Object.assign({href:c},r),e)}},function(t,e,n){"use strict";n.r(e),n.d(e,"trackEvent",(function(){return i})),n.d(e,"trackView",(function(){return o}));var r=n(433);function i(t,e){r.a.track(t,e)}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r.a.trackView(t)}window.ahoy=r.a},function(t,e,n){"use strict";e.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(17),a=n(1028),s=n.n(a),u=n(734);e.default=function(t){var e=t.terms,n=Object(o.useStore)().searchResults.filter.taxonomies,r=[],a=e.filter((function(t){var e,i,o=t.id;if(t.has_duplicate_name&&"child"===(e=o,i={},n.results.some((function(t){return!!t.terms.some((function(t){return t.id===e?(i.level="root",!0):!!t.sub_terms.some((function(t){return t.id===e}))&&(i.level="child",!0)}))&&(i.termParent=t.id,i.taxonomy=t.id,!0)})),i).level)return!1;return!r.includes(o)&&(r.push(o),!0)}));return i.a.createElement("ul",{className:s.a.TermList},a.map((function(t){var e=t.id,n=t.name;return i.a.createElement(u.default,{key:"term-".concat(e),id:e,name:n})})))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(806),s=n(1110),u=n.n(s);e.default=Object(o.a)((function(t){var e=t.fields;return i.a.createElement("div",{className:u.a.FeatureAnnotationData},e.map((function(t,e){return i.a.createElement(a.default,Object.assign({key:"feature-data-row-".concat(e)},t))})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(813),s=n(816),u=n(1120),l=n(1121),c=n(1122),f=n(701),h=n.n(f);e.default=Object(o.a)((function(t){var e=t.tools,n=t.actions;return i.a.createElement("div",{className:h.a.Toolbar},i.a.createElement("div",{className:h.a.primaryToolsWrap},e&&e.map((function(t,e){return i.a.createElement(a.default,{key:"toolbar-button-group-".concat(e),toolGroup:t})}))),n&&i.a.createElement(s.default,null,i.a.createElement(u.default,null),i.a.createElement(l.default,null),i.a.createElement(c.default,null)))}))},function(t,e,n){"use strict";var r=n(8),i=n.n(r);window.I18n=i.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(467))&&r.__esModule?r:{default:r},o=n(1298);function a(t){return a="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},a(t)}function s(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 u(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?l(t):e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d=function(t){!function(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&&h(t,e)}(d,t);var e,n,r,i,a=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function d(t){var e,n=t.getData,r=t.on,i=t.toNebulaFeature;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),p(l(e=a.call(this)),"getData",void 0),p(l(e),"toNebulaFeature",void 0),p(l(e),"id",void 0),p(l(e),"helperLayers",void 0),p(l(e),"usesMapEvents",!1),p(l(e),"enablePicking",!1),p(l(e),"enableSelection",!1),e.id=(0,o.v4)(),e.getData=n,e.toNebulaFeature=i,e.helperLayers=[],r&&Object.keys(r).forEach((function(t){return e.on(t,r[t])})),e}return n=d,(r=[{key:"render",value:function(t){return null}}])&&s(n.prototype,r),i&&s(n,i),d}(i.default.EventEmitter);e.default=d},function(t,e,n){"use strict";n.r(e);var r=n(650);n.d(e,"SimpleMeshLayer",(function(){return r.a}));var i=n(648);n.d(e,"ScenegraphLayer",(function(){return i.a}))},function(t,e,n){"use strict";n.r(e),n.d(e,"polygonToLine",(function(){return u})),n.d(e,"multiPolygonToLine",(function(){return l})),n.d(e,"coordsToLine",(function(){return c}));function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:t},e,n)}function o(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function a(t,e,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:t},e,n)}function s(t){return"Feature"===t.type?t.geometry:t}e.default=function(t,e){void 0===e&&(e={});var n=s(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return u(n,e);case"MultiPolygon":return l(n,e);default:throw new Error("invalid poly")}};function u(t,e){return void 0===e&&(e={}),c(s(t).coordinates,e.properties?e.properties:"Feature"===t.type?t.properties:{})}function l(t,e){void 0===e&&(e={});var n=s(t).coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{},i=[];return n.forEach((function(t){i.push(c(t,r))})),o(i)}function c(t,e){return t.length>1?a(t,e):i(t[0],e)}},function(t,e,n){"use strict";n.r(e);var r=n(151);function i(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function o(t,e,n){void 0===n&&(n={});for(var r=0,o=t;r<o.length;r++){var a=o[r];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return i({type:"Polygon",coordinates:t},e,n)}e.default=function(t,e,n){void 0===n&&(n={});for(var i=n.steps||64,a=n.properties?n.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},s=[],u=0;u<i;u++)s.push(Object(r.default)(t,e,-360*u/i,n).geometry.coordinates);return s.push(s[0]),o([s],a)}},function(t,e,n){"use strict";n.r(e),n.d(e,"coordEach",(function(){return i})),n.d(e,"coordReduce",(function(){return o})),n.d(e,"propEach",(function(){return a})),n.d(e,"propReduce",(function(){return s})),n.d(e,"featureEach",(function(){return u})),n.d(e,"featureReduce",(function(){return l})),n.d(e,"coordAll",(function(){return c})),n.d(e,"geomEach",(function(){return f})),n.d(e,"geomReduce",(function(){return h})),n.d(e,"flattenEach",(function(){return p})),n.d(e,"flattenReduce",(function(){return d})),n.d(e,"segmentEach",(function(){return m})),n.d(e,"segmentReduce",(function(){return g})),n.d(e,"lineEach",(function(){return y})),n.d(e,"lineReduce",(function(){return v})),n.d(e,"findSegment",(function(){return b})),n.d(e,"findPoint",(function(){return _}));var r=n(34);function i(t,e,n){if(null!==t)for(var r,o,a,s,u,l,c,f,h=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,y=m?t.features.length:1,v=0;v<y;v++){u=(f=!!(c=m?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<u;b++){var _=0,A=0;if(null!==(s=f?c.geometries[b]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,v,_,A))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,v,_,A))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(o=0;o<l[r].length-h;o++){if(!1===e(l[r][o],p,v,_,A))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&A++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(A=0,o=0;o<l[r].length;o++){for(a=0;a<l[r][o].length-h;a++){if(!1===e(l[r][o][a],p,v,_,A))return!1;p++}A++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===i(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e,n,r){var o=n;return i(t,(function(t,r,i,a,s){o=0===r&&void 0===n?t:e(o,t,r,i,a,s)}),r),o}function a(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function s(t,e,n){var r=n;return a(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function u(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function l(t,e,n){var r=n;return u(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function c(t){var e=[];return i(t,(function(t){e.push(t)})),e}function f(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function h(t,e,n){var r=n;return f(t,(function(t,i,o,a,s){r=0===i&&void 0===n?t:e(r,t,i,o,a,s)})),r}function p(t,e){f(t,(function(t,n,i,o,a){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Object(r.feature)(t,i,{bbox:o,id:a}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c={type:s,coordinates:t.coordinates[l]};if(!1===e(Object(r.feature)(c,i),n,l))return!1}}))}function d(t,e,n){var r=n;return p(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r}function m(t,e){p(t,(function(t,n,o){var a=0;if(t.geometry){var s=t.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var u,l=0,c=0,f=0;return!1!==i(t,(function(i,s,h,p,d){if(void 0===u||n>l||p>c||d>f)return u=i,l=n,c=p,f=d,void(a=0);var m=Object(r.lineString)([u,i],t.properties);if(!1===e(m,n,o,d,a))return!1;a++,u=i}))&&void 0}}}))}function g(t,e,n){var r=n,i=!1;return m(t,(function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0})),r}function y(t,e){if(!t)throw new Error("geojson is required");p(t,(function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===e(Object(r.lineString)(a[s],t.properties),n,i,s))return!1}}}))}function v(t,e,n){var r=n;return y(t,(function(t,i,o,a){r=0===i&&void 0===n?t:e(r,t,i,o,a)})),r}function b(t,e){if(e=e||{},!Object(r.isObject)(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,a=e.geometryIndex||0,s=e.segmentIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=l.length+s-1),Object(r.lineString)([l[s],l[s+1]],u,e);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s-1),Object(r.lineString)([l[a][s],l[a][s+1]],u,e);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s-1),Object(r.lineString)([l[o][s],l[o][s+1]],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s-1),Object(r.lineString)([l[o][a][s],l[o][a][s+1]],u,e)}throw new Error("geojson is invalid")}function _(t,e){if(e=e||{},!Object(r.isObject)(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,a=e.geometryIndex||0,s=e.coordIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return Object(r.point)(l,u,e);case"MultiPoint":return o<0&&(o=l.length+o),Object(r.point)(l[o],u,e);case"LineString":return s<0&&(s=l.length+s),Object(r.point)(l[s],u,e);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s),Object(r.point)(l[a][s],u,e);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),Object(r.point)(l[o][s],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s),Object(r.point)(l[o][a][s],u,e)}throw new Error("geojson is invalid")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));function r(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")}},function(t,e,n){"use strict";function r(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}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(201),i=n(12),o=n(22),a=n(23),s=n(93);let u;class l extends r.a{static get ZERO(){return u||(u=new l(0,0,0,0),Object.freeze(u)),u}constructor(t=0,e=0,n=0,r=0){super(-0,-0,-0,-0),Object(i.m)(t)&&1===arguments.length?this.copy(t):(i.f.debug&&(Object(o.a)(t),Object(o.a)(e),Object(o.a)(n),Object(o.a)(r)),this[0]=t,this[1]=e,this[2]=n,this[3]=r)}set(t,e,n,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return i.f.debug&&(Object(o.a)(t.x),Object(o.a)(t.y),Object(o.a)(t.z),Object(o.a)(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=Object(o.a)(t)}get w(){return this[3]}set w(t){this[3]=Object(o.a)(t)}transform(t){return a.t(this,this,t),this.check()}transformByMatrix3(t){return Object(s.e)(this,this,t),this.check()}transformByMatrix2(t){return Object(s.d)(this,this,t),this.check()}transformByQuaternion(t){return a.u(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return l}));var r=n(1),i=n(122);const o=()=>{},a={BREAK:1,SNAP_TO_END:2,IGNORE:3},s=t=>t,u=a.BREAK;class l{constructor(t){Object(r.a)(this,"getControllerState",void 0),Object(r.a)(this,"props",void 0),Object(r.a)(this,"propsInTransition",void 0),Object(r.a)(this,"transition",void 0),Object(r.a)(this,"onViewStateChange",void 0),Object(r.a)(this,"onStateChange",void 0),Object(r.a)(this,"_onTransitionUpdate",(t=>{const{time:e,settings:{interpolator:n,startProps:r,endProps:i,duration:o,easing:a}}=t,s=a(e/o),u=n.interpolateProps(r,i,s);this.propsInTransition=this.getControllerState({...this.props,...u}).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})})),this.getControllerState=t.getControllerState,this.propsInTransition=null,this.transition=new i.a(t.timeline),this.onViewStateChange=t.onViewStateChange||o,this.onStateChange=t.onStateChange||o}finalize(){this.transition.cancel()}getViewportInTransition(){return this.propsInTransition}processViewStateChange(t){let e=!1;const n=this.props;if(this.props=t,!n||this._shouldIgnoreViewportChange(n,t))return!1;if(this._isTransitionEnabled(t)){let r=n;if(this.transition.inProgress){const{interruption:t,endProps:e}=this.transition.settings;r={...n,...t===a.SNAP_TO_END?e:this.propsInTransition||n}}this._triggerTransition(r,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.propsInTransition)&&this.transition.settings.interpolator.arePropsEqual(t,this.propsInTransition)}_shouldIgnoreViewportChange(t,e){return this.transition.inProgress?this.transition.settings.interruption===a.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e)}_triggerTransition(t,e){const n=this.getControllerState(t),r=this.getControllerState(e).shortestPathFrom(n),i=e.transitionInterpolator,o=i.getDuration?i.getDuration(t,e):e.transitionDuration;if(0===o)return;const a=i.initializeProps(t,r);this.propsInTransition={};const l={duration:o,easing:e.transitionEasing||s,interpolator:i,interruption:e.transitionInterruption||u,startProps:a.start,endProps:a.end,onStart:e.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(e.onTransitionInterrupt),onEnd:this._onTransitionEnd(e.onTransitionEnd)};this.transition.start(l),this.onStateChange({inTransition:!0}),this.updateTransition()}_onTransitionEnd(t){return e=>{this.propsInTransition=null,this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),null===t||void 0===t||t(e)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(410);const i=[n(170).a],o=["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 a(t){const e=r.a.getDefaultProgramManager(t);for(const n of i)e.addDefaultModule(n);for(const n of o)e.addShaderHook(n);return e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1);const i=[255,255,255],o=1;let a=0;class s{constructor(t={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"color",void 0),Object(r.a)(this,"intensity",void 0),Object(r.a)(this,"type","ambient");const{color:e=i}=t,{intensity:n=o}=t;this.id=t.id||"ambient-".concat(a++),this.color=e,this.intensity=n}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1),i=n(121),o=n(355),a=n(356);class s extends i.a{get ViewportType(){return o.a}get ControllerType(){return a.a}}Object(r.a)(s,"displayName","OrthographicView")},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(76),i=n(61),o=n(12),a=n(24),s=n(26);const u=(new i.a).lookAt({eye:[0,0,1]});function l({width:t,height:e,near:n,far:r,padding:a}){let s=-t/2,u=t/2,l=-e/2,c=e/2;if(a){const{left:n=0,right:r=0,top:i=0,bottom:f=0}=a,h=Object(o.d)((n+t-r)/2,0,t)-t/2,p=Object(o.d)((i+e-f)/2,0,e)-e/2;s-=h,u-=h,l+=p,c+=p}return(new i.a).ortho({left:s,right:u,bottom:l,top:c,near:n,far:r})}class c extends r.a{constructor(t){const{width:e,height:n,near:r=.1,far:i=1e3,zoom:o=0,target:a=[0,0,0],padding:s=null,flipY:c=!0}=t,f=Array.isArray(o)?o[0]:o,h=Array.isArray(o)?o[1]:o,p=Math.min(f,h),d=Math.pow(2,p);let m;if(f!==h){const t=Math.pow(2,f),e=Math.pow(2,h);m={unitsPerMeter:[t/d,e/d,1],metersPerUnit:[d/t,d/e,1]}}super({...t,longitude:void 0,position:a,viewMatrix:u.clone().scale([d,d*(c?-1:1),d]),projectionMatrix:l({width:e||1,height:n||1,padding:s,near:r,far:i}),zoom:p,distanceScales:m})}projectFlat([t,e]){const{unitsPerMeter:n}=this.distanceScales;return[t*n[0],e*n[1]]}unprojectFlat([t,e]){const{metersPerUnit:n}=this.distanceScales;return[t*n[0],e*n[1]]}panByPosition(t,e){const n=Object(a.o)(e,this.pixelUnprojectionMatrix),r=this.projectFlat(t),i=s.a([],r,s.d([],n)),o=s.a([],this.center,i);return{target:this.unprojectFlat(o)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1),i=n(12),o=n(113),a=n(240),s=n(98);class u extends a.a{constructor(t){super(t),Object(r.a)(this,"zoomAxis",void 0),this.zoomAxis=t.zoomAxis||"all"}_calculateNewZoom({scale:t,startZoom:e}){const{maxZoom:n,minZoom:r}=this.getViewportProps();void 0===e&&(e=this.getViewportProps().zoom);let o=Math.log2(t);if(Array.isArray(e)){let[t,a]=e;switch(this.zoomAxis){case"X":t=Object(i.d)(t+o,r,n);break;case"Y":a=Object(i.d)(a+o,r,n);break;default:let e=Math.min(t+o,a+o);e<r&&(o+=r-e),e=Math.max(t+o,a+o),e>n&&(o+=n-e),t+=o,a+=o}return[t,a]}return Object(i.d)(e+o,r,n)}}class l extends o.a{constructor(...t){super(...t),Object(r.a)(this,"ControllerState",u),Object(r.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new s.a(["target","zoom"])}),Object(r.a)(this,"dragMode","pan")}_onPanRotate(){return!1}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return Q}));var r=n(1),i=n(15),o=n(358),a=n(65),s=n(12),u=n(122);class l extends u.a{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=Object(s.n)(e,n,o)}}const c=1e-5;function f(t,e,n,r,i){const o=e-t;return(n-e)*i+-o*r+o+e}function h(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 p extends u.a{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 a=function(t,e,n,r,i){if(Array.isArray(n)){const o=[];for(let a=0;a<n.length;a++)o[a]=f(t[a],e[a],n[a],r,i);return o}return f(t,e,n,r,i)}(i,o,e,n,r);const s=h(a,e),u=h(a,o);s<c&&u<c&&(a=e,this.end()),this._prevValue=o,this._currValue=a}}var d=n(27);const m={interpolation:l,spring:p};class g{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=Object(a.e)(r)))return;const o=m[r.type];if(!o)return void d.a.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 y=n(263),v=n(31),b=n(348),_=n(46),A=n(6),w=n(42),x=n(131),E=n(349),O=n(269),S=n(111),P=n(87),C=n(173);const T={10241:9987,10240:9729,10242:33071,10243:33071},k={};var I=n(101);const L={boolean:{validate:(t,e)=>!0,equal:(t,e,n)=>Boolean(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||N(t)&&(3===t.length||4===t.length),equal:(t,e,n)=>j(t,e)},accessor:{validate(t,e){const n=D(t);return"function"===n||n===D(e.value)},equal:(t,e,n)=>"function"===typeof e||j(t,e)},array:{validate:(t,e)=>e.optional&&!t||N(t),equal:(t,e,n)=>n.compare?j(t,e):t===e},object:{equal:(t,e,n)=>n.compare?Object(I.a)(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.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 C.a)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 C.a(n,{...e,parameters:{...T,...r,...t.props.textureParameters}});return k[i.id]=!0,i}(n,t),release:t=>{var e;(e=t)&&e instanceof C.a&&k[e.id]&&(e.delete(),delete k[e.id])}}};function j(t,e){if(t===e)return!0;if(!N(t)||!N(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 M(t,e){switch(D(e)){case"object":return R(t,e);case"array":return R(t,{type:"array",value:e,compare:!1});case"boolean":return R(t,{type:"boolean",value:e});case"number":return R(t,{type:"number",value:e});case"function":return R(t,{type:"function",value:e,compare:!0});default:return{name:t,type:"unknown",value:e}}}function R(t,e){return"type"in e?{name:t,...L[e.type],...e}:"value"in e?{name:t,type:D(e.value),...e}:{name:t,type:"object",value:e}}function N(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function D(t){return N(t)?"array":null===t?"null":typeof t}function F(t){const e=U(t,"_mergedDefaultProps");return e||(function(t){if(!t.prototype)return;const e=Object.getPrototypeOf(t),n=F(e),r=function(t){const e={},n={},r={};for(const[i,o]of Object.entries(t)){const t=null===o||void 0===o?void 0:o.deprecatedFor;if(t)r[i]=Array.isArray(t)?t:[t];else{const t=M(i,o);e[i]=t,n[i]=t.value}}return{propTypes:e,defaultProps:n,deprecatedProps:r}}(U(t,"defaultProps")||{}),i=function(t,e,n){const r=Object.create(null);Object.assign(r,e,t);const i=function(t){const e=U(t,"layerName")||U(t,"componentName");e||d.a.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:a}=t;t.async&&(n[o]=a,r[o]=B(o))}t[v.a]=n,t[v.b]={},Object.defineProperties(t,r)}(i,o);const a={...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])z(this,i)||(this[i]=t);d.a.deprecated(r,e[n].join("/"))()}})})(i,a),t._mergedDefaultProps=i,t._propTypes=o,t._deprecatedProps=a}(t),t._mergedDefaultProps)}function B(t){return{enumerable:!0,set(e){"string"===typeof e||e instanceof Promise||Object(P.c)(e)?this[v.b][t]=e:this[v.c][t]=e},get(){if(this[v.c]){if(t in this[v.c]){return this[v.c][t]||this[v.a][t]}if(t in this[v.b]){const e=this[v.d]&&this[v.d].internalState;if(e&&e.hasAsyncProp(t))return e.getAsyncProp(t)||this[v.a][t]}}return this[v.a][t]}}}function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function U(t,e){return z(t,e)&&t[e]}let G=0;class V{constructor(...t){Object(r.a)(this,"id",void 0),Object(r.a)(this,"props",void 0),Object(r.a)(this,"count",void 0),this.props=function(t,e){const n=F(t.constructor),r=Object.create(n);r[v.d]=t,r[v.b]={},r[v.c]={};for(let i=0;i<e.length;++i){const t=e[i];for(const e in t)r[e]=t[e]}return Object.freeze(r),r}(this,t),this.id=this.props.id,this.count=G++}clone(t){const{props:e}=this,n={};for(const r in e[v.a])r in e[v.c]?n[r]=e[v.c][r]:r in e[v.b]&&(n[r]=e[v.b][r]);return new this.constructor({...e,...n,...t})}}Object(r.a)(V,"componentName","Component"),Object(r.a)(V,"defaultProps",{});const q=Object.freeze({});class H extends class{constructor(t){Object(r.a)(this,"component",void 0),Object(r.a)(this,"onAsyncPropUpdated",void 0),Object(r.a)(this,"asyncProps",void 0),Object(r.a)(this,"oldProps",void 0),Object(r.a)(this,"oldAsyncProps",void 0),this.component=t,this.asyncProps={},this.onAsyncPropUpdated=()=>{},this.oldProps=null,this.oldAsyncProps=null}finalize(){for(const t in this.asyncProps){const e=this.asyncProps[t];e&&e.type&&e.type.release&&e.type.release(e.resolvedValue,e.type,this.component)}}getOldProps(){return this.oldAsyncProps||this.oldProps||q}resetOldProps(){this.oldAsyncProps=null,this.oldProps=this.component.props}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[v.c]||{},n=t[v.b]||t,r=t[v.a]||{};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)}}_fetch(t,e){return null}_onResolve(t,e){}_onError(t,e){}_updateAsyncProp(t,e){this._didAsyncInputValueChange(t,e)&&("string"===typeof e&&(e=this._fetch(t,e)),e instanceof Promise?this._watchPromise(t,e):Object(P.c)(e)?this._resolveAsyncIterable(t,e):this._setPropValue(t,e))}_freezeAsyncOldProps(){if(!this.oldAsyncProps&&this.oldProps){this.oldAsyncProps=Object.create(this.oldProps);for(const t in this.asyncProps)Object.defineProperty(this.oldAsyncProps,t,{enumerable:!0,value:this.oldProps[t]})}}_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];n&&(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];if(n){n.pendingLoadCount++;const r=n.pendingLoadCount;e.then((e=>{e=this._postProcessValue(n,e),this._setAsyncPropValue(t,e,r),this._onResolve(t,e)})).catch((e=>{this._onError(t,e)}))}}async _resolveAsyncIterable(t,e){if("data"!==t)return void this._setPropValue(t,e);const n=this.asyncProps[t];if(!n)return;n.pendingLoadCount++;const r=n.pendingLoadCount;let i=[],o=0;for await(const a of e){const{dataTransform:e}=this.component.props;i=e?e(a,i):i.concat(a),Object.defineProperty(i,"__diff",{enumerable:!1,value:[{startRow:o,endRow:i.length}]}),o=i.length,this._setAsyncPropValue(t,i,r)}this._onResolve(t,i)}_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}}}}{constructor({attributeManager:t,layer:e}){super(e),Object(r.a)(this,"attributeManager",void 0),Object(r.a)(this,"needsRedraw",void 0),Object(r.a)(this,"needsUpdate",void 0),Object(r.a)(this,"subLayers",void 0),Object(r.a)(this,"usesPickingColorCache",void 0),Object(r.a)(this,"changeFlags",void 0),Object(r.a)(this,"viewport",void 0),Object(r.a)(this,"uniformTransitions",void 0),Object(r.a)(this,"propsInTransition",void 0),this.attributeManager=t,this.needsRedraw=!0,this.needsUpdate=!0,this.subLayers=null,this.usesPickingColorCache=!1}get layer(){return this.component}set layer(t){this.component=t}_fetch(t,e){const n=this.component.props.fetch;return n?n(e,{propName:t,layer:this.layer}):super._fetch(t,e)}_onResolve(t,e){const n=this.component.props.onDataLoad;"data"===t&&n&&n(e,{propName:t,layer:this.layer})}_onError(t,e){this.layer.raiseError(e,"loading ".concat(t," of ").concat(this.layer))}}var W=n(24),X=n(1529);const Y=2**24-1,Z=Object.freeze([]),K=Object(x.a)((({oldViewport:t,viewport:e})=>t.equals(e)));let $=new Uint8ClampedArray(0);const J={data:{type:"data",value:Z,async:!0},dataComparator:{type:"function",value:null,compare:!1,optional:!0},_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:a}=n.context;var s;(i=i||n.getLoadOptions(),r=r||n.props.loaders,o)&&(i={...i,fetch:{...null===(s=i)||void 0===s?void 0:s.fetch,signal:o}});let u=a.contains(t);return u||i||(a.add({resourceId:t,data:Object(X.a)(t,r),persistent:!1}),u=!0),u?a.subscribe({resourceId:t,onChange:t=>{var r;return null===(r=n.internalState)||void 0===r?void 0:r.reloadAsyncProp(e,t)},consumerId:n.id,requestId:e}):Object(X.a)(t,r,i)},compare:!1},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},operation:i.c.DRAW,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:i.a.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:{type:"object",value:{},optional:!0,compare:!0},transitions:null,extensions:[],loaders:{type:"array",value:[],optional:!0,compare:!0},getPolygonOffset:{type:"function",value:({layerIndex:t})=>[0,100*-t],compare:!1},highlightedObjectIndex:null,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}};class Q extends V{constructor(...t){super(...t),Object(r.a)(this,"internalState",null),Object(r.a)(this,"lifecycle",v.e.NO_STATE),Object(r.a)(this,"context",void 0),Object(r.a)(this,"state",void 0),Object(r.a)(this,"parent",null)}get root(){let t=this;for(;t.parent;)t=t.parent;return t}toString(){const t=this.constructor.layerName||this.constructor.name;return"".concat(t,"({id: '").concat(this.props.id,"'})")}project(t){Object(w.a)(this.internalState);const e=this.internalState.viewport||this.context.viewport,n=Object(O.a)(t,{viewport:e,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),[r,i,o]=Object(W.q)(n,e.pixelProjectionMatrix);return 2===t.length?[r,i]:[r,i,o]}unproject(t){Object(w.a)(this.internalState);return(this.internalState.viewport||this.context.viewport).unproject(t)}projectPosition(t,e){Object(w.a)(this.internalState);const n=this.internalState.viewport||this.context.viewport;return Object(O.b)(t,{viewport:n,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem,...e})}get isComposite(){return!1}setState(t){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,t),this.setNeedsRedraw()}setNeedsRedraw(){this.internalState&&(this.internalState.needsRedraw=!0)}setNeedsUpdate(){this.internalState&&(this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0)}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])||[]}setModuleParameters(t){for(const e of this.getModels())e.updateModuleSettings(t)}getAttributeManager(){return this.internalState&&this.internalState.attributeManager}getCurrentLayer(){return this.internalState&&this.internalState.layer}getLoadOptions(){return this.props.loadOptions}use64bitPositions(){const{coordinateSystem:t}=this.props;return t===i.a.DEFAULT||t===i.a.LNGLAT||t===i.a.CARTESIAN}onHover(t,e){return this.props.onHover&&this.props.onHover(t,e)||!1}onClick(t,e){return this.props.onClick&&this.props.onClick(t,e)||!1}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){Object(w.a)(t instanceof Uint8Array);const[e,n,r]=t;return e+256*n+65536*r-1}getNumInstances(){return Number.isFinite(this.props.numInstances)?this.props.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:Object(b.a)(this.props.data)}getStartIndices(){return this.props.startIndices?this.props.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}getBounds(){var t;const e=this.getAttributeManager();if(!e)return null;const{positions:n,instancePositions:r}=e.attributes;return null===(t=n||r)||void 0===t?void 0:t.getBounds()}getShaders(t){for(const e of this.props.extensions)t=Object(E.a)(t,e.getShaders.call(this,e));return t}shouldUpdateState(t){return t.changeFlags.propsOrDataChanged}updateState(t){const e=this.getAttributeManager(),{dataChanged:n}=t.changeFlags;if(n&&e)if(Array.isArray(n))for(const s of n)e.invalidateAll(s);else e.invalidateAll();const{props:r,oldProps:i}=t,o=Number.isInteger(i.highlightedObjectIndex)||i.pickable,a=Number.isInteger(r.highlightedObjectIndex)||r.pickable;if(o!==a&&e){const{pickingColors:t,instancePickingColors:n}=e.attributes,r=t||n;r&&(a&&r.constant&&(r.constant=!1,e.invalidate(r.id)),r.value||a||(r.constant=!0,r.value=[0,0,0]))}}finalizeState(t){for(const n of this.getModels())n.delete();const e=this.getAttributeManager();e&&e.finalize(),this.context&&this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState&&(this.internalState.uniformTransitions.clear(),this.internalState.finalize())}draw(t){for(const e of this.getModels())e.draw(t)}getPickingInfo({info:t,mode:e,sourceLayer:n}){const{index:r}=t;return r>=0&&Array.isArray(this.props.data)&&(t.object=this.props.data[r]),t}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&&n.call(r,t))||(null===(i=this.context)||void 0===i||null===(o=i.onError)||void 0===o||o.call(i,t,this))}getNeedsRedraw(t={clearRedrawFlags:!1}){return this._getNeedsRedraw(t)}needsUpdate(){return!!this.internalState&&(this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams()))}hasUniformTransition(){var t;return(null===(t=this.internalState)||void 0===t?void 0:t.uniformTransitions.active)||!1}activateViewport(t){if(!this.internalState)return;const e=this.internalState.viewport;this.internalState.viewport=t,e&&K({oldViewport:e,viewport:t})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}invalidateAttribute(t="all"){const e=this.getAttributeManager();e&&("all"===t?e.invalidateAll():e.invalidate(t))}updateAttributes(t){for(const e of this.getModels())this._setModelAttributes(e,t)}_updateAttributes(){const t=this.getAttributeManager();if(!t)return;const e=this.props,n=this.getNumInstances(),r=this.getStartIndices();t.update({data:e.data,numInstances:n,startIndices:r,props:e,transitions:e.transitions,buffers:e.data.attributes,context:this});const i=t.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($.length/3);if(this.internalState.usesPickingColorCache=!0,n<e){e>Y&&d.a.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),$=S.a.allocate($,e,{size:3,copy:!0,maxCount:Math.max(e,Y)});const t=Math.floor($.length/3),r=[];for(let e=n;e<t;e++)this.encodePickingColor(e,r),$[3*e+0]=r[0],$[3*e+1]=r[1],$[3*e+2]=r[2]}t.value=$.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;if(!r)return;const 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;n&&(this.internalState.usesPickingColorCache&&n.value.buffer!==$.buffer&&(n.value=$.subarray(0,n.value.length)),n.updateSubBuffer({startOffset:0}))}_initialize(){Object(w.a)(!this.internalState),Object(w.a)(Number.isFinite(this.props.coordinateSystem)),Object(_.a)("layer.initialize",this);const t=this._getAttributeManager();t&&t.addInstanced({instancePickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateInstancePickingColors}}),this.internalState=new H({attributeManager:t,layer:this}),this._clearChangeFlags(),this.state={},Object.defineProperty(this.state,"attributeManager",{get:()=>(d.a.deprecated("layer.state.attributeManager","layer.getAttributeManager()")(),t)}),this.internalState.layer=this,this.internalState.uniformTransitions=new g(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props),this.initializeState(this.context);for(const e of this.props.extensions)e.initializeState.call(this,this.context,e);this.setChangeFlags({dataChanged:"init",propsChanged:"init",viewportChanged:!0,extensionsChanged:!0}),this._update()}_transferState(t){Object(_.a)("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()))}_update(){const t=this.needsUpdate();if(Object(_.a)("layer.update",this,t),!t)return;const e=this.props,n=this.context,r=this.internalState,i=n.viewport,o=this._updateUniformTransition();r.propsInTransition=o,n.viewport=r.viewport||i,this.props=o;try{const t=this._getUpdateParams(),o=this.getModels();if(n.gl)this.updateState(t);else try{this.updateState(t)}catch(a){}for(const e of this.props.extensions)e.updateState.call(this,t,e);const s=this.getModels()[0]!==o[0];this._postUpdate(t,s)}finally{n.viewport=i,this.props=e,this._clearChangeFlags(),r.needsUpdate=!1,r.resetOldProps()}}_finalize(){Object(_.a)("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,i=this.context;this.props=this.internalState.propsInTransition||r;const o=this.props.opacity;e.opacity=Math.pow(o,1/2.2);try{t&&this.setModuleParameters(t);const{getPolygonOffset:o}=this.props,a=o&&o(e)||[0,0];Object(A.n)(i.gl,{polygonOffset:a}),Object(A.o)(i.gl,n,(()=>{const r={moduleParameters:t,uniforms:e,parameters:n,context:i};for(const t of this.props.extensions)t.draw.call(this,r,t);this.draw(r)}))}finally{this.props=r}}getChangeFlags(){var t;return null===(t=this.internalState)||void 0===t?void 0:t.changeFlags}setChangeFlags(t){if(!this.internalState)return;const{changeFlags:e}=this.internalState;for(const r in t)if(t[r]){let n=!1;if("dataChanged"===r){const i=t[r],o=e[r];i&&Array.isArray(o)&&(e.dataChanged=Array.isArray(i)?o.concat(i):i,n=!0)}e[r]||(e[r]=t[r],n=!0),n&&Object(_.a)("layer.changeFlag",this,r,t)}const n=Boolean(e.dataChanged||e.updateTriggersChanged||e.propsChanged||e.extensionsChanged);e.propsOrDataChanged=n,e.somethingChanged=n||e.viewportChanged||e.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=Object(y.b)(t,e);if(n.updateTriggersChanged)for(const i in n.updateTriggersChanged)n.updateTriggersChanged[i]&&this.invalidateAttribute(i);if(n.transitionsChanged)for(const i in n.transitionsChanged){var r;this.internalState.uniformTransitions.add(i,e[i],t[i],null===(r=t.transitions)||void 0===r?void 0:r[i])}return this.setChangeFlags(n)}validateProps(){Object(y.c)(this.props)}updateAutoHighlight(t){this.props.autoHighlight&&!Number.isInteger(this.props.highlightedObjectIndex)&&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()}_getAttributeManager(){const t=this.context;return new o.a(t.gl,{id:this.props.id,stats:t.stats,timeline:t.timeline})}_postUpdate(t,e){const{props:n,oldProps:r}=t;this.setNeedsRedraw(),this._updateAttributes();const{model:i}=this.state;null===i||void 0===i||i.setInstanceCount(this.getNumInstances());const{autoHighlight:o,highlightedObjectIndex:a,highlightColor:s}=n;if(e||r.autoHighlight!==o||r.highlightedObjectIndex!==a||r.highlightColor!==s){const t={};o||(t.pickingSelectedColor=null),Array.isArray(s)&&(t.pickingHighlightColor=s),(e||a!==r.highlightedObjectIndex)&&(t.pickingSelectedColor=Number.isFinite(a)&&a>=0?this.encodePickingColor(a):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}_onAsyncPropUpdated(){this._diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}Object(r.a)(Q,"defaultProps",J),Object(r.a)(Q,"layerName","Layer")},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var r=n(1),i=n(608),o=n(315),a=n(50);class s{constructor(t,e){Object(r.a)(this,"opts",void 0),Object(r.a)(this,"source",void 0),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(111),l=n(55),c=n(27);function f(t){return t.stride||t.size*t.bytesPerElement}function h(t,e){e.offset&&c.a.removed("shaderAttribute.offset","vertexOffset, elementOffset")();const n=f(t),r=(void 0!==e.vertexOffset?e.vertexOffset:t.vertexOffset||0)*n+(e.elementOffset||0)*t.bytesPerElement+(t.offset||0);return{...e,offset:r,stride:n}}var p=n(42),d=n(87),m=n(108);const g=[],y=[[0,1/0]];var v=n(65);class b extends class{constructor(t,e,n){Object(r.a)(this,"gl",void 0),Object(r.a)(this,"id",void 0),Object(r.a)(this,"size",void 0),Object(r.a)(this,"settings",void 0),Object(r.a)(this,"value",void 0),Object(r.a)(this,"doublePrecision",void 0),Object(r.a)(this,"_buffer",void 0),Object(r.a)(this,"state",void 0),this.gl=t,this.id=e.id||"",this.size=e.size||1;const a=e.logicalType||e.type,s=5130===a;let u,{defaultValue:l}=e;l=Number.isFinite(l)?[l]:l||new Array(this.size).fill(0),u=s?5126:!a&&e.isIndexed?t&&Object(i.b)(t,o.a.ELEMENT_INDEX_UINT32)?5125:5123:a||5126;let c=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")}}(a||u||5126);this.doublePrecision=s,s&&!1===e.fp64&&(c=Float32Array),this.value=null,this.settings={...e,defaultType:c,defaultValue:l,logicalType:a,type:u,size:this.size,bytesPerElement:c.BYTES_PER_ELEMENT},this.state={...n,externalBuffer:null,bufferAccessor:this.settings,allocatedValue:null,numInstances:0,bounds:null,constant:!1},this._buffer=null}get isConstant(){return this.state.constant}get buffer(){if(!this._buffer){const{isIndexed:t,type:e}=this.settings;this._buffer=new a.a(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*f(t):0}get numInstances(){return this.state.numInstances}set numInstances(t){this.state.numInstances=t}delete(){this._buffer&&(this._buffer.delete(),this._buffer=null),u.a.release(this.state.allocatedValue)}getShaderAttributes(t,e){if(this.doublePrecision){const n={},r=this.value instanceof Float64Array,i=function(t,e){const n=h(t,e);return{high:n,low:{...n,offset:n.offset+4*t.size}}}(this.getAccessor(),e||{});return n[t]=new s(this,i.high),n["".concat(t,"64Low")]=r?new s(this,i.low):new Float32Array(this.size),n}if(e){const n=h(this.getAccessor(),e);return{[t]:new s(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}getBounds(){if(this.state.bounds)return this.state.bounds;let t=null;if(this.state.constant&&this.value){const e=Array.from(this.value);t=[e,e]}else{const{value:e,numInstances:n,size:r}=this,i=n*r;if(e&&i&&e.length>=i){const n=new Array(r).fill(1/0),o=new Array(r).fill(-1/0);for(let t=0;t<i;)for(let i=0;i<r;i++){const r=e[t++];r<n[i]&&(n[i]=r),r>o[i]&&(o[i]=r)}t=[n,o]}}return this.state.bounds=t,t}setData(t){const{state:e}=this;let n;n=ArrayBuffer.isView(t)?{value:t}:t instanceof a.a?{buffer:t}:t;const r={...this.settings,...n};if(e.bufferAccessor=r,e.bounds=null,n.constant){let t=n.value;t=this._normalizeValue(t,[],0),this.settings.normalized&&(t=this.normalizeConstant(t));if(!(!e.constant||!this._areValuesEqual(t,this.value)))return!1;e.externalBuffer=null,e.constant=!0,this.value=t}else if(n.buffer){const t=n.buffer;e.externalBuffer=t,e.constant=!1,this.value=n.value||null;const i=n.value instanceof Float64Array;r.type=n.type||t.accessor.type,r.bytesPerElement=t.accessor.BYTES_PER_ELEMENT*(i?2:1),r.stride=f(r)}else if(n.value){this._checkExternalBuffer(n);let t=n.value;e.externalBuffer=null,e.constant=!1,this.value=t,r.bytesPerElement=t.BYTES_PER_ELEMENT,r.stride=f(r);const{buffer:i,byteOffset:o}=this;this.doublePrecision&&t instanceof Float64Array&&(t=Object(l.f)(t,r));const a=t.byteLength+o+2*r.stride;i.byteLength<a&&i.reallocate(a),i.setAccessor(null),i.subData({data:t,offset:o}),r.type=n.type||i.accessor.type}return!0}updateSubBuffer(t={}){this.state.bounds=null;const e=this.value,{startOffset:n=0,endOffset:r}=t;this.buffer.subData({data:this.doublePrecision&&e instanceof Float64Array?Object(l.f)(e,{size:this.size,startIndex:n,endIndex:r}):e.subarray(n,r),offset:n*e.BYTES_PER_ELEMENT+this.byteOffset})}allocate(t,e=!1){const{state:n}=this,r=n.allocatedValue,i=u.a.allocate(r,t+1,{size:this.size,type:this.settings.defaultType,copy:e});this.value=i;const{buffer:o,byteOffset:a}=this;return o.byteLength<i.byteLength+a&&(o.reallocate(i.byteLength+a),e&&r&&o.subData({data:r instanceof Float64Array?Object(l.f)(r,this):r,offset:a})),n.allocatedValue=i,n.constant=!1,n.externalBuffer=null,n.bufferAccessor=this.settings,!0}_checkExternalBuffer(t){const{value:e}=t;if(!ArrayBuffer.isView(e))throw new Error("Attribute ".concat(this.id," value is not TypedArray"));const n=this.settings.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||c.a.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,{startIndices:null,lastExternalBuffer:null,binaryValue:null,binaryAccessor:null,needsUpdate:!0,needsRedraw:!1,updateRanges:y}),Object(r.a)(this,"constant",!1),this.settings.update=e.update||(e.accessor?this._autoUpdater:void 0),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,r=Array.isArray(e)?t[e.find((e=>t[e]))]:t[e];return Object(v.e)(r,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===y)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=y}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=g}setNeedsRedraw(t=this.id){this.state.needsRedraw=this.state.needsRedraw||t}allocate(t){const{state:e,settings:n}=this;return!n.noAlloc&&(!!n.update&&(super.allocate(t,e.updateRanges!==y),!0))}updateBuffer({numInstances:t,data:e,props:n,context:r}){if(!this.needsUpdate())return!1;const{state:{updateRanges:i},settings:{update:o,noAlloc:a}}=this;let s=!0;if(o){for(const[a,s]of i)o.call(r,this,{data:e,startRow:a,endRow:s,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):a||!Number.isFinite(t)?this.value.length:t*this.size;super.updateSubBuffer({startOffset:r,endOffset:i})}else;this._checkAttributeArray()}else s=!1;return this.clearNeedsUpdate(),this.setNeedsRedraw(),s}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();if(r.transform||e!==this.startIndices){ArrayBuffer.isView(t)&&(t={value:t});const i=t;Object(p.a)(ArrayBuffer.isView(i.value),"invalid ".concat(r.accessor));const o=Boolean(i.size)&&i.size!==this.size;return n.binaryAccessor=Object(d.b)(i.value,{size:i.size||this.size,stride:i.stride,offset:i.offset,startIndices:e,nested:o}),!1}return this.clearNeedsUpdate(),this.setData(t),!0}getVertexOffset(t){const{startIndices:e}=this;return(e?t<e.length?e[t]:this.numInstances: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:a,state:s,value:u,size:l,startIndices:c}=t,{accessor:f,transform:h}=a,g=s.binaryAccessor||("function"===typeof f?f:i[f]);Object(p.a)("function"===typeof g,'accessor "'.concat(f,'" is not a function'));let y=t.getVertexOffset(n);const{iterable:v,objectInfo:b}=Object(d.a)(e,n,r);for(const p of v){b.index++;let e=g(p,b);if(h&&(e=h.call(this,e)),c){const n=(b.index<c.length-1?c[b.index+1]:o)-c[b.index];if(e&&Array.isArray(e[0])){let n=y;for(const r of e)t._normalizeValue(r,u,n),n+=l}else e&&e.length>l?u.set(e,y):(t._normalizeValue(e,b.target,0),Object(m.a)({target:u,source:b.target,start:y,count:n}));y+=n*l}else t._normalizeValue(e,u,y),y+=l}}_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))}}}var _=n(46),A=n(1531),w=n(122);const x="\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";var E=n(411),O=n(173),S=n(123);const P={interpolation:class{constructor({gl:t,attribute:e,timeline:n}){Object(r.a)(this,"gl",void 0),Object(r.a)(this,"type","interpolation"),Object(r.a)(this,"attributeInTransition",void 0),Object(r.a)(this,"settings",void 0),Object(r.a)(this,"attribute",void 0),Object(r.a)(this,"transition",void 0),Object(r.a)(this,"currentStartIndices",void 0),Object(r.a)(this,"currentLength",void 0),Object(r.a)(this,"transform",void 0),Object(r.a)(this,"buffers",void 0),this.gl=t,this.transition=new w.a(n),this.attribute=e,this.attributeInTransition=new b(t,e.settings),this.currentStartIndices=e.startIndices,this.currentLength=0,this.transform=function(t,e){const n=Object(v.c)(e.size);return new A.a(t,{vs:x,defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(t,e);const i={byteLength:0,usage:35050};this.buffers=[new a.a(t,i),new a.a(t,i)]}get inProgress(){return this.transition.inProgress}start(t,e){if(t.duration<=0)return void this.transition.cancel();this.settings=t;const{gl:n,buffers:r,attribute:i}=this;Object(v.a)(r);const o={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter};for(const a of r)Object(v.f)({buffer:a,...o});this.currentStartIndices=i.startIndices,this.currentLength=Object(v.b)(i,e),this.attributeInTransition.setData({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:Object(v.d)(n,i)},feedbackBuffers:{vCurrent:r[1]}})}update(){const t=this.transition.update();if(t){const{duration:t,easing:e}=this.settings,{time:n}=this.transition;let r=n/t;e&&(r=e(r)),this.transform.run({uniforms:{time:r}})}return t}cancel(){this.transition.cancel(),this.transform.delete();for(const t of this.buffers)t.delete();this.buffers.length=0}},spring:class{constructor({gl:t,attribute:e,timeline:n}){Object(r.a)(this,"gl",void 0),Object(r.a)(this,"type","spring"),Object(r.a)(this,"attributeInTransition",void 0),Object(r.a)(this,"settings",void 0),Object(r.a)(this,"attribute",void 0),Object(r.a)(this,"transition",void 0),Object(r.a)(this,"currentStartIndices",void 0),Object(r.a)(this,"currentLength",void 0),Object(r.a)(this,"texture",void 0),Object(r.a)(this,"framebuffer",void 0),Object(r.a)(this,"transform",void 0),Object(r.a)(this,"buffers",void 0),this.gl=t,this.type="spring",this.transition=new w.a(n),this.attribute=e,this.attributeInTransition=new b(t,{...e.settings,normalized:!1}),this.currentStartIndices=e.startIndices,this.currentLength=0,this.texture=function(t){return new O.a(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 S.a(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=Object(v.c)(e.size);return new A.a(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 i={byteLength:0,usage:35050};this.buffers=[new a.a(t,i),new a.a(t,i),new a.a(t,i)]}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 a of r)Object(v.f)({buffer:a,...o});this.settings=t,this.currentStartIndices=i.startIndices,this.currentLength=Object(v.b)(i,e),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start({...t,duration:1/0}),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:Object(v.d)(n,i)}})}update(){const{buffers:t,transform:e,framebuffer:n,transition:r}=this;if(!r.update())return!1;const i=this.settings;e.update({sourceBuffers:{aPrev:t[0],aCur:t[1]},feedbackBuffers:{vNext:t[2]}}),e.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:i.stiffness,damping:i.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),Object(v.a)(t),this.attributeInTransition.setData({buffer:t[1],value:this.attribute.value});return Object(E.c)(n)[0]>0||r.end(),!0}cancel(){this.transition.cancel(),this.transform.delete();for(const t of this.buffers)t.delete();this.buffers.length=0,this.texture.delete(),this.framebuffer.delete()}}};class C{constructor(t,{id:e,timeline:n}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"isSupported",void 0),Object(r.a)(this,"gl",void 0),Object(r.a)(this,"timeline",void 0),Object(r.a)(this,"transitions",void 0),Object(r.a)(this,"needsRedraw",void 0),Object(r.a)(this,"numInstances",void 0),this.id=e,this.gl=t,this.timeline=n,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=A.a.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 c.a.warn("WebGL2 not supported by this browser. Transition for ".concat(t," is disabled."))();r&&this._removeTransition(t);const o=P[n.type];o?this.transitions[t]=new o({attribute:e,timeline:this.timeline,gl:this.gl}):(c.a.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||e.needsRedraw())&&(this.needsRedraw=!0,this.transitions[t].start(n,this.numInstances))}}const T="attributeManager.invalidate";class k{constructor(t,{id:e="attribute-manager",stats:n,timeline:i}={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"gl",void 0),Object(r.a)(this,"attributes",void 0),Object(r.a)(this,"updateTriggers",void 0),Object(r.a)(this,"needsRedraw",void 0),Object(r.a)(this,"userData",void 0),Object(r.a)(this,"stats",void 0),Object(r.a)(this,"attributeTransitionManager",void 0),this.id=e,this.gl=t,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=n,this.attributeTransitionManager=new C(t,{id:"".concat(e,"-transitions"),timeline:i}),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(){this.needsRedraw=!0}add(t){this._add(t)}addInstanced(t){this._add(t,{instanced:1})}remove(t){for(const e of t)void 0!==this.attributes[e]&&(this.attributes[e].delete(),delete this.attributes[e])}invalidate(t,e){const n=this._invalidateTrigger(t,e);Object(_.a)(T,this,t,n)}invalidateAll(t){for(const e in this.attributes)this.attributes[e].setNeedsUpdate(e,t);Object(_.a)(T,this,"all")}update({data:t,numInstances:e,startIndices:n=null,transitions:r,props:i={},buffers:o={},context:a={}}){let s=!1;Object(_.a)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const u in this.attributes){const r=this.attributes[u],l=r.settings.accessor;r.startIndices=n,r.numInstances=e,i[u]&&c.a.removed("props.".concat(u),"data.attributes.".concat(u))(),r.setExternalBuffer(o[u])||r.setBinaryValue("string"===typeof l?o[l]:void 0,t.startIndices)||"string"===typeof l&&!o[l]&&r.setConstantValue(i[l])||r.needsUpdate()&&(s=!0,this._updateAttribute({attribute:r,numInstances:e,data:t,props:i,context:a})),this.needsRedraw=this.needsRedraw||r.needsRedraw()}s&&Object(_.a)("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}_add(t,e={}){for(const n in t){const r=t[n];this.attributes[n]=this._createAttribute(n,r,e)}this._mapUpdateTriggersToAttributes()}_createAttribute(t,e,n){const r={...e,id:t,size:(e.isIndexed?1:e.size)||1,divisor:n.instanced?1:e.divisor||0};return new b(this.gl,r)}_mapUpdateTriggersToAttributes(){const t={};for(const e in this.attributes){this.attributes[e].getUpdateTriggers().forEach((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(Object(_.a)("attribute.updateStart",e),e.constant)return void e.setConstantValue(e.value);e.allocate(n)&&Object(_.a)("attribute.allocate",e,n);e.updateBuffer(t)&&(this.needsRedraw=!0,Object(_.a)("attribute.updateEnd",e,n))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(1),i=n(1446),o=n(31),a=n(27),s=n(46),u=n(108),l=n(124),c=n(1529);class f{constructor(t,e,n){Object(r.a)(this,"id",void 0),Object(r.a)(this,"context",void 0),Object(r.a)(this,"isLoaded",void 0),Object(r.a)(this,"persistent",void 0),Object(r.a)(this,"_loadCount",0),Object(r.a)(this,"_subscribers",new Set),Object(r.a)(this,"_data",void 0),Object(r.a)(this,"_loader",void 0),Object(r.a)(this,"_error",void 0),Object(r.a)(this,"_content",void 0),this.id=t,this.context=n,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=Object(c.a)(t)),r instanceof Promise?(this.isLoaded=!1,this._loader=r.then((t=>{this._loadCount===n&&(this.isLoaded=!0,this._error=void 0,this._content=t)})).catch((t=>{this._loadCount===n&&(this.isLoaded=!0,this._error=t||!0)}))):(this.isLoaded=!0,this._error=void 0,this._content=t);for(const i of this._subscribers)i.onChange(this.getData())}}class h{constructor({gl:t,protocol:e}){Object(r.a)(this,"protocol",void 0),Object(r.a)(this,"_context",void 0),Object(r.a)(this,"_resources",void 0),Object(r.a)(this,"_consumers",void 0),Object(r.a)(this,"_pruneRequest",void 0),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 f(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],r=this._resources[n.resourceId];r&&r.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 a=i[t];if(this._track(n,r,a,e),a)return a.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]||{},a=o[e]||{},s=a.resourceId&&this._resources[a.resourceId];s&&(s.unsubscribe(a),this.prune()),n&&(o[e]=a,a.onChange=r,a.resourceId=n.id,n.subscribe(a))}_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 p=n(76),d=n(352);class m{constructor(t,{deck:e,stats:n,viewport:o,timeline:a}={}){Object(r.a)(this,"layers",void 0),Object(r.a)(this,"context",void 0),Object(r.a)(this,"resourceManager",void 0),Object(r.a)(this,"_lastRenderedLayers",[]),Object(r.a)(this,"_needsRedraw",!1),Object(r.a)(this,"_needsUpdate",!1),Object(r.a)(this,"_nextLayers",null),Object(r.a)(this,"_debug",!1),Object(r.a)(this,"activateViewport",(t=>{Object(s.a)("layerManager.activateViewport",this,t),t&&(this.context.viewport=t)})),this.layers=[],this.resourceManager=new h({gl:t,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,gl:t,deck:e,programManager:t&&Object(d.a)(t),stats:n||new l.a({id:"deck.gl"}),viewport:o||new p.a({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:a||new i.a,resourceManager:this.resourceManager,onError:void 0},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}={}){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){Object(s.a)("layerManager.setLayers",this,e,t),this._lastRenderedLayers=t;const n=Object(u.b)(t,Boolean);for(const r of n)r.context=this.context;this._updateLayers(this.layers,n)}updateLayers(){const t=this.needsUpdate();t&&(this.setNeedsRedraw("updating layers: ".concat(t)),this.setLayers(this._nextLayers||this._lastRenderedLayers,t)),this._nextLayers=null}_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]?a.a.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="Uniform transition in ".concat(o);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&&a.a.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():null}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=o.e.INITIALIZED}catch(e){this._handleError("initialization",e,t)}}_transferLayerState(t,e){e._transferState(t),e.lifecycle=o.e.MATCHED,e!==t&&(t.lifecycle=o.e.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=o.e.AWAITING_FINALIZATION;try{t._finalize(),t.lifecycle=o.e.FINALIZED}catch(e){this._handleError("finalization",e,t)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(46),i=n(15),o=n(129);class a extends o.a{shouldDrawLayer(t){return t.props.operation===i.c.DRAW}}var s=n(311),u=n(123);class l{constructor(t){this.gl=t,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new a(t),this.pickLayersPass=new s.a(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||u.a.getDefaultFramebuffer(this.gl),this._preRender(t.effects,t);const n=this.lastPostProcessEffect?this.renderBuffers[0]:t.target,i=e.render({...t,target:n});this._postRender(t.effects,t),this.renderCount++,Object(r.a)("deckRenderer.renderLayers",this,i,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 u.a(this.gl),new u.a(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]}}}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,n(e,r)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=n(91).Plugin,l=n(256),c=n(932),f=n(522),h=n(935),p=n(936),d=n(644);t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).startUpload=function(){return r.uppy.upload().catch((function(){}))},r.id=r.opts.id||"StatusBar",r.title="StatusBar",r.type="progressindicator",r.defaultLocale={strings:{uploading:"Uploading",upload:"Upload",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",retryUpload:"Retry upload",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"}}};return r.opts=o({},{target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null},n),r.i18nInit(),r.render=r.render.bind(a(r)),r.install=r.install.bind(a(r)),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var i=r.prototype;return i.setOptions=function(e){t.prototype.setOptions.call(this,e),this.i18nInit()},i.i18nInit=function(){this.translator=new l([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.setPluginState()},i.getTotalSpeed=function(t){var e=0;return t.forEach((function(t){e+=h(t.progress)})),e},i.getTotalETA=function(t){var e=this.getTotalSpeed(t);if(0===e)return 0;var n=t.reduce((function(t,e){return t+p(e.progress)}),0);return Math.round(n/e*10)/10},i.getUploadingState=function(t,e,n){if(t)return f.STATE_ERROR;if(e)return f.STATE_COMPLETE;for(var r=f.STATE_WAITING,i=Object.keys(n),o=0;o<i.length;o++){var a=n[i[o]].progress;if(a.uploadStarted&&!a.uploadComplete)return f.STATE_UPLOADING;a.preprocess&&r!==f.STATE_UPLOADING&&(r=f.STATE_PREPROCESSING),a.postprocess&&r!==f.STATE_UPLOADING&&r!==f.STATE_PREPROCESSING&&(r=f.STATE_POSTPROCESSING)}return r},i.render=function(t){var e=t.capabilities,n=t.files,r=t.allowNewUpload,i=t.totalProgress,o=t.error,a=Object.keys(n).map((function(t){return n[t]})),s=a.filter((function(t){return!t.progress.uploadStarted&&!t.progress.preprocess&&!t.progress.postprocess})),u=a.filter((function(t){return t.progress.uploadStarted})).filter((function(t){return t.isPaused})),l=a.filter((function(t){return t.progress.uploadComplete})),f=a.filter((function(t){return t.error})),h=a.filter((function(t){return!t.progress.uploadComplete&&t.progress.uploadStarted})),p=h.filter((function(t){return!t.isPaused})),d=a.filter((function(t){return t.progress.uploadStarted||t.progress.preprocess||t.progress.postprocess})),m=a.filter((function(t){return t.progress.preprocess||t.progress.postprocess})),g=this.getTotalETA(p),y=0,v=0;d.forEach((function(t){y+=t.progress.bytesTotal||0,v+=t.progress.bytesUploaded||0}));var b=d.length>0,_=100===i&&l.length===Object.keys(n).length&&0===m.length,A=o&&f.length===a.length,w=0!==h.length&&u.length===h.length,x=h.length>0,E=e.resumableUploads||!1,O=!1!==e.uploadProgress;return c({error:o,uploadState:this.getUploadingState(A,_,t.files||{}),allowNewUpload:r,totalProgress:i,totalSize:y,totalUploadedSize:v,isAllComplete:_,isAllPaused:w,isAllErrored:A,isUploadStarted:b,isUploadInProgress:x,complete:l.length,newFiles:s.length,numUploads:d.length,totalETA:g,files:n,i18n:this.i18n,pauseAll:this.uppy.pauseAll,resumeAll:this.uppy.resumeAll,retryAll:this.uppy.retryAll,cancelAll:this.uppy.cancelAll,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:E,supportsUploadProgress:O,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})},i.onMount=function(){var t=this.el;d(t)||(t.dir="ltr")},i.install=function(){var t=this.opts.target;t&&this.mount(t,this)},i.uninstall=function(){this.unmount()},r}(u),r.VERSION="1.9.3",i)},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var r=n(1),i=n(15),o=n(357),a=n(491),s=n(492),u=n(366),l=n(130),c=n(24),f=n(12);const h=new Uint16Array([0,2,1,0,3,2]),p=new Float32Array([0,1,0,0,1,0,1,1]);function d(t,e){if(!e)return function(t){const e=new Float64Array(12);for(let n=0;n<t.length;n++)e[3*n+0]=t[n][0],e[3*n+1]=t[n][1],e[3*n+2]=t[n][2]||0;return{vertexCount:6,positions:e,indices:h,texCoords:p}}(t);const n=Math.max(Math.abs(t[0][0]-t[3][0]),Math.abs(t[1][0]-t[2][0])),r=Math.max(Math.abs(t[1][1]-t[0][1]),Math.abs(t[2][1]-t[3][1])),i=Math.ceil(n/e)+1,o=Math.ceil(r/e)+1,a=(i-1)*(o-1)*6,s=new Uint32Array(a),u=new Float32Array(i*o*2),l=new Float64Array(i*o*3);let c=0,f=0;for(let h=0;h<i;h++){const e=h/(i-1);for(let n=0;n<o;n++){const r=n/(o-1),i=m(t,e,r);l[3*c+0]=i[0],l[3*c+1]=i[1],l[3*c+2]=i[2]||0,u[2*c+0]=e,u[2*c+1]=1-r,h>0&&n>0&&(s[f++]=c-o,s[f++]=c-o-1,s[f++]=c-1,s[f++]=c-o,s[f++]=c-1,s[f++]=c),c++}}return{vertexCount:a,positions:l,indices:s,texCoords:u}}function m(t,e,n){return Object(f.n)(Object(f.n)(t[0],t[1],n),Object(f.n)(t[3],t[2],n),e)}var g="\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n  float x = lnglat.x;\n  float y = clamp(lnglat.y, -89.9, 89.9);\n  return vec2(\n    radians(x) + PI,\n    PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n  ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n  xy /= WORLD_SCALE;\n  return degrees(vec2(\n    xy.x - PI,\n    atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n  ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n  float luminance = (color.r + color.g + color.b) * 0.333333333;\n  return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n  return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n  return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvec2 getUV(vec2 pos) {\n  return vec2(\n    (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n    (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n  );\n}\n\n".concat("\nvec3 packUVsIntoRGB(vec2 uv) {\n  // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n  vec2 uv8bit = floor(uv * 256.);\n\n  // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n  // Scale and clamp to 0-1 range\n  vec2 uvFraction = fract(uv * 256.);\n  vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n  // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n  float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n  return vec3(uv8bit, fractions) / 255.;\n}\n","\n\nvoid main(void) {\n  vec2 uv = vTexCoord;\n  if (coordinateConversion < -0.5) {\n    vec2 lnglat = mercator_to_lnglat(vTexPos);\n    uv = getUV(lnglat);\n  } else if (coordinateConversion > 0.5) {\n    vec2 commonPos = lnglat_to_mercator(vTexPos);\n    uv = getUV(commonPos);\n  }\n  vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n  gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n  geometry.uv = uv;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n  if (picking_uActive) {\n    // Since instance information is not used, we can use picking color for pixel index\n    gl_FragColor.rgb = packUVsIntoRGB(uv);\n  }\n}\n");const y={image:{type:"image",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},_imageCoordinateSystem:i.a.DEFAULT,desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]}};class v extends o.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"\n#define SHADER_NAME bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float coordinateConversion;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n  geometry.worldPosition = positions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = pickingColor;\n\n  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vTexCoord = texCoords;\n\n  if (coordinateConversion < -0.5) {\n    vTexPos = geometry.position.xy + project_uCommonOrigin.xy;\n  } else if (coordinateConversion > 0.5) {\n    vTexPos = geometry.worldPosition.xy;\n  }\n\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:g,modules:[a.a,s.a]})}initializeState(){const t=this.getAttributeManager();t.remove(["instancePickingColors"]);const e=!0;t.add({indices:{size:1,isIndexed:!0,update:t=>t.value=this.state.mesh.indices,noAlloc:e},positions:{size:3,type:5130,fp64:this.use64bitPositions(),update:t=>t.value=this.state.mesh.positions,noAlloc:e},texCoords:{size:2,update:t=>t.value=this.state.mesh.texCoords,noAlloc:e}})}updateState({props:t,oldProps:e,changeFlags:n}){const r=this.getAttributeManager();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()}if(t.bounds!==e.bounds){const t=this.state.mesh,e=this._createMesh();this.state.model.setVertexCount(e.vertexCount);for(const n in e)t&&t[n]!==e[n]&&r.invalidate(n);this.setState({mesh:e,...this._getCoordinateUniforms()})}else t._imageCoordinateSystem!==e._imageCoordinateSystem&&this.setState(this._getCoordinateUniforms())}getPickingInfo(t){const{image:e}=this.props,n=t.info;if(!n.color||!e)return n.bitmap=null,n;const{width:r,height:i}=e;n.index=0;const o=function(t){const[e,n,r]=t;return[(e+(15&r)/16)/256,(n+(240&r)/256)/256]}(n.color),a=[Math.floor(o[0]*r),Math.floor(o[1]*i)];return n.bitmap={size:{width:r,height:i},uv:o,pixel:a},n}disablePickingIndex(){this.setState({disablePicking:!0})}restorePickingColors(){this.setState({disablePicking:!1})}_updateAutoHighlight(t){super._updateAutoHighlight({...t,color:this.encodePickingColor(0)})}_createMesh(){const{bounds:t}=this.props;let e=t;return b(t)&&(e=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]]]),d(e,this.context.viewport.resolution)}_getModel(t){return t?new u.a(t,{...this.getShaders(),id:this.props.id,geometry:new l.a({drawMode:4,vertexCount:6}),isInstanced:!1}):null}draw(t){const{uniforms:e,moduleParameters:n}=t,{model:r,coordinateConversion:i,bounds:o,disablePicking:a}=this.state,{image:s,desaturate:u,transparentColor:l,tintColor:c}=this.props;n.pickingActive&&a||s&&r&&r.setUniforms(e).setUniforms({bitmapTexture:s,desaturate:u,transparentColor:l.map((t=>t/255)),tintColor:c.slice(0,3).map((t=>t/255)),coordinateConversion:i,bounds:o}).draw()}_getCoordinateUniforms(){const{LNGLAT:t,CARTESIAN:e,DEFAULT:n}=i.a;let{_imageCoordinateSystem:r}=this.props;if(r!==n){const{bounds:n}=this.props;if(!b(n))throw new Error("_imageCoordinateSystem only supports rectangular bounds");const i=this.context.viewport.resolution?t:e;if(r=r===t?t:e,r===t&&i===e)return{coordinateConversion:-1,bounds:n};if(r===e&&i===t){const t=Object(c.m)([n[0],n[1]]),e=Object(c.m)([n[2],n[3]]);return{coordinateConversion:1,bounds:[t[0],t[1],e[0],e[1]]}}}return{coordinateConversion:0,bounds:[0,0,0,0]}}}function b(t){return Number.isFinite(t[0])}Object(r.a)(v,"layerName","BitmapLayer"),Object(r.a)(v,"defaultProps",y)},function(t,e,n){"use strict";e.a=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1);class i{constructor(t,e={id:"pass"}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"gl",void 0),Object(r.a)(this,"props",void 0);const{id:n}=e;this.id=n,this.gl=t,this.props={...e}}setProps(t){Object.assign(this.props,t)}render(t){}cleanup(){}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var r=n(6),i=n(410),o=n(73),a=n(10),s=n(316),u=n(1533),l=n(104),c=n(50),f=n(59);let h=null;function p(t,e){var n;return new t((n=t.BYTES_PER_ELEMENT*e,(!h||h.byteLength<n)&&(h=new ArrayBuffer(n)),h),0,e)}var d=n(1430);class m extends f.a{get[Symbol.toStringTag](){return"VertexArrayObject"}static isSupported(t){return!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).constantAttributeZero||(Object(r.j)(t)||"Chrome"===Object(d.a)())}static getDefaultArray(t){return t.luma=t.luma||{},t.luma.defaultVertexArray||(t.luma.defaultVertexArray=new m(t,{handle:null,isDefaultArray:!0})),t.luma.defaultVertexArray}static getMaxAttributes(t){return m.MAX_ATTRIBUTES=m.MAX_ATTRIBUTES||t.getParameter(34921),m.MAX_ATTRIBUTES}static setConstant(t,e,n){switch(n.constructor){case Float32Array:m._setConstantFloatArray(t,e,n);break;case Int32Array:m._setConstantIntArray(t,e,n);break;case Uint32Array:m._setConstantUintArray(t,e,n);break;default:Object(a.a)(!1)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 m.getMaxAttributes(this.gl)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(t)}setProps(t){return this}setElementBuffer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Object(a.a)(!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:u,normalized:l,integer:c,divisor:f}=n,{gl:h,gl2:p}=this;return t=Number(t),this.bind((()=>{h.bindBuffer(34962,e.handle),c?(Object(a.a)(Object(r.j)(h)),p.vertexAttribIPointer(t,i,o,s,u)):h.vertexAttribPointer(t,i,o,l,s,u),h.enableVertexAttribArray(t),p.vertexAttribDivisor(t,f||0)})),this}enable(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!e&&0===t&&!m.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 c.a(this.gl,r),o=o||this.buffer.reallocate(r),o=o||!this._compareConstantArrayValues(n,this.bufferValue),o){const t=p(e.constructor,i);!function(t){let{target:e,source:n,start:r=0,count:i=1}=t;const o=n.length,a=i*o;let s=0;for(let u=r;s<o;s++)e[u++]=n[s];for(;s<a;)s<a-s?(e.copyWithin(r+s,r,r+s),s*=2):(e.copyWithin(r+s,r,r+a-s),s=a)}({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:Object(a.a)(!1)}}static _setConstantIntArray(t,e,n){switch(Object(a.a)(Object(r.j)(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:Object(a.a)(!1)}}static _setConstantUintArray(t,e,n){switch(Object(a.a)(Object(r.j)(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:Object(a.a)(!1)}}_createHandle(){return this.gl.createVertexArray()}_deleteHandle(t){return this.gl2.deleteVertexArray(t),[this.elements]}_bindHandle(t){this.gl2.bindVertexArray(t)}_getParameter(t,e){let{location:n}=e;return Object(a.a)(Number.isFinite(n)),this.bind((()=>34373===t?this.gl.getVertexAttribOffset(n,t):this.gl.getVertexAttrib(n,t)))}}var g=n(308);const y=/^(.+)__LOCATION_([0-9]+)$/,v=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"];class b{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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={},this.vertexArrayObject=new m(t),Object(g.a)(this,"VertexArray","v6.0",v),this.initialize(e),Object.seal(this)}delete(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=t,this.elementsAccessor=e,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(t,e),this}setBuffer(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};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 c.a(this.gl,{accessor:{size:4}});for(let t=0;t<this.vertexArrayObject.MAX_ATTRIBUTES;t++)this.values[t]instanceof c.a&&(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 c.a&&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 o={location:-1,accessor:null},{location:s,name:u}=this._getAttributeIndex(t);if(!Number.isFinite(s)||s<0)return this.unused[t]=e,r.k.once(3,(()=>"unused value ".concat(t," in ").concat(this.id)))(),o;const c=this._getAttributeInfo(u||s);if(!c)return o;const f=this.accessors[s]||{},h=l.a.resolve(c.accessor,f,n,i),{size:p,type:d}=h;return Object(a.a)(Number.isFinite(p)&&Number.isFinite(d)),{location:s,accessor:h}}_getAttributeInfo(t){return this.configuration&&this.configuration.getAttributeInfo(t)}_getAttributeIndex(t){const e=Number(t);if(Number.isFinite(e))return{location:e};const n=y.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 c.a)this.setBuffer(t,e);else if(Array.isArray(e)&&e.length&&e[0]instanceof c.a){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 c.a))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(m.isSupported(this.gl,{constantAttributeZero:!0}))return void this._setConstantAttribute(0,t);const n=this.vertexArrayObject.getConstantBuffer(e,t);this.vertexArrayObject.setBuffer(0,n,this.accessors[0])}_setConstantAttribute(t,e){m.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 c.a){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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.k.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(t,e)}}var _=n(1431),A=n(74),w=n(137);function x(t,e){const{maxElts:n=16,size:r=1}=e;let i="[";for(let a=0;a<t.length&&a<n;++a)a>0&&(i+=",".concat(a%r===0?" ":"")),i+=E(t[a],e);const o=t.length>n?"...":"]";return"".concat(i).concat(o)}function E(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=1e-16,{isInteger:r=!1}=e;if(Array.isArray(t)||ArrayBuffer.isView(t))return x(t,e);if(!Number.isFinite(t))return String(t);if(Math.abs(t)<n)return r?"0":"0.";if(r)return t.toFixed(0);if(Math.abs(t)>100&&Math.abs(t)<1e4)return t.toFixed(0);const i=t.toPrecision(2),o=i.indexOf(".0");return o===i.length-2?i.slice(0,-1):i}function O(t,e,n,r){const{gl:i}=t;if(!e)return{[r]:"null","Format ":"N/A"};let o,a,s,u="NOT PROVIDED",l=1,f=0,h=0;if(n&&(u=n.type,l=n.size,u=String(u).replace("Array",""),o=-1!==u.indexOf("nt")),e instanceof c.a){const t=e,{data:c,changed:p}=t.getDebugData();let d;if(a=p?"*":"",s=c,h=t.byteLength,f=h/c.BYTES_PER_ELEMENT/l,n){const t=n.divisor>0;d="".concat(t?"I ":"P "," ").concat(f," (x").concat(l,"=").concat(h," bytes ").concat(Object(A.a)(i,u),")")}else o=!0,d="".concat(h," bytes");return{[r]:"".concat(a).concat(E(s,{size:l,isInteger:o})),"Format ":d}}return s=e,l=e.length,u=String(e.constructor.name).replace("Array",""),o=-1!==u.indexOf("nt"),{[r]:"".concat(E(s,{size:l,isInteger:o})," (constant)"),"Format ":"".concat(l,"x").concat(u," (constant)")}}function S(t,e){const{type:n,size:r}=e,i=Object(w.b)(n,r);return i?"".concat(t," (").concat(i.name,")"):t}function P(t){let{header:e="Uniforms",program:n,uniforms:r,undefinedOnly:i=!1}=t;Object(a.a)(n);const o=".*Matrix",s=n._uniformSetters,u={},l=Object.keys(s).sort();let c=0;for(const a of l)a.match(".*_.*")||a.match(o)||C({table:u,header:e,uniforms:r,uniformName:a,undefinedOnly:i})&&c++;for(const a of l)a.match(o)&&C({table:u,header:e,uniforms:r,uniformName:a,undefinedOnly:i})&&c++;for(const a of l)u[a]||C({table:u,header:e,uniforms:r,uniformName:a,undefinedOnly:i})&&c++;let f=0;const h={};if(!i)for(const a in r){const t=r[a];u[a]||(f++,h[a]={Type:"NOT USED: ".concat(t),[e]:E(t)})}return{table:u,count:c,unusedTable:h,unusedCount:f}}function C(t){let{table:e,header:n,uniforms:r,uniformName:i,undefinedOnly:o}=t;const a=r[i],s=function(t){return void 0!==t&&null!==t}(a);return(!o||!s)&&(e[i]={[n]:s?E(a):"N/A","Uniform Type":s?a:"NOT PROVIDED"},!0)}function T(t){const{type:e,size:n}=t.accessor,r=Object(w.b)(e,n);return r?"".concat(r.name," ").concat(t.name):t.name}const k={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function I(t,e){const{attributeMap:n=k}=e||{};return n&&n[t]||t}function L(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}Object(a.a)(Number.isFinite(e.size),"attribute ".concat(t," needs size"))}const j=()=>{},M={};class R{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{id:n=Object(o.c)("model")}=e;Object(a.a)(Object(r.i)(t)),this.id=n,this.gl=t,this.id=e.id||Object(o.c)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(e)}initialize(t){this.props={},this.programManager=t.programManager||i.a.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;const{program:e=null,vs:n,fs:r,modules:o,defines:s,inject:u,varyings:l,bufferMode:c,transpileToGLSL100:f}=t;this.programProps={program:e,vs:n,fs:r,modules:o,defines:s,inject:u,varyings:l,bufferMode:c,transpileToGLSL100:f},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={},Object(a.a)(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:a,varyings:s,bufferMode:u,transpileToGLSL100:l}=t;this.programProps={program:e,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:u,transpileToGLSL100:l},this._programDirty=!0}getUniforms(){return this.uniforms}setDrawMode(t){return this.drawMode=t,this}setVertexCount(t){return Object(a.a)(Number.isFinite(t)),this.vertexCount=t,this}setInstanceCount(t){return Object(a.a)(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],s=I(o,n);if("indices"===o)i=a;else if(a.constant)r[s]=a.value;else{const e=a.value,n={...a};delete n.value,r[s]=[new c.a(t,e),n],L(o,n)}}if(i){const e=i.value||i;Object(a.a)(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 c.a(t,{data:e,target:34963}),n]}return r}(this.gl,t),this.vertexArray.setAttributes(this.geometryBuffers),this}setAttributes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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 Object(s.a)(this.program.gl,t),this}draw(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();const{moduleSettings:e=null,framebuffer:n,uniforms:i={},attributes:o={},transformFeedback:a=this.transformFeedback,parameters:s={},vertexArray:u=this.vertexArray}=t;let l;this.setAttributes(o),this.updateModuleSettings(e),this.setUniforms(i),r.k.priority>=2&&(l=this._logDrawCallStart(2));const c=this.vertexArray.getDrawParams(),{isIndexed:f=c.isIndexed,indexType:h=c.indexType,indexOffset:p=c.indexOffset,vertexArrayInstanced:d=c.isInstanced}=this.props;d&&!this.isInstanced&&r.k.warn("Found instanced attributes on non-instanced model",this.id)();const{isInstanced:m,instanceCount:g}=this,{onBeforeRender:y=j,onAfterRender:v=j}=this.props;y(),this.program.setUniforms(this.uniforms);const b=this.program.draw(Object.assign(M,t,{logPriority:l,uniforms:null,framebuffer:n,parameters:s,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:u,transformFeedback:a,isIndexed:f,indexType:h,isInstanced:m,instanceCount:g,offset:f?p:0}));return v(),r.k.priority>=2&&this._logDrawCallEnd(l,u,n),b}transform(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.k.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:a,bufferMode:s,transpileToGLSL100:u}=this.programProps;t=this.programManager.get({vs:e,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:u}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}Object(a.a)(t instanceof u.a,"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 b(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 c.a&&e.delete()}}_setAnimationProps(t){this.animated&&Object(a.a)(t,"Model.draw(): animated uniforms but no animationProps")}_setFeedbackBuffers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(t))return this;const{gl:e}=this.program;return this.transformFeedback=this.transformFeedback||new _.a(e,{program:this.program}),this.transformFeedback.setBuffers(t),this}_logDrawCallStart(t){const e=t>3?0:1e4;if(!(Date.now()-this.lastLogTime<e))return this.lastLogTime=Date.now(),r.k.group(2,">>> DRAWING MODEL ".concat(this.id),{collapsed:r.k.level<=2})(),t}_logDrawCallEnd(t,e,n,i){if(void 0===t)return;const o=function(t){let{vertexArray:e,header:n="Attributes"}=t;if(!e.configuration)return{};const r={};e.elements&&(r.ELEMENT_ARRAY_BUFFER=O(e,e.elements,null,n));const i=e.values;for(const o in i){const t=e._getAttributeInfo(o);if(t){let a="".concat(o,": ").concat(t.name);const s=e.accessors[t.location];s&&(a="".concat(o,": ").concat(S(t.name,s))),r[a]=O(e,i[o],s,n)}}return r}({vertexArray:e,header:"".concat(this.id," attributes"),attributes:this._attributes}),{table:a,unusedTable:s,unusedCount:u}=P({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),{table:l,count:c}=P({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0});c>0&&r.k.log("MISSING UNIFORMS",Object.keys(l))(),u>0&&r.k.log("UNUSED UNIFORMS",Object.keys(s))();const f=function(t){const e={},n="Accessors for ".concat(t.id);for(const r of t.attributeInfos)if(r){const t=T(r);e["in ".concat(t)]={[n]:JSON.stringify(r.accessor)}}for(const r of t.varyingInfos)if(r){const t=T(r);e["out ".concat(t)]={[n]:JSON.stringify(r.accessor)}}return e}(this.vertexArray.configuration);r.k.table(t,o)(),r.k.table(t,a)(),r.k.table(t+1,f)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),r.k.groupEnd(2)()}}},function(t,e,n){"use strict";n.r(e),n.d(e,"toGid",(function(){return r}));var r=function(t){switch(t.type){case"record":return"gid://app/Record/".concat(t.id);case"collection":case"trail":case"route":case"timeline":return"gid://app/Humap::Collections::Collection/".concat(t.id);case"overlay":return"gid://app/Humap::Overlays::OverlayGroup/".concat(t.id);case"user":return"gid://app/User/".concat(t.id);case"project":return"gid://app/Humap::Projects::Project/".concat(t.id)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1),i=n(357),o=n(46),a=n(108);class s extends i.a{get isComposite(){return!0}get isLoaded(){return super.isLoaded&&this.getSubLayers().every((t=>t.isLoaded))}getSubLayers(){return this.internalState&&this.internalState.subLayers||[]}initializeState(t){}setState(t){super.setState(t),this.setNeedsUpdate()}getPickingInfo({info:t}){const{object:e}=t;return e&&e.__source&&e.__source.parent&&e.__source.parent.id===this.id?(t.object=e.__source.object,t.index=e.__source.index,t):t}filterSubLayer(t){return!0}shouldRenderSubLayer(t,e){return e&&e.length}getSubLayerClass(t,e){const{_subLayerProps:n}=this.props;return n&&n[t]&&n[t].type||e}getSubLayerRow(t,e,n){return t.__source={parent:this,object:e,index:n},t}getSubLayerAccessor(t){if("function"===typeof t){const e={index:-1,data:this.props.data,target:[]};return(n,r)=>n&&n.__source?(e.index=n.__source.index,t(n.__source.object,e)):t(n,r)}return t}getSubLayerProps(t={}){var e;const{opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:s,autoHighlight:u,highlightColor:l,coordinateSystem:c,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:d,extensions:m,fetch:g,operation:y,_subLayerProps:v}=this.props,b={id:"",updateTriggers:{},opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:s,autoHighlight:u,highlightColor:l,coordinateSystem:c,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:d,extensions:m,fetch:g,operation:y},_=v&&t.id&&v[t.id],A=_&&_.updateTriggers,w=t.id||"sublayer";if(_){const e=this.constructor._propTypes,n=t.type?t.type._propTypes:{};for(const t in _){const r=n[t]||e[t];r&&"accessor"===r.type&&(_[t]=this.getSubLayerAccessor(_[t]))}}Object.assign(b,t,_),b.id="".concat(this.props.id,"-").concat(w),b.updateTriggers={all:null===(e=this.props.updateTriggers)||void 0===e?void 0:e.all,...t.updateTriggers,...A};for(const x of m){const t=x.getSubLayerProps.call(this,x);t&&Object.assign(b,t,{updateTriggers:Object.assign(b.updateTriggers,t.updateTriggers)})}return b}_updateAutoHighlight(t){for(const e of this.getSubLayers())e.updateAutoHighlight(t)}_getAttributeManager(){return null}_postUpdate(t,e){let n=this.internalState.subLayers;const r=!n||this.needsUpdate();if(r){const t=this.renderLayers();n=Object(a.b)(t,Boolean),this.internalState.subLayers=n}Object(o.a)("compositeLayer.renderLayers",this,r,n);for(const i of n)i.parent=this}}Object(r.a)(s,"layerName","CompositeLayer")},function(t,e,n){"use strict";t.exports=i;var r=n(881);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o=4294967296,a=1/o,s="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function u(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function l(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function c(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function f(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function m(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function g(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function y(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function v(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function b(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function _(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function A(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=_(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=_(this.buf,this.pos)+_(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=_(this.buf,this.pos)+w(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return l(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return l(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return l(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return l(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return l(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return l(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&s?function(t,e,n){return s.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){var r="",i=e;for(;i<n;){var o,a,s,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(l=u):2===c?128===(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),A(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),A(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),A(this.buf,-1&t,this.pos),A(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),A(this.buf,-1&t,this.pos),A(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;if(e.buf[e.pos++]|=n|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&c(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&c(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,b,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,n){"use strict";n.r(e),n.d(e,"getCoord",(function(){return i})),n.d(e,"getCoords",(function(){return o})),n.d(e,"containsNumber",(function(){return a})),n.d(e,"geojsonType",(function(){return s})),n.d(e,"featureOf",(function(){return u})),n.d(e,"collectionOf",(function(){return l})),n.d(e,"getGeom",(function(){return c})),n.d(e,"getType",(function(){return f}));var r=n(60);function i(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")}function o(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function a(t){if(t.length>1&&Object(r.isNumber)(t[0])&&Object(r.isNumber)(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return a(t[0]);throw new Error("coordinates must only contain numbers")}function s(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}function u(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function l(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=t.features;r<i.length;r++){var o=i[r];if(!o||"Feature"!==o.type||!o.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!o.geometry||o.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+o.geometry.type)}}function c(t){return"Feature"===t.type?t.geometry:t}function f(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(200),o=n(45),a=n(8),s=n.n(a);function u(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(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 l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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 c(){c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}var f=r.types.model("Layer",{id:r.types.integer,name:r.types.string,url:r.types.string,bbox_sw:r.types.maybeNull(r.types.string),bbox_ne:r.types.maybeNull(r.types.string),min_zoom:r.types.maybeNull(r.types.integer),max_zoom:r.types.maybeNull(r.types.integer),type:r.types.string,color:r.types.maybeNull(r.types.optional(r.types.string,"#ff0000")),fill_polygons:r.types.boolean,line_width:r.types.number,point_radius:r.types.number,polygon_opacity:r.types.number,show_pattern:r.types.maybeNull(r.types.boolean),mask_pattern:r.types.boolean,pattern_name:r.types.maybeNull(r.types.string),latitude:r.types.maybeNull(r.types.number),longitude:r.types.maybeNull(r.types.number),position:r.types.optional(r.types.number,-1),state:r.types.maybeNull(r.types.string),sgid:r.types.maybeNull(r.types.string),tiling_errors:r.types.maybeNull(r.types.frozen({}))}).volatile((function(t){return{opacity:.75,disabled:!1,tentative:!1,field_bbox_sw:"",field_bbox_ne:"",isEditingBounds:!1,isExpanded:!1,isVisible:!0,isDrawingRectangle:!1,tilingProgress:0}})).views((function(t){return{get hasContent(){return t.name&&t.type&&t.color&&null!==t.line_width&&null!==t.point_radius&&t.url},get layerOpacity(){return t.disabled?0:t.opacity},get boundsForZoom(){return[t.field_bbox_ne.split(",").map((function(t){return parseFloat(t.trim())})),t.field_bbox_sw.split(",").map((function(t){return parseFloat(t.trim())}))]}}})).actions((function(t){return{afterCreate:function(){t.pollUntilCondition(),t.field_bbox_ne=t.bbox_ne?h(t.bbox_ne):"",t.field_bbox_sw=t.bbox_sw?h(t.bbox_sw):""},saveLayer:Object(r.flow)(c().mark((function e(){var n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object(r.getRoot)(t)).setLoading(!0),e.prev=2,e.next=5,fetch("/overlays/layer/".concat(t.id,"/update"),{method:"PATCH",headers:n.requestHeaders,body:JSON.stringify({overlay:t,overlay_group_id:Object(r.getParent)(t,2).id})});case 5:return o=e.sent,e.next=8,o.json();case 8:i=e.sent,console.log(i),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.error("Error creating overlay:",e.t0);case 15:return e.prev=15,n.setLoading(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])}))),reorderLayer:Object(r.flow)(c().mark((function e(){var n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object(r.getRoot)(t)).setLoading(!0),e.prev=2,e.next=5,fetch("/overlays/layer/".concat(t.id,"/reorder"),{method:"PATCH",headers:n.requestHeaders,body:JSON.stringify({overlay:t,overlay_group_id:Object(r.getParent)(t,2).id,position:t.position+1})});case 5:return o=e.sent,e.next=8,o.json();case 8:i=e.sent,console.log(i),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.error("Error reordering layer:",e.t0);case 15:return e.prev=15,n.setLoading(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])}))),destroyLayer:Object(r.flow)(c().mark((function e(){var n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object(r.getRoot)(t)).setLoading(!0),e.prev=2,e.next=5,fetch("/overlays/layer/".concat(t.id,"/destroy"),{method:"DELETE",headers:n.requestHeaders});case 5:return o=e.sent,e.next=8,o.json();case 8:i=e.sent,console.log(i),Object(r.getParent)(t,2).removeLayer(t),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),console.error("Error destroying overlay:",e.t0);case 17:return e.prev=17,n.setLoading(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[2,14,17,20]])}))),debouncedSave:Object(i.debounce)((function(){return t.saveLayer()}),500),setAttribute:function(e,n){t[e]=n,t.debouncedSave()},setVolatile:function(e,n){t[e]=n},toggleVolatile:function(e){t[e]=!t[e]},setBboxValue:function(e,n){t["field_".concat(e)]=n,t.setAttribute(e,function(t){if(!t.trim())return null;if(/[^0-9.,\s-]/.test(t))return null;var e=u(t.split(",").map((function(t){return t.trim()})),2),n=e[0],r=e[1],i=parseFloat(n),o=parseFloat(r);if(isNaN(i)||isNaN(o)||i<-90||i>90||o<-180||o>180)return null;return"POINT (".concat(o," ").concat(i,")")}(n))},drawNewRectangle:function(){t.setBboxValue("bbox_sw",""),t.setBboxValue("bbox_ne",""),t.setIsDrawingRectangle(!0),Object(r.getRoot)(t).setMessage(s.a.t("components.overlay_creator.tip_draw_rectangle"))},setIsDrawingRectangle:function(e){t.isDrawingRectangle=e,Object(r.getRoot)(t).setPopoversDisabled(e)},clearMessage:function(){Object(r.getRoot)(t).clearMessage()},toggleFillPolygons:function(){t.fill_polygons=!t.fill_polygons,t.debouncedSave()},pollUntilCondition:Object(r.flow)(c().mark((function e(){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("processing"!==t.state){e.next=21;break}return e.prev=1,e.next=4,fetch("/overlays/layer/".concat(t.id,"/state"));case 4:return n=e.sent,e.next=7,n.json();case 7:r=e.sent,t.state=r.state,"processed"===r.state&&(t.url=r.url),r.tiling_progress&&(t.tilingProgress=r.tiling_progress),r.tiling_errors&&(t.tiling_errors=r.tiling_errors),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(1),console.error("Error occurred:",e.t0);case 17:return e.next=19,new Promise((function(t){return setTimeout(t,3e3)}));case 19:e.next=0;break;case 21:case"end":return e.stop()}}),e,null,[[1,14]])})))}})),h=function(t){if("string"!==typeof t||""===t.trim())return null;var e=t.match(/-?\d+\.\d+/g);return!e||e.length<2?null:Object(o.point)(e.map(Number)).geometry.coordinates.reverse().join(", ")};e.default=f},function(t,e,n){"use strict";(function(t,r){function i(t){return i="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},i(t)}function o(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){a(t,e,n[e])}))}return t}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.d(e,"a",(function(){return It})),n.d(e,"b",(function(){return kt}));var l=function(){},c={},f={},h={mark:l,measure:l};try{"undefined"!==typeof window&&(c=window),"undefined"!==typeof document&&(f=document),"undefined"!==typeof MutationObserver&&MutationObserver,"undefined"!==typeof performance&&(h=performance)}catch(Lt){}var p=(c.navigator||{}).userAgent,d=void 0===p?"":p,m=c,g=f,y=h,v=(m.document,!!g.documentElement&&!!g.head&&"function"===typeof g.addEventListener&&"function"===typeof g.createElement),b=(~d.indexOf("MSIE")||d.indexOf("Trident/"),"svg-inline--fa"),_="data-fa-i2svg",A=(function(){try{}catch(Lt){return!1}}(),[1,2,3,4,5,6,7,8,9,10]),w=A.concat([11,12,13,14,15,16,17,18,19,20]),x={GROUP:"group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},E=(["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter",x.GROUP,x.SWAP_OPACITY,x.PRIMARY,x.SECONDARY].concat(A.map((function(t){return"".concat(t,"x")}))).concat(w.map((function(t){return"w-".concat(t)}))),m.FontAwesomeConfig||{});if(g&&"function"===typeof g.querySelector){[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((function(t){var e=u(t,2),n=e[0],r=e[1],i=function(t){return""===t||"false"!==t&&("true"===t||t)}(function(t){var e=g.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}(n));void 0!==i&&null!==i&&(E[r]=i)}))}var O=s({},{familyPrefix:"fa",replacementClass:b,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},E);O.autoReplaceSvg||(O.observeMutations=!1);var S=s({},O);m.FontAwesomeConfig=S;var P=m||{};P.___FONT_AWESOME___||(P.___FONT_AWESOME___={}),P.___FONT_AWESOME___.styles||(P.___FONT_AWESOME___.styles={}),P.___FONT_AWESOME___.hooks||(P.___FONT_AWESOME___.hooks={}),P.___FONT_AWESOME___.shims||(P.___FONT_AWESOME___.shims=[]);var C=P.___FONT_AWESOME___,T=[];v&&((g.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(g.readyState)||g.addEventListener("DOMContentLoaded",(function t(){g.removeEventListener("DOMContentLoaded",t),1,T.map((function(t){return t()}))})));var k,I="pending",L="settled",j="fulfilled",M="rejected",R=function(){},N="undefined"!==typeof t&&"undefined"!==typeof t.process&&"function"===typeof t.process.emit,D="undefined"===typeof r?setTimeout:r,F=[];function B(){for(var t=0;t<F.length;t++)F[t][0](F[t][1]);F=[],k=!1}function z(t,e){F.push([t,e]),k||(k=!0,D(B,0))}function U(t){var e=t.owner,n=e._state,r=e._data,i=t[n],o=t.then;if("function"===typeof i){n=j;try{r=i(r)}catch(Lt){H(o,Lt)}}G(o,r)||(n===j&&V(o,r),n===M&&H(o,r))}function G(t,e){var n;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"===typeof e||"object"===i(e))){var r=e.then;if("function"===typeof r)return r.call(e,(function(r){n||(n=!0,e===r?q(t,r):V(t,r))}),(function(e){n||(n=!0,H(t,e))})),!0}}catch(Lt){return n||H(t,Lt),!0}return!1}function V(t,e){t!==e&&G(t,e)||q(t,e)}function q(t,e){t._state===I&&(t._state=L,t._data=e,z(X,t))}function H(t,e){t._state===I&&(t._state=L,t._data=e,z(Y,t))}function W(t){t._then=t._then.forEach(U)}function X(t){t._state=j,W(t)}function Y(e){e._state=M,W(e),!e._handled&&N&&t.process.emit("unhandledRejection",e._data,e)}function Z(e){t.process.emit("rejectionHandled",e)}function K(t){if("function"!==typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof K===!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(t,e){function n(t){H(e,t)}try{t((function(t){V(e,t)}),n)}catch(Lt){n(Lt)}}(t,this)}K.prototype={constructor:K,_state:I,_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(R),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,this._state===M&&N&&z(Z,this)),this._state===j||this._state===M?z(U,n):this._then.push(n),n.then},catch:function(t){return this.then(null,t)}},K.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new K((function(e,n){var r=[],i=0;function o(t){return i++,function(n){r[t]=n,--i||e(r)}}for(var a,s=0;s<t.length;s++)(a=t[s])&&"function"===typeof a.then?a.then(o(s),n):r[s]=a;i||e(r)}))},K.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new K((function(e,n){for(var r,i=0;i<t.length;i++)(r=t[i])&&"function"===typeof r.then?r.then(e,n):e(r)}))},K.resolve=function(t){return t&&"object"===i(t)&&t.constructor===K?t:new K((function(e){e(t)}))},K.reject=function(t){return new K((function(e,n){n(t)}))};var $={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function J(t){if(t&&v){var e=g.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var n=g.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return g.head.insertBefore(e,r),t}}function Q(){for(var t=12,e="";t-- >0;)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return e}function tt(t){return"".concat(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function et(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,": ").concat(t[n],";")}),"")}function nt(t){return t.size!==$.size||t.x!==$.x||t.y!==$.y||t.rotate!==$.rotate||t.flipX||t.flipY}function rt(t){var e=t.transform,n=t.containerWidth,r=t.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(32*e.x,", ").concat(32*e.y,") "),a="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),s="rotate(".concat(e.rotate," 0 0)");return{outer:i,inner:{transform:"".concat(o," ").concat(a," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}var it={x:0,y:0,width:"100%",height:"100%"};function ot(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function at(t){var e=t.icons,n=e.main,r=e.mask,i=t.prefix,o=t.iconName,a=t.transform,u=t.symbol,l=t.title,c=t.maskId,f=t.titleId,h=t.extra,p=t.watchable,d=void 0!==p&&p,m=r.found?r:n,g=m.width,y=m.height,v="fak"===i,b=v?"":"fa-w-".concat(Math.ceil(g/y*16)),A=[S.replacementClass,o?"".concat(S.familyPrefix,"-").concat(o):"",b].filter((function(t){return-1===h.classes.indexOf(t)})).filter((function(t){return""!==t||!!t})).concat(h.classes).join(" "),w={children:[],attributes:s({},h.attributes,{"data-prefix":i,"data-icon":o,class:A,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(y)})},x=v&&!~h.classes.indexOf("fa-fw")?{width:"".concat(g/y*16*.0625,"em")}:{};d&&(w.attributes[_]=""),l&&w.children.push({tag:"title",attributes:{id:w.attributes["aria-labelledby"]||"title-".concat(f||Q())},children:[l]});var E=s({},w,{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:u,styles:s({},x,h.styles)}),O=r.found&&n.found?function(t){var e,n=t.children,r=t.attributes,i=t.main,o=t.mask,a=t.maskId,u=t.transform,l=i.width,c=i.icon,f=o.width,h=o.icon,p=rt({transform:u,containerWidth:f,iconWidth:l}),d={tag:"rect",attributes:s({},it,{fill:"white"})},m=c.children?{children:c.children.map(ot)}:{},g={tag:"g",attributes:s({},p.inner),children:[ot(s({tag:c.tag,attributes:s({},c.attributes,p.path)},m))]},y={tag:"g",attributes:s({},p.outer),children:[g]},v="mask-".concat(a||Q()),b="clip-".concat(a||Q()),_={tag:"mask",attributes:s({},it,{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[d,y]},A={tag:"defs",children:[{tag:"clipPath",attributes:{id:b},children:(e=h,"g"===e.tag?e.children:[e])},_]};return n.push(A,{tag:"rect",attributes:s({fill:"currentColor","clip-path":"url(#".concat(b,")"),mask:"url(#".concat(v,")")},it)}),{children:n,attributes:r}}(E):function(t){var e=t.children,n=t.attributes,r=t.main,i=t.transform,o=et(t.styles);if(o.length>0&&(n.style=o),nt(i)){var a=rt({transform:i,containerWidth:r.width,iconWidth:r.width});e.push({tag:"g",attributes:s({},a.outer),children:[{tag:"g",attributes:s({},a.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:s({},r.icon.attributes,a.path)}]}]})}else e.push(r.icon);return{children:e,attributes:n}}(E),P=O.children,C=O.attributes;return E.children=P,E.attributes=C,u?function(t){var e=t.prefix,n=t.iconName,r=t.children,i=t.attributes,o=t.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:s({},i,{id:!0===o?"".concat(e,"-").concat(S.familyPrefix,"-").concat(n):o}),children:r}]}]}(E):function(t){var e=t.children,n=t.main,r=t.mask,i=t.attributes,o=t.styles,a=t.transform;if(nt(a)&&n.found&&!r.found){var u={x:n.width/n.height/2,y:.5};i.style=et(s({},o,{"transform-origin":"".concat(u.x+a.x/16,"em ").concat(u.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:e}]}(E)}var st=function(){},ut=(S.measurePerformance&&y&&y.mark&&y.measure,function(t,e,n,r){var i,o,a,s=Object.keys(t),u=s.length,l=void 0!==r?function(t,e){return function(n,r,i,o){return t.call(e,n,r,i,o)}}(e,r):e;for(void 0===n?(i=1,a=t[s[0]]):(i=0,a=n);i<u;i++)a=l(a,t[o=s[i]],o,t);return a});function lt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,i=void 0!==r&&r,o=Object.keys(e).reduce((function(t,n){var r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t}),{});"function"!==typeof C.hooks.addPack||i?C.styles[t]=s({},C.styles[t]||{},o):C.hooks.addPack(t,o),"fas"===t&&lt("fa",e)}var ct=C.styles,ft=C.shims,ht=function(){var t=function(t){return ut(ct,(function(e,n,r){return e[r]=ut(n,t,{}),e}),{})};t((function(t,e,n){return e[3]&&(t[e[3]]=n),t})),t((function(t,e,n){var r=e[2];return t[n]=n,r.forEach((function(e){t[e]=n})),t}));var e="far"in ct;ut(ft,(function(t,n){var r=n[0],i=n[1],o=n[2];return"far"!==i||e||(i="fas"),t[r]={prefix:i,iconName:o},t}),{})};ht();C.styles;function pt(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}function dt(t){var e=t.tag,n=t.attributes,r=void 0===n?{}:n,i=t.children,o=void 0===i?[]:i;return"string"===typeof t?tt(t):"<".concat(e," ").concat(function(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,'="').concat(tt(t[n]),'" ')}),"").trim()}(r),">").concat(o.map(dt).join(""),"</").concat(e,">")}var mt=function(t){var e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t?t.toLowerCase().split(" ").reduce((function(t,e){var n=e.toLowerCase().split("-"),r=n[0],i=n.slice(1).join("-");if(r&&"h"===i)return t.flipX=!0,t;if(r&&"v"===i)return t.flipY=!0,t;if(i=parseFloat(i),isNaN(i))return t;switch(r){case"grow":t.size=t.size+i;break;case"shrink":t.size=t.size-i;break;case"left":t.x=t.x-i;break;case"right":t.x=t.x+i;break;case"up":t.y=t.y-i;break;case"down":t.y=t.y+i;break;case"rotate":t.rotate=t.rotate+i}return t}),e):e};function gt(t){this.name="MissingIcon",this.message=t||"Icon unavailable",this.stack=(new Error).stack}gt.prototype=Object.create(Error.prototype),gt.prototype.constructor=gt;var yt={fill:"currentColor"},vt={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},bt={tag:"path",attributes:s({},yt,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},_t=s({},vt,{attributeName:"opacity"});s({},yt,{cx:"256",cy:"364",r:"28"}),s({},vt,{attributeName:"r",values:"28;14;28;28;14;28;"}),s({},_t,{values:"1;0;1;1;0;1;"}),s({},yt,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),s({},_t,{values:"1;0;0;0;0;1;"}),s({},yt,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),s({},_t,{values:"0;0;1;1;0;0;"}),C.styles;function At(t){var e=t[0],n=t[1],r=u(t.slice(4),1)[0];return{found:!0,width:e,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(S.familyPrefix,"-").concat(x.GROUP)},children:[{tag:"path",attributes:{class:"".concat(S.familyPrefix,"-").concat(x.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(S.familyPrefix,"-").concat(x.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}C.styles;function wt(){var t="fa",e=b,n=S.familyPrefix,r=S.replacementClass,i='svg:not(:root).svg-inline--fa {\n  overflow: visible;\n}\n\n.svg-inline--fa {\n  display: inline-block;\n  font-size: inherit;\n  height: 1em;\n  overflow: visible;\n  vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n  vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n  width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n  width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n  width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n  width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n  width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n  width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n  width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n  width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n  width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n  width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n  width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n  width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n  width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n  width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n  width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n  width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n  width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n  width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n  width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n  width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n  margin-right: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n  margin-left: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-border {\n  height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n  width: 2em;\n}\n.svg-inline--fa.fa-fw {\n  width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.fa-layers {\n  display: inline-block;\n  height: 1em;\n  position: relative;\n  text-align: center;\n  vertical-align: -0.125em;\n  width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n  display: inline-block;\n  position: absolute;\n  text-align: center;\n}\n\n.fa-layers-text {\n  left: 50%;\n  top: 50%;\n  -webkit-transform: translate(-50%, -50%);\n          transform: translate(-50%, -50%);\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter {\n  background-color: #ff253a;\n  border-radius: 1em;\n  -webkit-box-sizing: border-box;\n          box-sizing: border-box;\n  color: #fff;\n  height: 1.5em;\n  line-height: 1;\n  max-width: 5em;\n  min-width: 1.5em;\n  overflow: hidden;\n  padding: 0.25em;\n  right: 0;\n  text-overflow: ellipsis;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n  bottom: 0;\n  right: 0;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom right;\n          transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n  bottom: 0;\n  left: 0;\n  right: auto;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom left;\n          transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n  right: 0;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-top-left {\n  left: 0;\n  right: auto;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top left;\n          transform-origin: top left;\n}\n\n.fa-lg {\n  font-size: 1.3333333333em;\n  line-height: 0.75em;\n  vertical-align: -0.0667em;\n}\n\n.fa-xs {\n  font-size: 0.75em;\n}\n\n.fa-sm {\n  font-size: 0.875em;\n}\n\n.fa-1x {\n  font-size: 1em;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-6x {\n  font-size: 6em;\n}\n\n.fa-7x {\n  font-size: 7em;\n}\n\n.fa-8x {\n  font-size: 8em;\n}\n\n.fa-9x {\n  font-size: 9em;\n}\n\n.fa-10x {\n  font-size: 10em;\n}\n\n.fa-fw {\n  text-align: center;\n  width: 1.25em;\n}\n\n.fa-ul {\n  list-style-type: none;\n  margin-left: 2.5em;\n  padding-left: 0;\n}\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  left: -2em;\n  position: absolute;\n  text-align: center;\n  width: 2em;\n  line-height: inherit;\n}\n\n.fa-border {\n  border: solid 0.08em #eee;\n  border-radius: 0.1em;\n  padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n  float: left;\n}\n\n.fa-pull-right {\n  float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n  margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n  margin-left: 0.3em;\n}\n\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n          animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n          animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n.fa-rotate-90 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n  -webkit-transform: rotate(90deg);\n          transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n  -webkit-transform: rotate(180deg);\n          transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n  -webkit-transform: rotate(270deg);\n          transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n  -webkit-transform: scale(-1, 1);\n          transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(1, -1);\n          transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(-1, -1);\n          transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n  -webkit-filter: none;\n          filter: none;\n}\n\n.fa-stack {\n  display: inline-block;\n  height: 2em;\n  position: relative;\n  width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n  height: 1em;\n  width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n  height: 2em;\n  width: 2.5em;\n}\n\n.fa-inverse {\n  color: #fff;\n}\n\n.sr-only {\n  border: 0;\n  clip: rect(0, 0, 0, 0);\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n  clip: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  position: static;\n  width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n  fill: var(--fa-primary-color, currentColor);\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n  fill: var(--fa-secondary-color, currentColor);\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n  fill: black;\n}\n\n.fad.fa-inverse {\n  color: #fff;\n}';if(n!==t||r!==e){var o=new RegExp("\\.".concat(t,"\\-"),"g"),a=new RegExp("\\--".concat(t,"\\-"),"g"),s=new RegExp("\\.".concat(e),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var xt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.definitions={}}var e,n,r;return e=t,n=[{key:"add",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n.reduce(this._pullDefinitions,{});Object.keys(i).forEach((function(e){t.definitions[e]=s({},t.definitions[e]||{},i[e]),lt(e,i[e]),ht()}))}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(t,e){var n=e.prefix&&e.iconName&&e.icon?{0:e}:e;return Object.keys(n).map((function(e){var r=n[e],i=r.prefix,o=r.iconName,a=r.icon;t[i]||(t[i]={}),t[i][o]=a})),t}}],n&&o(e.prototype,n),r&&o(e,r),t}();function Et(){S.autoAddCss&&!Tt&&(J(wt()),Tt=!0)}function Ot(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map((function(t){return dt(t)}))}}),Object.defineProperty(t,"node",{get:function(){if(v){var e=g.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function St(t){var e=t.prefix,n=void 0===e?"fa":e,r=t.iconName;if(r)return pt(Ct.definitions,n,r)||pt(C.styles,n,r)}var Pt,Ct=new xt,Tt=!1,kt={transform:function(t){return mt(t)}},It=(Pt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,r=void 0===n?$:n,i=e.symbol,o=void 0!==i&&i,a=e.mask,u=void 0===a?null:a,l=e.maskId,c=void 0===l?null:l,f=e.title,h=void 0===f?null:f,p=e.titleId,d=void 0===p?null:p,m=e.classes,g=void 0===m?[]:m,y=e.attributes,v=void 0===y?{}:y,b=e.styles,_=void 0===b?{}:b;if(t){var A=t.prefix,w=t.iconName,x=t.icon;return Ot(s({type:"icon"},t),(function(){return Et(),S.autoA11y&&(h?v["aria-labelledby"]="".concat(S.replacementClass,"-title-").concat(d||Q()):(v["aria-hidden"]="true",v.focusable="false")),at({icons:{main:At(x),mask:u?At(u.icon):{found:!1,width:null,height:null,icon:{}}},prefix:A,iconName:w,transform:s({},$,r),symbol:o,title:h,maskId:c,titleId:d,extra:{attributes:v,styles:_,classes:g}})}))}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(t||{}).icon?t:St(t||{}),r=e.mask;return r&&(r=(r||{}).icon?r:St(r||{})),Pt(n,s({},e,{mask:r}))})}).call(this,n(36),n(330).setImmediate)},function(t,e,n){t.exports={CollectionView:"CollectionView-module__CollectionView___2gGK1",CollectionViewTrayOverview:"CollectionView-module__CollectionViewTrayOverview___1r7oT",openTrayButton:"CollectionView-module__openTrayButton___2QKL5"}},function(t,e,n){t.exports={RecordView:"RecordView-module__RecordView___2eJu8",cta:"RecordView-module__cta___1YQIY",createdBy:"RecordView-module__createdBy___1G-Qh",sourcesList:"RecordView-module__sourcesList___3YfQm",RecordViewTrayOverview:"RecordView-module__RecordViewTrayOverview___3mhG9",openTrayButton:"RecordView-module__openTrayButton___3JKSv"}},function(t,e,n){t.exports={FormFieldTaxonomyNestedItem:"FormFieldTaxonomyNestedItem-module__FormFieldTaxonomyNestedItem___3mv5V",refineButton:"FormFieldTaxonomyNestedItem-module__refineButton___3DfLN",childTerms:"FormFieldTaxonomyNestedItem-module__childTerms___KIi5j","is-open":"FormFieldTaxonomyNestedItem-module__is-open___17krP",childTerm:"FormFieldTaxonomyNestedItem-module__childTerm___3wvmp",AllChecked:"FormFieldTaxonomyNestedItem-module__AllChecked___2c1cn",PartiallyChecked:"FormFieldTaxonomyNestedItem-module__PartiallyChecked___3K1Hp"}},function(t,e,n){t.exports={YearSlider:"YearSlider-module__YearSlider___337rp",number:"YearSlider-module__number___1NZuK",text:"YearSlider-module__text___16RJY"}},function(t,e,n){"use strict";n.r(e);var r=n(3),i=n.n(r),o=n(0),a=n.n(o),s=n(1079),u=["type","path"];function l(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}var c=function(t){var e=t.type,n=t.path,r=l(t,u);return Object(s.default)({type:e,path:n}),a.a.createElement(a.a.Fragment,null,r.children)};c.propTypes={user:i.a.object,query:i.a.string,term_ids:i.a.array,start_date:i.a.string,end_date:i.a.string,types:i.a.array,level:i.a.number.isRequired},c.defaultProps={level:0},e.default=c},function(t,e,n){"use strict";n.r(e),n.d(e,"FeatureLayerAnnotationField",(function(){return m})),n.d(e,"FeatureAnnotationFieldValue",(function(){return g}));var r=n(2),i=n(220),o=n(270),a=n(1084);function s(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 u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(){c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function f(){return f=Object.assign?Object.assign.bind():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},f.apply(this,arguments)}function h(t){return function(t){if(Array.isArray(t))return p(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)return;if("string"===typeof t)return p(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 p(t,e)}(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.")}()}function p(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 d=r.types.model("FeatureLayerAnnotationFieldOption",{id:r.types.number,name:r.types.string,options:r.types.array(r.types.late((function(){return d})),[]),parent_id:r.types.maybeNull(r.types.number)}).views((function(t){return{get flattened(){return[t.toJSON()].concat(h(t.options.map((function(t){return t.toJSON()}))))}}})),m=r.types.model("FeatureLayerAnnotationField",{id:r.types.identifierNumber,name:r.types.string,required:r.types.boolean,options:r.types.array(d,[]),html_tag:r.types.maybeNull(r.types.string),html_input_type:r.types.maybeNull(r.types.string),field_name:r.types.maybeNull(r.types.string),field_type:r.types.maybeNull(r.types.string),multi_choice:r.types.maybeNull(r.types.boolean,!1),nested:r.types.maybeNull(r.types.boolean,!1)}).volatile((function(t){return{currentValue:[]}})).views((function(t){return{get flattenedOptions(){return t.options.map((function(t){return t.flattened})).flat()},optionsForIds:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.flattenedOptions.filter((function(t){return e.map((function(t){return parseInt(t)})).indexOf(t.id)>-1}))}}})).actions((function(t){return{serializeValueFor:function(e){if("taxonomy"===t.field_type||"reference_layers_list"===t.field_type){if(t.multi_choice)if(e.checked)t.currentValue=t.currentValue.filter((function(t){return t})),t.currentValue=Array.from(new Set([].concat(h(t.currentValue),[e.value])));else{var n=t.currentValue.indexOf(e.value);n>-1?t.currentValue.splice(n,1):t.currentValue=[]}else{var r=t.optionsForIds([e.value])[0];r.parent_id?t.currentValue=[e.value,"".concat(r.parent_id)]:t.currentValue=[e.value]}return JSON.stringify(t.currentValue)}return"html"===t.field_type&&"checkbox"===t.html_input_type?JSON.stringify(e.checked):e.value},deserializeValueFor:function(e){return"taxonomy"===t.field_type||"reference_layers_list"===t.field_type?(t.currentValue=[].concat(JSON.parse(e)),t.currentValue):"html"===t.field_type&&"checkbox"===t.html_input_type?(t.currentValue=JSON.parse(e||!1),t.currentValue):(t.currentValue=e,t.currentValue)},deserializeReadOnlyValueFor:function(e){if("taxonomy"===t.field_type||"reference_layers_list"===t.field_type){var n=[].concat(JSON.parse(e)).map((function(t){return parseInt(t,10)}));if(n.length>1&&!t.multi_choice){var r,i,o,a=t.optionsForIds(n),s=a.filter((function(t){return t.parent_id})),u=a.filter((function(t){return!t.parent_id}));return s.length>0?"".concat(null===(r=s[0])||void 0===r?void 0:r.name," (").concat(null===(i=u[0])||void 0===i?void 0:i.name,")"):null===(o=a[0])||void 0===o?void 0:o.name}return t.optionsForIds(n).map((function(t){return t.name})).join(", ")}return"html"===t.field_type&&t.html_input_type,e},deserializeOverviewLabelFor:function(e){if("taxonomy"===t.field_type||"reference_layers_list"===t.field_type){var n=[].concat(JSON.parse(e)).map((function(t){return parseInt(t,10)}));if(n.length>1&&t.multi_choice)return"".concat(n.length," items");if(n.length>1&&!t.multi_choice){var r,i,o=t.optionsForIds(n),a=o.filter((function(t){return t.parent_id}));return a.length>0?null===(r=a[0])||void 0===r?void 0:r.name:null===(i=o[0])||void 0===i?void 0:i.name}if(1===n.length){n[0];return t.optionsForIds(n).map((function(t){return t.name}))[0]}return""}return"html"===t.field_type&&t.html_input_type,e}}})),g=r.types.model("FeatureAnnotationFieldValue",{value:r.types.maybeNull(r.types.union(r.types.string,r.types.boolean,r.types.number)),annotation_field:r.types.reference(m)}).volatile((function(t){return{initialValue:null}})).views((function(t){return{get isValid(){return!t.annotation_field.required||t.value&&t.value.length>0},get fieldValue(){return t.annotation_field.deserializeValueFor(t.value)},get htmlInputProps(){var e={onChange:t.onChange,type:t.annotation_field.html_input_type};return"html"===t.annotation_field.field_type&&"input"===t.annotation_field.html_tag&&"checkbox"===t.annotation_field.html_input_type?e.checked=t.fieldValue:e.value=t.fieldValue||"",e}}})).actions((function(t){return{afterCreate:function(){t.initialValue=t.value},onChange:function(e){var n=e.target;t.value=t.annotation_field.serializeValueFor(n)},onClear:function(){t.value=null},reset:function(){t.value=t.initialValue}}})),y=r.types.model("FeatureProperties",{shape:r.types.maybeNull(r.types.string),annotation_data:r.types.array(g,[])}),v=r.types.model("FeatureGeometry",{type:r.types.string,coordinates:r.types.frozen([])}),b=r.types.model("FeatureModel",{id:r.types.identifierNumber,properties:y,geometry:v,annotation_data:r.types.array(g,[]),embed_metadata:r.types.array(r.types.frozen(),[]),completed_by:r.types.maybeNull(r.types.string),validated_by:r.types.maybeNull(r.types.string),square_id:r.types.maybeNull(r.types.number),square_memorable_name:r.types.maybeNull(r.types.string),isHighlightedForUser:r.types.optional(r.types.boolean,!1)}).volatile((function(t){return{modified:!1}})).views((function(t){return{get toGeoJSON(){return{type:"Feature",properties:t.properties.toJSON(),geometry:t.geometry.toJSON()}},get toCentrePointGeoJSON(){return Object(a.default)(t.toGeoJSON)},get isValid(){return 0===t.annotation_data.filter((function(t){return t.annotation_field.required&&!t.isValid})).length},get needsAttention(){return 0===t.annotation_data.length||!t.isValid},get latestEmbedMetadata(){var e=Object(r.getRoot)(t).embedMetadata;return e?Object(o.addUniqueObjects)(t.embed_metadata,e):t.embed_metadata}}})).actions((function(t){return{setGeometry:function(e){t.geometry=e.geometry,t.modified=!0},copyAnnotationData:function(e){Object(r.getRoot)(t).putAnnotationDataOnClipboard(t.annotation_data.toJSON())},pasteAnnotationData:function(){t.annotation_data=Object(r.getRoot)(t).annotationDataClipboard,t.setupAnnotationData()},setIsHighlightedForUser:function(e){t.isHighlightedForUser=e},setupAnnotationData:function(){var e=Object(r.getParent)(t,2).annotation_field_data,n=[];e.forEach((function(e){var r=t.annotation_data.find((function(t){return e.id===t.annotation_field.id}));if(r)n.push(r);else{var i={value:"True / False"==e.name?"false":null,annotation_field:e.id};n.push(i)}})),t.annotation_data=n},resetAnnotationData:function(){t.annotation_data.map((function(t){return t.reset()}))},updateGeometry:Object(r.flow)(c().mark((function e(){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f({},t.properties),e.next=3,Object(i.updateFeatureGeometryMutation)({id:t.id,geometry:t.geometry,properties:n,embed_metadata:t.latestEmbedMetadata});case 3:t.modified=!1;case 4:case"end":return e.stop()}}),e)}))),updateAnnotationData:Object(r.flow)(c().mark((function e(){var n,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.isValid){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,Object(i.updateFeatureAnnotationDataMutation)({id:t.id,annotation_data:t.annotation_data,embed_metadata:t.latestEmbedMetadata});case 4:return n=e.sent,o=u(u({},t.toJSON()),{annotation_data:n.updated.annotation_data}),Object(r.applySnapshot)(t,o),t.modified=!1,e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}))),destroy:Object(r.flow)(c().mark((function e(){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(i.destroyFeatureMutation)({id:t.id});case 2:return n=e.sent,e.abrupt("return",null!==typeof n.destroyed);case 4:case"end":return e.stop()}}),e)})))}})).preProcessSnapshot((function(t){var e=u({},t);return e.hasOwnProperty("square")&&(e.completed_by=e.square.completed_by,e.validated_by=e.square.validated_by,e.square_memorable_name=e.square.memorable_name,delete e.square),e}));e.default=b},function(t,e,n){t.exports={ListPicker:"ListPicker-module__ListPicker___2ikan",valueDisplay:"ListPicker-module__valueDisplay___HtFZl",none:"ListPicker-module__none___3SmX2",listOptions:"ListPicker-module__listOptions___rWUnV","append-animate":"ListPicker-module__append-animate___1_OTv",nested:"ListPicker-module__nested___6gPzv",clear:"ListPicker-module__clear___2w9g7",save:"ListPicker-module__save___3-Ny4"}},function(t,e,n){t.exports={FeatureSharePanel:"FeatureSharePanel-module__FeatureSharePanel___1naM6","append-animate":"FeatureSharePanel-module__append-animate___1anOU",done:"FeatureSharePanel-module__done___1tNWc"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"j",(function(){return u})),n.d(e,"h",(function(){return f})),n.d(e,"i",(function(){return p})),n.d(e,"c",(function(){return d})),n.d(e,"f",(function(){return m})),n.d(e,"g",(function(){return g}));var r=function(t,e){var n;if(t){for(var r=t.parentNode;!n&&r&&r.getBoundingClientRect;){var i=r.getBoundingClientRect();e?i.width&&r.scrollWidth>i.width+10&&(n=r):i.height&&r.scrollHeight>i.height+10&&(n=r),r=r.parentNode}n?"body"===n.tagName.toLowerCase()&&(n=document):n=document}return n},i=["html","body"],o=function(t,e){var n=[];if(t){for(var r=t.parentNode;r&&r.getBoundingClientRect;){var o=r.getBoundingClientRect();e?o.width&&r.scrollWidth>o.width+10&&n.push(r):o.height&&r.scrollHeight>o.height+10&&n.push(r),r=r.parentNode}0===n.length?n.push(document):i.includes(n[0].tagName.toLowerCase())&&(n.length=0,n.push(document))}return n},a=function(){var t=/^(script|link)$/i,e=[];return[].forEach.call(document.body.children,(function(n){t.test(n.tagName)||e.push(n)})),e},s=function(t,e){void 0===t&&(t=document.body);var n=document.createElement("div");return"first"===e?t.prepend(n):t.appendChild(n),n},u=function(t){var e=window.scrollX,n=window.scrollY;t.focus(),window.scrollTo(e,n)},l="tabindex",c="data-g-tabindex",f=function(t){if(!t.hasAttribute("aria-live")){t.setAttribute("aria-hidden",!1);var e=t.getElementsByTagName("*");Array.prototype.filter.call(e||[],(function(t){return t.hasAttribute(c)})).forEach((function(t){var e=t.getAttribute(c);e>=0?t.setAttribute(l,t.getAttribute(c)):"none"===e&&t.removeAttribute(l),t.removeAttribute(c)}))}},h=/(a|area|input|select|textarea|button|iframe)$/,p=function(t){if(!t.hasAttribute("aria-live")){t.setAttribute("aria-hidden",!0);var e=t.getElementsByTagName("*");Array.prototype.filter.call(e||[],(function(t){return null!==t.getAttribute(l)})).forEach((function(t){t.setAttribute(c,t.getAttribute(l)),t.setAttribute(l,-1)})),Array.prototype.filter.call(e||[],(function(t){return t.tagName.toLowerCase().match(h)&&t.focus&&null===t.getAttribute(c)})).forEach((function(t){t.setAttribute(c,"none"),t.setAttribute(l,-1)}))}},d=function t(e){if(e)return e.offsetParent?e:t(e.parentElement)||e},m=function(t,e){var n=t.getBoundingClientRect().bottom,r=e.getBoundingClientRect?e.getBoundingClientRect():{height:0,top:0},i=r.height;return n>=r.top+i},g=function(t,e){return t.getBoundingClientRect().top<=(e.getBoundingClientRect?e.getBoundingClientRect():{top:0}).top}},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/sprites/overlay-patterns@1-9ce224c8b180bd0912bc0db9c037704d.png"},function(t,e,n){"use strict";n.r(e);var r=n(364),i=/^((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)-.*))$/,o=Object(r.a)((function(t){return i.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.default=o},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1329),a=n.n(o),s=n(699),u=n.n(s);e.default=function(t){return i.a.createElement("div",{className:u.a.LoadingSpinner},i.a.createElement(a.a,{size:60,color:u.a.spinnerColor,loading:!0}))}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(150);function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(C){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=c;var h={};function p(){}function d(){}function m(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,a)&&(g=v);var b=m.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,a,s,u){var l=f(t[o],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==i(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=m,l(b,"constructor",m),l(m,"constructor",d),d.displayName=l(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(A.prototype),l(A.prototype,s,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function a(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,u,"next",t)}function u(t){a(o,r,i,s,u,"throw",t)}s(void 0)}))}}function u(t){var e,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(e=t[n]))return e.call(t);if(r&&null!=(e=t[r]))return new l(e.call(t));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function l(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return l=function(t){this.s=t,this.n=t.next},l.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var n=this.s.return;return void 0===n?Promise.resolve({value:t,done:!0}):e(n.apply(this.s,arguments))},throw:function(t){var n=this.s.return;return void 0===n?Promise.reject(t):e(n.apply(this.s,arguments))}},new l(t)}function c(t){return f.apply(this,arguments)}function f(){return(f=s(o().mark((function t(e){var n,i,a,s,l,c,f;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],i=!1,a=!1,t.prev=3,l=u(e);case 5:return t.next=7,l.next();case 7:if(!(i=!(c=t.sent).done)){t.next=13;break}f=c.value,n.push(f);case 10:i=!1,t.next=5;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(3),a=!0,s=t.t0;case 19:if(t.prev=19,t.prev=20,!i||null==l.return){t.next=24;break}return t.next=24,l.return();case 24:if(t.prev=24,!a){t.next=27;break}throw s;case 27:return t.finish(24);case 28:return t.finish(19);case 29:return t.abrupt("return",r.b.apply(void 0,n));case 30:case"end":return t.stop()}}),t,null,[[3,15,19,29],[20,,24,28]])})))).apply(this,arguments)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";var r,i;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},o.apply(this,arguments)}function a(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)}}var s=n(947),u=n(948);t.exports=(i=r=function(){function t(t,e){this.uppy=t,this.opts=e,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1}var e,n,r,i=t.prototype;return i.headers=function(){var t=this.opts.companionHeaders||this.opts.serverHeaders||{};return Promise.resolve(o({},this.defaultHeaders,t))},i._getPostResponseFunc=function(t){var e=this;return function(n){return t?n:e.onReceiveResponse(n)}},i.onReceiveResponse=function(t){var e,n=this.uppy.getState().companion||{},r=this.opts.companionUrl,i=t.headers;i.has("i-am")&&i.get("i-am")!==n[r]&&this.uppy.setState({companion:o({},n,(e={},e[r]=i.get("i-am"),e))});return t},i._getUrl=function(t){return/^(https?:|)\/\//.test(t)?t:this.hostname+"/"+t},i._json=function(t){if(401===t.status)throw new s;if(t.status<200||t.status>300){var e="Failed request with status: "+t.status+". "+t.statusText;return t.json().then((function(t){throw e=t.message?e+" message: "+t.message:e,e=t.requestId?e+" request-Id: "+t.requestId:e,new Error(e)})).catch((function(){throw new Error(e)}))}return t.json()},i.preflight=function(t){var e=this;return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(this._getUrl(t),{method:"OPTIONS"}).then((function(t){return t.headers.has("access-control-allow-headers")&&(e.allowedHeaders=t.headers.get("access-control-allow-headers").split(",").map((function(t){return t.trim().toLowerCase()}))),e.preflightDone=!0,e.allowedHeaders.slice()})).catch((function(t){return e.uppy.log("[CompanionClient] unable to make preflight request "+t,"warning"),e.preflightDone=!0,e.allowedHeaders.slice()}))},i.preflightAndHeaders=function(t){var e=this;return Promise.all([this.preflight(t),this.headers()]).then((function(t){var n=t[0],r=t[1];return Object.keys(r).forEach((function(t){-1===n.indexOf(t.toLowerCase())&&(e.uppy.log("[CompanionClient] excluding unallowed header "+t),delete r[t])})),r}))},i.get=function(t,e){var n=this;return this.preflightAndHeaders(t).then((function(e){return u(n._getUrl(t),{method:"get",headers:e,credentials:n.opts.companionCookiesRule||"same-origin"})})).then(this._getPostResponseFunc(e)).then((function(t){return n._json(t)})).catch((function(e){return e=e.isAuthError?e:new Error("Could not get "+n._getUrl(t)+". "+e),Promise.reject(e)}))},i.post=function(t,e,n){var r=this;return this.preflightAndHeaders(t).then((function(n){return u(r._getUrl(t),{method:"post",headers:n,credentials:r.opts.companionCookiesRule||"same-origin",body:JSON.stringify(e)})})).then(this._getPostResponseFunc(n)).then((function(t){return r._json(t)})).catch((function(e){return e=e.isAuthError?e:new Error("Could not post "+r._getUrl(t)+". "+e),Promise.reject(e)}))},i.delete=function(t,e,n){var r=this;return this.preflightAndHeaders(t).then((function(n){return u(r.hostname+"/"+t,{method:"delete",headers:n,credentials:r.opts.companionCookiesRule||"same-origin",body:e?JSON.stringify(e):null})})).then(this._getPostResponseFunc(n)).then((function(t){return r._json(t)})).catch((function(e){return e=e.isAuthError?e:new Error("Could not delete "+r._getUrl(t)+". "+e),Promise.reject(e)}))},e=t,(n=[{key:"hostname",get:function(){var t=this.uppy.getState().companion,e=this.opts.companionUrl;return(t&&t[e]?t[e]:e).replace(/\/$/,"")}},{key:"defaultHeaders",get:function(){return{Accept:"application/json","Content-Type":"application/json","Uppy-Versions":"@uppy/companion-client="+t.VERSION}}}])&&a(e.prototype,n),r&&a(e,r),t}(),r.VERSION="1.9.0",i)},function(t,e,n){"use strict";n.d(e,"a",(function(){return V})),n.d(e,"b",(function(){return q}));var r=n(81),i=n(1);function o(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 a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var s=a((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)})),u=n(79),l=new Map;function c(t){Object(u.a)(t.source&&!t.url||!t.source&&t.url);var e=l.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return f((e=t,"try {\n  importScripts('".concat(e,"');\n} catch (error) {\n  console.error(error);\n  throw error;\n}")));var e}(t.url),l.set(t.url,e)),t.source&&(e=f(t.source),l.set(t.source,e))),Object(u.a)(e),e}function f(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function h(t){return h="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},h(t)}function p(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,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"===h(t))for(var i in t)p(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)))}function m(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)}}var g=function(){},y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(i.a)(this,"name",void 0),Object(i.a)(this,"source",void 0),Object(i.a)(this,"url",void 0),Object(i.a)(this,"terminated",!1),Object(i.a)(this,"worker",void 0),Object(i.a)(this,"onMessage",void 0),Object(i.a)(this,"onError",void 0),Object(i.a)(this,"_loadableURL","");var n=e.name,o=e.source,a=e.url;Object(u.a)(o||a),this.name=n,this.source=o,this.url=a,this.onMessage=g,this.onError=function(t){return console.log(t)},this.worker=r.b?this._createBrowserWorker():this._createNodeWorker()}var e,n,o;return e=t,o=[{key:"isSupported",value:function(){return"undefined"!==typeof Worker&&r.b||"undefined"!==typeof s&&!r.b}}],(n=[{key:"destroy",value:function(){this.onMessage=g,this.onError=g,this.worker.terminate(),this.terminated=!0}},{key:"isRunning",get:function(){return Boolean(this.onMessage)}},{key:"postMessage",value:function(t,e){e=e||p(t),this.worker.postMessage(t,e)}},{key:"_getErrorFromErrorEvent",value:function(t){var e="Failed to load ";return e+="worker ".concat(this.name," from ").concat(this.url,". "),t.message&&(e+="".concat(t.message," in ")),t.lineno&&(e+=":".concat(t.lineno,":").concat(t.colno)),new Error(e)}},{key:"_createBrowserWorker",value:function(){var t=this;this._loadableURL=c({source:this.source,url:this.url});var e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=function(e){e.data?t.onMessage(e.data):t.onError(new Error("No data received"))},e.onerror=function(e){t.onError(t._getErrorFromErrorEvent(e)),t.terminated=!0},e.onmessageerror=function(t){return console.error(t)},e}},{key:"_createNodeWorker",value:function(){var t,e=this;if(this.url){var n=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);t=new s(n,{eval:!1})}else{if(!this.source)throw new Error("no worker");t=new s(this.source,{eval:!0})}return t.on("message",(function(t){e.onMessage(t)})),t.on("error",(function(t){e.onError(t)})),t.on("exit",(function(t){})),t}}])&&m(e.prototype,n),o&&m(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();function v(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)}}var b=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(i.a)(this,"name",void 0),Object(i.a)(this,"workerThread",void 0),Object(i.a)(this,"isRunning",!0),Object(i.a)(this,"result",void 0),Object(i.a)(this,"_resolve",(function(){})),Object(i.a)(this,"_reject",(function(){})),this.name=e,this.workerThread=n,this.result=new Promise((function(t,e){r._resolve=t,r._reject=e}))}var e,n,r;return e=t,(n=[{key:"postMessage",value:function(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}},{key:"done",value:function(t){Object(u.a)(this.isRunning),this.isRunning=!1,this._resolve(t)}},{key:"error",value:function(t){Object(u.a)(this.isRunning),this.isRunning=!1,this._reject(t)}}])&&v(e.prototype,n),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _(t){return _="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 A(){A=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==_(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function w(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function x(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){w(o,r,i,a,s,"next",t)}function s(t){w(o,r,i,a,s,"throw",t)}a(void 0)}))}}function E(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 O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){S(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P(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)}}var C=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(i.a)(this,"name","unnamed"),Object(i.a)(this,"source",void 0),Object(i.a)(this,"url",void 0),Object(i.a)(this,"maxConcurrency",1),Object(i.a)(this,"maxMobileConcurrency",1),Object(i.a)(this,"onDebug",(function(){})),Object(i.a)(this,"reuseWorkers",!0),Object(i.a)(this,"props",{}),Object(i.a)(this,"jobQueue",[]),Object(i.a)(this,"idleQueue",[]),Object(i.a)(this,"count",0),Object(i.a)(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}var e,n,o,a,s;return e=t,n=[{key:"destroy",value:function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0}},{key:"setProps",value:function(t){this.props=O(O({},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)}},{key:"startJob",value:(s=x(A().mark((function t(e){var n,r,i,o=this,a=arguments;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:function(t,e,n){return t.done(n)},r=a.length>2&&void 0!==a[2]?a[2]:function(t,e){return t.error(e)},i=new Promise((function(t){return o.jobQueue.push({name:e,onMessage:n,onError:r,onStart:t}),o})),this._startQueuedJob(),t.next=6,i;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"_startQueuedJob",value:(a=x(A().mark((function t(){var e,n,r;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jobQueue.length){t.next=2;break}return t.abrupt("return");case 2:if(e=this._getAvailableWorker()){t.next=5;break}return t.abrupt("return");case 5:if(!(n=this.jobQueue.shift())){t.next=18;break}return this.onDebug({message:"Starting job",name:n.name,workerThread:e,backlog:this.jobQueue.length}),r=new b(n.name,e),e.onMessage=function(t){return n.onMessage(r,t.type,t.payload)},e.onError=function(t){return n.onError(r,t)},n.onStart(r),t.prev=12,t.next=15,r.result;case 15:return t.prev=15,this.returnWorkerToQueue(e),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[12,,15,18]])}))),function(){return a.apply(this,arguments)})},{key:"returnWorkerToQueue",value:function(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;var t="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new y({name:t,source:this.source,url:this.url})}return null}},{key:"_getMaxConcurrency",value:function(){return r.c?this.maxMobileConcurrency:this.maxConcurrency}}],o=[{key:"isSupported",value:function(){return y.isSupported()}}],n&&P(e.prototype,n),o&&P(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();function T(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return k(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 k(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function k(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,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 L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){j(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function j(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M(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)}}var R={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:function(){}},N=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(i.a)(this,"props",void 0),Object(i.a)(this,"workerPools",new Map),this.props=L({},R),this.setProps(e),this.workerPools=new Map}var e,n,r;return e=t,r=[{key:"isSupported",value:function(){return y.isSupported()}},{key:"getWorkerFarm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t._workerFarm=t._workerFarm||new t({}),t._workerFarm.setProps(e),t._workerFarm}}],(n=[{key:"destroy",value:function(){var t,e=T(this.workerPools.values());try{for(e.s();!(t=e.n()).done;)t.value.destroy()}catch(n){e.e(n)}finally{e.f()}this.workerPools=new Map}},{key:"setProps",value:function(t){this.props=L(L({},this.props),t);var e,n=T(this.workerPools.values());try{for(n.s();!(e=n.n()).done;)e.value.setProps(this._getWorkerPoolProps())}catch(r){n.e(r)}finally{n.f()}}},{key:"getWorkerPool",value:function(t){var e=t.name,n=t.source,r=t.url,i=this.workerPools.get(e);return i||((i=new C({name:e,source:n,url:r})).setProps(this._getWorkerPoolProps()),this.workerPools.set(e,i)),i}},{key:"_getWorkerPoolProps",value:function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}])&&M(e.prototype,n),r&&M(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();Object(i.a)(N,"_workerFarm",void 0);var D="latest";function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e[t.id]||{},r="".concat(t.id,"-worker.js"),i=n.workerUrl;if(i||"compression"!==t.id||(i=e.workerUrl),"test"===e._workerType&&(i="modules/".concat(t.module,"/dist/").concat(r)),!i){var o=t.version;"latest"===o&&(o=D);var a=o?"@".concat(o):"";i="https://unpkg.com/@loaders.gl/".concat(t.module).concat(a,"/dist/").concat(r)}return Object(u.a)(i),i}function B(t){return B="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},B(t)}function z(){z=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==B(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function U(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function G(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){U(o,r,i,a,s,"next",t)}function s(t){U(o,r,i,a,s,"throw",t)}a(void 0)}))}}function V(t,e){return!!N.isSupported()&&(!!(r.b||null!==e&&void 0!==e&&e._nodeWorkers)&&(t.worker&&(null===e||void 0===e?void 0:e.worker)))}function q(t,e,n,r,i){return H.apply(this,arguments)}function H(){return(H=G(z().mark((function t(e,n,r,i,o){var a,s,u,l,c,f;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.id,s=F(e,r),u=N.getWorkerFarm(r),l=u.getWorkerPool({name:a,url:s}),r=JSON.parse(JSON.stringify(r)),i=JSON.parse(JSON.stringify(i||{})),t.next=8,l.startJob("process-on-worker",W.bind(null,o));case 8:return(c=t.sent).postMessage("process",{input:n,options:r,context:i}),t.next=12,c.result;case 12:return f=t.sent,t.next=15,f.result;case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,e,n,r){return X.apply(this,arguments)}function X(){return(X=G(z().mark((function t(e,n,r,i){var o,a,s,u,l;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=r,t.next="done"===t.t0?3:"error"===t.t0?5:"process"===t.t0?7:20;break;case 3:return n.done(i),t.abrupt("break",21);case 5:return n.error(new Error(i.error)),t.abrupt("break",21);case 7:return o=i.id,a=i.input,s=i.options,t.prev=8,t.next=11,e(a,s);case 11:u=t.sent,n.postMessage("done",{id:o,result:u}),t.next=19;break;case 15:t.prev=15,t.t1=t.catch(8),l=t.t1 instanceof Error?t.t1.message:"unknown error",n.postMessage("error",{id:o,error:l});case 19:return t.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(r));case 21:case"end":return t.stop()}}),t,null,[[8,15]])})))).apply(this,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(1),i=n(61),o=n(76),a=n(15),s=n(23),u=n(33);const l=Math.PI/180,c=180/Math.PI,f=6370972,h=256;function p(){const t=4018225162502676e-20,e=Math.PI/180*h;return{unitsPerMeter:[t,t,t],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[e,e,t],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/e,1/e,24886.609375]}}class d extends o.a{constructor(t={}){const{latitude:e=0,longitude:n=0,zoom:o=0,nearZMultiplier:a=.1,farZMultiplier:s=2,resolution:u=10}=t;let{height:c,altitude:f=1.5}=t;c=c||1,f=Math.max(.75,f);const h=(new i.a).lookAt({eye:[0,-f,0],up:[0,0,1]}),d=Math.pow(2,o);h.rotateX(e*l),h.rotateZ(-n*l),h.scale(d/c);const m=Math.atan(.5/f),g=512*d/c;super({...t,height:c,viewMatrix:h,longitude:n,latitude:e,zoom:o,distanceScales:p(),fovyRadians:2*m,focalDistance:f,near:a,far:Math.min(2,1/g+1)*f*s}),Object(r.a)(this,"longitude",void 0),Object(r.a)(this,"latitude",void 0),Object(r.a)(this,"resolution",void 0),this.latitude=e,this.longitude=n,this.resolution=u}get projectionMode(){return a.d.GLOBE}getDistanceScales(){return this.distanceScales}getBounds(t={}){const e={targetZ:t.z||0},n=this.unproject([0,this.height/2],e),r=this.unproject([this.width/2,0],e),i=this.unproject([this.width,this.height/2],e),o=this.unproject([this.width/2,this.height],e);return i[0]<this.longitude&&(i[0]+=360),n[0]>this.longitude&&(n[0]-=360),[Math.min(n[0],i[0],r[0],o[0]),Math.min(n[1],i[1],r[1],o[1]),Math.max(n[0],i[0],r[0],o[0]),Math.max(n[1],i[1],r[1],o[1])]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,a=e?i:this.height-i,{pixelUnprojectionMatrix:u}=this;let l;if(Number.isFinite(o))l=m(u,[r,a,o,1]);else{const t=m(u,[r,a,-1,1]),e=m(u,[r,a,1,1]),i=((n||0)/f+1)*h,o=s.q(s.r([],t,e)),c=s.q(t),p=s.q(e),d=4*((4*c*p-(o-c-p)**2)/16)/o,g=(Math.sqrt(c-d)-Math.sqrt(Math.max(0,i*i-d)))/Math.sqrt(o);l=s.j([],t,e,g)}const[c,p,d]=this.unprojectPosition(l);return Number.isFinite(o)?[c,p,d]:Number.isFinite(n)?[c,p,n]:[c,p]}projectPosition(t){const[e,n,r=0]=t,i=e*l,o=n*l,a=Math.cos(o),s=(r/f+1)*h;return[Math.sin(i)*a*s,-Math.cos(i)*a*s,Math.sin(o)*s]}unprojectPosition(t){const[e,n,r]=t,i=s.h(t),o=Math.asin(r/i);return[Math.atan2(e,-n)*c,o*c,(i/h-1)*f]}projectFlat(t){return t}unprojectFlat(t){return t}panByPosition(t,e){const n=this.unproject(e);return{longitude:t[0]-n[0]+this.longitude,latitude:t[1]-n[1]+this.latitude}}}function m(t,e){const n=u.n([],e,t);return u.k(n,n,1/n[3]),n}},function(t,e,n){"use strict";e.a=function(t){var e=new WeakMap;return function(n){if(e.has(n))return e.get(n);var r=t(n);return e.set(n,r),r}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(1),i=n(124);function o(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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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)}}var c="Queued Requests",f="Active Requests",h="Cancelled Requests",p="Queued Requests Ever",d="Active Requests Ever",m={id:"request-scheduler",throttleRequests:!0,maxRequests:6},g=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,t),Object(r.a)(this,"props",void 0),Object(r.a)(this,"stats",void 0),Object(r.a)(this,"activeRequestCount",0),Object(r.a)(this,"requestQueue",[]),Object(r.a)(this,"requestMap",new Map),Object(r.a)(this,"deferredUpdate",null),this.props=a(a({},m),e),this.stats=new i.a({id:this.props.id}),this.stats.get(c),this.stats.get(f),this.stats.get(h),this.stats.get(p),this.stats.get(d)}var e,n,o;return e=t,n=[{key:"scheduleRequest",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return 0};if(!this.props.throttleRequests)return Promise.resolve({done:function(){}});if(this.requestMap.has(t))return this.requestMap.get(t);var n={handle:t,priority:0,getPriority:e},r=new Promise((function(t){return n.resolve=t,n}));return this.requestQueue.push(n),this.requestMap.set(t,r),this._issueNewRequests(),r}},{key:"_issueRequest",value:function(t){var e=this,n=t.handle,r=t.resolve,i=!1,o=function(){i||(i=!0,e.requestMap.delete(n),e.activeRequestCount--,e._issueNewRequests())};return this.activeRequestCount++,r?r({done:o}):Promise.resolve({done:o})}},{key:"_issueNewRequests",value:function(){var t=this;this.deferredUpdate||(this.deferredUpdate=setTimeout((function(){return t._issueNewRequestsAsync()}),0))}},{key:"_issueNewRequestsAsync",value:function(){this.deferredUpdate=null;var t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(var e=0;e<t;++e){var n=this.requestQueue.shift();n&&this._issueRequest(n)}}}},{key:"_updateAllRequests",value:function(){for(var t=this.requestQueue,e=0;e<t.length;++e){var n=t[e];this._updateRequest(n)||(t.splice(e,1),this.requestMap.delete(n.handle),e--)}t.sort((function(t,e){return t.priority-e.priority}))}},{key:"_updateRequest",value:function(t){return t.priority=t.getPriority(t.handle),!(t.priority<0)||(t.resolve(null),!1)}}],n&&l(e.prototype,n),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}()},function(t,e,n){t.exports=n(972).Observable},function(t){t.exports=JSON.parse('{"base-#83b3dd":{"x":4,"y":4,"width":120,"height":120,"mask":true},"base-#0074D9":{"x":132,"y":4,"width":120,"height":120,"mask":true},"base-#ffb757":{"x":260,"y":4,"width":120,"height":120,"mask":true},"base-#dd7f00":{"x":388,"y":4,"width":120,"height":120,"mask":true},"horizontal_pinstripes-#83b3dd-#ffffff":{"x":516,"y":4,"width":120,"height":120,"mask":true},"vertical_pinstripes-#83b3dd-#ffffff":{"x":644,"y":4,"width":120,"height":120,"mask":true},"horizontal_bands-#83b3dd-#ffffff":{"x":772,"y":4,"width":120,"height":120,"mask":true},"vertical_bands-#83b3dd-#ffffff":{"x":900,"y":4,"width":120,"height":120,"mask":true},"small_dots-#83b3dd-#ffffff":{"x":4,"y":132,"width":120,"height":120,"mask":true},"large_dots-#83b3dd-#ffffff":{"x":132,"y":132,"width":120,"height":120,"mask":true},"hatch_down-#83b3dd-#ffffff":{"x":260,"y":132,"width":120,"height":120,"mask":true},"hatch_up-#83b3dd-#ffffff":{"x":388,"y":132,"width":120,"height":120,"mask":true},"hatch_down_thick-#83b3dd-#ffffff":{"x":516,"y":132,"width":120,"height":120,"mask":true},"hatch_up_thick-#83b3dd-#ffffff":{"x":644,"y":132,"width":120,"height":120,"mask":true},"dash_hatch_down-#83b3dd-#ffffff":{"x":772,"y":132,"width":120,"height":120,"mask":true},"dash_hatch_up-#83b3dd-#ffffff":{"x":900,"y":132,"width":120,"height":120,"mask":true},"grid-#83b3dd-#ffffff":{"x":4,"y":260,"width":120,"height":120,"mask":true},"thick_grid-#83b3dd-#ffffff":{"x":132,"y":260,"width":120,"height":120,"mask":true},"crosses-#83b3dd-#ffffff":{"x":260,"y":260,"width":120,"height":120,"mask":true},"thick_crosses-#83b3dd-#ffffff":{"x":388,"y":260,"width":120,"height":120,"mask":true},"rings-#83b3dd-#ffffff":{"x":516,"y":260,"width":120,"height":120,"mask":true},"plusses-#83b3dd-#ffffff":{"x":644,"y":260,"width":120,"height":120,"mask":true},"thick_plusses-#83b3dd-#ffffff":{"x":772,"y":260,"width":120,"height":120,"mask":true},"horizontal_pinstripes-#0074D9-#ffffff":{"x":900,"y":260,"width":120,"height":120,"mask":true},"vertical_pinstripes-#0074D9-#ffffff":{"x":4,"y":388,"width":120,"height":120,"mask":true},"horizontal_bands-#0074D9-#ffffff":{"x":132,"y":388,"width":120,"height":120,"mask":true},"vertical_bands-#0074D9-#ffffff":{"x":260,"y":388,"width":120,"height":120,"mask":true},"small_dots-#0074D9-#ffffff":{"x":388,"y":388,"width":120,"height":120,"mask":true},"large_dots-#0074D9-#ffffff":{"x":516,"y":388,"width":120,"height":120,"mask":true},"hatch_down-#0074D9-#ffffff":{"x":644,"y":388,"width":120,"height":120,"mask":true},"hatch_up-#0074D9-#ffffff":{"x":772,"y":388,"width":120,"height":120,"mask":true},"hatch_down_thick-#0074D9-#ffffff":{"x":900,"y":388,"width":120,"height":120,"mask":true},"hatch_up_thick-#0074D9-#ffffff":{"x":4,"y":516,"width":120,"height":120,"mask":true},"dash_hatch_down-#0074D9-#ffffff":{"x":132,"y":516,"width":120,"height":120,"mask":true},"dash_hatch_up-#0074D9-#ffffff":{"x":260,"y":516,"width":120,"height":120,"mask":true},"grid-#0074D9-#ffffff":{"x":388,"y":516,"width":120,"height":120,"mask":true},"thick_grid-#0074D9-#ffffff":{"x":516,"y":516,"width":120,"height":120,"mask":true},"crosses-#0074D9-#ffffff":{"x":644,"y":516,"width":120,"height":120,"mask":true},"thick_crosses-#0074D9-#ffffff":{"x":772,"y":516,"width":120,"height":120,"mask":true},"rings-#0074D9-#ffffff":{"x":900,"y":516,"width":120,"height":120,"mask":true},"plusses-#0074D9-#ffffff":{"x":4,"y":644,"width":120,"height":120,"mask":true},"thick_plusses-#0074D9-#ffffff":{"x":132,"y":644,"width":120,"height":120,"mask":true},"horizontal_pinstripes-#ffb757-#000000":{"x":260,"y":644,"width":120,"height":120,"mask":true},"vertical_pinstripes-#ffb757-#000000":{"x":388,"y":644,"width":120,"height":120,"mask":true},"horizontal_bands-#ffb757-#000000":{"x":516,"y":644,"width":120,"height":120,"mask":true},"vertical_bands-#ffb757-#000000":{"x":644,"y":644,"width":120,"height":120,"mask":true},"small_dots-#ffb757-#000000":{"x":772,"y":644,"width":120,"height":120,"mask":true},"large_dots-#ffb757-#000000":{"x":900,"y":644,"width":120,"height":120,"mask":true},"hatch_down-#ffb757-#000000":{"x":4,"y":772,"width":120,"height":120,"mask":true},"hatch_up-#ffb757-#000000":{"x":132,"y":772,"width":120,"height":120,"mask":true},"hatch_down_thick-#ffb757-#000000":{"x":260,"y":772,"width":120,"height":120,"mask":true},"hatch_up_thick-#ffb757-#000000":{"x":388,"y":772,"width":120,"height":120,"mask":true},"dash_hatch_down-#ffb757-#000000":{"x":516,"y":772,"width":120,"height":120,"mask":true},"dash_hatch_up-#ffb757-#000000":{"x":644,"y":772,"width":120,"height":120,"mask":true},"grid-#ffb757-#000000":{"x":772,"y":772,"width":120,"height":120,"mask":true},"thick_grid-#ffb757-#000000":{"x":900,"y":772,"width":120,"height":120,"mask":true},"crosses-#ffb757-#000000":{"x":4,"y":900,"width":120,"height":120,"mask":true},"thick_crosses-#ffb757-#000000":{"x":132,"y":900,"width":120,"height":120,"mask":true},"rings-#ffb757-#000000":{"x":260,"y":900,"width":120,"height":120,"mask":true},"plusses-#ffb757-#000000":{"x":388,"y":900,"width":120,"height":120,"mask":true},"thick_plusses-#ffb757-#000000":{"x":516,"y":900,"width":120,"height":120,"mask":true},"horizontal_pinstripes-#dd7f00-#000000":{"x":644,"y":900,"width":120,"height":120,"mask":true},"vertical_pinstripes-#dd7f00-#000000":{"x":772,"y":900,"width":120,"height":120,"mask":true},"horizontal_bands-#dd7f00-#000000":{"x":900,"y":900,"width":120,"height":120,"mask":true},"vertical_bands-#dd7f00-#000000":{"x":4,"y":1028,"width":120,"height":120,"mask":true},"small_dots-#dd7f00-#000000":{"x":132,"y":1028,"width":120,"height":120,"mask":true},"large_dots-#dd7f00-#000000":{"x":260,"y":1028,"width":120,"height":120,"mask":true},"hatch_down-#dd7f00-#000000":{"x":388,"y":1028,"width":120,"height":120,"mask":true},"hatch_up-#dd7f00-#000000":{"x":516,"y":1028,"width":120,"height":120,"mask":true},"hatch_down_thick-#dd7f00-#000000":{"x":644,"y":1028,"width":120,"height":120,"mask":true},"hatch_up_thick-#dd7f00-#000000":{"x":772,"y":1028,"width":120,"height":120,"mask":true},"dash_hatch_down-#dd7f00-#000000":{"x":900,"y":1028,"width":120,"height":120,"mask":true},"dash_hatch_up-#dd7f00-#000000":{"x":4,"y":1156,"width":120,"height":120,"mask":true},"grid-#dd7f00-#000000":{"x":132,"y":1156,"width":120,"height":120,"mask":true},"thick_grid-#dd7f00-#000000":{"x":260,"y":1156,"width":120,"height":120,"mask":true},"crosses-#dd7f00-#000000":{"x":388,"y":1156,"width":120,"height":120,"mask":true},"thick_crosses-#dd7f00-#000000":{"x":516,"y":1156,"width":120,"height":120,"mask":true},"rings-#dd7f00-#000000":{"x":644,"y":1156,"width":120,"height":120,"mask":true},"plusses-#dd7f00-#000000":{"x":772,"y":1156,"width":120,"height":120,"mask":true},"thick_plusses-#dd7f00-#000000":{"x":900,"y":1156,"width":120,"height":120,"mask":true}}')},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(21),a=n(404),s=n(8),u=n.n(s),l=n(17),c=n(367);function f(){f=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function h(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,s,"next",t)}function s(t){h(o,r,i,a,s,"throw",t)}a(void 0)}))}}function d(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return m(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 m(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(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}e.default=function(t){var e=Object(l.useStore)().user,n=d(Object(r.useState)(null),2),s=n[0],h=n[1],m=t.item,g=Object(o.buildHeaders)({"X-Hasura-User-Token":e.userToken});Object(r.useEffect)((function(){var t=function(){var t=p(f().mark((function t(){var e,n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(a.checkFavouritePresence)({item_gid:Object(c.toGid)(m)},g);case 2:n=t.sent,h((null===(e=n.favourites[0])||void 0===e?void 0:e.id)||null);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}));var y=function(){var t=p(f().mark((function t(){var e;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(a.mutateAddToFavourites)({gid:Object(c.toGid)(m)},g);case 2:e=t.sent,h(e.id);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),v=function(){var t=p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(a.mutateRemoveFromFavourites)({id:s},g);case 2:t.sent&&h(null);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i.a.createElement("li",null,!s&&i.a.createElement("a",{onClick:function(){return y()}},u.a.t("favourites.add")),!!s&&i.a.createElement("a",{onClick:function(){return v()}},u.a.t("favourites.remove")))}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(496);Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||(e[t]=r[t]))}));var i=n(714);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||(e[t]=i[t]))}));var o=n(1221);Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===o[t]||(e[t]=o[t]))}));var a=n(423);Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||(e[t]=a[t]))}));var s=n(1222);Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===s[t]||(e[t]=s[t]))}));var u=n(1223);Object.keys(u).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===u[t]||(e[t]=u[t]))}));var l=n(1224);Object.keys(l).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===l[t]||(e[t]=l[t]))}));var c=n(1225);Object.keys(c).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===c[t]||(e[t]=c[t]))}));var f=n(1226);Object.keys(f).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===f[t]||(e[t]=f[t]))}));var h=n(1227);Object.keys(h).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===h[t]||(e[t]=h[t]))}));var p=n(1228);Object.keys(p).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===p[t]||(e[t]=p[t]))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(17),o=["markerPrefix","orderedPosition","path","baseUrl","level","highlighted","user"];function a(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return s(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 s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(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 u(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 l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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}function f(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}e.default=function(t){var e=Object(i.useStore)(),n=e.pointsStack,s=n.addLayer,u=n.removeLayer,c=e.searchResults,h=e.mapRefIsSet,p=t.markerPrefix,d=t.orderedPosition,m=void 0!==d&&d,g=t.path,y=t.baseUrl,v=t.level,b=void 0===v?0:v,_=t.highlighted,A=void 0!==_&&_,w=t.user,x=f(t,o),E={tenant_id:document.querySelector("meta[name=tenant-id]").content},O=Object.fromEntries(Object.entries(l({user_id:w?w.id:null},x)).map((function(t){var e=a(t,2),n=e[0],r=e[1];return Array.isArray(r)?[n,JSON.stringify(r)]:"undefined"===typeof r?[n,null]:[n,r]})).filter((function(t){var e=a(t,2),n=(e[0],e[1]);return null!==n&&""!==n}))),S=new URLSearchParams(l(l({},E),O)),P="".concat(y,"/{z}/{x}/{y}.pbf?").concat(S.toString());Object(r.useEffect)((function(){return s(g,{tileUrl:P,level:b,highlighted:A,markerPrefix:p,orderedPosition:m}),function(){u(g)}}),[h,c.filter.toQuery,t.slug])}},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=n(91).Plugin,l=n(256),c=n(257),f=n(643),h=n(645),p=n(86).h;t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).type="acquirer",r.id=r.opts.id||"DragDrop",r.title="Drag & Drop",r.defaultLocale={strings:{dropHereOr:"Drop files here or %{browse}",browse:"browse"}};return r.opts=o({},{target:null,inputName:"files[]",width:"100%",height:"100%",note:null},n),r.isDragDropSupported=f(),r.removeDragOverClassTimeout=null,r.i18nInit(),r.onInputChange=r.onInputChange.bind(a(r)),r.handleDragOver=r.handleDragOver.bind(a(r)),r.handleDragLeave=r.handleDragLeave.bind(a(r)),r.handleDrop=r.handleDrop.bind(a(r)),r.addFiles=r.addFiles.bind(a(r)),r.render=r.render.bind(a(r)),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var i=r.prototype;return i.setOptions=function(e){t.prototype.setOptions.call(this,e),this.i18nInit()},i.i18nInit=function(){this.translator=new l([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},i.addFiles=function(t){var e=this,n=t.map((function(t){return{source:e.id,name:t.name,type:t.type,data:t,meta:{relativePath:t.relativePath||null}}}));try{this.uppy.addFiles(n)}catch(r){this.uppy.log(r)}},i.onInputChange=function(t){this.uppy.log("[DragDrop] Files selected through input");var e=c(t.target.files);this.addFiles(e),t.target.value=null},i.handleDrop=function(t,e){var n=this;t.preventDefault(),t.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1}),this.uppy.log("[DragDrop] Files were dropped");h(t.dataTransfer,{logDropError:function(t){n.uppy.log(t,"error")}}).then((function(t){return n.addFiles(t)}))},i.handleDragOver=function(t){t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0})},i.handleDragLeave=function(t){var e=this;t.preventDefault(),t.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((function(){e.setPluginState({isDraggingOver:!1})}),50)},i.renderHiddenFileInput=function(){var t=this,e=this.uppy.opts.restrictions;return p("input",{className:"uppy-DragDrop-input",type:"file",hidden:!0,ref:function(e){t.fileInputRef=e},name:this.opts.inputName,multiple:1!==e.maxNumberOfFiles,accept:e.allowedFileTypes,onChange:this.onInputChange})},i.renderArrowSvg=function(){return p("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},p("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0",fillRule:"evenodd"}))},i.renderLabel=function(){return p("div",{className:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:p("span",{className:"uppy-DragDrop-browse"},this.i18n("browse"))}))},i.renderNote=function(){return p("span",{className:"uppy-DragDrop-note"},this.opts.note)},i.render=function(t){var e=this,n="uppy-Root\n      uppy-u-reset\n      uppy-DragDrop-container\n      "+(this.isDragDropSupported?"uppy-DragDrop--isDragDropSupported":"")+"\n      "+(this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":"")+"\n    ",r={width:this.opts.width,height:this.opts.height};return p("button",{type:"button",className:n,style:r,onClick:function(){return e.fileInputRef.click()},onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),p("div",{className:"uppy-DragDrop-inner"},this.renderArrowSvg(),this.renderLabel(),this.renderNote()))},i.install=function(){this.setPluginState({isDraggingOver:!1});var t=this.opts.target;t&&this.mount(t,this)},i.uninstall=function(){this.unmount()},r}(u),r.VERSION="1.4.27",i)},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=n(91).Plugin,l=n(527),c=n(946),f=c.Provider,h=c.RequestClient,p=c.Socket,d=n(955),m=n(956),g=n(957),y=n(958),v=n(526),b=n(959),_=n(960),A=n(517),w=n(961),x={endpoint:"",uploadUrl:null,metadata:{},uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,overridePatchMethod:!1,headers:{},addRequestId:!1,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1};t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).type="uploader",r.id=r.opts.id||"Tus",r.title="Tus";return r.opts=o({},{autoRetry:!0,resume:!0,useFastRemoteRetry:!0,limit:0,retryDelays:[0,1e3,3e3,5e3],withCredentials:!1},n),r.requests=new _(r.opts.limit),r.uploaders=Object.create(null),r.uploaderEvents=Object.create(null),r.uploaderSockets=Object.create(null),r.handleResetProgress=r.handleResetProgress.bind(a(r)),r.handleUpload=r.handleUpload.bind(a(r)),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var i=r.prototype;return i.handleResetProgress=function(){var t=o({},this.uppy.getState().files);Object.keys(t).forEach((function(e){if(t[e].tus&&t[e].tus.uploadUrl){var n=o({},t[e].tus);delete n.uploadUrl,t[e]=o({},t[e],{tus:n})}})),this.uppy.setState({files:t})},i.resetUploaderReferences=function(t,e){if(void 0===e&&(e={}),this.uploaders[t]){var n=this.uploaders[t];n.abort(),e.abort&&setTimeout((function(){return n.abort(!0)}),1e3),this.uploaders[t]=null}this.uploaderEvents[t]&&(this.uploaderEvents[t].remove(),this.uploaderEvents[t]=null),this.uploaderSockets[t]&&(this.uploaderSockets[t].close(),this.uploaderSockets[t]=null)},i.upload=function(t,e,n){var r=this;return this.resetUploaderReferences(t.id),new Promise((function(e,n){r.uppy.emit("upload-started",t);var i=o({},r.opts,t.tus||{}),a=o({},x,i);delete a.resume,i.resume&&(a.storeFingerprintForResuming=!0),a.fingerprint=w(t),a.onBeforeRequest=function(t){t.getUnderlyingObject().withCredentials=!!i.withCredentials,"function"===typeof i.onBeforeRequest&&i.onBeforeRequest(t)},a.onError=function(e){r.uppy.log(e);var i=e.originalRequest?e.originalRequest.getUnderlyingObject():null;b(i)&&(e=new v(e,i)),r.resetUploaderReferences(t.id),f.done(),r.uppy.emit("upload-error",t,e),n(e)},a.onProgress=function(e,n){r.onReceiveUploadUrl(t,c.url),r.uppy.emit("upload-progress",t,{uploader:r,bytesUploaded:e,bytesTotal:n})},a.onSuccess=function(){var n={uploadURL:c.url};r.resetUploaderReferences(t.id),f.done(),r.uppy.emit("upload-success",t,n),c.url&&r.uppy.log("Download "+c.file.name+" from "+c.url),e(c)};var s=function(t,e,n){A(t,e)&&!A(t,n)&&(t[n]=t[e])},u={};(Array.isArray(i.metaFields)?i.metaFields:Object.keys(t.meta)).forEach((function(e){u[e]=t.meta[e]})),s(u,"type","filetype"),s(u,"name","filename"),a.metadata=u;var c=new l.Upload(t.data,a);r.uploaders[t.id]=c,r.uploaderEvents[t.id]=new y(r.uppy),i.resume&&c.findPreviousUploads().then((function(e){var n=e[0];n&&(r.uppy.log("[Tus] Resuming upload of "+t.id+" started at "+n.creationTime),c.resumeFromPreviousUpload(n))}));var f=r.requests.run((function(){return t.isPaused||Promise.resolve().then((function(){c.start()})),function(){}}));r.onFileRemove(t.id,(function(n){f.abort(),r.resetUploaderReferences(t.id,{abort:!!c.url}),e("upload "+n+" was removed")})),r.onPause(t.id,(function(t){t?(f.abort(),c.abort()):(f.abort(),f=r.requests.run((function(){return c.start(),function(){}})))})),r.onPauseAll(t.id,(function(){f.abort(),c.abort()})),r.onCancelAll(t.id,(function(){f.abort(),r.resetUploaderReferences(t.id,{abort:!!c.url}),e("upload "+t.id+" was canceled")})),r.onResumeAll(t.id,(function(){f.abort(),t.error&&c.abort(),f=r.requests.run((function(){return c.start(),function(){}}))}))})).catch((function(e){throw r.uppy.emit("upload-error",t,e),e}))},i.uploadRemote=function(t,e,n){var r=this;this.resetUploaderReferences(t.id);var i=o({},this.opts);return t.tus&&o(i,t.tus),this.uppy.emit("upload-started",t),this.uppy.log(t.remote.url),t.serverToken?this.connectToServerSocket(t):new Promise((function(e,n){new(t.remote.providerOptions.provider?f:h)(r.uppy,t.remote.providerOptions).post(t.remote.url,o({},t.remote.body,{endpoint:i.endpoint,uploadUrl:i.uploadUrl,protocol:"tus",size:t.data.size,headers:i.headers,metadata:t.meta})).then((function(e){return r.uppy.setFileState(t.id,{serverToken:e.token}),t=r.uppy.getFile(t.id),r.connectToServerSocket(t)})).then((function(){e()})).catch((function(e){r.uppy.emit("upload-error",t,e),n(e)}))}))},i.connectToServerSocket=function(t){var e=this;return new Promise((function(n,r){var i=t.serverToken,a=m(t.remote.companionUrl),s=new p({target:a+"/api/"+i,autoOpen:!1});e.uploaderSockets[t.id]=s,e.uploaderEvents[t.id]=new y(e.uppy),e.onFileRemove(t.id,(function(){u.abort(),s.send("pause",{}),s.send("cancel",{}),e.resetUploaderReferences(t.id),n("upload "+t.id+" was removed")})),e.onPause(t.id,(function(t){t?(u.abort(),s.send("pause",{})):(u.abort(),u=e.requests.run((function(){return s.send("resume",{}),function(){}})))})),e.onPauseAll(t.id,(function(){u.abort(),s.send("pause",{})})),e.onCancelAll(t.id,(function(){u.abort(),s.send("pause",{}),s.send("cancel",{}),e.resetUploaderReferences(t.id),n("upload "+t.id+" was canceled")})),e.onResumeAll(t.id,(function(){u.abort(),t.error&&s.send("pause",{}),u=e.requests.run((function(){return s.send("resume",{}),function(){}}))})),e.onRetry(t.id,(function(){s.isOpen&&(s.send("pause",{}),s.send("resume",{}))})),e.onRetryAll(t.id,(function(){s.isOpen&&(s.send("pause",{}),s.send("resume",{}))})),s.on("progress",(function(n){return d(e,n,t)})),s.on("error",(function(n){var i=n.error.message,a=o(new Error(i),{cause:n.error});e.opts.useFastRemoteRetry?s.close():(e.resetUploaderReferences(t.id),e.uppy.setFileState(t.id,{serverToken:null})),e.uppy.emit("upload-error",t,a),u.done(),r(a)})),s.on("success",(function(r){var i={uploadURL:r.url};e.uppy.emit("upload-success",t,i),e.resetUploaderReferences(t.id),u.done(),n()}));var u=e.requests.run((function(){return s.open(),t.isPaused&&s.send("pause",{}),function(){}}))}))},i.onReceiveUploadUrl=function(t,e){var n=this.uppy.getFile(t.id);n&&(n.tus&&n.tus.uploadUrl===e||(this.uppy.log("[Tus] Storing upload url"),this.uppy.setFileState(n.id,{tus:o({},n.tus,{uploadUrl:e})})))},i.onFileRemove=function(t,e){this.uploaderEvents[t].on("file-removed",(function(n){t===n.id&&e(n.id)}))},i.onPause=function(t,e){this.uploaderEvents[t].on("upload-pause",(function(n,r){t===n&&e(r)}))},i.onRetry=function(t,e){this.uploaderEvents[t].on("upload-retry",(function(n){t===n&&e()}))},i.onRetryAll=function(t,e){var n=this;this.uploaderEvents[t].on("retry-all",(function(r){n.uppy.getFile(t)&&e()}))},i.onPauseAll=function(t,e){var n=this;this.uploaderEvents[t].on("pause-all",(function(){n.uppy.getFile(t)&&e()}))},i.onCancelAll=function(t,e){var n=this;this.uploaderEvents[t].on("cancel-all",(function(){n.uppy.getFile(t)&&e()}))},i.onResumeAll=function(t,e){var n=this;this.uploaderEvents[t].on("resume-all",(function(){n.uppy.getFile(t)&&e()}))},i.uploadFiles=function(t){var e=this,n=t.map((function(n,r){var i=r+1,o=t.length;return"error"in n&&n.error?Promise.reject(new Error(n.error)):n.isRemote?e.uploadRemote(n,i,o):e.upload(n,i,o)}));return g(n)},i.handleUpload=function(t){var e=this;if(0===t.length)return this.uppy.log("[Tus] No files to upload"),Promise.resolve();0===this.opts.limit&&this.uppy.log("[Tus] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/tus/#limit-0","warning"),this.uppy.log("[Tus] Uploading...");var n=t.map((function(t){return e.uppy.getFile(t)}));return this.uploadFiles(n).then((function(){return null}))},i.install=function(){this.uppy.setState({capabilities:o({},this.uppy.getState().capabilities,{resumableUploads:!0})}),this.uppy.addUploader(this.handleUpload),this.uppy.on("reset-progress",this.handleResetProgress),this.opts.autoRetry&&this.uppy.on("back-online",this.uppy.retryAll)},i.uninstall=function(){this.uppy.setState({capabilities:o({},this.uppy.getState().capabilities,{resumableUploads:!1})}),this.uppy.removeUploader(this.handleUpload),this.opts.autoRetry&&this.uppy.off("back-online",this.uppy.retryAll)},r}(u),r.VERSION="1.8.7",i)},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchProjectDetailsQuery",(function(){return i})),n.d(e,"fetchProjectCardItemsQuery",(function(){return s})),n.d(e,"fetchUserProjectDetailsQuery",(function(){return a})),n.d(e,"fetchPublicProjectDetailsQuery",(function(){return o})),n.d(e,"fetchRecordActionsProjectsQuery",(function(){return u})),n.d(e,"mutateAddRecordToProject",(function(){return l})),n.d(e,"fetchCollectionActionsProjectsQuery",(function(){return c})),n.d(e,"mutateAddCollectionToProject",(function(){return f})),n.d(e,"mutateUpdateProjectState",(function(){return h}));var r=n(21),i=function(t,e){return r.default.request("\n    #graphql\n\n    query ProjectDetails($slug: String!) {\n        project: humap_projects_projects(where: {slug: {_eq: $slug}}) {\n            id\n            name\n            slug\n            sanitised_content\n            state\n            member_count\n            parent_item_ids\n            users(where: {user: {id: {_neq: null}}}) {\n                id\n                state\n                user {\n                    id\n                    name\n                    email\n                }\n            }\n            attachments_images(limit: 1) {\n                attachments_image {\n                    id\n                    url\n                    name\n                    credit\n                    description\n                }\n            }\n        }\n    }\n",t,e)},o=function(t,e){return r.default.request("\n    #graphql\n\n    query PublicProjectDetails($slug: String!) {\n        project: humap_projects_projects(where: {slug: {_eq: $slug}}) {\n            id\n            name\n            slug\n            sanitised_content\n            state\n            member_count\n            parent_item_ids\n        }\n    }\n",t,e)},a=function(t,e){return r.default.request("\n    #graphql\n\n    query UserProjectDetails($user_id: bigint!, $slug: String!) {\n        project: humap_projects_projects(where: {slug: {_eq: $slug}, users: {user_id: {_eq: $user_id}}}) {\n            id\n            name\n            slug\n            state\n            member_count\n            users {\n                id\n                state\n                user {\n                    id\n                    name\n                }\n            }\n        }\n    }\n",t,e)},s=function(t,e){return r.default.request("\n    #graphql\n\n    query ProjectCardItems($slug: String!) {\n        results: project_items(where: {project_slug: {_eq: $slug}}) {\n            type\n            name\n            excerpt\n            slug\n            image_url\n            state\n        }\n    }\n",t,e)},u=function(t,e){return r.default.request('\n    #graphql\n\n    query RecordActionProjectsQuery($user_id: jsonb!, $member_id:bigint!, $without_record: jsonb!) {\n        results: humap_projects_projects(where: {_and: {member_ids: {_contains: $user_id}, _not: {all_record_ids: {_contains: $without_record}}}}) {\n            name\n            id\n            slug\n        }\n        projects_aggregate: humap_projects_project_users_aggregate(where: {user_id: {_eq: $member_id}, state: {_eq: "accepted"}}) {\n            aggregate {\n                count(distinct: true)\n            }\n        }\n    }\n',t,e)},l=function(t,e){return r.default.request("\n    #graphql\n\n    mutation AddRecordToProject($project_id: bigint, $record_id: bigint) {\n        insert_humap_projects_project_records(objects: {project_id: $project_id, record_id: $record_id}) {\n            affected_rows\n        }\n    }\n",t,e)},c=function(t,e){return r.default.request('\n    #graphql\n\n    query CollectionActionProjectsQuery($user_id: jsonb!, $member_id: bigint!, $without_collection: jsonb!) {\n        results: humap_projects_projects(where: {_and: {name: {_neq: ""}, member_ids: {_contains: $user_id}, _not: {all_collection_ids: {_contains: $without_collection}}}}) {\n            name\n            id\n            slug\n        }\n        projects_aggregate: humap_projects_project_users_aggregate(where: {user_id: {_eq: $member_id}, state: {_eq: "accepted"}}) {\n            aggregate {\n                count(distinct: true)\n            }\n        }\n    }\n',t,e)},f=function(t,e){return r.default.request("\n    #graphql\n\n    mutation AddCollectionToProject($project_id: bigint, $collection_id: bigint) {\n        insert_humap_projects_project_collections(objects: {project_id: $project_id, collection_id: $collection_id}) {\n            affected_rows\n        }\n    }\n",t,e)},h=function(t,e){return r.default.request("\n    #graphql\n\n    mutation UpdateProjectState($id: bigint!, $state: String!) {\n        result: update_project(id: $id, state: $state) {\n            id\n            state\n        }\n    }\n",t,e)}},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return u})),n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"g",(function(){return f})),n.d(e,"e",(function(){return h}));var r=n(4),i=n(51),o=function(t,e){var n=t;return t&&(e.dark&&t.dark&&"boolean"!==typeof t.dark?n=t.dark:!e.dark&&t.light&&"boolean"!==typeof t.light&&(n=t.light),n=function(t,e){return t&&Array.isArray(t)&&"function"===typeof t[0]?t[0]({theme:e}):t}(n,e)),n},a=function(t,e){var n,r=o(t,e);if(r)if("object"===typeof r){var a=r.color,s=r.dark,u=r.opacity;if("boolean"===typeof s)n=s;else if(a&&(!u||"weak"!==u)){var l=Object(i.c)(r.color,e);l&&(n=Object(i.a)(l))}}else{var c=Object(i.c)(r,e);c&&(n=Object(i.a)(c))}return n},s=function(t){var e=Object(i.a)(t);if(void 0!==e)return e?"dark":"light"},u=function(t,e,n){if(!t)return[void 0,e];var r,a,u=n.global,l=o(t,n),c=e||u.colors.text;if("object"===typeof l){if(!1===l.dark?a=c.light||c:l.dark&&(a=c.dark||c),l.color){var f=Object(i.c)(l.color,n,l.dark),h=!0===l.opacity?u.opacity.medium:u.opacity[l.opacity]||l.opacity;if(r=Object(i.b)(f,h)||f,!a&&(void 0===h||h>.3)){var p=s(r);a=Object(i.c)(p&&c[p]||c,n)}}}else{r=Object(i.c)(l,n);var d=s(r);d?a=Object(i.c)(c[d]||c,n,"dark"===d):("transparent"!==r&&(r=void 0),c&&(a=Object(i.c)(c,n)))}return!1===e&&(a=void 0),[r,a]},l=function(t,e,n){if(void 0!==t){var a=o(t,e);if("string"===typeof a&&0===a.lastIndexOf("url",0))return Object(r.css)(["background:"," no-repeat center center;background-size:cover;"],a);var s=u(a,n,e),l=s[0],c=s[1];if(a.image){var f="\n      "+(l?"background-color: "+l+";":"")+"\n      background-image: "+a.image+";\n      background-repeat: "+(a.repeat||"no-repeat")+";\n      background-position: "+(a.position||"center center")+";\n      background-size: "+(a.size||"cover")+";\n    ";return Object(r.css)([""," ",""],c?"color: "+c+";":"",a.opacity?"position: relative;\n        z-index: 0;\n        &:before {\n          content: '';\n          position: absolute;\n          top: 0;\n          right: 0;\n          left: 0;\n          bottom: 0;\n          z-index: -1;\n          "+f+"\n          opacity: "+(!0===a.opacity?e.global.opacity.medium:e.global.opacity[a.opacity]||a.opacity)+";\n        }":f)}return l?Object(r.css)(["background-color:",";",""],l,c?"color: "+c+";":""):"string"===typeof a?Object(r.css)(["background:",";"],Object(i.c)(a,e)):void 0}},c=Object(r.css)(["",""],(function(t){return l(Object(i.c)(t.theme.global.active.background,t.theme),t.theme,t.theme.global.active.color)})),f=Object(r.css)(["",""],(function(t){return l(Object(i.c)(t.theme.global.selected.background,t.theme),t.theme,t.theme.global.selected.color)})),h=function(t,e){var n;return n=!0===t||"background"===t?e.global.hover.background:t,Object(r.css)(["",""],l(n,e,e.global.hover.color))}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchFavouritesQuery",(function(){return i})),n.d(e,"checkFavouritePresence",(function(){return o})),n.d(e,"mutateAddToFavourites",(function(){return a})),n.d(e,"mutateRemoveFromFavourites",(function(){return s})),n.d(e,"fetchCardItemFavouritesCount",(function(){return u}));var r=n(21),i=function(t,e){return r.default.request("\n    #graphql\n\n    query FavouritesQuery($user_id: bigint!) {\n        favourites: favourites(where: {user_id: {_eq: $user_id}}) {\n            favourited_type\n            slug\n            name\n        }\n    }\n",t,e)},o=function(t,e){return r.default.request("\n    #graphql\n\n    query FavouritesQuery($item_gid: String!) {\n        favourites(limit: 1, where: {item_gid: {_eq: $item_gid}}) {\n            id\n        }\n    }\n",t,e)},a=function(t,e){return r.default.request("\n    #graphql\n\n    mutation AddFavourite($gid:String!) {\n        create_favourite(gid: $gid) {\n            id\n        }\n    }\n",t,e)},s=function(t,e){return r.default.request("\n    #graphql\n\n    mutation RemoveFavourite($id:Int!) {\n        destroy_favourite(id: $id) {\n            id\n        }\n    }\n",t,e)},u=function(t,e){return r.default.request("\n    #graphql\n\n    query MyQuery($slug: String!, $favourited_type: String! ) {\n        favourites_aggregate(where: {slug: {_eq: $slug}, favourited_type: {_eq: $favourited_type}}) {\n            aggregate {\n                count(columns: id)\n            }\n        }\n    }\n",t,e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(168),i=n(175);function o(t){return o="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},o(t)}function a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(C){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=c;var h={};function p(){}function d(){}function m(){}var g={};l(g,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,i)&&(g=v);var b=m.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(i,a,s,u){var l=f(t[i],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=m,l(b,"constructor",m),l(m,"constructor",d),d.displayName=l(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(A.prototype),l(A.prototype,s,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function s(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))}}function l(t,e){return c.apply(this,arguments)}function c(){return(c=u(a().mark((function t(e,n){var o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"!==typeof e){t.next=7;break}return e=Object(r.a)(e),o=n,null!==n&&void 0!==n&&n.fetch&&"function"!==typeof(null===n||void 0===n?void 0:n.fetch)&&(o=n.fetch),t.next=6,fetch(e,o);case 6:case 9:return t.abrupt("return",t.sent);case 7:return t.next=9,Object(i.b)(e);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e){},function(t,e,n){"use strict";(function(t,r){var i,o=n(572);i="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof t?t:r;var a=Object(o.a)(i);e.a=a}).call(this,n(36),n(468)(t))},function(t,e,n){t.exports=n(913)},function(t,e,n){t.exports={RouteCreatorGuidance:"RouteCreatorGuidance-module__RouteCreatorGuidance___1xWGt",step:"RouteCreatorGuidance-module__step___33hiT",distance:"RouteCreatorGuidance-module__distance___3Rvd0"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return F}));var r=n(125),i=n(317);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 a(t){let e=s(t);return"object"===e?t?"type"in t?Object.assign({},t,o[t.type]):"value"in t?(e=s(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 s(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}class u{constructor(t){let{name:e,vs:n,fs:r,dependencies:o=[],uniforms:s,getUniforms:u,deprecations:l=[],defines:c={},inject:f={},vertexShader:h,fragmentShader:p}=t;Object(i.a)("string"===typeof e),this.name=e,this.vs=n||h,this.fs=r||p,this.getModuleUniforms=u,this.dependencies=o,this.deprecations=this._parseDeprecationDefinitions(l),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}(f),s&&(this.uniforms=function(t){const e={};for(const n in t){const r=a(t[n]);e[n]=r}return e}(s))}getModuleSource(t){let e;switch(t){case"vs":e=this.vs||"";break;case"fs":e=this.fs||"";break;default:Object(i.a)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(e,"// END MODULE_").concat(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=>{if("function"===t.type)t.regex=new RegExp("\\b".concat(t.old,"\\("));else t.regex=new RegExp("".concat(t.type," ").concat(t.old,";"))})),t}_defaultGetUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={},n=this.uniforms;for(const r in n){const o=n[r];r in t&&!o.private?(o.validate&&Object(i.a)(o.validate(t[r],o),"".concat(this.name,": invalid ").concat(r)),e[r]=t[r]):e[r]=o.value}return e}}function l(t){return c(h(t))}function c(t){const e={},n={};return f({modules:t,level:0,moduleMap:e,moduleDepth:n}),Object.keys(n).sort(((t,e)=>n[e]-n[t])).map((t=>e[t]))}function f(t){let{modules:e,level:n,moduleMap:r,moduleDepth:i}=t;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(const o of e)r[o.name]=o,(void 0===i[o.name]||i[o.name]<n)&&(i[o.name]=n);for(const o of e)o.dependencies&&f({modules:o.dependencies,level:n+1,moduleMap:r,moduleDepth:i})}function h(t,e){return t.map((t=>(t instanceof u||(Object(i.a)("string"!==typeof t,"Shader module use by name is deprecated. Import shader module '".concat(t,"' and use it directly.")),Object(i.a)(t.name,"shader module has no name"),(t=new u(t)).dependencies=h(t.dependencies)),t)))}function p(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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}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]},m={};Object.keys(d).forEach((t=>{m[t]=t}));const g={};function y(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=d[e];if(Object(i.a)(r,e),!p(n))return!0;if(e in g)return g[e];const o=r[0],a=n.behavior||"enable",s="#extension GL_".concat(o," : ").concat(a,"\nvoid main(void) {}"),u=t.createShader(35633);t.shaderSource(u,s),t.compileShader(u);const l=t.getShaderParameter(u,35713);return t.deleteShader(u),g[e]=l,l}function v(t,e){const n=d[e];Object(i.a)(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 Object(i.a)(!1===o||!0===o),o}function b(t,e){return(e=Array.isArray(e)?e:[e]).every((e=>v(t,e)))}var _=n(323);function A(t){return new RegExp("\\b".concat(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,[A("attribute"),"in $1"],[A("varying"),"out $1"]],E=[...w,[A("varying"),"in $1"]],O=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],S=[...O,[A("in"),"attribute $1"],[A("out"),"varying $1"]],P=[...O,[A("in"),"varying $1"]],C="gl_FragColor",T=/\bout[ \t]+vec4[ \t]+(\w+)[ \t]*;\n?/,k=/void\s+main\s*\([^)]*\)\s*\{\n?/;function I(t,e,n){switch(e){case 300:return n?L(t,x):function(t){const e=(t=L(t,E)).match(T);if(e){const n=e[1];t=t.replace(new RegExp("\\b".concat(C,"\\b"),"g"),n)}else{const e="fragmentColor";t=t.replace(k,(t=>"out vec4 ".concat(e,";\n").concat(t))).replace(new RegExp("\\b".concat(C,"\\b"),"g"),e)}return t}(t);case 100:return n?L(t,S):function(t){const e=(t=L(t,P)).match(T);if(e){const n=e[1];t=t.replace(T,"").replace(new RegExp("\\b".concat(n,"\\b"),"g"),C)}return t}(t);default:throw new Error("unknown GLSL version ".concat(e))}}function L(t,e){for(const[n,r]of e)t=t.replace(n,r);return t}const j="\n\n".concat(_.a,"\n\n"),M={[r.b]:"vertex",[r.a]:"fragment"};function R(t,e){let{id:n,source:o,type:a,modules:s,defines:u={},hookFunctions:l=[],inject:c={},transpileToGLSL100:f=!1,prologue:h=!0,log:p}=e;Object(i.a)("string"===typeof o,"shader source must be a string");const d=a===r.b,g=o.split("\n");let v=100,A="",w=o;0===g[0].indexOf("#version ")?(v=300,A=g[0],w=g.slice(1).join("\n")):A="#version ".concat(v);const x={};s.forEach((t=>{Object.assign(x,t.getDefines())})),Object.assign(x,u);let E=h?"".concat(A,"\n").concat(function(t){let{id:e,source:n,type:r}=t;return e&&"string"===typeof e&&-1===n.indexOf("SHADER_NAME")?"\n#define SHADER_NAME ".concat(e,"_").concat(M[r],"\n\n"):""}({id:n,source:o,type:a}),"\n").concat(function(t){let{type:e}=t;return"\n#define SHADER_TYPE_".concat(M[e].toUpperCase(),"\n")}({type:a}),"\n").concat(function(t){const e=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),i=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);return{gpuVendor:i,vendor:n,renderer:r,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t);switch(e.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").concat(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 b(t,m.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"),b(t,m.GLSL_DERIVATIVES)&&y(t,m.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"),b(t,m.GLSL_FRAG_DATA)&&y(t,m.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"),b(t,m.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").concat(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},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 ".concat(r.toUpperCase()," ").concat(t[r],"\n"))}0===e&&(n+="\n");return n}(x),"\n").concat(d?"":"precision highp float;\n\n","\n"):"".concat(A,"\n");const O=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})})),e}(l),S={},P={},C={};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?P[r]=[t]:C[r]=[t]:S[r]=[t]}else C[r]=[t]}for(const r of s){p&&r.checkDeprecations(w,p);E+=r.getModuleSource(a,v);const t=r.injections[a];for(const e in t){const n=e.match(/^(v|f)s:#([\w-]+)$/);if(n){const r="decl"===n[2]?P:C;r[e]=r[e]||[],r[e].push(t[e])}else S[e]=S[e]||[],S[e].push(t[e])}}return E+=j,E=Object(_.c)(E,a,P),E+=function(t,e){let n="";for(const r in t){const i=t[r];if(n+="void ".concat(i.signature," {\n"),i.header&&(n+="  ".concat(i.header)),e[r]){const t=e[r];t.sort(((t,e)=>t.order-e.order));for(const e of t)n+="  ".concat(e.injection,"\n")}i.footer&&(n+="  ".concat(i.footer)),n+="}\n"}return n}(O[a],S),E+=w,E=Object(_.c)(E,a,C),E=I(E,f?100:v,d),E}function N(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(1533);class F{static getDefaultProgramManager(t){return t.luma=t.luma||{},t.luma.defaultProgramManager=t.luma.defaultProgramManager||new F(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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{vs:e="",fs:n="",defines:i={},inject:o={},varyings:a=[],bufferMode:s=35981,transpileToGLSL100:u=!1}=t,c=this._getModuleList(t.modules),f=this._getHash(e),h=this._getHash(n),p=c.map((t=>this._getHash(t.name))).sort(),d=a.map((t=>this._getHash(t))),m=Object.keys(i).sort(),g=Object.keys(o).sort(),y=[],v=[];for(const r of m)y.push(this._getHash(r)),y.push(this._getHash(i[r]));for(const r of g)v.push(this._getHash(r)),v.push(this._getHash(o[r]));const b="".concat(f,"/").concat(h,"D").concat(y.join("/"),"M").concat(p.join("/"),"I").concat(v.join("/"),"V").concat(d.join("/"),"H").concat(this.stateHash,"B").concat(s).concat(u?"T":"");if(!this._programCache[b]){const t=function(t,e){const{vs:n,fs:i}=e,o=l(e.modules||[]);return{gl:t,vs:R(t,Object.assign({},e,{source:n,type:r.b,modules:o})),fs:R(t,Object.assign({},e,{source:i,type:r.a,modules:o})),getUniforms:N(o)}}(this.gl,{vs:e,fs:n,modules:c,inject:o,defines:i,hookFunctions:this._hookFunctions,transpileToGLSL100:u});this._programCache[b]=new D.a(this.gl,{hash:b,vs:t.vs,fs:t.fs,varyings:a,bufferMode:s}),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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];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],a=o.name;n[a]||(e[r++]=o,n[a]=!0)}return e.length=r,e}}},function(t,e,n){"use strict";n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return h})),n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return d}));var r=n(50),i=n(123),o=n(92),a=n(6),s=n(80),u=n(10);function l(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 Object(u.a)(!1),0}}var c=n(562);function f(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{sourceX:n=0,sourceY:r=0,sourceFormat:i=6408}=e;let{sourceAttachment:o=36064,target:a=null,sourceWidth:l,sourceHeight:c,sourceType:f}=e;const{framebuffer:h,deleteFramebuffer:p}=m(t);Object(u.a)(h);const{gl:d,handle:y,attachments:v}=h;l=l||h.width,c=c||h.height,36064===o&&null===y&&(o=1028),Object(u.a)(v[o]),f=f||v[o].type,a=g(a,f,i,l,c),f=f||Object(s.b)(a);const b=d.bindFramebuffer(36160,y);return d.readPixels(n,r,l,c,i,f,a),d.bindFramebuffer(36160,b||null),p&&h.delete(),a}function h(t,e){let{sourceX:n=0,sourceY:i=0,sourceFormat:o=6408,target:s=null,targetByteOffset:c=0,sourceWidth:f,sourceHeight:h,sourceType:p}=e;const{framebuffer:d,deleteFramebuffer:g}=m(t);Object(u.a)(d),f=f||d.width,h=h||d.height;const y=Object(a.a)(d.gl);if(p=p||(s?s.type:5121),!s){const t=l(o),e=function(t){switch(t){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return Object(u.a)(!1),0}}(p),n=c+f*h*t*e;s=new r.a(y,{byteLength:n,accessor:{type:p,size:t}})}return s.bind({target:35051}),Object(a.o)(y,{framebuffer:d},(()=>{y.readPixels(n,i,f,h,o,p,c)})),s.unbind({target:35051}),g&&d.delete(),s}function p(t){let{sourceAttachment:e=36064,targetMaxHeight:n=Number.MAX_SAFE_INTEGER}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=f(t,{sourceAttachment:e}),{width:i,height:o}=t;for(;o>n;)({data:r,width:i,height:o}=Object(s.d)({data:r,width:i,height:o}));Object(s.a)({data:r,width:i,height:o});const a=document.createElement("canvas");a.width=i,a.height=o;const u=a.getContext("2d"),l=u.createImageData(i,o);return l.data.set(r),u.putImageData(l,0,0),a.toDataURL()}function d(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{sourceX:r=0,sourceY:i=0,targetMipmaplevel:s=0,targetInternalFormat:l=6408}=n;let{targetX:c,targetY:f,targetZ:h,width:p,height:d}=n;const{framebuffer:g,deleteFramebuffer:y}=m(t);Object(u.a)(g);const{gl:v,handle:b}=g,_="undefined"!==typeof c||"undefined"!==typeof f||"undefined"!==typeof h;c=c||0,f=f||0,h=h||0;const A=v.bindFramebuffer(36160,b);Object(u.a)(e);let w=null;if(e instanceof o.a&&(w=e,p=Number.isFinite(p)?p:w.width,d=Number.isFinite(d)?d:w.height,w.bind(0),e=w.target),_)switch(e){case 3553:case 34067:v.copyTexSubImage2D(e,s,c,f,r,i,p,d);break;case 35866:case 32879:Object(a.a)(v).copyTexSubImage3D(e,s,c,f,h,r,i,p,d)}else v.copyTexImage2D(e,s,l,r,i,p,d,0);return w&&w.unbind(),v.bindFramebuffer(36160,A||null),y&&g.delete(),w}function m(t){return t instanceof i.a?{framebuffer:t,deleteFramebuffer:!1}:{framebuffer:Object(c.b)(t),deleteFramebuffer:!0}}function g(t,e,n,r,i){if(t)return t;e=e||5121;return new(Object(s.c)(e,{clamped:!1}))(r*i*l(n))}},function(t,e,n){t.exports={ShareButtons:"ShareButtons-module__ShareButtons___cDAH0",embed:"ShareButtons-module__embed___2sLwb",facebook:"ShareButtons-module__facebook___2WJkL",twitter:"ShareButtons-module__twitter___1xhH0",instagram:"ShareButtons-module__instagram___QzpwH",email:"ShareButtons-module__email___1mMea"}},function(t,e,n){t.exports={OverflowToolbar:"OverflowToolbar-module__OverflowToolbar___w2Lqe",isHidden:"OverflowToolbar-module__isHidden___3nm96",isVisible:"OverflowToolbar-module__isVisible___hHlTR",helpButton:"OverflowToolbar-module__helpButton___258q0",languageButton:"OverflowToolbar-module__languageButton___clEaE"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));function r(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "})),r}var i=function(t,e,n){var r=t.key+"-"+e.name;if(!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles),void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+r:"",i,t.sheet,!0);i=i.next}while(void 0!==i)}}},function(t,e,n){t.exports={TrayHero:"TrayHero-module__TrayHero___WaWEj",TrayHeroPlaceholder:"RecordTrayHero-module__TrayHeroPlaceholder___3Sdnv",videoIndicator:"RecordTrayHero-module__videoIndicator___1K7Fh",audioIndicator:"RecordTrayHero-module__audioIndicator___DaWfz",streetViewIndicator:"RecordTrayHero-module__streetViewIndicator___2biaA"}},function(t,e,n){t.exports={TypeFacets:"TypeFacets-module__TypeFacets___32cWv",filterLink:"TypeFacets-module__filterLink___2CdCw",isCurrent:"TypeFacets-module__isCurrent___281u5"}},function(t,e,n){t.exports={Sidebar:"Sidebar-module__Sidebar___22Cok",wrap:"Sidebar-module__wrap___KGVVL",needsScroll:"Sidebar-module__needsScroll___2H0Hf",atTop:"Sidebar-module__atTop___pOyv7",atBottom:"Sidebar-module__atBottom___3SnNz"}},function(t,e,n){"use strict";var r=n(0),i=n(649);var o="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function a(t,e){for(;t;){if(t===e)return!0;t=Object.getPrototypeOf(t)}return!1}var s=n(121),u=n(357);const l={position:"absolute",zIndex:-1};function c(t,e){if("function"===typeof t)return t(e);if(Array.isArray(t))return t.map((t=>c(t,e)));if(f(t)){if(function(t){const e=t.type,n=e&&e.defaultProps;return n&&n.mapStyle}(t))return e.style=l,Object(r.cloneElement)(t,e);if(function(t){const e=t.type;return e&&e.deckGLViewProps}(t))return Object(r.cloneElement)(t,e)}return t}function f(t){return t&&"object"===typeof t&&"type"in t||!1}function h(t){if("function"===typeof t)return Object(r.createElement)(s.a,{},t);if(Array.isArray(t))return t.map(h);if(f(t)){if(t.type===r.Fragment)return h(t.props.children);if(a(t.type,s.a))return t}return t}const p={mixBlendMode:null};function d(t){t.redrawReason&&(t.deck._drawLayers(t.redrawReason),t.redrawReason=null)}const m=Object(r.forwardRef)(((t,e)=>{const[n,l]=Object(r.useState)(0),m=Object(r.useRef)({control:null,version:n,forceUpdate:()=>l((t=>t+1))}).current,g=Object(r.useRef)(null),y=Object(r.useRef)(null),v=Object(r.useMemo)((()=>function({children:t,layers:e=[],views:n=null}){const i=[],o=[],l={};return r.Children.forEach(h(t),(t=>{if(f(t)){const e=t.type;if(a(e,u.a)){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(a(e,s.a)&&e!==s.a&&t.props.id){const n=new e(t.props);l[n.id]=n}}else t&&i.push(t)})),Object.keys(l).length>0&&(Array.isArray(n)?n.forEach((t=>{l[t.id]=t})):n&&(l[n.id]=n),n=Object.values(l)),{layers:e=o.length>0?[...o,...e]:e,children:i,views:n}}(t)),[t.layers,t.views,t.children]);let b=!0;const _=e=>{var n;return b&&t.viewState?(m.viewStateUpdateRequested=e,null):(m.viewStateUpdateRequested=null,null===(n=t.onViewStateChange)||void 0===n?void 0:n.call(t,e))},A=e=>{var n;b?m.interactionStateUpdateRequested=e:(m.interactionStateUpdateRequested=null,null===(n=t.onInteractionStateChange)||void 0===n||n.call(t,e))},w=Object(r.useMemo)((()=>{const e={...t,style:null,width:"100%",height:"100%",parent:g.current,canvas:y.current,layers:v.layers,views:v.views,onViewStateChange:_,onInteractionStateChange:A};return delete e._customRender,m.deck&&m.deck.setProps(e),e}),[t]);Object(r.useEffect)((()=>{const e=t.Deck||i.a;return m.deck=function(t,e,n){const r=new e({...n,_customRender:e=>{t.redrawReason=e;const n=r.getViewports();t.lastRenderedViewports!==n?t.forceUpdate():d(t)}});return r}(m,e,{...w,parent:g.current,canvas:y.current}),()=>{var t;return null===(t=m.deck)||void 0===t?void 0:t.finalize()}}),[]),o((()=>{d(m);const{viewStateUpdateRequested:t,interactionStateUpdateRequested:e}=m;t&&_(t),e&&A(e)})),Object(r.useImperativeHandle)(e,(()=>function(t){return{get deck(){return t.deck},pickObject:e=>t.deck.pickObject(e),pickMultipleObjects:e=>t.deck.pickMultipleObjects(e),pickObjects:e=>t.deck.pickObjects(e)}}(m)),[]);const x=m.deck&&m.deck.isInitialized?m.deck.getViewports():void 0,{ContextProvider:E,width:O,height:S,id:P,style:C}=t,{containerStyle:T,canvasStyle:k}=Object(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 p?i[o]=n[o]:r[o]=n[o];return{containerStyle:r,canvasStyle:i}}({width:O,height:S,style:C})),[O,S,C]);if(!m.viewStateUpdateRequested&&m.lastRenderedViewports===x||m.version!==n){m.lastRenderedViewports=x,m.version=n;const t=function({children:t,deck:e,ContextProvider:n}){const{viewManager:i}=e||{};if(!i||!i.views.length)return[];const o={},u=i.views[0].id;for(const r of t){let t=u,e=r;f(r)&&a(r.type,s.a)&&(t=r.props.id||u,e=r.props.children);const n=i.getViewport(t),l=i.getViewState(t);if(n){l.padding=n.padding;const{x:r,y:i,width:a,height:s}=n;e=c(e,{x:r,y:i,width:a,height:s,viewport:n,viewState:l}),o[t]||(o[t]={viewport:n,children:[]}),o[t].children.push(e)}}return Object.keys(o).map((t=>{const{viewport:i,children:a}=o[t],{x:s,y:u,width:l,height:c}=i,f={position:"absolute",left:s,top:u,width:l,height:c},h="view-".concat(t),p=Object(r.createElement)("div",{key:h,id:h,style:f},...a);if(n){const o={viewport:i,container:e.canvas.offsetParent,eventManager:e.eventManager,onViewStateChange:n=>{n.viewId=t,e._onViewStateChange(n)}};return Object(r.createElement)(n,{key:h,value:o},p)}return p}))}({children:v.children,deck:m.deck,ContextProvider:E}),e=Object(r.createElement)("canvas",{key:"canvas",id:P||"deckgl-overlay",ref:y,style:k});m.control=Object(r.createElement)("div",{id:"".concat(P||"deckgl","-wrapper"),ref:g,style:T},[e,t])}return b=!1,m.control}));m.defaultProps=i.a.defaultProps;e.a=m},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(0),i=n.n(r),o=n(4),a=n(284),s=n(32),u=n(436),l=n(143),c=n(51),f=n(1594),h=Object(o.css)([":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:",";}"],(function(t){return Object(c.c)(t.theme.checkBox.hover.border.color,t.theme)})),p=o.default.svg.withConfig({displayName:"StyledCheckBox__StyledCheckBoxIcon",componentId:"sc-1dbk5ju-0"})(["box-sizing:border-box;stroke-width:",";stroke:",";width:",";height:",";",";"],(function(t){return t.theme.checkBox.check.thickness}),(function(t){return Object(c.c)(t.theme.checkBox.color||"control",t.theme)}),(function(t){return t.theme.checkBox.icon.size||t.theme.checkBox.size}),(function(t){return t.theme.checkBox.icon.size||t.theme.checkBox.size}),(function(t){return t.theme.checkBox.icon.extend}));p.defaultProps={},Object.setPrototypeOf(p.defaultProps,s.a);var d=o.default.label.withConfig({displayName:"StyledCheckBox__StyledCheckBoxContainer",componentId:"sc-1dbk5ju-1"})(["display:flex;flex-direction:row;align-items:center;user-select:none;width:fit-content;"," "," "," ",""],(function(t){return t.disabled&&"\n  opacity: 0.5;\n  cursor: default;\n"}),(function(t){return!t.disabled&&"cursor: pointer;"}),(function(t){return t.theme.checkBox.hover.border.color&&h}),(function(t){return t.theme.checkBox.extend}));d.defaultProps={},Object.setPrototypeOf(d.defaultProps,s.a);var m=o.default.input.withConfig({displayName:"StyledCheckBox__StyledCheckBoxInput",componentId:"sc-1dbk5ju-2"})(["opacity:0;-moz-appearance:none;width:0;height:0;margin:0;",":checked + span > span{left:calc( "," - "," );background:",";}"],(function(t){return!t.disabled&&"cursor: pointer;"}),(function(t){return t.theme.checkBox.toggle.size}),(function(t){return t.theme.checkBox.size}),(function(t){return Object(c.c)(t.theme.checkBox.color||"control",t.theme)}));m.defaultProps={},Object.setPrototypeOf(m.defaultProps,s.a);var g=o.default.div.withConfig({displayName:"StyledCheckBox__StyledCheckBoxBox",componentId:"sc-1dbk5ju-3"})(["",";",";"],(function(t){return t.focus&&Object(f.f)()}),(function(t){return t.theme.checkBox.check.extend}));g.defaultProps={},Object.setPrototypeOf(g.defaultProps,s.a);var y=o.default.span.withConfig({displayName:"StyledCheckBox__StyledCheckBoxToggle",componentId:"sc-1dbk5ju-4"})(["box-sizing:border-box;vertical-align:middle;display:inline-block;width:",";height:",";border:"," solid;border-color:",";border-radius:",";background-color:",";",";",";"],(function(t){return t.theme.checkBox.toggle.size}),(function(t){return t.theme.checkBox.size}),(function(t){return t.theme.checkBox.border.width}),(function(t){return Object(c.c)(t.theme.checkBox.border.color,t.theme)}),(function(t){return t.theme.checkBox.toggle.radius}),(function(t){return t.theme.checkBox.toggle.background?Object(c.c)(t.theme.checkBox.toggle.background,t.theme):"transparent"}),(function(t){return t.focus&&Object(f.f)()}),(function(t){return t.theme.checkBox.toggle.extend}));y.defaultProps={},Object.setPrototypeOf(y.defaultProps,s.a);var v=o.default.span.withConfig({displayName:"StyledCheckBox__StyledCheckBoxKnob",componentId:"sc-1dbk5ju-5"})(["box-sizing:border-box;position:relative;display:inherit;top:-",";left:-",";transition:all 0.3s;width:",";height:",";background:",";border-radius:",";",";"],(function(t){return t.theme.checkBox.border.width}),(function(t){return t.theme.checkBox.border.width}),(function(t){return t.theme.checkBox.size}),(function(t){return t.theme.checkBox.size}),(function(t){return Object(c.c)(t.theme.checkBox.toggle.color[t.theme.dark?"dark":"light"],t.theme)}),(function(t){return t.theme.checkBox.toggle.radius}),(function(t){return t.theme.checkBox.toggle.knob.extend}));v.defaultProps={},Object.setPrototypeOf(v.defaultProps,s.a);var b=o.default.div.withConfig({displayName:"StyledCheckBox",componentId:"sc-1dbk5ju-6"})(["flex-shrink:0;"]);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)}b.defaultProps={},Object.setPrototypeOf(b.defaultProps,s.a);var A=function(t){"checkbox"!==t.target.type&&t.stopPropagation()},w=Object(r.forwardRef)((function(t,e){var n,f=t.a11yTitle,h=t.checked,w=t.disabled,x=t.focus,E=t.id,O=t.label,S=t.name,P=t.onBlur,C=t.onChange,T=t.onFocus,k=t.reverse,I=t.toggle,L=t.indeterminate,j=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,["a11yTitle","checked","disabled","focus","id","label","name","onBlur","onChange","onFocus","reverse","toggle","indeterminate"]),M=Object(r.useContext)(o.ThemeContext)||s.a.theme,R=Object(r.useContext)(l.a).useFormInput(S,h,!1),N=R[0],D=R[1],F=Object(r.useState)(x),B=F[0],z=F[1];Object(r.useEffect)((function(){return z(x)}),[x]),Object(r.useEffect)((function(){h&&L&&console.warn('Checkbox cannot be "checked" and "indeterminate" at the same time.'),I&&L&&console.warn('Checkbox of type toggle does not have "indeterminate" state.')}),[h,I,L]);var U,G={checked:N,disabled:w,focus:B,reverse:k,toggle:I,indeterminate:L};w&&N&&(U=i.a.createElement("input",{name:S,type:"hidden",value:"true"}));var V=M.checkBox.icons,q=V.checked,H=V.indeterminate,W=Object(c.c)(M.checkBox.border.color,M);N&&(W=Object(c.c)(M.checkBox.color||"control",M));var X=I?i.a.createElement(y,G,i.a.createElement(v,G)):i.a.createElement(g,_({as:u.a,align:"center",justify:"center",width:M.checkBox.size,height:M.checkBox.size,border:{size:M.checkBox.border.width,color:W},round:M.checkBox.check.radius},G),!L&&N&&(q?i.a.createElement(q,{theme:M,as:p}):i.a.createElement(p,_({theme:M,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"},G),i.a.createElement("path",{fill:"none",d:"M6,11.3 L10.3,16 L18,6.2"}))),!N&&L&&(H?i.a.createElement(H,{theme:M,as:p}):i.a.createElement(p,_({theme:M,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"},G),i.a.createElement("path",{fill:"none",d:"M6,12 L18,12"})))),Y=k?"left":"right",Z=i.a.createElement(b,_({as:u.a,align:"center",justify:"center",margin:O&&(n={},n[Y]=M.checkBox.gap||"small",n)},G),i.a.createElement(m,_({},j,{ref:e,type:"checkbox"},Object(a.c)({id:E,name:S,checked:N,disabled:w}),G,{onFocus:function(t){z(!0),T&&T(t)},onBlur:function(t){z(!1),P&&P(t)},onChange:function(t){D(t.target.checked),C&&C(t)}})),X,U),K="string"===typeof O?i.a.createElement("span",null,O):O,$=k?K:Z,J=k?Z:K;return i.a.createElement(d,_({"aria-label":f,reverse:k},Object(a.c)({htmlFor:E,disabled:w}),{checked:N,onClick:A},G),$,J)}));w.displayName="CheckBox";var x=w},,function(t,e,n){"use strict";t.exports={API_ORIGIN:"https://api.mapbox.com",EVENT_PROGRESS_DOWNLOAD:"downloadProgress",EVENT_PROGRESS_UPLOAD:"uploadProgress",EVENT_ERROR:"error",EVENT_RESPONSE:"response",ERROR_HTTP:"HttpError",ERROR_REQUEST_ABORTED:"RequestAbortedError"}},function(t,e,n){"use strict";(function(t){var r=n(485),i=n(486),o=n(487);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(t,e,n);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return l(this,t,e,n)}function l(t,e,n,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,n,r):"string"===typeof e?function(t,e,n){"string"===typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|p(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(r=e.length)!==r?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(c(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(t,o+h)!==l(e,h)){f=!1;break}if(f)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function _(t,e,n,r){return V(U(e,t.length-n),t,n,r)}function A(t,e,n,r){return V(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return A(t,e,n,r)}function x(t,e,n,r){return V(G(e),t,n,r)}function E(t,e,n,r){return V(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function O(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,l=t[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128===(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(t){var e=t.length;if(e<=P)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=P));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return l(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return c(e),e<=0?s(t,e):void 0!==n?"string"===typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return f(null,t)},u.allocUnsafeSlow=function(t){return f(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):m.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=t.slice(e,n),f=0;f<s;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"===typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return A(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function C(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function k(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=z(t[o]);return i}function I(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(t,e,n){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function M(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function N(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(t,e,n,r,o){return o||N(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return o||N(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||j(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||j(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);j(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);j(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return D(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return D(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"===typeof t){if("string"===typeof e?(r=e,e=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=u.isBuffer(t)?t:U(new u(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function z(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function V(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(36))},function(t,e,n){"use strict";e.__esModule=!0,e.getRGBA=e.colorIsDark=e.normalizeColor=void 0;e.normalizeColor=function t(e,n,r){var i=n.global&&void 0!==n.global.colors[e]?n.global.colors[e]:e,o=i;return i&&((!0===r||void 0===r&&n.dark)&&void 0!==i.dark?o=i.dark:!1!==r&&n.dark||void 0===i.light||(o=i.light)),o&&n.global&&void 0!==n.global.colors[o]&&(o=t(o,n,r)),o};var r=/^#[A-Za-z0-9]{3,4}$|^#[A-Za-z0-9]{6,8}$/,i=/^rgba?\(\s?([0-9]*)\s?,\s?([0-9]*)\s?,\s?([0-9]*)\s?\)/,o=/^rgba?\(\s?([0-9]*)\s?,\s?([0-9]*)\s?,\s?([0-9]*)\s?,\s?([.0-9]*)\s?\)/,a=/^hsla?\(\s?([0-9]*)\s?,\s?([0-9]*)%?\s?,\s?([0-9]*)%?\s?.*?\)/,s=function(t){return r.test(t)||i.test(t)||o.test(t)||a.test(t)},u=function(t){if(r.test(t)){var e=function(t){return t.length<7?t.match(/[A-Za-z0-9]{1}/g).map((function(t){return parseInt(""+t+t,16)})):t.match(/[A-Za-z0-9]{2}/g).map((function(t){return parseInt(t,16)}))}(t),n=e[0],s=e[1],u=e[2],l=e[3];return[n,s,u,void 0!==l?l/255:void 0]}var c=t.match(i);if(c)return c.splice(1).map((function(t){return parseInt(t,10)}));if(c=t.match(o))return c.splice(1).map((function(t){return parseFloat(t,10)}));if(c=t.match(a)){var f=c.splice(1).map((function(t){return parseInt(t,10)}));return function(t,e,n){var r,i,o;if(0===e||"0"===e)r=n,i=n,o=n;else{var a=function(t,e,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<.16666667?t+6*(e-t)*r:r<.5?e:r<.66666667?t+(e-t)*(.66666667-r)*6:t},s=n<.5?n*(1+e):n+e-n*e,u=2*n-s;r=a(u,s,t+.33333333),i=a(u,s,t),o=a(u,s,t-.33333333)}return[Math.round(255*r),Math.round(255*i),Math.round(255*o)]}(f[0]/360,f[1]/100,f[2]/100)}return t};e.colorIsDark=function(t){if(t&&s(t)){var e=u(t),n=e[0],r=e[1],i=e[2];if(e[3]<.5)return;return(299*n+587*r+114*i)/1e3<125}};e.getRGBA=function(t,e){if(t&&s(t)){var n=u(t),r=n[0],i=n[1],o=n[2],a=n[3];return"rgba("+r+", "+i+", "+o+", "+(void 0!==e?e:void 0!==a?a:1)+")"}}},function(t,e,n){"use strict";function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"GeoJsonEditMode",{enumerable:!0,get:function(){return o.GeoJsonEditMode}}),Object.defineProperty(e,"ModifyMode",{enumerable:!0,get:function(){return a.ModifyMode}}),Object.defineProperty(e,"ResizeCircleMode",{enumerable:!0,get:function(){return s.ResizeCircleMode}}),Object.defineProperty(e,"TranslateMode",{enumerable:!0,get:function(){return u.TranslateMode}}),Object.defineProperty(e,"ScaleMode",{enumerable:!0,get:function(){return l.ScaleMode}}),Object.defineProperty(e,"RotateMode",{enumerable:!0,get:function(){return c.RotateMode}}),Object.defineProperty(e,"DuplicateMode",{enumerable:!0,get:function(){return f.DuplicateMode}}),Object.defineProperty(e,"ExtendLineStringMode",{enumerable:!0,get:function(){return h.ExtendLineStringMode}}),Object.defineProperty(e,"SplitPolygonMode",{enumerable:!0,get:function(){return p.SplitPolygonMode}}),Object.defineProperty(e,"ExtrudeMode",{enumerable:!0,get:function(){return d.ExtrudeMode}}),Object.defineProperty(e,"ElevationMode",{enumerable:!0,get:function(){return m.ElevationMode}}),Object.defineProperty(e,"TransformMode",{enumerable:!0,get:function(){return g.TransformMode}}),Object.defineProperty(e,"DrawPointMode",{enumerable:!0,get:function(){return y.DrawPointMode}}),Object.defineProperty(e,"DrawLineStringMode",{enumerable:!0,get:function(){return v.DrawLineStringMode}}),Object.defineProperty(e,"DrawPolygonMode",{enumerable:!0,get:function(){return b.DrawPolygonMode}}),Object.defineProperty(e,"DrawRectangleMode",{enumerable:!0,get:function(){return _.DrawRectangleMode}}),Object.defineProperty(e,"DrawSquareMode",{enumerable:!0,get:function(){return A.DrawSquareMode}}),Object.defineProperty(e,"DrawRectangleFromCenterMode",{enumerable:!0,get:function(){return w.DrawRectangleFromCenterMode}}),Object.defineProperty(e,"DrawSquareFromCenterMode",{enumerable:!0,get:function(){return x.DrawSquareFromCenterMode}}),Object.defineProperty(e,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return E.DrawCircleByDiameterMode}}),Object.defineProperty(e,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return O.DrawCircleFromCenterMode}}),Object.defineProperty(e,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return S.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(e,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return P.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(e,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return C.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(e,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return T.Draw90DegreePolygonMode}}),Object.defineProperty(e,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return k.DrawPolygonByDraggingMode}}),Object.defineProperty(e,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return I.ImmutableFeatureCollection}}),Object.defineProperty(e,"ViewMode",{enumerable:!0,get:function(){return L.ViewMode}}),Object.defineProperty(e,"MeasureDistanceMode",{enumerable:!0,get:function(){return j.MeasureDistanceMode}}),Object.defineProperty(e,"MeasureAreaMode",{enumerable:!0,get:function(){return M.MeasureAreaMode}}),Object.defineProperty(e,"MeasureAngleMode",{enumerable:!0,get:function(){return R.MeasureAngleMode}}),Object.defineProperty(e,"CompositeMode",{enumerable:!0,get:function(){return N.CompositeMode}}),Object.defineProperty(e,"SnappableMode",{enumerable:!0,get:function(){return D.SnappableMode}}),Object.defineProperty(e,"_memoize",{enumerable:!0,get:function(){return F.default}}),e.utils=void 0;var i,o=n(64),a=n(512),s=n(1235),u=n(513),l=n(718),c=n(719),f=n(1239),h=n(1240),p=n(1241),d=n(1243),m=n(1244),g=n(1245),y=n(1246),v=n(1247),b=n(514),_=n(1248),A=n(1249),w=n(1250),x=n(1251),E=n(1252),O=n(1253),S=n(1254),P=n(1255),C=n(1256),T=n(1257),k=n(1258),I=n(161),L=n(1259),j=n(1260),M=n(1261),R=n(1262),N=n(720),D=n(1263),F=(i=n(722))&&i.__esModule?i:{default:i},B=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!==typeof t)return{default:t};var e=z();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=t[o]}n.default=t,e&&e.set(t,n);return n}(n(97));function z(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return z=function(){return t},t}e.utils=B},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(1),i=n(100),o=n(12),a=n(23);const s=1e-6;class u{constructor({phi:t=0,theta:e=0,radius:n=1,bearing:i,pitch:o,altitude:a,radiusScale:s=6371e3}={}){Object(r.a)(this,"phi",void 0),Object(r.a)(this,"theta",void 0),Object(r.a)(this,"radius",void 0),Object(r.a)(this,"radiusScale",void 0),this.phi=t,this.theta=e,this.radius=n||a||1,this.radiusScale=s||1,void 0!==i&&(this.bearing=i),void 0!==o&&(this.pitch=o),this.check()}toString(){return this.formatString(o.f)}formatString({printTypes:t=!1}){const e=o.l;return"".concat(t?"Spherical":"","[rho:").concat(e(this.radius),",theta:").concat(e(this.theta),",phi:").concat(e(this.phi),"]")}equals(t){return Object(o.j)(this.radius,t.radius)&&Object(o.j)(this.theta,t.theta)&&Object(o.j)(this.phi,t.phi)}exactEquals(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}get bearing(){return 180-Object(o.i)(this.phi)}set bearing(t){this.phi=Math.PI-Object(o.o)(t)}get pitch(){return Object(o.i)(this.theta)}set pitch(t){this.theta=Object(o.o)(t)}get longitude(){return Object(o.i)(this.phi)}get latitude(){return Object(o.i)(this.theta)}get lng(){return Object(o.i)(this.phi)}get lat(){return Object(o.i)(this.theta)}get z(){return(this.radius-1)*this.radiusScale}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this.check()}clone(){return(new u).copy(this)}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}fromLngLatZ([t,e,n]){return this.radius=1+n/this.radiusScale,this.phi=Object(o.o)(e),this.theta=Object(o.o)(t),this.check()}fromVector3(t){return this.radius=a.i(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos(Object(o.d)(t[2]/this.radius,-1,1))),this.check()}toVector3(){return new i.a(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(s,Math.min(Math.PI-s,this.phi)),this}check(){if(!Number.isFinite(this.phi)||!Number.isFinite(this.theta)||!(this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}},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}Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(t))return e;return[255*t[0],255*t[1],255*t[2],255*t[3]]},e.recursivelyTraverseNestedArrays=function t(e,n,i){if(!Array.isArray(e[0]))return!0;for(var o=0;o<e.length;o++)if(t(e[o],[].concat(function(t){if(Array.isArray(t))return r(t)}(a=n)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(a)||function(t,e){if(!t)return;if("string"===typeof t)return r(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(a)||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.")}(),[o]),i)){i(e,n);break}var a;return!1}},function(t,e,n){"use strict";n.r(e);var r=n(89),i=6371008.8,o={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*i,kilometers:6371.0088,kilometres:6371.0088,meters:i,metres:i,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:i/1852,radians:1,yards:5825721.287490856};function a(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return a({type:"Point",coordinates:t},e,n)}function u(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return a({type:"LineString",coordinates:t},e,n)}function l(t,e){void 0===e&&(e="kilometers");var n=o[e];if(!n)throw new Error(e+" units is invalid");return t*n}function c(t){return t%360*Math.PI/180}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function h(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 p=function(t,e,n){void 0===n&&(n={});var r=h(t),i=h(e),o=c(i[1]-r[1]),a=c(i[0]-r[0]),s=c(r[1]),u=c(i[1]),f=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(u);return l(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)},d=n(151),m=n(260);function g(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function y(t,e){g(t,(function(t,n,r,i,o){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(a(t,r,{bbox:i,id:o}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l];if(!1===e(a({type:s,coordinates:c},r),n,l))return!1}}))}e.default=function(t,e,n){void 0===n&&(n={});var i=s([1/0,1/0],{dist:1/0}),o=0;return y(t,(function(t){for(var a=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(t),l=0;l<a.length-1;l++){var c=s(a[l]);c.properties.dist=p(e,c,n);var f=s(a[l+1]);f.properties.dist=p(e,f,n);var h=p(c,f,n),g=Math.max(c.properties.dist,f.properties.dist),y=Object(r.default)(c,f),v=Object(d.default)(e,g,y+90,n),b=Object(d.default)(e,g,y-90,n),_=Object(m.default)(u([v.geometry.coordinates,b.geometry.coordinates]),u([c.geometry.coordinates,f.geometry.coordinates])),A=null;_.features.length>0&&((A=_.features[0]).properties.dist=p(e,A,n),A.properties.location=o+p(c,A,n)),c.properties.dist<i.properties.dist&&((i=c).properties.index=l,i.properties.location=o),f.properties.dist<i.properties.dist&&((i=f).properties.index=l+1,i.properties.location=o+h),A&&A.properties.dist<i.properties.dist&&((i=A).properties.index=l),o+=h}})),i}},function(t,e,n){(function(n){var r;!function(n,i){t.exports=function(n){"use strict";var i,o=(n=n||{}).Base64,a="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=function(t){for(var e={},n=0,r=t.length;n<r;n++)e[t.charAt(n)]=n;return e}(s),l=String.fromCharCode,c=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?l(192|e>>>6)+l(128|63&e):l(224|e>>>12&15)+l(128|e>>>6&63)+l(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return l(240|e>>>18&7)+l(128|e>>>12&63)+l(128|e>>>6&63)+l(128|63&e)},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(t){return t.replace(f,c)},p=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),e>=2?"=":s.charAt(n>>>6&63),e>=1?"=":s.charAt(63&n)].join("")},d=n.btoa&&"function"==typeof n.btoa?function(t){return n.btoa(t)}:function(t){if(t.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return t.replace(/[\s\S]{1,3}/g,p)},m=function(t){return d(h(String(t)))},g=function(t){return t.replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,"")},y=function(t,e){return e?g(m(t)):m(t)},v=function(t){return y(t,!0)};n.Uint8Array&&(i=function(t,e){for(var n="",r=0,i=t.length;r<i;r+=3){var o=t[r],a=t[r+1],u=t[r+2],l=o<<16|a<<8|u;n+=s.charAt(l>>>18)+s.charAt(l>>>12&63)+("undefined"!=typeof a?s.charAt(l>>>6&63):"=")+("undefined"!=typeof u?s.charAt(63&l):"=")}return e?g(n):n});var b,_=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,A=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return l(55296+(e>>>10))+l(56320+(1023&e));case 3:return l((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return l((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},w=function(t){return t.replace(_,A)},x=function(t){var e=t.length,n=e%4,r=(e>0?u[t.charAt(0)]<<18:0)|(e>1?u[t.charAt(1)]<<12:0)|(e>2?u[t.charAt(2)]<<6:0)|(e>3?u[t.charAt(3)]:0),i=[l(r>>>16),l(r>>>8&255),l(255&r)];return i.length-=[0,0,2,1][n],i.join("")},E=n.atob&&"function"==typeof n.atob?function(t){return n.atob(t)}:function(t){return t.replace(/\S{1,4}/g,x)},O=function(t){return E(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},S=function(t){return w(E(t))},P=function(t){return String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},C=function(t){return S(P(t))};n.Uint8Array&&(b=function(t){return Uint8Array.from(O(P(t)),(function(t){return t.charCodeAt(0)}))});var T=function(){var t=n.Base64;return n.Base64=o,t};if(n.Base64={VERSION:a,atob:O,btoa:d,fromBase64:C,toBase64:y,utob:h,encode:y,encodeURI:v,btou:w,decode:C,noConflict:T,fromUint8Array:i,toUint8Array:b},"function"===typeof Object.defineProperty){var k=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",k((function(){return C(this)}))),Object.defineProperty(String.prototype,"toBase64",k((function(t){return y(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",k((function(){return y(this,!0)})))}}n.Meteor&&(Base64=n.Base64);t.exports?t.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(e,[]))||(t.exports=r);return{Base64:n.Base64}}(n)}("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n?n:this)}).call(this,n(36))},function(t,e,n){"use strict";var r=n(561),i=n(1530),o=n(27),a=n(46);var s={id:"JSON",name:"JSON",module:"",version:"",options:{},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 u="8.8.22",l=globalThis.deck&&globalThis.deck.VERSION;if(l&&l!==u)throw new Error("deck.gl - multiple versions detected: ".concat(l," vs ").concat(u));l||(o.a.log(1,"deck.gl ".concat(u))(),globalThis.deck={...globalThis.deck,VERSION:u,version:u,log:o.a,_registerLoggers:a.b},Object(r.b)([s,[i.a,{imagebitmap:{premultiplyAlpha:"none"}}]]));e.a=globalThis.deck},function(t,e,n){"use strict";e.a=function(t){function e(t,r,u,l,h){for(var p,d,m,g,_,w=0,x=0,E=0,O=0,S=0,L=0,M=m=p=0,N=0,D=0,F=0,B=0,z=u.length,U=z-1,G="",V="",q="",H="";N<z;){if(d=u.charCodeAt(N),N===U&&0!==x+O+E+w&&(0!==x&&(d=47===x?10:47),O=E=w=0,z++,U++),0===x+O+E+w){if(N===U&&(0<D&&(G=G.replace(f,"")),0<G.trim().length)){switch(d){case 32:case 9:case 59:case 13:case 10:break;default:G+=u.charAt(N)}d=59}switch(d){case 123:for(p=(G=G.trim()).charCodeAt(0),m=1,B=++N;N<z;){switch(d=u.charCodeAt(N)){case 123:m++;break;case 125:m--;break;case 47:switch(d=u.charCodeAt(N+1)){case 42:case 47:t:{for(M=N+1;M<U;++M)switch(u.charCodeAt(M)){case 47:if(42===d&&42===u.charCodeAt(M-1)&&N+2!==M){N=M+1;break t}break;case 10:if(47===d){N=M+1;break t}}N=M}}break;case 91:d++;case 40:d++;case 34:case 39:for(;N++<U&&u.charCodeAt(N)!==d;);}if(0===m)break;N++}if(m=u.substring(B,N),0===p&&(p=(G=G.replace(c,"").trim()).charCodeAt(0)),64===p){switch(0<D&&(G=G.replace(f,"")),d=G.charCodeAt(1)){case 100:case 109:case 115:case 45:D=r;break;default:D=I}if(B=(m=e(r,D,m,d,h+1)).length,0<j&&(_=s(3,m,D=n(I,G,F),r,C,P,B,d,h,l),G=D.join(""),void 0!==_&&0===(B=(m=_.trim()).length)&&(d=0,m="")),0<B)switch(d){case 115:G=G.replace(A,a);case 100:case 109:case 45:m=G+"{"+m+"}";break;case 107:m=(G=G.replace(y,"$1 $2"))+"{"+m+"}",m=1===k||2===k&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=G+m,112===l&&(V+=m,m="")}else m=""}else m=e(r,n(r,G,F),m,l,h+1);q+=m,m=F=D=M=p=0,G="",d=u.charCodeAt(++N);break;case 125:case 59:if(1<(B=(G=(0<D?G.replace(f,""):G).trim()).length))switch(0===M&&(p=G.charCodeAt(0),45===p||96<p&&123>p)&&(B=(G=G.replace(" ",":")).length),0<j&&void 0!==(_=s(1,G,r,t,C,P,V.length,l,h,l))&&0===(B=(G=_.trim()).length)&&(G="\0\0"),p=G.charCodeAt(0),d=G.charCodeAt(1),p){case 0:break;case 64:if(105===d||99===d){H+=G+u.charAt(N);break}default:58!==G.charCodeAt(B-1)&&(V+=i(G,p,d,G.charCodeAt(2)))}F=D=M=p=0,G="",d=u.charCodeAt(++N)}}switch(d){case 13:case 10:47===x?x=0:0===1+p&&107!==l&&0<G.length&&(D=1,G+="\0"),0<j*R&&s(0,G,r,t,C,P,V.length,l,h,l),P=1,C++;break;case 59:case 125:if(0===x+O+E+w){P++;break}default:switch(P++,g=u.charAt(N),d){case 9:case 32:if(0===O+w+x)switch(S){case 44:case 58:case 9:case 32:g="";break;default:32!==d&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===O+x+w&&(D=F=1,g="\f"+g);break;case 108:if(0===O+x+w+T&&0<M)switch(N-M){case 2:112===S&&58===u.charCodeAt(N-3)&&(T=S);case 8:111===L&&(T=L)}break;case 58:0===O+x+w&&(M=N);break;case 44:0===x+E+O+w&&(D=1,g+="\r");break;case 34:case 39:0===x&&(O=O===d?0:0===O?d:O);break;case 91:0===O+x+E&&w++;break;case 93:0===O+x+E&&w--;break;case 41:0===O+x+w&&E--;break;case 40:if(0===O+x+w){if(0===p)if(2*S+3*L===533);else p=1;E++}break;case 64:0===x+E+O+w+M+m&&(m=1);break;case 42:case 47:if(!(0<O+w+E))switch(x){case 0:switch(2*d+3*u.charCodeAt(N+1)){case 235:x=47;break;case 220:B=N,x=42}break;case 42:47===d&&42===S&&B+2!==N&&(33===u.charCodeAt(B+2)&&(V+=u.substring(B,N+1)),g="",x=0)}}0===x&&(G+=g)}L=S,S=d,N++}if(0<(B=V.length)){if(D=r,0<j&&(void 0!==(_=s(2,V,D,t,C,P,B,l,h,l))&&0===(V=_).length))return H+V+q;if(V=D.join(",")+"{"+V+"}",0!==k*T){switch(2!==k||o(V,2)||(T=0),T){case 111:V=V.replace(b,":-moz-$1")+V;break;case 112:V=V.replace(v,"::-webkit-input-$1")+V.replace(v,"::-moz-$1")+V.replace(v,":-ms-input-$1")+V}T=0}}return H+V+q}function n(t,e,n){var i=e.trim().split(m);e=i;var o=i.length,a=t.length;switch(a){case 0:case 1:var s=0;for(t=0===a?"":t[0]+" ";s<o;++s)e[s]=r(t,e[s],n).trim();break;default:var u=s=0;for(e=[];s<o;++s)for(var l=0;l<a;++l)e[u++]=r(t[l]+" ",i[s],n).trim()}return e}function r(t,e,n){var r=e.charCodeAt(0);switch(33>r&&(r=(e=e.trim()).charCodeAt(0)),r){case 38:return e.replace(g,"$1"+t.trim());case 58:return t.trim()+e.replace(g,"$1"+t.trim());default:if(0<1*n&&0<e.indexOf("\f"))return e.replace(g,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+e}function i(t,e,n,r){var a=t+";",s=2*e+3*n+4*r;if(944===s){t=a.indexOf(":",9)+1;var u=a.substring(t,a.length-1).trim();return u=a.substring(0,t).trim()+u+";",1===k||2===k&&o(u,1)?"-webkit-"+u+u:u}if(0===k||2===k&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(u=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+u+a;case 1005:return p.test(a)?a.replace(h,":-webkit-")+a.replace(h,":-moz-")+a:a;case 1e3:switch(e=(u=a.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(e)){case 226:u=a.replace(_,"tb");break;case 232:u=a.replace(_,"tb-rl");break;case 220:u=a.replace(_,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+u+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(e=(a=t).length-10,s=(u=(33===a.charCodeAt(e)?a.substring(0,e):a).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(u,"-webkit-"+u)+";"+a.replace(u,"-ms-"+u+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return u=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+u+"-ms-flex-"+u+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===O.test(t))return 115===(u=t.substring(t.indexOf(":")+1)).charCodeAt(0)?i(t.replace("stretch","fill-available"),e,n,r).replace(":fill-available",":stretch"):a.replace(u,"-webkit-"+u)+a.replace(u,"-moz-"+u.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+a}return a}function o(t,e){var n=t.indexOf(1===e?":":"{"),r=t.substring(0,3!==e?n:10);return n=t.substring(n+1,t.length-1),M(2!==e?r:r.replace(E,"$1"),n,e)}function a(t,e){var n=i(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(w," or ($1)").substring(4):"("+e+")"}function s(t,e,n,r,i,o,a,s,u,c){for(var f,h=0,p=e;h<j;++h)switch(f=L[h].call(l,t,p,n,r,i,o,a,s,u,c)){case void 0:case!1:case!0:case null:break;default:p=f}if(p!==e)return p}function u(t){return void 0!==(t=t.prefix)&&(M=null,t?"function"!==typeof t?k=1:(k=2,M=t):k=0),u}function l(t,n){var r=t;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<j){var i=s(-1,n,r,r,C,P,0,0,0,0);void 0!==i&&"string"===typeof i&&(n=i)}var o=e(I,r,n,0,0);return 0<j&&(void 0!==(i=s(-2,o,r,r,C,P,o.length,0,0,0))&&(o=i)),"",T=0,P=C=1,o}var c=/^\0+/g,f=/[\0\r\f]/g,h=/: */g,p=/zoo|gra/,d=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,y=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,b=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,A=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,O=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,P=1,C=1,T=0,k=1,I=[],L=[],j=0,M=null,R=0;return l.use=function t(e){switch(e){case void 0:case null:j=L.length=0;break;default:if("function"===typeof e)L[j++]=e;else if("object"===typeof e)for(var n=0,r=e.length;n<r;++n)t(e[n]);else R=0|!!e}return t},l.set=u,void 0!==t&&u(t),l}},function(t,e,n){"use strict";n.r(e);var r=n(14),i=n(0),o=n.n(i),a=n(7),s=n(77),u=n(171),l=n(102),c=n(82),f=n(132),h=n.n(f);function p(){p=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=d,s(v,"constructor",d),s(d,"constructor",h),h.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function d(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function m(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return g(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 g(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(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}window.DateTime=c.DateTime,window.Interval=c.Interval;e.default=Object(a.a)((function(t){var e,n=t.entity;if(!(e=n||Object(s.useParentContext)()))return null;var a=m(Object(i.useState)([]),2),f=a[0],g=a[1],y=m(Object(i.useState)(null),2),v=(y[0],y[1]),b=m(Object(i.useState)(null),2),_=(b[0],b[1]),A=m(Object(i.useState)(null),2),w=A[0],x=A[1],E=m(Object(i.useState)({month:"long",day:"numeric",year:"numeric"}),2),O=E[0],S=E[1],P=Object(r.e)();Object(i.useEffect)((function(){var t=function(){var t,n=(t=p().mark((function t(){var n,r,i,o,a,s,f,h;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.fetchTimelineItemQuery)({slug:e.slug});case 2:(n=t.sent).parent[0]&&(r=c.DateTime.fromISO(n.parent[0].first_date[0].date_from),v(r),i=c.DateTime.fromISO(n.parent[0].last_date[0].date_from),_(i),(o=c.Interval.fromDateTimes(r.startOf("month").plus({minutes:1,months:1}),i.endOf("month"))).length("days")<1?(a={hours:1},S(c.DateTime.TIME_SIMPLE)):o.length("days")<=7?(a={days:1},S({day:"long"})):o.length("years")<=1?(a={months:1},S({month:"short",year:"numeric"})):o.length("years")<=6?(a={months:6},S({month:"short",year:"numeric"})):o.length("years")<=12?(a={years:2},S({year:"numeric"})):(a={years:5},S({year:"numeric"})),s=o.splitBy(a),f=n.parent[0].items.map((function(t){var e=Object(l.getPath)(t);return{name:t.name,date:c.DateTime.fromISO(t.date_from),link:e,isPoint:!0,isCurrent:e===P.pathname}})),s.forEach((function(t){f.push({isPoint:!1,date:t.start})})),(h=f.sort((function(t,e){return t.date<e.date?-1:t.date>e.date?1:0}))).map((function(t,e){if(t.size=0,e>0){var n=(t.date-h[e-1].date)/864e5;n&&(t.size=n)}})),g(h),x(40*h.map((function(t){return t.isPoint})).length),j(),L());case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){d(o,r,i,a,s,"next",t)}function s(t){d(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();e&&t()}),[e]);var C,T=Object(i.useRef)(),k=Object(i.useRef)(),I=Object(i.useRef)(null),L=function(){I.current&&I.current.scrollIntoView({block:"end",inline:"center"}),k.current.style.scrollBehavior="smooth"},j=function(){k.current.scrollWidth>k.current.clientWidth?T.current.classList.add(h.a.isOverflowing):T.current.classList.remove(h.a.isOverflowing),k.current.scrollLeft>0?T.current.classList.add(h.a.isOverflowingLeft):T.current.classList.remove(h.a.isOverflowingLeft),k.current.scrollWidth>k.current.scrollLeft+k.current.clientWidth?T.current.classList.add(h.a.isOverflowingRight):T.current.classList.remove(h.a.isOverflowingRight)};Object(i.useEffect)((function(){return window.addEventListener("resize",j),k.current.addEventListener("scroll",j),function(){window.removeEventListener("resize",j),k.current.removeEventListener("scroll",j)}}),[]);var M=function(t){if(t.persist(),"mousedown"===t.type){var e=function(t){"left"===t.target.id?k.current.scrollLeft-=100:k.current.scrollLeft+=100};e(t),C=setInterval((function(){e(t)}),100)}"mouseup"!==t.type&&"mouseout"!==t.type||clearInterval(C)};return o.a.createElement("div",{className:h.a.Timeline,ref:T},o.a.createElement("div",{className:h.a.shadow}),o.a.createElement("div",{className:h.a.pane,ref:k},o.a.createElement("div",{className:h.a.line,style:{minWidth:w+"px"}},o.a.createElement("div",{className:h.a.timelineItems},f.map((function(t,e){return t.isPoint?o.a.createElement("div",{className:h.a.timelineItem,ref:t.isCurrent?I:null,style:{flexGrow:t.size},key:"timelineItem-".concat(e)},o.a.createElement(r.a,{to:t.link,title:t.name},o.a.createElement("div",{className:h.a.dot},o.a.createElement("span",{className:h.a.date},t.year),o.a.createElement("span",{className:h.a.title},t.name)))):o.a.createElement("div",{className:h.a.tick,style:{flexGrow:t.size},key:"timelineItem-".concat(e)},o.a.createElement("span",null,t.date.toLocaleString(O)))}))))),o.a.createElement("button",{className:h.a.scrollLeftButton,id:"left",onMouseDown:M,onMouseUp:M,onMouseOut:M}),o.a.createElement("button",{className:h.a.scrollRightButton,onMouseDown:M,onMouseUp:M,onMouseOut:M}))}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));class r{constructor(t){this.response=t}get statusCode(){return this.response.status}get redirected(){return this.response.redirected}get ok(){return this.response.ok}get unauthenticated(){return 401===this.statusCode}get unprocessableEntity(){return 422===this.statusCode}get authenticationURL(){return this.response.headers.get("WWW-Authenticate")}get contentType(){return(this.response.headers.get("Content-Type")||"").replace(/;.*$/,"")}get headers(){return this.response.headers}get html(){return this.contentType.match(/^(application|text)\/(html|xhtml\+xml)$/)?this.text:Promise.reject(new Error(`Expected an HTML response but got "${this.contentType}" instead`))}get json(){return this.contentType.match(/^application\/.*json$/)?this.responseJson||(this.responseJson=this.response.json()):Promise.reject(new Error(`Expected a JSON response but got "${this.contentType}" instead`))}get text(){return this.responseText||(this.responseText=this.response.text())}get isTurboStream(){return this.contentType.match(/^text\/vnd\.turbo-stream\.html/)}async renderTurboStream(){if(!this.isTurboStream)return Promise.reject(new Error(`Expected a Turbo Stream response but got "${this.contentType}" instead`));window.Turbo?await window.Turbo.renderStreamMessage(await this.text):console.warn("You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js")}}function i(t){const e=document.head.querySelector(`meta[name="${t}"]`);return e&&e.content}class o{constructor(t,e,n={}){this.method=t,this.options=n,this.originalUrl=e.toString()}async perform(){try{const t=class{static register(t){this.interceptor=t}static get(){return this.interceptor}static reset(){this.interceptor=void 0}}.get();t&&await t(this)}catch(e){console.error(e)}const t=new r(await window.fetch(this.url,this.fetchOptions));return t.unauthenticated&&t.authenticationURL?Promise.reject(window.location.href=t.authenticationURL):(t.ok&&t.isTurboStream&&await t.renderTurboStream(),t)}addHeader(t,e){const n=this.additionalHeaders;n[t]=e,this.options.headers=n}get fetchOptions(){return{method:this.method.toUpperCase(),headers:this.headers,body:this.formattedBody,signal:this.signal,credentials:"same-origin",redirect:this.redirect}}get headers(){return function(t){const e={};for(const n in t){const r=t[n];void 0!==r&&(e[n]=r)}return e}(Object.assign({"X-Requested-With":"XMLHttpRequest","X-CSRF-Token":this.csrfToken,"Content-Type":this.contentType,Accept:this.accept},this.additionalHeaders))}get csrfToken(){return function(t){const e=document.cookie?document.cookie.split("; "):[],n=`${encodeURIComponent(t)}=`,r=e.find((t=>t.startsWith(n)));if(r){const t=r.split("=").slice(1).join("=");if(t)return decodeURIComponent(t)}}(i("csrf-param"))||i("csrf-token")}get contentType(){return this.options.contentType?this.options.contentType:null==this.body||this.body instanceof window.FormData?void 0:this.body instanceof window.File?this.body.type:"application/json"}get accept(){switch(this.responseKind){case"html":return"text/html, application/xhtml+xml";case"turbo-stream":return"text/vnd.turbo-stream.html, text/html, application/xhtml+xml";case"json":return"application/json, application/vnd.api+json";default:return"*/*"}}get body(){return this.options.body}get query(){const t=(this.originalUrl.split("?")[1]||"").split("#")[0],e=new URLSearchParams(t);let n=this.options.query;var r;n instanceof window.FormData?(r=n,n=[...r].reduce(((t,[e,n])=>t.concat("string"===typeof n?[[e,n]]:[])),[])):n=n instanceof window.URLSearchParams?n.entries():Object.entries(n||{}),function(t,e){for(const[n,r]of e)r instanceof window.File||(t.has(n)?(t.delete(n),t.set(n,r)):t.append(n,r))}(e,n);const i=e.toString();return i.length>0?`?${i}`:""}get url(){return this.originalUrl.split("?")[0].split("#")[0]+this.query}get responseKind(){return this.options.responseKind||"html"}get signal(){return this.options.signal}get redirect(){return this.options.redirect||"follow"}get additionalHeaders(){return this.options.headers||{}}get formattedBody(){const t="[object String]"===Object.prototype.toString.call(this.body);return"application/json"===this.headers["Content-Type"]&&!t?JSON.stringify(this.body):this.body}}async function a(t,e){return new o("patch",t,e).perform()}},function(t,e,n){"use strict";(function(t){var n=function(t,e,n,r){var i="",o="";if(n){var a=new Date;a.setTime(a.getTime()+60*n*1e3),i="; expires="+a.toGMTString()}r&&(o="; domain="+r),document.cookie=t+"="+escape(e)+i+o+"; path=/; samesite=lax"},r=function(t){var e,n,r=t+"=",i=document.cookie.split(";");for(e=0;e<i.length;e++){for(n=i[e];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(r))return unescape(n.substring(r.length,n.length))}return null},i={urlPrefix:"",visitsUrl:"/ahoy/visits",eventsUrl:"/ahoy/events",page:null,platform:"Web",useBeacon:!0,startOnReady:!0,trackVisits:!0,cookies:!0,cookieDomain:null,headers:{},visitParams:{},withCredentials:!1,visitDuration:240,visitorDuration:1051200},o=window.ahoy||window.Ahoy||{};o.configure=function(t){for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e])},o.configure(o);var a,s,u,l,c=t||window.Zepto||window.$,f=!1,h=[],p="undefined"!==typeof JSON&&"undefined"!==typeof JSON.stringify,d=[];function m(){return i.urlPrefix+i.eventsUrl}function g(){return(i.useBeacon||i.trackNow)&&(t=i.headers,0===Object.keys(t).length)&&p&&"undefined"!==typeof window.navigator.sendBeacon&&!i.withCredentials;var t}function y(t,e,r){n(t,e,r,i.cookieDomain||i.domain)}function v(t){return r(t)}function b(t){n(t,"",-1)}function _(t){v("ahoy_debug")&&window.console.log(t)}function A(){for(var t;t=h.shift();)t();f=!0}function w(t,e){var n=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return n?n.apply(t,[e])?t:t.parentElement?w(t.parentElement,e):null:(_("Unable to match"),null)}function x(t,e,n){document.addEventListener(t,(function(t){var r=w(t.target,e);r&&n.call(r,t)}))}function E(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}function O(){i.cookies&&p&&y("ahoy_events",JSON.stringify(d),1)}function S(){var t=document.querySelector("meta[name=csrf-token]");return t&&t.content}function P(t){var e=S();e&&t.setRequestHeader("X-CSRF-Token",e)}function C(t,e,n){if(p)if(c&&c.ajax)c.ajax({type:"POST",url:t,data:JSON.stringify(e),contentType:"application/json; charset=utf-8",dataType:"json",beforeSend:P,success:n,headers:i.headers,xhrFields:{withCredentials:i.withCredentials}});else{var r=new XMLHttpRequest;for(var o in r.open("POST",t,!0),r.withCredentials=i.withCredentials,r.setRequestHeader("Content-Type","application/json"),i.headers)i.headers.hasOwnProperty(o)&&r.setRequestHeader(o,i.headers[o]);r.onload=function(){200===r.status&&n()},P(r),r.send(JSON.stringify(e))}}function T(t){var e={events:[t]};return i.cookies&&(e.visit_token=t.visit_token,e.visitor_token=t.visitor_token),delete t.visit_token,delete t.visitor_token,e}function k(t){o.ready((function(){C(m(),T(t),(function(){for(var e=0;e<d.length;e++)if(d[e].id==t.id){d.splice(e,1);break}O()}))}))}function I(t){o.ready((function(){var e,n=T(t),r=(e=document.querySelector("meta[name=csrf-param]"))&&e.content,i=S();r&&i&&(n[r]=i),n.events_json=JSON.stringify(n.events),delete n.events,window.navigator.sendBeacon(m(),function(t){var e=new FormData;for(var n in t)t.hasOwnProperty(n)&&e.append(n,t[n]);return e}(n))}))}function L(){return i.page||window.location.pathname}function j(t){return t&&t.length>0?t:null}function M(){return function(t){for(var e in t)t.hasOwnProperty(e)&&null===t[e]&&delete t[e];return t}({tag:this.tagName.toLowerCase(),id:j(this.id),class:j(this.className),page:L(),section:R(this)})}function R(t){for(;t&&t!==document;t=t.parentNode)if(t.hasAttribute("data-section"))return t.getAttribute("data-section");return null}function N(){if(f=!1,a=o.getVisitId(),s=o.getVisitorId(),u=v("ahoy_track"),!1===i.cookies||!1===i.trackVisits)_("Visit tracking disabled"),A();else if(a&&s&&!u)_("Active visit"),A();else if(a||y("ahoy_visit",a=E(),i.visitDuration),v("ahoy_visit")){_("Visit started"),s||y("ahoy_visitor",s=E(),i.visitorDuration);var t={visit_token:a,visitor_token:s,platform:i.platform,landing_page:window.location.href,screen_width:window.screen.width,screen_height:window.screen.height,js:!0};for(var e in document.referrer.length>0&&(t.referrer=document.referrer),i.visitParams)i.visitParams.hasOwnProperty(e)&&(t[e]=i.visitParams[e]);_(t),C(i.urlPrefix+i.visitsUrl,t,(function(){b("ahoy_track"),A()}))}else _("Cookies disabled"),A()}o.ready=function(t){f?t():h.push(t)},o.getVisitId=o.getVisitToken=function(){return v("ahoy_visit")},o.getVisitorId=o.getVisitorToken=function(){return v("ahoy_visitor")},o.reset=function(){return b("ahoy_visit"),b("ahoy_visitor"),b("ahoy_events"),b("ahoy_track"),!0},o.debug=function(t){return!1===t?b("ahoy_debug"):y("ahoy_debug","t",525600),!0},o.track=function(t,e){var n={name:t,properties:e||{},time:(new Date).getTime()/1e3,id:E(),js:!0};return o.ready((function(){i.cookies&&!o.getVisitId()&&N(),o.ready((function(){_(n),n.visit_token=o.getVisitId(),n.visitor_token=o.getVisitorId(),g()?I(n):(d.push(n),O(),setTimeout((function(){k(n)}),1e3))}))})),!0},o.trackView=function(t){var e={url:window.location.href,title:document.title,page:L()};if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);o.track("$view",e)},o.trackClicks=function(t){if(void 0===t)throw new Error("Missing selector");x("click",t,(function(t){var e=M.call(this,t);e.text="input"==e.tag?this.value:(this.textContent||this.innerText||this.innerHTML).replace(/[\s\r\n]+/g," ").trim(),e.href=this.href,o.track("$click",e)}))},o.trackSubmits=function(t){if(void 0===t)throw new Error("Missing selector");x("submit",t,(function(t){var e=M.call(this,t);o.track("$submit",e)}))},o.trackChanges=function(t){if(_("trackChanges is deprecated and will be removed in 0.5.0"),void 0===t)throw new Error("Missing selector");x("change",t,(function(t){var e=M.call(this,t);o.track("$change",e)}))};try{d=JSON.parse(v("ahoy_events")||"[]")}catch(F){}for(var D=0;D<d.length;D++)k(d[D]);o.start=function(){N(),o.start=function(){}},l=function(){i.startOnReady&&o.start()},"interactive"===document.readyState||"complete"===document.readyState?setTimeout(l,0):document.addEventListener("DOMContentLoaded",l),e.a=o}).call(this,n(155))},function(t,e,n){"use strict";e.__esModule=!0,e.FormUp=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.FormUp=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"FormUp"},t),i.default.createElement("polyline",{fill:"none",stroke:"#000",strokeWidth:"2",points:"18 9 12 15 6 9",transform:"matrix(1 0 0 -1 0 24)"}))}},function(t,e,n){!function(t){"use strict";function e(){}function n(t){this.message=t||""}function r(t){this.message=t||""}function i(t){this.message=t||""}function o(){}function a(t){return null===t?Mt:t.color}function s(t){return null===t?null:t.parent}function u(t,e){null!==t&&(t.color=e)}function l(t){return null===t?null:t.left}function c(t){return null===t?null:t.right}function f(){this.root_=null,this.size_=0}function h(){}function p(){this.array_=[],arguments[0]instanceof _t&&this.addAll(arguments[0])}function d(){}function m(t){this.message=t||""}function g(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);r<i;)e[r]=t,++r;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var y=function(){};y.prototype.interfaces_=function(){return[]},y.prototype.getClass=function(){return y},y.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var v=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),b=function(){},_={MAX_VALUE:{configurable:!0}};b.isNaN=function(t){return Number.isNaN(t)},b.doubleToLongBits=function(t){return t},b.longBitsToDouble=function(t){return t},b.isInfinite=function(t){return!Number.isFinite(t)},_.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(b,_);var A=function(){},w=function(){},x=function(){},E=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},O={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};E.prototype.setOrdinate=function(t,e){switch(t){case E.X:this.x=e;break;case E.Y:this.y=e;break;case E.Z:this.z=e;break;default:throw new v("Invalid ordinate index: "+t)}},E.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!y.equalsWithTolerance(this.x,e.x,n)&&!!y.equalsWithTolerance(this.y,e.y,n)}},E.prototype.getOrdinate=function(t){switch(t){case E.X:return this.x;case E.Y:return this.y;case E.Z:return this.z}throw new v("Invalid ordinate index: "+t)},E.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||b.isNaN(this.z))&&b.isNaN(t.z)},E.prototype.equals=function(t){return t instanceof E&&this.equals2D(t)},E.prototype.equalInZ=function(t,e){return y.equalsWithTolerance(this.z,t.z,e)},E.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},E.prototype.clone=function(){},E.prototype.copy=function(){return new E(this)},E.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},E.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},E.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},E.prototype.hashCode=function(){var t=17;return 37*(t=37*t+E.hashCode(this.x))+E.hashCode(this.y)},E.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},E.prototype.interfaces_=function(){return[A,w,e]},E.prototype.getClass=function(){return E},E.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=b.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},O.DimensionalComparator.get=function(){return S},O.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},O.NULL_ORDINATE.get=function(){return b.NaN},O.X.get=function(){return 0},O.Y.get=function(){return 1},O.Z.get=function(){return 2},Object.defineProperties(E,O);var S=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new v("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};S.prototype.compare=function(t,e){var n=t,r=e,i=S.compare(n.x,r.x);if(0!==i)return i;var o=S.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:S.compare(n.z,r.z)},S.prototype.interfaces_=function(){return[x]},S.prototype.getClass=function(){return S},S.compare=function(t,e){return t<e?-1:t>e?1:b.isNaN(t)?b.isNaN(e)?0:-1:b.isNaN(e)?1:0};var P=function(){};P.prototype.create=function(){},P.prototype.interfaces_=function(){return[]},P.prototype.getClass=function(){return P};var C=function(){},T={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};C.prototype.interfaces_=function(){return[]},C.prototype.getClass=function(){return C},C.toLocationSymbol=function(t){switch(t){case C.EXTERIOR:return"e";case C.BOUNDARY:return"b";case C.INTERIOR:return"i";case C.NONE:return"-"}throw new v("Unknown location value: "+t)},T.INTERIOR.get=function(){return 0},T.BOUNDARY.get=function(){return 1},T.EXTERIOR.get=function(){return 2},T.NONE.get=function(){return-1},Object.defineProperties(C,T);var k=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},I=function(){},L={LOG_10:{configurable:!0}};I.prototype.interfaces_=function(){return[]},I.prototype.getClass=function(){return I},I.log10=function(t){var e=Math.log(t);return b.isInfinite(e)||b.isNaN(e)?e:e/I.LOG_10},I.min=function(t,e,n,r){var i=t;return e<i&&(i=e),n<i&&(i=n),r<i&&(i=r),i},I.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return r<i?i:r>o?o:r}},I.wrap=function(t,e){return t<0?e- -t%e:t%e},I.max=function(){if(3===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[0];return t>n&&(n=t),e>n&&(n=e),n}if(4===arguments.length){var r=arguments[1],i=arguments[2],o=arguments[3],a=arguments[0];return r>a&&(a=r),i>a&&(a=i),o>a&&(a=o),a}},I.average=function(t,e){return(t+e)/2},L.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(I,L);var j=function(t){this.str=t};j.prototype.append=function(t){this.str+=t},j.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},j.prototype.toString=function(t){return this.str};var M=function(t){this.value=t};M.prototype.intValue=function(){return this.value},M.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},M.isNaN=function(t){return Number.isNaN(t)};var R=function(){};R.isWhitespace=function(t){return t<=32&&t>=0||127===t},R.toUpperCase=function(t){return t.toUpperCase()};var N=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length)if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else"string"==typeof arguments[0]&&t.call(this,t.parse(arguments[0]));else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r,i)}},D={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};N.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},N.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),r=N.magnitude(n._hi),i=N.TEN.pow(r);(n=n.divide(i)).gt(N.TEN)?(n=n.divide(N.TEN),r+=1):n.lt(N.ONE)&&(n=n.multiply(N.TEN),r-=1);for(var o=r+1,a=new j,s=N.MAX_PRINT_DIGITS-1,u=0;u<=s;u++){t&&u===o&&a.append(".");var l=Math.trunc(n._hi);if(l<0)break;var c=!1,f=0;l>9?(c=!0,f="9"):f="0"+l,a.append(f),n=n.subtract(N.valueOf(l)).multiply(N.TEN),c&&n.selfAdd(N.TEN);var h=!0,p=N.magnitude(n._hi);if(p<0&&Math.abs(p)>=s-u&&(h=!1),!h)break}return e[0]=r,a.toString()},N.prototype.sqr=function(){return this.multiply(this)},N.prototype.doubleValue=function(){return this._hi+this._lo},N.prototype.subtract=function(){if(arguments[0]instanceof N){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},N.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},N.prototype.isZero=function(){return 0===this._hi&&0===this._lo},N.prototype.selfSubtract=function(){if(arguments[0]instanceof N){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},N.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},N.prototype.min=function(t){return this.le(t)?this:t},N.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof N){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null,c=null,f=null;return u=this._hi/n,f=(i=(l=N.SPLIT*u)-(i=l-u))*(a=(f=N.SPLIT*n)-(a=f-n))-(c=u*n)+i*(s=n-a)+(o=u-i)*a+o*s,f=u+(l=(this._hi-c-f+this._lo-u*r)/n),this._hi=f,this._lo=u-f+l,this}},N.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},N.prototype.divide=function(){if(arguments[0]instanceof N){var t=arguments[0],e=null,n=null,r=null,i=null,o=null,a=null,s=null,u=null;return n=(o=this._hi/t._hi)-(e=(a=N.SPLIT*o)-(e=a-o)),u=e*(r=(u=N.SPLIT*t._hi)-(r=u-t._hi))-(s=o*t._hi)+e*(i=t._hi-r)+n*r+n*i,a=(this._hi-s-u+this._lo-o*t._lo)/t._hi,new N(u=o+a,o-u+a)}if("number"==typeof arguments[0]){var l=arguments[0];return b.isNaN(l)?N.createNaN():N.copy(this).selfDivide(l,0)}},N.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},N.prototype.pow=function(t){if(0===t)return N.valueOf(1);var e=new N(this),n=N.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},N.prototype.ceil=function(){if(this.isNaN())return N.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new N(t,e)},N.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},N.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},N.prototype.setValue=function(){if(arguments[0]instanceof N){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},N.prototype.max=function(t){return this.ge(t)?this:t},N.prototype.sqrt=function(){if(this.isZero())return N.valueOf(0);if(this.isNegative())return N.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=N.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},N.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof N){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,r=null,i=null,o=null,a=null,s=null;return o=(i=this._hi+e)-(a=i-this._hi),r=(s=(o=e-a+(this._hi-o))+this._lo)+(i-(n=i+s)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,f=null,h=null,p=null,d=null,m=null,g=null;p=this._hi+u,f=this._lo+l,d=p-(m=p-this._hi),h=f-(g=f-this._lo);var y=(c=p+(m=(d=u-m+(this._hi-d))+f))+(m=(h=l-g+(this._lo-h))+(m+(p-c))),v=m+(c-y);return this._hi=y,this._lo=v,this}},N.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof N){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null;i=(u=N.SPLIT*this._hi)-this._hi,l=N.SPLIT*n,i=u-i,o=this._hi-i,a=l-n;var c=(u=this._hi*n)+(l=i*(a=l-a)-u+i*(s=n-a)+o*a+o*s+(this._hi*r+this._lo*n)),f=l+(i=u-c);return this._hi=c,this._lo=f,this}},N.prototype.selfSqr=function(){return this.selfMultiply(this)},N.prototype.floor=function(){if(this.isNaN())return N.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new N(t,e)},N.prototype.negate=function(){return this.isNaN()?this:new N(-this._hi,-this._lo)},N.prototype.clone=function(){},N.prototype.multiply=function(){if(arguments[0]instanceof N){var t=arguments[0];return t.isNaN()?N.createNaN():N.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return b.isNaN(e)?N.createNaN():N.copy(this).selfMultiply(e,0)}},N.prototype.isNaN=function(){return b.isNaN(this._hi)},N.prototype.intValue=function(){return Math.trunc(this._hi)},N.prototype.toString=function(){var t=N.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},N.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+N.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+N.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},N.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,i=null,o=null,a=null,s=null;e=(i=1/this._hi)-(t=(o=N.SPLIT*i)-(t=o-i)),n=(s=N.SPLIT*this._hi)-this._hi;var u=i+(o=(1-(a=i*this._hi)-(s=t*(n=s-n)-a+t*(r=this._hi-n)+e*n+e*r)-i*this._lo)/this._hi);return new N(u,i-u+o)},N.prototype.toSciNotation=function(){if(this.isZero())return N.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=N.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},N.prototype.abs=function(){return this.isNaN()?N.NaN:this.isNegative()?this.negate():new N(this)},N.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},N.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},N.prototype.add=function(){if(arguments[0]instanceof N){var t=arguments[0];return N.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return N.copy(this).selfAdd(e)}},N.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof N){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._hi=n,this._lo=r}},N.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},N.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},N.prototype.trunc=function(){return this.isNaN()?N.NaN:this.isPositive()?this.floor():this.ceil()},N.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},N.prototype.interfaces_=function(){return[e,A,w]},N.prototype.getClass=function(){return N},N.sqr=function(t){return N.valueOf(t).selfMultiply(t)},N.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return N.parse(t)}if("number"==typeof arguments[0])return new N(arguments[0])},N.sqrt=function(t){return N.valueOf(t).sqrt()},N.parse=function(t){for(var e=0,n=t.length;R.isWhitespace(t.charAt(e));)e++;var r=!1;if(e<n){var i=t.charAt(e);"-"!==i&&"+"!==i||(e++,"-"===i&&(r=!0))}for(var o=new N,a=0,s=0,u=0;!(e>=n);){var l=t.charAt(e);if(e++,R.isDigit(l)){var c=l-"0";o.selfMultiply(N.TEN),o.selfAdd(c),a++}else{if("."!==l){if("e"===l||"E"===l){var f=t.substring(e);try{u=M.parseInt(f)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+f+" in string "+t):e}break}throw new Error("Unexpected character '"+l+"' at position "+e+" in string "+t)}s=a}}var h=o,p=a-s-u;if(0===p)h=o;else if(p>0){var d=N.TEN.pow(p);h=o.divide(d)}else if(p<0){var m=N.TEN.pow(-p);h=o.multiply(m)}return r?h.negate():h},N.createNaN=function(){return new N(b.NaN,b.NaN)},N.copy=function(t){return new N(t)},N.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r},N.stringOfChar=function(t,e){for(var n=new j,r=0;r<e;r++)n.append(t);return n.toString()},D.PI.get=function(){return new N(3.141592653589793,12246467991473532e-32)},D.TWO_PI.get=function(){return new N(6.283185307179586,24492935982947064e-32)},D.PI_2.get=function(){return new N(1.5707963267948966,6123233995736766e-32)},D.E.get=function(){return new N(2.718281828459045,14456468917292502e-32)},D.NaN.get=function(){return new N(b.NaN,b.NaN)},D.EPS.get=function(){return 123259516440783e-46},D.SPLIT.get=function(){return 134217729},D.MAX_PRINT_DIGITS.get=function(){return 32},D.TEN.get=function(){return N.valueOf(10)},D.ONE.get=function(){return N.valueOf(1)},D.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},D.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(N,D);var F=function(){},B={DP_SAFE_EPSILON:{configurable:!0}};F.prototype.interfaces_=function(){return[]},F.prototype.getClass=function(){return F},F.orientationIndex=function(t,e,n){var r=F.orientationIndexFilter(t,e,n);if(r<=1)return r;var i=N.valueOf(e.x).selfAdd(-t.x),o=N.valueOf(e.y).selfAdd(-t.y),a=N.valueOf(n.x).selfAdd(-e.x),s=N.valueOf(n.y).selfAdd(-e.y);return i.selfMultiply(s).selfSubtract(o.selfMultiply(a)).signum()},F.signOfDet2x2=function(t,e,n,r){return t.multiply(r).selfSubtract(e.multiply(n)).signum()},F.intersection=function(t,e,n,r){var i=N.valueOf(r.y).selfSubtract(n.y).selfMultiply(N.valueOf(e.x).selfSubtract(t.x)),o=N.valueOf(r.x).selfSubtract(n.x).selfMultiply(N.valueOf(e.y).selfSubtract(t.y)),a=i.subtract(o),s=N.valueOf(r.x).selfSubtract(n.x).selfMultiply(N.valueOf(t.y).selfSubtract(n.y)),u=N.valueOf(r.y).selfSubtract(n.y).selfMultiply(N.valueOf(t.x).selfSubtract(n.x)),l=s.subtract(u).selfDivide(a).doubleValue(),c=N.valueOf(t.x).selfAdd(N.valueOf(e.x).selfSubtract(t.x).selfMultiply(l)).doubleValue(),f=N.valueOf(e.x).selfSubtract(t.x).selfMultiply(N.valueOf(t.y).selfSubtract(n.y)),h=N.valueOf(e.y).selfSubtract(t.y).selfMultiply(N.valueOf(t.x).selfSubtract(n.x)),p=f.subtract(h).selfDivide(a).doubleValue(),d=N.valueOf(n.y).selfAdd(N.valueOf(r.y).selfSubtract(n.y).selfMultiply(p)).doubleValue();return new E(c,d)},F.orientationIndexFilter=function(t,e,n){var r=null,i=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),a=i-o;if(i>0){if(o<=0)return F.signum(a);r=i+o}else{if(!(i<0))return F.signum(a);if(o>=0)return F.signum(a);r=-i-o}var s=F.DP_SAFE_EPSILON*r;return a>=s||-a>=s?F.signum(a):2},F.signum=function(t){return t>0?1:t<0?-1:0},B.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(F,B);var z=function(){},U={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};U.X.get=function(){return 0},U.Y.get=function(){return 1},U.Z.get=function(){return 2},U.M.get=function(){return 3},z.prototype.setOrdinate=function(t,e,n){},z.prototype.size=function(){},z.prototype.getOrdinate=function(t,e){},z.prototype.getCoordinate=function(){},z.prototype.getCoordinateCopy=function(t){},z.prototype.getDimension=function(){},z.prototype.getX=function(t){},z.prototype.clone=function(){},z.prototype.expandEnvelope=function(t){},z.prototype.copy=function(){},z.prototype.getY=function(t){},z.prototype.toCoordinateArray=function(){},z.prototype.interfaces_=function(){return[w]},z.prototype.getClass=function(){return z},Object.defineProperties(z,U);var G=function(){},V=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(G),q=function(){};q.arraycopy=function(t,e,n,r,i){for(var o=0,a=e;a<e+i;a++)n[r+o]=t[a],o++},q.getProperty=function(t){return{"line.separator":"\n"}[t]};var H=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof E&&arguments[1]instanceof E){var a=arguments[0],s=arguments[1];this.x=a.y-s.y,this.y=s.x-a.x,this.w=a.x*s.y-s.x*a.y}}else if(3===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(4===arguments.length){var f=arguments[0],h=arguments[1],p=arguments[2],d=arguments[3],m=f.y-h.y,g=h.x-f.x,y=f.x*h.y-h.x*f.y,v=p.y-d.y,b=d.x-p.x,_=p.x*d.y-d.x*p.y;this.x=g*_-b*y,this.y=v*y-m*_,this.w=m*b-v*g}};H.prototype.getY=function(){var t=this.y/this.w;if(b.isNaN(t)||b.isInfinite(t))throw new V;return t},H.prototype.getX=function(){var t=this.x/this.w;if(b.isNaN(t)||b.isInfinite(t))throw new V;return t},H.prototype.getCoordinate=function(){var t=new E;return t.x=this.getX(),t.y=this.getY(),t},H.prototype.interfaces_=function(){return[]},H.prototype.getClass=function(){return H},H.intersection=function(t,e,n,r){var i=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,s=n.y-r.y,u=r.x-n.x,l=n.x*r.y-r.x*n.y,c=i*u-s*o,f=(o*l-u*a)/c,h=(s*a-i*l)/c;if(b.isNaN(f)||b.isInfinite(f)||b.isNaN(h)||b.isInfinite(h))throw new V;return new E(f,h)};var W=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof E){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=arguments[3];this.init(o,a,s,u)}},X={serialVersionUID:{configurable:!0}};W.prototype.getArea=function(){return this.getWidth()*this.getHeight()},W.prototype.equals=function(t){if(!(t instanceof W))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},W.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new W;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx<t._maxx?this._maxx:t._maxx,i=this._maxy<t._maxy?this._maxy:t._maxy;return new W(e,r,n,i)},W.prototype.isNull=function(){return this._maxx<this._minx},W.prototype.getMaxX=function(){return this._maxx},W.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof W){var e=arguments[0];return!this.isNull()&&!e.isNull()&&e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},W.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof W){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof E){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||r>this._maxy||r<this._miny)}},W.prototype.getMinY=function(){return this._miny},W.prototype.getMinX=function(){return this._minx},W.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof W){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),r<this._miny&&(this._miny=r),r>this._maxy&&(this._maxy=r))}},W.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},W.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},W.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},W.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},W.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},W.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},W.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},W.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},W.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},W.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof W){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof E){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},W.prototype.centre=function(){return this.isNull()?null:new E((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},W.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof W){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];i<o?(this._minx=i,this._maxx=o):(this._minx=o,this._maxx=i),a<s?(this._miny=a,this._maxy=s):(this._miny=s,this._maxy=a)}},W.prototype.getMaxY=function(){return this._maxy},W.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},W.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+E.hashCode(this._minx))+E.hashCode(this._maxx))+E.hashCode(this._miny))+E.hashCode(this._maxy)},W.prototype.interfaces_=function(){return[A,e]},W.prototype.getClass=function(){return W},W.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),u=Math.max(o.x,a.x),l=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(l>u)&&!(c<s)&&(s=Math.min(o.y,a.y),u=Math.max(o.y,a.y),l=Math.min(r.y,i.y),c=Math.max(r.y,i.y),!(l>u)&&!(c<s))}},X.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(W,X);var Y={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},Z=function(t){this.geometryFactory=t||new ye};Z.prototype.read=function(t){var e,n,r;t=t.replace(/[\n\r]/g," ");var i=Y.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((i=Y.emptyTypeStr.exec(t))[2]=void 0),i&&(n=i[1].toLowerCase(),r=i[2],$[n]&&(e=$[n].apply(this,[r]))),void 0===e)throw new Error("Could not parse WKT "+t);return e},Z.prototype.write=function(t){return this.extractGeometry(t)},Z.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!K[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+K[e].apply(this,[t])+")"};var K={coordinate:function(t){return t.x+" "+t.y},point:function(t){return K.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+K.point.apply(this,[t._geometries[n]])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(K.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},linearring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(K.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+K.linestring.apply(this,[t._geometries[n]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+K.linestring.apply(this,[t._shell])+")");for(var n=0,r=t._holes.length;n<r;++n)e.push("("+K.linestring.apply(this,[t._holes[n]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+K.polygon.apply(this,[t._geometries[n]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}},$={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(Y.spaces);return this.geometryFactory.createPoint(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(Y.trimParens,"$1"),r.push($.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(r)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(Y.spaces),r.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(Y.spaces),r.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(Y.parenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(Y.trimParens,"$1"),r.push($.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(r)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,r,i,o=t.trim().split(Y.parenComma),a=[],s=0,u=o.length;s<u;++s)e=o[s].replace(Y.trimParens,"$1"),n=$.linestring.apply(this,[e]),r=this.geometryFactory.createLinearRing(n._points),0===s?i=r:a.push(r);return this.geometryFactory.createPolygon(i,a)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(Y.doubleParenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(Y.trimParens,"$1"),r.push($.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(r)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],r=0,i=e.length;r<i;++r)n.push(this.read(e[r]));return this.geometryFactory.createGeometryCollection(n)}},J=function(t){this.parser=new Z(t)};J.prototype.write=function(t){return this.parser.write(t)},J.toLineString=function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Q=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Q),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt("Should never reach here"+(null!==t?": "+t:""))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(e=arguments[1],!(t=arguments[0])))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],n=arguments[2],!(e=arguments[1]).equals(t)))throw new tt("Expected "+t+" but encountered "+e+(null!==n?": "+n:""))};var nt=function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new E,this._intPt[1]=new E,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},rt={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};nt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},nt.prototype.getTopologySummary=function(){var t=new j;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},nt.prototype.computeIntersection=function(t,e,n,r){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=r,this._result=this.computeIntersect(t,e,n,r)},nt.prototype.getIntersectionNum=function(){return this._result},nt.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},nt.prototype.getIntersection=function(t){return this._intPt[t]},nt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},nt.prototype.hasIntersection=function(){return this._result!==nt.NO_INTERSECTION},nt.prototype.getEdgeDistance=function(t,e){return nt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},nt.prototype.isCollinear=function(){return this._result===nt.COLLINEAR_INTERSECTION},nt.prototype.toString=function(){return J.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+J.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},nt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},nt.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},nt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt},nt.computeEdgeDistance=function(t,e,n){var r=Math.abs(n.x-e.x),i=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=r>i?r:i;else{var a=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);0!==(o=r>i?a:s)||t.equals(e)||(o=Math.max(a,s))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},rt.DONT_INTERSECT.get=function(){return 0},rt.DO_INTERSECT.get=function(){return 1},rt.COLLINEAR.get=function(){return 2},rt.NO_INTERSECTION.get=function(){return 0},rt.POINT_INTERSECTION.get=function(){return 1},rt.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,rt);var it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new W(this._inputLines[0][0],this._inputLines[0][1]),n=new W(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,W.intersects(n,r,e)&&0===st.orientationIndex(n,r,e)&&0===st.orientationIndex(r,n,e))return this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,n,r,i){var o=null;try{o=H.intersection(t,n,r,i)}catch(a){if(!(a instanceof V))throw a;o=e.nearestEndpoint(t,n,r,i)}return o},e.prototype.intersection=function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new E(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)<o&&(i=e,o=Math.abs(e)),Math.abs(n)<o&&(i=n,o=Math.abs(n)),Math.abs(r)<o&&(i=r),i},e.prototype.checkDD=function(t,e,n,r,i){var o=F.intersection(t,e,n,r),a=this.isInSegmentEnvelopes(o);q.out.println("DD in env = "+a+"  --------------------- "+o),i.distance(o)>1e-4&&q.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,r){var i=new E(t),o=new E(e),a=new E(n),s=new E(r),u=new E;this.normalizeToEnvCentre(i,o,a,s,u);var l=this.safeHCoordinateIntersection(i,o,a,s);return l.x+=u.x,l.y+=u.y,l},e.prototype.computeCollinearIntersection=function(e,n,r,i){var o=W.intersects(e,n,r),a=W.intersects(e,n,i),s=W.intersects(r,i,e),u=W.intersects(r,i,n);return o&&a?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||a||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||a||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,r,i){var o=t.x<e.x?t.x:e.x,a=t.y<e.y?t.y:e.y,s=t.x>e.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.x<r.x?n.x:r.x,c=n.y<r.y?n.y:r.y,f=n.x>r.x?n.x:r.x,h=n.y>r.y?n.y:r.y,p=((o>l?o:l)+(s<f?s:f))/2,d=((a>c?a:c)+(u<h?u:h))/2;i.x=p,i.y=d,t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.computeIntersect=function(e,n,r,i){if(this._isProper=!1,!W.intersects(e,n,r,i))return t.NO_INTERSECTION;var o=st.orientationIndex(e,n,r),a=st.orientationIndex(e,n,i);if(o>0&&a>0||o<0&&a<0)return t.NO_INTERSECTION;var s=st.orientationIndex(r,i,e),u=st.orientationIndex(r,i,n);return s>0&&u>0||s<0&&u<0?t.NO_INTERSECTION:0===o&&0===a&&0===s&&0===u?this.computeCollinearIntersection(e,n,r,i):(0===o||0===a||0===s||0===u?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new E(r):0===a?this._intPt[0]=new E(i):0===s?this._intPt[0]=new E(e):0===u&&(this._intPt[0]=new E(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,r){var i=t,o=st.distancePointLine(t,n,r),a=st.distancePointLine(e,n,r);return a<o&&(o=a,i=e),(a=st.distancePointLine(n,t,e))<o&&(o=a,i=n),(a=st.distancePointLine(r,t,e))<o&&(o=a,i=r),i},e}(nt),ot=function(){};ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.orientationIndex=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=n.x-e.x,a=n.y-e.y;return ot.signOfDet2x2(r,i,o,a)},ot.signOfDet2x2=function(t,e,n,r){var i=null,o=null,a=null;if(i=1,0===t||0===r)return 0===e||0===n?0:e>0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if((r-=(a=Math.floor(n/t))*e)<0)return-i;if(r>e)return i;if(t>(n-=a*t)+n){if(e<r+r)return i}else{if(e>r+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if((e-=(a=Math.floor(t/n))*r)<0)return i;if(e>r)return-i;if(n>(t-=a*n)+t){if(r<e+e)return-i}else{if(r>e+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};var at=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};at.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,r=e.x;return n>r&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,s=e.y-this._p.y,u=ot.signOfDet2x2(i,o,a,s);if(0===u)return this._isPointOnSegment=!0,null;s<o&&(u=-u),u>0&&this._crossingCount++}},at.prototype.isPointInPolygon=function(){return this.getLocation()!==C.EXTERIOR},at.prototype.getLocation=function(){return this._isPointOnSegment?C.BOUNDARY:this._crossingCount%2==1?C.INTERIOR:C.EXTERIOR},at.prototype.isOnSegment=function(){return this._isPointOnSegment},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.locatePointInRing=function(){if(arguments[0]instanceof E&&k(arguments[1],z)){for(var t=arguments[1],e=new at(arguments[0]),n=new E,r=new E,i=1;i<t.size();i++)if(t.getCoordinate(i,n),t.getCoordinate(i-1,r),e.countSegment(n,r),e.isOnSegment())return e.getLocation();return e.getLocation()}if(arguments[0]instanceof E&&arguments[1]instanceof Array){for(var o=arguments[1],a=new at(arguments[0]),s=1;s<o.length;s++){var u=o[s],l=o[s-1];if(a.countSegment(u,l),a.isOnSegment())return a.getLocation()}return a.getLocation()}};var st=function(){},ut={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.orientationIndex=function(t,e,n){return F.orientationIndex(t,e,n)},st.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,r=1;r<t.length-1;r++){var i=t[r].x-n,o=t[r+1].y;e+=i*(t[r-1].y-o)}return e/2}if(k(arguments[0],z)){var a=arguments[0],s=a.size();if(s<3)return 0;var u=new E,l=new E,c=new E;a.getCoordinate(0,l),a.getCoordinate(1,c);var f=l.x;c.x-=f;for(var h=0,p=1;p<s-1;p++)u.y=l.y,l.x=c.x,l.y=c.y,a.getCoordinate(p+1,c),c.x-=f,h+=l.x*(u.y-c.y);return h/2}},st.distanceLineLine=function(t,e,n,r){if(t.equals(e))return st.distancePointLine(t,n,r);if(n.equals(r))return st.distancePointLine(r,t,e);var i=!1;if(W.intersects(t,e,n,r)){var o=(e.x-t.x)*(r.y-n.y)-(e.y-t.y)*(r.x-n.x);if(0===o)i=!0;else{var a=(t.y-n.y)*(r.x-n.x)-(t.x-n.x)*(r.y-n.y),s=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,u=a/o;(u<0||u>1||s<0||s>1)&&(i=!0)}}else i=!0;return i?I.min(st.distancePointLine(t,n,r),st.distancePointLine(e,n,r),st.distancePointLine(n,t,e),st.distancePointLine(r,t,e)):0},st.isPointInRing=function(t,e){return st.locatePointInRing(t,e)!==C.EXTERIOR},st.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new E;t.getCoordinate(0,r);for(var i=r.x,o=r.y,a=1;a<e;a++){t.getCoordinate(a,r);var s=r.x,u=r.y,l=s-i,c=u-o;n+=Math.sqrt(l*l+c*c),i=s,o=u}return n},st.isCCW=function(t){var e=t.length-1;if(e<3)throw new v("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],r=0,i=1;i<=e;i++){var o=t[i];o.y>n.y&&(n=o,r=i)}var a=r;do{(a-=1)<0&&(a=e)}while(t[a].equals2D(n)&&a!==r);var s=r;do{s=(s+1)%e}while(t[s].equals2D(n)&&s!==r);var u=t[a],l=t[s];if(u.equals2D(n)||l.equals2D(n)||u.equals2D(l))return!1;var c=st.computeOrientation(u,n,l);return 0===c?u.x>l.x:c>0},st.locatePointInRing=function(t,e){return at.locatePointInRing(t,e)},st.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)},st.computeOrientation=function(t,e,n){return st.orientationIndex(t,e,n)},st.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new v("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r<e.length-1;r++){var i=st.distancePointLine(t,e[r],e[r+1]);i<n&&(n=i)}return n}if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];if(a.x===s.x&&a.y===s.y)return o.distance(a);var u=(s.x-a.x)*(s.x-a.x)+(s.y-a.y)*(s.y-a.y),l=((o.x-a.x)*(s.x-a.x)+(o.y-a.y)*(s.y-a.y))/u;if(l<=0)return o.distance(a);if(l>=1)return o.distance(s);var c=((a.y-o.y)*(s.x-a.x)-(a.x-o.x)*(s.y-a.y))/u;return Math.abs(c)*Math.sqrt(u)}},st.isOnLine=function(t,e){for(var n=new it,r=1;r<e.length;r++){var i=e[r-1],o=e[r];if(n.computeIntersection(t,i,o),n.hasIntersection())return!0}return!1},ut.CLOCKWISE.get=function(){return-1},ut.RIGHT.get=function(){return st.CLOCKWISE},ut.COUNTERCLOCKWISE.get=function(){return 1},ut.LEFT.get=function(){return st.COUNTERCLOCKWISE},ut.COLLINEAR.get=function(){return 0},ut.STRAIGHT.get=function(){return st.COLLINEAR},Object.defineProperties(st,ut);var lt=function(){};lt.prototype.filter=function(t){},lt.prototype.interfaces_=function(){return[]},lt.prototype.getClass=function(){return lt};var ct=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ft={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ct.prototype.isGeometryCollection=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION},ct.prototype.getFactory=function(){return this._factory},ct.prototype.getGeometryN=function(t){return this},ct.prototype.getArea=function(){return 0},ct.prototype.isRectangle=function(){return!1},ct.prototype.equals=function(){if(arguments[0]instanceof ct){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ct))return!1;var n=e;return this.equalsExact(n)}},ct.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ct.prototype.geometryChanged=function(){this.apply(ct.geometryChangedFilter)},ct.prototype.geometryChangedAction=function(){this._envelope=null},ct.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ct.prototype.getLength=function(){return 0},ct.prototype.getNumGeometries=function(){return 1},ct.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,r)}},ct.prototype.getUserData=function(){return this._userData},ct.prototype.getSRID=function(){return this._SRID},ct.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ct.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION)throw new v("This method does not support GeometryCollection arguments")},ct.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},ct.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ct.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ct.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new W(this._envelope)},ct.prototype.setSRID=function(t){this._SRID=t},ct.prototype.setUserData=function(t){this._userData=t},ct.prototype.compare=function(t,e){for(var n=t.iterator(),r=e.iterator();n.hasNext()&&r.hasNext();){var i=n.next(),o=r.next(),a=i.compareTo(o);if(0!==a)return a}return n.hasNext()?1:r.hasNext()?-1:0},ct.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ct.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ct.SORTINDEX_MULTIPOINT||this.getSortIndex()===ct.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ct.SORTINDEX_MULTIPOLYGON},ct.prototype.interfaces_=function(){return[w,A,e]},ct.prototype.getClass=function(){return ct},ct.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ct.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},ft.serialVersionUID.get=function(){return 0x799ea46522854c00},ft.SORTINDEX_POINT.get=function(){return 0},ft.SORTINDEX_MULTIPOINT.get=function(){return 1},ft.SORTINDEX_LINESTRING.get=function(){return 2},ft.SORTINDEX_LINEARRING.get=function(){return 3},ft.SORTINDEX_MULTILINESTRING.get=function(){return 4},ft.SORTINDEX_POLYGON.get=function(){return 5},ft.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ft.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ft.geometryChangedFilter.get=function(){return ht},Object.defineProperties(ct,ft);var ht=function(){};ht.interfaces_=function(){return[lt]},ht.filter=function(t){t.geometryChangedAction()};var pt=function(){};pt.prototype.filter=function(t){},pt.prototype.interfaces_=function(){return[]},pt.prototype.getClass=function(){return pt};var dt=function(){},mt={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};dt.prototype.isInBoundary=function(t){},dt.prototype.interfaces_=function(){return[]},dt.prototype.getClass=function(){return dt},mt.Mod2BoundaryNodeRule.get=function(){return gt},mt.EndPointBoundaryNodeRule.get=function(){return yt},mt.MultiValentEndPointBoundaryNodeRule.get=function(){return vt},mt.MonoValentEndPointBoundaryNodeRule.get=function(){return bt},mt.MOD2_BOUNDARY_RULE.get=function(){return new gt},mt.ENDPOINT_BOUNDARY_RULE.get=function(){return new yt},mt.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new vt},mt.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new bt},mt.OGC_SFS_BOUNDARY_RULE.get=function(){return dt.MOD2_BOUNDARY_RULE},Object.defineProperties(dt,mt);var gt=function(){};gt.prototype.isInBoundary=function(t){return t%2==1},gt.prototype.interfaces_=function(){return[dt]},gt.prototype.getClass=function(){return gt};var yt=function(){};yt.prototype.isInBoundary=function(t){return t>0},yt.prototype.interfaces_=function(){return[dt]},yt.prototype.getClass=function(){return yt};var vt=function(){};vt.prototype.isInBoundary=function(t){return t>1},vt.prototype.interfaces_=function(){return[dt]},vt.prototype.getClass=function(){return vt};var bt=function(){};bt.prototype.isInBoundary=function(t){return 1===t},bt.prototype.interfaces_=function(){return[dt]},bt.prototype.getClass=function(){return bt};var _t=function(){};_t.prototype.add=function(){},_t.prototype.addAll=function(){},_t.prototype.isEmpty=function(){},_t.prototype.iterator=function(){},_t.prototype.size=function(){},_t.prototype.toArray=function(){},_t.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var At=function(){};At.prototype.hasNext=function(){},At.prototype.next=function(){},At.prototype.remove=function(){};var wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(_t);(r.prototype=new Error).name="NoSuchElementException";var xt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof _t&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,_t]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Et(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,r=this.array_.length;n<r;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(wt),Et=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new r;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(At),Ot=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.ensureCapacity(n.length),this.add(n,r)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[1],n=!1,r=arguments[0].iterator();r.hasNext();)this.add(r.next(),e),n=!0;return n}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var n=arguments[0],r=arguments[1];return this.add(n,r,!0),!0}if(arguments[0]instanceof E&&"boolean"==typeof arguments[1]){var i=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(i))return null;t.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];return this.add(o,a),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var s=arguments[0],u=arguments[1];if(arguments[2])for(var l=0;l<s.length;l++)this.add(s[l],u);else for(var c=s.length-1;c>=0;c--)this.add(s[c],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof E){var f=arguments[0],h=arguments[1];if(!arguments[2]){var p=this.size();if(p>0){if(f>0&&this.get(f-1).equals2D(h))return null;if(f<p&&this.get(f).equals2D(h))return null}}t.prototype.add.call(this,f,h)}}else if(4===arguments.length){var d=arguments[0],m=arguments[1],g=arguments[2],y=arguments[3],v=1;g>y&&(v=-1);for(var b=g;b!==y;b+=v)this.add(d[b],m);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new E(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(xt),St=function(){},Pt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Pt.ForwardComparator.get=function(){return Ct},Pt.BidirectionalComparator.get=function(){return Tt},Pt.coordArrayType.get=function(){return new Array(0).fill(null)},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},St.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(St.indexOf(r,e)<0)return r}return null},St.scroll=function(t,e){var n=St.indexOf(e,t);if(n<0)return null;var r=new Array(t.length).fill(null);q.arraycopy(t,n,r,0,t.length-n),q.arraycopy(t,0,r,t.length-n,n),q.arraycopy(r,0,t,0,t.length)},St.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(r===i)return!0;if(null===r||null===i)return!1;if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(0!==o.compare(r[a],i[a]))return!1;return!0}},St.intersection=function(t,e){for(var n=new Ot,r=0;r<t.length;r++)e.intersects(t[r])&&n.add(t[r],!0);return n.toCoordinateArray()},St.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},St.removeRepeatedPoints=function(t){return St.hasRepeatedPoints(t)?new Ot(t,!1).toCoordinateArray():t},St.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),r=0;r<=n;r++){var i=t[r];t[r]=t[e-r],t[e-r]=i}},St.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var r=new Array(e).fill(null);if(0===e)return r;for(var i=0,o=0;o<t.length;o++)null!==t[o]&&(r[i++]=t[o]);return r},St.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new E(t[n]);return e}if(5===arguments.length)for(var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],u=0;u<s;u++)o[a+u]=new E(r[i+u])},St.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e[t.length-n-1];if(0!==r.compareTo(i))return!1}return!0},St.envelope=function(t){for(var e=new W,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},St.toCoordinateArray=function(t){return t.toArray(St.coordArrayType)},St.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},St.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},St.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,r=t[e].compareTo(t[n]);if(0!==r)return r}return 1},St.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var r=t[n].compareTo(e[n]);if(0!==r)return r;n++}return n<e.length?-1:n<t.length?1:0},St.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},St.extract=function(t,e,n){e=I.clamp(e,0,t.length);var r=(n=I.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),n<e&&(r=0);var i=new Array(r).fill(null);if(0===r)return i;for(var o=0,a=e;a<=n;a++)i[o++]=t[a];return i},Object.defineProperties(St,Pt);var Ct=function(){};Ct.prototype.compare=function(t,e){return St.compare(t,e)},Ct.prototype.interfaces_=function(){return[x]},Ct.prototype.getClass=function(){return Ct};var Tt=function(){};Tt.prototype.compare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;var i=St.compare(n,r);return St.isEqualReversed(n,r)?0:i},Tt.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;for(var i=St.increasingDirection(n),o=St.increasingDirection(r),a=i>0?0:n.length-1,s=o>0?0:n.length-1,u=0;u<n.length;u++){var l=n[a].compareTo(r[s]);if(0!==l)return l;a+=i,s+=o}return 0},Tt.prototype.interfaces_=function(){return[x]},Tt.prototype.getClass=function(){return Tt};var kt=function(){};kt.prototype.get=function(){},kt.prototype.put=function(){},kt.prototype.size=function(){},kt.prototype.values=function(){},kt.prototype.entrySet=function(){};var It=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(kt);(i.prototype=new Error).name="OperationNotSupported",(o.prototype=new _t).contains=function(){};var Lt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof _t&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(this.array_[e]===t)return!0;return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new jt(this)},e}(o),jt=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new r;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new i},e}(At),Mt=0;(f.prototype=new It).get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},f.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var a={key:t,left:null,right:null,value:e,parent:n,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},f.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(s(t)===l(s(s(t)))){var e=c(s(s(t)));1===a(e)?(u(s(t),Mt),u(e,Mt),u(s(s(t)),1),t=s(s(t))):(t===c(s(t))&&(t=s(t),this.rotateLeft(t)),u(s(t),Mt),u(s(s(t)),1),this.rotateRight(s(s(t))))}else{var n=l(s(s(t)));1===a(n)?(u(s(t),Mt),u(n,Mt),u(s(s(t)),1),t=s(s(t))):(t===l(s(t))&&(t=s(t),this.rotateRight(t)),u(s(t),Mt),u(s(s(t)),1),this.rotateLeft(s(s(t))))}this.root_.color=Mt},f.prototype.values=function(){var t=new xt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=f.successor(e));)t.add(e.value);return t},f.prototype.entrySet=function(){var t=new Lt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=f.successor(e));)t.add(e);return t},f.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},f.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},f.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},f.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,r=t;null!==n&&r===n.right;)r=n,n=n.parent;return n},f.prototype.size=function(){return this.size_};var Rt=function(){};Rt.prototype.interfaces_=function(){return[]},Rt.prototype.getClass=function(){return Rt},h.prototype=new o,(p.prototype=new h).contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(0===this.array_[e].compareTo(t))return!0;return!1},p.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++)if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0;return this.array_.push(t),!0},p.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},p.prototype.remove=function(t){throw new i},p.prototype.size=function(){return this.array_.length},p.prototype.isEmpty=function(){return 0===this.array_.length},p.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},p.prototype.iterator=function(){return new Nt(this)};var Nt=function(t){this.treeSet_=t,this.position_=0};Nt.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new r;return this.treeSet_.array_[this.position_++]},Nt.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Nt.prototype.remove=function(){throw new i};var Dt=function(){};Dt.sort=function(){var t,e,n,r,i=arguments[0];if(1===arguments.length)r=function(t,e){return t.compareTo(e)},i.sort(r);else if(2===arguments.length)n=arguments[1],r=function(t,e){return n.compare(t,e)},i.sort(r);else if(3===arguments.length){(e=i.slice(arguments[1],arguments[2])).sort();var o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length));for(i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])}else if(4===arguments.length)for(e=i.slice(arguments[1],arguments[2]),n=arguments[3],r=function(t,e){return n.compare(t,e)},e.sort(r),o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length)),i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])},Dt.asList=function(t){for(var e=new xt,n=0,r=t.length;n<r;n++)e.add(t[n]);return e};var Ft=function(){},Bt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Bt.P.get=function(){return 0},Bt.L.get=function(){return 1},Bt.A.get=function(){return 2},Bt.FALSE.get=function(){return-1},Bt.TRUE.get=function(){return-2},Bt.DONTCARE.get=function(){return-3},Bt.SYM_FALSE.get=function(){return"F"},Bt.SYM_TRUE.get=function(){return"T"},Bt.SYM_DONTCARE.get=function(){return"*"},Bt.SYM_P.get=function(){return"0"},Bt.SYM_L.get=function(){return"1"},Bt.SYM_A.get=function(){return"2"},Ft.prototype.interfaces_=function(){return[]},Ft.prototype.getClass=function(){return Ft},Ft.toDimensionSymbol=function(t){switch(t){case Ft.FALSE:return Ft.SYM_FALSE;case Ft.TRUE:return Ft.SYM_TRUE;case Ft.DONTCARE:return Ft.SYM_DONTCARE;case Ft.P:return Ft.SYM_P;case Ft.L:return Ft.SYM_L;case Ft.A:return Ft.SYM_A}throw new v("Unknown dimension value: "+t)},Ft.toDimensionValue=function(t){switch(R.toUpperCase(t)){case Ft.SYM_FALSE:return Ft.FALSE;case Ft.SYM_TRUE:return Ft.TRUE;case Ft.SYM_DONTCARE:return Ft.DONTCARE;case Ft.SYM_P:return Ft.P;case Ft.SYM_L:return Ft.L;case Ft.SYM_A:return Ft.A}throw new v("Unknown dimension symbol: "+t)},Object.defineProperties(Ft,Bt);var zt=function(){};zt.prototype.filter=function(t){},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt};var Ut=function(){};Ut.prototype.filter=function(t,e){},Ut.prototype.isDone=function(){},Ut.prototype.isGeometryChanged=function(){},Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut};var Gt=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new v("geometries must not contain null elements")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new W,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var r=this._geometries[n].getCoordinates(),i=0;i<r.length;i++)t[++e]=r[i];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e;if(this._geometries.length!==r._geometries.length)return!1;for(var i=0;i<this._geometries.length;i++)if(!this._geometries[i].equalsExact(r._geometries[i],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Dt.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=Ft.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=Ft.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new p(Dt.asList(this._geometries)),n=new p(Dt.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var r=arguments[1],i=arguments[0],o=this.getNumGeometries(),a=i.getNumGeometries(),s=0;s<o&&s<a;){var u=this.getGeometryN(s),l=i.getGeometryN(s),c=u.compareToSameClass(l,r);if(0!==c)return c;s++}return s<o?1:s<a?-1:0}},e.prototype.apply=function(){if(k(arguments[0],pt))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(k(arguments[0],Ut)){var n=arguments[0];if(0===this._geometries.length)return null;for(var r=0;r<this._geometries.length&&(this._geometries[r].apply(n),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else if(k(arguments[0],zt)){var i=arguments[0];i.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(i)}else if(k(arguments[0],lt)){var a=arguments[0];a.filter(this);for(var s=0;s<this._geometries.length;s++)this._geometries[s].apply(a)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(ct),Vt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Ft.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new qt(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Rt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(Gt),qt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=dt.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=r}};qt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},qt.prototype.getBoundary=function(){return this._geom instanceof Zt?this.boundaryLineString(this._geom):this._geom instanceof Vt?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},qt.prototype.boundaryLineString=function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},qt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},qt.prototype.computeBoundaryCoordinates=function(t){var e=new xt;this._endpointMap=new f;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);0!==r.getNumPoints()&&(this.addEndpoint(r.getCoordinateN(0)),this.addEndpoint(r.getCoordinateN(r.getNumPoints()-1)))}for(var i=this._endpointMap.entrySet().iterator();i.hasNext();){var o=i.next(),a=o.getValue().count;this._bnRule.isInBoundary(a)&&e.add(o.getKey())}return St.toCoordinateArray(e)},qt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new Ht,this._endpointMap.put(t,e)),e.count++},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.getBoundary=function(){return 1===arguments.length?new qt(arguments[0]).getBoundary():2===arguments.length?new qt(arguments[0],arguments[1]).getBoundary():void 0};var Ht=function(){this.count=null};Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht};var Wt=function(){},Xt={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.chars=function(t,e){for(var n=new Array(e).fill(null),r=0;r<e;r++)n[r]=t;return String(n)},Wt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],o="",a=new function(){}(new function(){}(Wt.getStackTrace(r))),s=0;s<i;s++)try{o+=a.readLine()+Wt.NEWLINE}catch(t){if(!(t instanceof d))throw t;et.shouldNeverReachHere()}return o}},Wt.split=function(t,e){for(var n=e.length,r=new xt,i=""+t,o=i.indexOf(e);o>=0;){var a=i.substring(0,o);r.add(a),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),u=0;u<s.length;u++)s[u]=r.get(u);return s},Wt.toString=function(){if(1===arguments.length){var t=arguments[0];return Wt.SIMPLE_ORDINATE_FORMAT.format(t)}},Wt.spaces=function(t){return Wt.chars(" ",t)},Xt.NEWLINE.get=function(){return q.getProperty("line.separator")},Xt.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(Wt,Xt);var Yt=function(){};Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.copyCoord=function(t,e,n,r){for(var i=Math.min(t.getDimension(),n.getDimension()),o=0;o<i;o++)n.setOrdinate(r,o,t.getOrdinate(e,o))},Yt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&t.getOrdinate(0,z.X)===t.getOrdinate(e-1,z.X)&&t.getOrdinate(0,z.Y)===t.getOrdinate(e-1,z.Y)},Yt.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var r=Math.min(t.getDimension(),e.getDimension()),i=0;i<n;i++)for(var o=0;o<r;o++){var a=t.getOrdinate(i,o),s=e.getOrdinate(i,o);if(t.getOrdinate(i,o)!==e.getOrdinate(i,o)&&(!b.isNaN(a)||!b.isNaN(s)))return!1}return!0},Yt.extend=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();if(Yt.copy(e,0,r,0,i),i>0)for(var o=i;o<n;o++)Yt.copy(e,i-1,r,o,1);return r},Yt.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),r=0;r<=n;r++)Yt.swap(t,r,e-r)},Yt.swap=function(t,e,n){if(e===n)return null;for(var r=0;r<t.getDimension();r++){var i=t.getOrdinate(e,r);t.setOrdinate(e,r,t.getOrdinate(n,r)),t.setOrdinate(n,r,i)}},Yt.copy=function(t,e,n,r,i){for(var o=0;o<i;o++)Yt.copyCoord(t,e+o,n,r+o)},Yt.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),r=new j;r.append("(");for(var i=0;i<e;i++){i>0&&r.append(" ");for(var o=0;o<n;o++)o>0&&r.append(","),r.append(Wt.toString(t.getOrdinate(i,o)))}return r.append(")"),r.toString()}},Yt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Yt.createClosedRing(t,e,4):e.getOrdinate(0,z.X)===e.getOrdinate(n-1,z.X)&&e.getOrdinate(0,z.Y)===e.getOrdinate(n-1,z.Y)?e:Yt.createClosedRing(t,e,n+1)},Yt.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();Yt.copy(e,0,r,0,i);for(var o=i;o<n;o++)Yt.copy(e,0,r,o,1);return r};var Zt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new W:this._points.expandEnvelope(new W)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e;if(this._points.size()!==r._points.size())return!1;for(var i=0;i<this._points.size();i++)if(!this.equal(this._points.getCoordinate(i),r._points.getCoordinate(i),n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Yt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Ft.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return st.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Yt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var r=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==r)return r;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var i=arguments[0];return arguments[1].compare(this._points,i._points)}},e.prototype.apply=function(){if(k(arguments[0],pt))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(k(arguments[0],Ut)){var n=arguments[0];if(0===this._points.size())return null;for(var r=0;r<this._points.size()&&(n.filter(this._points,r),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else(k(arguments[0],zt)||k(arguments[0],lt))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return new qt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new v("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[Rt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(ct),Kt=function(){};Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt};var $t=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new W;var t=new W;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Ft.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(k(arguments[0],pt)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(k(arguments[0],Ut)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else(k(arguments[0],zt)||k(arguments[0],lt))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Kt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(ct),Jt=function(){};Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt};var Qt=function(t){function e(e,n,r){if(t.call(this,r),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new v("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new v("shell is empty but holes are not");this._shell=e,this._holes=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),r=0;r<n.length;r++)t[++e]=n[r];for(var i=0;i<this._holes.length;i++)for(var o=this._holes[i].getCoordinates(),a=0;a<o.length;a++)t[++e]=o[a];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(st.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(st.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var r=t.getX(n);if(r!==e.getMinX()&&r!==e.getMaxX())return!1;var i=t.getY(n);if(i!==e.getMinY()&&i!==e.getMaxY())return!1}for(var o=t.getX(0),a=t.getY(0),s=1;s<=4;s++){var u=t.getX(s),l=t.getY(s);if(u!==o===(l!==a))return!1;o=u,a=l}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e,i=this._shell,o=r._shell;if(!i.equalsExact(o,n))return!1;if(this._holes.length!==r._holes.length)return!1;for(var a=0;a<this._holes.length;a++)if(!this._holes[a].equalsExact(r._holes[a],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Dt.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var r=new Array(e.getCoordinates().length-1).fill(null);q.arraycopy(e.getCoordinates(),0,r,0,r.length);var i=St.minCoordinate(e.getCoordinates());St.scroll(r,i),q.arraycopy(r,0,e.getCoordinates(),0,r.length),e.getCoordinates()[r.length]=r[0],st.isCCW(e.getCoordinates())===n&&St.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var r=arguments[1],i=arguments[0],o=this._shell,a=i._shell,s=o.compareToSameClass(a,r);if(0!==s)return s;for(var u=this.getNumInteriorRing(),l=i.getNumInteriorRing(),c=0;c<u&&c<l;){var f=this.getInteriorRingN(c),h=i.getInteriorRingN(c),p=f.compareToSameClass(h,r);if(0!==p)return p;c++}return c<u?1:c<l?-1:0}},e.prototype.apply=function(t){if(k(t,pt)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(k(t,Ut)){if(this._shell.apply(t),!t.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(t),!t.isDone());n++);t.isGeometryChanged()&&this.geometryChanged()}else if(k(t,zt))t.filter(this);else if(k(t,lt)){t.filter(this),this._shell.apply(t);for(var r=0;r<this._holes.length;r++)this._holes[r].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),r=0;r<n.length;r++)n[r]=this._holes[r].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[Jt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(ct),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Ft.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Kt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(Gt),ee=function(t){function e(e,n){e instanceof E&&n instanceof ye&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Ft.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();return Yt.reverse(t),this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new v("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new v("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Zt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new xt,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),r=0;r<n.getNumGeometries();r++)t.add(n.getGeometryN(r));var i=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(i))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Jt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(Gt),re=function(t){this._factory=t||null,this._isUserDataCopied=!1},ie={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};re.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},re.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},re.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Gt?this.editGeometryCollection(t,e):t instanceof Qt?this.editPolygon(t,e):t instanceof $t||t instanceof Zt?e.edit(t,this._factory):(et.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},re.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),r=new xt,i=0;i<n.getNumGeometries();i++){var o=this.edit(n.getGeometryN(i),e);null===o||o.isEmpty()||r.add(o)}return n.getClass()===te?this._factory.createMultiPoint(r.toArray([])):n.getClass()===Vt?this._factory.createMultiLineString(r.toArray([])):n.getClass()===ne?this._factory.createMultiPolygon(r.toArray([])):this._factory.createGeometryCollection(r.toArray([]))},re.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var r=this.edit(n.getExteriorRing(),e);if(null===r||r.isEmpty())return this._factory.createPolygon();for(var i=new xt,o=0;o<n.getNumInteriorRing();o++){var a=this.edit(n.getInteriorRingN(o),e);null===a||a.isEmpty()||i.add(a)}return this._factory.createPolygon(r,i.toArray([]))},re.prototype.interfaces_=function(){return[]},re.prototype.getClass=function(){return re},re.GeometryEditorOperation=function(){},ie.NoOpGeometryOperation.get=function(){return oe},ie.CoordinateOperation.get=function(){return ae},ie.CoordinateSequenceOperation.get=function(){return se},Object.defineProperties(re,ie);var oe=function(){};oe.prototype.edit=function(t,e){return t},oe.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var ae=function(){};ae.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof ee?e.createLinearRing(n):t instanceof Zt?e.createLineString(n):t instanceof $t?n.length>0?e.createPoint(n[0]):e.createPoint():t},ae.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var se=function(){};se.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Zt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof $t?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},se.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ue=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new E}else if(k(arguments[0],z)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var r=0;r<this._coordinates.length;r++)this._coordinates[r]=n.getCoordinateCopy(r)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var i=arguments[0],o=arguments[1];this._coordinates=i,this._dimension=o,null===i&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var a=arguments[0],s=arguments[1];this._coordinates=new Array(a).fill(null),this._dimension=s;for(var u=0;u<a;u++)this._coordinates[u]=new E}},le={serialVersionUID:{configurable:!0}};ue.prototype.setOrdinate=function(t,e,n){switch(e){case z.X:this._coordinates[t].x=n;break;case z.Y:this._coordinates[t].y=n;break;case z.Z:this._coordinates[t].z=n;break;default:throw new v("invalid ordinateIndex")}},ue.prototype.size=function(){return this._coordinates.length},ue.prototype.getOrdinate=function(t,e){switch(e){case z.X:return this._coordinates[t].x;case z.Y:return this._coordinates[t].y;case z.Z:return this._coordinates[t].z}return b.NaN},ue.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ue.prototype.getCoordinateCopy=function(t){return new E(this._coordinates[t])},ue.prototype.getDimension=function(){return this._dimension},ue.prototype.getX=function(t){return this._coordinates[t].x},ue.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new ue(t,this._dimension)},ue.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},ue.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new ue(t,this._dimension)},ue.prototype.toString=function(){if(this._coordinates.length>0){var t=new j(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},ue.prototype.getY=function(t){return this._coordinates[t].y},ue.prototype.toCoordinateArray=function(){return this._coordinates},ue.prototype.interfaces_=function(){return[z,e]},ue.prototype.getClass=function(){return ue},le.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ue,le);var ce=function(){},fe={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ce.prototype.readResolve=function(){return ce.instance()},ce.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array)return new ue(arguments[0]);if(k(arguments[0],z))return new ue(arguments[0])}else if(2===arguments.length){var t=arguments[0],e=arguments[1];return e>3&&(e=3),e<2?new ue(t):new ue(t,e)}},ce.prototype.interfaces_=function(){return[P,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},fe.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},fe.instanceObject.get=function(){return new ce},Object.defineProperties(ce,fe);var he=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new xt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Lt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(kt),pe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof me){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},de={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};pe.prototype.equals=function(t){if(!(t instanceof pe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},pe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new M(n).compareTo(new M(r))},pe.prototype.getScale=function(){return this._scale},pe.prototype.isFloating=function(){return this._modelType===pe.FLOATING||this._modelType===pe.FLOATING_SINGLE},pe.prototype.getType=function(){return this._modelType},pe.prototype.toString=function(){var t="UNKNOWN";return this._modelType===pe.FLOATING?t="Floating":this._modelType===pe.FLOATING_SINGLE?t="Floating-Single":this._modelType===pe.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},pe.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return b.isNaN(t)||this._modelType===pe.FLOATING_SINGLE?t:this._modelType===pe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof E){var e=arguments[0];if(this._modelType===pe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},pe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===pe.FLOATING?t=16:this._modelType===pe.FLOATING_SINGLE?t=6:this._modelType===pe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},pe.prototype.setScale=function(t){this._scale=Math.abs(t)},pe.prototype.interfaces_=function(){return[e,A]},pe.prototype.getClass=function(){return pe},pe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},de.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},de.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(pe,de);var me=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ge={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};me.prototype.readResolve=function(){return me.nameToTypeMap.get(this._name)},me.prototype.toString=function(){return this._name},me.prototype.interfaces_=function(){return[e]},me.prototype.getClass=function(){return me},ge.serialVersionUID.get=function(){return-552860263173159e4},ge.nameToTypeMap.get=function(){return new he},Object.defineProperties(me,ge),pe.Type=me,pe.FIXED=new me("FIXED"),pe.FLOATING=new me("FLOATING"),pe.FLOATING_SINGLE=new me("FLOATING SINGLE");var ye=function t(){this._precisionModel=new pe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?k(arguments[0],P)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof pe&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},ve={serialVersionUID:{configurable:!0}};ye.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new E(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new E(t.getMinX(),t.getMinY()),new E(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new E(t.getMinX(),t.getMinY()),new E(t.getMinX(),t.getMaxY()),new E(t.getMaxX(),t.getMaxY()),new E(t.getMaxX(),t.getMinY()),new E(t.getMinX(),t.getMinY())]),null)},ye.prototype.createLineString=function(t){return t?t instanceof Array?new Zt(this.getCoordinateSequenceFactory().create(t),this):k(t,z)?new Zt(t,this):void 0:new Zt(this.getCoordinateSequenceFactory().create([]),this)},ye.prototype.createMultiLineString=function(){return 0===arguments.length?new Vt(null,this):1===arguments.length?new Vt(arguments[0],this):void 0},ye.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===e&&(e=a),a!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(ye.toGeometryArray(t));var s=t.iterator().next();if(t.size()>1){if(s instanceof Qt)return this.createMultiPolygon(ye.toPolygonArray(t));if(s instanceof Zt)return this.createMultiLineString(ye.toLineStringArray(t));if(s instanceof $t)return this.createMultiPoint(ye.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},ye.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},ye.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(k(arguments[0],z))return new $t(arguments[0],this)}},ye.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},ye.prototype.createPolygon=function(){if(0===arguments.length)return new Qt(null,null,this);if(1===arguments.length){if(k(arguments[0],z)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length)return new Qt(arguments[0],arguments[1],this)},ye.prototype.getSRID=function(){return this._SRID},ye.prototype.createGeometryCollection=function(){return 0===arguments.length?new Gt(null,this):1===arguments.length?new Gt(arguments[0],this):void 0},ye.prototype.createGeometry=function(t){return new re(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},ye.prototype.getPrecisionModel=function(){return this._precisionModel},ye.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(k(arguments[0],z))return new ee(arguments[0],this)}},ye.prototype.createMultiPolygon=function(){return 0===arguments.length?new ne(null,this):1===arguments.length?new ne(arguments[0],this):void 0},ye.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array)return new te(arguments[0],this);if(arguments[0]instanceof Array){var t=arguments[0];return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(k(arguments[0],z)){var e=arguments[0];if(null===e)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(e.size()).fill(null),r=0;r<e.size();r++){var i=this.getCoordinateSequenceFactory().create(1,e.getDimension());Yt.copy(e,r,i,0,1),n[r]=this.createPoint(i)}return this.createMultiPoint(n)}}},ye.prototype.interfaces_=function(){return[e]},ye.prototype.getClass=function(){return ye},ye.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.getDefaultCoordinateSequenceFactory=function(){return ce.instance()},ye.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ye.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},ve.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(ye,ve);var be=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],_e=function(t){this.geometryFactory=t||new ye};_e.prototype.read=function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!Ae[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==be.indexOf(n)?Ae[n].apply(this,[e.coordinates]):"GeometryCollection"===n?Ae[n].apply(this,[e.geometries]):Ae[n].apply(this,[e])},_e.prototype.write=function(t){var e=t.getGeometryType();if(!we[e])throw new Error("Geometry is not supported");return we[e].apply(this,[t])};var Ae={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!Ae[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=Ae.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(new E(r[0],r[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new E(t[0],t[1]),new E(t[2],t[1]),new E(t[2],t[3]),new E(t[0],t[3]),new E(t[0],t[1])])},Point:function(t){var e=new E(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ae.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=Ae.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ae.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=Ae.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),r=[],i=1;i<t.length;++i){var o=t[i],a=Ae.coordinates.apply(this,[o]),s=this.geometryFactory.createLinearRing(a);r.push(s)}return this.geometryFactory.createPolygon(n,r)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(Ae.Polygon.apply(this,[r]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(this.read(r))}return this.geometryFactory.createGeometryCollection(e)}},we={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:we.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=we.Point.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),r=0;r<n.length;++r){var i=n[r];e.push(we.coordinate.apply(this,[i]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=we.LineString.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=we.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var r=0;r<t._holes.length;++r){var i=t._holes[r],o=we.LineString.apply(this,[i]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=we.Polygon.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=r.getGeometryType();e.push(we[i].apply(this,[r]))}return{type:"GeometryCollection",geometries:e}}},xe=function(t){this.geometryFactory=t||new ye,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new _e(this.geometryFactory)};xe.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===pe.FIXED&&this.reducePrecision(e),e},xe.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Ee=function(){this.parser=new _e(this.geometryFactory)};Ee.prototype.write=function(t){return this.parser.write(t)};var Oe=function(){},Se={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe},Oe.opposite=function(t){return t===Oe.LEFT?Oe.RIGHT:t===Oe.RIGHT?Oe.LEFT:t},Se.ON.get=function(){return 0},Se.LEFT.get=function(){return 1},Se.RIGHT.get=function(){return 2},Object.defineProperties(Oe,Se),(m.prototype=new Error).name="EmptyStackException",(g.prototype=new wt).add=function(t){return this.array_.push(t),!0},g.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},g.prototype.push=function(t){return this.array_.push(t),t},g.prototype.pop=function(t){if(0===this.array_.length)throw new m;return this.array_.pop()},g.prototype.peek=function(){if(0===this.array_.length)throw new m;return this.array_[this.array_.length-1]},g.prototype.empty=function(){return 0===this.array_.length},g.prototype.isEmpty=function(){return this.empty()},g.prototype.search=function(t){return this.array_.indexOf(t)},g.prototype.size=function(){return this.array_.length},g.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var Pe=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Pe.prototype.getCoordinate=function(){return this._minCoord},Pe.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Pe.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],r=st.computeOrientation(this._minCoord,n,e),i=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&r===st.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&r===st.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Pe.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var r=Oe.LEFT;return n[e].y<n[e+1].y&&(r=Oe.RIGHT),r},Pe.prototype.getEdge=function(){return this._orientedDe},Pe.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Pe.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Pe.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Oe.LEFT&&(this._orientedDe=this._minDe.getSym())},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe};var Ce=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new E(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}(Q),Te=function(){this.array_=[]};Te.prototype.addLast=function(t){this.array_.push(t)},Te.prototype.removeFirst=function(){return this.array_.shift()},Te.prototype.isEmpty=function(){return 0===this.array_.length};var ke=function(){this._finder=null,this._dirEdgeList=new xt,this._nodes=new xt,this._rightMostCoord=null,this._env=null,this._finder=new Pe};ke.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},ke.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},ke.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new Ce("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},ke.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Oe.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},ke.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},ke.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Oe.RIGHT)>=1&&e.getDepth(Oe.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},ke.prototype.computeDepths=function(t){var e=new Lt,n=new Te,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();e.contains(s)||(n.addLast(s),e.add(s))}}}},ke.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},ke.prototype.getEnvelope=function(){if(null===this._env){for(var t=new W,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;r<n.length-1;r++)t.expandToInclude(n[r]);this._env=t}return this._env},ke.prototype.addReachable=function(t){var e=new g;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},ke.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Oe.LEFT,t.getDepth(Oe.RIGHT)),e.setDepth(Oe.RIGHT,t.getDepth(Oe.LEFT))},ke.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var r=n.next();this._dirEdgeList.add(r);var i=r.getSym().getNode();i.isVisited()||e.push(i)}},ke.prototype.getNodes=function(){return this._nodes},ke.prototype.getDirectedEdges=function(){return this._dirEdgeList},ke.prototype.interfaces_=function(){return[A]},ke.prototype.getClass=function(){return ke};var Ie=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[Oe.ON]=n}else if(arguments[0]instanceof t){var r=arguments[0];if(this.init(r.location.length),null!==r)for(var i=0;i<this.location.length;i++)this.location[i]=r.location[i]}}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.init(3),this.location[Oe.ON]=o,this.location[Oe.LEFT]=a,this.location[Oe.RIGHT]=s}};Ie.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Ie.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==C.NONE)return!1;return!0},Ie.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===C.NONE&&(this.location[e]=t)},Ie.prototype.isLine=function(){return 1===this.location.length},Ie.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Oe.ON]=this.location[Oe.ON],e[Oe.LEFT]=C.NONE,e[Oe.RIGHT]=C.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===C.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Ie.prototype.getLocations=function(){return this.location},Ie.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Oe.LEFT];this.location[Oe.LEFT]=this.location[Oe.RIGHT],this.location[Oe.RIGHT]=t},Ie.prototype.toString=function(){var t=new j;return this.location.length>1&&t.append(C.toLocationSymbol(this.location[Oe.LEFT])),t.append(C.toLocationSymbol(this.location[Oe.ON])),this.location.length>1&&t.append(C.toLocationSymbol(this.location[Oe.RIGHT])),t.toString()},Ie.prototype.setLocations=function(t,e,n){this.location[Oe.ON]=t,this.location[Oe.LEFT]=e,this.location[Oe.RIGHT]=n},Ie.prototype.get=function(t){return t<this.location.length?this.location[t]:C.NONE},Ie.prototype.isArea=function(){return this.location.length>1},Ie.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===C.NONE)return!0;return!1},Ie.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Oe.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Ie.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(C.NONE)},Ie.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Ie.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Ie.prototype.interfaces_=function(){return[]},Ie.prototype.getClass=function(){return Ie};var Le=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Ie(e),this.elt[1]=new Ie(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Ie(n.elt[0]),this.elt[1]=new Ie(n.elt[1])}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.elt[0]=new Ie(C.NONE),this.elt[1]=new Ie(C.NONE),this.elt[r].setLocation(i)}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.elt[0]=new Ie(o,a,s),this.elt[1]=new Ie(o,a,s)}else if(4===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2],f=arguments[3];this.elt[0]=new Ie(C.NONE,C.NONE,C.NONE),this.elt[1]=new Ie(C.NONE,C.NONE,C.NONE),this.elt[u].setLocations(l,c,f)}};Le.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Le.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Le.prototype.isNull=function(t){return this.elt[t].isNull()},Le.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Le.prototype.isLine=function(t){return this.elt[t].isLine()},Le.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Ie(t.elt[e]):this.elt[e].merge(t.elt[e])},Le.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Le.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Oe.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Le.prototype.toString=function(){var t=new j;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Le.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Le.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Le.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Oe.ON,e)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this.elt[n].setLocation(r,i)}},Le.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Le.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Le.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Ie(this.elt[t].location[0]))},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le},Le.toLineLabel=function(t){for(var e=new Le(C.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var je=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new xt,this._pts=new xt,this._label=new Le(C.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new xt,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};je.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=st.isCCW(this._ring.getCoordinates())},je.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},je.prototype.computePoints=function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new Ce("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Ce("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var r=e.getLabel();et.isTrue(r.isArea()),this.mergeLabel(r),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},je.prototype.getLinearRing=function(){return this._ring},je.prototype.getCoordinate=function(t){return this._pts.get(t)},je.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},je.prototype.addPoints=function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o<r.length;o++)this._pts.add(r[o])}else{var a=r.length-2;n&&(a=r.length-1);for(var s=a;s>=0;s--)this._pts.add(r[s])}},je.prototype.isHole=function(){return this._isHole},je.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},je.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!st.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},je.prototype.addHole=function(t){this._holes.add(t)},je.prototype.isShell=function(){return null===this._shell},je.prototype.getLabel=function(){return this._label},je.prototype.getEdges=function(){return this._edges},je.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},je.prototype.getShell=function(){return this._shell},je.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[1],n=arguments[0].getLocation(e,Oe.RIGHT);if(n===C.NONE)return null;if(this._label.getLocation(e)===C.NONE)return this._label.setLocation(e,n),null}},je.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},je.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var Me=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(je),Re=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new xt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Me(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(je),Ne=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};Ne.prototype.setVisited=function(t){this._isVisited=t},Ne.prototype.setInResult=function(t){this._isInResult=t},Ne.prototype.isCovered=function(){return this._isCovered},Ne.prototype.isCoveredSet=function(){return this._isCoveredSet},Ne.prototype.setLabel=function(t){this._label=t},Ne.prototype.getLabel=function(){return this._label},Ne.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Ne.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Ne.prototype.isInResult=function(){return this._isInResult},Ne.prototype.isVisited=function(){return this._isVisited},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var De=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Le(0,C.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=C.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==C.BOUNDARY&&(n=r)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Le(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Le)for(var n=arguments[0],r=0;r<2;r++){var i=this.computeMergedLocation(n,r);this._label.getLocation(r)===C.NONE&&this._label.setLocation(r,i)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=C.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case C.BOUNDARY:n=C.INTERIOR;break;case C.INTERIOR:default:n=C.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ne),Fe=function(){this.nodeMap=new f,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Fe.prototype.find=function(t){return this.nodeMap.get(t)},Fe.prototype.addNode=function(){if(arguments[0]instanceof E){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof De){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},Fe.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Fe.prototype.iterator=function(){return this.nodeMap.values().iterator()},Fe.prototype.values=function(){return this.nodeMap.values()},Fe.prototype.getBoundaryNodes=function(t){for(var e=new xt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===C.BOUNDARY&&e.add(r)}return e},Fe.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Be=function(){},ze={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be},Be.isNorthern=function(t){return t===Be.NE||t===Be.NW},Be.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},Be.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},Be.isInHalfPlane=function(t,e){return e===Be.SE?t===Be.SE||t===Be.SW:t===e||t===e+1},Be.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new v("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Be.NE:Be.SE:e>=0?Be.NW:Be.SW}if(arguments[0]instanceof E&&arguments[1]instanceof E){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new v("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Be.NE:Be.SE:r.y>=n.y?Be.NW:Be.SW}},ze.NE.get=function(){return 0},ze.NW.get=function(){return 1},ze.SW.get=function(){return 2},ze.SE.get=function(){return 3},Object.defineProperties(Be,ze);var Ue=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];this._edge=e,this.init(n,r),this._label=null}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this._edge=i,this.init(o,a),this._label=s}};Ue.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:st.computeOrientation(t._p0,t._p1,this._p1)},Ue.prototype.getDy=function(){return this._dy},Ue.prototype.getCoordinate=function(){return this._p0},Ue.prototype.setNode=function(t){this._node=t},Ue.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);t.print("  "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+"   "+this._label)},Ue.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Ue.prototype.getDirectedCoordinate=function(){return this._p1},Ue.prototype.getDx=function(){return this._dx},Ue.prototype.getLabel=function(){return this._label},Ue.prototype.getEdge=function(){return this._edge},Ue.prototype.getQuadrant=function(){return this._quadrant},Ue.prototype.getNode=function(){return this._node},Ue.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return"  "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+"   "+this._label},Ue.prototype.computeLabel=function(t){},Ue.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Be.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},Ue.prototype.interfaces_=function(){return[A]},Ue.prototype.getClass=function(){return Ue};var Ge=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var r=e.getNumPoints()-1;this.init(e.getCoordinate(r),e.getCoordinate(r-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Le(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Ce("assigned depths do not match",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Oe.LEFT)===C.INTERIOR&&this._label.getLocation(e,Oe.RIGHT)===C.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[Oe.LEFT]+"/"+this._depth[Oe.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,C.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,C.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var r=1;t===Oe.LEFT&&(r=-1);var i=Oe.opposite(t),o=e+n*r;this.setDepth(t,e),this.setDepth(i,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===C.EXTERIOR&&e===C.INTERIOR?1:t===C.INTERIOR&&e===C.EXTERIOR?-1:0},e}(Ue),Ve=function(){};Ve.prototype.createNode=function(t){return new De(t,null)},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve};var qe=function(){if(this._edges=new xt,this._nodes=null,this._edgeEndList=new xt,0===arguments.length)this._nodes=new Fe(new Ve);else if(1===arguments.length){var t=arguments[0];this._nodes=new Fe(t)}};qe.prototype.printEdges=function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},qe.prototype.find=function(t){return this._nodes.find(t)},qe.prototype.addNode=function(){if(arguments[0]instanceof De){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof E){var e=arguments[0];return this._nodes.addNode(e)}},qe.prototype.getNodeIterator=function(){return this._nodes.iterator()},qe.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()},qe.prototype.debugPrintln=function(t){q.out.println(t)},qe.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var r=n.getLabel();return null!==r&&r.getLocation(t)===C.BOUNDARY},qe.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()},qe.prototype.matchInSameDirection=function(t,e,n,r){return!!t.equals(n)&&st.computeOrientation(t,e,r)===st.COLLINEAR&&Be.quadrant(t,e)===Be.quadrant(n,r)},qe.prototype.getEdgeEnds=function(){return this._edgeEndList},qe.prototype.debugPrint=function(t){q.out.print(t)},qe.prototype.getEdgeIterator=function(){return this._edges.iterator()},qe.prototype.findEdgeInSameDirection=function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(this.matchInSameDirection(t,e,i[0],i[1]))return r;if(this.matchInSameDirection(t,e,i[i.length-1],i[i.length-2]))return r}return null},qe.prototype.insertEdge=function(t){this._edges.add(t)},qe.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},qe.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var r=new Ge(n,!0),i=new Ge(n,!1);r.setSym(i),i.setSym(r),this.add(r),this.add(i)}},qe.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},qe.prototype.getNodes=function(){return this._nodes.values()},qe.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(t.equals(i[0])&&e.equals(i[1]))return r}return null},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()};var He=function(){this._geometryFactory=null,this._shellList=new xt;var t=arguments[0];this._geometryFactory=t};He.prototype.sortShellsAndHoles=function(t,e,n){for(var r=t.iterator();r.hasNext();){var i=r.next();i.isHole()?n.add(i):e.add(i)}},He.prototype.computePolygons=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next().toPolygon(this._geometryFactory);e.add(r)}return e},He.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(null===r.getShell()){var i=this.findEdgeRingContaining(r,t);if(null===i)throw new Ce("unable to assign hole to a shell",r.getCoordinate(0));r.setShell(i)}}},He.prototype.buildMinimalEdgeRings=function(t,e,n){for(var r=new xt,i=t.iterator();i.hasNext();){var o=i.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),e.add(s)):n.addAll(a)}else r.add(o)}return r},He.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},He.prototype.buildMaximalEdgeRings=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new Re(r,this._geometryFactory);e.add(i),i.setInResult()}}return e},He.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},He.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},He.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,a=null,s=e.iterator();s.hasNext();){var u=s.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;c.contains(r)&&st.isPointInRing(i,l.getCoordinates())&&(f=!0),f&&(null===o||a.contains(c))&&(o=u)}return o},He.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},He.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];qe.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new xt,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var We=function(){};We.prototype.getBounds=function(){},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Xe=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Xe.prototype.getItem=function(){return this._item},Xe.prototype.getBounds=function(){return this._bounds},Xe.prototype.interfaces_=function(){return[We,e]},Xe.prototype.getClass=function(){return Xe};var Ye=function(){this._size=null,this._items=null,this._size=0,this._items=new xt,this._items.add(null)};Ye.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Ye.prototype.size=function(){return this._size},Ye.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},Ye.prototype.clear=function(){this._size=0,this._items.clear()},Ye.prototype.isEmpty=function(){return 0===this._size},Ye.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var Ze=function(){};Ze.prototype.visitItem=function(t){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var Ke=function(){};Ke.prototype.insert=function(t,e){},Ke.prototype.remove=function(t,e){},Ke.prototype.query=function(){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var $e=function(){if(this._childBoundables=new xt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Je={serialVersionUID:{configurable:!0}};$e.prototype.getLevel=function(){return this._level},$e.prototype.size=function(){return this._childBoundables.size()},$e.prototype.getChildBoundables=function(){return this._childBoundables},$e.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},$e.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},$e.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},$e.prototype.interfaces_=function(){return[We,e]},$e.prototype.getClass=function(){return $e},Je.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties($e,Je);var Qe=function(){};Qe.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},Qe.min=function(t){return Qe.sort(t),t.get(0)},Qe.sort=function(t,e){var n=t.toArray();e?Dt.sort(n,e):Dt.sort(n);for(var r=t.iterator(),i=0,o=n.length;i<o;i++)r.next(),r.set(n[i])},Qe.singletonList=function(t){var e=new xt;return e.add(t),e};var tn=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};tn.prototype.expandToQueue=function(t,e){var n=tn.isComposite(this._boundable1),r=tn.isComposite(this._boundable2);if(n&&r)return tn.area(this._boundable1)>tn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new v("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tn.prototype.expand=function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new tn(o,e,this._itemDistance);a.getDistance()<r&&n.add(a)}},tn.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tn.prototype.getDistance=function(){return this._distance},tn.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tn.prototype.interfaces_=function(){return[A]},tn.prototype.getClass=function(){return tn},tn.area=function(t){return t.getBounds().getArea()},tn.isComposite=function(t){return t instanceof $e};var en=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new xt,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];et.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof $e?t+=this.size(n):n instanceof Xe&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Xe&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new xt:t}if(1===arguments.length){for(var e=arguments[0],n=new xt,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof $e){var o=this.itemsTree(i);null!==o&&n.add(o)}else i instanceof Xe?n.add(i.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Xe(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new xt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(et.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var a=o.next();a instanceof $e?this.boundablesAtLevel(n,a,i):(et.isTrue(a instanceof Xe),-1===n&&i.add(a))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new xt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r)}else if(3===arguments.length)if(k(arguments[2],Ze)&&arguments[0]instanceof Object&&arguments[1]instanceof $e)for(var i=arguments[0],o=arguments[2],a=arguments[1].getChildBoundables(),s=0;s<a.size();s++){var u=a.get(s);this.getIntersectsOp().intersects(u.getBounds(),i)&&(u instanceof $e?this.query(i,u,o):u instanceof Xe?o.visitItem(u.getItem()):et.shouldNeverReachHere())}else if(k(arguments[2],wt)&&arguments[0]instanceof Object&&arguments[1]instanceof $e)for(var l=arguments[0],c=arguments[2],f=arguments[1].getChildBoundables(),h=0;h<f.size();h++){var p=f.get(h);this.getIntersectsOp().intersects(p.getBounds(),l)&&(p instanceof $e?this.query(l,p,c):p instanceof Xe?c.add(p.getItem()):et.shouldNeverReachHere())}},en.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},en.prototype.getRoot=function(){return this.build(),this._root},en.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=this.removeItem(r,i);if(o)return!0;for(var a=null,s=r.getChildBoundables().iterator();s.hasNext();){var u=s.next();if(this.getIntersectsOp().intersects(u.getBounds(),n)&&u instanceof $e&&(o=this.remove(n,u,i))){a=u;break}}return null!==a&&a.getChildBoundables().isEmpty()&&r.getChildBoundables().remove(a),o}},en.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},en.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof $e){var r=this.depth(n);r>t&&(t=r)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new xt;n.add(this.createNode(e));var r=new xt(t);Qe.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var o=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(en,nn);var rn=function(){},on=function(){};on.prototype.distance=function(t,e){},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on};var an=function(t){function n(e){e=e||n.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n;var r={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var n=new xt,r=0;r<t.length;r++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[r],e));return n},n.prototype.createNode=function(t){return new sn(t)},n.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),r=new Array(e).fill(null),i=t.iterator(),o=0;o<e;o++){r[o]=new xt;for(var a=0;i.hasNext()&&a<n;){var s=i.next();r[o].add(s),a++}}return r},n.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];t.prototype.query.call(this,n,r)}else if(3===arguments.length)if(k(arguments[2],Ze)&&arguments[0]instanceof Object&&arguments[1]instanceof $e){var i=arguments[0],o=arguments[1],a=arguments[2];t.prototype.query.call(this,i,o,a)}else if(k(arguments[2],wt)&&arguments[0]instanceof Object&&arguments[1]instanceof $e){var s=arguments[0],u=arguments[1],l=arguments[2];t.prototype.query.call(this,s,u,l)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},n.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var r=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),i=new xt(t);Qe.sort(i,n.xComparator);var o=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(r))));return this.createParentBoundablesFromVerticalSlices(o,e)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(k(arguments[0],on)){var t=arguments[0],e=new tn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tn){var r=arguments[0];return this.nearestNeighbour(r,b.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&k(arguments[1],on)){var i=arguments[0],o=arguments[1],a=new tn(this.getRoot(),i.getRoot(),o);return this.nearestNeighbour(a)}if(arguments[0]instanceof tn&&"number"==typeof arguments[1]){var s=arguments[0],u=arguments[1],l=null,c=new Ye;for(c.add(s);!c.isEmpty()&&u>0;){var f=c.poll(),h=f.getDistance();if(h>=u)break;f.isLeaves()?(u=h,l=f):f.expandToQueue(c,u)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var p=arguments[2],d=new Xe(arguments[0],arguments[1]),m=new tn(this.getRoot(),d,p);return this.nearestNeighbour(m)[0]}},n.prototype.interfaces_=function(){return[Ke,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},r.STRtreeNode.get=function(){return sn},r.serialVersionUID.get=function(){return 0x39920f7d5f261e0},r.xComparator.get=function(){return{interfaces_:function(){return[x]},compare:function(e,r){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(r.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[x]},compare:function(e,r){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(r.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,r),n}(en),sn=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new W(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($e),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(t,e){return t<e?-1:t>e?1:0},un.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=un.relativeSign(e.x,n.x),i=un.relativeSign(e.y,n.y);switch(t){case 0:return un.compareValue(r,i);case 1:return un.compareValue(i,r);case 2:return un.compareValue(i,-r);case 3:return un.compareValue(-r,i);case 4:return un.compareValue(-r,-i);case 5:return un.compareValue(-i,-r);case 6:return un.compareValue(-i,r);case 7:return un.compareValue(r,-i)}return et.shouldNeverReachHere("invalid octant value"),0},un.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ln=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new E(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};ln.prototype.getCoordinate=function(){return this.coord},ln.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ln.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:un.compare(this._segmentOctant,this.coord,e.coord)},ln.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ln.prototype.isInterior=function(){return this._isInterior},ln.prototype.interfaces_=function(){return[A]},ln.prototype.getClass=function(){return ln};var cn=function(){this._nodeMap=new f,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new Ot;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new xt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),r=this._edge.getCoordinate(e+2);n.equals2D(r)&&t.add(new M(e+1))}},cn.prototype.addEdgeCoordinates=function(t,e,n){var r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);n.add(new E(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));i&&n.add(new E(e.coord))},cn.prototype.iterator=function(){return this._nodeMap.values().iterator()},cn.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},cn.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var r=e.segmentIndex-t.segmentIndex;return e.isInterior()||r--,1===r&&(n[0]=t.segmentIndex+1,!0)},cn.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();this.findCollapseIndex(r,i,e)&&t.add(new M(e[0])),r=i}},cn.prototype.getEdge=function(){return this._edge},cn.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},cn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new E(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this._edge.getCoordinate(s);return i&&(o[a]=new E(e.coord)),new dn(o,this._edge.getData())},cn.prototype.add=function(t,e){var n=new ln(this._edge,t,e,this._edge.getSegmentOctant(e)),r=this._nodeMap.get(n);return null!==r?(et.isTrue(r.coord.equals2D(t),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(n,n),n)},cn.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new Q("bad split edge start point at "+n);var r=t.get(t.size()-1).getCoordinates(),i=r[r.length-1];if(!i.equals2D(e[e.length-1]))throw new Q("bad split edge end point at "+i)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var fn=function(){};fn.prototype.interfaces_=function(){return[]},fn.prototype.getClass=function(){return fn},fn.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new v("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),r=Math.abs(e);return t>=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof E&&arguments[1]instanceof E){var i=arguments[0],o=arguments[1],a=o.x-i.x,s=o.y-i.y;if(0===a&&0===s)throw new v("Cannot compute the octant for two identical points "+i);return fn.octant(a,s)}};var hn=function(){};hn.prototype.getCoordinates=function(){},hn.prototype.size=function(){},hn.prototype.getCoordinate=function(t){},hn.prototype.isClosed=function(){},hn.prototype.setData=function(t){},hn.prototype.getData=function(){},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn};var pn=function(){};pn.prototype.addIntersection=function(t,e){},pn.prototype.interfaces_=function(){return[hn]},pn.prototype.getClass=function(){return pn};var dn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};dn.prototype.getCoordinates=function(){return this._pts},dn.prototype.size=function(){return this._pts.length},dn.prototype.getCoordinate=function(t){return this._pts[t]},dn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},dn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},dn.prototype.setData=function(t){this._data=t},dn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:fn.octant(t,e)},dn.prototype.getData=function(){return this._data},dn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[1],r=arguments[3],i=new E(arguments[0].getIntersection(r));this.addIntersection(i,n)}},dn.prototype.toString=function(){return J.toLineString(new ue(this._pts))},dn.prototype.getNodeList=function(){return this._nodeList},dn.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r<this._pts.length){var i=this._pts[r];t.equals2D(i)&&(n=r)}return this._nodeList.add(t,n)},dn.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},dn.prototype.interfaces_=function(){return[pn]},dn.prototype.getClass=function(){return dn},dn.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new xt;return dn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[1],r=arguments[0].iterator();r.hasNext();)r.next().getNodeList().addSplitEdges(n)};var mn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new E,this.p1=new E;else if(1===arguments.length){var t=arguments[0];this.p0=new E(t.p0),this.p1=new E(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this.p0=new E(e,n),this.p1=new E(r,i)}},gn={serialVersionUID:{configurable:!0}};mn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},mn.prototype.orientationIndex=function(){if(arguments[0]instanceof mn){var t=arguments[0],e=st.orientationIndex(this.p0,this.p1,t.p0),n=st.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof E){var r=arguments[0];return st.orientationIndex(this.p0,this.p1,r)}},mn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},mn.prototype.isVertical=function(){return this.p0.x===this.p1.x},mn.prototype.equals=function(t){if(!(t instanceof mn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},mn.prototype.intersection=function(t){var e=new it;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},mn.prototype.project=function(){if(arguments[0]instanceof E){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new E(t);var e=this.projectionFactor(t),n=new E;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof mn){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(r.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(r.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new mn(a,s)}},mn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},mn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},mn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},mn.prototype.distancePerpendicular=function(t){return st.distancePointLinePerpendicular(t,this.p0,this.p1)},mn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},mn.prototype.midPoint=function(){return mn.midPoint(this.p0,this.p1)},mn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;return r<=0?b.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r},mn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=b.MAX_VALUE,i=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var a=this.closestPoint(t.p1);(i=a.distance(t.p1))<r&&(r=i,n[0]=a,n[1]=t.p1);var s=t.closestPoint(this.p0);(i=s.distance(this.p0))<r&&(r=i,n[0]=this.p0,n[1]=s);var u=t.closestPoint(this.p1);return(i=u.distance(this.p1))<r&&(r=i,n[0]=this.p1,n[1]=u),n},mn.prototype.closestPoint=function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},mn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},mn.prototype.getLength=function(){return this.p0.distance(this.p1)},mn.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},mn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},mn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},mn.prototype.lineIntersection=function(t){try{return H.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof V))throw t}return null},mn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},mn.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),r=this.p0.y+t*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(i*i+o*o),s=0,u=0;if(0!==e){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");s=e*i/a,u=e*o/a}return new E(n-u,r+s)},mn.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},mn.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||b.isNaN(e))&&(e=1),e},mn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},mn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},mn.prototype.distance=function(){if(arguments[0]instanceof mn){var t=arguments[0];return st.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof E){var e=arguments[0];return st.distancePointLine(e,this.p0,this.p1)}},mn.prototype.pointAlong=function(t){var e=new E;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},mn.prototype.hashCode=function(){var t=b.doubleToLongBits(this.p0.x);t^=31*b.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=b.doubleToLongBits(this.p1.x);return n^=31*b.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},mn.prototype.interfaces_=function(){return[A,e]},mn.prototype.getClass=function(){return mn},mn.midPoint=function(t,e){return new E((t.x+e.x)/2,(t.y+e.y)/2)},gn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(mn,gn);var yn=function(){this.tempEnv1=new W,this.tempEnv2=new W,this._overlapSeg1=new mn,this._overlapSeg2=new mn};yn.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[3];arguments[0].getLineSegment(t,this._overlapSeg1),e.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},yn.prototype.interfaces_=function(){return[]},yn.prototype.getClass=function(){return yn};var vn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};vn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},vn.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var a=Math.trunc((e+n)/2);e<a&&this.computeSelect(t,e,a,r),a<n&&this.computeSelect(t,a,n,r)},vn.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},vn.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},vn.prototype.setId=function(t){this._id=t},vn.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},vn.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new W(t,e)}return this._env},vn.prototype.getEndIndex=function(){return this._end},vn.prototype.getStartIndex=function(){return this._start},vn.prototype.getContext=function(){return this._context},vn.prototype.getId=function(){return this._id},vn.prototype.computeOverlapsInternal=function(t,e,n,r,i,o){var a=this._pts[t],s=this._pts[e],u=n._pts[r],l=n._pts[i];if(e-t==1&&i-r==1)return o.overlap(this,t,n,r),null;if(o.tempEnv1.init(a,s),o.tempEnv2.init(u,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),f=Math.trunc((r+i)/2);t<c&&(r<f&&this.computeOverlapsInternal(t,c,n,r,f,o),f<i&&this.computeOverlapsInternal(t,c,n,f,i,o)),c<e&&(r<f&&this.computeOverlapsInternal(c,e,n,r,f,o),f<i&&this.computeOverlapsInternal(c,e,n,f,i,o))},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var bn=function(){};bn.prototype.interfaces_=function(){return[]},bn.prototype.getClass=function(){return bn},bn.getChainStartIndices=function(t){var e=0,n=new xt;n.add(new M(e));do{var r=bn.findChainEnd(t,e);n.add(new M(r)),e=r}while(e<t.length-1);return bn.toIntArray(n)},bn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var r=Be.quadrant(t[n],t[n+1]),i=e+1;i<t.length&&(t[i-1].equals2D(t[i])||Be.quadrant(t[i-1],t[i])===r);)i++;return i-1},bn.getChains=function(){if(1===arguments.length){var t=arguments[0];return bn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],r=new xt,i=bn.getChainStartIndices(e),o=0;o<i.length-1;o++){var a=new vn(e,i[o],i[o+1],n);r.add(a)}return r}},bn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var _n=function(){};_n.prototype.computeNodes=function(t){},_n.prototype.getNodedSubstrings=function(){},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var An=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};An.prototype.setSegmentIntersector=function(t){this._segInt=t},An.prototype.interfaces_=function(){return[_n]},An.prototype.getClass=function(){return An};var wn=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new xt,this._index=new an,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return dn.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=bn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new xn(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),r=this._index.query(n.getEnvelope()).iterator();r.hasNext();){var i=r.next();if(i.getId()>n.getId()&&(n.computeOverlaps(i,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return xn},Object.defineProperties(e,n),e}(An),xn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[1],n=arguments[2],r=arguments[3],i=arguments[0].getContext(),o=n.getContext();this._si.processIntersections(i,e,o,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(yn),En=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}},On={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};En.prototype.getEndCapStyle=function(){return this._endCapStyle},En.prototype.isSingleSided=function(){return this._isSingleSided},En.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=En.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=En.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==En.JOIN_ROUND&&(this._quadrantSegments=En.DEFAULT_QUADRANT_SEGMENTS)},En.prototype.getJoinStyle=function(){return this._joinStyle},En.prototype.setJoinStyle=function(t){this._joinStyle=t},En.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},En.prototype.getSimplifyFactor=function(){return this._simplifyFactor},En.prototype.getQuadrantSegments=function(){return this._quadrantSegments},En.prototype.setEndCapStyle=function(t){this._endCapStyle=t},En.prototype.getMitreLimit=function(){return this._mitreLimit},En.prototype.setMitreLimit=function(t){this._mitreLimit=t},En.prototype.setSingleSided=function(t){this._isSingleSided=t},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},En.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},On.CAP_ROUND.get=function(){return 1},On.CAP_FLAT.get=function(){return 2},On.CAP_SQUARE.get=function(){return 3},On.JOIN_ROUND.get=function(){return 1},On.JOIN_MITRE.get=function(){return 2},On.JOIN_BEVEL.get=function(){return 3},On.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},On.DEFAULT_MITRE_LIMIT.get=function(){return 5},On.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(En,On);var Sn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=st.COUNTERCLOCKWISE,this._inputLine=t||null},Pn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Sn.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!!this.isConcave(i,o,a)&&!!this.isShallow(i,o,a,r)&&this.isShallowSampled(i,o,t,n,r)},Sn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),r=!1;n<this._inputLine.length;){var i=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=Sn.DELETE,i=!0,r=!0),t=i?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return r},Sn.prototype.isShallowConcavity=function(t,e,n,r){return st.computeOrientation(t,e,n)===this._angleOrientation&&st.distancePointLine(e,t,n)<r},Sn.prototype.isShallowSampled=function(t,e,n,r,i){var o=Math.trunc((r-n)/Sn.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var a=n;a<r;a+=o)if(!this.isShallow(t,e,this._inputLine[a],i))return!1;return!0},Sn.prototype.isConcave=function(t,e,n){return st.computeOrientation(t,e,n)===this._angleOrientation},Sn.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=st.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},Sn.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Sn.DELETE;)e++;return e},Sn.prototype.isShallow=function(t,e,n,r){return st.distancePointLine(e,t,n)<r},Sn.prototype.collapseLine=function(){for(var t=new Ot,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Sn.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},Sn.prototype.interfaces_=function(){return[]},Sn.prototype.getClass=function(){return Sn},Sn.simplify=function(t,e){return new Sn(t).simplify(e)},Pn.INIT.get=function(){return 0},Pn.DELETE.get=function(){return 1},Pn.KEEP.get=function(){return 1},Pn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Sn,Pn);var Cn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new xt},Tn={COORDINATE_ARRAY_TYPE:{configurable:!0}};Cn.prototype.getCoordinates=function(){return this._ptList.toArray(Cn.COORDINATE_ARRAY_TYPE)},Cn.prototype.setPrecisionModel=function(t){this._precisionModel=t},Cn.prototype.addPt=function(t){var e=new E(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Cn.prototype.revere=function(){},Cn.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var r=t.length-1;r>=0;r--)this.addPt(t[r])},Cn.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},Cn.prototype.toString=function(){return(new ye).createLineString(this.getCoordinates()).toString()},Cn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new E(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Cn.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Tn.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Cn,Tn);var kn=function(){},In={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn},kn.toDegrees=function(t){return 180*t/Math.PI},kn.normalize=function(t){for(;t>Math.PI;)t-=kn.PI_TIMES_2;for(;t<=-Math.PI;)t+=kn.PI_TIMES_2;return t},kn.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},kn.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0},kn.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0},kn.interiorAngle=function(t,e,n){var r=kn.angle(e,t),i=kn.angle(e,n);return Math.abs(i-r)},kn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=kn.PI_TIMES_2;t>=kn.PI_TIMES_2&&(t=0)}else{for(;t>=kn.PI_TIMES_2;)t-=kn.PI_TIMES_2;t<0&&(t=0)}return t},kn.angleBetween=function(t,e,n){var r=kn.angle(e,t),i=kn.angle(e,n);return kn.diff(r,i)},kn.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},kn.toRadians=function(t){return t*Math.PI/180},kn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?kn.COUNTERCLOCKWISE:n<0?kn.CLOCKWISE:kn.NONE},kn.angleBetweenOriented=function(t,e,n){var r=kn.angle(e,t),i=kn.angle(e,n)-r;return i<=-Math.PI?i+kn.PI_TIMES_2:i>Math.PI?i-kn.PI_TIMES_2:i},In.PI_TIMES_2.get=function(){return 2*Math.PI},In.PI_OVER_2.get=function(){return Math.PI/2},In.PI_OVER_4.get=function(){return Math.PI/4},In.COUNTERCLOCKWISE.get=function(){return st.COUNTERCLOCKWISE},In.CLOCKWISE.get=function(){return st.CLOCKWISE},In.NONE.get=function(){return st.COLLINEAR},Object.defineProperties(kn,In);var Ln=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new mn,this._seg1=new mn,this._offset0=new mn,this._offset1=new mn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new it,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===En.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},jn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Ln.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=st.computeOrientation(this._s0,this._s1,this._s2),r=n===st.CLOCKWISE&&this._side===Oe.LEFT||n===st.COUNTERCLOCKWISE&&this._side===Oe.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Ln.prototype.addLineEndCap=function(t,e){var n=new mn(t,e),r=new mn;this.computeOffsetSegment(n,Oe.LEFT,this._distance,r);var i=new mn;this.computeOffsetSegment(n,Oe.RIGHT,this._distance,i);var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,s+Math.PI/2,s-Math.PI/2,st.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case En.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case En.CAP_SQUARE:var u=new E;u.x=Math.abs(this._distance)*Math.cos(s),u.y=Math.abs(this._distance)*Math.sin(s);var l=new E(r.p1.x+u.x,r.p1.y+u.y),c=new E(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Ln.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Ln.prototype.addMitreJoin=function(t,e,n,r){var i=!0,o=null;try{o=H.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof V))throw t;o=new E(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},Ln.prototype.addFilletCorner=function(t,e,n,r,i){var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);r===st.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,s,c,r,i),this._segList.addPt(n)},Ln.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Ln.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===En.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===En.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Ln.prototype.createSquare=function(t){this._segList.addPt(new E(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new E(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Ln.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Ln.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Ln.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Ln.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Ln.prototype.addLimitedMitreJoin=function(t,e,n,r){var i=this._seg0.p1,o=kn.angle(i,this._seg0.p0),a=kn.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,s=kn.normalize(o+a),u=kn.normalize(s+Math.PI),l=r*n,c=n-l*Math.abs(Math.sin(a)),f=i.x+l*Math.cos(u),h=i.y+l*Math.sin(u),p=new E(f,h),d=new mn(i,p),m=d.pointAlongOffset(1,c),g=d.pointAlongOffset(1,-c);this._side===Oe.LEFT?(this._segList.addPt(m),this._segList.addPt(g)):(this._segList.addPt(g),this._segList.addPt(m))},Ln.prototype.computeOffsetSegment=function(t,e,n,r){var i=e===Oe.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,s=Math.sqrt(o*o+a*a),u=i*n*o/s,l=i*n*a/s;r.p0.x=t.p0.x-l,r.p0.y=t.p0.y+u,r.p1.x=t.p1.x-l,r.p1.y=t.p1.y+u},Ln.prototype.addFilletArc=function(t,e,n,r,i){var o=r===st.CLOCKWISE?-1:1,a=Math.abs(e-n),s=Math.trunc(a/this._filletAngleQuantum+.5);if(s<1)return null;for(var u=a/s,l=0,c=new E;l<a;){var f=e+o*l;c.x=t.x+i*Math.cos(f),c.y=t.y+i*Math.sin(f),this._segList.addPt(c),l+=u}},Ln.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Ln.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new E((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new E((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Ln.prototype.createCircle=function(t){var e=new E(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Ln.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Ln.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Cn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Ln.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Ln.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===En.JOIN_BEVEL||this._bufParams.getJoinStyle()===En.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,st.CLOCKWISE,this._distance))},Ln.prototype.closeRing=function(){this._segList.closeRing()},Ln.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln},jn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},jn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},jn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},jn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Ln,jn);var Mn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Mn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&St.reverse(o),o},Mn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Sn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Oe.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{n.addSegments(t,!1);var s=Sn.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Oe.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(s[l],!0)}n.addLastSegment(),n.closeRing()},Mn.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Oe.RIGHT&&(r=-r);var i=Sn.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var a=1;a<=o;a++){var s=1!==a;n.addNextSegment(i[a],s)}n.closeRing()},Mn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Sn.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Oe.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var a=Sn.simplify(t,-n),s=a.length-1;e.initSideSegments(a[s],a[s-1],Oe.LEFT);for(var u=s-2;u>=0;u--)e.addNextSegment(a[u],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Mn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:e.createCircle(t);break;case En.CAP_SQUARE:e.createSquare(t)}},Mn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()},Mn.prototype.getBufferParameters=function(){return this._bufParams},Mn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Mn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Mn.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},Mn.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Sn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Oe.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{var s=Sn.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Oe.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(s[l],!0)}n.addLastSegment()},Mn.prototype.getSegGen=function(t){return new Ln(this._precisionModel,this._bufParams,t)},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Mn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new E(t[n]);return e};var Rn=function(){this._subgraphs=null,this._seg=new mn,this._cga=new st;var t=arguments[0];this._subgraphs=t},Nn={DepthSegment:{configurable:!0}};Rn.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new xt,n=this._subgraphs.iterator();n.hasNext();){var r=n.next(),i=r.getEnvelope();t.y<i.getMinY()||t.y>i.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(3===arguments.length)if(k(arguments[2],wt)&&arguments[0]instanceof E&&arguments[1]instanceof Ge){for(var o=arguments[0],a=arguments[1],s=arguments[2],u=a.getEdge().getCoordinates(),l=0;l<u.length-1;l++)if(this._seg.p0=u[l],this._seg.p1=u[l+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x)&&!(this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||st.computeOrientation(this._seg.p0,this._seg.p1,o)===st.RIGHT)){var c=a.getDepth(Oe.LEFT);this._seg.p0.equals(u[l])||(c=a.getDepth(Oe.RIGHT));var f=new Dn(this._seg,c);s.add(f)}}else if(k(arguments[2],wt)&&arguments[0]instanceof E&&k(arguments[1],wt))for(var h=arguments[0],p=arguments[2],d=arguments[1].iterator();d.hasNext();){var m=d.next();m.isForward()&&this.findStabbedSegments(h,m,p)}},Rn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:Qe.min(e)._leftDepth},Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn},Nn.DepthSegment.get=function(){return Dn},Object.defineProperties(Rn,Nn);var Dn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new mn(t),this._leftDepth=e};Dn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Dn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Dn.prototype.toString=function(){return this._upwardSeg.toString()},Dn.prototype.interfaces_=function(){return[A]},Dn.prototype.getClass=function(){return Dn};var Fn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Fn.prototype.area=function(){return Fn.area(this.p0,this.p1,this.p2)},Fn.prototype.signedArea=function(){return Fn.signedArea(this.p0,this.p1,this.p2)},Fn.prototype.interpolateZ=function(t){if(null===t)throw new v("Supplied point is null.");return Fn.interpolateZ(t,this.p0,this.p1,this.p2)},Fn.prototype.longestSideLength=function(){return Fn.longestSideLength(this.p0,this.p1,this.p2)},Fn.prototype.isAcute=function(){return Fn.isAcute(this.p0,this.p1,this.p2)},Fn.prototype.circumcentre=function(){return Fn.circumcentre(this.p0,this.p1,this.p2)},Fn.prototype.area3D=function(){return Fn.area3D(this.p0,this.p1,this.p2)},Fn.prototype.centroid=function(){return Fn.centroid(this.p0,this.p1,this.p2)},Fn.prototype.inCentre=function(){return Fn.inCentre(this.p0,this.p1,this.p2)},Fn.prototype.interfaces_=function(){return[]},Fn.prototype.getClass=function(){return Fn},Fn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Fn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Fn.det=function(t,e,n,r){return t*r-e*n},Fn.interpolateZ=function(t,e,n,r){var i=e.x,o=e.y,a=n.x-i,s=r.x-i,u=n.y-o,l=r.y-o,c=a*l-s*u,f=t.x-i,h=t.y-o,p=(l*f-s*h)/c,d=(-u*f+a*h)/c;return e.z+p*(n.z-e.z)+d*(r.z-e.z)},Fn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),a=r;return i>a&&(a=i),o>a&&(a=o),a},Fn.isAcute=function(t,e,n){return!!kn.isAcute(t,e,n)&&!!kn.isAcute(e,n,t)&&!!kn.isAcute(n,t,e)},Fn.circumcentre=function(t,e,n){var r=n.x,i=n.y,o=t.x-r,a=t.y-i,s=e.x-r,u=e.y-i,l=2*Fn.det(o,a,s,u),c=Fn.det(a,o*o+a*a,u,s*s+u*u),f=Fn.det(o,o*o+a*a,s,s*s+u*u);return new E(r-c/l,i+f/l)},Fn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new H(t.x+n/2,t.y+r/2,1),o=new H(t.x-r+n/2,t.y+n+r/2,1);return new H(i,o)},Fn.angleBisector=function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,a=n.y-t.y;return new E(t.x+i*o,t.y+i*a)},Fn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,a=n.x-t.x,s=n.y-t.y,u=n.z-t.z,l=i*u-o*s,c=o*a-r*u,f=r*s-i*a,h=l*l+c*c+f*f;return Math.sqrt(h)/2},Fn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new E(r,i)},Fn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),a=r+i+o,s=(r*t.x+i*e.x+o*n.x)/a,u=(r*t.y+i*e.y+o*n.y)/a;return new E(s,u)};var Bn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new xt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Bn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,C.EXTERIOR,C.INTERIOR)},Bn.prototype.addPolygon=function(t){var e=this._distance,n=Oe.LEFT;this._distance<0&&(e=-this._distance,n=Oe.RIGHT);var r=t.getExteriorRing(),i=St.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,e,n,C.EXTERIOR,C.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var a=t.getInteriorRingN(o),s=St.removeRepeatedPoints(a.getCoordinates());this._distance>0&&this.isErodedCompletely(a,-this._distance)||this.addPolygonRing(s,e,Oe.opposite(n),C.INTERIOR,C.EXTERIOR)}},Bn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Fn(t[0],t[1],t[2]),r=n.inCentre();return st.distancePointLine(r,n.p0,n.p1)<Math.abs(e)},Bn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=St.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,C.EXTERIOR,C.INTERIOR)},Bn.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var r=new dn(t,new Le(0,C.BOUNDARY,e,n));this._curveList.add(r)},Bn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Bn.prototype.addPolygonRing=function(t,e,n,r,i){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var o=r,a=i;t.length>=ee.MINIMUM_VALID_SIZE&&st.isCCW(t)&&(o=i,a=r,n=Oe.opposite(n));var s=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(s,o,a)},Bn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Qt?this.addPolygon(t):t instanceof Zt?this.addLineString(t):t instanceof $t?this.addPoint(t):(t instanceof te||t instanceof Vt||t instanceof ne||t instanceof Gt)&&this.addCollection(t)},Bn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},Bn.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn};var zn=function(){};zn.prototype.locate=function(t){},zn.prototype.interfaces_=function(){return[]},zn.prototype.getClass=function(){return zn};var Un=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Un.prototype.next=function(){if(this._atStart)return this._atStart=!1,Un.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new r;var t=this._parent.getGeometryN(this._index++);return t instanceof Gt?(this._subcollectionIterator=new Un(t),this._subcollectionIterator.next()):t},Un.prototype.remove=function(){throw new Error(this.getClass().getName())},Un.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Un.prototype.interfaces_=function(){return[At]},Un.prototype.getClass=function(){return Un},Un.isAtomic=function(t){return!(t instanceof Gt)};var Gn=function(){this._geom=null;var t=arguments[0];this._geom=t};Gn.prototype.locate=function(t){return Gn.locate(t,this._geom)},Gn.prototype.interfaces_=function(){return[zn]},Gn.prototype.getClass=function(){return Gn},Gn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&st.isPointInRing(t,e.getCoordinates())},Gn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Gn.isPointInRing(t,n))return!1;for(var r=0;r<e.getNumInteriorRing();r++){var i=e.getInteriorRingN(r);if(Gn.isPointInRing(t,i))return!1}return!0},Gn.containsPoint=function(t,e){if(e instanceof Qt)return Gn.containsPointInPolygon(t,e);if(e instanceof Gt)for(var n=new Un(e);n.hasNext();){var r=n.next();if(r!==e&&Gn.containsPoint(t,r))return!0}return!1},Gn.locate=function(t,e){return e.isEmpty()?C.EXTERIOR:Gn.containsPoint(t,e)?C.INTERIOR:C.EXTERIOR};var Vn=function(){this._edgeMap=new f,this._edgeList=null,this._ptInAreaLocation=[C.NONE,C.NONE]};Vn.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Vn.prototype.propagateSideLabels=function(t){for(var e=C.NONE,n=this.iterator();n.hasNext();){var r=n.next().getLabel();r.isArea(t)&&r.getLocation(t,Oe.LEFT)!==C.NONE&&(e=r.getLocation(t,Oe.LEFT))}if(e===C.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getLabel();if(s.getLocation(t,Oe.ON)===C.NONE&&s.setLocation(t,Oe.ON,i),s.isArea(t)){var u=s.getLocation(t,Oe.LEFT),l=s.getLocation(t,Oe.RIGHT);if(l!==C.NONE){if(l!==i)throw new Ce("side location conflict",a.getCoordinate());u===C.NONE&&et.shouldNeverReachHere("found single null side (at "+a.getCoordinate()+")"),i=u}else et.isTrue(s.getLocation(t,Oe.LEFT)===C.NONE,"found single null side"),s.setLocation(t,Oe.RIGHT,i),s.setLocation(t,Oe.LEFT,i)}}},Vn.prototype.getCoordinate=function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},Vn.prototype.print=function(t){q.out.println("EdgeEndStar:   "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)},Vn.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Vn.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,r=e.get(n).getLabel().getLocation(t,Oe.LEFT);et.isTrue(r!==C.NONE,"Found unlabelled area edge");for(var i=r,o=this.iterator();o.hasNext();){var a=o.next().getLabel();et.isTrue(a.isArea(t),"Found non-area edge");var s=a.getLocation(t,Oe.LEFT),u=a.getLocation(t,Oe.RIGHT);if(s===u)return!1;if(u!==i)return!1;i=s}return!0},Vn.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1},Vn.prototype.iterator=function(){return this.getEdges().iterator()},Vn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new xt(this._edgeMap.values())),this._edgeList},Vn.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===C.NONE&&(this._ptInAreaLocation[t]=Gn.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Vn.prototype.toString=function(){var t=new j;t.append("EdgeEndStar:   "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()},Vn.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)},Vn.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var r=n.next().getLabel(),i=0;i<2;i++)r.isLine(i)&&r.getLocation(i)===C.BOUNDARY&&(e[i]=!0);for(var o=this.iterator();o.hasNext();)for(var a=o.next(),s=a.getLabel(),u=0;u<2;u++)if(s.isAnyNull(u)){var l=C.NONE;if(e[u])l=C.EXTERIOR;else{var c=a.getCoordinate();l=this.getLocation(u,c,t)}s.setAllLocationsIfNull(u,l)}},Vn.prototype.getDegree=function(){return this._edgeMap.size()},Vn.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn};var qn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,r=0;r<this._resultAreaEdgeList.size();r++){var i=this._resultAreaEdgeList.get(r),o=i.getSym();if(i.getLabel().isArea())switch(null===t&&i.isInResult()&&(t=i),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!i.isInResult())continue;e.setNext(i),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new Ce("no outgoing dirEdge found",this.getCoordinate());et.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var r=t.get(e-1),i=n.getQuadrant(),o=r.getQuadrant();return Be.isNorthern(i)&&Be.isNorthern(o)?n:Be.isNorthern(i)||Be.isNorthern(o)?0!==n.getDy()?n:0!==r.getDy()?r:(et.shouldNeverReachHere("found two horizontal edges incident on node"),null):r},e.prototype.print=function(t){q.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new xt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Oe.LEFT),r=t.getDepth(Oe.RIGHT),i=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,i)!==r)throw new Ce("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[1],a=arguments[2],s=arguments[0];s<o;s++){var u=this._edgeList.get(s);u.setEdgeDepths(Oe.RIGHT,a),a=u.getDepth(Oe.LEFT)}return a}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,n=null,r=this._SCANNING_FOR_INCOMING,i=this._resultAreaEdgeList.size()-1;i>=0;i--){var o=this._resultAreaEdgeList.get(i),a=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),r){case this._SCANNING_FOR_INCOMING:if(a.getEdgeRing()!==t)continue;n=a,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=C.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=C.INTERIOR;break}if(r.isInResult()){t=C.EXTERIOR;break}}}if(t===C.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===C.INTERIOR):(a.isInResult()&&(i=C.EXTERIOR),s.isInResult()&&(i=C.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Le(C.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==C.INTERIOR&&o!==C.BOUNDARY||this._label.setLocation(i,C.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Vn),Hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new De(t,new qn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ve),Wn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Wn.prototype.compareTo=function(t){var e=t;return Wn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Wn.prototype.interfaces_=function(){return[A]},Wn.prototype.getClass=function(){return Wn},Wn.orientation=function(t){return 1===St.increasingDirection(t)},Wn.compareOriented=function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,a=e?t.length:-1,s=r?n.length:-1,u=e?0:t.length-1,l=r?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var f=(u+=i)===a,h=(l+=o)===s;if(f&&!h)return-1;if(!f&&h)return 1;if(f&&h)return 0}};var Xn=function(){this._edges=new xt,this._ocaMap=new f};Xn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i<r.length;i++)i>0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(")  ")},Xn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Xn.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},Xn.prototype.iterator=function(){return this._edges.iterator()},Xn.prototype.getEdges=function(){return this._edges},Xn.prototype.get=function(t){return this._edges.get(t)},Xn.prototype.findEqualEdge=function(t){var e=new Wn(t.getCoordinates());return this._ocaMap.get(e)},Xn.prototype.add=function(t){this._edges.add(t);var e=new Wn(t.getCoordinates());this._ocaMap.put(e,t)},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Yn=function(){};Yn.prototype.processIntersections=function(t,e,n,r){},Yn.prototype.isDone=function(){},Yn.prototype.interfaces_=function(){return[]},Yn.prototype.getClass=function(){return Yn};var Zn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Zn.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(Zn.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.size()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},Zn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Zn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Zn.prototype.getLineIntersector=function(){return this._li},Zn.prototype.hasProperIntersection=function(){return this._hasProper},Zn.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Zn.prototype.hasIntersection=function(){return this._hasIntersection},Zn.prototype.isDone=function(){return!1},Zn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Zn.prototype.interfaces_=function(){return[Yn]},Zn.prototype.getClass=function(){return Zn},Zn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var Kn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new E(t),this.segmentIndex=e,this.dist=n};Kn.prototype.getSegmentIndex=function(){return this.segmentIndex},Kn.prototype.getCoordinate=function(){return this.coord},Kn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Kn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Kn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},Kn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Kn.prototype.getDistance=function(){return this.dist},Kn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Kn.prototype.interfaces_=function(){return[A]},Kn.prototype.getClass=function(){return Kn};var $n=function(){this._nodeMap=new f,this.edge=null;var t=arguments[0];this.edge=t};$n.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},$n.prototype.iterator=function(){return this._nodeMap.values().iterator()},$n.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},$n.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},$n.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this.edge.pts[e.segmentIndex],i=e.dist>0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new E(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=e.coord),new nr(o,new Le(this.edge._label))},$n.prototype.add=function(t,e,n){var r=new Kn(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},$n.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var Jn=function(){};Jn.prototype.getChainStartIndices=function(t){var e=0,n=new xt;n.add(new M(e));do{var r=this.findChainEnd(t,e);n.add(new M(r)),e=r}while(e<t.length-1);return Jn.toIntArray(n)},Jn.prototype.findChainEnd=function(t,e){for(var n=Be.quadrant(t[e],t[e+1]),r=e+1;r<t.length&&Be.quadrant(t[r-1],t[r])===n;)r++;return r-1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn},Jn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Qn=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new W,this.env2=new W;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Jn;this.startIndex=e.getChainStartIndices(this.pts)};Qn.prototype.getCoordinates=function(){return this.pts},Qn.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},Qn.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},Qn.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],r)}else if(6===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],u=arguments[4],l=arguments[5],c=this.pts[i],f=this.pts[o],h=a.pts[s],p=a.pts[u];if(o-i==1&&u-s==1)return l.addIntersections(this.e,i,a.e,s),null;if(this.env1.init(c,f),this.env2.init(h,p),!this.env1.intersects(this.env2))return null;var d=Math.trunc((i+o)/2),m=Math.trunc((s+u)/2);i<d&&(s<m&&this.computeIntersectsForChain(i,d,a,s,m,l),m<u&&this.computeIntersectsForChain(i,d,a,m,u,l)),d<o&&(s<m&&this.computeIntersectsForChain(d,o,a,s,m,l),m<u&&this.computeIntersectsForChain(d,o,a,m,u,l))}},Qn.prototype.getStartIndexes=function(){return this.startIndex},Qn.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var r=0;r<t.startIndex.length-1;r++)this.computeIntersectsForChain(n,t,r,e)},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var tr=function t(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},er={NULL_VALUE:{configurable:!0}};tr.prototype.getDepth=function(t,e){return this._depth[t][e]},tr.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},tr.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==tr.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===tr.NULL_VALUE}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._depth[r][i]===tr.NULL_VALUE}},tr.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var r=0;this._depth[t][n]>e&&(r=1),this._depth[t][n]=r}}},tr.prototype.getDelta=function(t){return this._depth[t][Oe.RIGHT]-this._depth[t][Oe.LEFT]},tr.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?C.EXTERIOR:C.INTERIOR},tr.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},tr.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var r=t.getLocation(e,n);r!==C.EXTERIOR&&r!==C.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=tr.depthAtLocation(r):this._depth[e][n]+=tr.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],o=arguments[1];arguments[2]===C.INTERIOR&&this._depth[i][o]++}},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},tr.depthAtLocation=function(t){return t===C.EXTERIOR?0:t===C.INTERIOR?1:tr.NULL_VALUE},er.NULL_VALUE.get=function(){return-1},Object.defineProperties(tr,er);var nr=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new $n(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new tr,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Le.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,a=0;a<this.pts.length;a++)if(this.pts[a].equals2D(n.pts[a])||(r=!1),this.pts[a].equals2D(n.pts[--o])||(i=!1),!r&&!i)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(")  "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new Qn(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new W;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,r){var i=new E(t.getIntersection(r)),o=e,a=t.getEdgeDistance(n,r),s=o+1;if(s<this.pts.length){var u=this.pts[s];i.equals2D(u)&&(o=s,a=0)}this.eiList.add(i,o,a)},e.prototype.toString=function(){var t=new j;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(")  "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Oe.ON),e.getLocation(1,Oe.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Oe.LEFT),e.getLocation(1,Oe.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Oe.RIGHT),e.getLocation(1,Oe.RIGHT),2))},e}(Ne),rr=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Xn,this._bufParams=t||null};rr.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},rr.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Le(t.getLabel())).flip(),n.merge(r);var i=rr.depthDelta(r),o=e.getDepthDelta()+i;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(rr.depthDelta(t.getLabel()))},rr.prototype.buildSubgraphs=function(t,e){for(var n=new xt,r=t.iterator();r.hasNext();){var i=r.next(),o=i.getRightmostCoordinate(),a=new Rn(n).getDepth(o);i.computeDepth(a),i.findResultEdges(),n.add(i),e.add(i.getDirectedEdges(),i.getNodes())}},rr.prototype.createSubgraphs=function(t){for(var e=new xt,n=t.getNodes().iterator();n.hasNext();){var r=n.next();if(!r.isVisited()){var i=new ke;i.create(r),e.add(i)}}return Qe.sort(e,Qe.reverseOrder()),e},rr.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},rr.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new wn,n=new it;return n.setPrecisionModel(t),e.setSegmentIntersector(new Zn(n)),e},rr.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var r=new Mn(n,this._bufParams),i=new Bn(t,e,r).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new qe(new Hn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),a=new He(this._geomFact);this.buildSubgraphs(o,a);var s=a.getPolygons();return s.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(s)},rr.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var r=n.getNodedSubstrings().iterator();r.hasNext();){var i=r.next(),o=i.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var a=i.getData(),s=new nr(i.getCoordinates(),new Le(a));this.insertUniqueEdge(s)}}},rr.prototype.setNoder=function(t){this._workingNoder=t},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.depthDelta=function(t){var e=t.getLocation(0,Oe.LEFT),n=t.getLocation(0,Oe.RIGHT);return e===C.INTERIOR&&n===C.EXTERIOR?1:e===C.EXTERIOR&&n===C.INTERIOR?-1:0},rr.convertSegStrings=function(t){for(var e=new ye,n=new xt;t.hasNext();){var r=t.next(),i=e.createLineString(r.getCoordinates());n.add(i)}return e.buildGeometry(n)};var ir=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=r,this._offsetX=i,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ir.prototype.rescale=function(){if(k(arguments[0],_t))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],r=0;r<n.length;r++)n[r].x=n[r].x/this._scaleFactor+this._offsetX,n[r].y=n[r].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&q.out.println(n)}},ir.prototype.scale=function(){if(k(arguments[0],_t)){for(var t=arguments[0],e=new xt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new dn(this.scale(r.getCoordinates()),r.getData()))}return e}if(arguments[0]instanceof Array){for(var i=arguments[0],o=new Array(i.length).fill(null),a=0;a<i.length;a++)o[a]=new E(Math.round((i[a].x-this._offsetX)*this._scaleFactor),Math.round((i[a].y-this._offsetY)*this._scaleFactor),i[a].z);return St.removeRepeatedPoints(o)}},ir.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ir.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ir.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ir.prototype.interfaces_=function(){return[_n]},ir.prototype.getClass=function(){return ir};var or=function(){this._li=new it,this._segStrings=null;var t=arguments[0];this._segStrings=t},ar={fact:{configurable:!0}};or.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1].iterator();r.hasNext();)for(var i=r.next().getCoordinates(),o=1;o<i.length-1;o++)if(i[o].equals(n))throw new Q("found endpt/interior pt intersection at index "+o+" :pt "+n)},or.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var r=n.next();this.checkInteriorIntersections(e,r)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],a=i.getCoordinates(),s=o.getCoordinates(),u=0;u<a.length-1;u++)for(var l=0;l<s.length-1;l++)this.checkInteriorIntersections(i,u,o,l);else if(4===arguments.length){var c=arguments[0],f=arguments[1],h=arguments[2],p=arguments[3];if(c===h&&f===p)return null;var d=c.getCoordinates()[f],m=c.getCoordinates()[f+1],g=h.getCoordinates()[p],y=h.getCoordinates()[p+1];if(this._li.computeIntersection(d,m,g,y),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,d,m)||this.hasInteriorIntersection(this._li,g,y)))throw new Q("found non-noded intersection at "+d+"-"+m+" and "+g+"-"+y)}},or.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},or.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),r=0;r<n.length-2;r++)this.checkCollapse(n[r],n[r+1],n[r+2])},or.prototype.hasInteriorIntersection=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++){var i=t.getIntersection(r);if(!i.equals(e)&&!i.equals(n))return!0}return!1},or.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new Q("found non-noded collapse at "+or.fact.createLineString([t,e,n]))},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},ar.fact.get=function(){return new ye},Object.defineProperties(or,ar);var sr=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new v("Scale factor must be non-zero");1!==e&&(this._pt=new E(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new E,this._p1Scaled=new E),this.initCorners(this._pt)},ur={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};sr.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<n||this._minx>r||this._maxy<i||this._miny>o;if(a)return!1;var s=this.intersectsToleranceSquare(t,e);return et.isTrue(!(a&&s),"Found bad envelope test"),s},sr.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new E(this._maxx,this._maxy),this._corner[1]=new E(this._minx,this._maxy),this._corner[2]=new E(this._minx,this._miny),this._corner[3]=new E(this._maxx,this._miny)},sr.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},sr.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},sr.prototype.getCoordinate=function(){return this._originalPt},sr.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},sr.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=sr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new W(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},sr.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},sr.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!r)||!!t.equals(this._pt)||!!e.equals(this._pt))))},sr.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},ur.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(sr,ur);var lr=function(){this.tempEnv1=new W,this.selectedSegment=new mn};lr.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[1];arguments[0].getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr};var cr=function(){this._index=null;var t=arguments[0];this._index=t},fr={HotPixelSnapAction:{configurable:!0}};cr.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),o=new hr(e,n,r);return this._index.query(i,{interfaces_:function(){return[Ze]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},fr.HotPixelSnapAction.get=function(){return hr},Object.defineProperties(cr,fr);var hr=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[1],n=arguments[0].getContext();if(null!==this._parentEdge&&n===this._parentEdge&&e===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,e)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(lr),pr=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new xt};pr.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)}},pr.prototype.isDone=function(){return!1},pr.prototype.getInteriorIntersections=function(){return this._interiorIntersections},pr.prototype.interfaces_=function(){return[Yn]},pr.prototype.getClass=function(){return pr};var dr=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new it,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};dr.prototype.checkCorrectness=function(t){var e=dn.getNodedSubstrings(t),n=new or(e);try{n.checkValid()}catch(t){if(!(t instanceof G))throw t;t.printStackTrace()}},dr.prototype.getNodedSubstrings=function(){return dn.getNodedSubstrings(this._nodedSegStrings)},dr.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},dr.prototype.findInteriorIntersections=function(t,e){var n=new pr(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},dr.prototype.computeVertexSnaps=function(){if(k(arguments[0],_t))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof dn)for(var n=arguments[0],r=n.getCoordinates(),i=0;i<r.length;i++){var o=new sr(r[i],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,i)&&n.addIntersection(r[i],i)}},dr.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new wn,this._pointSnapper=new cr(this._noder.getIndex()),this.snapRound(t,this._li)},dr.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=new sr(n,this._scaleFactor,this._li);this._pointSnapper.snap(r)}},dr.prototype.interfaces_=function(){return[_n]},dr.prototype.getClass=function(){return dr};var mr=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new En,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},gr={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};mr.prototype.bufferFixedPrecision=function(t){var e=new ir(new dr(new pe(1)),t.getScale()),n=new rr(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},mr.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=mr.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Ce))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=mr.precisionScaleFactor(this._argGeom,this._distance,n),i=new pe(r);this.bufferFixedPrecision(i)}},mr.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===pe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},mr.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},mr.prototype.bufferOriginalPrecision=function(){try{var t=new rr(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof Q))throw t;this._saveException=t}},mr.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},mr.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr},mr.bufferOp=function(){if(2===arguments.length){var t=arguments[1];return new mr(arguments[0]).getResultGeometry(t)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var e=arguments[1],n=arguments[2],r=new mr(arguments[0]);return r.setQuadrantSegments(n),r.getResultGeometry(e)}if(arguments[2]instanceof En&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var i=arguments[1];return new mr(arguments[0],arguments[2]).getResultGeometry(i)}}else if(4===arguments.length){var o=arguments[1],a=arguments[2],s=arguments[3],u=new mr(arguments[0]);return u.setQuadrantSegments(a),u.setEndCapStyle(s),u.getResultGeometry(o)}},mr.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=I.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},gr.CAP_ROUND.get=function(){return En.CAP_ROUND},gr.CAP_BUTT.get=function(){return En.CAP_FLAT},gr.CAP_FLAT.get=function(){return En.CAP_FLAT},gr.CAP_SQUARE.get=function(){return En.CAP_SQUARE},gr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(mr,gr);var yr=function(){this._pt=[new E,new E],this._distance=b.NaN,this._isNull=!0};yr.prototype.getCoordinates=function(){return this._pt},yr.prototype.getCoordinate=function(t){return this._pt[t]},yr.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},yr.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},yr.prototype.getDistance=function(){return this._distance},yr.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr};var vr=function(){};vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr},vr.computeDistance=function(){if(arguments[2]instanceof yr&&arguments[0]instanceof Zt&&arguments[1]instanceof E)for(var t=arguments[1],e=arguments[2],n=arguments[0].getCoordinates(),r=new mn,i=0;i<n.length-1;i++){r.setCoordinates(n[i],n[i+1]);var o=r.closestPoint(t);e.setMinimum(o,t)}else if(arguments[2]instanceof yr&&arguments[0]instanceof Qt&&arguments[1]instanceof E){var a=arguments[0],s=arguments[1],u=arguments[2];vr.computeDistance(a.getExteriorRing(),s,u);for(var l=0;l<a.getNumInteriorRing();l++)vr.computeDistance(a.getInteriorRingN(l),s,u)}else if(arguments[2]instanceof yr&&arguments[0]instanceof ct&&arguments[1]instanceof E){var c=arguments[0],f=arguments[1],h=arguments[2];if(c instanceof Zt)vr.computeDistance(c,f,h);else if(c instanceof Qt)vr.computeDistance(c,f,h);else if(c instanceof Gt)for(var p=c,d=0;d<p.getNumGeometries();d++){var m=p.getGeometryN(d);vr.computeDistance(m,f,h)}else h.setMinimum(c.getCoordinate(),f)}else if(arguments[2]instanceof yr&&arguments[0]instanceof mn&&arguments[1]instanceof E){var g=arguments[1],y=arguments[2],v=arguments[0].closestPoint(g);y.setMinimum(v,g)}};var br=function(t){this._maxPtDist=new yr,this._inputGeom=t||null},_r={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};br.prototype.computeMaxMidpointDistance=function(t){var e=new wr(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},br.prototype.computeMaxVertexDistance=function(t){var e=new Ar(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},br.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},br.prototype.getDistancePoints=function(){return this._maxPtDist},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br},_r.MaxPointDistanceFilter.get=function(){return Ar},_r.MaxMidpointDistanceFilter.get=function(){return wr},Object.defineProperties(br,_r);var Ar=function(t){this._maxPtDist=new yr,this._minPtDist=new yr,this._geom=t||null};Ar.prototype.filter=function(t){this._minPtDist.initialize(),vr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ar.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ar.prototype.interfaces_=function(){return[pt]},Ar.prototype.getClass=function(){return Ar};var wr=function(t){this._maxPtDist=new yr,this._minPtDist=new yr,this._geom=t||null};wr.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=new E((n.x+r.x)/2,(n.y+r.y)/2);this._minPtDist.initialize(),vr.computeDistance(this._geom,i,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},wr.prototype.isDone=function(){return!1},wr.prototype.isGeometryChanged=function(){return!1},wr.prototype.getMaxPointDistance=function(){return this._maxPtDist},wr.prototype.interfaces_=function(){return[Ut]},wr.prototype.getClass=function(){return wr};var xr=function(t){this._comps=t||null};xr.prototype.filter=function(t){t instanceof Qt&&this._comps.add(t)},xr.prototype.interfaces_=function(){return[zt]},xr.prototype.getClass=function(){return xr},xr.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return xr.getPolygons(t,new xt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Qt?n.add(e):e instanceof Gt&&e.apply(new xr(n)),n}};var Er=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Er.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Zt&&this._lines.add(t)},Er.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Er.prototype.interfaces_=function(){return[lt]},Er.prototype.getClass=function(){return Er},Er.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Er.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Er.getLines(e,n))}},Er.getLines=function(){if(1===arguments.length){var t=arguments[0];return Er.getLines(t,!1)}if(2===arguments.length){if(k(arguments[0],_t)&&k(arguments[1],_t)){for(var e=arguments[1],n=arguments[0].iterator();n.hasNext();){var r=n.next();Er.getLines(r,e)}return e}if(arguments[0]instanceof ct&&"boolean"==typeof arguments[1]){var i=arguments[0],o=arguments[1],a=new xt;return i.apply(new Er(a,o)),a}if(arguments[0]instanceof ct&&k(arguments[1],_t)){var s=arguments[0],u=arguments[1];return s instanceof Zt?u.add(s):s.apply(new Er(u)),u}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&k(arguments[0],_t)&&k(arguments[1],_t)){for(var l=arguments[1],c=arguments[2],f=arguments[0].iterator();f.hasNext();){var h=f.next();Er.getLines(h,l,c)}return l}if("boolean"==typeof arguments[2]&&arguments[0]instanceof ct&&k(arguments[1],_t)){var p=arguments[1],d=arguments[2];return arguments[0].apply(new Er(p,d)),p}}};var Or=function(){if(this._boundaryRule=dt.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new v("Rule must be non-null");this._boundaryRule=t}};Or.prototype.locateInternal=function(){if(arguments[0]instanceof E&&arguments[1]instanceof Qt){var t=arguments[0],e=arguments[1];if(e.isEmpty())return C.EXTERIOR;var n=e.getExteriorRing(),r=this.locateInPolygonRing(t,n);if(r===C.EXTERIOR)return C.EXTERIOR;if(r===C.BOUNDARY)return C.BOUNDARY;for(var i=0;i<e.getNumInteriorRing();i++){var o=e.getInteriorRingN(i),a=this.locateInPolygonRing(t,o);if(a===C.INTERIOR)return C.EXTERIOR;if(a===C.BOUNDARY)return C.BOUNDARY}return C.INTERIOR}if(arguments[0]instanceof E&&arguments[1]instanceof Zt){var s=arguments[0],u=arguments[1];if(!u.getEnvelopeInternal().intersects(s))return C.EXTERIOR;var l=u.getCoordinates();return u.isClosed()||!s.equals(l[0])&&!s.equals(l[l.length-1])?st.isOnLine(s,l)?C.INTERIOR:C.EXTERIOR:C.BOUNDARY}if(arguments[0]instanceof E&&arguments[1]instanceof $t){var c=arguments[0];return arguments[1].getCoordinate().equals2D(c)?C.INTERIOR:C.EXTERIOR}},Or.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?st.locatePointInRing(t,e.getCoordinates()):C.EXTERIOR},Or.prototype.intersects=function(t,e){return this.locate(t,e)!==C.EXTERIOR},Or.prototype.updateLocationInfo=function(t){t===C.INTERIOR&&(this._isIn=!0),t===C.BOUNDARY&&this._numBoundaries++},Or.prototype.computeLocation=function(t,e){if(e instanceof $t&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Zt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Qt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Vt)for(var n=e,r=0;r<n.getNumGeometries();r++){var i=n.getGeometryN(r);this.updateLocationInfo(this.locateInternal(t,i))}else if(e instanceof ne)for(var o=e,a=0;a<o.getNumGeometries();a++){var s=o.getGeometryN(a);this.updateLocationInfo(this.locateInternal(t,s))}else if(e instanceof Gt)for(var u=new Un(e);u.hasNext();){var l=u.next();l!==e&&this.computeLocation(t,l)}},Or.prototype.locate=function(t,e){return e.isEmpty()?C.EXTERIOR:e instanceof Zt||e instanceof Qt?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?C.BOUNDARY:this._numBoundaries>0||this._isIn?C.INTERIOR:C.EXTERIOR)},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Sr=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length)t.call(this,arguments[0],t.INSIDE_AREA,arguments[1]);else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];this._component=e,this._segIndex=n,this._pt=r}},Pr={INSIDE_AREA:{configurable:!0}};Sr.prototype.isInsideArea=function(){return this._segIndex===Sr.INSIDE_AREA},Sr.prototype.getCoordinate=function(){return this._pt},Sr.prototype.getGeometryComponent=function(){return this._component},Sr.prototype.getSegmentIndex=function(){return this._segIndex},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Pr.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Sr,Pr);var Cr=function(t){this._pts=t||null};Cr.prototype.filter=function(t){t instanceof $t&&this._pts.add(t)},Cr.prototype.interfaces_=function(){return[zt]},Cr.prototype.getClass=function(){return Cr},Cr.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof $t?Qe.singletonList(t):Cr.getPoints(t,new xt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof $t?n.add(e):e instanceof Gt&&e.apply(new Cr(n)),n}};var Tr=function(){this._locations=null;var t=arguments[0];this._locations=t};Tr.prototype.filter=function(t){(t instanceof $t||t instanceof Zt||t instanceof Qt)&&this._locations.add(new Sr(t,0,t.getCoordinate()))},Tr.prototype.interfaces_=function(){return[zt]},Tr.prototype.getClass=function(){return Tr},Tr.getLocations=function(t){var e=new xt;return t.apply(new Tr(e)),e};var kr=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Or,this._minDistanceLocation=null,this._minDistance=b.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};kr.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=1-e,i=xr.getPolygons(this._geom[e]);if(i.size()>0){var o=Tr.getLocations(this._geom[r]);if(this.computeContainmentDistance(o,i,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&k(arguments[0],wt)&&k(arguments[1],wt)){for(var a=arguments[0],s=arguments[1],u=arguments[2],l=0;l<a.size();l++)for(var c=a.get(l),f=0;f<s.size();f++)if(this.computeContainmentDistance(c,s.get(f),u),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Sr&&arguments[1]instanceof Qt){var h=arguments[0],p=arguments[1],d=arguments[2],m=h.getCoordinate();if(C.EXTERIOR!==this._ptLocator.locate(m,p))return this._minDistance=0,d[0]=h,d[1]=new Sr(p,m),null}},kr.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var a=e.get(o);if(this.computeMinDistance(i,a,n),this._minDistance<=this._terminateDistance)return null}},kr.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Er.getLines(this._geom[0]),n=Er.getLines(this._geom[1]),r=Cr.getPoints(this._geom[0]),i=Cr.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,i,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,r,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(r,i,t),void this.updateMinDistance(t,!1))))},kr.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},kr.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},kr.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},kr.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Zt&&arguments[1]instanceof $t){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var r=t.getCoordinates(),i=e.getCoordinate(),o=0;o<r.length-1;o++){var a=st.distancePointLine(i,r[o],r[o+1]);if(a<this._minDistance){this._minDistance=a;var s=new mn(r[o],r[o+1]).closestPoint(i);n[0]=new Sr(t,o,s),n[1]=new Sr(e,0,i)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Zt&&arguments[1]instanceof Zt){var u=arguments[0],l=arguments[1],c=arguments[2];if(u.getEnvelopeInternal().distance(l.getEnvelopeInternal())>this._minDistance)return null;for(var f=u.getCoordinates(),h=l.getCoordinates(),p=0;p<f.length-1;p++)for(var d=0;d<h.length-1;d++){var m=st.distanceLineLine(f[p],f[p+1],h[d],h[d+1]);if(m<this._minDistance){this._minDistance=m;var g=new mn(f[p],f[p+1]),y=new mn(h[d],h[d+1]),v=g.closestPoints(y);c[0]=new Sr(u,p,v[0]),c[1]=new Sr(l,d,v[1])}if(this._minDistance<=this._terminateDistance)return null}}},kr.prototype.computeMinDistancePoints=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var a=e.get(o),s=i.getCoordinate().distance(a.getCoordinate());if(s<this._minDistance&&(this._minDistance=s,n[0]=new Sr(i,0,i.getCoordinate()),n[1]=new Sr(a,0,a.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},kr.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new v("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},kr.prototype.computeMinDistanceLines=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var a=e.get(o);if(this.computeMinDistance(i,a,n),this._minDistance<=this._terminateDistance)return null}},kr.prototype.interfaces_=function(){return[]},kr.prototype.getClass=function(){return kr},kr.distance=function(t,e){return new kr(t,e).distance()},kr.isWithinDistance=function(t,e,n){return new kr(t,e,n).distance()<=n},kr.nearestPoints=function(t,e){return new kr(t,e).nearestPoints()};var Ir=function(){this._pt=[new E,new E],this._distance=b.NaN,this._isNull=!0};Ir.prototype.getCoordinates=function(){return this._pt},Ir.prototype.getCoordinate=function(t){return this._pt[t]},Ir.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},Ir.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},Ir.prototype.toString=function(){return J.toLineString(this._pt[0],this._pt[1])},Ir.prototype.getDistance=function(){return this._distance},Ir.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},Ir.prototype.interfaces_=function(){return[]},Ir.prototype.getClass=function(){return Ir};var Lr=function(){};Lr.prototype.interfaces_=function(){return[]},Lr.prototype.getClass=function(){return Lr},Lr.computeDistance=function(){if(arguments[2]instanceof Ir&&arguments[0]instanceof Zt&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new mn,i=t.getCoordinates(),o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var a=r.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof Ir&&arguments[0]instanceof Qt&&arguments[1]instanceof E){var s=arguments[0],u=arguments[1],l=arguments[2];Lr.computeDistance(s.getExteriorRing(),u,l);for(var c=0;c<s.getNumInteriorRing();c++)Lr.computeDistance(s.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof Ir&&arguments[0]instanceof ct&&arguments[1]instanceof E){var f=arguments[0],h=arguments[1],p=arguments[2];if(f instanceof Zt)Lr.computeDistance(f,h,p);else if(f instanceof Qt)Lr.computeDistance(f,h,p);else if(f instanceof Gt)for(var d=f,m=0;m<d.getNumGeometries();m++){var g=d.getGeometryN(m);Lr.computeDistance(g,h,p)}else p.setMinimum(f.getCoordinate(),h)}else if(arguments[2]instanceof Ir&&arguments[0]instanceof mn&&arguments[1]instanceof E){var y=arguments[1],v=arguments[2],b=arguments[0].closestPoint(y);v.setMinimum(b,y)}};var jr=function(){this._g0=null,this._g1=null,this._ptDist=new Ir,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Mr={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};jr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},jr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new v("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},jr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},jr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},jr.prototype.computeOrientedDistance=function(t,e,n){var r=new Rr(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new Nr(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}},jr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr},jr.distance=function(){if(2===arguments.length)return new jr(arguments[0],arguments[1]).distance();if(3===arguments.length){var t=arguments[2],e=new jr(arguments[0],arguments[1]);return e.setDensifyFraction(t),e.distance()}},Mr.MaxPointDistanceFilter.get=function(){return Rr},Mr.MaxDensifiedByFractionDistanceFilter.get=function(){return Nr},Object.defineProperties(jr,Mr);var Rr=function(){this._maxPtDist=new Ir,this._minPtDist=new Ir,this._euclideanDist=new Lr,this._geom=null;var t=arguments[0];this._geom=t};Rr.prototype.filter=function(t){this._minPtDist.initialize(),Lr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Rr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Rr.prototype.interfaces_=function(){return[pt]},Rr.prototype.getClass=function(){return Rr};var Nr=function(){this._maxPtDist=new Ir,this._minPtDist=new Ir,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Nr.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=(r.x-n.x)/this._numSubSegs,o=(r.y-n.y)/this._numSubSegs,a=0;a<this._numSubSegs;a++){var s=n.x+a*i,u=n.y+a*o,l=new E(s,u);this._minPtDist.initialize(),Lr.computeDistance(this._geom,l,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},Nr.prototype.isDone=function(){return!1},Nr.prototype.isGeometryChanged=function(){return!1},Nr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Nr.prototype.interfaces_=function(){return[Ut]},Nr.prototype.getClass=function(){return Nr};var Dr=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Fr={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Dr.prototype.checkMaximumDistance=function(t,e,n){var r=new jr(e,t);if(r.setDensifyFraction(.25),this._maxDistanceFound=r.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+J.toLineString(i[0],i[1])+")"}},Dr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Dr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Dr.VERBOSE&&q.out.println("Min Dist= "+this._minDistanceFound+"  err= "+(1-this._minDistanceFound/this._bufDistance)+"  Max Dist= "+this._maxDistanceFound+"  err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Dr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Qt||this._input instanceof ne||this._input instanceof Gt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Dr.prototype.getErrorIndicator=function(){return this._errorIndicator},Dr.prototype.checkMinimumDistance=function(t,e,n){var r=new kr(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound<n){this._isValid=!1;var i=r.nearestPoints();this._errorLocation=r.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+J.toLineString(i[0],i[1])+" )"}},Dr.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Dr.prototype.getErrorLocation=function(){return this._errorLocation},Dr.prototype.getPolygonLines=function(t){for(var e=new xt,n=new Er(e),r=xr.getPolygons(t).iterator();r.hasNext();)r.next().apply(n);return t.getFactory().buildGeometry(e)},Dr.prototype.getErrorMessage=function(){return this._errMsg},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Fr.VERBOSE.get=function(){return!1},Fr.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Dr,Fr);var Br=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},zr={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Br.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Br.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Br.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new W(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new W(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Br.prototype.checkDistance=function(){var t=new Dr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Br.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Br.prototype.checkPolygonal=function(){this._result instanceof Qt||this._result instanceof ne||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Br.prototype.getErrorIndicator=function(){return this._errorIndicator},Br.prototype.getErrorLocation=function(){return this._errorLocation},Br.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Br.prototype.report=function(t){if(!Br.VERBOSE)return null;q.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Br.prototype.getErrorMessage=function(){return this._errorMsg},Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br},Br.isValidMsg=function(t,e,n){var r=new Br(t,e,n);return r.isValid()?null:r.getErrorMessage()},Br.isValid=function(t,e,n){return!!new Br(t,e,n).isValid()},zr.VERBOSE.get=function(){return!1},zr.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Br,zr);var Ur=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ur.prototype.getCoordinates=function(){return this._pts},Ur.prototype.size=function(){return this._pts.length},Ur.prototype.getCoordinate=function(t){return this._pts[t]},Ur.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Ur.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:fn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Ur.prototype.setData=function(t){this._data=t},Ur.prototype.getData=function(){return this._data},Ur.prototype.toString=function(){return J.toLineString(new ue(this._pts))},Ur.prototype.interfaces_=function(){return[hn]},Ur.prototype.getClass=function(){return Ur};var Gr=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new xt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Gr.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Gr.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Gr.prototype.getIntersectionSegments=function(){return this._intSegments},Gr.prototype.count=function(){return this._intersectionCount},Gr.prototype.getIntersections=function(){return this._intersections},Gr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Gr.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Gr.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,r))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=a,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Gr.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},Gr.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Gr.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Gr.prototype.interfaces_=function(){return[Yn]},Gr.prototype.getClass=function(){return Gr},Gr.createAllIntersectionsFinder=function(t){var e=new Gr(t);return e.setFindAllIntersections(!0),e},Gr.createAnyIntersectionFinder=function(t){return new Gr(t)},Gr.createIntersectionCounter=function(t){var e=new Gr(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Vr=function(){this._li=new it,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Vr.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Vr.prototype.getIntersections=function(){return this._segInt.getIntersections()},Vr.prototype.isValid=function(){return this.execute(),this._isValid},Vr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Gr(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new wn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Vr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Ce(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Vr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+J.toLineString(t[0],t[1])+" and "+J.toLineString(t[2],t[3])},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.computeIntersections=function(t){var e=new Vr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var qr=function t(){this._nv=null;var e=arguments[0];this._nv=new Vr(t.toSegmentStrings(e))};qr.prototype.checkValid=function(){this._nv.checkValid()},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.toSegmentStrings=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Ur(r.getCoordinates(),r))}return e},qr.checkValid=function(t){new qr(t).checkValid()};var Hr=function(t){this._mapOp=t};Hr.prototype.map=function(t){for(var e=new xt,n=0;n<t.getNumGeometries();n++){var r=this._mapOp.map(t.getGeometryN(n));r.isEmpty()||e.add(r)}return t.getFactory().createGeometryCollection(ye.toGeometryArray(e))},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},Hr.map=function(t,e){return new Hr(e).map(t)};var Wr=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new xt,this._resultLineList=new xt;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Wr.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},Wr.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Wr.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Wr.prototype.collectLineEdge=function(t,e,n){var r=t.getLabel(),i=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Si.isResultOfOp(r,e)||i.isCovered()||(n.add(i),t.setVisitedEdge(!0)))},Wr.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();)t.next().getEdges().findCoveredLineEdges();for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),r=n.getEdge();if(n.isLineEdge()&&!r.isCoveredSet()){var i=this._op.isCoveredByA(n.getCoordinate());r.setCovered(i)}}},Wr.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getLabel();n.isIsolated()&&(r.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},Wr.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),r=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(r),n.setInResult(!0)}},Wr.prototype.collectBoundaryTouchEdge=function(t,e,n){var r=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Si.isResultOfOp(r,e)&&e===Si.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr};var Xr=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new xt;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Xr.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Xr.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===Si.INTERSECTION)){var r=n.getLabel();Si.isResultOfOp(r,t)&&this.filterCoveredNodeToPoint(n)}}},Xr.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Xr.prototype.interfaces_=function(){return[]},Xr.prototype.getClass=function(){return Xr};var Yr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Yr.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Yr.prototype.transformPolygon=function(t,e){var n=!0,r=this.transformLinearRing(t.getExteriorRing(),t);null!==r&&r instanceof ee&&!r.isEmpty()||(n=!1);for(var i=new xt,o=0;o<t.getNumInteriorRing();o++){var a=this.transformLinearRing(t.getInteriorRingN(o),t);null===a||a.isEmpty()||(a instanceof ee||(n=!1),i.add(a))}if(n)return this._factory.createPolygon(r,i.toArray([]));var s=new xt;return null!==r&&s.add(r),s.addAll(i),this._factory.buildGeometry(s)},Yr.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Yr.prototype.getInputGeometry=function(){return this._inputGeom},Yr.prototype.transformMultiLineString=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transformLineString(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Yr.prototype.transformCoordinates=function(t,e){return this.copy(t)},Yr.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Yr.prototype.transformMultiPoint=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transformPoint(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Yr.prototype.transformMultiPolygon=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transformPolygon(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Yr.prototype.copy=function(t){return t.copy()},Yr.prototype.transformGeometryCollection=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transform(t.getGeometryN(r));null!==i&&(this._pruneEmptyGeometry&&i.isEmpty()||n.add(i))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(ye.toGeometryArray(n)):this._factory.buildGeometry(n)},Yr.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof $t)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Zt)return this.transformLineString(t,null);if(t instanceof Vt)return this.transformMultiLineString(t,null);if(t instanceof Qt)return this.transformPolygon(t,null);if(t instanceof ne)return this.transformMultiPolygon(t,null);if(t instanceof Gt)return this.transformGeometryCollection(t,null);throw new v("Unknown Geometry subtype: "+t.getClass().getName())},Yr.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var r=n.size();return r>0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Yr.prototype.interfaces_=function(){return[]},Yr.prototype.getClass=function(){return Yr};var Zr=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new mn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Zt&&"number"==typeof arguments[1]){var e=arguments[1];t.call(this,arguments[0].getCoordinates(),e)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this._srcPts=n,this._isClosed=t.isClosed(n),this._snapTolerance=r}};Zr.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r<n;r++){var i=t.get(r),o=this.findSnapForVertex(i,e);null!==o&&(t.set(r,new E(o)),0===r&&this._isClosed&&t.set(t.size()-1,new E(o)))}},Zr.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Zr.prototype.snapTo=function(t){var e=new Ot(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},Zr.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var r=0;r<n;r++){var i=e[r],o=this.findSegmentIndexToSnap(i,t);o>=0&&t.add(o+1,new E(i),!1)}},Zr.prototype.findSegmentIndexToSnap=function(t,e){for(var n=b.MAX_VALUE,r=-1,i=0;i<e.size()-1;i++){if(this._seg.p0=e.get(i),this._seg.p1=e.get(i+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,r=i)}return r},Zr.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr},Zr.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var Kr=function(t){this._srcGeom=t||null},$r={SNAP_PRECISION_FACTOR:{configurable:!0}};Kr.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new Jr(e,n).transform(this._srcGeom)},Kr.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),r=new Jr(t,n,!0).transform(this._srcGeom),i=r;return e&&k(i,Jt)&&(i=r.buffer(0)),i},Kr.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},Kr.prototype.extractTargetCoordinates=function(t){for(var e=new p,n=t.getCoordinates(),r=0;r<n.length;r++)e.add(n[r]);return e.toArray(new Array(0).fill(null))},Kr.prototype.computeMinimumSegmentLength=function(t){for(var e=b.MAX_VALUE,n=0;n<t.length-1;n++){var r=t[n].distance(t[n+1]);r<e&&(e=r)}return e},Kr.prototype.interfaces_=function(){return[]},Kr.prototype.getClass=function(){return Kr},Kr.snap=function(t,e,n){var r=new Array(2).fill(null),i=new Kr(t);r[0]=i.snapTo(e,n);var o=new Kr(e);return r[1]=o.snapTo(r[0],n),r},Kr.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=Kr.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===pe.FIXED){var r=1/n.getScale()*2/1.415;r>e&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(Kr.computeOverlaySnapTolerance(i),Kr.computeOverlaySnapTolerance(o))}},Kr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Kr.SNAP_PRECISION_FACTOR},Kr.snapToSelf=function(t,e,n){return new Kr(t).snapToSelf(e,n)},$r.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Kr,$r);var Jr=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Zr(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Yr),Qr=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Qr.prototype.getCommon=function(){return b.longBitsToDouble(this._commonBits)},Qr.prototype.add=function(t){var e=b.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=Qr.signExpBits(this._commonBits),this._isFirst=!1,null):Qr.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=Qr.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=Qr.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},Qr.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=b.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+b.toBinaryString(t),r=n.substring(n.length-64);return r.substring(0,1)+"  "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+e+" ]"}},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},Qr.getBit=function(t,e){return 0!=(t&1<<e)?1:0},Qr.signExpBits=function(t){return t>>52},Qr.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},Qr.numCommonMostSigMantissaBits=function(t,e){for(var n=0,r=52;r>=0;r--){if(Qr.getBit(t,r)!==Qr.getBit(e,r))return n;n++}return 52};var ti=function(){this._commonCoord=null,this._ccFilter=new ni},ei={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ti.prototype.addCommonBits=function(t){var e=new ri(this._commonCoord);t.apply(e),t.geometryChanged()},ti.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new E(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ri(e);return t.apply(n),t.geometryChanged(),t},ti.prototype.getCommonCoordinate=function(){return this._commonCoord},ti.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ei.CommonCoordinateFilter.get=function(){return ni},ei.Translater.get=function(){return ri},Object.defineProperties(ti,ei);var ni=function(){this._commonBitsX=new Qr,this._commonBitsY=new Qr};ni.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},ni.prototype.getCommonCoordinate=function(){return new E(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ni.prototype.interfaces_=function(){return[pt]},ni.prototype.getClass=function(){return ni};var ri=function(){this.trans=null;var t=arguments[0];this.trans=t};ri.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},ri.prototype.isDone=function(){return!1},ri.prototype.isGeometryChanged=function(){return!0},ri.prototype.interfaces_=function(){return[Ut]},ri.prototype.getClass=function(){return ri};var ii=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ii.prototype.selfSnap=function(t){return new Kr(t).snapTo(t,this._snapTolerance)},ii.prototype.removeCommonBits=function(t){this._cbr=new ti,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ii.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ii.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Si.overlayOp(e[0],e[1],t);return this.prepareResult(n)},ii.prototype.checkValid=function(t){t.isValid()||q.out.println("Snapped geometry is invalid")},ii.prototype.computeSnapTolerance=function(){this._snapTolerance=Kr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ii.prototype.snap=function(t){var e=this.removeCommonBits(t);return Kr.snap(e[0],e[1],this._snapTolerance)},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.overlayOp=function(t,e,n){return new ii(t,e).getResultGeometry(n)},ii.union=function(t,e){return ii.overlayOp(t,e,Si.UNION)},ii.intersection=function(t,e){return ii.overlayOp(t,e,Si.INTERSECTION)},ii.symDifference=function(t,e){return ii.overlayOp(t,e,Si.SYMDIFFERENCE)},ii.difference=function(t,e){return ii.overlayOp(t,e,Si.DIFFERENCE)};var oi=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};oi.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=Si.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof Q))throw t;r=t}if(!n)try{e=ii.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof Q?r:t}return e},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},oi.overlayOp=function(t,e,n){return new oi(t,e).getResultGeometry(n)},oi.union=function(t,e){return oi.overlayOp(t,e,Si.UNION)},oi.intersection=function(t,e){return oi.overlayOp(t,e,Si.INTERSECTION)},oi.symDifference=function(t,e){return oi.overlayOp(t,e,Si.SYMDIFFERENCE)},oi.difference=function(t,e){return oi.overlayOp(t,e,Si.DIFFERENCE)};var ai=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};ai.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai};var si=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}},ui={INSERT:{configurable:!0},DELETE:{configurable:!0}};si.prototype.isDelete=function(){return this._eventType===si.DELETE},si.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},si.prototype.getObject=function(){return this._obj},si.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},si.prototype.getInsertEvent=function(){return this._insertEvent},si.prototype.isInsert=function(){return this._eventType===si.INSERT},si.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},si.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},si.prototype.interfaces_=function(){return[A]},si.prototype.getClass=function(){return si},ui.INSERT.get=function(){return 1},ui.DELETE.get=function(){return 2},Object.defineProperties(si,ui);var li=function(){};li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li};var ci=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};ci.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(ci.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},ci.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},ci.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},ci.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},ci.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},ci.prototype.hasProperIntersection=function(){return this._hasProper},ci.prototype.hasIntersection=function(){return this._hasIntersection},ci.prototype.isDone=function(){return this._isDone},ci.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},ci.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},ci.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},ci.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var fi=function(t){function e(){t.call(this),this.events=new xt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){Qe.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof ci&&k(arguments[0],wt)&&k(arguments[1],wt)){var r=arguments[0],i=arguments[1],o=arguments[2];this.addEdges(r,r),this.addEdges(i,i),this.computeIntersections(o)}else if("boolean"==typeof arguments[2]&&k(arguments[0],wt)&&arguments[1]instanceof ci){var a=arguments[0],s=arguments[1];arguments[2]?this.addEdges(a,null):this.addEdges(a),this.computeIntersections(s)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),r=n.getStartIndexes(),i=0;i<r.length-1;i++){var o=new ai(n,i),a=new si(e,n.getMinX(i),o);this.events.add(a),this.events.add(new si(n.getMaxX(i),a))}},e.prototype.processOverlaps=function(t,e,n,r){for(var i=n.getObject(),o=t;o<e;o++){var a=this.events.get(o);if(a.isInsert()){var s=a.getObject();n.isSameLabel(a)||(i.computeIntersections(s,r),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var n=arguments[1],r=arguments[0].iterator();r.hasNext();){var i=r.next();this.addEdge(i,n)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(li),hi=function(){this._min=b.POSITIVE_INFINITY,this._max=b.NEGATIVE_INFINITY},pi={NodeComparator:{configurable:!0}};hi.prototype.getMin=function(){return this._min},hi.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},hi.prototype.getMax=function(){return this._max},hi.prototype.toString=function(){return J.toLineString(new E(this._min,0),new E(this._max,0))},hi.prototype.interfaces_=function(){return[]},hi.prototype.getClass=function(){return hi},pi.NodeComparator.get=function(){return di},Object.defineProperties(hi,pi);var di=function(){};di.prototype.compare=function(t,e){var n=t,r=e,i=(n._min+n._max)/2,o=(r._min+r._max)/2;return i<o?-1:i>o?1:0},di.prototype.interfaces_=function(){return[x]},di.prototype.getClass=function(){return di};var mi=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hi),gi=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hi),yi=function(){this._leaves=new xt,this._root=null,this._level=0};yi.prototype.buildTree=function(){Qe.sort(this._leaves,new hi.NodeComparator);for(var t=this._leaves,e=null,n=new xt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},yi.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new mi(t,e,n))},yi.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},yi.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},yi.prototype.printNode=function(t){q.out.println(J.toLineString(new E(t._min,this._level),new E(t._max,this._level)))},yi.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},yi.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var r=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(r);else{var i=new gi(t.get(n),t.get(n+1));e.add(i)}}},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi};var vi=function(){this._items=new xt};vi.prototype.visitItem=function(t){this._items.add(t)},vi.prototype.getItems=function(){return this._items},vi.prototype.interfaces_=function(){return[Ze]},vi.prototype.getClass=function(){return vi};var bi=function(){this._index=null;var t=arguments[0];if(!k(t,Jt))throw new v("Argument must be Polygonal");this._index=new wi(t)},_i={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};bi.prototype.locate=function(t){var e=new at(t),n=new Ai(e);return this._index.query(t.y,t.y,n),e.getLocation()},bi.prototype.interfaces_=function(){return[zn]},bi.prototype.getClass=function(){return bi},_i.SegmentVisitor.get=function(){return Ai},_i.IntervalIndexedGeometry.get=function(){return wi},Object.defineProperties(bi,_i);var Ai=function(){this._counter=null;var t=arguments[0];this._counter=t};Ai.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Ai.prototype.interfaces_=function(){return[Ze]},Ai.prototype.getClass=function(){return Ai};var wi=function(){this._index=new yi;var t=arguments[0];this.init(t)};wi.prototype.init=function(t){for(var e=Er.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},wi.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new mn(t[e-1],t[e]),r=Math.min(n.p0.y,n.p1.y),i=Math.max(n.p0.y,n.p1.y);this._index.insert(r,i,n)}},wi.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new vi;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._index.query(r,i,o)}},wi.prototype.interfaces_=function(){return[]},wi.prototype.getClass=function(){return wi};var xi=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new he,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Or,2===arguments.length){var e=arguments[0],n=arguments[1],r=dt.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=r,null!==n&&this.add(n)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=i,this._parentGeom=o,this._boundaryNodeRule=a,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var r=this._nodes.addNode(n).getLabel(),i=1;C.NONE,r.getLocation(t,Oe.ON)===C.BOUNDARY&&i++;var o=e.determineBoundary(this._boundaryNodeRule,i);r.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[1],r=arguments[2],i=new ci(arguments[0],!0,!1);i.setIsDoneIfProperInt(r);var o=this.createEdgeSetIntersector(),a=this._parentGeom instanceof ee||this._parentGeom instanceof Qt||this._parentGeom instanceof ne,s=n||!a;return o.computeIntersections(this._edges,i,s),this.addSelfIntersectionNodes(this._argIndex),i}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();)e.next().eiList.addSplitEdges(t)},e.prototype.computeEdgeIntersections=function(t,e,n){var r=new ci(e,n,!0);return r.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,r),r},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof $t){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,C.INTERIOR)}else if(arguments[0]instanceof E){var e=arguments[0];this.insertPoint(this._argIndex,e,C.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),C.EXTERIOR,C.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,C.INTERIOR,C.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],C.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],C.BOUNDARY)},e.prototype.addLineString=function(t){var e=St.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new nr(e,new Le(this._argIndex,C.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),et.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===C.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var r=St.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;st.isCCW(r)&&(i=n,o=e);var a=new nr(r,new Le(this._argIndex,C.BOUNDARY,i,o));this._lineEdgeMap.put(t,a),this.insertEdge(a),this.insertPoint(this._argIndex,r[0],C.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new Le(t,n):i.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new fi},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof Qt)this.addPolygon(e);else if(e instanceof Zt)this.addLineString(e);else if(e instanceof $t)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Vt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof Gt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return k(this._parentGeom,Jt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new bi(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?C.BOUNDARY:C.INTERIOR},e}(qe),Ei=function(){if(this._li=new it,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new xi(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=dt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xi(0,e,r),this._arg[1]=new xi(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xi(0,i,a),this._arg[1]=new xi(1,o,a)}};Ei.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Ei.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Ei.prototype.interfaces_=function(){return[]},Ei.prototype.getClass=function(){return Ei};var Oi=function(){};Oi.prototype.interfaces_=function(){return[]},Oi.prototype.getClass=function(){return Oi},Oi.map=function(){if(arguments[0]instanceof ct&&k(arguments[1],Oi.MapOp)){for(var t=arguments[0],e=arguments[1],n=new xt,r=0;r<t.getNumGeometries();r++){var i=e.map(t.getGeometryN(r));null!==i&&n.add(i)}return t.getFactory().buildGeometry(n)}if(k(arguments[0],_t)&&k(arguments[1],Oi.MapOp)){for(var o=arguments[0],a=arguments[1],s=new xt,u=o.iterator();u.hasNext();){var l=u.next(),c=a.map(l);null!==c&&s.add(c)}return s}},Oi.MapOp=function(){};var Si=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Or,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Xn,this._resultPolyList=new xt,this._resultLineList=new xt,this._resultPointList=new xt,this._graph=new qe(new Hn),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Le(t.getLabel())).flip();var i=e.getDepth();i.isNull()&&i.add(n),i.add(r),n.merge(r)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,r,i){var o=new xt;return o.addAll(t),o.addAll(n),o.addAll(r),o.isEmpty()?e.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().mergeSymLabels()},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(this._ptLocator.locate(t,r)!==C.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new xt,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new xt;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),qr.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new He(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var r=new Wr(this,this._geomFact,this._ptLocator);this._resultLineList=r.build(t);var i=new Xr(this,this._geomFact,this._ptLocator);this._resultPointList=i.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var r=n.next(),i=r.getLabel();i.isArea()&&!r.isInteriorAreaEdge()&&e.isResultOfOp(i.getLocation(0,Oe.RIGHT),i.getLocation(1,Oe.RIGHT),t)&&r.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),r=e.getDepth();if(!r.isNull()){r.normalize();for(var i=0;i<2;i++)n.isNull(i)||!n.isArea()||r.isNull(i)||(0===r.getDelta(i)?n.toLine(i):(et.isTrue(!r.isNull(i,Oe.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(i,Oe.LEFT,r.getLocation(i,Oe.LEFT)),et.isTrue(!r.isNull(i,Oe.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(i,Oe.RIGHT,r.getLocation(i,Oe.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ei);Si.overlayOp=function(t,e,n){return new Si(t,e).getResultGeometry(n)},Si.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Si.createEmptyResult(Si.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return Hr.map(t,{interfaces_:function(){return[Oi.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.INTERSECTION)},Si.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Si.createEmptyResult(Si.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.SYMDIFFERENCE)},Si.resultDimension=function(t,e,n){var r=e.getDimension(),i=n.getDimension(),o=-1;switch(t){case Si.INTERSECTION:o=Math.min(r,i);break;case Si.UNION:o=Math.max(r,i);break;case Si.DIFFERENCE:o=r;break;case Si.SYMDIFFERENCE:o=Math.max(r,i)}return o},Si.createEmptyResult=function(t,e,n,r){var i=null;switch(Si.resultDimension(t,e,n)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon()}return i},Si.difference=function(t,e){return t.isEmpty()?Si.createEmptyResult(Si.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.DIFFERENCE))},Si.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),r=t.getLocation(1);return Si.isResultOfOp(n,r,e)}if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];switch(i===C.BOUNDARY&&(i=C.INTERIOR),o===C.BOUNDARY&&(o=C.INTERIOR),a){case Si.INTERSECTION:return i===C.INTERIOR&&o===C.INTERIOR;case Si.UNION:return i===C.INTERIOR||o===C.INTERIOR;case Si.DIFFERENCE:return i===C.INTERIOR&&o!==C.INTERIOR;case Si.SYMDIFFERENCE:return i===C.INTERIOR&&o!==C.INTERIOR||i!==C.INTERIOR&&o===C.INTERIOR}return!1}},Si.INTERSECTION=1,Si.UNION=2,Si.DIFFERENCE=3,Si.SYMDIFFERENCE=4;var Pi=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Or,this._seg=new mn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Pi.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var n=this._linework.getGeometryN(e).getCoordinateSequence(),r=0;r<n.size()-1;r++)if(n.getCoordinate(r,this._seg.p0),n.getCoordinate(r+1,this._seg.p1),this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0;return!1},Pi.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?C.BOUNDARY:this._ptLocator.locate(t,this._g)},Pi.prototype.extractLinework=function(t){var e=new Ci;t.apply(e);var n=e.getLinework(),r=ye.toLineStringArray(n);return t.getFactory().createMultiLineString(r)},Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi};var Ci=function(){this._linework=null,this._linework=new xt};Ci.prototype.getLinework=function(){return this._linework},Ci.prototype.filter=function(t){if(t instanceof Qt){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},Ci.prototype.interfaces_=function(){return[zt]},Ci.prototype.getClass=function(){return Ci};var Ti=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Ti.prototype.extractPoints=function(t,e,n){for(var r=t.getCoordinates(),i=0;i<r.length-1;i++)this.computeOffsetPoints(r[i],r[i+1],e,n)},Ti.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Ti.prototype.getPoints=function(t){for(var e=new xt,n=Er.getLines(this._g).iterator();n.hasNext();){var r=n.next();this.extractPoints(r,t,e)}return e},Ti.prototype.computeOffsetPoints=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=Math.sqrt(i*i+o*o),s=n*i/a,u=n*o/a,l=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var f=new E(l-u,c+s);r.add(f)}if(this._doRight){var h=new E(l+u,c-s);r.add(h)}},Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti};var ki=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new xt;var e=arguments[0],n=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,r],this._locFinder=[new Pi(this._geom[0],this._boundaryDistanceTolerance),new Pi(this._geom[1],this._boundaryDistanceTolerance),new Pi(this._geom[2],this._boundaryDistanceTolerance)]},Ii={TOLERANCE:{configurable:!0}};ki.prototype.reportResult=function(t,e,n){q.out.println("Overlay result invalid - A:"+C.toLocationSymbol(e[0])+" B:"+C.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+C.toLocationSymbol(e[2]))},ki.prototype.isValid=function(t){return this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]),this.checkValid(t)},ki.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var n=this._testCoords.get(e);if(!this.checkValid(t,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._location[0]=this._locFinder[0].getLocation(i),this._location[1]=this._locFinder[1].getLocation(i),this._location[2]=this._locFinder[2].getLocation(i),!!ki.hasLocation(this._location,C.BOUNDARY)||this.isValidResult(r,this._location)}},ki.prototype.addTestPts=function(t){var e=new Ti(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},ki.prototype.isValidResult=function(t,e){var n=Si.isResultOfOp(e[0],e[1],t),r=!(n^e[2]===C.INTERIOR);return r||this.reportResult(t,e,n),r},ki.prototype.getInvalidLocation=function(){return this._invalidLocation},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki},ki.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},ki.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Kr.computeSizeBasedSnapTolerance(t),Kr.computeSizeBasedSnapTolerance(e))},ki.isValid=function(t,e,n,r){return new ki(t,e,r).isValid(n)},Ii.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(ki,Ii);var Li=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Li.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);this._skipEmpty&&r.isEmpty()||e.add(r)}},Li.prototype.combine=function(){for(var t=new xt,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li},Li.combine=function(){if(1===arguments.length)return new Li(arguments[0]).combine();if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Li(Li.createList(t,e)).combine()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];return new Li(Li.createList(n,r,i)).combine()}},Li.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Li.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new xt;return n.add(t),n.add(e),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=new xt;return a.add(r),a.add(i),a.add(o),a}};var ji=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new xt)},Mi={STRTREE_NODE_CAPACITY:{configurable:!0}};ji.prototype.reduceToGeometries=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next(),i=null;k(r,wt)?i=this.unionTree(r):r instanceof ct&&(i=r),e.add(i)}return e},ji.prototype.extractByEnvelope=function(t,e,n){for(var r=new xt,i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);o.getEnvelopeInternal().intersects(t)?r.add(o):n.add(o)}return this._geomFactory.buildGeometry(r)},ji.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),r=e.getEnvelopeInternal();if(!n.intersects(r))return Li.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var i=n.intersection(r);return this.unionUsingEnvelopeIntersection(t,e,i)},ji.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new an(ji.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var r=t.itemsTree();return this.unionTree(r)},ji.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];if(r-n<=1){var i=ji.getGeometry(e,n);return this.unionSafe(i,null)}if(r-n==2)return this.unionSafe(ji.getGeometry(e,n),ji.getGeometry(e,n+1));var o=Math.trunc((r+n)/2),a=this.binaryUnion(e,n,o),s=this.binaryUnion(e,o,r);return this.unionSafe(a,s)}},ji.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var r=n.next();e=null===e?r.copy():e.union(r)}return e},ji.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},ji.prototype.unionActual=function(t,e){return ji.restrictToPolygons(t.union(e))},ji.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},ji.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var r=new xt,i=this.extractByEnvelope(n,t,r),o=this.extractByEnvelope(n,e,r),a=this.unionActual(i,o);return r.add(a),Li.combine(r)},ji.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji},ji.restrictToPolygons=function(t){if(k(t,Jt))return t;var e=xr.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(ye.toPolygonArray(e))},ji.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},ji.union=function(t){return new ji(t).union()},Mi.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(ji,Mi);var Ri=function(){};Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri},Ri.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Si.createEmptyResult(Si.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.UNION)},t.GeoJSONReader=xe,t.GeoJSONWriter=Ee,t.OverlayOp=Si,t.UnionOp=Ri,t.BufferOp=mr,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";n.d(e,"a",(function(){return $}));var r,i=n(0),o=n.n(i),a=n(4),s=n(32),u=n(403),l=n(1592),c=n(1593),f=n(56),h=n(1594),p=n(51),d=function(t,e){var n=Object(p.c)(t.color||"border",e),r=t.size||"xsmall",i=t.style||"solid",o="string"===typeof t?t:t.side||"all",a=e.box.responsiveBreakpoint&&e.global.breakpoints[e.box.responsiveBreakpoint];a.borderSize||(a.borderSize=e.global.borderSize);var s=a&&(a.borderSize[r]||r)&&i+" "+(a.borderSize[r]||r)+" "+n;if(s){if("top"===o||"bottom"===o||"left"===o||"right"===o)return"border-"+o+": "+s+";";if("end"===o||"start"===o)return"border-inline-"+o+": "+s+";";if("vertical"===o)return"\n      border-left: "+s+";\n      border-right: "+s+";\n    ";if("horizontal"===o)return"\n      border-top: "+s+";\n      border-bottom: "+s+";\n    ";if("between"!==o)return"border: "+s+";"}},m=function(t,e,n){var r=[],i=Object(p.c)(t.color||"border",n),o=t.size||"xsmall",s=t.style||"solid",u="string"===typeof t?t:t.side||"all",l=s+" "+(n.global.borderSize[o]||o)+" "+i,c=e&&d(t,n),h=c&&n.box.responsiveBreakpoint&&n.global.breakpoints[n.box.responsiveBreakpoint];return"top"===u||"bottom"===u||"left"===u||"right"===u?(r.push("border-"+u+": "+l+";"),c&&r.push(Object(f.a)(h,c))):"end"===u||"start"===u?(r.push(Object(a.css)(["border-inline-",":",";"],u,l)),c&&r.push(Object(f.a)(h,c))):"vertical"===u?(r.push(Object(a.css)(["border-left:",";border-right:",";"],l,l)),c&&r.push(Object(f.a)(h,c))):"horizontal"===u?(r.push(Object(a.css)(["border-top:",";border-bottom:",";"],l,l)),c&&r.push(Object(f.a)(h,c))):"between"===u||(r.push(Object(a.css)(["border:",";"],l)),c&&r.push(Object(f.a)(h,c))),r};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},g.apply(this,arguments)}var y={baseline:"baseline",center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},v=Object(a.css)(["align-items:",";"],(function(t){return y[t.align]})),b={around:"around",between:"between",center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},_=Object(a.css)(["align-content:",";"],(function(t){return b[t.alignContent]})),A={auto:"auto",full:"100%","1/2":"50%","1/4":"25%","2/4":"50%","3/4":"75%","1/3":"33.33%","2/3":"66.66%"},w=Object(a.css)(["flex-basis:",";"],(function(t){return A[t.basis]||t.theme.global.size[t.basis]||t.basis})),x=Object(a.css)(["box-shadow:",";"],(function(t){return t.theme.global.elevation[t.theme.dark?"dark":"light"][t.elevationProp]})),E=((r={})[!0]="1 1",r[!1]="0 0",r.grow="1 0",r.shrink="0 1",r),O=Object(a.css)(["flex:",";"],(function(t){return("boolean"===typeof(e=t.flex)||"string"===typeof e?E[e]:(e.grow?e.grow:0)+" "+(e.shrink?e.shrink:0))+(!0===t.flex||t.basis?"":" auto");var e})),S={around:"space-around",between:"space-between",center:"center",end:"flex-end",evenly:"space-evenly",start:"flex-start"},P=Object(a.css)(["justify-content:",";"],(function(t){return S[t.justify]})),C={true:"wrap",reverse:"wrap-reverse"},T=Object(a.css)(["flex-wrap:",";"],(function(t){return C[t.wrapProp]})),k={full:"100%"},I={xsmall:1,small:5,medium:10,large:50,xlarge:200},L={xsmall:1.001,small:1.01,medium:1.1,large:1.5,xlarge:2},j={xsmall:.1,small:1,medium:5,large:400,xlarge:1e3},M={xsmall:.001,small:.01,medium:.05,large:.1,xlarge:.5},R=function(t,e){if(void 0===e&&(e="medium"),"fadeIn"===t)return["opacity: 0;","opacity: 1;"];if("fadeOut"===t)return["opacity: 1;","opacity: 0;"];if("jiggle"===t){var n=j[e];return["transform: rotate(-"+n+"deg);","transform: rotate("+n+"deg);"]}return"pulse"===t?["transform: scale(1);","transform: scale("+L[e]+")"]:"rotateRight"===t?["transform: rotate(0deg);","transform: rotate(359deg);"]:"rotateLeft"===t?["transform: rotate(0deg);","transform: rotate(-359deg);"]:"flipIn"===t?["transform: rotateY(90deg);","transform: rotateY(0);"]:"flipOut"===t?["transform: rotateY(0);","transform: rotateY(90deg);"]:"slideDown"===t?["transform: translateY(-"+I[e]+"%);","transform: none;"]:"slideLeft"===t?["transform: translateX("+I[e]+"%);","transform: none;"]:"slideRight"===t?["transform: translateX(-"+I[e]+"%);","transform: none;"]:"slideUp"===t?["transform: translateY("+I[e]+"%);","transform: none;"]:"zoomIn"===t?["transform: scale("+(1-M[e])+");","transform: none;"]:"zoomOut"===t?["transform: scale("+(1+M[e])+");","transform: none;"]:[]},N=function(t,e){return t?t/1e3+"s":e},D=function(t,e){var n,r=R(t.type,t.size);if(r){var i=Object(a.css)(["from{",";}to{",";}"],r[0],r[1]);return Object(a.css)([""," "," "," ",""],Object(a.keyframes)(["",""],i),N(t.duration,(e.global.animation[t.type]?e.global.animation[t.type].duration:void 0)||e.global.animation.duration),N(t.delay,"0s"),"jiggle"===(n=t.type)||"pulse"===n?"alternate infinite":"rotateRight"===n||"rotateLeft"===n?"infinite linear":"forwards")}return""},F=function t(e,n){return"string"===typeof e?D({type:e},n):Array.isArray(e)?e.reduce((function(e,r,i){return Object(a.css)(["",""," ",""],e,i>0?",":"",t(r,n))}),""):"object"===typeof e?D(e,n):""},B=function(t){var e=R(t.type,t.size);return e?e[0]+" "+function(t){return"flipIn"===t.type||"flipOut"===t.type?"perspective: 1000px; transform-style: preserve-3d;":""}(t):""},z=Object(a.css)(["",";"],(function(t){return Object(a.css)([""," animation:",";"],"string"===typeof(e=t.animation)?B({type:e}):Array.isArray(e)?e.map((function(t){return B("string"===typeof t?{type:t}:t)})).join(""):"object"===typeof e?B(e):"",F(t.animation,t.theme));var e})),U=Object(a.css)(["cursor:pointer;&:hover{","}"],(function(t){return t.hoverIndicator&&Object(u.e)(t.hoverIndicator,t.theme)})),G=function(t,e){return t.theme.global.size[e]||e},V=Object(a.css)(["",";",";"],(function(t){return t.heightProp.max&&Object(a.css)(["max-height:",";"],G(t,t.heightProp.max))}),(function(t){return t.heightProp.min&&Object(a.css)(["min-height:",";"],G(t,t.heightProp.min))})),q=Object(a.css)(["height:",";"],(function(t){return G(t,t.heightProp)})),H=Object(a.css)(["",";",";",";"],(function(t){return t.widthProp.max&&Object(a.css)(["max-width:",";"],G(t,t.widthProp.max))}),(function(t){return t.widthProp.min&&Object(a.css)(["min-width:",";"],G(t,t.widthProp.min))}),(function(t){return t.widthProp.width&&Object(a.css)(["width:",";"],G(t,t.widthProp.width))})),W=Object(a.css)(["width:",";"],(function(t){return G(t,t.widthProp)})),X=a.default.div.withConfig({displayName:"StyledBox",componentId:"sc-13pk1d4-0"})(["display:flex;box-sizing:border-box;",";"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(function(t){return!t.basis&&"max-width: 100%;"}),h.g,(function(t){return t.align&&v}),(function(t){return t.alignContent&&_}),(function(t){return t.background&&Object(u.d)(t.background,t.theme)}),(function(t){return t.border&&(Array.isArray(t.border)?t.border.map((function(e){return m(e,t.responsive,t.theme)})):m(t.border,t.responsive,t.theme))}),(function(t){return t.directionProp&&function(t,e){var n=[Object(a.css)(["min-width:0;min-height:0;flex-direction:",";"],"row-responsive"===t?"row":t)];if("row-responsive"===t&&e.box.responsiveBreakpoint){var r=Object(c.b)(e,e.box.responsiveBreakpoint);r&&n.push(Object(f.a)(r,"\n        flex-direction: column;\n        flex-basis: auto;\n        justify-content: flex-start;\n        align-items: stretch;\n      "))}return n}(t.directionProp,t.theme)}),(function(t){return t.heightProp&&("object"===typeof t.heightProp?V:q)}),(function(t){return t.widthProp&&("object"===typeof t.widthProp?H:W)}),(function(t){return void 0!==t.flex&&O}),(function(t){return t.basis&&w}),(function(t){return t.fillProp&&Object(h.e)(t.fillProp)}),(function(t){return t.justify&&P}),(function(t){return t.pad&&Object(h.d)("padding",t.pad,t.responsive,t.theme.box.responsiveBreakpoint,t.theme)}),(function(t){return t.round&&function(t,e,n){var r=Object(c.b)(n,n.box.responsiveBreakpoint),i=[];if("object"===typeof t){var o=k[t.size]||n.global.edgeSize[t.size||"medium"]||t.size,s=e&&r&&r.edgeSize[t.size]&&(r.edgeSize[t.size]||t.size);"top"===t.corner?(i.push(Object(a.css)(["border-top-left-radius:",";border-top-right-radius:",";"],o,o)),s&&i.push(Object(f.a)(r,"\n          border-top-left-radius: "+s+";\n          border-top-right-radius: "+s+";\n        "))):"bottom"===t.corner?(i.push(Object(a.css)(["border-bottom-left-radius:",";border-bottom-right-radius:",";"],o,o)),s&&i.push(Object(f.a)(r,"\n          border-bottom-left-radius: "+s+";\n          border-bottom-right-radius: "+s+";\n        "))):"left"===t.corner?(i.push(Object(a.css)(["border-top-left-radius:",";border-bottom-left-radius:",";"],o,o)),s&&i.push(Object(f.a)(r,"\n          border-top-left-radius: "+s+";\n          border-bottom-left-radius: "+s+";\n        "))):"right"===t.corner?(i.push(Object(a.css)(["border-top-right-radius:",";border-bottom-right-radius:",";"],o,o)),s&&i.push(Object(f.a)(r,"\n          border-top-right-radius: "+s+";\n          border-bottom-right-radius: "+s+";\n        "))):t.corner?(i.push(Object(a.css)(["border-","-radius:",";"],t.corner,o)),s&&i.push(Object(f.a)(r,"\n          border-"+t.corner+"-radius: "+s+";\n        "))):(i.push(Object(a.css)(["border-radius:",";"],o)),s&&i.push(Object(f.a)(r,"\n          border-radius: "+s+";\n        ")))}else{var u=!0===t?"medium":t;i.push(Object(a.css)(["border-radius:",";"],k[u]||n.global.edgeSize[u]||u));var l=r&&r.edgeSize[u];l&&i.push(Object(f.a)(r,"\n        border-radius: "+l+";\n      "))}return i}(t.round,t.responsive,t.theme)}),(function(t){return t.wrapProp&&T}),(function(t){return t.overflowProp&&Object(h.k)(t.overflowProp)}),(function(t){return t.elevationProp&&x}),(function(t){return t.animation&&z}),(function(t){return t.onClick&&U}),(function(t){return t.onClick&&t.focus&&!1!==t.focusIndicator&&Object(h.f)()}),(function(t){return t.theme.box&&t.theme.box.extend}));X.defaultProps={},Object.setPrototypeOf(X.defaultProps,s.a);var Y=a.default.div.withConfig({displayName:"StyledBox__StyledBoxGap",componentId:"sc-13pk1d4-1"})(["flex:0 0 auto;align-self:stretch;",";"],(function(t){return t.gap&&function(t,e,n,r,i){var o=i.global.edgeSize[e]||e,s=Object(c.b)(i,i.box.responsiveBreakpoint),u=n&&s&&s.edgeSize[e],l=[];if("column"===t||"column-reverse"===t?(l.push("height: "+o+";"),u&&l.push(Object(f.a)(s,"height: "+u+";"))):(l.push("width: "+o+";"),u&&("row"===t||"row-reverse"===t?l.push(Object(f.a)(s,"width: "+u+";")):"row-responsive"===t&&l.push(Object(f.a)(s,"\n          width: auto;\n          height: "+u+";\n        ")))),"between"===r||r&&"between"===r.side){var h=r.size||"xsmall",p=i.global.borderSize[h]||h,y=Object(f.b)(o)/2-Object(f.b)(p)/2+"px",v=n&&s&&(s.borderSize[h]||h),b=v&&Object(f.b)(u)/2-Object(f.b)(v)/2+"px";if("column"===t||"column-reverse"===t){var _="string"===typeof r?"top":g({},r,{side:"top"});l.push(Object(a.css)(["position:relative;&:after{content:'';position:absolute;width:100%;top:",";","}"],y,m(_,n,i))),b&&l.push(Object(f.a)(s,"\n            &:after {\n              content: '';\n              top: "+b+";\n            }"))}else{var A="string"===typeof r?"left":g({},r,{side:"left"});if(l.push(Object(a.css)(["position:relative;&:after{content:'';position:absolute;height:100%;left:",";","}"],y,m(A,"row-responsive"!==t&&n,i))),b)if("row"===t||"row-reverse"===t)l.push(Object(f.a)(s,"\n              &:after {\n                content: '';\n                left: "+b+";\n              }"));else if("row-responsive"===t){var w="string"===typeof r?"top":g({},r,{side:"top"});l.push(Object(f.a)(s,"\n              &:after {\n                content: '';\n                height: auto;\n                left: unset;\n                width: 100%;\n                top: "+b+";\n                border-left: none;\n                "+d(w,i)+"\n              }"))}}}return l}(t.directionProp,t.gap,t.responsive,t.border,t.theme)}));function Z(){return Z=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},Z.apply(this,arguments)}Y.defaultProps={},Object.setPrototypeOf(Y.defaultProps,s.a);var K=Object(i.forwardRef)((function(t,e){var n=t.a11yTitle,r=t.background,c=t.border,f=t.children,h=t.direction,p=void 0===h?"column":h,d=t.elevation,m=t.fill,g=t.gap,y=t.onBlur,v=t.onClick,b=t.onFocus,_=t.overflow,A=t.responsive,w=void 0===A||A,x=t.tag,E=t.as,O=t.wrap,S=t.width,P=t.height,C=t.tabIndex,T=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,["a11yTitle","background","border","children","direction","elevation","fill","gap","onBlur","onClick","onFocus","overflow","responsive","tag","as","wrap","width","height","tabIndex"]),k=Object(i.useContext)(a.ThemeContext)||s.a.theme,I=Object(i.useMemo)((function(){return v&&!(C<0)}),[v,C]),L=Object(i.useState)(),j=L[0],M=L[1],R=Object(i.useMemo)((function(){if(I)return{onClick:v,onFocus:function(t){M(!0),b&&b(t)},onBlur:function(t){M(!1),y&&y(t)}};var t={};return y&&(t.onBlur=y),v&&(t.onClick=v),b&&(t.onFocus=b),t}),[I,v,b,y]),N=Object(i.useMemo)((function(){return void 0!==C?C:I?0:void 0}),[I,C]);("between"===c||c&&"between"===c.side)&&!g&&console.warn("Box must have a gap to use border between");var D=f;if(g&&"none"!==g){var F,B=!E&&x?x:E;D=[],i.Children.forEach(f,(function(t,e){t&&(void 0===F?F=e:D.push(o.a.createElement(Y,{key:"gap-"+e,as:"span"===B?B:"div",gap:g,directionProp:p,responsive:w,border:c}))),D.push(t)}))}if(r||k.darkChanged){var z=Object(u.c)(r,k);(void 0!==z&&z!==k.dark||k.darkChanged)&&(z=void 0===z?k.dark:z,D=o.a.createElement(a.ThemeContext.Provider,{value:Z({},k,{dark:z})},D))}var U=o.a.createElement(X,Z({as:!E&&x?x:E,"aria-label":n,background:r,border:c,ref:e,directionProp:p,elevationProp:d,fillProp:m,focus:j,overflowProp:_,wrapProp:O,widthProp:S,heightProp:P,responsive:w,tabIndex:N},R,T),D);return v&&(U=o.a.createElement(l.a,{onEnter:v},U)),U}));K.displayName="Box";var $=K},function(t,e,n){},function(t,e){t.exports=function(){var t={},e=t._fns={};return t.emit=function(t,n,r,i,o,a,s){var u=function(t){var n=e[t]?e[t]:[],r=t.indexOf(":"),i=-1===r?[t]:[t.substring(0,r),t.substring(r+1)],o=Object.keys(e),a=0,s=o.length;for(;a<s;a++){var u=o[a];if("*"===u&&(n=n.concat(e[u])),2===i.length&&i[0]===u){n=n.concat(e[u]);break}}return n}(t);u.length&&function(t,e,n){var r=0,i=e.length;for(;r<i&&e[r];r++)e[r].event=t,e[r].apply(e[r],n)}(t,u,[n,r,i,o,a,s])},t.on=function(t,n){e[t]||(e[t]=[]),e[t].push(n)},t.once=function(e,n){this.on(e,(function r(){n.apply(this,arguments),t.off(e,r)}))},t.off=function(t,e){var n=[];if(t&&e)for(var r=this._fns[t],i=0,o=r?r.length:0;i<o;i++)r[i]!==e&&n.push(r[i]);n.length?this._fns[t]=n:delete this._fns[t]},t}},function(t,e){t.exports=function(t){if("number"!==typeof t||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var e=t<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e&&(t=-t),t<1)return(e?"-":"")+t+" B";var r=Math.min(Math.floor(Math.log(t)/Math.log(1024)),n.length-1);t=Number(t/Math.pow(1024,r));var i=n[r];return t>=10||t%1===0?(e?"-":"")+t.toFixed(0)+" "+i:(e?"-":"")+t.toFixed(1)+" "+i}},function(t,e,n){"use strict";n.r(e);var r=n(224),i=n(435),o=6371008.8,a={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*o,kilometers:6371.0088,kilometres:6371.0088,meters:o,metres:o,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:o/1852,radians:1,yards:5825721.287490856};function s(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function u(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function l(t,e){void 0===e&&(e="kilometers");var n=a[e];if(!n)throw new Error(e+" units is invalid");return t*n}function c(t,e){void 0===e&&(e="kilometers");var n=a[e];if(!n)throw new Error(e+" units is invalid");return t/n}function f(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function h(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}var p=function(){return new d};function d(){this.reset()}d.prototype={constructor:d,reset:function(){this.s=this.t=0},add:function(t){g(m,t,this.t),g(this,m.s,this.s),this.s?this.t+=m.t:this.s=m.t},valueOf:function(){return this.s}};var m=new d;function g(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var y=1e-6,v=Math.PI,b=v/2,_=v/4,A=2*v,w=180/v,x=v/180,E=Math.abs,O=Math.atan,S=Math.atan2,P=Math.cos,C=(Math.ceil,Math.exp),T=(Math.floor,Math.log),k=(Math.pow,Math.sin),I=(Math.sign,Math.sqrt),L=Math.tan;function j(t){return t>1?0:t<-1?v:Math.acos(t)}function M(t){return t>1?b:t<-1?-b:Math.asin(t)}function R(){}function N(t,e){t&&F.hasOwnProperty(t.type)&&F[t.type](t,e)}var D={Feature:function(t,e){N(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)N(n[r].geometry,e)}},F={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){B(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)B(n[r],e,0)},Polygon:function(t,e){z(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)z(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)N(n[r],e)}};function B(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function z(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)B(t[n],e,1);e.polygonEnd()}var U=function(t,e){t&&D.hasOwnProperty(t.type)?D[t.type](t,e):N(t,e)};p(),p();function G(t){return[S(t[1],t[0]),M(t[2])]}function V(t){var e=t[0],n=t[1],r=P(n);return[r*P(e),r*k(e),k(n)]}function q(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function H(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function W(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function X(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Y(t){var e=I(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}p();var Z=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function K(t,e){return[t>v?t-A:t<-v?t+A:t,e]}function $(t,e,n){return(t%=A)?e||n?Z(Q(t),tt(e,n)):Q(t):e||n?tt(e,n):K}function J(t){return function(e,n){return[(e+=t)>v?e-A:e<-v?e+A:e,n]}}function Q(t){var e=J(t);return e.invert=J(-t),e}function tt(t,e){var n=P(t),r=k(t),i=P(e),o=k(e);function a(t,e){var a=P(e),s=P(t)*a,u=k(t)*a,l=k(e),c=l*n+s*r;return[S(u*i-c*o,s*n-l*r),M(c*i+u*o)]}return a.invert=function(t,e){var a=P(e),s=P(t)*a,u=k(t)*a,l=k(e),c=l*i-u*o;return[S(u*i+l*o,s*n+c*r),M(c*n-s*r)]},a}K.invert=K;function et(t,e,n,r,i,o){if(n){var a=P(e),s=k(e),u=r*n;null==i?(i=e+r*A,o=e-u/2):(i=nt(a,i),o=nt(a,o),(r>0?i<o:i>o)&&(i+=r*A));for(var l,c=i;r>0?c>o:c<o;c-=u)l=G([a,-s*P(c),-s*k(c)]),t.point(l[0],l[1])}}function nt(t,e){(e=V(e))[0]-=t,Y(e);var n=j(-e[1]);return((-e[2]<0?-n:n)+A-y)%A}var rt=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:R,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},it=function(t,e){return E(t[0]-e[0])<y&&E(t[1]-e[1])<y};function ot(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var at=function(t,e,n,r,i){var o,a,s=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(it(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else s.push(n=new ot(r,t,null,!0)),u.push(n.o=new ot(r,null,n,!1)),s.push(n=new ot(a,t,null,!1)),u.push(n.o=new ot(a,null,n,!0))}})),s.length){for(u.sort(e),st(s),st(u),o=0,a=u.length;o<a;++o)u[o].e=n=!n;for(var l,c,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=l.length;o<a;++o)i.point((c=l[o])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((c=l[o])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function st(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var ut=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var lt,ct;1===(lt=ut).length&&(ct=lt,lt=function(t,e){return ut(ct(t),e)});var ft=Array.prototype;ft.slice,ft.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var ht=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n};var pt=1e9,dt=-pt;function mt(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,l){var c=0,f=0;if(null==i||(c=a(i,s))!==(f=a(o,s))||u(i,o)<0^s>0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+s+4)%4)!==f);else l.point(o[0],o[1])}function a(r,i){return E(r[0]-t)<y?i>0?0:3:E(r[0]-n)<y?i>0?2:1:E(r[1]-e)<y?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var u,l,c,f,h,p,d,m,g,y,v,b=a,_=rt(),A={point:w,lineStart:function(){A.point=x,l&&l.push(c=[]);y=!0,g=!1,d=m=NaN},lineEnd:function(){u&&(x(f,h),p&&g&&_.rejoin(),u.push(_.result()));A.point=w,g&&b.lineEnd()},polygonStart:function(){b=_,u=[],l=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var o,a,s=l[n],u=1,c=s.length,f=s[0],h=f[0],p=f[1];u<c;++u)o=h,a=p,h=(f=s[u])[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=v&&e,i=(u=ht(u)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&at(u,s,e,o,a),a.polygonEnd());b=a,u=l=c=null}};function w(t,e){i(t,e)&&b.point(t,e)}function x(o,a){var s=i(o,a);if(l&&c.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&g)b.point(o,a);else{var u=[d=Math.max(dt,Math.min(pt,d)),m=Math.max(dt,Math.min(pt,m))],_=[o=Math.max(dt,Math.min(pt,o)),a=Math.max(dt,Math.min(pt,a))];!function(t,e,n,r,i,o){var a,s=t[0],u=t[1],l=0,c=1,f=e[0]-s,h=e[1]-u;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<c&&(c=a)}else if(f>0){if(a>c)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<c&&(c=a)}if(a=r-u,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>l&&(l=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<c&&(c=a)}return l>0&&(t[0]=s+l*f,t[1]=u+l*h),c<1&&(e[0]=s+c*f,e[1]=u+c*h),!0}}}}}(u,_,t,e,n,r)?s&&(b.lineStart(),b.point(o,a),v=!1):(g||(b.lineStart(),b.point(u[0],u[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}d=o,m=a,g=s}return A}}var gt=p(),yt=function(t,e){var n=e[0],r=e[1],i=[k(n),-P(n),0],o=0,a=0;gt.reset();for(var s=0,u=t.length;s<u;++s)if(c=(l=t[s]).length)for(var l,c,f=l[c-1],h=f[0],p=f[1]/2+_,d=k(p),m=P(p),g=0;g<c;++g,h=w,d=E,m=O,f=b){var b=l[g],w=b[0],x=b[1]/2+_,E=k(x),O=P(x),C=w-h,T=C>=0?1:-1,I=T*C,L=I>v,j=d*E;if(gt.add(S(j*T*k(I),m*O+j*P(I))),o+=L?C+T*A:C,L^h>=n^w>=n){var R=H(V(f),V(b));Y(R);var N=H(i,R);Y(N);var D=(L^C>=0?-1:1)*M(N[2]);(r>D||r===D&&(R[0]||R[1]))&&(a+=L^C>=0?1:-1)}}return(o<-y||o<y&&gt<-y)^1&a};p();var vt=function(t){return t};p(),p();var bt=1/0,_t=bt,At=-bt,wt=At,xt={point:function(t,e){t<bt&&(bt=t);t>At&&(At=t);e<_t&&(_t=e);e>wt&&(wt=e)},lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R,result:function(){var t=[[bt,_t],[At,wt]];return At=wt=-(_t=bt=1/0),t}};var Et=xt;function Ot(t){this._context=t}Ot.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,A)}},result:R};p();function St(){this._string=[]}function Pt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}St.prototype={_radius:4.5,_circle:Pt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Pt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Ct=function(t,e,n,r){return function(i,o){var a,s,u,l=e(o),c=i.invert(r[0],r[1]),f=rt(),h=e(f),p=!1,d={point:m,lineStart:y,lineEnd:v,polygonStart:function(){d.point=b,d.lineStart=_,d.lineEnd=A,s=[],a=[]},polygonEnd:function(){d.point=m,d.lineStart=y,d.lineEnd=v,s=ht(s);var t=yt(a,c);s.length?(p||(o.polygonStart(),p=!0),at(s,kt,t,n,o)):t&&(p||(o.polygonStart(),p=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),p&&(o.polygonEnd(),p=!1),s=a=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function m(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function g(t,e){var n=i(t,e);l.point(n[0],n[1])}function y(){d.point=g,l.lineStart()}function v(){d.point=m,l.lineEnd()}function b(t,e){u.push([t,e]);var n=i(t,e);h.point(n[0],n[1])}function _(){h.lineStart(),u=[]}function A(){b(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),l=f.result(),c=l.length;if(u.pop(),a.push(u),u=null,c)if(1&i){if((e=(n=l[0]).length-1)>0){for(p||(o.polygonStart(),p=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else c>1&&2&i&&l.push(l.pop().concat(l.shift())),s.push(l.filter(Tt))}return d}};function Tt(t){return t.length>1}function kt(t,e){return((t=t.x)[0]<0?t[1]-b-y:b-t[1])-((e=e.x)[0]<0?e[1]-b-y:b-e[1])}var It=Ct((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?v:-v,u=E(o-n);E(u-v)<y?(t.point(n,r=(r+a)/2>0?b:-b),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=v&&(E(n-i)<y&&(n-=i*y),E(o-s)<y&&(o-=s*y),r=function(t,e,n,r){var i,o,a=k(t-n);return E(a)>y?O((k(e)*(o=P(r))*k(n)-k(r)*(i=P(e))*k(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*b,r.point(-v,i),r.point(0,i),r.point(v,i),r.point(v,0),r.point(v,-i),r.point(0,-i),r.point(-v,-i),r.point(-v,0),r.point(-v,i);else if(E(t[0]-e[0])>y){var o=t[0]<e[0]?v:-v;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-v,-b]);var Lt=function(t,e){var n=P(t),r=n>0,i=E(n)>y;function o(t,e){return P(t)*P(e)>n}function a(t,e,r){var i=[1,0,0],o=H(V(t),V(e)),a=q(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var l=n*a/u,c=-n*s/u,f=H(i,o),h=X(i,l);W(h,X(o,c));var p=f,d=q(h,p),m=q(p,p),g=d*d-m*(q(h,h)-1);if(!(g<0)){var b=I(g),_=X(p,(-d-b)/m);if(W(_,h),_=G(_),!r)return _;var A,w=t[0],x=e[0],O=t[1],S=e[1];x<w&&(A=w,w=x,x=A);var P=x-w,C=E(P-v)<y;if(!C&&S<O&&(A=O,O=S,S=A),C||P<y?C?O+S>0^_[1]<(E(_[0]-w)<y?O:S):O<=_[1]&&_[1]<=S:P>v^(w<=_[0]&&_[0]<=x)){var T=X(p,(-d+b)/m);return W(T,h),[_,G(T)]}}}function s(e,n){var i=r?t:v-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Ct(o,(function(t){var e,n,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var p,d=[f,h],m=o(f,h),g=r?m?0:s(f,h):m?s(f+(f<0?v:-v),h):0;if(!e&&(l=u=m)&&t.lineStart(),m!==u&&(!(p=a(e,d))||it(e,p)||it(d,p))&&(d[0]+=y,d[1]+=y,m=o(d[0],d[1])),m!==u)c=0,m?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^m){var b;g&n||!(b=a(d,e,!0))||(c=0,r?(t.lineStart(),t.point(b[0][0],b[0][1]),t.point(b[1][0],b[1][1]),t.lineEnd()):(t.point(b[1][0],b[1][1]),t.lineEnd(),t.lineStart(),t.point(b[0][0],b[0][1])))}!m||e&&it(e,d)||t.point(d[0],d[1]),e=d,u=m,n=g},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return c|(l&&u)<<1}}}),(function(n,r,i,o){et(o,t,e,i,n,r)}),r?[0,-t]:[-v,t-v])};function jt(t){return function(e){var n=new Mt;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Mt(){}function Rt(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),U(n,t.stream(Et));var a=Et.result(),s=Math.min(r/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),u=+e[0][0]+(r-s*(a[1][0]+a[0][0]))/2,l=+e[0][1]+(i-s*(a[1][1]+a[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*s).translate([u,l])}function Nt(t,e,n){return Rt(t,[[0,0],e],n)}Mt.prototype={constructor:Mt,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Dt=P(30*x),Ft=function(t,e){return+e?function(t,e){function n(r,i,o,a,s,u,l,c,f,h,p,d,m,g){var v=l-r,b=c-i,_=v*v+b*b;if(_>4*e&&m--){var A=a+h,w=s+p,x=u+d,O=I(A*A+w*w+x*x),P=M(x/=O),C=E(E(x)-1)<y||E(o-f)<y?(o+f)/2:S(w,A),T=t(C,P),k=T[0],L=T[1],j=k-r,R=L-i,N=b*j-v*R;(N*N/_>e||E((v*j+b*R)/_-.5)>.3||a*h+s*p+u*d<Dt)&&(n(r,i,o,a,s,u,k,L,C,A/=O,w/=O,x,m,g),g.point(k,L),n(k,L,C,A,w,x,l,c,f,h,p,d,m,g))}}return function(e){var r,i,o,a,s,u,l,c,f,h,p,d,m={point:g,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),m.lineStart=_},polygonEnd:function(){e.polygonEnd(),m.lineStart=y}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){c=NaN,m.point=v,e.lineStart()}function v(r,i){var o=V([r,i]),a=t(r,i);n(c,f,l,h,p,d,c=a[0],f=a[1],l=r,h=o[0],p=o[1],d=o[2],16,e),e.point(c,f)}function b(){m.point=g,e.lineEnd()}function _(){y(),m.point=A,m.lineEnd=w}function A(t,e){v(r=t,e),i=c,o=f,a=h,s=p,u=d,m.point=v}function w(){n(c,f,l,h,p,d,i,o,r,a,s,u,16,e),m.lineEnd=b,b()}return m}}(t,e):function(t){return jt({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var Bt=jt({point:function(t,e){this.stream.point(t*x,e*x)}});function zt(t){return Ut((function(){return t}))()}function Ut(t){var e,n,r,i,o,a,s,u,l,c,f=150,h=480,p=250,d=0,m=0,g=0,y=0,v=0,b=null,_=It,A=null,E=vt,O=.5,S=Ft(T,O);function P(t){return[(t=o(t[0]*x,t[1]*x))[0]*f+n,r-t[1]*f]}function C(t){return(t=o.invert((t[0]-n)/f,(r-t[1])/f))&&[t[0]*w,t[1]*w]}function T(t,i){return[(t=e(t,i))[0]*f+n,r-t[1]*f]}function k(){o=Z(i=$(g,y,v),e);var t=e(d,m);return n=h-t[0]*f,r=p+t[1]*f,L()}function L(){return l=c=null,P}return P.stream=function(t){return l&&c===t?l:l=Bt(_(i,S(E(c=t))))},P.clipAngle=function(t){return arguments.length?(_=+t?Lt(b=t*x,6*x):(b=null,It),L()):b*w},P.clipExtent=function(t){return arguments.length?(E=null==t?(A=a=s=u=null,vt):mt(A=+t[0][0],a=+t[0][1],s=+t[1][0],u=+t[1][1]),L()):null==A?null:[[A,a],[s,u]]},P.scale=function(t){return arguments.length?(f=+t,k()):f},P.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],k()):[h,p]},P.center=function(t){return arguments.length?(d=t[0]%360*x,m=t[1]%360*x,k()):[d*w,m*w]},P.rotate=function(t){return arguments.length?(g=t[0]%360*x,y=t[1]%360*x,v=t.length>2?t[2]%360*x:0,k()):[g*w,y*w,v*w]},P.precision=function(t){return arguments.length?(S=Ft(T,O=t*t),L()):I(O)},P.fitExtent=function(t,e){return Rt(P,t,e)},P.fitSize=function(t,e){return Nt(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&C,k()}}function Gt(t){return function(e,n){var r=P(e),i=P(n),o=t(r*i);return[o*i*k(e),o*k(n)]}}function Vt(t){return function(e,n){var r=I(e*e+n*n),i=t(r),o=k(i),a=P(i);return[S(e*o,r*a),M(r&&n*o/r)]}}var qt=Gt((function(t){return I(2/(1+t))}));qt.invert=Vt((function(t){return 2*M(t/2)}));var Ht=Gt((function(t){return(t=j(t))&&t/k(t)}));Ht.invert=Vt((function(t){return t}));function Wt(t,e){return[t,T(L((b+e)/2))]}Wt.invert=function(t,e){return[t,2*O(C(e))-b]};function Xt(t,e){return[t,e]}Xt.invert=Xt;function Yt(t,e){var n=P(e),r=P(t)*n;return[n*k(t)/r,k(e)/r]}Yt.invert=Vt(O);function Zt(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Zt.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(E(n)>y&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};function Kt(t,e){return[P(e)*k(t),k(e)]}Kt.invert=Vt(M);function $t(t,e){var n=P(e),r=1+P(t)*n;return[n*k(t)/r,k(e)/r]}$t.invert=Vt((function(t){return 2*O(t)}));function Jt(t,e){return[T(L((b+e)/2)),-t]}Jt.invert=function(t,e){return[-e,2*O(C(t))-b]};function Qt(t,e,n,a){var f=t.properties||{},p="Feature"===t.type?t.geometry:t;if("GeometryCollection"===p.type){var d=[];return h(t,(function(t){var r=Qt(t,e,n,a);r&&d.push(r)})),u(d)}var m=function(t){var e=Object(r.default)(t).geometry.coordinates,n=[-e[0],-e[1]];return zt(Ht).scale(79.4188).clipAngle(179.999).rotate(n).scale(o)}(p),g={type:p.type,coordinates:ee(p.coordinates,m)},y=(new i.GeoJSONReader).read(g),v=l(c(e,n),"meters"),b=i.BufferOp.bufferOp(y,v,a);if(!te((b=(new i.GeoJSONWriter).write(b)).coordinates))return s({type:b.type,coordinates:ne(b.coordinates,m)},f)}function te(t){return Array.isArray(t[0])?te(t[0]):isNaN(t[0])}function ee(t,e){return"object"!==typeof t[0]?e(t):t.map((function(t){return ee(t,e)}))}function ne(t,e){return"object"!==typeof t[0]?e.invert(t):t.map((function(t){return ne(t,e)}))}e.default=function(t,e,n){var r=(n=n||{}).units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!==typeof n)throw new Error("options must be an object");if("number"!==typeof i)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var o=[];switch(t.type){case"GeometryCollection":return h(t,(function(t){var n=Qt(t,e,r,i);n&&o.push(n)})),u(o);case"FeatureCollection":return f(t,(function(t){var n=Qt(t,e,r,i);n&&f(n,(function(t){t&&o.push(t)}))})),u(o)}return Qt(t,e,r,i)}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return R})),n.d(e,"WebMercatorViewport",(function(){return R})),n.d(e,"getBounds",(function(){return j})),n.d(e,"fitBounds",(function(){return I})),n.d(e,"normalizeViewportProps",(function(){return F})),n.d(e,"flyToViewport",(function(){return U})),n.d(e,"getFlyToDuration",(function(){return G})),n.d(e,"lngLatToWorld",(function(){return b})),n.d(e,"worldToLngLat",(function(){return _})),n.d(e,"worldToPixels",(function(){return T})),n.d(e,"pixelsToWorld",(function(){return k})),n.d(e,"zoomToScale",(function(){return y})),n.d(e,"scaleToZoom",(function(){return v})),n.d(e,"altitudeToFovy",(function(){return P})),n.d(e,"fovyToAltitude",(function(){return C})),n.d(e,"getMeterZoom",(function(){return A})),n.d(e,"getDistanceScales",(function(){return w})),n.d(e,"addMetersToLngLat",(function(){return x})),n.d(e,"getViewMatrix",(function(){return E})),n.d(e,"getProjectionMatrix",(function(){return S})),n.d(e,"getProjectionParameters",(function(){return O}));var r=n(33);function i(t,e){const n=r.n([],e,t);return r.k(n,n,1/n[3]),n}function o(t,e){const n=t%e;return n<0?e+n:n}const a=Math.log2||function(t){return Math.log(t)*Math.LOG2E};var s=n(13),u=n(26),l=n(23);function c(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}const f=Math.PI,h=f/4,p=f/180,d=180/f,m=512,g=4003e4;function y(t){return Math.pow(2,t)}function v(t){return a(t)}function b([t,e]){c(Number.isFinite(t)),c(Number.isFinite(e)&&e>=-90&&e<=90,"invalid latitude");const n=e*p;return[m*(t*p+f)/(2*f),m*(f+Math.log(Math.tan(h+.5*n)))/(2*f)]}function _([t,e]){const n=t/m*(2*f)-f,r=2*(Math.atan(Math.exp(e/m*(2*f)-f))-h);return[n*d,r*d]}function A({latitude:t}){c(Number.isFinite(t));const e=Math.cos(t*p);return v(g*e)-9}function w({latitude:t,longitude:e,highPrecision:n=!1}){c(Number.isFinite(t)&&Number.isFinite(e));const r={},i=Math.cos(t*p),o=512/360,a=o/i,s=12790407194604047e-21/i;if(r.unitsPerMeter=[s,s,s],r.metersPerUnit=[1/s,1/s,1/s],r.unitsPerDegree=[o,a,s],r.degreesPerUnit=[.703125,1/a,1/s],n){const e=p*Math.tan(t*p)/i,n=o*e/2,u=12790407194604047e-21*e,l=u/a*s;r.unitsPerDegree2=[0,n,u],r.unitsPerMeter2=[l,0,l]}return r}function x(t,e){const[n,r,i]=t,[o,a,s]=e,{unitsPerMeter:u,unitsPerMeter2:l}=w({longitude:n,latitude:r,highPrecision:!0}),c=b(t);c[0]+=o*(u[0]+l[0]*a),c[1]+=a*(u[1]+l[1]*a);const f=_(c),h=(i||0)+(s||0);return Number.isFinite(i)||Number.isFinite(s)?[f[0],f[1],h]:f}function E({height:t,pitch:e,bearing:n,altitude:r,scale:i,center:o=null}){const a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return s.p(a,a,[0,0,-r]),s.l(a,a,-e*p),s.n(a,a,n*p),i/=t,s.o(a,a,[i,i,i]),o&&s.p(a,a,l.l([],o)),a}function O({width:t,height:e,fovy:n=P(1.5),altitude:r,pitch:i=0,nearZMultiplier:o=1,farZMultiplier:a=1}){void 0!==r&&(n=P(r));const s=.5*n*p,u=C(n),l=i*p,c=Math.sin(s)*u/Math.sin(Math.min(Math.max(Math.PI/2-l-s,.01),Math.PI-.01));return{fov:2*s,aspect:t/e,focalDistance:u,near:o,far:(Math.sin(l)*c+u)*a}}function S({width:t,height:e,pitch:n,altitude:r,fovy:i,nearZMultiplier:o,farZMultiplier:a}){const{fov:u,aspect:l,near:c,far:f}=O({width:t,height:e,altitude:r,fovy:i,pitch:n,nearZMultiplier:o,farZMultiplier:a});return s.j([],u,l,c,f)}function P(t){return 2*Math.atan(.5/t)*d}function C(t){return.5/Math.tan(.5*t*p)}function T(t,e){const[n,r,o=0]=t;return c(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(o)),i(e,[n,r,o,1])}function k(t,e,n=0){const[r,o,a]=t;if(c(Number.isFinite(r)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a)){return i(e,[r,o,a,1])}const s=i(e,[r,o,0,1]),l=i(e,[r,o,1,1]),f=s[2],h=l[2],p=f===h?0:((n||0)-f)/(h-f);return u.c([],s,l,p)}function I({width:t,height:e,bounds:n,minExtent:r=0,maxZoom:i=24,padding:o=0,offset:s=[0,0]}){const[[u,l],[f,h]]=n;if(Number.isFinite(o)){o={top:o,bottom:o,left:o,right:o}}else c(Number.isFinite(o.top)&&Number.isFinite(o.bottom)&&Number.isFinite(o.left)&&Number.isFinite(o.right));const p=new R({width:t,height:e,longitude:0,latitude:0,zoom:0}),d=p.project([u,h]),m=p.project([f,l]),g=[Math.max(Math.abs(m[0]-d[0]),r),Math.max(Math.abs(m[1]-d[1]),r)],y=[t-o.left-o.right-2*Math.abs(s[0]),e-o.top-o.bottom-2*Math.abs(s[1])];c(y[0]>0&&y[1]>0);const v=y[0]/g[0],b=y[1]/g[1],_=(o.right-o.left)/2/v,A=(o.bottom-o.top)/2/b,w=[(m[0]+d[0])/2+_,(m[1]+d[1])/2+A],x=p.unproject(w),E=Math.min(i,p.zoom+a(Math.abs(Math.min(v,b))));return c(Number.isFinite(E)),{longitude:x[0],latitude:x[1],zoom:E}}const L=Math.PI/180;function j(t,e=0){const{width:n,height:r,unproject:i}=t,o={targetZ:e},a=i([0,r],o),s=i([n,r],o);let u,l;return(t.fovy?.5*t.fovy*L:Math.atan(.5/t.altitude))>(90-t.pitch)*L-.01?(u=M(t,0,e),l=M(t,n,e)):(u=i([0,0],o),l=i([n,0],o)),[a,s,l,u]}function M(t,e,n){const{pixelUnprojectionMatrix:r}=t,o=i(r,[e,0,1,1]),a=i(r,[e,t.height,1,1]),s=(n*t.distanceScales.unitsPerMeter[2]-o[2])/(a[2]-o[2]),l=_(u.c([],o,a,s));return l[2]=n,l}class R{constructor({width:t,height:e,latitude:n=0,longitude:r=0,zoom:i=0,pitch:o=0,bearing:a=0,altitude:s=null,fovy:u=null,position:c=null,nearZMultiplier:f=.02,farZMultiplier:h=1.01}={width:1,height:1}){t=t||1,e=e||1,null===u&&null===s?u=P(s=1.5):null===u?u=P(s):null===s&&(s=C(u));const p=y(i);s=Math.max(.75,s);const d=w({longitude:r,latitude:n}),m=b([r,n]);m[2]=0,c&&l.a(m,m,l.k([],c,d.unitsPerMeter)),this.projectionMatrix=S({width:t,height:e,pitch:o,fovy:u,nearZMultiplier:f,farZMultiplier:h}),this.viewMatrix=E({height:e,scale:p,center:m,pitch:o,bearing:a,altitude:s}),this.width=t,this.height=e,this.scale=p,this.latitude=n,this.longitude=r,this.zoom=i,this.pitch=o,this.bearing=a,this.altitude=s,this.fovy=u,this.center=m,this.meterOffset=c||[0,0,0],this.distanceScales=d,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];s.h(i,i,n),s.h(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];s.o(o,o,[t/2,-e/2,1]),s.p(o,o,[1,-1,0]),s.h(o,o,i);const a=s.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!a)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=a}equals(t){return t instanceof R&&(t.width===this.width&&t.height===this.height&&s.b(t.projectionMatrix,this.projectionMatrix)&&s.b(t.viewMatrix,this.viewMatrix))}project(t,{topLeft:e=!0}={}){const n=T(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,a=e?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],u=k([r,a,o],this.pixelUnprojectionMatrix,s),[l,c,f]=this.unprojectPosition(u);return Number.isFinite(o)?[l,c,f]:Number.isFinite(n)?[l,c,n]:[l,c]}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=k(e,this.pixelUnprojectionMatrix),r=b(t),i=u.a([],r,u.d([],n));return _(u.a([],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:a}=I(Object.assign({width:n,height:r,bounds:t},e));return new R({width:n,height:r,longitude:i,latitude:o,zoom:a})}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 j(this,t.z||0)}}const N=85.05113,D=-85.05113;function F({width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:s=0,bearing:u=0}){(n<-180||n>180)&&(n=o(n+180,360)-180),(u<-180||u>180)&&(u=o(u+180,360)-180);let l=new R({width:t,height:e,longitude:n,latitude:r,zoom:i}),c=l.project([n,N])[1],f=l.project([n,D])[1],h=0;return f-c<e&&(i+=a(e/(f-c)),l=new R({width:t,height:e,longitude:n,latitude:r,zoom:i}),c=l.project([n,N])[1],f=l.project([n,D])[1]),c>0?h=c:f<e&&(h=f-e),h&&(r=l.unproject([t/2,e/2+h])[1]),{width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:s,bearing:u}}const B=["longitude","latitude","zoom"],z={curve:1.414,speed:1.2};function U(t,e,n,r={}){const i={},{startZoom:o,startCenterXY:a,uDelta:s,w0:l,u1:c,S:f,rho:h,rho2:p,r0:d}=V(t,e,r);if(c<.01){for(const r of B){const o=t[r],a=e[r];i[r]=(m=n)*a+(1-m)*o}return i}var m;const g=n*f,y=Math.cosh(d)/Math.cosh(d+h*g),b=l*((Math.cosh(d)*Math.tanh(d+h*g)-Math.sinh(d))/p)/c,A=o+v(1/y),w=u.e([],s,b);u.a(w,w,a);const x=_(w);return i.longitude=x[0],i.latitude=x[1],i.zoom=A,i}function G(t,e,n={}){n=Object.assign({},z,n);const{screenSpeed:r,speed:i,maxDuration:o}=n,{S:a,rho:s}=V(t,e,n),u=1e3*a;let l;return l=Number.isFinite(r)?u/(r/s):u/i,Number.isFinite(o)&&l>o?0:l}function V(t,e,n){const r=(n=Object.assign({},z,n)).curve,i=t.zoom,o=[t.longitude,t.latitude],a=y(i),s=e.zoom,l=[e.longitude,e.latitude],c=y(s-i),f=b(o),h=b(l),p=u.f([],h,f),d=Math.max(t.width,t.height),m=d/c,g=u.b(p)*a,v=Math.max(g,.01),_=r*r,A=(m*m-d*d+_*_*v*v)/(2*d*_*v),w=(m*m-d*d-_*_*v*v)/(2*m*_*v),x=Math.log(Math.sqrt(A*A+1)-A),E=Math.log(Math.sqrt(w*w+1)-w);return{startZoom:i,startCenterXY:f,uDelta:p,w0:d,u1:g,S:(E-x)/r,rho:r,rho2:_,r0:x,r1:E}}},function(t,e,n){"use strict";n.r(e);var r=n(180),i=6371008.8,o={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*i,kilometers:6371.0088,kilometres:6371.0088,meters:i,metres:i,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:i/1852,radians:1,yards:5825721.287490856};function a(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!h(t[0])||!h(t[1]))throw new Error("coordinates must contain numbers");return a({type:"Point",coordinates:t},e,n)}function u(t,e){void 0===e&&(e="kilometers");var n=o[e];if(!n)throw new Error(e+" units is invalid");return t/n}function l(t){return 180*(t%(2*Math.PI))/Math.PI}function c(t){return t%360*Math.PI/180}function f(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return function(t,e){void 0===e&&(e="kilometers");var n=o[e];if(!n)throw new Error(e+" units is invalid");return t*n}(u(t,e),n)}function h(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function p(t){return!!t&&t.constructor===Object}function d(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")}function m(t,e){var n=c(t[1]),r=c(e[1]),i=c(e[0]-t[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(l(Math.atan2(i,o))+360)%360}var g=function(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?m(d(e),d(t)):m(d(t),d(e)))>180?-(360-r):r};var y=function(t,e,n){void 0===n&&(n={});var r=d(t),o=d(e);o[0]+=o[0]-r[0]>180?-360:r[0]-o[0]>180?360:0;var a=function(t,e,n){var r=n=void 0===n?i:Number(n),o=t[1]*Math.PI/180,a=e[1]*Math.PI/180,s=a-o,u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var l=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?s/l:Math.cos(o);return Math.sqrt(s*s+c*c*u*u)*r}(r,o);return f(a,"meters",n.units)};var v=function(t,e,n,r){void 0===r&&(r={});var o=e<0,a=f(Math.abs(e),r.units,"meters");o&&(a=-Math.abs(a));var u=d(t),l=function(t,e,n,r){r=void 0===r?i:Number(r);var o=e/r,a=t[0]*Math.PI/180,s=c(t[1]),u=c(n),l=o*Math.cos(u),f=s+l;Math.abs(f)>Math.PI/2&&(f=f>0?Math.PI-f:-Math.PI-f);var h=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),p=Math.abs(h)>1e-11?l/h:Math.cos(s),d=o*Math.sin(u)/p;return[(180*(a+d)/Math.PI+540)%360-180,180*f/Math.PI]}(u,a,n);return l[0]+=l[0]-u[0]>180?-360:u[0]-l[0]>180?360:0,s(l,r.properties)};function b(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=_(t.properties),e.geometry=A(t.geometry),e}function _(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"===typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=_(r):e[n]=r})),e):e}function A(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return A(t)})),e):(e.coordinates=w(t.coordinates),e)}function w(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map((function(t){return w(t)}))}var x=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return b(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return b(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return A(t);default:throw new Error("unknown GeoJSON type")}};function E(t,e,n){if(null!==t)for(var r,i,o,a,s,u,l,c,f=0,h=0,p=t.type,d="FeatureCollection"===p,m="Feature"===p,g=d?t.features.length:1,y=0;y<g;y++){s=(c=!!(l=d?t.features[y].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var v=0;v<s;v++){var b=0,_=0;if(null!==(a=c?l.geometries[v]:l)){u=a.coordinates;var A=a.type;switch(f=!n||"Polygon"!==A&&"MultiPolygon"!==A?0:1,A){case null:break;case"Point":if(!1===e(u,h,y,b,_))return!1;h++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],h,y,b,_))return!1;h++,"MultiPoint"===A&&b++}"LineString"===A&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===e(u[r][i],h,y,b,_))return!1;h++}"MultiLineString"===A&&b++,"Polygon"===A&&_++}"Polygon"===A&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(_=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-f;o++){if(!1===e(u[r][i][o],h,y,b,_))return!1;h++}_++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===E(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}e.default=function(t,e,n){if(!p(n=n||{}))throw new Error("options is invalid");var i=n.pivot,o=n.mutate;if(!t)throw new Error("geojson is required");if(void 0===e||null===e||isNaN(e))throw new Error("angle is required");return 0===e||(i||(i=Object(r.default)(t)),!1!==o&&void 0!==o||(t=x(t)),E(t,(function(t){var n=g(i,t)+e,r=y(i,t),o=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(v(i,r,n));t[0]=o[0],t[1]=o[1]}))),t}},function(t,e,n){"use strict";n.r(e);var r=n(684),i=n.n(r),o={name:"my theme",rounding:0,spacing:20,themeMode:"dark",global:{colors:{brand:{dark:i.a.highlightColor,light:i.a.highlightColor},background:{dark:"#111111",light:"#FFFFFF"},"background-back":{dark:"#111111",light:"#EEEEEE"},"background-front":{dark:"#222222",light:"#FFFFFF"},"background-contrast":{dark:"#FFFFFF11",light:"#11111111"},text:{dark:"#FBF7F7",light:"#262626"},"text-strong":{dark:"#FFFFFF",light:"#000000"},"text-weak":{dark:"#CCCCCC",light:"#444444"},"text-xweak":{dark:"#999999",light:"#666666"},border:{dark:"#444444",light:"#CCCCCC"},control:"brand","active-background":"background-contrast","active-text":"text-strong","selected-background":"brand","selected-text":"text-strong","status-critical":"#FF4040","status-warning":"#FFAA15","status-ok":"#00C781","status-unknown":"#CCCCCC","status-disabled":"#CCCCCC","graph-0":"brand","graph-1":"status-warning"},font:{family:"Helvetica",size:"15px",height:"20px",maxWidth:"300px"},active:{background:"active-background",color:"active-text"},hover:{background:"active-background",color:"active-text"},selected:{background:"selected-background",color:"selected-text"},borderSize:{xsmall:"1px",small:"2px",medium:"3px",large:"10px",xlarge:"20px"},breakpoints:{small:{value:640,borderSize:{xsmall:"1px",small:"2px",medium:"3px",large:"5px",xlarge:"10px"},edgeSize:{none:"0px",hair:"1px",xxsmall:"2px",xsmall:"3px",small:"5px",medium:"10px",large:"20px",xlarge:"40px"},size:{xxsmall:"20px",xsmall:"40px",small:"80px",medium:"160px",large:"320px",xlarge:"640px",full:"100%"}},medium:{value:1280},large:{}},edgeSize:{none:"0px",hair:"1px",xxsmall:"3px",xsmall:"5px",small:"10px",medium:"20px",large:"40px",xlarge:"80px",responsiveBreakpoint:"small"},input:{padding:"10px",weight:600},spacing:"20px",size:{xxsmall:"40px",xsmall:"80px",small:"160px",medium:"320px",large:"640px",xlarge:"960px",xxlarge:"1280px",full:"100%"},control:{border:{radius:"0px"}},drop:{border:{radius:"0px"}}},chart:{},diagram:{line:{}},meter:{},layer:{background:{dark:"#111111",light:"#FFFFFF"}},button:{border:{width:"2px",radius:"15px"},padding:{vertical:"3px",horizontal:"18px"}},calendar:{small:{fontSize:"11.666666666666666px",lineHeight:1.375,daySize:"22.86px"},medium:{fontSize:"15px",lineHeight:1.45,daySize:"45.71px"},large:{fontSize:"25px",lineHeight:1.11,daySize:"91.43px"}},checkBox:{size:"20px",toggle:{radius:"20px",size:"40px"},check:{radius:"0px"}},clock:{analog:{hour:{width:"7px",size:"20px"},minute:{width:"3px",size:"10px"},second:{width:"3px",size:"8px"},size:{small:"60px",medium:"80px",large:"120px",xlarge:"180px",huge:"240px"}},digital:{text:{xsmall:{size:"8.333333333333332px",height:1.5},small:{size:"11.666666666666666px",height:1.43},medium:{size:"15px",height:1.375},large:{size:"18.333333333333332px",height:1.167},xlarge:{size:"21.666666666666668px",height:1.1875},xxlarge:{size:"28.333333333333336px",height:1.125}}}},heading:{level:{1:{small:{size:"28px",height:"33px",maxWidth:"567px"},medium:{size:"42px",height:"47px",maxWidth:"833px"},large:{size:"68px",height:"73px",maxWidth:"1367px"},xlarge:{size:"95px",height:"100px",maxWidth:"1900px"}},2:{small:{size:"25px",height:"30px",maxWidth:"500px"},medium:{size:"35px",height:"40px",maxWidth:"700px"},large:{size:"45px",height:"50px",maxWidth:"900px"},xlarge:{size:"55px",height:"60px",maxWidth:"1100px"}},3:{small:{size:"22px",height:"27px",maxWidth:"433px"},medium:{size:"28px",height:"33px",maxWidth:"567px"},large:{size:"35px",height:"40px",maxWidth:"700px"},xlarge:{size:"42px",height:"47px",maxWidth:"833px"}},4:{small:{size:"18px",height:"23px",maxWidth:"367px"},medium:{size:"22px",height:"27px",maxWidth:"433px"},large:{size:"25px",height:"30px",maxWidth:"500px"},xlarge:{size:"28px",height:"33px",maxWidth:"567px"}},5:{small:{size:"13px",height:"18px",maxWidth:"267px"},medium:{size:"13px",height:"18px",maxWidth:"267px"},large:{size:"13px",height:"18px",maxWidth:"267px"},xlarge:{size:"13px",height:"18px",maxWidth:"267px"}},6:{small:{size:"12px",height:"17px",maxWidth:"233px"},medium:{size:"12px",height:"17px",maxWidth:"233px"},large:{size:"12px",height:"17px",maxWidth:"233px"},xlarge:{size:"12px",height:"17px",maxWidth:"233px"}}}},paragraph:{small:{size:"13px",height:"18px",maxWidth:"267px"},medium:{size:"15px",height:"20px",maxWidth:"300px"},large:{size:"18px",height:"23px",maxWidth:"367px"},xlarge:{size:"22px",height:"27px",maxWidth:"433px"},xxlarge:{size:"28px",height:"33px",maxWidth:"567px"}},radioButton:{size:"20px"},text:{xsmall:{size:"12px",height:"17px",maxWidth:"233px"},small:{size:"13px",height:"18px",maxWidth:"267px"},medium:{size:"15px",height:"20px",maxWidth:"300px"},large:{size:"18px",height:"23px",maxWidth:"367px"},xlarge:{size:"22px",height:"27px",maxWidth:"433px"},xxlarge:{size:"28px",height:"33px",maxWidth:"567px"}},formField:{border:{color:"#cacaca",error:{color:{dark:"white",light:"status-critical"}},position:"inner",side:"all",size:"small",style:"solid"},content:{pad:"small"},disabled:{background:{color:"status-disabled",opacity:"medium"}},error:{color:"status-critical",margin:{vertical:"xsmall",horizontal:"none"}},help:{color:"dark-3",margin:{start:"small",horizontal:"none",vertical:"small"}},info:{color:"text-xweak",margin:{vertical:"xsmall",horizontal:"small"}},label:{margin:{vertical:"xsmall",horizontal:"none"},weight:"bold"},margin:{bottom:"medium"},round:"100px"}};e.default=o},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(549),a=n(613),s=n.n(a);function u(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(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 l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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}e.default=function(t){var e=t.data,n=Object.entries(e).filter((function(t){var e=u(t,2),n=e[0];e[1];return"layerName"!==n})).map((function(t){var e=u(t,2),n=e[0],r=e[1];return i.a.createElement(o.default,{title:n,value:r,key:"overlay-popover-data-".concat(n)})}));return i.a.createElement("div",{className:s.a.OverlayPopoverData},n)}},function(t,e,n){"use strict";n.r(e),n.d(e,"UserModel",(function(){return m}));var r=n(2),i=n(174),o=n(1003),a=n(21),s=["user","projects"],u=["project"];function l(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 c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(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 p(){p=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=d,s(v,"constructor",d),s(d,"constructor",h),h.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var d=r.types.model("UserContentAggregate",{name:r.types.string,count:r.types.number}).views((function(t){return{get label(){return t.name.replace(/_aggregate$/,"")},get labelSingular(){return t.name.replace(/_aggregate$/,"").slice(0,-1)}}})),m=r.types.model("UserModel",{id:r.types.identifierNumber,name:r.types.maybeNull(r.types.string),email:r.types.maybeNull(r.types.string),created_at:r.types.maybeNull(r.types.string),projects:r.types.array(r.types.late((function(){return o.default})),[]),aggregates:r.types.maybeNull(r.types.array(d,[])),isAdmin:r.types.optional(r.types.boolean,!1)}).actions((function(t){return{afterCreate:function(){t.loggedIn&&t.fetchAllMemberships()},setName:function(e){return t.name=e},setUserId:function(e){return t.id=e},fetchAllMemberships:Object(r.flow)(p().mark((function e(){var n,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(a.buildHeaders)({"X-Hasura-User-Token":t.userToken}),e.next=3,Object(i.fetchUserProjectsQuery)({user_id:t.id},n);case 3:r=e.sent,t.projects=r.project_memberships;case 5:case"end":return e.stop()}}),e)}))),acceptInvitation:Object(r.flow)(p().mark((function e(n){var r,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(a.buildHeaders)({"X-Hasura-User-Token":t.userToken}),e.next=3,Object(i.mutateQueryProjectUserInvitation)({id:n.id,state:"accepted"},r);case 3:(o=e.sent)&&o.update&&n.setState("accepted");case 5:case"end":return e.stop()}}),e)}))),rejectInvitation:Object(r.flow)(p().mark((function e(n){var r,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(a.buildHeaders)({"X-Hasura-User-Token":t.userToken}),e.next=3,Object(i.mutateQueryProjectUserInvitation)({id:n.id,state:"rejected"},r);case 3:(o=e.sent)&&o.update&&n.setState("rejected");case 5:case"end":return e.stop()}}),e)}))),leaveProject:Object(r.flow)(p().mark((function e(n){var r,o,s,u=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:null,o=Object(a.buildHeaders)({"X-Hasura-User-Token":t.userToken}),e.next=4,Object(i.mutateQueryProjectUserInvitation)({id:n.id,state:"cancelled"},o);case 4:(s=e.sent)&&s.update&&n.setState("cancelled"),r&&r.removeUser(n.user.id);case 7:case"end":return e.stop()}}),e)}))),joinProject:Object(r.flow)(p().mark((function e(n){var r,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(a.buildHeaders)({"X-Hasura-User-Token":t.userToken}),e.next=3,Object(i.mutateQueryProjectUserRequestMembership)({id:n.id},r);case 3:(o=e.sent)&&o.update&&n.addRequestToJoin(o.update);case 5:case"end":return e.stop()}}),e)}))),canGrantMembershipRequest:function(e,n){var r=t.memberships.find((function(t){return t.project.id===n.id&&"accepted"===t.state})),i=n.users.find((function(e){return"accepted"===e.state&&e.user.id===t.id}));return r&&i},canEditRecord:function(e){return e.user&&e.user.id===t.id||!1}}})).views((function(t){return{get loggedIn(){try{return t.id===t.userId}catch(e){return!1}},get memberships(){return t.projects.filter((function(t){return"accepted"===t.state}))},get requests(){return t.projects.filter((function(t){return"requested"===t.state}))},get invitations(){return t.projects.filter((function(t){return"invited"===t.state}))},get userId(){var t=document.querySelector("meta[name=user-id]");return t?parseInt(t.content,10):null},get userToken(){var t=document.querySelector("meta[name=user-token]");return t?t.content:null},get displayName(){return t.name||t.email||""},get formattedCreatedAt(){return DateTime.fromISO(t.created_at).toLocaleString(DateTime.DATE_FULL)},get type(){return"user"}}})).preProcessSnapshot((function(t){if(t){var e=t.user,n=t.projects,r=h(t,s),i=n?n.map((function(t){var n=t.project;return c(c({},h(t,u)),{},{project:n,user:{id:e.id}})})):[],o=r?Object.keys(r).map((function(t){return{name:t,count:r[t].aggregate.count}})):{};return c(c({},e),{},{projects:i,aggregates:o})}}));e.default=m},function(t,e,n){"use strict";n.r(e),n.d(e,"ParentContextEntryModel",(function(){return h}));var r=n(2),i=n(171),o=n(102);function a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function s(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return u(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 u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(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 l(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 c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h=r.types.model("ParentContextEntryModel",{id:r.types.identifierNumber,type:r.types.string,slug:r.types.string,name:r.types.string,count:r.types.number,items:r.types.array(r.types.frozen({}),[]),associated_overlay_group_slug:r.types.maybeNull(r.types.string)}).volatile((function(t){return{indexPosition:0,previousItem:null,nextItem:null}})).actions((function(t){return{afterCreate:function(){},fetchNextAndPrev:Object(r.flow)(a().mark((function e(){var n,r,i,u,l,f,h,p;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.fetchNavigationForPosition(t.indexPosition);case 2:n=e.sent,r=n.navigation_items,i=r.map((function(t){return c({path:Object(o.getPath)(t)},t)})),0===t.indexPosition?(f=s(i,2),f[0],l=f[1]):2===i.length?(h=s(i,2),u=h[0],h[1]):(p=s(i,3),u=p[0],p[1],l=p[2]),t.previousItem=u||null,t.nextItem=l||null;case 8:case"end":return e.stop()}}),e)}))),fetchNavigationForPosition:Object(r.flow)(a().mark((function e(n){var r,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n>0?3:2,o=n>0?n-1:n,e.next=4,Object(i.fetchParentContextItemNavigationQuery)({slug:t.slug,limit:r,offset:o});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)}))),incrementIndexPosition:function(){t.setIndexPosition(t.indexPosition+1)},decrementIndexPosition:function(){t.setIndexPosition(t.indexPosition-1)},setIndexPosition:function(e){t.indexPosition=e,t.fetchNextAndPrev()}}})).views((function(t){return{isParentOf:function(e){var n;return!(null===e||void 0===e||null===(n=e.parent_item_ids)||void 0===n||!n.includes(t.id))},get ordinalPosition(){return t.indexPosition+1},positionOf:function(e){return Object(r.getSnapshot)(t).items.findIndex((function(t){return t.id===e.id&&t.type===e.type}))},get path(){return Object(o.getPath)(t)},get isTrail(){return"trail"===t.type},get isCollection(){return"collection"===t.type},get isRoute(){return"route"===t.type},get isTimeline(){return"timeline"===t.type}}}))},function(t,e,n){"use strict";n.r(e);var r=n(830),i=new(n.n(r).a)({domain:"assets-production.humap.site",includeLibraryParam:!1,useHTTPS:!0});e.default=i},function(t,e,n){t.exports={OverlayCreatorAddLayerURL:"OverlayCreatorAddLayerURL-module__OverlayCreatorAddLayerURL___3Qs5L",radioButtons:"OverlayCreatorAddLayerURL-module__radioButtons___2kfW4"}},function(t,e,n){t.exports={OverlayCreatorAddLayerExisting:"OverlayCreatorAddLayerExisting-module__OverlayCreatorAddLayerExisting___3Txu2",pane:"OverlayCreatorAddLayerExisting-module__pane___evYz8",selected:"OverlayCreatorAddLayerExisting-module__selected___1OTXv"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(17);e.default=Object(o.a)((function(t){var e=Object(a.useStore)(),n=e.collection,o=e.setCollectionSlug;return Object(r.useEffect)((function(){o(t.slug)}),[t.slug]),n&&n.slug===t.slug?i.a.createElement(i.a.Fragment,null,t.children):i.a.createElement(i.a.Fragment,null)}))},function(t,e,n){t.exports={BaseMapPicker:"BaseMapPicker-module__BaseMapPicker___3Cx72",icon:"BaseMapPicker-module__icon___2N6p1",label:"BaseMapPicker-module__label___2mS88",isCurrent:"BaseMapPicker-module__isCurrent___34tUL"}},function(t,e,n){t.exports={CustomLegend:"CustomLegend-module__CustomLegend___1jCYn",icon:"CustomLegend-module__icon___USaKE",label:"CustomLegend-module__label___2As2r",swatch:"CustomLegend-module__swatch___G0_ZX"}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchPopoverQuery",(function(){return i})),n.d(e,"fetchPopoverSummaryQuery",(function(){return o}));var r=n(21),i=function(t,e){return r.default.request("\n    #graphql\n\n    query popoverQuery($type: String!, $id: bigint!) {\n        point_items(where: {type: {_eq: $type}, id: {_eq: $id}}) {\n            excerpt\n            image_url\n            name\n            slug\n            type\n            hero_attachment_type\n        }\n    }\n",t,e)},o=function(t,e){return r.default.request("\n    #graphql\n\n    query popoverSummaryQuery($gids: [String!]) {\n        point_items(where: {gid: {_in: $gids}}) {\n            id\n            name\n            slug\n            type\n        }\n    }\n",t,e)}},function(t,e,n){t.exports={MapPopover:"MapPopover-module__MapPopover___3sIxG",MapPopoverList:"MapPopover-module__MapPopoverList___36CxN",scrollIndicator:"MapPopover-module__scrollIndicator___3n3ke",hasMany:"MapPopover-module__hasMany___1OX48"}},function(t,e,n){t.exports={Map:"Map-module__Map___3a2u4",isFullWidth:"Map-module__isFullWidth___eWA8d",logo:"Map-module__logo___22AIe"}},function(t,e,n){t.exports={IntroductionIndex:"IntroductionIndex-module__IntroductionIndex___R-IBD",IntroductionIndexTrayOverview:"IntroductionIndex-module__IntroductionIndexTrayOverview___garq4"}},function(t,e,n){t.exports={OverlayToolGridItem:"OverlayToolGridItem-module__OverlayToolGridItem___2CMEP",overlaySwatch:"OverlayToolGridItem-module__overlaySwatch___1Fu-1",overlayTitle:"OverlayToolGridItem-module__overlayTitle___3erGg"}},function(t,e,n){t.exports={OverlayIndex:"OverlayIndex-module__OverlayIndex___mXkD8",SearchButton:"OverlayIndex-module__SearchButton___2tMx8",toggleWrap:"OverlayIndex-module__toggleWrap___3fG-n",extraLabel:"OverlayIndex-module__extraLabel___GY5iK"}},function(t,e,n){t.exports={FormFieldTaxonomyCheckboxes:"FormFieldTaxonomyCheckboxes-module__FormFieldTaxonomyCheckboxes___n_ATg",checkBoxesWrap:"FormFieldTaxonomyCheckboxes-module__checkBoxesWrap___69K4q",multipleSelectWrap:"FormFieldTaxonomyCheckboxes-module__multipleSelectWrap___2VlH7"}},function(t,e,n){t.exports={Tray:"Tray-module__Tray___1B6NC",isClosed:"Tray-module__isClosed___8IOZf"}},function(t,e,n){"use strict";n.r(e),n.d(e,"snap",(function(){return a}));var r=n(45);function i(t){return function(t){if(Array.isArray(t))return o(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)return;if("string"===typeof t)return o(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 o(t,e)}(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.")}()}function o(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 a=function(t,e,n){var o=Object(r.coordAll)(t.currentFeatureLayer.toGeoJSON),a=Object(r.coordAll)(t.currentFeatureLayer.nearbyFeaturestoGeoJSON),s=[].concat(i(o),i(a)),u=e,l=t.currentFeatureLayer.toGeoJSON.features.map((function(t){if("Polygon"===t.geometry.type){var e=Object(r.lineString)(t.geometry.coordinates[0]);return Object(r.nearestPointOnLine)(e,u)}return null})).filter((function(t){return null!==t}));n.setCloseLinePoints(l);var c=e;if(l.length>0){var f=l.reduce((function(t,e){return t.properties.dist<e.properties.dist?t:e}));c=f.properties.dist<.005?f.geometry.coordinates:e}var h=c;return s.forEach((function(t){Object(r.distance)(e,t)<.005&&(h=t)})),h}},function(t,e,n){t.exports={FeatureAnnotationDataFormRow:"FeatureAnnotationDataFormRow-module__FeatureAnnotationDataFormRow___1q14M",count:"FeatureAnnotationDataFormRow-module__count___Ttq8o",radios:"FeatureAnnotationDataFormRow-module__radios___aAouc",checkboxes:"FeatureAnnotationDataFormRow-module__checkboxes___3mFg9",required:"FeatureAnnotationDataFormRow-module__required___3aWGC"}},function(t,e,n){t.exports={Map:"Placemaker-module__Map___1zerD",logo:"Placemaker-module__logo___Uppod",zoomControl:"Placemaker-module__zoomControl___3Xxby",scaleControl:"Placemaker-module__scaleControl___2tQHr",hideUnrelatedPins:"Placemaker-module__hideUnrelatedPins___2OIVT"}},function(t,e,n){t.exports={AnnotationConflict:"AnnotationConflict-module__AnnotationConflict___1eoUR",features:"AnnotationConflict-module__features___2t3Vq",featureOne:"AnnotationConflict-module__featureOne___10aHq",featureTwo:"AnnotationConflict-module__featureTwo___2PI0q"}},function(t,e,n){t.exports={ChangeSquareStateDialog:"ChangeSquareStateDialog-module__ChangeSquareStateDialog___KtT3H",panel:"ChangeSquareStateDialog-module__panel___24BSs",isCurrent:"ChangeSquareStateDialog-module__isCurrent___qA11T",states:"ChangeSquareStateDialog-module__states___1vYPk"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(475),i=n(338);var o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(t){return 45===t.charCodeAt(1)},u=function(t){return null!=t&&"boolean"!==typeof t},l=function(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return s(t)?t:t.replace(o,"-$&").toLowerCase()})),c=function(t,e){switch(t){case"animation":case"animationName":if("string"===typeof e)return e.replace(a,(function(t,e,n){return h={name:e,styles:n,next:h},e}))}return 1===i.a[t]||s(t)||"number"!==typeof e||0===e?e:e+"px"};function f(t,e,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return h={name:n.name,styles:n.styles,next:h},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)h={name:r.name,styles:r.styles,next:h},r=r.next;return n.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=f(t,e,n[i])+";";else for(var o in n){var a=n[o];if("object"!==typeof a)null!=e&&void 0!==e[a]?r+=o+"{"+e[a]+"}":u(a)&&(r+=l(o)+":"+c(o,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=e&&void 0!==e[a[0]]){var s=f(t,e,a);switch(o){case"animation":case"animationName":r+=l(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var h=0;h<a.length;h++)u(a[h])&&(r+=l(o)+":"+c(o,a[h])+";")}return r}(t,e,n);case"function":if(void 0!==t){var i=h,o=n(t);return h=i,f(t,e,o)}}if(null==e)return n;var a=e[n];return void 0!==a?a:n}var h,p=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var d=function(t,e,n){if(1===t.length&&"object"===typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var i=!0,o="";h=void 0;var a=t[0];null==a||void 0===a.raw?(i=!1,o+=f(n,e,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=f(n,e,t[s]),i&&(o+=a[s]);p.lastIndex=0;for(var u,l="";null!==(u=p.exec(o));)l+="-"+u[1];return{name:Object(r.a)(o)+l,styles:o,next:h}}},function(t,e,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!==t};function s(){s.init.call(this)}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function l(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,n,r){var i,o,a,s;if(l(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"===typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):g(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!==typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var l=u.length,c=g(u,l);for(n=0;n<l;++n)o(c[n],this,e)}return!0},s.prototype.addListener=function(t,e){return f(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return f(this,t,e,!0)},s.prototype.once=function(t,e){return l(e),this.on(t,p(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return l(e),this.prependListener(t,p(this,t,e)),this},s.prototype.removeListener=function(t,e){var n,r,i,o,a;if(l(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!==typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n.r(e);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:5825721.287490856};function o(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function s(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var a=i[r];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function l(t){return t%360*Math.PI/180}function c(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return function(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}(u(t,e),n)}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function h(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 p=function(t,e,n,i){void 0===i&&(i={});var o=e<0,s=c(Math.abs(e),i.units,"meters");o&&(s=-Math.abs(s));var u=h(t),f=function(t,e,n,i){i=void 0===i?r:Number(i);var o=e/i,a=t[0]*Math.PI/180,s=l(t[1]),u=l(n),c=o*Math.cos(u),f=s+c;Math.abs(f)>Math.PI/2&&(f=f>0?Math.PI-f:-Math.PI-f);var h=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),p=Math.abs(h)>1e-11?c/h:Math.cos(s),d=o*Math.sin(u)/p;return[(180*(a+d)/Math.PI+540)%360-180,180*f/Math.PI]}(u,s,n);return f[0]+=f[0]-u[0]>180?-360:u[0]-f[0]>180?360:0,a(f,i.properties)},d=n(442);function m(t){var e=t*Math.PI/180;return Math.tan(e)}e.default=function(t,e,n,r){var i,o=(r=r||{}).steps||64,a=r.units||"kilometers",u=r.angle||0,c=r.pivot||t,g=r.properties||t.properties||{};if(!t)throw new Error("center is required");if(!e)throw new Error("xSemiAxis is required");if(!n)throw new Error("ySemiAxis is required");if(!(i=r)||i.constructor!==Object)throw new Error("options must be an object");if(!f(o))throw new Error("steps must be a number");if(!f(u))throw new Error("angle must be a number");var y=h(t);if("degrees"===a)var v=l(u);else e=p(t,e,90,{units:a}),n=p(t,n,0,{units:a}),e=h(e)[0]-y[0],n=h(n)[1]-y[1];for(var b=[],_=0;_<o;_+=1){var A=-360*_/o,w=e*n/Math.sqrt(Math.pow(n,2)+Math.pow(e,2)*Math.pow(m(A),2)),x=e*n/Math.sqrt(Math.pow(e,2)+Math.pow(n,2)/Math.pow(m(A),2));if(A<-90&&A>=-270&&(w=-w),A<-180&&A>=-360&&(x=-x),"degrees"===a){var E=w*Math.cos(v)+x*Math.sin(v),O=x*Math.cos(v)-w*Math.sin(v);w=E,x=O}b.push([w+y[0],x+y[1]])}return b.push(b[0]),"degrees"===a?s([b],g):Object(d.default)(s([b],g),u,{pivot:c})}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(0),i=n(611),o=n.n(i);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function l(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var h=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(f,t);var e,n,i,c=l(f);function f(){return a(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"render",value:function(){var t=this.props.size,e=void 0===t?20:t;return r.createElement("img",{src:o.a,width:e,alt:"Logo"})}}])&&s(e.prototype,n),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),f}(r.PureComponent)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(683),a=n.n(o);e.default=function(t){var e=t.title,n=t.buttonText,r=t.description,o=t.url;return i.a.createElement("div",{className:a.a.CTA},i.a.createElement("a",{href:o,target:"_blank"},n),i.a.createElement("h2",null,e),i.a.createElement("div",{className:a.a.description},i.a.createElement("p",null,r)))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1069),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:a.a.TrayTitleActions},t.children)}},function(t,e,n){"use strict";n.r(e),n.d(e,"SearchResultsTrayOverview",(function(){return F}));var r=n(0),i=n.n(r),o=n(7),a=n(184),s=n.n(a),u=n(30),l=n(17),c=n(307),f=n(14),h=n(8),p=n.n(h),d=n(599),m=n.n(d),g=n(339),y=n(778),v=n(63),b=n(70),_=n(54),A=n(194),w=n(193),x=n(148),E=n(78),O=n(779),S=n(780),P=n(277),C=n(77),T=n(144),k=n(102);function I(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 L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){j(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function j(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M(t){return function(t){if(Array.isArray(t))return D(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||N(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.")}()}function R(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||N(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(t,e){if(t){if("string"===typeof t)return D(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)?D(t,e):void 0}}function D(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 F=Object(o.a)((function(t){var e=Object(l.useStore)().searchResults,n={record:e.recordCount,collection:e.collectionCount,trail:e.trailCount,overlay:e.overlayCount,route:e.routeCount,timeline:e.timelineCount,project:e.projectCount};return i.a.createElement("div",{className:m.a.SearchResultsTrayOverview},e.filter.query?i.a.createElement("h1",null,p.a.t("results"),": ",e.filter.query):i.a.createElement("h1",null,p.a.t("results")),[].length>0&&i.a.createElement(g.default,{terms:[]}),i.a.createElement(P.default,{counts:n}))}));e.default=Object(o.a)((function(t){var e=Object(l.useStore)(),n=e.mapRefIsSet,o=e.searchResults,a=e.contentTypes,h=e.siteMeta,d=e.searchResults,g=d.loading;d.filter.taxonomies;Object(C.useParentContext)({clear:!0});var P=R(Object(r.useState)([o.recordCount,o.collectionCount,o.trailCount,o.overlayCount,o.routeCount,o.timelineCount,o.projectCount]),2),I=P[0],j=P[1],N=o.results.map((function(t,e){var n=Object(k.getPath)(t);return i.a.createElement(T.default,{key:"card-".concat(e,"-").concat(t.slug),path:n,randomEnterDelay:!0,item:t})}));Object(r.useEffect)((function(){var e=s.a.parse(t.location.search,{arrayFormat:"comma"}),n=e.q,r=void 0===n?"":n,i=e.taxonomy_term_ids,u=void 0===i?[]:i,l=e.type,c=void 0===l?[]:l,f=e.start_date,p=void 0===f?null:f,d=e.end_date,m=void 0===d?null:d,g=[].concat(u).map((function(t){return parseInt(t)}));c=(c=[].concat(c)).length>0?c:a.contentTypeValues;(function(){if(c!==o.filter.type)return!0;if(p!==o.filter.start_date)return!0;if(m!==o.filter.end_date)return!0;if(o.filter.taxonomiesAreLoaded){if(r&&r!==o.filter.query)return!0;var t=g.filter((function(t){return o.filter.taxonomies.checkedIds.includes(t)}));if(!(g.length===o.filter.taxonomies.checkedIds.length&&g.length===t.length))return!0}return!1})()&&(o.filter.setSearchParameter("query",String(r)),o.filter.setSearchParameter("type",c),p&&m&&o.filter.setDateFiltering([parseInt(p),parseInt(m)],[h.start_date,h.end_date]),o.filter.taxonomies.setCheckedTermIds(g),o.clear(),o.fetchResults()),0===o.filter.facet.length&&j([o.recordCount,o.collectionCount,o.trailCount,o.overlayCount,o.routeCount,o.timelineCount,o.projectCount])}),[n,o.filter.taxonomiesAreLoaded,o.filter.facet[0],o.recordCount,o.collectionCount,o.trailCount,o.overlayCount,o.routeCount,o.timelineCount,o.projectCount]),Object(r.useEffect)((function(){o.filter.clearFacet()}),[]);var D,F,B,z,U,G=R(Object(c.default)(o,g),1)[0];function V(t){var e=[];return Array.isArray(t)?t.forEach((function(t){null!==t.sub_terms&&t.sub_terms.length>0?e.push.apply(e,M(V(t.sub_terms))):e.push(t)})):e.push(t),e}return i.a.createElement("div",{className:m.a.SearchResults},i.a.createElement(E.default,{title:(U="Search",o.filter.query&&(U+=": "+o.filter.query),U),description:p.a.t("components.search.search_results.description"),appendSiteDescription:!0}),i.a.createElement(u.a,null,i.a.createElement(u.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(v.default,null,i.a.createElement("div",{className:m.a.trayHeader},i.a.createElement(w.default,null,p.a.t("components.search.search_results.search_again")),i.a.createElement(b.default,null,i.a.createElement("h1",null,(z=p.a.t("components.search.search_results.title"),o.filter.query&&(z+=": ",z+=o.filter.query),z))),i.a.createElement(A.default,null,i.a.createElement(y.default,{searchResults:o,recordCount:I[0],collectionCount:I[1],trailCount:I[2],overlayCount:I[3],routeCount:I[4],timelineCount:I[5],projectCount:I[6]}),i.a.createElement(O.default,null))),i.a.createElement(S.default,{terms:(D=o.filter.taxonomies.toJSON().results,F=o.filter.toQuery.with_term_ids,B=[],void 0!=D&&void 0!=F&&D.forEach((function(t,e){var n=V(t.terms).map((function(n){return L(L({},n),{},{taxonomy:t.slug,taxonomyIndex:e})}));B.push(n)})),B.flat(1/0).filter((function(t){return F.includes(t.id)})))}),g.isLoading&&0===o.results.length&&i.a.createElement(_.default,null),0===o.results.length&&!g.isLoading&&i.a.createElement(i.a.Fragment,null,i.a.createElement("p",null,p.a.t("components.search.search_results.nothing_matched")),i.a.createElement("p",null,i.a.createElement(f.a,{to:"/map/search",onClick:o.reset},p.a.t("components.search.search_results.try_again")))),o.results.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement(x.default,null,N),g.isLoading&&i.a.createElement(_.default,null)),i.a.createElement("div",{style:{margin:0},ref:G})))))}))},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=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},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return o(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},l=this&&this.__rest||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},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.gql=e.request=e.rawRequest=e.GraphQLClient=e.ClientError=void 0;var f=a(n(1201)),h=f,p=n(1302),d=c(n(1202)),m=n(712),g=n(712);Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return g.ClientError}});var y=function(t){var e={};return t&&("undefined"!==typeof Headers&&t instanceof Headers||t instanceof h.Headers?e=function(t){var e={};return t.forEach((function(t,n){e[n]=t})),e}(t):Array.isArray(t)?t.forEach((function(t){var n=t[0],r=t[1];e[n]=r})):e=t),e},v=function(){function t(t,e){this.url=t,this.options=e||{}}return t.prototype.rawRequest=function(t,e,n){return s(this,void 0,void 0,(function(){var i,o,a,s,c,h,p,g,v,b,A;return u(this,(function(u){switch(u.label){case 0:return i=this.options,o=i.headers,a=i.fetch,s=void 0===a?f.default:a,c=l(i,["headers","fetch"]),h=d.default(t,e),[4,s(this.url,r({method:"POST",headers:r(r(r({},"string"===typeof h?{"Content-Type":"application/json"}:{}),y(o)),y(n)),body:h},c))];case 1:return[4,_(p=u.sent())];case 2:if(g=u.sent(),p.ok&&!g.errors&&g.data)return v=p.headers,b=p.status,[2,r(r({},g),{headers:v,status:b})];throw A="string"===typeof g?{error:g}:g,new m.ClientError(r(r({},A),{status:p.status,headers:p.headers}),{query:t,variables:e})}}))}))},t.prototype.request=function(t,e,n){return s(this,void 0,void 0,(function(){var i,o,a,s,c,h,g,v,b,A;return u(this,(function(u){switch(u.label){case 0:return i=this.options,o=i.headers,a=i.fetch,s=void 0===a?f.default:a,c=l(i,["headers","fetch"]),h=function(t){return"string"===typeof t?t:p.print(t)}(t),g=d.default(h,e),[4,s(this.url,r({method:"POST",headers:r(r(r({},"string"===typeof g?{"Content-Type":"application/json"}:{}),y(o)),y(n)),body:g},c))];case 1:return[4,_(v=u.sent())];case 2:if(b=u.sent(),v.ok&&!b.errors&&b.data)return[2,b.data];throw A="string"===typeof b?{error:b}:b,new m.ClientError(r(r({},A),{status:v.status}),{query:h,variables:e})}}))}))},t.prototype.setHeaders=function(t){return this.options.headers=t,this},t.prototype.setHeader=function(t,e){var n,r=this.options.headers;return r?r[t]=e:this.options.headers=((n={})[t]=e,n),this},t}();function b(t,e,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,new v(t).request(e,n)]}))}))}function _(t){var e=t.headers.get("Content-Type");return e&&e.startsWith("application/json")?t.json():t.text()}e.GraphQLClient=v,e.rawRequest=function(t,e,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){return[2,new v(t).rawRequest(e,n)]}))}))},e.request=b,e.default=b,e.gql=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.reduce((function(t,n,r){return""+t+n+(r in e?e[r]:"")}),"")}},function(t,e,n){"use strict";e.a=function(t){for(var e,n=0,r=0,i=t.length;i>=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}},,,,,,,,function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,l={},c=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"===typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return l[u]=i,r(u),u++},h.clearImmediate=p}function p(t){delete l[t]}function d(t){if(c)setTimeout(d,0,t);else{var e=l[t];if(e){c=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),c=!1}}}}}("undefined"===typeof self?"undefined"===typeof t?this:t:self)}).call(this,n(36),n(68))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";e.byteLength=function(t){var e=l(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=l(t),a=r[0],s=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),c=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[c++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(t,s,s+a>u?u:s+a));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*m}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";t.exports=function(t){var e=t.uri,n=t.name,r=t.type;this.uri=e,this.name=n,this.type=r}},function(t,e,n){"use strict";var r=n(488);t.exports=function(t){return"undefined"!==typeof File&&t instanceof File||"undefined"!==typeof Blob&&t instanceof Blob||t instanceof r}},function(t,e){},function(t,e,n){"use strict";var r=n(170);e.a={name:"project32",dependencies:[r.a],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  mat3 rotation;\n  if (project_needs_rotation(projectedPosition, rotation)) {\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    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"}},function(t,e,n){"use strict";var r=n(1132);e.a={inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n    // for picking depth values\n    picking_setPickingAttribute(position.z / position.w);\n  ","vs:DECKGL_FILTER_COLOR":"\n  picking_setPickingColor(geometry.pickingColor);\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    "}},...r.a}},function(t,e,n){"use strict";function r(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 i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return a(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 a(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,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(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 s(t,e){var n=null===e||void 0===e?void 0:e.globalFeatureId;return void 0!==n?function(t,e){var n,r=o(f(t));try{for(r.s();!(n=r.n()).done;){for(var i=n.value,a=0,s=i.featureIds.value[0],u=0;u<i.featureIds.value.length;u++){var l=i.featureIds.value[u];if(l!==s){if(e===i.globalFeatureIds.value[a])return h(i,a,u);a=u,s=l}}if(e===i.globalFeatureIds.value[a])return h(i,a,i.featureIds.value.length)}}catch(c){r.e(c)}finally{r.f()}throw new Error("featureId:".concat(e," not found"))}(t,n):l(t,null===e||void 0===e?void 0:e.type)}function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"feature";switch(n){case"feature":return l(t,e);case"geometry":return c(t);default:throw new Error(n)}}function l(t,e){return function(t){var e,n=[],r=o(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(0!==i.featureIds.value.length){for(var a=0,s=i.featureIds.value[0],u=0;u<i.featureIds.value.length;u++){var l=i.featureIds.value[u];l!==s&&(n.push(h(i,a,u)),a=u,s=l)}n.push(h(i,a,i.featureIds.value.length))}}}catch(c){r.e(c)}finally{r.f()}return n}(f(t,e))}function c(t,e,n){switch(t.type){case"Point":return function(t,e,n){var r=d(t.positions,e,n);if(r.length>1)return{type:"MultiPoint",coordinates:r};return{type:"Point",coordinates:r[0]}}(t,e,n);case"LineString":return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=t.positions,i=t.pathIndices.value.filter((function(t){return t>=e&&t<=n}));if(!(i.length>2)){return{type:"LineString",coordinates:d(r,i[0],i[1])}}for(var o=[],a=0;a<i.length-1;a++){var s=d(r,i[a],i[a+1]);o.push(s)}return{type:"MultiLineString",coordinates:o}}(t,e,n);case"Polygon":return p(t,e,n);default:throw new Error("Unsupported geometry type: ".concat(null===t||void 0===t?void 0:t.type))}}function f(t,e){if(!Boolean(t.points||t.lines||t.polygons))return t.type=e||function(t){if(t.pathIndices)return"LineString";if(t.polygonIndices)return"Polygon";return"Point"}(t),[t];var n=[];return t.points&&(t.points.type="Point",n.push(t.points)),t.lines&&(t.lines.type="LineString",n.push(t.lines)),t.polygons&&(t.polygons.type="Polygon",n.push(t.polygons)),n}function h(t,e,n){var o=c(t,e,n),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Object.assign({},t.properties[t.featureIds.value[e]]);for(var r in t.numericProps)n[r]=t.numericProps[r].value[e];return n}(t,e,n),s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.fields&&t.fields[t.featureIds.value[e]]}(t,e,n);return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:"Feature",geometry:o,properties:a},s)}function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=t.positions,i=t.polygonIndices.value.filter((function(t){return t>=e&&t<=n})),o=t.primitivePolygonIndices.value.filter((function(t){return t>=e&&t<=n})),a=i.length>2;if(!a){for(var s=[],u=0;u<o.length-1;u++){var l=o[u],c=o[u+1],f=d(r,l,c);s.push(f)}return{type:"Polygon",coordinates:s}}for(var h=[],m=0;m<i.length-1;m++){var g=i[m],y=i[m+1],v=p(t,g,y).coordinates;h.push(v)}return{type:"MultiPolygon",coordinates:h}}function d(t,e,n){e=e||0,n=n||t.value.length/t.size;for(var r=[],i=e;i<n;i++){for(var o=Array(),a=i*t.size;a<(i+1)*t.size;a++)o.push(Number(t.value[a]));r.push(o)}return r}n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return c}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r=n(1),i=n(368),o=n(27),a=n(87),s=n(197),u=n(198),l=n(105),c=n(310);const f=[0,0,0,255],h={stroked:!0,filled:!0,extruded:!1,elevationScale:1,wireframe:!1,_normalize:!0,_windingOrder:"CW",lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineJointRounded:!1,lineMiterLimit:4,getPolygon:{type:"accessor",value:t=>t.polygon},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:f},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0};class p extends i.a{initializeState(){this.state={paths:[]},this.props.getLineDashArray&&o.a.removed("getLineDashArray","PathStyleExtension")()}updateState({changeFlags:t}){const e=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getPolygon);if(e&&Array.isArray(t.dataChanged)){const e=this.state.paths.slice(),n=t.dataChanged.map((t=>Object(c.a)({data:e,getIndex:t=>t.__source.index,dataRange:t,replace:this._getPaths(t)})));this.setState({paths:e,pathsDiff:n})}else e&&this.setState({paths:this._getPaths(),pathsDiff:null})}_getPaths(t={}){const{data:e,getPolygon:n,positionFormat:r,_normalize:i}=this.props,o=[],s="XY"===r?2:3,{startRow:u,endRow:c}=t,{iterable:f,objectInfo:h}=Object(a.a)(e,u,c);for(const a of f){h.index++;let t=n(a,h);i&&(t=l.d(t,s));const{holeIndices:e}=t,r=t.positions||t;if(e)for(let n=0;n<=e.length;n++){const t=r.slice(e[n-1]||0,e[n]||r.length);o.push(this.getSubLayerRow({path:t},a,h.index))}else o.push(this.getSubLayerRow({path:r},a,h.index))}return o}renderLayers(){const{data:t,_dataDiff:e,stroked:n,filled:r,extruded:i,wireframe:o,_normalize:a,_windingOrder:l,elevationScale:c,transitions:h,positionFormat:p}=this.props,{lineWidthUnits:d,lineWidthScale:m,lineWidthMinPixels:g,lineWidthMaxPixels:y,lineJointRounded:v,lineMiterLimit:b,lineDashJustified:_}=this.props,{getFillColor:A,getLineColor:w,getLineWidth:x,getLineDashArray:E,getElevation:O,getPolygon:S,updateTriggers:P,material:C}=this.props,{paths:T,pathsDiff:k}=this.state,I=this.getSubLayerClass("fill",s.a),L=this.getSubLayerClass("stroke",u.a),j=this.shouldRenderSubLayer("fill",T)&&new I({_dataDiff:e,extruded:i,elevationScale:c,filled:r,wireframe:o,_normalize:a,_windingOrder:l,getElevation:O,getFillColor:A,getLineColor:i&&o?w:f,material:C,transitions:h},this.getSubLayerProps({id:"fill",updateTriggers:P&&{getPolygon:P.getPolygon,getElevation:P.getElevation,getFillColor:P.getFillColor,lineColors:i&&o,getLineColor:P.getLineColor}}),{data:t,positionFormat:p,getPolygon:S});return[!i&&j,!i&&n&&this.shouldRenderSubLayer("stroke",T)&&new L({_dataDiff:k&&(()=>k),widthUnits:d,widthScale:m,widthMinPixels:g,widthMaxPixels:y,jointRounded:v,miterLimit:b,dashJustified:_,_pathType:"loop",transitions:h&&{getWidth:h.getLineWidth,getColor:h.getLineColor,getPath:h.getPolygon},getColor:this.getSubLayerAccessor(w),getWidth:this.getSubLayerAccessor(x),getDashArray:this.getSubLayerAccessor(E)},this.getSubLayerProps({id:"stroke",updateTriggers:P&&{getWidth:P.getLineWidth,getColor:P.getLineColor,getDashArray:P.getLineDashArray}}),{data:T,positionFormat:p,getPath:t=>t.path}),i&&j]}}Object(r.a)(p,"layerName","PolygonLayer"),Object(r.a)(p,"defaultProps",h)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(238);function i(t){try{return JSON.parse(t)}catch(e){throw new Error('Failed to parse JSON from data starting with "'.concat(Object(r.a)(t),'"'))}}},function(t,e,n){"use strict";e.__esModule=!0,e.getAvailableAtBadge=e.findAllByType=e.breakpointStyle=e.fontSize=e.parseMetricToNum=void 0;var r=n(4),i=function(t){return"number"===typeof t?t:(t.match(/\s/),parseFloat(t.match(/\d+(\.\d+)?/),10))};e.parseMetricToNum=i;e.fontSize=function(t,e){return(0,r.css)(["font-size:",";line-height:",";"],(function(e){return i(t)/i(e.theme.global.font.size)*1+"rem"}),(function(n){return e||Math.ceil(i(t)/i(n.theme.global.lineHeight))*(i(n.theme.global.lineHeight)/i(t))+"px"}))};e.breakpointStyle=function(t,e){return(0,r.css)(["@media only screen ","{",";}"],t.value&&"and (max-width: "+t.value+"px)",e)};e.findAllByType=function t(e,n){var r=[];return e.type===n&&r.push(e),e.children&&e.children.forEach((function(e){r=r.concat(t(e,n))})),r};e.getAvailableAtBadge=function(t,e){return[{url:"https://storybook.grommet.io/?selectedKind="+e+"-"+t+"&full=0&stories=1&panelRight=0",badge:"https://cdn-images-1.medium.com/fit/c/120/120/1*TD1P0HtIH9zF0UEH28zYtw.png",label:"Storybook"},{url:"https://codesandbox.io/s/github/grommet/grommet-sandbox?initialpath=/"+t.toLowerCase()+"&module=%2Fsrc%2F"+t+".js",badge:"https://codesandbox.io/static/img/play-codesandbox.svg",label:"CodeSandbox"}]}},function(t,e,n){var r=n(885);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(292),i=n(499),o=n(501),a=Object.defineProperty;e.f=n(167)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(167)&&!n(293)((function(){return 7!=Object.defineProperty(n(500)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(233),i=n(291).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(233);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(889);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(893)("keys"),i=n(895);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(504);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";n.r(e);var r=n(347);function i(t){var e=[1/0,1/0,-1/0,-1/0];return Object(r.coordEach)(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}i.default=i,e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ArrowStyles",{enumerable:!0,get:function(){return r.ArrowStyles}}),Object.defineProperty(e,"DEFAULT_ARROWS",{enumerable:!0,get:function(){return r.DEFAULT_ARROWS}}),Object.defineProperty(e,"MAX_ARROWS",{enumerable:!0,get:function(){return r.MAX_ARROWS}}),Object.defineProperty(e,"EditableGeoJsonLayer",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"EditableH3ClusterLayer",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"SelectionLayer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"ElevatedEditHandleLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"PathOutlineLayer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"PathMarkerLayer",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"JunctionScatterplotLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"toDeckColor",{enumerable:!0,get:function(){return f.toDeckColor}});var r=n(1234),i=h(n(511)),o=h(n(1265)),a=h(n(1266)),s=h(n(1267)),u=h(n(725)),l=h(n(1270)),c=h(n(1274)),f=n(724);function h(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(41),i=n(424),o=n(515),a=u(n(723)),s=u(n(1264));function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="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},l(t)}function c(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 f(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return h(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function h(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 p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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 m(t,e,n){return m="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},m(t,e,n||t)}function g(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(){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}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=[0,0,0,153],w=[0,0,0,144],x=[0,0,0,255],E=[0,0,144,144],O=[144,144,144,255],S=[144,144,144,144],P=[192,0,0,255],C=[0,0,0,128],T=[124,0,192,255],k=[255,255,255,255],I=32*o.PROJECTED_PIXEL_SIZE_MULTIPLIER,L=i.DrawPolygonMode;function j(t){return t&&"function"===typeof t?function(e){return t(function(t){if(t.__source)return t.__source.object;if(t.sourceFeature)return t.sourceFeature.feature;return t}(e))}:t}function M(t){switch(t.properties.editHandleType){case"existing":return P;case"snap-source":return T;default:return C}}var R={mode:L,onEdit:function(){},pickable:!0,pickingRadius:10,pickingDepth:5,fp64:!1,filled:!0,stroked:!0,lineWidthScale:o.PROJECTED_PIXEL_SIZE_MULTIPLIER,lineWidthMinPixels:1,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,pickingLineWidthExtraPixels:0,lineWidthUnits:"pixels",lineJointRounded:!1,lineCapRounded:!1,lineMiterLimit:4,pointRadiusScale:1,pointRadiusMinPixels:2,pointRadiusMaxPixels:Number.MAX_SAFE_INTEGER,getLineColor:function(t,e,n){return e?x:A},getFillColor:function(t,e,n){return e?E:w},getRadius:function(t){return t&&t.properties&&t.properties.radius||t&&t.properties&&t.properties.size||1},getLineWidth:function(t){return t&&t.properties&&t.properties.lineWidth||3},getTentativeLineColor:function(t){return O},getTentativeFillColor:function(t){return S},getTentativeLineWidth:function(t){return t&&t.properties&&t.properties.lineWidth||3},editHandleType:"point",editHandlePointRadiusScale:1,editHandlePointOutline:!0,editHandlePointStrokeWidth:2,editHandlePointRadiusUnits:"pixels",editHandlePointRadiusMinPixels:4,editHandlePointRadiusMaxPixels:8,getEditHandlePointColor:M,getEditHandlePointOutlineColor:function(t){return k},getEditHandlePointRadius:function(t){switch(t.properties.editHandleType){case"existing":return 5;case"snap":return 7;default:return 3}},editHandleIconAtlas:null,editHandleIconMapping:null,editHandleIconSizeScale:1,editHandleIconSizeUnits:"pixels",getEditHandleIcon:function(t){return t.properties.editHandleType},getEditHandleIconSize:10,getEditHandleIconColor:M,getEditHandleIconAngle:0,billboard:!0},N={view:i.ViewMode,modify:i.ModifyMode,translate:new i.SnappableMode(new i.TranslateMode),transform:new i.SnappableMode(new i.TransformMode),scale:i.ScaleMode,rotate:i.RotateMode,duplicate:i.DuplicateMode,split:i.SplitPolygonMode,extrude:i.ExtrudeMode,elevation:i.ElevationMode,drawPoint:i.DrawPointMode,drawLineString:i.DrawLineStringMode,drawPolygon:i.DrawPolygonMode,drawRectangle:i.DrawRectangleMode,drawSquare:i.DrawSquareMode,drawRectangleFromCenter:i.DrawRectangleFromCenterMode,drawSquareFromCenter:i.DrawSquareFromCenterMode,drawCircleFromCenter:i.DrawCircleFromCenterMode,drawCircleByBoundingBox:i.DrawCircleByDiameterMode,drawEllipseByBoundingBox:i.DrawEllipseByBoundingBoxMode,drawRectangleUsing3Points:i.DrawRectangleUsingThreePointsMode,drawEllipseUsing3Points:i.DrawEllipseUsingThreePointsMode,draw90DegreePolygon:i.Draw90DegreePolygonMode,drawPolygonByDragging:i.DrawPolygonByDraggingMode},D=function(t){!function(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&&b(t,e)}(u,t);var e,n,i,o,a=(e=u,function(){var t,n=v(e);if(y()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return g(this,t)});function u(){return p(this,u),a.apply(this,arguments)}return n=u,i=[{key:"renderLayers",value:function(){var t=this.getSubLayerProps({id:"geojson",data:this.props.data,fp64:this.props.fp64,filled:this.props.filled,stroked:this.props.stroked,lineWidthScale:this.props.lineWidthScale,lineWidthMinPixels:this.props.lineWidthMinPixels,lineWidthMaxPixels:this.props.lineWidthMaxPixels,lineWidthUnits:this.props.lineWidthUnits,lineJointRounded:this.props.lineJointRounded,lineCapRounded:this.props.lineCapRounded,lineMiterLimit:this.props.lineMiterLimit,pointRadiusScale:this.props.pointRadiusScale,pointRadiusMinPixels:this.props.pointRadiusMinPixels,pointRadiusMaxPixels:this.props.pointRadiusMaxPixels,getLineColor:this.selectionAwareAccessor(this.props.getLineColor),getFillColor:this.selectionAwareAccessor(this.props.getFillColor),getPointRadius:this.selectionAwareAccessor(this.props.getRadius),getLineWidth:this.selectionAwareAccessor(this.props.getLineWidth),_subLayerProps:{linestrings:{billboard:this.props.billboard,updateTriggers:{all:[this.props.selectedFeatureIndexes,this.props.mode]}},"polygons-stroke":{billboard:this.props.billboard,pickingLineWidthExtraPixels:this.props.pickingLineWidthExtraPixels,type:s.default,updateTriggers:{all:[this.props.selectedFeatureIndexes,this.props.mode]}}},updateTriggers:{getLineColor:[this.props.selectedFeatureIndexes,this.props.mode],getFillColor:[this.props.selectedFeatureIndexes,this.props.mode],getPointRadius:[this.props.selectedFeatureIndexes,this.props.mode],getLineWidth:[this.props.selectedFeatureIndexes,this.props.mode]}}),e=[new r.GeoJsonLayer(t)];return e=e.concat(this.createGuidesLayers(),this.createTooltipsLayers())}},{key:"initializeState",value:function(){m(v(u.prototype),"initializeState",this).call(this),this.setState({selectedFeatures:[],editHandles:[]})}},{key:"shouldUpdateState",value:function(t){return m(v(u.prototype),"shouldUpdateState",this).call(this,t)||t.changeFlags.stateChanged}},{key:"updateState",value:function(t){var e,n=t.props,r=t.oldProps,i=t.changeFlags,o=t.context;(m(v(u.prototype),"updateState",this).call(this,{oldProps:r,props:n,changeFlags:i,context:o}),!i.propsOrDataChanged||0!==Object.keys(r).length&&n.mode===r.mode)||("function"===typeof n.mode?e=new(0,n.mode):"string"===typeof n.mode?(e=N[n.mode],console.warn("Deprecated use of passing `mode` as a string. Pass the mode's class constructor instead.")):e=n.mode,e||(console.warn("No mode configured for ".concat(String(n.mode))),e=new L),e!==this.state.mode&&this.setState({mode:e,cursor:null}));var a=[];Array.isArray(n.selectedFeatureIndexes)&&(a=n.selectedFeatureIndexes.map((function(t){return n.data.features[t]}))),this.setState({selectedFeatures:a})}},{key:"getModeProps",value:function(t){var e=this;return{modeConfig:t.modeConfig,data:t.data,selectedIndexes:t.selectedFeatureIndexes,lastPointerMoveEvent:this.state.lastPointerMoveEvent,cursor:this.state.cursor,onEdit:function(n){e.setNeedsUpdate(),t.onEdit(n)},onUpdateCursor:function(t){e.setState({cursor:t})}}}},{key:"selectionAwareAccessor",value:function(t){var e=this;return"function"!==typeof t?t:function(n){return t(n,e.isFeatureSelected(n),e.props.mode)}}},{key:"isFeatureSelected",value:function(t){if(!this.props.data||!this.props.selectedFeatureIndexes)return!1;if(!this.props.selectedFeatureIndexes.length)return!1;var e=this.props.data.features.indexOf(t);return this.props.selectedFeatureIndexes.includes(e)}},{key:"getPickingInfo",value:function(t){var e=t.info;return t.sourceLayer.id.endsWith("guides")&&(e.isGuide=!0),e}},{key:"_updateAutoHighlight",value:function(t){if(null===t||void 0===t?void 0:t.sourceLayer)if(t.isGuide){var e,n=f(t.sourceLayer.getSubLayers());try{for(n.s();!(e=n.n()).done;)e.value.updateAutoHighlight(t)}catch(r){n.e(r)}finally{n.f()}}else t.sourceLayer.updateAutoHighlight(t)}},{key:"createGuidesLayers",value:function(){var t=this.getActiveMode().getGuides(this.getModeProps(this.props));if(!t||!t.features.length)return[];var e={linestrings:{billboard:this.props.billboard,autoHighlight:!1},"polygons-fill":{autoHighlight:!1},"polygons-stroke":{billboard:this.props.billboard}};return"icon"===this.props.editHandleType?e["points-icon"]={type:r.IconLayer,iconAtlas:this.props.editHandleIconAtlas,iconMapping:this.props.editHandleIconMapping,sizeUnits:this.props.editHandleIconSizeUnits,sizeScale:this.props.editHandleIconSizeScale,getIcon:j(this.props.getEditHandleIcon),getSize:j(this.props.getEditHandleIconSize),getColor:j(this.props.getEditHandleIconColor),getAngle:j(this.props.getEditHandleIconAngle)}:e["points-circle"]={type:r.ScatterplotLayer,radiusScale:this.props.editHandlePointRadiusScale,stroked:this.props.editHandlePointOutline,getLineWidth:this.props.editHandlePointStrokeWidth,radiusUnits:this.props.editHandlePointRadiusUnits,radiusMinPixels:this.props.editHandlePointRadiusMinPixels,radiusMaxPixels:this.props.editHandlePointRadiusMaxPixels,getRadius:j(this.props.getEditHandlePointRadius),getFillColor:j(this.props.getEditHandlePointColor),getLineColor:j(this.props.getEditHandlePointOutlineColor)},[new r.GeoJsonLayer(this.getSubLayerProps({id:"guides",data:t,fp64:this.props.fp64,_subLayerProps:e,lineWidthScale:this.props.lineWidthScale,lineWidthMinPixels:this.props.lineWidthMinPixels,lineWidthMaxPixels:this.props.lineWidthMaxPixels,lineWidthUnits:this.props.lineWidthUnits,lineJointRounded:this.props.lineJointRounded,lineCapRounded:this.props.lineCapRounded,lineMiterLimit:this.props.lineMiterLimit,getLineColor:j(this.props.getTentativeLineColor),getLineWidth:j(this.props.getTentativeLineWidth),getFillColor:j(this.props.getTentativeFillColor),pointType:"icon"===this.props.editHandleType?"icon":"circle",iconAtlas:this.props.editHandleIconAtlas}))]}},{key:"createTooltipsLayers",value:function(){var t=this.getActiveMode().getTooltips(this.getModeProps(this.props)),e=new r.TextLayer(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){_(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({getSize:I},this.getSubLayerProps({id:"tooltips",data:t})));return[e]}},{key:"onLayerClick",value:function(t){this.getActiveMode().handleClick(t,this.getModeProps(this.props))}},{key:"onLayerKeyUp",value:function(t){this.getActiveMode().handleKeyUp(t,this.getModeProps(this.props))}},{key:"onStartDragging",value:function(t){this.getActiveMode().handleStartDragging(t,this.getModeProps(this.props))}},{key:"onDragging",value:function(t){this.getActiveMode().handleDragging(t,this.getModeProps(this.props))}},{key:"onStopDragging",value:function(t){this.getActiveMode().handleStopDragging(t,this.getModeProps(this.props))}},{key:"onPointerMove",value:function(t){this.setState({lastPointerMoveEvent:t}),this.getActiveMode().handlePointerMove(t,this.getModeProps(this.props))}},{key:"getCursor",value:function(t){var e=t.isDragging;if(null===this.state||void 0===this.state)return null;var n=this.state.cursor;return n||(n=e?"grabbing":"grab"),n}},{key:"getActiveMode",value:function(){return this.state.mode}}],i&&d(n.prototype,i),o&&d(n,o),u}(a.default);e.default=D,_(D,"layerName","EditableGeoJsonLayer"),_(D,"defaultProps",R)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModifyMode=void 0;var r=n(34),i=n(97),o=n(64),a=n(161);function s(t){return s="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},s(t)}function u(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||l(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.")}()}function l(t,e){if(t){if("string"===typeof t)return c(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(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 f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(){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}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var y=function(t){!function(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&&g(t,e)}(y,t);var e,n,o,s,c=(e=y,function(){var t,n=m(e);if(d()){var r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function y(){return f(this,y),c.apply(this,arguments)}return n=y,(o=[{key:"getGuides",value:function(t){var e,n=this,o=[],a=t.data,s=t.lastPointerMoveEvent,c=a.features,f=s&&s.picks,h=s&&s.mapCoords,p=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=l(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(t.selectedIndexes);try{for(p.s();!(e=p.n()).done;){var d=e.value;if(d<c.length){var m=c[d].geometry;o.push.apply(o,u((0,i.getEditHandlesForGeometry)(m,d)))}else console.warn("selectedFeatureIndexes out of range ".concat(d))}}catch(E){p.e(E)}finally{p.f()}if(f&&f.length&&h){var g,y=!(0,i.getPickedExistingEditHandle)(f)&&f.find((function(t){return!t.isGuide}));if(y&&!y.object.geometry.type.includes("Point")&&(!(null===(g=t.modeConfig)||void 0===g?void 0:g.lockRectangles)||"Rectangle"!==y.object.properties.shape)&&t.selectedIndexes.includes(y.index)){var v=null,b=[],_=(0,r.point)(h);if((0,i.recursivelyTraverseNestedArrays)(y.object.geometry.coordinates,[],(function(e,i){var o=(0,r.lineString)(e),a=n.getNearestPoint(o,_,t.modeConfig&&t.modeConfig.viewport);(!v||a.properties.dist<v.properties.dist)&&(v=a,b=i)})),v){var A=v,w=A.geometry.coordinates,x=A.properties.index;o.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:y.index,positionIndexes:[].concat(u(b),[x+1])},geometry:{type:"Point",coordinates:w}})}}}return{type:"FeatureCollection",features:o}}},{key:"getNearestPoint",value:function(t,e,n){if(t.geometry.coordinates.some((function(t){return t.length>2}))){if(n)return(0,i.nearestPointOnProjectedLine)(t,e,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,i.nearestPointOnLine)(t,e,n)}},{key:"handleClick",value:function(t,e){var n=(0,i.getPickedExistingEditHandle)(t.picks),r=(0,i.getPickedIntermediateEditHandle)(t.picks);if(n){var o,s=n.properties,u=s.featureIndex,l=s.positionIndexes;try{o=new a.ImmutableFeatureCollection(e.data).removePosition(u,l).getObject()}catch(g){}o&&e.onEdit({updatedData:o,editType:"removePosition",editContext:{featureIndexes:[u],positionIndexes:l,position:n.geometry.coordinates}})}else if(r){var c,f=r.properties,h=f.featureIndex,p=f.positionIndexes,d=e.data.features[h];if(!(null===(c=e.modeConfig)||void 0===c?void 0:c.lockRectangles)||"Rectangle"!==(null===d||void 0===d?void 0:d.properties.shape)){var m=new a.ImmutableFeatureCollection(e.data).addPosition(h,p,r.geometry.coordinates).getObject();m&&e.onEdit({updatedData:m,editType:"addPosition",editContext:{featureIndexes:[h],positionIndexes:p,position:r.geometry.coordinates}})}}}},{key:"handleDragging",value:function(t,e){var n=(0,i.getPickedEditHandle)(t.pointerDownPicks);n&&(t.cancelPan(),this._dragEditHandle("movePosition",e,n,t))}},{key:"_dragEditHandle",value:function(t,e,n,r){var o,s,u=n.properties,l=e.data.features[u.featureIndex];if((null===(o=e.modeConfig)||void 0===o?void 0:o.lockRectangles)&&"Rectangle"===l.properties.shape){var c=(0,i.updateRectanglePosition)(l,u.positionIndexes[1],r.mapCoords);s=new a.ImmutableFeatureCollection(e.data).replaceGeometry(u.featureIndex,{coordinates:c,type:"Polygon"}).getObject()}else s=new a.ImmutableFeatureCollection(e.data).replacePosition(u.featureIndex,u.positionIndexes,r.mapCoords).getObject();e.onEdit({updatedData:s,editType:t,editContext:{featureIndexes:[u.featureIndex],positionIndexes:u.positionIndexes,position:r.mapCoords}})}},{key:"handlePointerMove",value:function(t,e){var n=this.getCursor(t);e.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,i.getPickedIntermediateEditHandle)(t.picks);if(n.length&&r){var o=r.properties,s=new a.ImmutableFeatureCollection(e.data).addPosition(o.featureIndex,o.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:s,editType:"addPosition",editContext:{featureIndexes:[o.featureIndex],positionIndexes:o.positionIndexes,position:t.mapCoords}})}}},{key:"handleStopDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,i.getPickedEditHandle)(t.picks);n.length&&r&&this._dragEditHandle("finishMovePosition",e,r,t)}},{key:"getCursor",value:function(t){var e=t&&t.picks||[];return(0,i.getPickedEditHandles)(e).length?"cell":null}}])&&h(n.prototype,o),s&&h(n,s),y}(o.GeoJsonEditMode);e.ModifyMode=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TranslateMode=void 0;var r=f(n(89)),i=f(n(119)),o=f(n(983)),a=n(34),s=f(n(441)),u=n(97),l=n(64),c=n(161);function f(t){return t&&t.__esModule?t:{default:t}}function h(t){return h="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},h(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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 m(t,e){return!e||"object"!==h(e)&&"function"!==typeof e?g(t):e}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(){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}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=function(t){!function(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&&b(t,e)}(A,t);var e,n,l,f,h=(e=A,function(){var t,n=v(e);if(y()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return m(this,t)});function A(){var t;p(this,A);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _(g(t=h.call.apply(h,[this].concat(n))),"_geometryBeforeTranslate",void 0),_(g(t),"_isTranslatable",void 0),t}return n=A,(l=[{key:"handleDragging",value:function(t,e){if(this._isTranslatable){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translating",e);n&&e.onEdit(n)}t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){this._isTranslatable=this.isSelectionPicked(t.pointerDownPicks||t.picks,e),this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._isTranslatable&&(this._geometryBeforeTranslate=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translated",e);n&&e.onEdit(n),this._geometryBeforeTranslate=null}}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("move"):t.onUpdateCursor(null)}},{key:"getTranslateAction",value:function(t,e,n,l){var f=this;if(!this._geometryBeforeTranslate)return null;var h=new c.ImmutableFeatureCollection(l.data),p=l.selectedIndexes,d=l.modeConfig||{},m=d.viewport,g=d.screenSpace;if(m&&g)!function(){for(var n=m.project?m:new s.default(m),r=n.project(t),i=n.project(e),o=i[0]-r[0],a=i[1]-r[1],l=0;l<p.length;l++){var c=p[l],d=f._geometryBeforeTranslate.features[l],g=d.geometry.coordinates;g&&(g=(0,u.mapCoords)(g,(function(t){var e=n.project(t);return e?(e[0]+=o,e[1]+=a,n.unproject(e)):null})),h=h.replaceGeometry(c,{type:d.geometry.type,coordinates:g}))}}();else for(var y=(0,a.point)(t),v=(0,a.point)(e),b=(0,i.default)(y,v),_=(0,r.default)(y,v),A=(0,o.default)(this._geometryBeforeTranslate,b,_),w=0;w<p.length;w++){var x=p[w],E=A.features[w];h=h.replaceGeometry(x,E.geometry)}return{updatedData:h.getObject(),editType:n,editContext:{featureIndexes:p}}}}])&&d(n.prototype,l),f&&d(n,f),A}(l.GeoJsonEditMode);e.TranslateMode=A},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonMode=void 0;var r,i=(r=n(260))&&r.__esModule?r:{default:r},o=n(34),a=n(97);function s(t){return s="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},s(t)}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return l(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(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.")}()}function l(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 c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e,n){return h="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function p(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(){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}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var y=function(t){!function(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&&g(t,e)}(y,t);var e,n,r,s,l=(e=y,function(){var t,n=m(e);if(d()){var r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function y(){return c(this,y),l.apply(this,arguments)}return n=y,(r=[{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length||2===r.length?e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(u(r),i)}}:r.length>2&&(e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(u(r),i,[r[0]])]}}),e}},{key:"getGuides",value:function(t){var e,n=this.getClickSequence(),r={type:"FeatureCollection",features:[]},i=this.createTentativeFeature(t);i&&r.features.push(i);var o=n.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=r.features).push.apply(e,u(o)),r}},{key:"handleClick",value:function(t,e){var n=t.picks,r=(0,a.getPickedEditHandle)(n),s=this.getClickSequence(),l=!1;if(s.length>2&&e.modeConfig&&e.modeConfig.preventOverlappingLines){var c=(0,o.lineString)([s[s.length-1],t.mapCoords]),f=(0,o.lineString)(u(s.slice(0,s.length-1)));(0,i.default)(c,f).features.length>0&&(l=!0)}var h=!1;if(r||l||(this.addClickSequence(t),h=!0),s.length>2&&r&&Array.isArray(r.properties.positionIndexes)&&(0===r.properties.positionIndexes[0]||r.properties.positionIndexes[0]===s.length-1)){var p={type:"Polygon",coordinates:[[].concat(u(s),[s[0]])]};this.resetClickSequence();var d=this.getAddFeatureOrBooleanPolygonAction(p,e);d&&e.onEdit(d)}else h&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var n=this.getClickSequence();if(n.length>2){var r={type:"Polygon",coordinates:[[].concat(u(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,e);i&&e.onEdit(i)}}}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),h(m(y.prototype),"handlePointerMove",this).call(this,t,e)}}])&&f(n.prototype,r),s&&f(n,s),y}(n(64).GeoJsonEditMode);e.DrawPolygonMode=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UNIT=e.PROJECTED_PIXEL_SIZE_MULTIPLIER=void 0;e.PROJECTED_PIXEL_SIZE_MULTIPLIER=2/3;e.UNIT={common:0,meters:1,pixels:2}},function(t,e,n){"use strict";function r(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 i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"objects",void 0),i(this,"originals",void 0),i(this,"updateTrigger",void 0),i(this,"_idToPosition",void 0),i(this,"_getData",void 0),i(this,"_convert",void 0),this.objects=[],this.originals=[],this.updateTrigger=0,this._idToPosition=new Map,this._getData=e,this._convert=n}var e,n,o;return e=t,(n=[{key:"updateAllDeckObjects",value:function(){var t=this;this._getData&&this._convert&&(this.originals.length=0,this.objects.length=0,this._idToPosition.clear(),this._getData().forEach((function(e){t._idToPosition.set(e.id,t.objects.length),t.originals.push(e),t.objects.push(t._convert(e))})),this.triggerUpdate())}},{key:"updateDeckObjectsByIds",value:function(t){var e=this;this._getData&&this._convert&&(t.forEach((function(t){var n=e._idToPosition.get(t);void 0!==n&&(e.objects[n]=e._convert(e.originals[n]))})),this.triggerUpdate())}},{key:"triggerUpdate",value:function(){this.updateTrigger++}},{key:"getDeckObjectById",value:function(t){var e=this._idToPosition.get(t);return void 0!==e?this.objects[e]:null}},{key:"getOriginalById",value:function(t){var e=this._idToPosition.get(t);return void 0!==e?this.originals[e]:null}}])&&r(e.prototype,n),o&&r(e,o),t}();e.default=o},function(t,e){t.exports=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},function(t,e,n){var r=n(918),i=n(519),o=n(919),a=0,s=Math.pow(36,4);function u(){return i((o()*s<<0).toString(36),4)}function l(){return a=a<s?a:0,++a-1}function c(){return"c"+(new Date).getTime().toString(36)+i(l().toString(36),4)+r()+(u()+u())}c.slug=function(){var t=(new Date).getTime().toString(36),e=l().toString(36).slice(-4),n=r().slice(0,1)+r().slice(-1),i=u().slice(-2);return t.slice(-2)+e+n+i},c.isCuid=function(t){return"string"===typeof t&&!!t.startsWith("c")},c.isSlug=function(t){if("string"!==typeof t)return!1;var e=t.length;return e>=7&&e<=10},c.fingerprint=r,t.exports=c},function(t,e){t.exports=function(t,e){var n="000000000"+t;return n.substr(n.length-e)}},function(t,e){t.exports=function(t){var e=t.lastIndexOf(".");return-1===e||e===t.length-1?{name:t,extension:void 0}:{name:t.slice(0,e),extension:t.slice(e+1)}}},function(t,e){t.exports=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}},function(t,e){t.exports={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"}},function(t,e,n){},function(t,e,n){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return null}}e.stringify=function(t,e){e=e||"";var n,i,o=[];for(i in"string"!==typeof e&&(e="?"),t)if(r.call(t,i)){if((n=t[i])||null!==n&&undefined!==n&&!isNaN(n)||(n=""),i=encodeURIComponent(i),n=encodeURIComponent(n),null===i||null===n)continue;o.push(i+"="+n)}return o.length?e+o.join("&"):""},e.parse=function(t){for(var e,n=/([^=?&]+)=?([^&]*)/g,r={};e=n.exec(t);){var o=i(e[1]),a=i(e[2]);null===o||null===a||o in r||(r[o]=a)}return r}},function(t,e){function n(t){var e="function"===typeof Map?new Map:void 0;return n=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return r(t,arguments,a(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o(i,t)},n(t)}function r(t,e,n){return r=i()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&o(i,n.prototype),i},r.apply(null,arguments)}function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}var s=function(t){var e,n;function r(e,n){var r;return void 0===n&&(n=null),(r=t.call(this,"This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.\n\nSource error: ["+e+"]")||this).isNetworkError=!0,r.request=n,r}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,o(e,n),r}(n(Error));t.exports=s},function(t,e,n){"use strict";n.r(e),n.d(e,"Upload",(function(){return ft})),n.d(e,"canStoreURLs",(function(){return D})),n.d(e,"defaultOptions",(function(){return ct})),n.d(e,"isSupported",(function(){return mt})),n.d(e,"enableDebugLog",(function(){return y})),n.d(e,"HttpStack",(function(){return G}));var r=n(428),i=n(580),o=n.n(i);function a(t){return a="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},a(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){var e="function"===typeof Map?new Map:void 0;return l=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return c(t,arguments,p(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,t)},l(t)}function c(t,e,n){return c=f()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&h(i,n.prototype),i},c.apply(null,arguments)}function f(){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}}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var d=function(t){!function(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&&h(t,e)}(r,t);var e,n=(e=r,function(){var t,n=p(e);if(f()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function r(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(s(this,r),(e=n.call(this,t)).originalRequest=o,e.originalResponse=a,e.causingError=i,null!=i&&(t+=", caused by ".concat(i.toString())),null!=o){var u=o.getHeader("X-Request-ID")||"n/a",l=o.getMethod(),c=o.getURL(),f=a?a.getStatus():"n/a",h=a?a.getBody()||"":"n/a";t+=", originated from request (method: ".concat(l,", url: ").concat(c,", response code: ").concat(f,", response text: ").concat(h,", request id: ").concat(u,")")}return e.message=t,e}return r}(l(Error)),m=d,g=!1;function y(){g=!0}function v(t){g&&console.log(t)}function b(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 _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){A(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(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)}}var x={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,_onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},E=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,this._urlStorage=this.options.urlStorage,this.file=e,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}var e,n,r;return e=t,n=[{key:"findPreviousUploads",value:function(){var t=this;return this.options.fingerprint(this.file,this.options).then((function(e){return t._urlStorage.findUploadsByFingerprint(e)}))}},{key:"resumeFromPreviousUpload",value:function(t){this.url=t.uploadUrl||null,this._parallelUploadUrls=t.parallelUploadUrls||null,this._urlStorageKey=t.urlStorageKey}},{key:"start",value:function(){var t=this,e=this.file;if(e)if(this.options.endpoint||this.options.uploadUrl){var n=this.options.retryDelays;null==n||"[object Array]"===Object.prototype.toString.call(n)?(this.options.parallelUploads>1&&["uploadUrl","uploadSize","uploadLengthDeferred"].forEach((function(e){t.options[e]&&t._emitError(new Error("tus: cannot use the ".concat(e," option when parallelUploads is enabled")))})),this.options.fingerprint(e,this.options).then((function(n){return v(null==n?"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.":"Calculated fingerprint: ".concat(n)),t._fingerprint=n,t._source?t._source:t.options.fileReader.openFile(e,t.options.chunkSize)})).then((function(e){t._source=e,t.options.parallelUploads>1||null!=t._parallelUploadUrls?t._startParallelUpload():t._startSingleUpload()})).catch((function(e){t._emitError(e)}))):this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var e=this,n=this._size=this._source.size,r=0;this._parallelUploads=[];var i=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,o=function(t,e,n){for(var r=Math.floor(t/e),i=[],o=0;o<e;o++)i.push({start:r*o,end:r*(o+1)});return i[e-1].end=t,n&&i.forEach((function(t,e){t.uploadUrl=n[e]||null})),i}(this._source.size,i,this._parallelUploadUrls);this._parallelUploadUrls=new Array(o.length);var a,s=o.map((function(i,a){var s=0;return e._source.slice(i.start,i.end).then((function(u){var l=u.value;return new Promise((function(u,c){var f=_({},e.options,{uploadUrl:i.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:_({},e.options.headers,{"Upload-Concat":"partial"}),onSuccess:u,onError:c,onProgress:function(t){r=r-s+t,s=t,e._emitProgress(r,n)},_onUploadUrlAvailable:function(){e._parallelUploadUrls[a]=h.url,e._parallelUploadUrls.filter((function(t){return!!t})).length===o.length&&e._saveUploadInUrlStorage()}}),h=new t(l,f);h.start(),e._parallelUploads.push(h)}))}))}));Promise.all(s).then((function(){(a=e._openRequest("POST",e.options.endpoint)).setHeader("Upload-Concat","final;".concat(e._parallelUploadUrls.join(" ")));var t=O(e.options.metadata);return""!==t&&a.setHeader("Upload-Metadata",t),e._sendRequest(a,null)})).then((function(t){if(S(t.getStatus(),200)){var n=t.getHeader("Location");null!=n?(e.url=k(e.options.endpoint,n),v("Created upload at ".concat(e.url)),e._emitSuccess()):e._emitHttpError(a,t,"tus: invalid or missing Location header")}else e._emitHttpError(a,t,"tus: unexpected response while creating upload")})).catch((function(t){e._emitError(t)}))}},{key:"_startSingleUpload",value:function(){if(this.options.uploadLengthDeferred)this._size=null;else if(null!=this.options.uploadSize){if(this._size=+this.options.uploadSize,isNaN(this._size))return void this._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(this._size=this._source.size,null==this._size)return void this._emitError(new Error("tus: cannot automatically derive upload's size from input and must be specified manually using the `uploadSize` option"));return this._aborted=!1,null!=this.url?(v("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?(v("Resuming upload from provided URL: ".concat(this.options.url)),this.url=this.options.uploadUrl,void this._resumeUpload()):(v("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(e,n){var r=this;if("function"===typeof n)throw new Error("tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead");return null!=this._parallelUploads&&this._parallelUploads.forEach((function(t){t.abort(e)})),null!==this._req&&(this._req.abort(),this._source.close()),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),e&&null!=this.url?t.terminate(this.url,this.options).then((function(){return r._removeFromUrlStorage()})):Promise.resolve()}},{key:"_emitHttpError",value:function(t,e,n,r){this._emitError(new m(n,r,t,e))}},{key:"_emitError",value:function(t){var e=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),T(t,this._retryAttempt,this.options))){var n=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout((function(){e.start()}),n))}if("function"!==typeof this.options.onError)throw t;this.options.onError(t)}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"===typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(t,e){"function"===typeof this.options.onProgress&&this.options.onProgress(t,e)}},{key:"_emitChunkComplete",value:function(t,e,n){"function"===typeof this.options.onChunkComplete&&this.options.onChunkComplete(t,e,n)}},{key:"_createUpload",value:function(){var t=this;if(this.options.endpoint){var e=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?e.setHeader("Upload-Defer-Length",1):e.setHeader("Upload-Length",this._size);var n,r=O(this.options.metadata);""!==r&&e.setHeader("Upload-Metadata",r),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,n=this._addChunkToRequest(e)):n=this._sendRequest(e,null),n.then((function(n){if(S(n.getStatus(),200)){var r=n.getHeader("Location");if(null!=r){if(t.url=k(t.options.endpoint,r),v("Created upload at ".concat(t.url)),"function"===typeof t.options._onUploadUrlAvailable&&t.options._onUploadUrlAvailable(),0===t._size)return t._emitSuccess(),void t._source.close();t._saveUploadInUrlStorage(),t.options.uploadDataDuringCreation?t._handleUploadResponse(e,n):(t._offset=0,t._performUpload())}else t._emitHttpError(e,n,"tus: invalid or missing Location header")}else t._emitHttpError(e,n,"tus: unexpected response while creating upload")})).catch((function(n){t._emitHttpError(e,null,"tus: failed to create upload",n)}))}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var t=this,e=this._openRequest("HEAD",this.url);this._sendRequest(e,null).then((function(n){var r=n.getStatus();if(!S(r,200))return S(r,400)&&t._removeFromUrlStorage(),423===r?void t._emitHttpError(e,n,"tus: upload is currently locked; retry later"):t.options.endpoint?(t.url=null,void t._createUpload()):void t._emitHttpError(e,n,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var i=parseInt(n.getHeader("Upload-Offset"),10);if(isNaN(i))t._emitHttpError(e,n,"tus: invalid or missing offset value");else{var o=parseInt(n.getHeader("Upload-Length"),10);if(!isNaN(o)||t.options.uploadLengthDeferred){if("function"===typeof t.options._onUploadUrlAvailable&&t.options._onUploadUrlAvailable(),i===o)return t._emitProgress(o,o),void t._emitSuccess();t._offset=i,t._performUpload()}else t._emitHttpError(e,n,"tus: invalid or missing length value")}})).catch((function(n){t._emitHttpError(e,null,"tus: failed to resume upload",n)}))}},{key:"_performUpload",value:function(){var t,e=this;this._aborted||(this.options.overridePatchMethod?(t=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):t=this._openRequest("PATCH",this.url),t.setHeader("Upload-Offset",this._offset),this._addChunkToRequest(t).then((function(n){S(n.getStatus(),200)?e._handleUploadResponse(t,n):e._emitHttpError(t,n,"tus: unexpected response while uploading chunk")})).catch((function(n){e._aborted||e._emitHttpError(t,null,"tus: failed to upload chunk at offset "+e._offset,n)})))}},{key:"_addChunkToRequest",value:function(t){var e=this,n=this._offset,r=this._offset+this.options.chunkSize;return t.setProgressHandler((function(t){e._emitProgress(n+t,e._size)})),t.setHeader("Content-Type","application/offset+octet-stream"),(r===1/0||r>this._size)&&!this.options.uploadLengthDeferred&&(r=this._size),this._source.slice(n,r).then((function(n){var r=n.value,i=n.done;return e.options.uploadLengthDeferred&&i&&(e._size=e._offset+(r&&r.size?r.size:0),t.setHeader("Upload-Length",e._size)),null===r?e._sendRequest(t):(e._emitProgress(e._offset,e._size),e._sendRequest(t,r))}))}},{key:"_handleUploadResponse",value:function(t,e){var n=parseInt(e.getHeader("Upload-Offset"),10);if(isNaN(n))this._emitHttpError(t,e,"tus: invalid or missing offset value");else{if(this._emitProgress(n,this._size),this._emitChunkComplete(n-this._offset,n,this._size),this._offset=n,n==this._size)return this._emitSuccess(),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(t,e){var n=P(t,e,this.options);return this._req=n,n}},{key:"_removeFromUrlStorage",value:function(){var t=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch((function(e){t._emitError(e)})),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var t=this;if(this.options.storeFingerprintForResuming&&this._fingerprint){var e={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};this._parallelUploads?e.parallelUploadUrls=this._parallelUploadUrls:e.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,e).then((function(e){return t._urlStorageKey=e})).catch((function(e){t._emitError(e)}))}}},{key:"_sendRequest",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return C(t,e,this.options)}}],r=[{key:"terminate",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if("function"===typeof n||"function"===typeof r)throw new Error("tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead");var i=P("DELETE",e,n);return C(i,null,n).then((function(t){if(204!==t.getStatus())throw new m("tus: unexpected response while terminating upload",null,i,t)})).catch((function(r){if(r instanceof m||(r=new m("tus: failed to terminate upload",r,i,null)),!T(r,0,n))throw r;var o=n.retryDelays[0],a=n.retryDelays.slice(1),s=_({},n,{retryDelays:a});return new Promise((function(t){return setTimeout(t,o)})).then((function(){return t.terminate(e,s)}))}))}}],n&&w(e.prototype,n),r&&w(e,r),t}();function O(t){var e=[];for(var n in t)e.push(n+" "+r.Base64.encode(t[n]));return e.join(",")}function S(t,e){return t>=e&&t<e+100}function P(t,e,n){var r=n.httpStack.createRequest(t,e);r.setHeader("Tus-Resumable","1.0.0");var i=n.headers||{};for(var o in i)r.setHeader(o,i[o]);if(n.addRequestId){var a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}));r.setHeader("X-Request-ID",a)}return r}function C(t,e,n){return("function"===typeof n.onBeforeRequest?Promise.resolve(n.onBeforeRequest(t)):Promise.resolve()).then((function(){return t.send(e).then((function(e){return("function"===typeof n.onAfterResponse?Promise.resolve(n.onAfterResponse(t,e)):Promise.resolve()).then((function(){return e}))}))}))}function T(t,e,n){if(null==n.retryDelays||e>=n.retryDelays.length||null==t.originalRequest)return!1;if(n&&"function"===typeof n.onShouldRetry)return n.onShouldRetry(t,e,n);var r,i=t.originalResponse?t.originalResponse.getStatus():0;return(!S(i,400)||409===i||423===i)&&(r=!0,"undefined"!==typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(r=!1),r)}function k(t,e){return new o.a(e,t).toString()}E.defaultOptions=x;var I=E;function L(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)}}var j=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,(n=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(t){return Promise.resolve([])}},{key:"removeUpload",value:function(t){return Promise.resolve()}},{key:"addUpload",value:function(t,e){return Promise.resolve(null)}}])&&L(e.prototype,n),r&&L(e,r),t}();function M(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)}}var R=!1;try{R="localStorage"in window;var N="tusSupport";localStorage.setItem(N,localStorage.getItem(N))}catch(gt){if(gt.code!==gt.SECURITY_ERR&&gt.code!==gt.QUOTA_EXCEEDED_ERR)throw gt;R=!1}var D=R,F=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,n=[{key:"findAllUploads",value:function(){var t=this._findEntries("tus::");return Promise.resolve(t)}},{key:"findUploadsByFingerprint",value:function(t){var e=this._findEntries("tus::".concat(t,"::"));return Promise.resolve(e)}},{key:"removeUpload",value:function(t){return localStorage.removeItem(t),Promise.resolve()}},{key:"addUpload",value:function(t,e){var n=Math.round(1e12*Math.random()),r="tus::".concat(t,"::").concat(n);return localStorage.setItem(r,JSON.stringify(e)),Promise.resolve(r)}},{key:"_findEntries",value:function(t){for(var e=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(0===r.indexOf(t))try{var i=JSON.parse(localStorage.getItem(r));i.urlStorageKey=r,e.push(i)}catch(gt){}}return e}}],n&&M(e.prototype,n),r&&M(e,r),t}();function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(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 U(t,e,n){return e&&z(t.prototype,e),n&&z(t,n),t}var G=function(){function t(){B(this,t)}return U(t,[{key:"createRequest",value:function(t,e){return new V(t,e)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),t}(),V=function(){function t(e,n){B(this,t),this._xhr=new XMLHttpRequest,this._xhr.open(e,n,!0),this._method=e,this._url=n,this._headers={}}return U(t,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(t,e){this._xhr.setRequestHeader(t,e),this._headers[t]=e}},{key:"getHeader",value:function(t){return this._headers[t]}},{key:"setProgressHandler",value:function(t){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(e){e.lengthComputable&&t(e.loaded)})}},{key:"send",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise((function(n,r){t._xhr.onload=function(){n(new q(t._xhr))},t._xhr.onerror=function(t){r(t)},t._xhr.send(e)}))}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),t}(),q=function(){function t(e){B(this,t),this._xhr=e}return U(t,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(t){return this._xhr.getResponseHeader(t)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),t}(),H=function(){return"undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};var W=function(){return"undefined"!=typeof window&&("undefined"!=typeof window.PhoneGap||"undefined"!=typeof window.Cordova||"undefined"!=typeof window.cordova)};function X(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y(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 Z(t,e,n){return e&&Y(t.prototype,e),n&&Y(t,n),t}var K=function(){function t(e){X(this,t),this._file=e,this.size=e.size}return Z(t,[{key:"slice",value:function(t,e){if(W())return n=this._file.slice(t,e),new Promise((function(t,e){var r=new FileReader;r.onload=function(){var e=new Uint8Array(r.result);t({value:e})},r.onerror=function(t){e(t)},r.readAsArrayBuffer(n)}));var n,r=this._file.slice(t,e);return Promise.resolve({value:r})}},{key:"close",value:function(){}}]),t}(),$=function(){function t(e,n){X(this,t),this._chunkSize=n,this._buffer=void 0,this._bufferOffset=0,this._reader=e,this._done=!1}return Z(t,[{key:"slice",value:function(t,e){return t<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(t,e)}},{key:"_readUntilEnoughDataOrDone",value:function(t,e){var n=this,r=e<=this._bufferOffset+J(this._buffer);if(this._done||r){var i=this._getDataFromBuffer(t,e),o=null==i&&this._done;return Promise.resolve({value:i,done:o})}return this._reader.read().then((function(r){var i=r.value;return r.done?n._done=!0:void 0===n._buffer?n._buffer=i:n._buffer=function(t,e){if(t.concat)return t.concat(e);if(t instanceof Blob)return new Blob([t,e],{type:t.type});if(t.set){var n=new t.constructor(t.length+e.length);return n.set(t),n.set(e,t.length),n}throw new Error("Unknown data type")}(n._buffer,i),n._readUntilEnoughDataOrDone(t,e)}))}},{key:"_getDataFromBuffer",value:function(t,e){t>this._bufferOffset&&(this._buffer=this._buffer.slice(t-this._bufferOffset),this._bufferOffset=t);var n=0===J(this._buffer);return this._done&&n?null:this._buffer.slice(0,e-t)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),t}();function J(t){return void 0===t?0:void 0!==t.size?t.size:t.length}var Q=function(){function t(){X(this,t)}return Z(t,[{key:"openFile",value:function(t,e){return H()&&t&&"undefined"!==typeof t.uri?(n=t.uri,new Promise((function(t,e){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var e=r.response;t(e)},r.onerror=function(t){e(t)},r.open("GET",n),r.send()}))).then((function(t){return new K(t)})).catch((function(t){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. "+t)})):"function"===typeof t.slice&&"undefined"!==typeof t.size?Promise.resolve(new K(t)):"function"===typeof t.read?(e=+e,isFinite(e)?Promise.resolve(new $(t,e)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"));var n}}]),t}();function tt(t){return tt="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},tt(t)}function et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(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 rt(t,e){return rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},rt(t,e)}function it(t,e){return!e||"object"!==tt(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ot(){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(gt){return!1}}function at(t){return at=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},at(t)}function st(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 ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?st(Object(n),!0).forEach((function(e){lt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function lt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ct=ut({},I.defaultOptions,{httpStack:new G,fileReader:new Q,urlStorage:D?new F:new j,fingerprint:function(t,e){return H()?Promise.resolve(function(t,e){var n=t.exif?function(t){var e=0;if(0===t.length)return e;for(var n=0;n<t.length;n++){e=(e<<5)-e+t.charCodeAt(n),e&=e}return e}(JSON.stringify(t.exif)):"noexif";return["tus-rn",t.name||"noname",t.size||"nosize",n,e.endpoint].join("/")}(t,e)):Promise.resolve(["tus-br",t.name,t.type,t.size,t.lastModified,e.endpoint].join("-"))}}),ft=function(t){!function(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&&rt(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=at(e);if(ot()){var r=at(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return it(this,t)});function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return et(this,a),e=ut({},ct,{},e),o.call(this,t,e)}return n=a,i=[{key:"terminate",value:function(t,e,n){return e=ut({},ct,{},e),I.terminate(t,e,n)}}],(r=null)&&nt(n.prototype,r),i&&nt(n,i),a}(I),ht=window,pt=ht.XMLHttpRequest,dt=ht.Blob,mt=pt&&dt&&"function"===typeof dt.prototype.slice},function(t,e,n){"use strict";n.r(e),n.d(e,"flatGeojsonToBinary",(function(){return r.a})),n.d(e,"geojsonToBinary",(function(){return w})),n.d(e,"geojsonToFlatGeojson",(function(){return y})),n.d(e,"binaryToGeojson",(function(){return x.b})),n.d(e,"binaryToGeoJson",(function(){return x.a})),n.d(e,"binaryToGeometry",(function(){return x.c})),n.d(e,"transformBinaryCoords",(function(){return S})),n.d(e,"transformGeoJsonCoords",(function(){return C}));var r=n(533);function i(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a(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.")}()}function o(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(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,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){if(t){if("string"===typeof t)return s(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)?s(t,e):void 0}}function s(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 u(t){var e,n=0,r=0,a=0,s=0,u=0,l=0,c=0,f=0,h=0,p=new Set,d=o(t);try{for(d.s();!(e=d.n()).done;){var m=e.value.geometry;switch(m.type){case"Point":r++,n++,p.add(m.coordinates.length);break;case"MultiPoint":r++,n+=m.coordinates.length;var g,y=o(m.coordinates);try{for(y.s();!(g=y.n()).done;){var v=g.value;p.add(v.length)}}catch(B){y.e(B)}finally{y.f()}break;case"LineString":u++,a+=m.coordinates.length,s++;var b,_=o(m.coordinates);try{for(_.s();!(b=_.n()).done;){var A=b.value;p.add(A.length)}}catch(B){_.e(B)}finally{_.f()}break;case"MultiLineString":u++;var w,x=o(m.coordinates);try{for(x.s();!(w=x.n()).done;){var E=w.value;a+=E.length,s++;var O,S=o(E);try{for(S.s();!(O=S.n()).done;){var P=O.value;p.add(P.length)}}catch(B){S.e(B)}finally{S.f()}}}catch(B){x.e(B)}finally{x.f()}break;case"Polygon":h++,c++,f+=m.coordinates.length;var C=m.coordinates.flat();l+=C.length;var T,k=o(C);try{for(k.s();!(T=k.n()).done;){var I=T.value;p.add(I.length)}}catch(B){k.e(B)}finally{k.f()}break;case"MultiPolygon":h++;var L,j=o(m.coordinates);try{for(j.s();!(L=j.n()).done;){var M=L.value;c++,f+=M.length;var R=M.flat();l+=R.length;var N,D=o(R);try{for(D.s();!(N=D.n()).done;){var F=N.value;p.add(F.length)}}catch(B){D.e(B)}finally{D.f()}}}catch(B){j.e(B)}finally{j.f()}break;default:throw new Error("Unsupported geometry type: ".concat(m.type))}}}catch(B){d.e(B)}finally{d.f()}return{coordLength:p.size>0?Math.max.apply(Math,i(p)):2,pointPositionsCount:n,pointFeaturesCount:r,linePositionsCount:a,linePathsCount:s,lineFeaturesCount:u,polygonPositionsCount:l,polygonObjectsCount:c,polygonRingsCount:f,polygonFeaturesCount:h}}var l=n(53);function c(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 f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=m(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function d(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(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.")}()}function m(t,e){if(t){if("string"===typeof t)return g(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)?g(t,e):void 0}}function g(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 y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{coordLength:2,fixRingWinding:!0};return t.map((function(t){return A(t,e)}))}function v(t,e,n,r){n.push(e.length),e.push.apply(e,d(t));for(var i=t.length;i<r.coordLength;i++)e.push(0)}function b(t,e,n,r){n.push(e.length);var i,o=p(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;e.push.apply(e,d(a));for(var s=a.length;s<r.coordLength;s++)e.push(0)}}catch(u){o.e(u)}finally{o.f()}}function _(t,e,n,r,i){var o,a=0,s=[],u=[],c=p(t);try{for(c.s();!(o=c.n()).done;){var f=o.value,h=f.map((function(t){return t.slice(0,2)})),d=Object(l.getPolygonSignedArea)(h.flat()),m=d<0;i.fixRingWinding&&(0===a&&!m||a>0&&m)&&(f.reverse(),d=-d),s.push(d),b(f,e,u,i),a++}}catch(g){c.e(g)}finally{c.f()}a>0&&(r.push(s),n.push(u))}function A(t,e){var n=t.geometry;if("GeometryCollection"===n.type)throw new Error("GeometryCollection type not supported");var r,i,o=[],a=[];switch(n.type){case"Point":i="Point",v(n.coordinates,o,a,e);break;case"MultiPoint":i="Point",n.coordinates.map((function(t){return v(t,o,a,e)}));break;case"LineString":i="LineString",b(n.coordinates,o,a,e);break;case"MultiLineString":i="LineString",n.coordinates.map((function(t){return b(t,o,a,e)}));break;case"Polygon":i="Polygon",r=[],_(n.coordinates,o,a,r,e);break;case"MultiPolygon":i="Polygon",r=[],n.coordinates.map((function(t){return _(t,o,a,r,e)}));break;default:throw new Error("Unknown type: ".concat(i))}return f(f({},t),{},{geometry:{type:i,indices:a,data:o,areas:r}})}function w(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fixRingWinding:!0},n=u(t),i=n.coordLength,o=e.fixRingWinding,a=y(t,{coordLength:i,fixRingWinding:o});return Object(r.a)(a,n,{numericPropKeys:e.numericPropKeys,PositionDataType:e.PositionDataType||Float32Array})}var x=n(493);function E(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return O(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 O(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function O(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 S(t,e){return t.points&&P(t.points,e),t.lines&&P(t.lines,e),t.polygons&&P(t.polygons,e),t}function P(t,e){for(var n=t.positions,r=0;r<n.value.length;r+=n.size){var i=e(Array.from(n.value.subarray(r,r+n.size)));n.value.set(i,r)}}function C(t,e){var n,r=E(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.geometry.coordinates=T(i.geometry.coordinates,e)}}catch(o){r.e(o)}finally{r.f()}return t}function T(t,e){return function(t){return Number.isFinite(t[0])&&Number.isFinite(t[1])}(t)?e(t):t.map((function(t){return T(t,e)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(1),i=n(357),o=n(491),a=n(492),s=n(15),u=n(366),l=n(130);const c=[0,0,0,255],f={getSourcePosition:{type:"accessor",value:t=>t.sourcePosition},getTargetPosition:{type:"accessor",value:t=>t.targetPosition},getSourceColor:{type:"accessor",value:c},getTargetColor:{type:"accessor",value:c},getWidth:{type:"accessor",value:1},getHeight:{type:"accessor",value:1},getTilt:{type:"accessor",value:0},greatCircle:!1,widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class h extends i.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME arc-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instanceHeights;\nattribute float instanceTilts;\n\nuniform bool greatCircle;\nuniform bool useShortestPath;\nuniform float numSegments;\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nfloat paraboloid(float distance, float sourceZ, float targetZ, float ratio) {\n  // d: distance on the xy plane\n  // r: ratio of the current point\n  // p: ratio of the peak of the arc\n  // h: height multiplier\n  // z = f(r) = sqrt(r * (p * 2 - r)) * d * h\n  // f(0) = 0\n  // f(1) = dz\n\n  float deltaZ = targetZ - sourceZ;\n  float dh = distance * instanceHeights;\n  if (dh == 0.0) {\n    return sourceZ + deltaZ * ratio;\n  }\n  float unitZ = deltaZ / dh;\n  float p2 = unitZ * unitZ + 1.0;\n\n  // sqrt does not deal with negative values, manually flip source and target if delta.z < 0\n  float dir = step(deltaZ, 0.0);\n  float z0 = mix(sourceZ, targetZ, dir);\n  float r = mix(ratio, 1.0 - ratio, dir);\n  return sqrt(r * (p2 - r)) * dh + z0;\n}\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n  // normalized direction of the line\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  // rotate by 90 degrees\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  return dir_screenspace * offset_direction * width / 2.0;\n}\n\nfloat getSegmentRatio(float index) {\n  return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvec3 interpolateFlat(vec3 source, vec3 target, float segmentRatio) {\n  float distance = length(source.xy - target.xy);\n  float z = paraboloid(distance, source.z, target.z, segmentRatio);\n\n  float tiltAngle = radians(instanceTilts);\n  vec2 tiltDirection = normalize(target.xy - source.xy);\n  vec2 tilt = vec2(-tiltDirection.y, tiltDirection.x) * z * sin(tiltAngle);\n\n  return vec3(\n    mix(source.xy, target.xy, segmentRatio) + tilt,\n    z * cos(tiltAngle)\n  );\n}\n\n/* Great circle interpolation\n * http://www.movable-type.co.uk/scripts/latlong.html\n */\nfloat getAngularDist (vec2 source, vec2 target) {\n  vec2 sourceRadians = radians(source);\n  vec2 targetRadians = radians(target);\n  vec2 sin_half_delta = sin((sourceRadians - targetRadians) / 2.0);\n  vec2 shd_sq = sin_half_delta * sin_half_delta;\n\n  float a = shd_sq.y + cos(sourceRadians.y) * cos(targetRadians.y) * shd_sq.x;\n  return 2.0 * asin(sqrt(a));\n}\n\nvec3 interpolateGreatCircle(vec3 source, vec3 target, vec3 source3D, vec3 target3D, float angularDist, float t) {\n  vec2 lngLat;\n\n  // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\n  if(abs(angularDist - PI) < 0.001) {\n    lngLat = (1.0 - t) * source.xy + t * target.xy;\n  } else {\n    float a = sin((1.0 - t) * angularDist);\n    float b = sin(t * angularDist);\n    vec3 p = source3D.yxz * a + target3D.yxz * b;\n    lngLat = degrees(vec2(atan(p.y, -p.x), atan(p.z, length(p.xy))));\n  }\n\n  float z = paraboloid(angularDist * EARTH_RADIUS, source.z, target.z, t);\n\n  return vec3(lngLat, z);\n}\n\n/* END GREAT CIRCLE */\n\nvoid main(void) {\n  geometry.worldPosition = instanceSourcePositions;\n  geometry.worldPositionAlt = instanceTargetPositions;\n\n  float segmentIndex = positions.x;\n  float segmentRatio = getSegmentRatio(segmentIndex);\n  float prevSegmentRatio = getSegmentRatio(max(0.0, segmentIndex - 1.0));\n  float nextSegmentRatio = getSegmentRatio(min(numSegments - 1.0, segmentIndex + 1.0));\n\n  // if it's the first point, use next - current as direction\n  // otherwise use current - prev\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n  isValid = 1.0;\n\n  uv = vec2(segmentRatio, positions.y);\n  geometry.uv = uv;\n  geometry.pickingColor = instancePickingColors;\n\n  vec4 curr;\n  vec4 next;\n  vec3 source;\n  vec3 target;\n\n  if ((greatCircle || project_uProjectionMode == PROJECTION_MODE_GLOBE) && project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n    source = project_globe_(vec3(instanceSourcePositions.xy, 0.0));\n    target = project_globe_(vec3(instanceTargetPositions.xy, 0.0));\n    float angularDist = getAngularDist(instanceSourcePositions.xy, instanceTargetPositions.xy);\n\n    vec3 prevPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, prevSegmentRatio);\n    vec3 currPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, segmentRatio);\n    vec3 nextPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, nextSegmentRatio);\n\n    if (abs(currPos.x - prevPos.x) > 180.0) {\n      indexDir = -1.0;\n      isValid = 0.0;\n    } else if (abs(currPos.x - nextPos.x) > 180.0) {\n      indexDir = 1.0;\n      isValid = 0.0;\n    }\n    nextPos = indexDir < 0.0 ? prevPos : nextPos;\n    nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n\n    if (isValid == 0.0) {\n      // split at the 180th meridian\n      nextPos.x += nextPos.x > 0.0 ? -360.0 : 360.0;\n      float t = ((currPos.x > 0.0 ? 180.0 : -180.0) - currPos.x) / (nextPos.x - currPos.x);\n      currPos = mix(currPos, nextPos, t);\n      segmentRatio = mix(segmentRatio, nextSegmentRatio, t);\n    }\n\n    vec3 currPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, segmentRatio);\n    vec3 nextPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, nextSegmentRatio);\n  \n    curr = project_position_to_clipspace(currPos, currPos64Low, vec3(0.0), geometry.position);\n    next = project_position_to_clipspace(nextPos, nextPos64Low, vec3(0.0));\n  \n  } else {\n    vec3 source_world = instanceSourcePositions;\n    vec3 target_world = instanceTargetPositions;\n    if (useShortestPath) {\n      source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n      target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n\n      float deltaLng = target_world.x - source_world.x;\n      if (deltaLng > 180.) target_world.x -= 360.;\n      if (deltaLng < -180.) source_world.x -= 360.;\n    }\n    source = project_position(source_world, instanceSourcePositions64Low);\n    target = project_position(target_world, instanceTargetPositions64Low);\n\n    // common x at longitude=-180\n    float antiMeridianX = 0.0;\n\n    if (useShortestPath) {\n      if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n        antiMeridianX = -(project_uCoordinateOrigin.x + 180.) / 360. * TILE_SIZE;\n      }\n      float thresholdRatio = (antiMeridianX - source.x) / (target.x - source.x);\n\n      if (prevSegmentRatio <= thresholdRatio && nextSegmentRatio > thresholdRatio) {\n        isValid = 0.0;\n        indexDir = sign(segmentRatio - thresholdRatio);\n        segmentRatio = thresholdRatio;\n      }\n    }\n\n    nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n    vec3 currPos = interpolateFlat(source, target, segmentRatio);\n    vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n\n    if (useShortestPath) {\n      if (nextPos.x < antiMeridianX) {\n        currPos.x += TILE_SIZE;\n        nextPos.x += TILE_SIZE;\n      }\n    }\n\n    curr = project_common_position_to_clipspace(vec4(currPos, 1.0));\n    next = project_common_position_to_clipspace(vec4(nextPos, 1.0));\n    geometry.position = vec4(currPos, 1.0);\n  }\n\n  // Multiply out width and clamp to limits\n  // mercator pixels are interpreted as screen pixels\n  float widthPixels = clamp(\n    project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n    widthMinPixels, widthMaxPixels\n  );\n\n  // extrude\n  vec3 offset = vec3(\n    getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y, widthPixels),\n    0.0);\n  DECKGL_FILTER_SIZE(offset, geometry);\n  gl_Position = curr + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio);\n  vColor = vec4(color.rgb, color.a * opacity);\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME arc-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nvoid main(void) {\n  if (isValid == 0.0) {\n    discard;\n  }\n\n  gl_FragColor = vColor;\n  geometry.uv = uv;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceSourceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getSourceColor",defaultValue:c},instanceTargetColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getTargetColor",defaultValue:c},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1},instanceHeights:{size:1,transition:!0,accessor:"getHeight",defaultValue:1},instanceTilts:{size:1,transition:!0,accessor:"getTilt",defaultValue:0}})}updateState(t){if(super.updateState(t),t.changeFlags.extensionsChanged){var e;const{gl:t}=this.context;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}){const{widthUnits:e,widthScale:n,widthMinPixels:r,widthMaxPixels:i,greatCircle:o,wrapLongitude:a}=this.props;this.state.model.setUniforms(t).setUniforms({greatCircle:o,widthUnits:s.e[e],widthScale:n,widthMinPixels:r,widthMaxPixels:i,useShortestPath:a}).draw()}_getModel(t){let e=[];for(let r=0;r<50;r++)e=e.concat([r,1,0,r,-1,0]);const n=new u.a(t,{...this.getShaders(),id:this.props.id,geometry:new l.a({drawMode:5,attributes:{positions:new Float32Array(e)}}),isInstanced:!0});return n.setUniforms({numSegments:50}),n}}Object(r.a)(h,"layerName","ArcLayer"),Object(r.a)(h,"defaultProps",f)},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(1),i=n(357),o=n(491),a=n(531),s=n(492),u=n(15),l=n(366),c=n(130);const f=[0,0,0,255],h=[0,0,1],p={sizeUnits:"pixels",pointSize:{type:"number",min:0,value:10},getPosition:{type:"accessor",value:t=>t.position},getNormal:{type:"accessor",value:h},getColor:{type:"accessor",value:f},material:!0,radiusPixels:{deprecatedFor:"pointSize"}};class d extends i.a{getShaders(){return super.getShaders({vs:"#define SHADER_NAME point-cloud-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceNormals;\nattribute vec4 instanceColors;\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusPixels;\nuniform int sizeUnits;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  geometry.normal = project_normal(instanceNormals);\n\n  // position on the containing square in [-1, 1] space\n  unitPosition = positions.xy;\n  geometry.uv = unitPosition;\n  geometry.pickingColor = instancePickingColors;\n\n  // Find the center of the point and add the current vertex\n  vec3 offset = vec3(positions.xy * project_size_to_pixel(radiusPixels, sizeUnits), 0.0);\n  DECKGL_FILTER_SIZE(offset, geometry);\n\n  gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.), geometry.position);\n  gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  // Apply lighting\n  vec3 lightColor = lighting_getLightColor(instanceColors.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n\n  // Apply opacity to instance color, or return instance picking color\n  vColor = vec4(lightColor, instanceColors.a * opacity);\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME point-cloud-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n  geometry.uv = unitPosition;\n\n  float distToCenter = length(unitPosition);\n\n  if (distToCenter > 1.0) {\n    discard;\n  }\n\n  gl_FragColor = vColor;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a,s.a]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceNormals:{size:3,transition:!0,accessor:"getNormal",defaultValue:h},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:f}})}updateState(t){const{changeFlags:e,props:n}=t;if(super.updateState(t),e.extensionsChanged){var r;const{gl:t}=this.context;null===(r=this.state.model)||void 0===r||r.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}e.dataChanged&&function(t){const{header:e,attributes:n}=t;e&&n&&(t.length=e.vertexCount,n.POSITION&&(n.instancePositions=n.POSITION),n.NORMAL&&(n.instanceNormals=n.NORMAL),n.COLOR_0&&(n.instanceColors=n.COLOR_0))}(n.data)}draw({uniforms:t}){const{pointSize:e,sizeUnits:n}=this.props;this.state.model.setUniforms(t).setUniforms({sizeUnits:u.e[n],radiusPixels:e}).draw()}_getModel(t){const e=[];for(let n=0;n<3;n++){const t=n/3*Math.PI*2;e.push(2*Math.cos(t),2*Math.sin(t),0)}return new l.a(t,{...this.getShaders(),id:this.props.id,geometry:new c.a({drawMode:4,attributes:{positions:new Float32Array(e)}}),isInstanced:!0})}}Object(r.a)(d,"layerName","PointCloudLayer"),Object(r.a)(d,"defaultProps",p)},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l}));var r=n(247),i="\nuniform float lighting_uAmbient;\nuniform float lighting_uDiffuse;\nuniform float lighting_uShininess;\nuniform vec3  lighting_uSpecularColor;\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n    vec3 halfway_direction = normalize(light_direction + view_direction);\n    float lambertian = dot(light_direction, normal_worldspace);\n    float specular = 0.0;\n    if (lambertian > 0.0) {\n      float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n      specular = pow(specular_angle, lighting_uShininess);\n    }\n    lambertian = max(lambertian, 0.0);\n    return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n  vec3 lightColor = surfaceColor;\n\n  if (lighting_uEnabled) {\n    vec3 view_direction = normalize(cameraPosition - position_worldspace);\n    lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uPointLightCount) {\n        break;\n      }\n      PointLight pointLight = lighting_uPointLight[i];\n      vec3 light_position_worldspace = pointLight.position;\n      vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n      lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n    }\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uDirectionalLightCount) {\n        break;\n      }\n      DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n      lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n    }\n  }\n  return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n  vec3 lightColor = vec3(0, 0, 0);\n  vec3 surfaceColor = vec3(0, 0, 0);\n\n  if (lighting_uEnabled) {\n    vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uPointLightCount) {\n        break;\n      }\n      PointLight pointLight = lighting_uPointLight[i];\n      vec3 light_position_worldspace = pointLight.position;\n      vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n      lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n    }\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uDirectionalLightCount) {\n        break;\n      }\n      DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n      lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n    }\n  }\n  return lightColor;\n}\n";const o={};function a(t){const{ambient:e=.35,diffuse:n=.6,shininess:r=32,specularColor:i=[30,30,30]}=t;return{lighting_uAmbient:e,lighting_uDiffuse:n,lighting_uShininess:r,lighting_uSpecularColor:i.map((t=>t/255))}}function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;if(!("material"in t))return{};const{material:e}=t;return e?a(e):{lighting_uEnabled:!1}}const u={name:"gouraud-lighting",dependencies:[r.a],vs:i,defines:{LIGHTING_VERTEX:1},getUniforms:s},l={name:"phong-lighting",dependencies:[r.a],fs:i,defines:{LIGHTING_FRAGMENT:1},getUniforms:s}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(82),o=n(204),a=n(114),s=n(993),u=n(994),l=n(995),c=n(996),f=n(997),h=n(153),p=(n(18),n(154)),d=n(305),m=n(998),g=n(21),y=n(552);function v(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||x(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.")}()}function b(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 _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){A(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||x(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){if(t){if("string"===typeof t)return E(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)?E(t,e):void 0}}function E(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(){O=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var S=r.types.model({slug:r.types.string}),P=r.types.model({slug:r.types.string}),C=r.types.model({slug:r.types.string}),T=r.types.model({slug:r.types.string}),k=r.types.model({slug:r.types.string}),I=r.types.model({slug:r.types.string}),L=h.default.named("RecordImages").props({filter:r.types.maybeNull(S),results:r.types.array(a.default,[])}),j=h.default.named("RecordVideoEmbeds").props({filter:r.types.maybeNull(P),results:r.types.array(s.default,[])}),M=h.default.named("RecordAudioEmbeds").props({filter:r.types.maybeNull(C),results:r.types.array(u.default,[])}),R=h.default.named("RecordIiifEmbeds").props({filter:r.types.maybeNull(T),results:r.types.array(l.default,[])}),N=h.default.named("RecordStreetViewOverlays").props({filter:r.types.maybeNull(k),results:r.types.array(f.default,[])}),D=h.default.named("RecordSketchfabEmbeds").props({filter:r.types.maybeNull(I),results:r.types.array(c.default,[])}),F=r.types.model("RecordModel",{id:r.types.number,name:r.types.string,slug:r.types.string,type:"record",sanitised_content:r.types.maybeNull(r.types.string),excerpt:r.types.maybeNull(r.types.string),location:o.default,created_at:r.types.maybeNull(r.types.string),date_from:r.types.maybeNull(r.types.string),date_to:r.types.maybeNull(r.types.string),date_from_precision:r.types.maybeNull(r.types.string),date_to_precision:r.types.maybeNull(r.types.string),image:r.types.maybeNull(a.default),terms:r.types.array(d.default,[]),hero_attachment_type:r.types.maybeNull(r.types.string),hero_attachment_id:r.types.maybeNull(r.types.integer),media_sort_order:r.types.maybeNull(r.types.frozen([])),attributions:r.types.array(r.types.string,[]),links:r.types.array(m.default,[]),user_id:r.types.maybeNull(r.types.number),user:r.types.frozen({}),state:r.types.maybeNull(r.types.string,""),cta:r.types.maybeNull(y.default),parent_item_ids:r.types.array(r.types.number,[]),associated_overlay_group_slug:r.types.maybeNull(r.types.string),static_map_urls:r.types.frozen({}),linkable_keywords:r.types.array(r.types.string,[]),custom_fields:r.types.maybeNull(r.types.frozen({}))}).volatile((function(t){return{owner:"",attached_images:L.create({results:[],filter:{slug:t.slug}}),attached_video_embeds:j.create({results:[],filter:{slug:t.slug}}),attached_audio_embeds:M.create({results:[],filter:{slug:t.slug}}),attached_iiif_embeds:R.create({results:[],filter:{slug:t.slug}}),attached_street_view_overlays:N.create({results:[],filter:{slug:t.slug}}),attached_sketchfab_embeds:D.create({results:[],filter:{slug:t.slug}}),heroAttachment:null,related_records:[]}})).actions((function(t){return{fetchAttachments:Object(r.flow)(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.attached_images.clear(),t.attached_video_embeds.clear(),t.attached_audio_embeds.clear(),t.attached_iiif_embeds.clear(),e.next=6,t.attached_images.fetch(p.fetchRecordImagesQuery,t.attached_images.filter.toJSON());case 6:return e.next=8,t.attached_video_embeds.fetch(p.fetchRecordVideoEmbedsQuery,t.attached_video_embeds.filter.toJSON());case 8:return e.next=10,t.attached_audio_embeds.fetch(p.fetchRecordAudioEmbedsQuery,t.attached_audio_embeds.filter.toJSON());case 10:return e.next=12,t.attached_iiif_embeds.fetch(p.fetchRecordIiifEmbedsQuery,t.attached_iiif_embeds.filter.toJSON());case 12:return e.next=14,t.attached_street_view_overlays.fetch(p.fetchRecordStreetViewOverlaysQuery,t.attached_street_view_overlays.filter.toJSON());case 14:return e.next=16,t.attached_sketchfab_embeds.fetch(p.fetchRecordSketchfabEmbedsQuery,t.attached_sketchfab_embeds.filter.toJSON());case 16:t.setHeroAttachment();case 17:case"end":return e.stop()}}),e)}))),setHeroAttachment:function(){if(t.hero_attachment_type&&t.hero_attachment_id)switch(t.hero_attachment_type){case"image":t.heroAttachment=t.attached_images.results.find((function(e){return e.id===t.hero_attachment_id}));break;case"video_embed":t.heroAttachment=t.attached_video_embeds.results.find((function(e){return e.id===t.hero_attachment_id}));break;case"audio_embed":t.heroAttachment=t.attached_audio_embeds.results.find((function(e){return e.id===t.hero_attachment_id}));break;case"iiif_embed":t.heroAttachment=t.attached_iiif_embeds.results.find((function(e){return e.id===t.hero_attachment_id}));break;case"street_view_overlay":t.heroAttachment=t.attached_street_view_overlays.results.find((function(e){return e.id===t.hero_attachment_id}));break;case"sketchfab_embed":t.heroAttachment=t.attached_sketchfab_embeds.results.find((function(e){return e.id===t.hero_attachment_id}))}},fetchNextPage:Object(r.flow)(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.fetchAttachments();case 2:case"end":return e.stop()}}),e)}))),setState:Object(r.flow)(O().mark((function e(n,r){var i,o;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(g.buildHeaders)({"X-Hasura-User-Token":r.userToken}),e.next=3,Object(p.mutateUpdateRecordState)({id:t.id,state:n},i);case 3:o=e.sent,t.state=o.result.state;case 5:case"end":return e.stop()}}),e)})))}})).views((function(t){return{get dateRange(){return t.date_from||t.date_to?t.date_from&&t.date_to?[t.formattedDateFrom,t.formattedDateTo]:t.date_from?[t.formattedDateFrom]:[]:null},get formattedDateFrom(){if(!t.date_from)return null;var e=i.DateTime.fromISO(t.date_from);switch(t.date_from_precision){case"day":return e.toLocaleString(i.DateTime.DATE_FULL);case"month":return e.toLocaleString({month:"long",year:"numeric"});case"year":return e.toLocaleString({year:"numeric"})}},get formattedDateTo(){if(!t.date_to)return null;var e=i.DateTime.fromISO(t.date_to);switch(t.date_to_precision){case"day":return e.toLocaleString(i.DateTime.DATE_FULL);case"month":return e.toLocaleString({month:"long",year:"numeric"});case"year":return e.toLocaleString({year:"numeric"})}},get allAttachments(){return t.media_sort_order.map((function(e){var n=w(e.split(":"),2),r=n[0],i=n[1];switch(r){case"image":return t.attached_images.results.find((function(t){return t.id===parseInt(i)}));case"video_embed":return t.attached_video_embeds.results.find((function(t){return t.id===parseInt(i)}));case"audio_embed":return t.attached_audio_embeds.results.find((function(t){return t.id===parseInt(i)}));case"iiif_embed":return t.attached_iiif_embeds.results.find((function(t){return t.id===parseInt(i)}));case"street_view_overlay":return t.attached_street_view_overlays.results.find((function(t){return t.id===parseInt(i)}));case"sketchfab_embed":return t.attached_sketchfab_embeds.results.find((function(t){return t.id===parseInt(i)}))}})).filter((function(t){return t}))},get attachmentsAreLoading(){return t.attached_images.loading.isLoading||t.attached_video_embeds.loading.isLoading||t.attached_audio_embeds.loading.isLoading||t.attached_iiif_embeds.loading.isLoading||t.attached_street_view_overlays.loading.isLoading},get isPublished(){return"published"===t.state},get isAwaitingModeration(){return"awaiting_moderation"===t.state},get hasFinishedWizard(){return"published"===t.state||"unpublished"===t.state||"complete"===t.state},get hasCTA(){return t.cta&&t.cta.hasContent},get formattedCreatedAt(){return i.DateTime.fromISO(t.created_at).toLocaleString(i.DateTime.DATE_FULL)}}})).preProcessSnapshot((function(t){if(t){var e;(e=t.record?_({},t.record):_({},t)).hasOwnProperty("terms")&&(e.terms=e.terms.map((function(t){return t.hasOwnProperty("term")?t.term:t})));var n,r=[e.attribution];if(e.project_attributions&&(delete e.project_records,r=[].concat(v(r),v(e.project_attributions.map((function(t){return t.value}))))),e.attributions=r.filter((function(t){return t&&t.length>0})),e.associated_overlay_group)e.associated_overlay_group_slug=null===(n=e.associated_overlay_group)||void 0===n?void 0:n.slug,delete e.associated_overlay_group;return t.links&&(e.links=t.links.map((function(t){return t.attachments_link}))),e.record_cta_block&&e.record_cta_block.cta_block?e.cta=e.record_cta_block.cta_block:e.cta=null,e}}));e.default=F},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(53);function i(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return o(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 o(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 a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(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 a(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e,n){var r=c(t),o=Object.keys(r).filter((function(t){return r[t]!==Array}));return function(t,e,n){for(var r=e.pointPositionsCount,o=e.pointFeaturesCount,a=e.linePositionsCount,u=e.linePathsCount,l=e.lineFeaturesCount,c=e.polygonPositionsCount,d=e.polygonObjectsCount,g=e.polygonRingsCount,v=e.polygonFeaturesCount,b=e.propArrayTypes,_=e.coordLength,A=n.numericPropKeys,w=void 0===A?[]:A,x=n.PositionDataType,E=void 0===x?Float32Array:x,O=(t[0]&&"id"in t[0]),S=t.length>65535?Uint32Array:Uint16Array,P={type:"Point",positions:new E(r*_),globalFeatureIds:new S(r),featureIds:o>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:[],fields:[]},C={type:"LineString",pathIndices:a>65535?new Uint32Array(u+1):new Uint16Array(u+1),positions:new E(a*_),globalFeatureIds:new S(a),featureIds:l>65535?new Uint32Array(a):new Uint16Array(a),numericProps:{},properties:[],fields:[]},T={type:"Polygon",polygonIndices:c>65535?new Uint32Array(d+1):new Uint16Array(d+1),primitivePolygonIndices:c>65535?new Uint32Array(g+1):new Uint16Array(g+1),positions:new E(c*_),triangles:[],globalFeatureIds:new S(c),featureIds:v>65535?new Uint32Array(c):new Uint16Array(c),numericProps:{},properties:[],fields:[]},k=0,I=[P,C,T];k<I.length;k++){var L,j=I[k],M=i(w);try{for(M.s();!(L=M.n()).done;){var R=L.value,N=b[R];j.numericProps[R]=new N(j.positions.length/_)}}catch(V){M.e(V)}finally{M.f()}}C.pathIndices[u]=a,T.polygonIndices[d]=c,T.primitivePolygonIndices[g]=c;var D,F={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0},B=i(t);try{for(B.s();!(D=B.n()).done;){var z=D.value,U=z.geometry,G=z.properties||{};switch(U.type){case"Point":f(U,P,F,_,G),P.properties.push(y(G,w)),O&&P.fields.push({id:z.id}),F.pointFeature++;break;case"LineString":h(U,C,F,_,G),C.properties.push(y(G,w)),O&&C.fields.push({id:z.id}),F.lineFeature++;break;case"Polygon":p(U,T,F,_,G),T.properties.push(y(G,w)),O&&T.fields.push({id:z.id}),F.polygonFeature++;break;default:throw new Error("Invalid geometry type")}F.feature++}}catch(V){B.e(V)}finally{B.f()}return function(t,e,n,r){return{points:s(s({},t),{},{positions:{value:t.positions,size:r},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},numericProps:m(t.numericProps,1)}),lines:s(s({},e),{},{positions:{value:e.positions,size:r},pathIndices:{value:e.pathIndices,size:1},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},numericProps:m(e.numericProps,1)}),polygons:s(s({},n),{},{positions:{value:n.positions,size:r},polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},triangles:{value:new Uint32Array(n.triangles),size:1},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},numericProps:m(n.numericProps,1)})}}(P,C,T,_)}(t,s({propArrayTypes:r},e),{numericPropKeys:n&&n.numericPropKeys||o,PositionDataType:n?n.PositionDataType:Float32Array})}function c(t){var e,n={},r=i(t);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.properties)for(var a in o.properties){var s=o.properties[a];n[a]=v(s,n[a])}}}catch(u){r.e(u)}finally{r.f()}return n}function f(t,e,n,r,i){e.positions.set(t.data,n.pointPosition*r);var o=t.data.length/r;g(e,i,n.pointPosition,o),e.globalFeatureIds.fill(n.feature,n.pointPosition,n.pointPosition+o),e.featureIds.fill(n.pointFeature,n.pointPosition,n.pointPosition+o),n.pointPosition+=o}function h(t,e,n,r,i){e.positions.set(t.data,n.linePosition*r);var o=t.data.length/r;g(e,i,n.linePosition,o),e.globalFeatureIds.fill(n.feature,n.linePosition,n.linePosition+o),e.featureIds.fill(n.lineFeature,n.linePosition,n.linePosition+o);for(var a=0,s=t.indices.length;a<s;++a){var u=t.indices[a],l=a===s-1?t.data.length:t.indices[a+1];e.pathIndices[n.linePath++]=n.linePosition,n.linePosition+=(l-u)/r}}function p(t,e,n,r,i){e.positions.set(t.data,n.polygonPosition*r);var o=t.data.length/r;g(e,i,n.polygonPosition,o),e.globalFeatureIds.fill(n.feature,n.polygonPosition,n.polygonPosition+o),e.featureIds.fill(n.polygonFeature,n.polygonPosition,n.polygonPosition+o);for(var a=0,s=t.indices.length;a<s;++a){var u=n.polygonPosition;e.polygonIndices[n.polygonObject++]=u;for(var l=t.areas[a],c=t.indices[a],f=t.indices[a+1],h=0,p=c.length;h<p;++h){var m=c[h],y=h===p-1?void 0===f?t.data.length:f[0]:c[h+1];e.primitivePolygonIndices[n.polygonRing++]=n.polygonPosition,n.polygonPosition+=(y-m)/r}d(e,l,c,{startPosition:u,endPosition:n.polygonPosition,coordLength:r})}}function d(t,e,n,i){for(var o=i.startPosition,a=i.endPosition,s=i.coordLength,u=o*s,l=a*s,c=t.positions.subarray(u,l),f=n[0],h=n.slice(1).map((function(t){return(t-f)/s})),p=Object(r.earcut)(c,h,s,e),d=0,m=p.length;d<m;++d)t.triangles.push(o+p[d])}function m(t,e){var n={};for(var r in t)n[r]={value:t[r],size:e};return n}function g(t,e,n,r){for(var i in t.numericProps)if(i in e){var o=e[i];t.numericProps[i].fill(o,n,n+r)}}function y(t,e){var n={};for(var r in t)e.includes(r)||(n[r]=t[r]);return n}function v(t,e){return e!==Array&&Number.isFinite(t)?e===Float64Array||Math.fround(t)!==t?Float64Array:Float32Array:Array}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(654),a=n.n(o);function s(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return u(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 u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(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}e.default=function(t){var e=t.name,n=(t.slug,t.id,t.value),o=t.onChangeFunction,u=s(Object(r.useState)(n),2),l=u[0],c=u[1];return i.a.createElement("div",{className:a.a.ColorInput},i.a.createElement("input",{type:"color",id:e,onChange:function(t){return function(t){c(t.target.value),o&&o("color",t.target.value)}(t)},value:n}),i.a.createElement("span",{style:{background:l}}))}},function(t,e,n){"use strict";n.r(e);var r=n(49),i=n(418),o=n(0),a=n.n(o),s=n(7),u=n(655),l=n(103),c=n(657),f=n(579),h=n.n(f);function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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}e.default=Object(s.a)((function(t){var e=t.latitude,n=t.longitude,s=t.zoom,f=Object(l.useStore)(),d=f.storeMapViewport,m=(f.setMapRef,f.overlayGroup),g=f.activeFeature,y=f.setActiveFeature,v=f.setCursorState,b=f.cursorState,_=p(Object(o.useState)({width:"100%",height:"100%",latitude:e,longitude:n,zoom:s,bearing:0,pitch:0}),2),A=_[0],w=_[1],x=Object(u.default)(m.sortedLayers,{zoom:A.zoom,setClickedFunction:y,setCursorFunction:v});return Object(o.useEffect)((function(){d(A)}),[A]),a.a.createElement("div",{className:"".concat(h.a.OverlayCreatorMap," ").concat(h.a[b])},a.a.createElement(i.a,{viewState:A,onViewStateChange:function(t){w(t.viewState)},ContextProvider:r.k.Provider,layers:x,controller:{dragPan:!0}},a.a.createElement(r.l,Object.assign({reuseMaps:!0},A,{preventStyleDiffing:!0,dragPan:!0,mapStyle:"https://api.maptiler.com/maps/68a8c6bf-0173-4e27-9570-08cdb190867a/style.json?key=".concat("TC2voBv0sR7pmWS38FHi")}),a.a.createElement("div",{style:{position:"absolute",top:20,left:20}},a.a.createElement(r.f,{showCompass:!1}))),g&&a.a.createElement("div",null,a.a.createElement(c.default,null))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=n(88),u=n(8),l=n.n(u),c=n(48),f=n.n(c),h=n(534);function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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 m=function(t){return t.layers.map((function(t,e){return i.a.createElement(g,{key:"layer-".concat(t.id),layer:t,index:e})}))},g=Object(o.a)((function(t){var e,n,o=t.layer,u=t.index,c=Object(a.useStore)(),d=c.mapViewport,m=c.setMessage,g=c.clearMessage,v=(c.overlayGroup,c.overlayGroup.closeAllExpanded),b=c.setActiveLayerForErrorCheck,_=o.id,A=o.name,w=o.type,x=o.state,E=(o.field_bbox_sw,o.field_bbox_ne,o.isExpanded),O=o.tilingProgress,S=(o.isVisible,p(Object(r.useState)(!1),2)),P=S[0],C=S[1],T=p(Object(r.useState)("vector"===w?"styles":"bounds"),2),k=T[0],I=T[1],L=[];"vector"===w&&L.push({slug:"styles",name:"Styles"}),L.push({slug:"bounds",name:"Bounds",message:l.a.t("components.overlay_creator.tip_bounds")}),L.push({slug:"zoom",name:"Zoom",message:l.a.t("components.overlay_creator.tip_zoom")});var j=function(t){t.key&&"Enter"!==t.key||(C(!1),o.debouncedSave())};Object(r.useEffect)((function(){var t=L.find((function(t){return t.slug===k})).message;t&&E?m(t):g()}),[k,E]),Object(r.useEffect)((function(){o.setVolatile("isEditingBounds","bounds"===k&&E)}),[k,E]);var M=function(){o.destroyLayer()},R=function(){o.toggleVolatile("isVisible")},N=function(){o.isExpanded?v():(v(),o.setVolatile("isExpanded",!0))},D=function(){b(o)},F=Object.keys(null!==(e=o.tiling_errors.geojson_errors)&&void 0!==e?e:{}).length>0||(null!==(n=o.tiling_errors.errors)&&void 0!==n?n:[]).length>0;return i.a.createElement(s.b,{key:o.id,draggableId:"id-".concat(o.id),index:u},(function(t){return i.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef,key:o.id,className:"".concat(f.a.layer," ").concat("processing"===x?f.a.isProcessing:"")}),i.a.createElement("header",null,P?i.a.createElement("div",{className:f.a.nameEditor},i.a.createElement("input",{type:"text",value:A,onChange:function(t){return o.setAttribute("name",t.target.value)},onKeyPress:j,autoFocus:!0}),i.a.createElement("button",{type:"button",className:f.a.editNameDone,onClick:j},l.a.t("components.overlay_creator.done"))):i.a.createElement(i.a.Fragment,null,i.a.createElement("h3",{title:A,onClick:function(){return C(!P)}},A),i.a.createElement("button",{className:f.a.editName,onClick:function(){return C(!P)}},l.a.t("components.overlay_creator.edit"))),F&&i.a.createElement("span",{className:f.a.errorFlag,onClick:D}),i.a.createElement("span",{className:f.a.type},"processing"===x?"".concat(l.a.t("components.overlay_creator.state_".concat(x))," ").concat(O,"%"):"error"===x?l.a.t("components.overlay_creator.state_".concat(x)):w),"processing"!==o.state&&i.a.createElement("button",{type:"button",className:f.a.expand,onClick:N},l.a.t("components.overlay_creator.expand"))),o.isExpanded&&i.a.createElement(i.a.Fragment,null,"error"!==o.state&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:f.a.tabs},L.map((function(t,e){return i.a.createElement("a",{key:e,className:"".concat(k===t.slug?f.a.current:""),onClick:function(){return I(t.slug)}},t.name)}))),i.a.createElement("div",{className:f.a.panes},"vector"===w&&i.a.createElement(i.a.Fragment,null,"styles"===k&&i.a.createElement("div",{className:f.a.pane},i.a.createElement("div",{className:f.a.settings},i.a.createElement("div",{className:f.a.settingsRow},i.a.createElement("div",{className:"".concat(f.a.setting," ").concat(f.a.color)},i.a.createElement("label",{htmlFor:"color-".concat(_)},l.a.t("components.overlay_creator.colour")),i.a.createElement(h.default,{id:"color-".concat(_),name:"color-".concat(_),value:o.color,onChangeFunction:o.setAttribute})),i.a.createElement("div",{className:"".concat(f.a.setting," ").concat(f.a.fillPolygons)},i.a.createElement("label",{htmlFor:"fill-polygons-".concat(_)},l.a.t("components.overlay_creator.fill_polygons")),i.a.createElement("input",{id:"fill-polygons-".concat(_),name:"fill-polygons-".concat(_),onChange:o.toggleFillPolygons,defaultChecked:o.fill_polygons,type:"checkbox"}))),o.fill_polygons&&i.a.createElement(y,{name:l.a.t("components.overlay_creator.fill_opacity"),slug:"fill-opacity",id:_,value:o.polygon_opacity,onChangeFunction:o.setAttribute,attribute:"polygon_opacity",unit:"%"}),i.a.createElement(y,{name:l.a.t("components.overlay_creator.point_radius"),slug:"point-radius",id:_,value:o.point_radius,onChangeFunction:o.setAttribute,attribute:"point_radius",unit:"m"}),i.a.createElement(y,{name:l.a.t("components.overlay_creator.line_width"),slug:"line-width",id:_,value:o.line_width,onChangeFunction:o.setAttribute,attribute:"line_width",unit:"m"})))),"bounds"===k&&i.a.createElement("div",{className:f.a.pane},i.a.createElement("div",{className:"".concat(f.a.setting," ").concat(f.a.settingFullWidthInputs," ").concat(o.bbox_sw?f.a.isValid:f.a.isNotValid)},i.a.createElement("label",{htmlFor:"southwestExtent"},l.a.t("components.overlay_creator.extent_southwest")),i.a.createElement("input",{type:"text",id:"southwestExtent",name:"southwestExtent",value:o.field_bbox_sw,onChange:function(t){return o.setBboxValue("bbox_sw",t.target.value)}})),i.a.createElement("div",(e={className:f.a.setting},n="className",r="".concat(f.a.setting," ").concat(f.a.settingFullWidthInputs," ").concat(o.bbox_ne?f.a.isValid:f.a.isNotValid),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e),i.a.createElement("label",{htmlFor:"northeastExtent"},l.a.t("components.overlay_creator.extent_northeast")),i.a.createElement("input",{type:"text",id:"northeastExtent",name:"northeastExtent",value:o.field_bbox_ne,onChange:function(t){return o.setBboxValue("bbox_ne",t.target.value)}})),i.a.createElement("button",{type:"button",className:f.a.drawRectangleButton,onClick:function(){return o.drawNewRectangle()}},l.a.t("components.overlay_creator.draw_bounds"))),"zoom"===k&&i.a.createElement("div",{className:f.a.pane},i.a.createElement("div",{className:f.a.setting},i.a.createElement("div",{className:f.a.labelLike},l.a.t("components.overlay_creator.current_zoom_level")),i.a.createElement("div",{className:f.a.inputLike},Math.floor(d.zoom))),i.a.createElement("div",{className:f.a.setting},i.a.createElement("label",{htmlFor:"minimumZoom"},l.a.t("components.overlay_creator.minimum_zoom_level")),i.a.createElement("input",{type:"text",id:"minimumZoom",name:"minimumZoom",defaultValue:o.min_zoom,onChange:function(t){return o.setAttribute("min_zoom",Number(t.target.value))}})),i.a.createElement("div",{className:f.a.setting},i.a.createElement("label",{htmlFor:"maximumZoom"},l.a.t("components.overlay_creator.overzoom_level")),i.a.createElement("input",{type:"text",id:"maximumZoom",name:"maximumZoom",defaultValue:o.max_zoom,onChange:function(t){return o.setAttribute("max_zoom",Number(t.target.value))}}))))),"error"==o.state&&i.a.createElement("div",{className:f.a.errorMessage},l.a.t("components.overlay_creator.error_geojson")),i.a.createElement("div",{className:f.a.moreActions},i.a.createElement("button",{type:"button",onClick:M},l.a.t("components.overlay_creator.delete")),i.a.createElement("button",{type:"button",onClick:R},o.isVisible?l.a.t("components.overlay_creator.hide"):l.a.t("components.overlay_creator.show")))),t.placeholder);var e,n,r}))})),y=function(t){var e=t.name,n=t.slug,o=t.id,a=t.value,s=t.onChangeFunction,u=t.attribute,l=t.unit,c=p(Object(r.useState)(a),2),h=c[0],d=c[1];return i.a.createElement("div",{className:f.a.rangeWithNumericInput},i.a.createElement("label",{htmlFor:"".concat(n,"-range-").concat(o)},e),i.a.createElement("input",{id:"".concat(n,"-range-").concat(o),type:"range",onChange:function(t){return function(t){d(t.target.value),s&&s(u,Number(t.target.value))}(t)},value:h}),i.a.createElement("label",{className:f.a.numericalLabel,htmlFor:"".concat(n,"-numerical-").concat(o)},e," numerical"),i.a.createElement("input",{id:"".concat(n,"-numerical-").concat(o),name:"".concat(n,"-numerical-").concat(o),type:"number",onChange:function(t){return function(t){var e=Number(t.target.value);d(e=(e=e>100?100:e)<0?0:e),s&&s(u,e)}(t)},value:h}),i.a.createElement("span",{className:f.a.unit},l))};e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.toggleAddLayerPanel,n=t.overlayGroup,r=n.name,o=n.sortedLayers,u=n.moveLayer,c=0==o.length?l.a.t("components.overlay_creator.add_a_layer"):l.a.t("components.overlay_creator.add_another_layer");return i.a.createElement("div",{className:f.a.OverlayCreatorLayerManager},i.a.createElement("div",{className:f.a.panel},i.a.createElement("h2",null,l.a.t("components.overlay_creator.layers_for")," ",r),i.a.createElement("div",{className:f.a.scrollPane},i.a.createElement(s.a,{onDragEnd:function(t){t.destination&&u(t.source.index,t.destination.index)}},i.a.createElement(s.c,{droppableId:"layers"},(function(t){return i.a.createElement("div",Object.assign({},t.droppableProps,{ref:t.innerRef}),i.a.createElement(m,{layers:o}),t.placeholder)})))),i.a.createElement("footer",null,i.a.createElement("button",{type:"button",onClick:function(){return e()}},c))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=n(8),u=n.n(s),l=n(538),c=n(539),f=n(540),h=n(249),p=n.n(h);function d(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return m(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 m(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(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}e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.addLayerOptionsLock,n=t.toggleAddLayerPanel,o=d(Object(r.useState)("none"),2),s=o[0],h=o[1],m=function(t){var n="".concat(p.a[t+"Button"]);return s!==t&&"none"!==s||(n+=" ".concat(p.a.isActive)),e&&(n+=" ".concat(p.a.isDisabled)),n};return i.a.createElement("div",{className:p.a.OverlayCreatorAddLayerPanel,onClick:n},i.a.createElement("div",{className:p.a.wrap},i.a.createElement("div",{className:p.a.panel,onClick:function(t){t.stopPropagation()}},i.a.createElement("h3",null,u.a.t("components.overlay_creator.add_layer_panel_title")),i.a.createElement("p",null,u.a.t("components.overlay_creator.add_layer_panel_subtitle")),i.a.createElement("ul",{className:"".concat(p.a.tabs," ").concat(p.a.tabs)},i.a.createElement("li",null,i.a.createElement("button",{type:"button",className:m("upload"),onClick:function(){return h("upload")}},u.a.t("components.overlay_creator.upload_geojson"))),i.a.createElement("li",null,i.a.createElement("button",{type:"button",className:m("url"),onClick:function(){return h("url")}},u.a.t("components.overlay_creator.add_from_url"))),i.a.createElement("li",null,i.a.createElement("button",{type:"button",className:m("existing"),onClick:function(){return h("existing")}},u.a.t("components.overlay_creator.add_from_existing")))),"upload"==s&&i.a.createElement(l.default,null),"url"==s&&i.a.createElement(c.default,null),"existing"==s&&i.a.createElement(f.default,null))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=n(8),u=n.n(s),l=n(91),c=n.n(l),f=n(401),h=n.n(f),p=n(322),d=(n(647),n(1525),n(1526),n(581)),m=n.n(d);function g(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return y(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 y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(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}e.default=Object(o.a)((function(){var t=g(Object(r.useState)(!1),2),e=t[0],n=t[1],o=Object(a.useStore)(),s=o.setAddLayerOptionsLock,l=o.toggleAddLayerPanel,f=o.gidForUpload,d=o.clearGidForUpload,y=o.overlayGroup,v=y.layers,b=y.createNewLayer,_=Object(r.useRef)(!0),A=g(Object(r.useState)(null),2),w=A[0],x=A[1],E=g(Object(r.useState)(!1),2),O=E[0],S=E[1];Object(r.useEffect)((function(){b({params:{state:"processing"},setGid:!0,tentative:!0})}),[]),Object(r.useEffect)((function(){var t=function(t){var e=t.detail.file;w.addFile({name:e.name,type:e.type,data:e,source:"local",isRemote:!1})};return window.addEventListener("addFileToUppy",t),function(){window.removeEventListener("addFileToUppy",t)}}),[w]),Object(r.useEffect)((function(){if(f){var t=new c.a({allowMultipleUploadBatches:!1,autoProceed:!0,restrictions:{maxNumberOfFiles:1,allowedFileTypes:[".geojson"],maxFileSize:314572800}}).use(h.a,{endpoint:document.querySelector("meta[name=tus-url]").getAttribute("content"),storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!0,chunkSize:50*Math.pow(1024,2)});return t.setMeta({user_token:document.querySelector("meta[name=user-token]").getAttribute("content"),resource_gid:f}),t.on("upload",(function(){n(!0),s(!0),_.current=!1,v.find((function(t){return t.sgid===f})).setAttribute("tentative",!1)})),t.on("cancel-all",(function(t){n(!1)})),t.on("complete",(function(t){S(!0)})),x(t),function(){(t.close(),_.current)&&v.find((function(t){return t.sgid===f})).destroyLayer();d()}}}),[f]);return i.a.createElement("div",{className:m.a.OverlayCreatorAddLayerUploader},i.a.createElement("h4",null,u.a.t("components.overlay_creator.add_layer_by_geojson_upload")),f&&i.a.createElement(i.a.Fragment,null,w&&i.a.createElement("div",{className:m.a.uploadArea},!e&&i.a.createElement(p.a,{uppy:w}),e&&i.a.createElement(p.b,{uppy:w,hideAfterFinish:!1,showProgressDetails:!0})),i.a.createElement("span",null,u.a.t("components.overlay_creator.supported_files"))),i.a.createElement("footer",null,i.a.createElement("button",{type:"button",disabled:O?"":"disabled",onClick:function(){l()}},u.a.t("components.overlay_creator.add"))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=n(448),u=n.n(s),l=n(8),c=n.n(l);function f(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(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 h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(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}e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.toggleAddLayerPanel,n=t.overlayGroup.createNewLayer,o=f(Object(r.useState)(""),2),s=o[0],l=o[1],h=f(Object(r.useState)("raster"),2),p=h[0],d=h[1];return i.a.createElement("div",{className:u.a.OverlayCreatorAddLayerURL},i.a.createElement("h4",null,c.a.t("components.overlay_creator.add_layer_by_url")),i.a.createElement("div",{className:u.a.urlInputs},i.a.createElement("input",{type:"text",placeholder:"Enter URL here",value:s,onChange:function(t){return l(t.target.value)}}),i.a.createElement("span",null,c.a.t("components.overlay_creator.raster_or_vector"))),i.a.createElement("div",{className:u.a.radioButtons},i.a.createElement("input",{type:"radio",id:"raster",value:"raster",checked:"raster"===p,onChange:function(){return d("raster")}}),i.a.createElement("label",{htmlFor:"raster"},c.a.t("components.overlay_creator.raster")),i.a.createElement("input",{type:"radio",id:"vector",value:"vector",checked:"vector"===p,onChange:function(){return d("vector")}}),i.a.createElement("label",{htmlFor:"vector"},c.a.t("components.overlay_creator.vector"))),i.a.createElement("footer",null,i.a.createElement("button",{type:"button",onClick:function(){n({params:{url:s,type:p}}),e()}},c.a.t("components.overlay_creator.add"))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=n(449),u=n.n(s),l=n(8),c=n.n(l);function f(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(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 h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(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}e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.toggleAddLayerPanel,n=t.fetchAllLayers,o=t.allLayers,s=t.overlayGroup,l=s.layers,h=s.attachExistingLayer,p=f(Object(r.useState)(null),2),d=p[0],m=p[1];Object(r.useEffect)((function(){0===o.length&&n()}),[]);var g=l.map((function(t){return t.id})),y=o.filter((function(t){return!g.includes(t.id)}));return i.a.createElement("div",{className:u.a.OverlayCreatorAddLayerExisting},i.a.createElement("h4",null,c.a.t("components.overlay_creator.add_layer_from_existing")),i.a.createElement("div",{className:u.a.pane},y.map((function(t,e){return i.a.createElement("button",{type:"button",key:e,className:d===t.id?u.a.selected:"",onClick:function(){return e=t.id,void m(e);var e}},t.name)}))),i.a.createElement("footer",null,i.a.createElement("button",{type:"button",onClick:function(){h(d),e()}},c.a.t("components.overlay_creator.add"))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=n(30),u=n(582),l=n.n(u);e.default=Object(o.a)((function(){var t=Object(a.useStore)().message;return i.a.createElement("div",{className:l.a.OverlayCreatorMessages},i.a.createElement(s.a,{exitBeforeEnter:!0},t&&i.a.createElement(s.b.div,{key:t,className:l.a.message,initial:"hidden",animate:"visible",exit:"hidden",variants:{visible:{opacity:1,scale:1},hidden:{opacity:0,scale:.95}},transition:{duration:.5},dangerouslySetInnerHTML:{__html:t}})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=(n(8),n(321)),u=n.n(s);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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return c(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 c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(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}e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.activeLayerForErrorCheck,n=t.clearActiveLayerForErrorCheck,r=e;return i.a.createElement("div",{className:u.a.OverlayCreatorCheckTilingErrorsPanel,onClick:n},i.a.createElement("div",{className:u.a.wrap},i.a.createElement("div",{className:u.a.panel,onClick:function(t){t.stopPropagation()}},i.a.createElement("h3",null,"Errors encountered while importing ",r.name),r.tiling_errors.errors.length>0&&i.a.createElement("div",{className:u.a.errors},r.tiling_errors.errors.map((function(t,e){return i.a.createElement("div",{key:e},t)}))),Object.entries(r.tiling_errors.geojson_errors).length>0&&i.a.createElement("ul",{className:u.a.geojsonErrors},Object.entries(r.tiling_errors.geojson_errors).map((function(t){var e=l(t,2),n=e[0],r=e[1];return i.a.createElement("li",{key:n},i.a.createElement("strong",null,"Line ",n,":")," ",r)}))),i.a.createElement("footer",null,i.a.createElement("button",{type:"button",onClick:function(){n()}},"Do nothing"),i.a.createElement("button",{type:"button",onClick:function(){r.destroyLayer(),n()}},"Delete layer"),i.a.createElement("button",{type:"button",onClick:function(){r.setAttribute("tiling_errors",{}),n()},className:u.a.primary},"Accept layer & clear errors")))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(49),a=n(418),s=n(146),u=n(107),l=n(266),c=n(7),f=n(250),h=n.n(f),p=n(262),d=n(246),m=n(583),g=n.n(m);function y(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(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.")}()}function v(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||b(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){if(t){if("string"===typeof t)return _(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)?_(t,e):void 0}}function _(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}e.default=Object(c.a)((function(){var t=Object(l.useStore)(),e=t.stops,n=t.getLines,c=t.setLines,f=t.exportedWaypoints,m=780,b=400,_=window.matchMedia("(max-width: 1024px)");window.matchMedia("(max-width: 767px)").matches?(m=340,b=300):_.matches&&(m=720,b=500);var A=Object(d.calculatePositionAndZoom)(e,m,b),w=v(Object(r.useState)(A),2),x=w[0],E=w[1],O=new s.a({id:"markers",data:e,getPosition:function(t){return t.position},iconAtlas:h.a,iconMapping:p,getIcon:function(t){var e=["record"];return 1===t.order&&e.push("highlighted"),e.join("-")},getPixelOffset:[0,-14],getSize:45,opacity:1}),S=v(Object(r.useState)(!1),2),P=S[0],C=S[1],T=v(Object(r.useState)(),2),k=T[0],I=T[1];Object(r.useEffect)((function(){I(n)}),[n]);var L=new u.EditableGeoJsonLayer({id:"editable-layer",data:k,mode:u.ModifyMode,selectedFeatureIndexes:k?y(Array(k.features.length).keys()):[0],getFillColor:[0,175,54,200],getLineColor:[0,175,54,200],getTentativeFillColor:[255,113,147,216.75],getTentativeLineColor:[183,49,81,216.75],getEditHandlePointColor:[0,175,54,255],editHandlePointStrokeWidth:3,getEditHandlePointRadius:function(t){return t.type,7},pickable:!0,onHover:function(t,e){var n,r;"intermediate"===(null===t||void 0===t||null===(n=t.object)||void 0===n||null===(r=n.properties)||void 0===r?void 0:r.editHandleType)?C(!0):C(!1)},onEdit:function(t){var e=k.features[t.editContext.featureIndexes[0]].geometry.coordinates.length,n=t.editContext.positionIndexes[0];0!==n&&(n===e-1&&"addPosition"!==t.editType||(I(t.updatedData),c(t.updatedData)))}});Object(r.useEffect)((function(){document.getElementById("collection_waypoints_after").value=f}),[f]);var j=[L,O];return i.a.createElement("div",{className:"".concat(g.a.RouteCreatorMap," ").concat(P?g.a.hasIntermediateCursor:"")},i.a.createElement(a.a,{initialViewState:x,controller:!0,layers:j,onViewportChange:function(t){return E(t)},getCursor:function(t){return function(t){return t.isDragging?"grabbing":t.isHovering?"pointer":"grab"}(t)}},i.a.createElement(o.j,{mapStyle:"https://api.maptiler.com/maps/68a8c6bf-0173-4e27-9570-08cdb190867a/style.json?key=".concat("TC2voBv0sR7pmWS38FHi"),mapboxApiAccessToken:"pk.eyJ1IjoiaHVtYXAtaG9zdGluZyIsImEiOiJja2MyNTRraGYxMmJnMzFtcnI1c3VrMm5uIn0.BN87tr4QlV7jPUrIyeIC6g"})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(266),s=n(705),u=n.n(s),l=n(30),c=n(409),f=n.n(c);e.default=Object(o.a)((function(t){var e=Object(a.useStore)().resetLines;return i.a.createElement("div",{className:f.a.RouteCreatorGuidance},i.a.createElement(l.a,{exitBeforeEnter:!0},i.a.createElement(l.b.div,{key:"stepTwo",className:"".concat(f.a.step," ").concat(f.a.stepTwo),initial:"hidden",animate:"visible",exit:"hidden",variants:{visible:{opacity:1,scale:1},hidden:{opacity:0,scale:.8}},transition:{duration:.5}},i.a.createElement("img",{src:u.a,alt:"SVG Image"}),i.a.createElement("h4",null,"Drag lines to design route"),i.a.createElement("button",{onClick:function(t){e(),t.preventDefault()},className:f.a.secondary},"Start again"))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(49),a=n(418),s=n(1154),u=n(146),l=n(107),c=n(267),f=n(7),h=n(250),p=n.n(h),d=n(262),m=n(246),g=n(584),y=n.n(g);function v(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return b(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 b(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(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}e.default=Object(f.a)((function(){var t=Object(c.useStore)(),e=t.getTrailLine,n=t.markerData,f=t.setStopOrder,h=t.setLineFromMapData,g=t.allItemsAreOrdered,b=t.isRouteLoaded,_=t.mapboxRoute,A=t.trailDistance,w=t.walkingTime,x=780,E=400,O=window.matchMedia("(max-width: 1024px)");window.matchMedia("(max-width: 767px)").matches?(x=340,E=300):O.matches&&(x=720,E=500);var S=Object(m.calculatePositionAndZoom)(n,x,E),P=v(Object(r.useState)(S),2),C=P[0],T=P[1],k=new u.a({id:"markers",data:n,getPosition:function(t){return t.position},iconAtlas:p.a,iconMapping:d,getIcon:function(t){var e=["record"];return t.order&&(e[0]=["trailpin"],e.push(t.order.toString().padStart(2,"0"))),e.join("-")},getPixelOffset:function(t){return t.order?[0,-19.5]:[0,-14]},getSize:function(t){return 45},pickable:!g,autoHighlight:!g,highlightColor:[255,255,255,100],onClick:function(t){f(t.object.id),N(e)}}),I=v(Object(r.useState)(!1),2),L=I[0],j=I[1],M=v(Object(r.useState)(),2),R=M[0],N=M[1],D=new l.EditableGeoJsonLayer({id:"editable-layer",data:R,mode:g?l.ModifyMode:l.ViewMode,selectedFeatureIndexes:[0],getFillColor:[0,175,54,200],getLineColor:[0,175,54,200],getTentativeFillColor:[255,113,147,216.75],getTentativeLineColor:[183,49,81,216.75],getEditHandlePointColor:[0,175,54,255],editHandlePointStrokeWidth:3,getEditHandlePointRadius:function(t){return t.type,7},getDashArray:g?[0]:[3,1],dashJustified:!0,dashGapPickable:!0,extensions:[new s.a({dash:!0})],pickable:!0,onHover:function(t,e){t.object&&"intermediate"===t.object.properties.editHandleType?j(!0):j(!1)},onEdit:function(t){N(t.updatedData),h(t.updatedData)}});Object(r.useEffect)((function(){N(e)}),[e]);var F=[k];R&&F.push(D);return Object(r.useEffect)((function(){b&&(N(Object(m.wrapCoordinatesAsLineStringInCollection)(_)),h(Object(m.wrapCoordinatesAsLineStringInCollection)(_)))}),[b]),Object(r.useEffect)((function(){document.getElementById("collection_trail_line").value=JSON.stringify(null===e||void 0===e?void 0:e.features[0].geometry),document.getElementById("collection_distance").value=A,document.getElementById("collection_duration").value=w}),[R]),i.a.createElement("div",{className:"".concat(y.a.TrailCreatorMap," ").concat(L?y.a.hasIntermediateCursor:"")},i.a.createElement(a.a,{initialViewState:C,controller:!0,layers:F,onViewportChange:function(t){return T(t)},getCursor:function(t){return function(t){return t.isDragging?"grabbing":t.isHovering?"pointer":"grab"}(t)}},i.a.createElement(o.j,{mapStyle:"https://api.maptiler.com/maps/68a8c6bf-0173-4e27-9570-08cdb190867a/style.json?key=".concat("TC2voBv0sR7pmWS38FHi"),mapboxApiAccessToken:"pk.eyJ1IjoiaHVtYXAtaG9zdGluZyIsImEiOiJja2MyNTRraGYxMmJnMzFtcnI1c3VrMm5uIn0.BN87tr4QlV7jPUrIyeIC6g"})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(267),s=n(1334),u=n.n(s),l=n(705),c=n.n(l),f=n(30),h=n(221),p=n.n(h);e.default=Object(o.a)((function(t){var e=Object(a.useStore)(),n=e.clearStopsAndLine,r=e.getMapboxRoute,o=e.allItemsAreOrdered,s=e.itemCount,l=e.orderedItemCount,h=e.trailDistance,d=e.walkingTime,m=function(t){n(),t.preventDefault()},g={visible:{opacity:1,scale:1},hidden:{opacity:0,scale:.8}};return i.a.createElement("div",{className:p.a.TrailCreatorGuidance},i.a.createElement(f.a,{exitBeforeEnter:!0},!o&&i.a.createElement(f.b.div,{key:"stepOne",className:"".concat(p.a.step," ").concat(p.a.stepOne),initial:"hidden",animate:"visible",exit:"hidden",variants:g,transition:{duration:.5}},i.a.createElement("img",{src:u.a,alt:"SVG Image"}),i.a.createElement("h4",null,"Tap pins in order to create route"),i.a.createElement("span",null,l," / ",s," pins added"),i.a.createElement("button",{onClick:m,className:p.a.secondary},"Start again")),o&&i.a.createElement(f.b.div,{key:"stepTwo",className:"".concat(p.a.step," ").concat(p.a.stepTwo),initial:"hidden",animate:"visible",exit:"hidden",variants:g,transition:{duration:.5}},i.a.createElement("img",{src:c.a,alt:"SVG Image"}),i.a.createElement("h4",null,"Drag lines to design route"),s<26&&i.a.createElement("button",{onClick:function(t){r(),t.preventDefault()}},"Auto-create route"),s>=26&&i.a.createElement(i.a.Fragment,null,i.a.createElement("button",{disabled:!0},"Auto-create route"),i.a.createElement("span",{className:p.a.disabledMessage},"Only available up to ",i.a.createElement("br",null),"25 stops")),i.a.createElement("button",{onClick:m,className:p.a.secondary},"Start again"),i.a.createElement("div",{className:p.a.distance},h,", ",d))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(177),a=n.n(o);e.default=function(t){switch(t.mediaType){case"image":return i.a.createElement("span",{className:"".concat(a.a.MediaTypeIcon," ").concat(a.a.imageIcon)},i.a.createElement("em",null,"Image"));case"video_embed":return i.a.createElement("span",{className:"".concat(a.a.MediaTypeIcon," ").concat(a.a.videoIcon)},i.a.createElement("em",null,"Video"));case"street_view_overlay":return i.a.createElement("span",{className:"".concat(a.a.MediaTypeIcon," ").concat(a.a.streetViewIcon)},i.a.createElement("em",null,"SV"));case"iiif_embed":return i.a.createElement("span",{className:"".concat(a.a.MediaTypeIcon," ").concat(a.a.iiifIcon)},i.a.createElement("em",null,"IIIF"));default:return null}}},function(t,e,n){"use strict";e.__esModule=!0,e.base=void 0;e.base={global:{colors:{icon:"#666666"}},icon:{size:{small:"12px",medium:"24px",large:"48px",xlarge:"96px"}}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(845),a=n.n(o),s=n(612),u=n.n(s);e.default=function(t){var e=t.title,n=t.value,r=!1,o=n;/^https?:\/\//i.test(n)&&(r=!0,o="<a href=".concat(n,' target="_blank">').concat(e,"</a>"));var s=a.a.sanitize(o);return i.a.createElement("div",{className:u.a.OverlayPopoverDataRow},!r&&i.a.createElement("h4",null,e),i.a.createElement("p",{dangerouslySetInnerHTML:{__html:s}}))}},function(t,e,n){"use strict";n.r(e),n.d(e,"coordEach",(function(){return i})),n.d(e,"coordReduce",(function(){return o})),n.d(e,"propEach",(function(){return a})),n.d(e,"propReduce",(function(){return s})),n.d(e,"featureEach",(function(){return u})),n.d(e,"featureReduce",(function(){return l})),n.d(e,"coordAll",(function(){return c})),n.d(e,"geomEach",(function(){return f})),n.d(e,"geomReduce",(function(){return h})),n.d(e,"flattenEach",(function(){return p})),n.d(e,"flattenReduce",(function(){return d})),n.d(e,"segmentEach",(function(){return m})),n.d(e,"segmentReduce",(function(){return g})),n.d(e,"lineEach",(function(){return y})),n.d(e,"lineReduce",(function(){return v})),n.d(e,"findSegment",(function(){return b})),n.d(e,"findPoint",(function(){return _}));var r=n(90);function i(t,e,n){if(null!==t)for(var r,o,a,s,u,l,c,f,h=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,y=m?t.features.length:1,v=0;v<y;v++){u=(f=!!(c=m?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<u;b++){var _=0,A=0;if(null!==(s=f?c.geometries[b]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,v,_,A))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,v,_,A))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(o=0;o<l[r].length-h;o++){if(!1===e(l[r][o],p,v,_,A))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&A++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(A=0,o=0;o<l[r].length;o++){for(a=0;a<l[r][o].length-h;a++){if(!1===e(l[r][o][a],p,v,_,A))return!1;p++}A++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===i(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e,n,r){var o=n;return i(t,(function(t,r,i,a,s){o=0===r&&void 0===n?t:e(o,t,r,i,a,s)}),r),o}function a(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function s(t,e,n){var r=n;return a(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function u(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function l(t,e,n){var r=n;return u(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function c(t){var e=[];return i(t,(function(t){e.push(t)})),e}function f(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function h(t,e,n){var r=n;return f(t,(function(t,i,o,a,s){r=0===i&&void 0===n?t:e(r,t,i,o,a,s)})),r}function p(t,e){f(t,(function(t,n,i,o,a){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Object(r.feature)(t,i,{bbox:o,id:a}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c={type:s,coordinates:t.coordinates[l]};if(!1===e(Object(r.feature)(c,i),n,l))return!1}}))}function d(t,e,n){var r=n;return p(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r}function m(t,e){p(t,(function(t,n,o){var a=0;if(t.geometry){var s=t.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var u,l=0,c=0,f=0;return!1!==i(t,(function(i,s,h,p,d){if(void 0===u||n>l||p>c||d>f)return u=i,l=n,c=p,f=d,void(a=0);var m=Object(r.lineString)([u,i],t.properties);if(!1===e(m,n,o,d,a))return!1;a++,u=i}))&&void 0}}}))}function g(t,e,n){var r=n,i=!1;return m(t,(function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0})),r}function y(t,e){if(!t)throw new Error("geojson is required");p(t,(function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===e(Object(r.lineString)(a[s],t.properties),n,i,s))return!1}}}))}function v(t,e,n){var r=n;return y(t,(function(t,i,o,a){r=0===i&&void 0===n?t:e(r,t,i,o,a)})),r}function b(t,e){if(e=e||{},!Object(r.isObject)(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,a=e.geometryIndex||0,s=e.segmentIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=l.length+s-1),Object(r.lineString)([l[s],l[s+1]],u,e);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s-1),Object(r.lineString)([l[a][s],l[a][s+1]],u,e);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s-1),Object(r.lineString)([l[o][s],l[o][s+1]],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s-1),Object(r.lineString)([l[o][a][s],l[o][a][s+1]],u,e)}throw new Error("geojson is invalid")}function _(t,e){if(e=e||{},!Object(r.isObject)(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,a=e.geometryIndex||0,s=e.coordIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return Object(r.point)(l,u,e);case"MultiPoint":return o<0&&(o=l.length+o),Object(r.point)(l[o],u,e);case"LineString":return s<0&&(s=l.length+s),Object(r.point)(l[s],u,e);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s),Object(r.point)(l[a][s],u,e);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),Object(r.point)(l[o][s],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s),Object(r.point)(l[o][a][s],u,e)}throw new Error("geojson is invalid")}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(305);function o(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return function(t){if(Array.isArray(t))return u(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)return;if("string"===typeof t)return u(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 u(t,e)}(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.")}()}function u(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 l=r.types.model("TaxonomyModel",{id:r.types.number,name:r.types.string,slug:r.types.string,searchType:r.types.enumeration("taxonomy_search_type",["single","multiple","nested"]),terms:r.types.array(r.types.late((function(){return i.default})),[]),show_on_form:r.types.boolean}).volatile((function(t){return{checked:!1}})).actions((function(t){return{toggleAll:function(){var e=t.terms.filter((function(t){return t.isChecked})).length>0;t.terms.map((function(t){return t.setChecked(!e)}))},checkAll:function(){t.terms.map((function(t){return t.setChecked(!0)}))},uncheckAll:function(){t.terms.map((function(t){t.setChecked(!1),t.sub_terms&&t.sub_terms.length&&t.sub_terms.map((function(t){return t.setChecked(!1)}))}))},setCheckedIds:function(e){t.terms.forEach((function(t){t.setChecked(e.indexOf(t.id)>=0),t.sub_terms&&t.sub_terms.length>0&&t.sub_terms.forEach((function(t){t.setChecked(e.indexOf(t.id)>=0)}))}))},check:function(){t.checked=!0},uncheck:function(){t.checked=!1},toggle:function(){t.checked?t.uncheck():t.check()}}})).views((function(t){return{get partiallyChecked(){var e=t.terms.map((function(t){return t.isChecked})).filter((function(t,e,n){return n.indexOf(t)===e}));return e.find((function(t){return!0===t}))&&e.length>1},get allChecked(){var e=t.terms.map((function(t){return t.isChecked})).filter((function(t,e,n){return n.indexOf(t)===e}));return 1===e.length&&!0===e[0]},get hasSubTerms(){return"nested"===t.searchType},get toQuery(){var e=t.terms.map((function(t){return t.toQuery})).filter((function(t){return t}));return[].concat.apply([],e)},get checkedIds(){var e;return(e=[]).concat.apply(e,s(t.terms.map((function(t){return null===t.toQuery?[]:t.toQuery.taxonomy_term_ids})).filter((function(t){return t.length>0}))))},get orderedTerms(){return t.terms.slice().sort((function(t,e){return t.position<e.position?-1:t.position>e.position?1:0}))}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t),n=e.when_searching_display_as;delete e.when_searching_display_as;var r="";switch(n){case 1:r="multiple";break;case 2:r="nested";break;default:r="single"}return e.searchType=r,e}));e.default=l},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model("CtaBlockModel",{title:r.types.maybeNull(r.types.string),description:r.types.maybeNull(r.types.string),button_text:r.types.maybeNull(r.types.string),url:r.types.maybeNull(r.types.string)}).views((function(t){return{get hasContent(){return t.title&&t.description&&t.button_text&&t.url}}}));e.default=i},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(402),o=n(21),a=n(174),s=n(114),u=n(18);function l(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 c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(){f=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var h=r.types.model("ProjectUser",{id:r.types.number,name:r.types.maybeNull(r.types.string,""),email:r.types.string}).views((function(t){return{get displayName(){return t.name||t.email||""}}})),p=r.types.model("ProjectUser",{id:r.types.number,state:r.types.string,user:h}).views((function(t){return{get membershipUser(){var e=Object(r.getRoot)(t);return e.user&&t.user.id===e.user.id?e.user:t.user}}})).actions((function(t){return{setState:function(e){return t.state=e},cancelRequest:function(e){Object(r.destroy)(t)},updateRequest:Object(r.flow)(f().mark((function e(n){var r,i,s,u=arguments;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:"rejected",i=Object(o.buildHeaders)({"X-Hasura-User-Token":n.userToken}),e.next=4,Object(a.mutateQueryProjectUserInvitation)({id:t.id,state:r},i);case 4:(s=e.sent)&&s.update&&t.setState(r);case 6:case"end":return e.stop()}}),e)})))}})),d=r.types.model("Project",{id:r.types.identifierNumber,name:r.types.string,slug:r.types.string,sanitised_content:r.types.maybeNull(r.types.string),type:"project",created_at:r.types.maybeNull(r.types.string),users:r.types.maybeNull(r.types.array(p,[])),image:r.types.maybeNull(s.default),pendingRequests:r.types.number,state:r.types.maybeNull(r.types.string),member_count:r.types.maybeNull(r.types.number),all_collection_ids:r.types.array(r.types.number),all_record_ids:r.types.array(r.types.number),parent_item_ids:r.types.array(r.types.number,[])}).views((function(t){return{get memberships(){return t.users.filter((function(t){return"accepted"===t.state}))},get requests(){return t.users.filter((function(t){return"requested"===t.state}))},get invitations(){return t.users.filter((function(t){return"invited"===t.state}))},get hasPendingRequests(){return t.pendingRequests>0},get isPublished(){return"published"===t.state},get hasFinishedWizard(){return"published"===t.state||"unpublished"===t.state},get formattedCreatedAt(){return DateTime.fromISO(t.created_at).toLocaleString(DateTime.DATE_FULL)}}})).actions((function(t){return{addRequestToJoin:function(e){var n=t.users.toJSON().slice();n.push(e),t.users=n},removeUser:function(e){t.users=t.users.filter((function(t){return t.user.id!==e}))},setState:Object(r.flow)(f().mark((function e(n){var r,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(o.buildHeaders)({"X-Hasura-User-Token":Object(u.currentUserToken)()}),e.next=3,Object(i.mutateUpdateProjectState)({id:t.id,state:n},r);case 3:a=e.sent,t.state=a.result.state;case 5:case"end":return e.stop()}}),e)})))}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.pendingRequests=e.hasOwnProperty("requests")?e.requests.length:0,e.image_url?e.image={name:"".concat(e.title," image"),url:e.image_url}:e.attachments_images&&e.attachments_images.length>0&&(e.image={id:e.attachments_images[0].attachments_image.id,name:e.attachments_images[0].attachments_image.name,url:e.attachments_images[0].attachments_image.url,credit:e.attachments_images[0].attachments_image.credit,description:e.attachments_images[0].attachments_image.description}),null===e.all_collection_ids&&(e.all_collection_ids=[]),null===e.all_record_ids&&(e.all_record_ids=[]),e.users||(e.users=[]),e}));e.default=d},function(t,e,n){"use strict";n.r(e);var r=n(153),i=n(1006),o=n(306),a=n(2),s=r.default.named("CardItemResultsModel").props({filter:i.default,results:a.types.array(o.default,[])});e.default=s},function(t,e,n){"use strict";n.r(e),n.d(e,"OverlayGroupsFilter",(function(){return y}));var r=n(2),i=n(153),o=n(674),a=n(21),s=n(589),u=n(248);function l(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(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.")}()}function c(){c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function f(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=h(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(t,e){if(t){if("string"===typeof t)return p(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)?p(t,e):void 0}}function p(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 d(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 m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=r.types.model({limit:r.types.number,offset:r.types.number}).actions((function(t){return{setSearchParameter:function(e,n){t[e]=n}}})).views((function(t){return{get nextOffset(){return t.limit+t.offset}}})),v=i.default.named("OverlayGroupCollection").props({filter:y,results:r.types.array(o.default,[]),prefetchedResults:r.types.array(o.default,[]),enabled:r.types.array(r.types.string,[])}).volatile((function(t){return{overlayGroup:null,pickedOverlayFeature:null}})).actions((function(t){return{afterCreate:function(){var e=m(m({},Object(r.getSnapshot)(t)),Object(u.readSnapshotFromURL)("overlayGroups"));Object(r.applySnapshot)(t,e),t.fetchOverlayGroups()},setInitialOverlays:Object(r.flow)(c().mark((function e(n){var r,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=f(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=9;break}return o=i.value,e.next=7,t.fetchOverlayGroup(o,{enableImmediately:!0});case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),r.e(e.t0);case 14:return e.prev=14,r.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))),setSortOrder:function(e){t.enabled=e},setPickedOverlayFeature:function(e){t.pickedOverlayFeature=e},fetchOverlayGroups:Object(r.flow)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading.loading(),e.prev=1,e.next=4,t.fetch(s.fetchOverlayGroupsQuery,t.filter.toJSON());case 4:t.loading.done(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,7]])}))),prefetchOverlayGroups:Object(r.flow)(c().mark((function e(n){var r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading.loading(),e.prev=1,r={limit:a.PER_PAGE,offset:0,slugs:n},e.next=5,Object(s.fetchOverlayGroupsQuery)(r);case 5:i=e.sent,t.prefetchedResults=i.results,t.prefetchedResults.map((function(t){return t.prefetched(),t.isEnabled=!0,t})),t.loading.done(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,11]])}))),fetchOverlayGroup:Object(r.flow)(c().mark((function e(n){var r,i,o,a,u,f,h,p=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=p.length>1&&void 0!==p[1]?p[1]:{},i=r.enableImmediately,!(o=t.listOverlayGroups.find((function(t){return t.slug===n})))){e.next=8;break}return t.overlayGroup=o,t.loading.done(),i&&o.toggle(),e.abrupt("return",o);case 8:return t.loading.loading(),e.prev=9,a={slug:n},e.next=13,Object(s.fetchOverlayGroupQuery)(a);case 13:if(u=e.sent,f=[].concat(l(t.prefetchedResults.slice()),l(u.result)).filter((function(t,e,n){return n.indexOf(t)===e})),t.prefetchedResults=f,(h=t.listOverlayGroups.find((function(t){return t.slug===n})))||(h=t.prefetchedResults.find((function(t){return t.slug===n}))),h){e.next=21;break}return t.loading.setError("Not found",404),e.abrupt("return",null);case 21:t.overlayGroup=h,t.loading.done(),i&&h.toggle(),e.next=29;break;case 26:e.prev=26,e.t0=e.catch(9),console.log(e.t0);case 29:case"end":return e.stop()}}),e,null,[[9,26]])}))),setPrefetchedResults:function(e){t.prefetchedResults=e},toggleOverlayGroupEnabled:function(e){var n=t.enabled.slice(),i=n.indexOf(e);(i>-1?n.splice(i,1):n.push(e),t.enabled=n,0===t.enabled.length)&&Object(r.getRoot)(t).uiSettings.setMarkersVisible(!0)}}})).views((function(t){return{get listOverlayGroups(){return t.results.map((function(e){var n=t.prefetchedResults.find((function(t){return t.slug===e.slug}));return n||e}))},get enabledOverlayGroups(){var e=t.results.filter((function(t){return t.enabled})),n=[].concat(l(e),l(t.prefetchedResults)).filter((function(t){return t.enabled})),r=t.enabled.length===n.length?t.enabled:n.map((function(t){return t.id})),i=n.reduce((function(t,e){return m(m({},t),{},g({},e.slug,e))}),{});return r.map((function(t){return i[t]})).filter((function(t){return t}))},get enabledOverlayIds(){var e,n=t.enabledOverlayGroups.map((function(t){return t.overlays.map((function(t){return t.id}))}));return(e=[]).concat.apply(e,l(n))}}}));e.default=v},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(0)),i=o(n(877));function o(t){return t&&t.__esModule?t:{default:t}}e.default=r.default.createContext||i.default,t.exports=e.default},function(t,e,n){"use strict";function r(t,e){var n=e&&e.loggedIn,r=n&&t.user&&e.id===t.user.id,i="all_".concat("record"==t.type?"record":"collection","_ids"),o=!!n&&[].concat.apply([],e.memberships.map((function(t){return t.project[i].toJSON()}))).indexOf(t.id)>-1,a=n&&(r||o),s=!1,u=!1,l=!1,c=!1;return hasFeature("moderation")&&a?(s=!t.isAwaitingModeration&&!t.isPublished,u=!(!t.hasFinishedWizard||t.isPublished),l=!1,c=t.isAwaitingModeration):a&&(s=!0,l=t.hasFinishedWizard),{editButtonAvailable:s,submitForModerationButtonAvailable:u,publishButtonAvailable:l,awaitingModerationNotice:c}}n.r(e),n.d(e,"setActionButtonAvailability",(function(){return r}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(17);e.default=function(t){var e=Object(i.useStore)().overlayGroups,n=(e.loading,e.fetchOverlayGroup),o=e.overlayGroup;return Object(r.useEffect)((function(){null===t||void 0===t||!t.associated_overlay_group_slug||o&&(null===o||void 0===o?void 0:o.slug)===t.associated_overlay_group_slug||n(t.associated_overlay_group_slug)}),[null===t||void 0===t?void 0:t.associated_overlay_group_slug]),Object(r.useEffect)((function(){return null===t||void 0===t||!t.associated_overlay_group_slug||(null===o||void 0===o?void 0:o.slug)!==t.associated_overlay_group_slug||null!==o&&void 0!==o&&o.isEnabled||o.toggle(),function(){null!==t&&void 0!==t&&t.associated_overlay_group_slug&&o&&o.slug===(null===t||void 0===t?void 0:t.associated_overlay_group_slug)&&o.isEnabled&&o.toggle()}}),[t,o]),null===t||void 0===t?void 0:t.associated_overlay_group_slug}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchItemEventsQuery",(function(){return i})),n.d(e,"fetchUserEventsQuery",(function(){return o}));var r=n(21),i=function(t,e){return r.default.request('\n    #graphql\n\n    query itemEventsQuery($gid: String!) {\n        favourites: activity_log_entries_aggregate(where: {activity_log: {subject_gid: {_eq: $gid}}, verb: {_eq: "favourited_by"}}) {\n            aggregate {\n                count\n            }\n        }\n        views: activity_log_entries_aggregate(where: {activity_log: {subject_gid: {_eq: $gid}}, verb: {_eq: "viewed"}}) {\n            aggregate {\n                count\n            }\n        }\n        activity_logs(where: {subject_gid: {_eq: $gid}}) {\n            subject_meta\n            entries(where: {verb: {_neq: "viewed"}}, order_by: {time: desc}, limit: 5) {\n                verb\n                time\n                object_meta\n            }\n        }\n    }\n\n',t,e)},o=function(t,e){return r.default.request('\n    #graphql\n\n    query userEventsQuery($gid: String!) {\n        activity_logs: user_activity_logs(args: {user_gid: $gid}) {\n            subject_meta\n            entries(where: {verb: {_neq: "viewed"}}, order_by: {time: desc}, limit: 5) {\n                verb\n                time\n                object_meta\n            }\n        }\n        views: activity_log_entries_aggregate(where: {activity_log: {subject_gid: {_eq: $gid}}, verb: {_eq: "viewed"}}) {\n            aggregate {\n                count\n            }\n        }\n    }\n\n',t,e)}},function(t,e,n){"use strict";n.r(e),n.d(e,"activityStringForEntity",(function(){return o})),n.d(e,"activityStringForUser",(function(){return a}));var r=n(8),i=n.n(r),o=function(t){var e,n,r,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_=t.entry,A=t.subjectMeta;switch(_.verb){case"created":return i.a.t("activity_logs.activities.object.created",{user_name:null===(e=_.object_meta)||void 0===e?void 0:e.user_name,user_path:null===(n=_.object_meta)||void 0===n?void 0:n.user_path,subject_name:A.name,subject_path:A.url});case"updated":return i.a.t("activity_logs.activities.object.updated",{user_name:null===(r=_.object_meta)||void 0===r?void 0:r.user_name,user_path:null===(o=_.object_meta)||void 0===o?void 0:o.user_path,object_name:null===A||void 0===A?void 0:A.name,object_path:null===A||void 0===A?void 0:A.url});case"joined":return i.a.t("activity_logs.activities.object.joined",{user_name:null===(a=_.object_meta)||void 0===a?void 0:a.user_name,user_path:null===(s=_.object_meta)||void 0===s?void 0:s.user_path,object_name:null===(u=_.object_meta)||void 0===u?void 0:u.name,object_path:null===(l=_.object_meta)||void 0===l?void 0:l.url});case"added":return i.a.t("activity_logs.activities.object.added",{user_name:null===(c=_.object_meta)||void 0===c?void 0:c.user_name,user_path:null===(f=_.object_meta)||void 0===f?void 0:f.user_path,object_name:(null===(h=_.object_meta)||void 0===h?void 0:h.name)||"",object_path:null===(p=_.object_meta)||void 0===p?void 0:p.url});case"added_to":return i.a.t("activity_logs.activities.object.subject_added",{user_name:null===(d=_.object_meta)||void 0===d?void 0:d.user_name,user_path:null===(m=_.object_meta)||void 0===m?void 0:m.user_path,subject_name:A.name,subject_path:A.url,object_name:(null===(g=_.object_meta)||void 0===g?void 0:g.name)||"",object_path:null===(y=_.object_meta)||void 0===y?void 0:y.url});case"favourited_by":return i.a.t("activity_logs.activities.object.favourited",{user_name:null===(v=_.object_meta)||void 0===v?void 0:v.user_name,user_path:null===(b=_.object_meta)||void 0===b?void 0:b.user_path,object_name:A.name,object_path:A.url})}},a=function(t){var e,n,r,o,a,s,u,l,c=t.entry,f=t.subjectMeta;switch(c.verb){case"created":return i.a.t("activity_logs.activities.user.created",{subject_name:null===f||void 0===f?void 0:f.name,subject_path:null===f||void 0===f?void 0:f.url});case"updated":return i.a.t("activity_logs.activities.user.updated",{object_name:null===f||void 0===f?void 0:f.name,object_path:null===f||void 0===f?void 0:f.url});case"joined":return i.a.t("activity_logs.activities.user.joined",{object_name:null===(e=c.object_meta)||void 0===e?void 0:e.name,object_path:null===(n=c.object_meta)||void 0===n?void 0:n.url});case"added_to":return i.a.t("activity_logs.activities.user.subject_added",{subject_name:f.name,subject_path:f.url,object_name:(null===(r=c.object_meta)||void 0===r?void 0:r.name)||"",object_path:null===(o=c.object_meta)||void 0===o?void 0:o.url});case"added":return i.a.t("activity_logs.activities.user.added",{object_name:null===(a=c.object_meta)||void 0===a?void 0:a.name,object_path:null===(s=c.object_meta)||void 0===s?void 0:s.path});case"favourited":return i.a.t("activity_logs.activities.user.favourited",{object_name:null===(u=c.object_meta)||void 0===u?void 0:u.name,object_path:null===(l=c.object_meta)||void 0===l?void 0:l.url})}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return l}));var r=n(136),i=n(138);function o(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return a(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 a(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,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(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 s=function(){var t=Object(i.b)();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function u(t){var e,n=s(),i=o(t=Array.isArray(t)?t:[t]);try{var a=function(){var t=e.value,i=Object(r.b)(t);n.find((function(t){return i===t}))||n.unshift(i)};for(i.s();!(e=i.n()).done;)a()}catch(u){i.e(u)}finally{i.f()}}function l(){return s()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l}));var r=n(173),i=n(563),o=n(564),a=n(123),s=n(10);function u(t,e){Object(s.a)(t instanceof r.a||t instanceof i.a||t instanceof o.a);const n=t.constructor,{gl:a,width:u,height:l,format:c,type:f,dataFormat:h,border:p,mipmaps:d}=t;return new n(a,Object.assign({width:u,height:l,format:c,type:f,dataFormat:h,border:p,mipmaps:d},e))}function l(t,e){const{gl:n,width:r,height:i,id:o}=t;return new a.a(n,Object.assign({},e,{id:"framebuffer-for-".concat(o),width:r,height:i,attachments:{36064:t}}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(6),i=n(92);const o=[34069,34070,34071,34072,34073,34074];class a extends i.a{get[Symbol.toStringTag](){return"TextureCube"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.b)(t),super(t,Object.assign({},e,{target:34067})),this.initialize(e),Object.seal(this)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(t){let{face:e,data:n,x:r=0,y:i=0,mipmapLevel:o=0}=t;return this._subImage({target:e,data:n,x:r,y:i,mipmapLevel:o})}async setCubeMapImageData(t){let{width:e,height:n,pixels:i,data:a,border:s=0,format:u=6408,type:l=5121}=t;const{gl:c}=this,f=i||a,h=await Promise.all(o.map((t=>{const e=f[t];return Promise.all(Array.isArray(e)?e:[e])})));this.bind(),o.forEach(((t,i)=>{h[i].length>1&&!1!==this.opts.mipmaps&&r.k.warn("".concat(this.id," has mipmap and multiple LODs."))(),h[i].forEach(((r,i)=>{e&&n?c.texImage2D(t,i,u,e,n,s,u,l,r):c.texImage2D(t,i,u,u,l,r)}))})),this.unbind()}setImageDataForFace(t){const{face:e,width:n,height:r,pixels:i,data:o,border:a=0,format:s=6408,type:u=5121}=t,{gl:l}=this,c=i||o;return this.bind(),c instanceof Promise?c.then((n=>this.setImageDataForFace(Object.assign({},t,{face:e,data:n,pixels:n})))):this.width||this.height?l.texImage2D(e,0,s,n,r,a,s,u,c):l.texImage2D(e,0,s,s,u,c),this}}a.FACES=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(6),i=n(92),o=n(140),a=n(50);class s extends i.a{get[Symbol.toStringTag](){return"Texture3D"}static isSupported(t){return Object(r.j)(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(t),e=Object.assign({depth:1},e,{target:32879,unpackFlipY:!1}),super(t,e),this.initialize(e),Object.seal(this)}setImageData(t){let{level:e=0,dataFormat:n=6408,width:i,height:s,depth:u=1,border:l=0,format:c,type:f=5121,offset:h=0,data:p,parameters:d={}}=t;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,d,(()=>{ArrayBuffer.isView(p)&&this.gl.texImage3D(this.target,e,n,i,s,u,l,c,f,p),p instanceof a.a&&(this.gl.bindBuffer(35052,p.handle),this.gl.texImage3D(this.target,e,n,i,s,u,l,c,f,h))})),p&&p.byteLength)this._trackAllocatedMemory(p.byteLength,"Texture");else{const t=o.a[this.dataFormat]||4,e=o.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*t*e,"Texture")}return this.loaded=!0,this}}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return m})),n.d(e,"getMVTIconLayer",(function(){return g}));var r=n(146),i=n(268),o=n(250),a=n.n(o),s=n(262),u=n(318);function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d(t);if(e){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var m=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(o,t);var e,n,r,i=h(o);function o(){return l(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"getPickingInfo",value:function(t){var e=t.info;return t.sourceLayer,t.mode,e}}])&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.a),g=function(t,e,n,i,o,l,c){return new m({id:"mvt-".concat(btoa(t.tileUrl)),data:t.tileUrl,pickable:c,onClick:function(t){var n=t.object;"cluster"===n.properties.type&&("string"===typeof n.properties.ids&&(n.properties.ids=JSON.parse(n.properties.ids)),"string"===typeof n.properties.types&&(n.properties.types=JSON.parse(n.properties.types))),l(null),n.properties.count&&n.properties.count>9&&!e.atFullZoom?e.setCenterPitchBearingAndZoom(n.geometry,!1,0,e.zoom+1):o(n)},onHover:function(t){n("undefined"!==typeof t)},autoHighlight:!1,refinementStrategy:"no-overlap",renderSubLayers:function(n){var i=n.tile.dataInWGS84;return new r.a({id:"".concat(n.id,"-points"),data:i,getPosition:function(t){return t.geometry.coordinates},iconAtlas:a.a,iconMapping:s,getIcon:function(n){if("cluster"===n.properties.type)return e.atFullZoom?"pin-".concat(Object(u.getRoundedCount)(n.properties.count)):"point-".concat(Object(u.getRoundedCount)(n.properties.count));var r=[];return r.push(t.markerPrefix||n.properties.type),t.orderedPosition&&(t.orderedPosition<41?r.push(Object(u.getNormalisedPosition)(n.properties.position)):r.push("unknown")),t.highlighted&&r.push("highlighted"),r.join("-")},getPixelOffset:function(n){var r=[0,0];return"trailpin"===t.markerPrefix?r=[0,-19.5]:("cluster"===n.properties.type&&e.atFullZoom||"record"===n.properties.type||"overlay"===n.properties.type||"trail"===n.properties.type||"collection"===n.properties.type)&&(r=[0,-14]),r},getSize:function(t){return"record"===t.properties.type||"overlay"===t.properties.type||"trail"===t.properties.type?45:50},pickable:!0,autoHighlight:!0,highlightColor:[255,255,255,100],opacity:1})}})}},function(t,e,n){"use strict";t.exports=i,t.exports.default=i;var r=1e20;function i(t,e,n,r,i,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=r||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=n||8;var a=this.size=this.fontSize+2*this.buffer,s=a+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textAlign="left",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s),this.useMetrics=void 0!==this.ctx.measureText("A").actualBoundingBoxLeft,this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function o(t,e,n,r,i,o){for(var s=0;s<e;s++)a(t,s,e,n,r,i,o);for(var u=0;u<n;u++)a(t,u*e,1,e,r,i,o)}function a(t,e,n,i,o,a,s){var u,l,c,f;for(a[0]=0,s[0]=-r,s[1]=r,u=0;u<i;u++)o[u]=t[e+u*n];for(u=1,l=0,c=0;u<i;u++){do{f=a[l],c=(o[u]-o[f]+u*u-f*f)/(u-f)/2}while(c<=s[l]&&--l>-1);a[++l]=u,s[l]=c,s[l+1]=r}for(u=0,l=0;u<i;u++){for(;s[l+1]<u;)l++;f=a[l],t[e+u*n]=o[f]+(u-f)*(u-f)}}i.prototype._draw=function(t,e){var n,i,a,s,u,l,c,f,h,p=this.ctx.measureText(t),d=p.width,m=2*this.buffer;e&&this.useMetrics?(u=Math.floor(p.actualBoundingBoxAscent),f=this.buffer+Math.ceil(p.actualBoundingBoxAscent),l=this.buffer,c=this.buffer,n=(i=Math.min(this.size,Math.ceil(p.actualBoundingBoxRight-p.actualBoundingBoxLeft)))+m,a=(s=Math.min(this.size-l,Math.ceil(p.actualBoundingBoxAscent+p.actualBoundingBoxDescent)))+m,this.ctx.textBaseline="alphabetic"):(n=i=this.size,a=s=this.size,u=19*this.fontSize/24,l=c=0,f=this.middle,this.ctx.textBaseline="middle"),i&&s&&(this.ctx.clearRect(c,l,i,s),this.ctx.fillText(t,this.buffer,f),h=this.ctx.getImageData(c,l,i,s));var g=new Uint8ClampedArray(n*a);return function(t,e,n,i,o,a,s){a.fill(r,0,e*n),s.fill(0,0,e*n);for(var u=(e-i)/2,l=0;l<o;l++)for(var c=0;c<i;c++){var f=(l+u)*e+c+u,h=t.data[4*(l*i+c)+3]/255;if(1===h)a[f]=0,s[f]=r;else if(0===h)a[f]=r,s[f]=0;else{var p=Math.max(0,.5-h),d=Math.max(0,h-.5);a[f]=p*p,s[f]=d*d}}}(h,n,a,i,s,this.gridOuter,this.gridInner),o(this.gridOuter,n,a,this.f,this.v,this.z),o(this.gridInner,n,a,this.f,this.v,this.z),function(t,e,n,r,i,o,a){for(var s=0;s<e*n;s++){var u=Math.sqrt(r[s])-Math.sqrt(i[s]);t[s]=Math.round(255-255*(u/o+a))}}(g,n,a,this.gridOuter,this.gridInner,this.radius,this.cutoff),{data:g,metrics:{width:i,height:s,sdfWidth:n,sdfHeight:a,top:u,left:0,advance:d}}},i.prototype.draw=function(t){return this._draw(t,!1).data},i.prototype.drawWithMetrics=function(t){return this._draw(t,!0)}},function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,o,s,u,l,c,p,d=e&&e.length,g=d?e[0]*n:t.length,y=i(t,0,g,n,!0),v=[];if(!y||y.next===y.prev)return v;if(d&&(y=function(t,e,n,r){var o,a,s,u=[];for(o=0,a=e.length;o<a;o++)(s=i(t,e[o]*r,o<a-1?e[o+1]*r:t.length,r,!1))===s.next&&(s.steiner=!0),u.push(m(s));for(u.sort(f),o=0;o<u.length;o++)n=h(u[o],n);return n}(t,e,y,n)),t.length>80*n){r=s=t[0],o=u=t[1];for(var b=n;b<g;b+=n)(l=t[b])<r&&(r=l),(c=t[b+1])<o&&(o=c),l>s&&(s=l),c>u&&(u=c);p=0!==(p=Math.max(s-r,u-o))?32767/p:0}return a(y,v,n,r,o,p,0),v}function i(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o<n;o+=r)a=O(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=O(o,t[o],t[o+1],a);return a&&b(a,a.next)&&(S(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==v(r.prev,r,r.next))r=r.next;else{if(S(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,f,h){if(t){!h&&f&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=d(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<l&&(s++,r=r.nextZ);e++);for(u=l;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,f);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,f?u(t,r,i,f):s(t))e.push(p.i/n|0),e.push(t.i/n|0),e.push(m.i/n|0),S(t),t=m.next,g=m.next;else if((t=m)===g){h?1===h?a(t=l(o(t),e,n),e,n,r,i,f,2):2===h&&c(t,e,n,r,i,f):a(o(t),e,n,r,i,f,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(v(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,a=r.x,s=e.y,u=n.y,l=r.y,c=i<o?i<a?i:a:o<a?o:a,f=s<u?s<l?s:l:u<l?u:l,h=i>o?i>a?i:a:o>a?o:a,p=s>u?s>l?s:l:u>l?u:l,d=r.next;d!==e;){if(d.x>=c&&d.x<=h&&d.y>=f&&d.y<=p&&g(i,s,o,u,a,l,d.x,d.y)&&v(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(v(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,l=a.x,c=i.y,f=o.y,h=a.y,p=s<u?s<l?s:l:u<l?u:l,m=c<f?c<h?c:h:f<h?f:h,y=s>u?s>l?s:l:u>l?u:l,b=c>f?c>h?c:h:f>h?f:h,_=d(p,m,e,n,r),A=d(y,b,e,n,r),w=t.prevZ,x=t.nextZ;w&&w.z>=_&&x&&x.z<=A;){if(w.x>=p&&w.x<=y&&w.y>=m&&w.y<=b&&w!==i&&w!==a&&g(s,c,u,f,l,h,w.x,w.y)&&v(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,x.x>=p&&x.x<=y&&x.y>=m&&x.y<=b&&x!==i&&x!==a&&g(s,c,u,f,l,h,x.x,x.y)&&v(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;w&&w.z>=_;){if(w.x>=p&&w.x<=y&&w.y>=m&&w.y<=b&&w!==i&&w!==a&&g(s,c,u,f,l,h,w.x,w.y)&&v(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;x&&x.z<=A;){if(x.x>=p&&x.x<=y&&x.y>=m&&x.y<=b&&x!==i&&x!==a&&g(s,c,u,f,l,h,x.x,x.y)&&v(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!b(i,a)&&_(i,r,r.next,a)&&x(i,a)&&x(a,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(a.i/n|0),S(r),S(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&y(u,l)){var c=E(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s,0),void a(c,e,n,r,i,s,0)}l=l.next}u=u.next}while(u!==t)}function f(t,e){return t.x-e.x}function h(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===i))return n}r=r.next}while(r!==e);if(!n)return null;var u,l=n,c=n.x,f=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&g(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),x(r,t)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&p(n,r)))&&(n=r,h=u)),r=r.next}while(r!==l);return n}(t,e);if(!n)return e;var r=E(n,t);return o(r,r.next),o(n,n.next)}function p(t,e){return v(t.prev,t,e.prev)<0&&v(e.next,t,t.next)<0}function d(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function g(t,e,n,r,i,o,a,s){return(i-a)*(e-s)>=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&_(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(x(t,e)&&x(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(v(t.prev,t,e.prev)||v(t,e.prev,e))||b(t,e)&&v(t.prev,t,t.next)>0&&v(e.prev,e,e.next)>0)}function v(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function b(t,e){return t.x===e.x&&t.y===e.y}function _(t,e,n,r){var i=w(v(t,e,n)),o=w(v(t,e,r)),a=w(v(n,r,t)),s=w(v(n,r,e));return i!==o&&a!==s||(!(0!==i||!A(t,n,e))||(!(0!==o||!A(t,r,e))||(!(0!==a||!A(n,t,r))||!(0!==s||!A(n,e,r)))))}function A(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function w(t){return t>0?1:t<0?-1:0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function E(t,e){var n=new P(t.i,t.x,t.y),r=new P(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function O(t,e,n,r){var i=new P(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function P(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(C(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*n,c=s<u-1?e[s+1]*n:t.length;a-=Math.abs(C(t,l,c,n))}var f=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,p=r[s+1]*n,d=r[s+2]*n;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return m}));new Uint8Array([0]);const r=[171,75,84,88,32,50,48,187,13,10,26,10];var i,o,a,s,u,l,c,f;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(i||(i={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(o||(o={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(a||(a={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(s||(s={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(u||(u={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(l||(l={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(c||(c={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(f||(f={}));class h{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=i.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:o.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:a.UNSPECIFIED,colorPrimaries:s.SRGB,transferFunction:s.SRGB,flags:l.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class p{constructor(t,e,n,r){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=r,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==e&&r<t;)r++,this._offset++;return r<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,r)}}function d(e){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(e):t.from(e).toString("utf8")}function m(t){const e=new Uint8Array(t.buffer,t.byteOffset,r.length);if(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||e[4]!==r[4]||e[5]!==r[5]||e[6]!==r[6]||e[7]!==r[7]||e[8]!==r[8]||e[9]!==r[9]||e[10]!==r[10]||e[11]!==r[11])throw new Error("Missing KTX 2.0 identifier.");const n=new h,i=17*Uint32Array.BYTES_PER_ELEMENT,o=new p(t,r.length,i,!0);n.vkFormat=o._nextUint32(),n.typeSize=o._nextUint32(),n.pixelWidth=o._nextUint32(),n.pixelHeight=o._nextUint32(),n.pixelDepth=o._nextUint32(),n.layerCount=o._nextUint32(),n.faceCount=o._nextUint32();const a=o._nextUint32();n.supercompressionScheme=o._nextUint32();const s=o._nextUint32(),u=o._nextUint32(),l=o._nextUint32(),c=o._nextUint32(),f=o._nextUint64(),m=o._nextUint64(),g=new p(t,r.length+i,3*a*8,!0);for(let r=0;r<a;r++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+g._nextUint64(),g._nextUint64()),uncompressedByteLength:g._nextUint64()});const y=new p(t,s,u,!0),v={vendorId:y._skip(4)._nextUint16(),descriptorType:y._nextUint16(),versionNumber:y._nextUint16(),descriptorBlockSize:y._nextUint16(),colorModel:y._nextUint8(),colorPrimaries:y._nextUint8(),transferFunction:y._nextUint8(),flags:y._nextUint8(),texelBlockDimension:{x:y._nextUint8()+1,y:y._nextUint8()+1,z:y._nextUint8()+1,w:y._nextUint8()+1},bytesPlane:[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],samples:[]},b=(v.descriptorBlockSize/4-6)/4;for(let r=0;r<b;r++)v.samples[r]={bitOffset:y._nextUint16(),bitLength:y._nextUint8(),channelID:y._nextUint8(),samplePosition:[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],sampleLower:y._nextUint32(),sampleUpper:y._nextUint32()};n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(v);const _=new p(t,l,c,!0);for(;_._offset<c;){const t=_._nextUint32(),e=_._scan(t),r=d(e),i=_._scan(t-e.byteLength);n.keyValue[r]=r.match(/^ktx/i)?d(i):i,t%4&&_._skip(4-t%4)}if(m<=0)return n;const A=new p(t,f,m,!0),w=A._nextUint16(),x=A._nextUint16(),E=A._nextUint32(),O=A._nextUint32(),S=A._nextUint32(),P=A._nextUint32(),C=[];for(let r=0;r<a;r++)C.push({imageFlags:A._nextUint32(),rgbSliceByteOffset:A._nextUint32(),rgbSliceByteLength:A._nextUint32(),alphaSliceByteOffset:A._nextUint32(),alphaSliceByteLength:A._nextUint32()});const T=f+A._offset,k=T+E,I=k+O,L=I+S,j=new Uint8Array(t.buffer,t.byteOffset+T,E),M=new Uint8Array(t.buffer,t.byteOffset+k,O),R=new Uint8Array(t.buffer,t.byteOffset+I,S),N=new Uint8Array(t.buffer,t.byteOffset+L,P);return n.globalData={endpointCount:w,selectorCount:x,imageDescs:C,endpointsData:j,selectorsData:M,tablesData:R,extendedData:N},n}}).call(this,n(422).Buffer)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(608),i=n(315),o=n(173),a=n(6);class s{constructor(t,e){let{attributes:n,material:o,pbrDebug:a,imageBasedLightingEnvironment:s,lights:u,useTangents:l}=e;this.gl=t,this.defines={MANUAL_SRGB:1,SRGB_FAST_APPROXIMATION:1},Object(r.b)(t,i.a.GLSL_TEXTURE_LOD)&&(this.defines.USE_TEX_LOD=1),this.uniforms={u_Camera:[0,0,0],u_MetallicRoughnessValues:[1,1]},this.parameters={},this.generatedTextures=[],s&&(this.uniforms.u_DiffuseEnvSampler=s.getDiffuseEnvSampler(),this.uniforms.u_SpecularEnvSampler=s.getSpecularEnvSampler(),this.uniforms.u_brdfLUT=s.getBrdfTexture(),this.uniforms.u_ScaleIBLAmbient=[1,1]),a&&(this.uniforms.u_ScaleDiffBaseMR=[0,0,0,0],this.uniforms.u_ScaleFGDSpec=[0,0,0,0]),this.defineIfPresent(n.NORMAL,"HAS_NORMALS"),this.defineIfPresent(n.TANGENT&&l,"HAS_TANGENTS"),this.defineIfPresent(n.TEXCOORD_0,"HAS_UV"),this.defineIfPresent(s,"USE_IBL"),this.defineIfPresent(u,"USE_LIGHTS"),this.defineIfPresent(a,"PBR_DEBUG"),o&&this.parseMaterial(o)}defineIfPresent(t,e){t&&(this.defines[e]=1)}parseTexture(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=t.texture&&t.texture.sampler&&t.texture.sampler.parameters||{},i=t.texture.source.image;let a,s={};i.compressed?(a=i,s={[this.gl.TEXTURE_MIN_FILTER]:i.data.length>1?this.gl.LINEAR_MIPMAP_NEAREST:this.gl.LINEAR}):a={data:i};const u=new o.a(this.gl,{id:t.name||t.id,parameters:{...r,...s},pixelStore:{[this.gl.UNPACK_FLIP_Y_WEBGL]:!1},...a});this.uniforms[e]=u,this.defineIfPresent(n,n),this.generatedTextures.push(u)}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&&(a.k.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]}))}delete(){this.generatedTextures.forEach((t=>t.delete()))}}},function(t,e,n){t.exports=n(897)},function(t,e,n){var r=n(902);function i(e,n){return t.exports=i=r||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,i(e,n)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",(function(){return r}))},function(t,e,n){t.exports=n(907)},function(t,e,n){t.exports=n(915)},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(576),o=n(270);function a(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(){u=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}var l=r.types.model("GridSquare",{id:r.types.identifierNumber,memorable_name:r.types.maybeNull(r.types.string),state:r.types.enumeration("GridSquareState",["todo","in_progress","ready_to_check","check_in_progress","completed"]),polygon:r.types.frozen({}),completed_by:r.types.maybeNull(r.types.string),validated_by:r.types.maybeNull(r.types.string),embed_metadata:r.types.array(r.types.frozen(),[]),enabled:r.types.maybeNull(r.types.boolean),highlighted:r.types.optional(r.types.boolean,!1),updated_at:r.types.maybeNull(r.types.string),hoursSinceUpdate:r.types.maybeNull(r.types.number),staleness:r.types.maybeNull(r.types.number)}).actions((function(t){return{setState:function(e){t.state=e},setEnabled:function(e){t.enabled=e},setHighlighted:function(e){t.highlighted=e},updateState:Object(r.flow)(u().mark((function e(n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(i.updateGridSquareStateMutation)({id:t.id,aasm_state:n,embed_metadata:t.latestEmbedMetadata});case 2:r=e.sent,t.setState(r.update.aasm_state);case 4:case"end":return e.stop()}}),e)}))),toggleEnabledState:Object(r.flow)(u().mark((function e(n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(i.updateGridSquareStateAdminMutation)({id:t.id,enabled:!t.enabled});case 2:r=e.sent,t.setEnabled(r.update.enabled);case 4:case"end":return e.stop()}}),e)})))}})).views((function(t){return{get isEditable(){return"completed"!==t.state},get geoJSON(){return{type:"Polygon",coordinates:t.polygon.coordinates}},get geoJSONWithProperties(){return{type:"Feature",properties:{id:t.id,state:t.state,enabled:t.enabled,highlighted:t.highlighted,hoursSinceUpdate:t.hoursSinceUpdate,staleness:t.staleness},geometry:t.polygon}},get latestEmbedMetadata(){var e=Object(r.getRoot)(t).embedMetadata;return e?Object(o.addUniqueObjects)(t.embed_metadata,e):t.embed_metadata},get stalenessSummary(){var e=new Date(t.updated_at),n=e.getDate(),r=e.getMonth()+1,i=e.getFullYear(),a=e.getHours(),s=e.getMinutes().toString().padStart(2,"0"),u=Math.floor(t.hoursSinceUpdate/24),l=Math.floor(t.hoursSinceUpdate%24);return"".concat(u," days, ").concat(l," hours ago <br/> on ").concat(n,"/").concat(r,"/").concat(i," at ").concat(a,":").concat(s,". <br/><br/>State: ").concat(Object(o.humanize)(t.state))}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);if(e.updated_at){var n=new Date(e.updated_at),r=(new Date-n)/36e5;e.hoursSinceUpdate=Math.floor(r);var i=Math.max(e.hoursSinceUpdate-72,0);e.staleness=Number((i/168).toFixed(2))}return e}));e.default=l},function(t,e,n){"use strict";n.r(e),n.d(e,"updateGridSquareStateMutation",(function(){return i})),n.d(e,"updateGridSquareStateAdminMutation",(function(){return o}));var r=n(147),i=function(t){return r.default.request('\n    #graphql\n    mutation GridSquareStateUpdate($id: bigint!, $aasm_state: String!, $embed_metadata:jsonb) {\n        update: placemaker_update_grid_square(\n            pk_columns: {id: $id},\n            _set: {\n                aasm_state: $aasm_state,\n                embed_metadata: $embed_metadata,\n                updated_at: "now()"\n            }) {\n            aasm_state\n            embed_metadata\n            updated_at\n        }\n    }\n\n',t)},o=function(t){return r.default.request("\n    #graphql\n    mutation GridSquareStateUpdate($id: bigint!, $enabled: Boolean!) {\n        update: placemaker_update_grid_square(\n            pk_columns: {id: $id},\n            _set: {\n                enabled: $enabled,\n            }) {\n            enabled\n        }\n    }\n\n",t)}},function(t,e,n){t.exports={Search:"Search-module__Search___oapvo"}},function(t,e,n){"use strict";n.r(e),n.d(e,"OverlayGroup",(function(){return l}));var r=n(2),i=n(371);function o(){o=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function a(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=r.types.model("OverlayGroup",{id:r.types.optional(r.types.integer,0),slug:r.types.optional(r.types.string,""),name:r.types.optional(r.types.string,""),layers:r.types.array(i.default)}).actions((function(t){return{createNewLayer:Object(r.flow)(o().mark((function e(n){var i,a,u,l,c,f,h,p,d,m;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.params,a=void 0===i?{}:i,u=n.setGid,l=void 0!==u&&u,c=n.tentative,f=void 0!==c&&c,(h=Object(r.getRoot)(t)).setLoading(!0),p="Layer ".concat(t.layers.length+1),e.prev=4,e.next=7,fetch("/overlays/layer/create",{method:"POST",headers:h.requestHeaders,body:JSON.stringify(s({name:p,overlay_group_id:t.id},a))});case 7:return m=e.sent,e.next=10,m.json();case 10:(d=e.sent).overlay.sgid=d.overlay_sgid,t.addLayer(d.overlay,f),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(4),console.error("Error creating overlay:",e.t0);case 18:return e.prev=18,l&&h.setGidForUpload(d.overlay_sgid),h.setLoading(!1),e.finish(18);case 22:case"end":return e.stop()}}),e,null,[[4,15,18,22]])}))),attachExistingLayer:Object(r.flow)(o().mark((function e(n){var i,a,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=Object(r.getRoot)(t)).setLoading(!0),e.prev=2,e.next=5,fetch("/overlays/layer/".concat(n,"/attach"),{method:"POST",headers:i.requestHeaders,body:JSON.stringify({overlay_group_id:t.id})});case 5:return s=e.sent,e.next=8,s.json();case 8:a=e.sent,console.log(a),t.addLayer(a.overlay),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),console.error("Error creating overlay:",e.t0);case 16:return e.prev=16,i.setLoading(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,13,16,19]])}))),addLayer:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i.default.create(e);t.layers.push(r),r.setAttribute("tentative",n),r.setAttribute("position",t.layers.length-1)},removeLayer:function(e){t.layers.remove(e)},moveLayer:function(e,n){t.layers.forEach((function(t){t.position==e?(t.position=n,t.reorderLayer()):t.position>=n&&t.position<e?t.position++:t.position>e&&t.position<=n&&t.position--}))},closeAllExpanded:function(){t.layers.forEach((function(t){t.setVolatile("isExpanded",!1),t.setVolatile("isEditingBound",!1),t.setVolatile("isDrawingRectangle",!1)}))},applySnapshot:function(e){console.log(e),Object(r.applySnapshot)(t,e),console.log(t.toJSON())}}})).views((function(t){return{get sortedLayers(){return t.layers.filter((function(t){return!t.tentative})).slice().sort((function(t,e){return t.position-e.position}))}}})).preProcessSnapshot((function(t){return t}));e.default=l},function(t,e,n){t.exports={OverlayCreatorMap:"OverlayCreatorMap-module__OverlayCreatorMap___10rOR",pointer:"OverlayCreatorMap-module__pointer___1Tubi",crosshair:"OverlayCreatorMap-module__crosshair___3DfNT"}},function(t,e,n){"use strict";(function(e){var r=n(524),i=n(525),o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,s=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(t){return(t||"").toString().replace(s,"")}var l=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],c={hash:1,query:1};function f(t){var n,r=("undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{}).location||{},i={},a=typeof(t=t||r);if("blob:"===t.protocol)i=new p(unescape(t.pathname),{});else if("string"===a)for(n in i=new p(t,{}),c)delete i[n];else if("object"===a){for(n in t)n in c||(i[n]=t[n]);void 0===i.slashes&&(i.slashes=o.test(t.href))}return i}function h(t){t=u(t);var e=a.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function p(t,e,n){if(t=u(t),!(this instanceof p))return new p(t,e,n);var o,a,s,c,d,m,g=l.slice(),y=typeof e,v=this,b=0;for("object"!==y&&"string"!==y&&(n=e,e=null),n&&"function"!==typeof n&&(n=i.parse),e=f(e),o=!(a=h(t||"")).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,a.slashes||(g[3]=[/(.*)/,"pathname"]);b<g.length;b++)"function"!==typeof(c=g[b])?(s=c[0],m=c[1],s!==s?v[m]=t:"string"===typeof s?~(d=t.indexOf(s))&&("number"===typeof c[2]?(v[m]=t.slice(0,d),t=t.slice(d+c[2])):(v[m]=t.slice(d),t=t.slice(0,d))):(d=s.exec(t))&&(v[m]=d[1],t=t.slice(0,d.index)),v[m]=v[m]||o&&c[3]&&e[m]||"",c[4]&&(v[m]=v[m].toLowerCase())):t=c(t);n&&(v.query=n(v.query)),o&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(v.pathname,e.pathname)),r(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(c=v.auth.split(":"),v.username=c[0]||"",v.password=c[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}p.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"===typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,/:\d+$/.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;default:o[t]=e}for(var s=0;s<l.length;s++){var u=l[s];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"===typeof t||(t=i.stringify);var e,n=this,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.slashes?"//":"");return n.username&&(o+=n.username,n.password&&(o+=":"+n.password),o+="@"),o+=n.host+n.pathname,(e="object"===typeof n.query?t(n.query):n.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(o+=n.hash),o}},p.extractProtocol=h,p.location=f,p.trimLeft=u,p.qs=i,t.exports=p}).call(this,n(36))},function(t,e,n){t.exports={OverlayCreatorAddLayerUploader:"OverlayCreatorAddLayerUploader-module__OverlayCreatorAddLayerUploader___mVhSX",uploadArea:"OverlayCreatorAddLayerUploader-module__uploadArea___2cXTN"}},function(t,e,n){t.exports={OverlayCreatorMessages:"OverlayCreatorMessages-module__OverlayCreatorMessages___2E1XJ",message:"OverlayCreatorMessages-module__message___2gMTi"}},function(t,e,n){t.exports={RouteCreatorMap:"RouteCreatorMap-module__RouteCreatorMap___2LIMW",hasIntermediateCursor:"RouteCreatorMap-module__hasIntermediateCursor___1pd1C"}},function(t,e,n){t.exports={TrailCreatorMap:"TrailCreatorMap-module__TrailCreatorMap___3ZQAR",hasIntermediateCursor:"TrailCreatorMap-module__hasIntermediateCursor___rdd7z"}},function(t,e,n){"use strict";t.exports=function(t,e){e||(e={}),"function"===typeof e&&(e={cmp:e});var n,r="boolean"===typeof e.cycles&&e.cycles,i=e.cmp&&(n=e.cmp,function(t){return function(e,r){var i={key:e,value:t[e]},o={key:r,value:t[r]};return n(i,o)}}),o=[];return function t(e){if(e&&e.toJSON&&"function"===typeof e.toJSON&&(e=e.toJSON()),void 0!==e){if("number"==typeof e)return isFinite(e)?""+e:"null";if("object"!==typeof e)return JSON.stringify(e);var n,a;if(Array.isArray(e)){for(a="[",n=0;n<e.length;n++)n&&(a+=","),a+=t(e[n])||"null";return a+"]"}if(null===e)return"null";if(-1!==o.indexOf(e)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(e)-1,u=Object.keys(e).sort(i&&i(e));for(a="",n=0;n<u.length;n++){var l=u[n],c=t(e[l]);c&&(a&&(a+=","),a+=JSON.stringify(l)+":"+c)}return o.splice(s,1),"{"+a+"}"}}(t)}},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;if("function"===typeof n)if(n.observable)e=n.observable;else{e=n.for("https://github.com/benlesh/symbol-observable");try{n.observable=e}catch(r){}}else e="@@observable";return e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(i){0}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),i="-ms-",o="-moz-",a="-webkit-",s="comm",u="rule",l="decl",c=Math.abs,f=String.fromCharCode;function h(t){return t.trim()}function p(t,e,n){return t.replace(e,n)}function d(t,e){return t.indexOf(e)}function m(t,e){return 0|t.charCodeAt(e)}function g(t,e,n){return t.slice(e,n)}function y(t){return t.length}function v(t){return t.length}function b(t,e){return e.push(t),t}function _(t,e){return t.map(e).join("")}var A=1,w=1,x=0,E=0,O=0,S="";function P(t,e,n,r,i,o,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:A,column:w,length:a,return:""}}function C(t,e,n){return P(t,e.root,e.parent,n,e.props,e.children,0)}function T(){return O=E>0?m(S,--E):0,w--,10===O&&(w=1,A--),O}function k(){return O=E<x?m(S,E++):0,w++,10===O&&(w=1,A++),O}function I(){return m(S,E)}function L(){return E}function j(t,e){return g(S,t,e)}function M(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R(t){return A=w=1,x=y(S=t),E=0,[]}function N(t){return S="",t}function D(t){return h(j(E-1,z(91===t?t+2:40===t?t+1:t)))}function F(t){for(;(O=I())&&O<33;)k();return M(t)>2||M(O)>3?"":" "}function B(t,e){for(;--e&&k()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return j(t,L()+(e<6&&32==I()&&32==k()))}function z(t){for(;k();)switch(O){case t:return E;case 34:case 39:return z(34===t||39===t?t:O);case 40:41===t&&z(t);break;case 92:k()}return E}function U(t,e){for(;k()&&t+O!==57&&(t+O!==84||47!==I()););return"/*"+j(e,E-1)+"*"+f(47===t?t:k())}function G(t){for(;!M(I());)k();return j(t,E)}function V(t){return N(q("",null,null,null,[""],t=R(t),0,[0],t))}function q(t,e,n,r,i,o,a,s,u){for(var l=0,c=0,h=a,d=0,m=0,g=0,v=1,_=1,A=1,w=0,x="",E=i,O=o,S=r,P=x;_;)switch(g=w,w=k()){case 34:case 39:case 91:case 40:P+=D(w);break;case 9:case 10:case 13:case 32:P+=F(g);break;case 92:P+=B(L()-1,7);continue;case 47:switch(I()){case 42:case 47:b(W(U(k(),L()),e,n),u);break;default:P+="/"}break;case 123*v:s[l++]=y(P)*A;case 125*v:case 59:case 0:switch(w){case 0:case 125:_=0;case 59+c:m>0&&y(P)-h&&b(m>32?X(P+";",r,n,h-1):X(p(P," ","")+";",r,n,h-2),u);break;case 59:P+=";";default:if(b(S=H(P,e,n,l,c,i,s,x,E=[],O=[],h),o),123===w)if(0===c)q(P,e,S,S,E,o,h,s,O);else switch(d){case 100:case 109:case 115:q(t,S,S,r&&b(H(t,S,S,0,0,i,s,x,i,E=[],h),O),i,O,h,s,r?E:O);break;default:q(P,S,S,S,[""],O,h,s,O)}}l=c=m=0,v=A=1,x=P="",h=a;break;case 58:h=1+y(P),m=g;default:if(v<1)if(123==w)--v;else if(125==w&&0==v++&&125==T())continue;switch(P+=f(w),w*v){case 38:A=c>0?1:(P+="\f",-1);break;case 44:s[l++]=(y(P)-1)*A,A=1;break;case 64:45===I()&&(P+=D(k())),d=I(),c=y(x=P+=G(L())),w++;break;case 45:45===g&&2==y(P)&&(v=0)}}return o}function H(t,e,n,r,i,o,a,s,l,f,d){for(var m=i-1,y=0===i?o:[""],b=v(y),_=0,A=0,w=0;_<r;++_)for(var x=0,E=g(t,m+1,m=c(A=a[_])),O=t;x<b;++x)(O=h(A>0?y[x]+" "+E:p(E,/&\f/g,y[x])))&&(l[w++]=O);return P(t,e,n,0===i?u:s,l,f,d)}function W(t,e,n){return P(t,e,n,s,f(O),g(t,2,-2),0)}function X(t,e,n,r){return P(t,e,n,l,g(t,0,r),g(t,r+1,-1),r)}function Y(t,e){switch(function(t,e){return(((e<<2^m(t,0))<<2^m(t,1))<<2^m(t,2))<<2^m(t,3)}(t,e)){case 5103:return a+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return a+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return a+t+o+t+i+t+t;case 6828:case 4268:return a+t+i+t+t;case 6165:return a+t+i+"flex-"+t+t;case 5187:return a+t+p(t,/(\w+).+(:[^]+)/,a+"box-$1$2"+i+"flex-$1$2")+t;case 5443:return a+t+i+"flex-item-"+p(t,/flex-|-self/,"")+t;case 4675:return a+t+i+"flex-line-pack"+p(t,/align-content|flex-|-self/,"")+t;case 5548:return a+t+i+p(t,"shrink","negative")+t;case 5292:return a+t+i+p(t,"basis","preferred-size")+t;case 6060:return a+"box-"+p(t,"-grow","")+a+t+i+p(t,"grow","positive")+t;case 4554:return a+p(t,/([^-])(transform)/g,"$1"+a+"$2")+t;case 6187:return p(p(p(t,/(zoom-|grab)/,a+"$1"),/(image-set)/,a+"$1"),t,"")+t;case 5495:case 3959:return p(t,/(image-set\([^]*)/,a+"$1$`$1");case 4968:return p(p(t,/(.+:)(flex-)?(.*)/,a+"box-pack:$3"+i+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+a+t+t;case 4095:case 3583:case 4068:case 2532:return p(t,/(.+)-inline(.+)/,a+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(y(t)-1-e>6)switch(m(t,e+1)){case 109:if(45!==m(t,e+4))break;case 102:return p(t,/(.+:)(.+)-([^]+)/,"$1"+a+"$2-$3$1"+o+(108==m(t,e+3)?"$3":"$2-$3"))+t;case 115:return~d(t,"stretch")?Y(p(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==m(t,e+1))break;case 6444:switch(m(t,y(t)-3-(~d(t,"!important")&&10))){case 107:return p(t,":",":"+a)+t;case 101:return p(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+a+(45===m(t,14)?"inline-":"")+"box$3$1"+a+"$2$3$1"+i+"$2box$3")+t}break;case 5936:switch(m(t,e+11)){case 114:return a+t+i+p(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return a+t+i+p(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return a+t+i+p(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return a+t+i+t+t}return t}function Z(t,e){for(var n="",r=v(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function K(t,e,n,r){switch(t.type){case"@import":case l:return t.return=t.return||t.value;case s:return"";case u:t.value=t.props.join(",")}return y(n=Z(t.children,r))?t.return=t.value+"{"+n+"}":""}function $(t){return function(e){e.root||(e=e.return)&&t(e)}}n(393);var J=function(t,e){return N(function(t,e){var n=-1,r=44;do{switch(M(r)){case 0:38===r&&12===I()&&(e[n]=1),t[n]+=G(E-1);break;case 2:t[n]+=D(r);break;case 4:if(44===r){t[++n]=58===I()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=f(r)}}while(r=k());return t}(R(t),e))},Q=new WeakMap,tt=function(t){if("rule"===t.type&&t.parent&&t.length){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||Q.get(n))&&!r){Q.set(t,!0);for(var i=[],o=J(e,i),a=n.props,s=0,u=0;s<o.length;s++)for(var l=0;l<a.length;l++,u++)t.props[u]=i[s]?o[s].replace(/&\f/g,a[l]):a[l]+" "+o[s]}}},et=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}},nt=[function(t,e,n,r){if(!t.return)switch(t.type){case l:t.return=Y(t.value,t.length);break;case"@keyframes":return Z([C(p(t.value,"@","@"+a),t,"")],r);case u:if(t.length)return _(t.props,(function(e){switch(function(t,e){return(t=e.exec(t))?t[0]:t}(e,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Z([C(p(e,/:(read-\w+)/,":-moz-$1"),t,"")],r);case"::placeholder":return Z([C(p(e,/:(plac\w+)/,":"+a+"input-$1"),t,""),C(p(e,/:(plac\w+)/,":-moz-$1"),t,""),C(p(e,/:(plac\w+)/,i+"input-$1"),t,"")],r)}return""}))}}];e.a=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var i=t.stylisPlugins||nt;var o,a,s={},u=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n<e.length;n++)s[e[n]]=!0;u.push(t)}));var l=[tt,et];var c,f=[K,$((function(t){c.insert(t)}))],h=function(t){var e=v(t);return function(n,r,i,o){for(var a="",s=0;s<e;s++)a+=t[s](n,r,i,o)||"";return a}}(l.concat(i,f));a=function(t,e,n,r){c=n,Z(V(t?t+"{"+e.styles+"}":e.styles),h),r&&(p.inserted[e.name]=!0)};var p={key:e,sheet:new r({key:e,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend}),nonce:t.nonce,inserted:s,registered:{},insert:a};return p.sheet.hydrate(u),p}},function(t,e){function n(t){return Array.isArray(t)||"[object Object]"=={}.toString.call(t)}function r(t){return!t||"object"!=typeof t&&"function"!=typeof t}t.exports=function t(){var e=[].slice.call(arguments),i=!1;"boolean"==typeof e[0]&&(i=e.shift());var o=e[0];if(r(o))throw new Error("extendee must be an object");for(var a=e.slice(1),s=a.length,u=0;u<s;u++){var l=a[u];for(var c in l)if(Object.prototype.hasOwnProperty.call(l,c)){var f=l[c];if(i&&n(f)){var h=Array.isArray(f)?[]:{};o[c]=t(!0,Object.prototype.hasOwnProperty.call(o,c)&&!r(o[c])?o[c]:h,f)}else o[c]=f}}return o}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchOverlayGroupsQuery",(function(){return i})),n.d(e,"fetchOverlayGroupQuery",(function(){return o}));var r=n(21),i=function(t){return r.default.request("\n    #graphql\n\n    query OverlayGroups($limit: Int!, $offset: Int!, $slugs: [String!]) {\n        total: overlay_groups_aggregate(where: {slug: {_in: $slugs}}) {\n            aggregate {\n                count\n            }\n        }\n\n        results: overlay_groups(limit: $limit,\n            offset: $offset,\n            where: {slug: {_in: $slugs}},\n            order_by: [\n                {date_to: asc_nulls_last},\n                {date_from: asc_nulls_last},\n                {name: asc}\n            ]) {\n            id\n            name\n            slug\n            date_from\n            date_to\n            date_from_precision\n            date_to_precision\n            sanitised_content\n            parent_item_ids\n            static_map_urls\n            image {\n                name\n                url\n            }\n            key_mode\n            overlays(order_by: { position: asc }) {\n                overlay {\n                    id\n                    name\n                    url\n                    description\n                    centroid\n                    bbox_sw\n                    bbox_ne\n                    min_zoom\n                    max_zoom\n                    type\n                    visualisation_settings\n                    visualisation\n                }\n            }\n        }\n    }\n",t)},o=function(t){return r.default.request("\n  #graphql\n\n  query OverlayGroup($slug: String!) {\n    result: overlay_groups(limit: 1, where: {slug: {_eq: $slug}}) {\n      id\n      name\n      slug\n      sanitised_content\n      parent_item_ids\n      image {\n        name\n        url\n      }\n      key_mode\n      overlays(order_by: { position: asc }) {\n        overlay {\n          id\n          name\n          url\n          description\n          centroid\n          bbox_sw\n          bbox_ne\n          min_zoom\n          max_zoom\n          type\n          visualisation\n          visualisation_settings\n        }\n      }\n    }\n  }\n",t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var r=n(186),i=n(839),o=n(838),a=n(840),s=n(285),u=n(836),l=n(835),c=n(434),f=n(592),h=n(841),p=n(842),d=n(591),m=n(837),g=n(844),y=n(843),v=n(548),b=n(284),_=n(56);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},A.apply(this,arguments)}var w=["#6FFFB0","#FD6FFF","#81FCED","#FFCA58"],x={critical:"#FF4040",error:"#FF4040",warning:"#FFAA15",ok:"#00C781",unknown:"#CCCCCC",disabled:"#CCCCCC"},E=w[0],O={active:Object(r.a)(221,221,221,.5),"background-back":{dark:"#33333308",light:"#EDEDED"},"background-front":{dark:"#444444",light:"#FFFFFF"},"background-contrast":{light:"#33333310",dark:"#FFFFFF18"},"active-background":"background-contrast","active-text":"text-strong",black:"#000000",border:{dark:Object(r.a)(255,255,255,.33),light:Object(r.a)(0,0,0,.33)},brand:"#7D4CDB",control:{dark:"accent-1",light:"brand"},focus:E,"graph-0":"accent-1","graph-1":"neutral-1","graph-2":"neutral-2","graph-3":"neutral-3","graph-4":"neutral-4",placeholder:"#AAAAAA",selected:"brand",text:{dark:"#f8f8f8",light:"#444444"},"text-strong":{dark:"#FFFFFF",light:"#000000"},"text-weak":{dark:"#CCCCCC",light:"#555555"},"text-xweak":{dark:"#BBBBBB",light:"#666666"},icon:{dark:"#f8f8f8",light:"#666666"},"selected-background":"brand","selected-text":"text-strong",white:"#FFFFFF"},S=function(t,e){return t.forEach((function(t,n){O[e+"-"+(n+1)]=t}))};S(w,"accent"),S(["#333333","#555555","#777777","#999999","#999999","#999999"],"dark"),S(["#F8F8F8","#F2F2F2","#EDEDED","#DADADA","#DADADA","#DADADA"],"light"),S(["#00873D","#3D138D","#00739D","#A2423D"],"neutral"),Object.keys(x).forEach((function(t){O["status-"+t]=x[t]}));var P=function(t,e){void 0===t&&(t=24),void 0===e&&(e=6);var n=.75*t,r=t/e,w=function(e){return{size:n+e*r+"px",height:t+e*r+"px",maxWidth:t*(n+e*r)+"px"}},x=Object(b.b)(v.base,{global:{active:{background:{color:"active",opacity:"medium"},color:{dark:"white",light:"black"}},animation:{duration:"1s",jiggle:{duration:"0.1s"}},borderSize:{xsmall:"1px",small:"2px",medium:t/6+"px",large:t/2+"px",xlarge:t+"px"},breakpoints:{small:{value:32*t,borderSize:{xsmall:"1px",small:"2px",medium:t/6+"px",large:t/4+"px",xlarge:t/2+"px"},edgeSize:{none:"0px",hair:"1px",xxsmall:"2px",xsmall:t/8+"px",small:t/4+"px",medium:t/2+"px",large:t+"px",xlarge:2*t+"px"},size:{xxsmall:t+"px",xsmall:2*t+"px",small:4*t+"px",medium:8*t+"px",large:16*t+"px",xlarge:32*t+"px",full:"100%"}},medium:{value:64*t},large:{}},deviceBreakpoints:{phone:"small",tablet:"medium",computer:"large"},colors:O,control:{border:{width:"1px",radius:"4px",color:"border"},disabled:{opacity:.3}},debounceDelay:300,drop:{background:{dark:"black",light:"white"},border:{radius:"0px"},shadowSize:"small",zIndex:"20"},edgeSize:{none:"0px",hair:"1px",xxsmall:t/8+"px",xsmall:t/4+"px",small:t/2+"px",medium:t+"px",large:2*t+"px",xlarge:4*t+"px",responsiveBreakpoint:"small"},elevation:{light:{none:"none",xsmall:"0px 1px 2px rgba(0, 0, 0, 0.20)",small:"0px 2px 4px rgba(0, 0, 0, 0.20)",medium:"0px 4px 8px rgba(0, 0, 0, 0.20)",large:"0px 8px 16px rgba(0, 0, 0, 0.20)",xlarge:"0px 12px 24px rgba(0, 0, 0, 0.20)"},dark:{none:"none",xsmall:"0px 2px 2px rgba(255, 255, 255, 0.40)",small:"0px 4px 4px rgba(255, 255, 255, 0.40)",medium:"0px 6px 8px rgba(255, 255, 255, 0.40)",large:"0px 8px 16px rgba(255, 255, 255, 0.40)",xlarge:"0px 12px 24px rgba(255, 255, 255, 0.40)"}},focus:{border:{color:"focus"},shadow:{color:"focus",size:"2px"}},font:A({},w(0)),hover:{background:{color:"active",opacity:"medium"},color:{dark:"white",light:"black"}},input:{padding:{horizontal:Object(_.b)(t/2+"px")-Object(_.b)("1px")+"px",vertical:Object(_.b)(t/2+"px")-Object(_.b)("1px")+"px"},font:{weight:600}},opacity:{strong:.8,medium:.4,weak:.1},selected:{background:"selected",color:"white"},spacing:t+"px",size:{xxsmall:2*t+"px",xsmall:4*t+"px",small:8*t+"px",medium:16*t+"px",large:32*t+"px",xlarge:48*t+"px",xxlarge:64*t+"px",full:"100%"}},accordion:{panel:{},border:{side:"bottom",color:"border"},heading:{level:"4"},hover:{color:{dark:"light-4",light:"dark-3"},heading:{color:{dark:"light-4",light:"dark-3"}}},icons:{collapse:c.FormUp,expand:s.FormDown}},anchor:{textDecoration:"none",fontWeight:600,color:{dark:"accent-1",light:"brand"},hover:{textDecoration:"underline"}},avatar:{size:{xsmall:.75*t+"px",small:t+"px",medium:2*t+"px",large:3*t+"px",xlarge:4*t+"px"},text:{size:{xsmall:"small",small:"medium",medium:"large",large:"xlarge",xlarge:"xxlarge"}}},box:{responsiveBreakpoint:"small"},button:{size:{small:{border:{radius:.75*t+"px"},pad:{vertical:t/4-2+"px",horizontal:t-4+"px"}},medium:{border:{radius:.75*t+"px"},pad:{vertical:t/4-2+"px",horizontal:t-2+"px"}},large:{border:{radius:t+"px"},pad:{vertical:t/4+2+"px",horizontal:t+8+"px"}}},border:{width:"2px",radius:.75*t+"px"},active:{background:"active-background",color:"active-text"},disabled:{opacity:.3},padding:{vertical:t/4-2+"px",horizontal:t-2+"px"},transition:{timing:"ease-in-out",duration:.1,properties:["color","background-color","border-color","box-shadow"]}},calendar:{small:{fontSize:n-r+"px",lineHeight:1.375,daySize:8*t/7+"px",slideDuration:"0.2s"},medium:{fontSize:n+"px",lineHeight:1.45,daySize:16*t/7+"px",slideDuration:"0.5s"},large:{fontSize:n+3*r+"px",lineHeight:1.11,daySize:32*t/7+"px",slideDuration:"0.8s"},icons:{previous:d.Previous,next:f.Next,small:{previous:l.FormPrevious,next:u.FormNext}},heading:{level:"4"}},card:{container:{round:"small",elevation:"small"},header:{},body:{},footer:{}},carousel:{icons:{current:m.Subtract,next:f.Next,previous:d.Previous},animation:{duration:1e3},disabled:{icons:{}}},chart:{color:"graph-0"},checkBox:{border:{color:{dark:"rgba(255, 255, 255, 0.5)",light:"rgba(0, 0, 0, 0.15)"},width:"2px"},check:{radius:"4px",thickness:"4px"},hover:{border:{color:{dark:"white",light:"black"}}},icon:{},icons:{},size:t+"px",toggle:{color:{dark:"#d9d9d9",light:"#d9d9d9"},knob:{},radius:t+"px",size:2*t+"px"}},checkBoxGroup:{},clock:{analog:{hour:{color:{dark:"light-2",light:"dark-3"},width:t/3+"px",size:t+"px",shape:"round"},minute:{color:{dark:"light-4",light:"dark-3"},width:t/6+"px",size:Math.round(t/2)+"px",shape:"round"},second:{color:{dark:"accent-1",light:"accent-1"},width:t/8+"px",size:Math.round(t/2.666)+"px",shape:"round"},size:{xsmall:2*t+"px",small:3*t+"px",medium:4*t+"px",large:6*t+"px",xlarge:9*t+"px",xxlarge:12*t+"px",huge:12*t+"px"}},digital:{text:{xsmall:{size:n-2*r+"px",height:1.5},small:{size:n-r+"px",height:1.43},medium:{size:n+"px",height:1.375},large:{size:n+r+"px",height:1.167},xlarge:{size:n+2*r+"px",height:1.1875},xxlarge:{size:n+4*r+"px",height:1.125}}}},collapsible:{minSpeed:200,baseline:500},dateInput:{},dataTable:{groupHeader:{background:{dark:"dark-2",light:"light-2"},border:{side:"bottom",size:"xsmall"},pad:{horizontal:"small",vertical:"xsmall"}},groupEnd:{border:{side:"bottom",size:"xsmall"}},header:{gap:"small",units:{color:"text-xweak",margin:{left:"xsmall"}}},icons:{ascending:s.FormDown,contract:c.FormUp,descending:c.FormUp,expand:s.FormDown},primary:{weight:"bold"},resize:{border:{color:"border",side:"end"}}},diagram:{line:{color:"graph-0"}},formField:{border:{color:"border",error:{color:{dark:"white",light:"status-critical"}},position:"inner",side:"bottom"},content:{pad:"small"},disabled:{background:{color:"status-disabled",opacity:"medium"}},error:{color:"status-critical",margin:{vertical:"xsmall",horizontal:"small"}},help:{color:"dark-3",margin:{start:"small"}},info:{color:"text-xweak",margin:{vertical:"xsmall",horizontal:"small"}},label:{margin:{vertical:"xsmall",horizontal:"small"}},margin:{bottom:"small"}},grommet:{},heading:{font:{},level:{1:{font:{},small:A({},w(4)),medium:A({},w(8)),large:A({},w(16)),xlarge:A({},w(24))},2:{font:{},small:A({},w(2)),medium:A({},w(4)),large:A({},w(8)),xlarge:A({},w(12))},3:{font:{},small:A({},w(1)),medium:A({},w(2)),large:A({},w(4)),xlarge:A({},w(6))},4:{font:{},small:A({},w(0)),medium:A({},w(0)),large:A({},w(0)),xlarge:A({},w(0))},5:{font:{},small:A({},w(-.5)),medium:A({},w(-.5)),large:A({},w(-.5)),xlarge:A({},w(-.5))},6:{font:{},small:A({},w(-1)),medium:A({},w(-1)),large:A({},w(-1)),xlarge:A({},w(-1))}},responsiveBreakpoint:"small",weight:600},layer:{background:{dark:"black",light:"white"},border:{radius:"4px"},container:{zIndex:"20"},overlay:{background:"rgba(0, 0, 0, 0.5)"},responsiveBreakpoint:"small",zIndex:"20"},list:{item:{border:"horizontal",pad:{horizontal:"medium",vertical:"small"}}},maskedInput:{},menu:{icons:{down:s.FormDown}},meter:{color:"graph-0"},paragraph:{font:{},small:A({},w(-1)),medium:A({},w(0)),large:A({},w(1)),xlarge:A({},w(2)),xxlarge:A({},w(4))},radioButton:{border:{color:{dark:"rgba(255, 255, 255, 0.5)",light:"rgba(0, 0, 0, 0.15)"},width:"2px"},check:{radius:"100%"},hover:{border:{color:{dark:"white",light:"black"}}},icon:{},icons:{},gap:"small",size:t+"px",font:{},container:{}},radioButtonGroup:{},rangeInput:{track:{height:"4px",color:"border"},thumb:{}},rangeSelector:{background:{invert:{color:"light-4"}}},select:{clear:{container:{pad:"small",background:"background-contrast"},text:{color:"text-weak"}},container:{},control:{},icons:{margin:{horizontal:"small"},down:s.FormDown},options:{container:{align:"start",pad:"small"},text:{margin:"none"}},step:20},skipLinks:{position:"top",container:{elevation:"large",round:"small",pad:"medium"},label:{margin:{bottom:"medium"},size:"medium"}},tab:{active:{color:"text"},border:{side:"bottom",size:"small",color:{dark:"accent-1",light:"brand"},active:{color:{dark:"white",light:"black"}},disabled:{},hover:{color:{dark:"white",light:"black"}}},color:"control",hover:{color:{dark:"white",light:"black"}},margin:{vertical:"xxsmall",horizontal:"small"},pad:{bottom:"xsmall"}},tabs:{header:{},panel:{}},table:{header:{align:"start",pad:{horizontal:"small",vertical:"xsmall"},border:"bottom"},body:{align:"start",pad:{horizontal:"small",vertical:"xsmall"}},footer:{align:"start",pad:{horizontal:"small",vertical:"xsmall"},border:"top"}},text:{font:{},xsmall:A({},w(-1.5)),small:A({},w(-1)),medium:A({},w(0)),large:A({},w(1)),xlarge:A({},w(2)),xxlarge:A({},w(4)),"2xl":A({},w(4)),"3xl":A({},w(6)),"4xl":A({},w(9)),"5xl":A({},w(13)),"6xl":A({},w(18))},textArea:{},textInput:{},tip:{content:{background:"background-contrast",elevation:"small",margin:"xsmall",pad:{vertical:"xsmall",horizontal:"small"},round:"small"},drop:{align:{top:"bottom"}}},video:{captions:{background:"rgba(0, 0, 0, 0.7)"},icons:{closedCaption:o.ClosedCaption,configure:i.Actions,fullScreen:a.Expand,pause:h.Pause,play:p.Play,reduceVolume:y.VolumeLow,volume:g.Volume},scrubber:{color:"light-4"}},worldMap:{color:"light-3",continent:{active:"8px",base:"6px"},hover:{color:"light-4"},place:{active:"20px",base:"8px"}}});return Object(b.a)(x)}(24)},function(t,e,n){"use strict";e.__esModule=!0,e.Previous=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Previous=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Previous"},t),i.default.createElement("polyline",{fill:"none",stroke:"#000",strokeWidth:"2",points:"7 2 17 12 7 22",transform:"matrix(-1 0 0 1 24 0)"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.Next=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Next=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Next"},t),i.default.createElement("polyline",{fill:"none",stroke:"#000",strokeWidth:"2",points:"7 2 17 12 7 22"}))}},function(t,e,n){t.exports={CollectionActions:"CollectionActions-module__CollectionActions___2BvxN",shareButtons:"CollectionActions-module__shareButtons___2OBEZ",notice:"CollectionActions-module__notice___mCVu0"}},function(t,e,n){t.exports={CloseTrayButton:"CloseTrayButton-module__CloseTrayButton___XI8c9",isClosed:"CloseTrayButton-module__isClosed___2MsHq"}},function(t,e,n){t.exports={Quickstart:"Quickstart-module__Quickstart___usW9C",image:"Quickstart-module__image___1jZTa",textContent:"Quickstart-module__textContent___BVXxT"}},function(t,e,n){t.exports={OverlayView:"OverlayView-module__OverlayView___1Melv"}},function(t,e,n){t.exports={RecordActions:"RecordActions-module__RecordActions___NftXK",shareButtons:"RecordActions-module__shareButtons___1exc7",notice:"RecordActions-module__notice___3cscX"}},function(t,e,n){t.exports={FormFieldTaxonomyDropdown:"FormFieldTaxonomyDropdown-module__FormFieldTaxonomyDropdown___2Ubeb"}},function(t,e,n){t.exports={SearchResults:"SearchResults-module__SearchResults___MvXBS"}},function(t,e,n){t.exports={TrayOverview:"TrayOverview-module__TrayOverview___1e_Gk",isHidden:"TrayOverview-module__isHidden___SWd36",isVisible:"TrayOverview-module__isVisible___3cSB3",openTrayButton:"TrayOverview-module__openTrayButton___A48N9"}},function(t,e,n){t.exports={FavouritesList:"FavouritesList-module__FavouritesList___3Eo_5",favourite:"FavouritesList-module__favourite___WoJ0U",actions:"FavouritesList-module__actions___1PlIH",badge:"FavouritesList-module__badge___3ScjM"}},function(t,e,n){t.exports={ProjectView:"ProjectView-module__ProjectView___1ZTV2"}},function(t,e,n){t.exports={UserView:"UserView-module__UserView___1MgN3",logoImage:"UserView-module__logoImage___237k5"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(3),a=n.n(o),s=n(399),u=["id","highlighted","user","level","path"];function l(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}var c=function(t){var e=t.id,n=t.highlighted,r=t.user,o=t.level,a=void 0===o?0:o,c=t.path,f=l(t,u);return!e&&r&&(e=r.id),Object(s.default)({highlighted:n,path:c,level:a,user:r,id:e,baseUrl:"".concat("https://vector-tiles.humap.site","/rpc/user_points")}),i.a.createElement(i.a.Fragment,null,f.children)};c.propTypes={user:a.a.object,level:a.a.number.isRequired},c.defaultProps={level:0},e.default=c},function(t,e,n){t.exports={BaseNavigation:"BaseNavigation-module__BaseNavigation___3SA1h",isActive:"BaseNavigation-module__isActive___31qOB"}},function(t,e,n){t.exports={FeatureUsers:"FeatureUsers-module__FeatureUsers___jPsn3",admin:"FeatureUsers-module__admin___JkN8T"}},function(t,e,n){t.exports={InfoPanel:"InfoPanel-module__InfoPanel___T4GWr",wrap:"InfoPanel-module__wrap___2Cv-7",stats:"InfoPanel-module__stats___2OuRN"}},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return u}));var r=n(315),i=n(6),o=n(10);function a(t,e){return s(t,e)}function s(t,e){return(e=Array.isArray(e)?e:[e]).every((e=>l(t,e)))}function u(t){t.luma=t.luma||{},t.luma.caps=t.luma.caps||{};for(const e in r.b)void 0===t.luma.caps[e]&&(t.luma.caps[e]=l(t,e));return t.luma.caps}function l(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.b[e];let a;Object(o.a)(n,e);const s=Object(i.j)(t)&&n[1]||n[0];if("function"===typeof s)a=s(t);else if(Array.isArray(s)){a=!0;for(const e of s)a=a&&Boolean(t.getExtension(e))}else"string"===typeof s?a=Boolean(t.getExtension(s)):"boolean"===typeof s?a=s:Object(o.a)(!1);return a}(t,e)),t.luma.caps[e]||i.k.log(2,"Feature: ".concat(e," not supported"))(),t.luma.caps[e]}},function(t,e,n){"use strict";n.r(e);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:5825721.287490856};function o(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!h(t[0])||!h(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function s(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function u(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}function l(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function c(t){return t%360*Math.PI/180}function f(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return u(l(t,e),n)}function h(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function p(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")}function d(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}var m=function(t,e,n){void 0===n&&(n={});var r=p(t),i=p(e),o=c(i[1]-r[1]),a=c(i[0]-r[0]),s=c(r[1]),l=c(i[1]),f=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return u(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)};function g(t,e,n){if(null!==t)for(var r,i,o,a,s,u,l,c,f=0,h=0,p=t.type,d="FeatureCollection"===p,m="Feature"===p,y=d?t.features.length:1,v=0;v<y;v++){s=(c=!!(l=d?t.features[v].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var b=0;b<s;b++){var _=0,A=0;if(null!==(a=c?l.geometries[b]:l)){u=a.coordinates;var w=a.type;switch(f=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,h,v,_,A))return!1;h++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],h,v,_,A))return!1;h++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===e(u[r][i],h,v,_,A))return!1;h++}"MultiLineString"===w&&_++,"Polygon"===w&&A++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(A=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-f;o++){if(!1===e(u[r][i][o],h,v,_,A))return!1;h++}A++}_++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===g(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function y(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function v(t,e){y(t,(function(t,n,r,i,a){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(o(t,r,{bbox:i,id:a}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l];if(!1===e(o({type:s,coordinates:c},r),n,l))return!1}}))}function b(t,e){v(t,(function(t,n,r){var i=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,u=0,l=0,c=0;return!1!==g(t,(function(o,f,h,p,d){if(void 0===a||n>u||p>l||d>c)return a=o,u=n,l=p,c=d,void(i=0);var m=s([a,o],t.properties);if(!1===e(m,n,r,d,i))return!1;i++,a=o}))&&void 0}}}))}var _=function(t,e,n){void 0===n&&(n={});var i=p(t),o=p(e);o[0]+=o[0]-i[0]>180?-360:i[0]-o[0]>180?360:0;var a=function(t,e,n){var i=n=void 0===n?r:Number(n),o=t[1]*Math.PI/180,a=e[1]*Math.PI/180,s=a-o,u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var l=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?s/l:Math.cos(o);return Math.sqrt(s*s+c*c*u*u)*i}(i,o);return f(a,"meters",n.units)};function A(t,e){return t[0]*e[0]+t[1]*e[1]}function w(t,e,n){return"planar"===n.method?_(t,e,n):m(t,e,n)}e.default=function(t,e,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=a(t):"Point"===t.type?t=o(t):d(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=s(e):"LineString"===e.type?e=o(e):d(e,"LineString","line");var r=1/0,i=t.geometry.coordinates;return b(e,(function(t){var e=t.geometry.coordinates[0],o=t.geometry.coordinates[1],a=function(t,e,n,r){var i=[n[0]-e[0],n[1]-e[1]],o=A([t[0]-e[0],t[1]-e[1]],i);if(o<=0)return w(t,e,{method:r.method,units:"degrees"});var a=A(i,i);if(a<=o)return w(t,n,{method:r.method,units:"degrees"});var s=o/a,u=[e[0]+s*i[0],e[1]+s*i[1]];return w(t,u,{method:r.method,units:"degrees"})}(i,e,o,n);a<r&&(r=a)})),f(r,"degrees",n.units)}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchEmbedSnippetQuery",(function(){return o}));var r=n(21),i="\n    #graphql\n\n    query EmbedSnippet($id: Int!, $layout: String!, $type: String!) {\n        embedSnippet(id: $id, layout:$layout, type:$type) {\n            html\n        }\n    }\n",o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.request(i,t,e)}},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/wizard-pin-a3ece2e32b0982888c2f53aaa96e7fdc.png"},function(t,e,n){t.exports={OverlayPopoverDataRow:"OverlayPopoverDataRow-module__OverlayPopoverDataRow___ZbuJ1"}},function(t,e,n){t.exports={OverlayPopoverData:"OverlayPopoverData-module__OverlayPopoverData___1_r_J"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(398),a=n(1051),s=n.n(a),u=n(1136),l=n(223),c=n(436),f=n(443),h=n(17),p=n(1045),d=Object(o.deepMerge)(f.default,{global:{spacing:"12px",colors:{focus:{dark:"#444444",light:"#CCCCCC"}},font:{family:!1,size:!1,height:!1},breakpoints:{small:{value:640},medium:!1,large:!1,smallMobile:{value:480},mobile:{value:767},tablet:{value:1024},desktop:{value:1680},wide:{value:1e4}},input:{weight:400}},rangeInput:{track:{height:"2px"},thumb:{}}});e.default=function(t){var e=t.children,n=Object(h.useStore)(),o=n.setLayoutRef;n.layoutRef;return Object(r.useEffect)((function(){}),[]),i.a.createElement(i.a.Fragment,null,i.a.createElement(p.default,null),i.a.createElement(u.a,{full:!0,theme:d},i.a.createElement(l.a.Consumer,null,(function(t){return i.a.createElement(c.a,{direction:"row",flex:!0,fill:!0,overflow:"auto",className:s.a.Layout,ref:o,"data-responsivecontext":t},e)}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function i(t){return i="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},i(t)}function o(t){return a(t,[])}function a(t,e){switch(i(t)){case"string":return JSON.stringify(t);case"function":return t.name?"[function ".concat(t.name,"]"):"[function]";case"object":return null===t?"null":function(t,e){if(-1!==e.indexOf(t))return"[Circular]";var n=[].concat(e,[t]),i=function(t){var e=t[String(r)];if("function"===typeof e)return e;if("function"===typeof t.inspect)return t.inspect}(t);if(void 0!==i){var o=i.call(t);if(o!==t)return"string"===typeof o?o:a(o,n)}else if(Array.isArray(t))return function(t,e){if(0===t.length)return"[]";if(e.length>2)return"[Array]";for(var n=Math.min(10,t.length),r=t.length-n,i=[],o=0;o<n;++o)i.push(a(t[o],e));1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(t,n);return function(t,e){var n=Object.keys(t);if(0===n.length)return"{}";if(e.length>2)return"["+function(t){var e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if("Object"===e&&"function"===typeof t.constructor){var n=t.constructor.name;if("string"===typeof n&&""!==n)return n}return e}(t)+"]";var r=n.map((function(n){return n+": "+a(t[n],e)}));return"{ "+r.join(", ")+" }"}(t,n)}(t,e);default:return String(t)}}function s(t){var e=t.prototype.toJSON;"function"===typeof e||function(t,e){if(!Boolean(t))throw new Error(null!=e?e:"Unexpected invariant triggered.")}(0),t.prototype.inspect=e,r&&(t.prototype[r]=e)}function u(t){return null!=t&&"string"===typeof t.kind}s(function(){function t(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}return t.prototype.toJSON=function(){return{start:this.start,end:this.end}},t}()),s(function(){function t(t,e,n,r,i,o,a){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}return t.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},t}());var l={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},c=Object.freeze({});function f(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,r=void 0,i=Array.isArray(t),a=[t],s=-1,f=[],p=void 0,d=void 0,m=void 0,g=[],y=[],v=t;do{var b=++s===a.length,_=b&&0!==f.length;if(b){if(d=0===y.length?void 0:g[g.length-1],p=m,m=y.pop(),_){if(i)p=p.slice();else{for(var A={},w=0,x=Object.keys(p);w<x.length;w++){var E=x[w];A[E]=p[E]}p=A}for(var O=0,S=0;S<f.length;S++){var P=f[S][0],C=f[S][1];i&&(P-=O),i&&null===C?(p.splice(P,1),O++):p[P]=C}}s=r.index,a=r.keys,f=r.edits,i=r.inArray,r=r.prev}else{if(d=m?i?s:a[s]:void 0,null===(p=m?m[d]:v)||void 0===p)continue;m&&g.push(d)}var T,k=void 0;if(!Array.isArray(p)){if(!u(p))throw new Error("Invalid AST Node: ".concat(o(p),"."));var I=h(e,p.kind,b);if(I){if((k=I.call(e,p,d,m,g,y))===c)break;if(!1===k){if(!b){g.pop();continue}}else if(void 0!==k&&(f.push([d,k]),!b)){if(!u(k)){g.pop();continue}p=k}}}if(void 0===k&&_&&f.push([d,p]),b)g.pop();else r={inArray:i,index:s,keys:a,edits:f,prev:r},a=(i=Array.isArray(p))?p:null!==(T=n[p.kind])&&void 0!==T?T:[],s=-1,f=[],m&&y.push(m),m=p}while(void 0!==r);return 0!==f.length&&(v=f[f.length-1][1]),v}function h(t,e,n){var r=t[e];if(r){if(!n&&"function"===typeof r)return r;var i=n?r.leave:r.enter;if("function"===typeof i)return i}else{var o=n?t.leave:t.enter;if(o){if("function"===typeof o)return o;var a=o[e];if("function"===typeof a)return a}}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(1025),u=n.n(s),l=n(102);e.default=Object(o.a)((function(t){var e=t.collection;if(!e)return null;var n=!1;return e.items.results.length&&(n=e.items.results.length>0?Object(l.getPath)(e.items.results[0]):"/"),i.a.createElement("div",{className:u.a.CollectionBoothIIIFLink},n&&i.a.createElement(a.a,{className:"button",to:n},"Open first notebook item"))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(7),s=n(17),u=n(18),l=n(211),c=n.n(l),f=n(739),h=n(223);e.default=Object(a.a)((function(){var t=Object(u.hasFeature)("ugc"),e=Object(u.hasFeature)("overlays"),n=Object(u.hasFeature)("trails"),r=Object(u.hasFeature)("i18n"),a=Object(u.hasFeature)("pagemaker_site_header_for_map"),l=Object(s.useStore)(),p=l.unlockPoints,d=(l.searchResults,l.siteMeta.tray_links),m=l.uiSettings,g=m.trayVisible,y=m.overflowToolbarVisible,v=m.setOverflowToolbarVisible,b=function(){y||v(!0)},_=function(t){var e=t.isCurrent,n=t.isPartiallyCurrent,r=t.href;if(e||n&&"/map"!=r)return{"data-current":"current"}},A=function(t){var e=t.name,n=t.url,r=t.external,a=I18n.t(e),s=e+"Button";return r?i.a.createElement("a",{href:n,title:a,className:c.a[s]},i.a.createElement("span",null,i.a.createElement("span",null,a))):i.a.createElement(o.a,{className:c.a[s],to:n,title:a,getProps:_,onClick:p,state:{fromToolbar:!0}},i.a.createElement("span",null,i.a.createElement("span",null,a)))};return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"".concat(c.a.Toolbar," ").concat(g?c.a.isOpen:c.a.isClosed," ").concat(a?c.a.hasPagemakerSiteHeaderForMap:"")},i.a.createElement("div",{className:c.a.wrap},i.a.createElement(f.default,{logoName:"map",width:120}),i.a.createElement("ul",null,d.includes("intro")&&i.a.createElement("li",null,i.a.createElement(A,{name:"intro",url:"/map"})),d.includes("browse")&&i.a.createElement("li",null,i.a.createElement(A,{name:"browse",url:"/map/browse"})),d.includes("search")&&i.a.createElement("li",null,i.a.createElement(A,{name:"search",url:"/map/search"})),e&&d.includes("overlays")&&i.a.createElement("li",null,i.a.createElement(A,{name:"overlays",url:"/map/overlays"})),n&&d.includes("trails")&&i.a.createElement("li",null,i.a.createElement(A,{name:"trails",url:"/map/trails"})),t&&d.includes("contribute")&&i.a.createElement(i.a.Fragment,null,i.a.createElement("li",null,Object(u.userIsSignedIn)()&&i.a.createElement(A,{name:"contribute",url:"/map/contribute"}),!Object(u.userIsSignedIn)()&&i.a.createElement(A,{name:"contribute",url:"/users/sign_in?return_to=/map/contribute",external:!0}))),i.a.createElement(h.a.Consumer,null,(function(t){return"smallMobile"===t||"small"===t||"mobile"===t||"tablet"===t?i.a.createElement(i.a.Fragment,null,(d.includes("help")||r&&d.includes("language"))&&i.a.createElement("li",{className:c.a.mobileOverflowMenuItem},i.a.createElement("a",{className:c.a.overflowButton,onClick:b},i.a.createElement("span",null,i.a.createElement("span",null,"More"))))):i.a.createElement(i.a.Fragment,null,d.includes("language")&&i.a.createElement("li",{className:c.a.lowerItem},i.a.createElement(A,{name:"language",url:"/map/language"})),d.includes("help")&&i.a.createElement("li",{className:c.a.lowerItem},i.a.createElement(A,{name:"help",url:"/map/help"})))}))))))}))},function(t,e,n){"use strict";n.r(e),n.d(e,"IntroductionIndexTrayOverview",(function(){return b}));var r=n(0),i=n.n(r),o=n(30),a=n(7),s=n(17),u=n(77),l=n(456),c=n.n(l),f=n(746),h=n(148),p=n(748),d=n(63),m=n(70),g=n(127),y=n(1049),v=n(78),b=Object(a.a)((function(t){var e=Object(s.useStore)().introductionTrayView;return e?i.a.createElement("div",{className:c.a.IntroductionIndexTrayOverview},i.a.createElement("h1",null,e.title),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.sanitised_content}})):i.a.createElement(i.a.Fragment,null)}));e.default=Object(a.a)((function(){var t=Object(s.useStore)(),e=t.adjustLayoutScroll,n=t.introductionTrayView;if(!n)return i.a.createElement(i.a.Fragment,null);Object(u.useParentContext)({clear:!0}),Object(r.useEffect)((function(){e("top")}),[]);return i.a.createElement("div",{className:c.a.IntroductionIndex},i.a.createElement(v.default,{title:n.title,appendSiteDescription:!0}),i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(d.default,null,i.a.createElement(m.default,null,i.a.createElement("h1",null,n.title)),i.a.createElement(g.default,null,i.a.createElement("div",{className:c.a.introductionText,dangerouslySetInnerHTML:{__html:n.sanitised_content}})),n.hasTaxonomies&&i.a.createElement(g.default,null,i.a.createElement("h2",null,n.taxonomies_title),i.a.createElement("p",{dangerouslySetInnerHTML:{__html:n.taxonomies_description}}),i.a.createElement(f.default,{terms:n.taxonomy_terms})),n.hasRecords&&i.a.createElement(g.default,null,i.a.createElement("h2",null,n.records_title),i.a.createElement("div",{className:c.a.records},i.a.createElement(h.default,null,i.a.createElement(y.default,{type:["record"],ids:n.record_ids.toJSON(),limit:n.record_ids.length})))),n.hasQuickStarts&&i.a.createElement(g.default,null,i.a.createElement("h2",null,n.quick_starts_title),i.a.createElement("p",{dangerouslySetInnerHTML:{__html:n.quick_starts_description}}),n.quick_starts.map((function(t){return i.a.createElement(p.default,Object.assign({key:"quick-start-".concat(t.id)},t))})))))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1137),a=n(71),s=n(109),u=n(7),l=n(17),c=n(14),f=n(200),h=n(327),p=n.n(h),d=n(54),m=n(750),g=n(751),y=n(752),v=n(753),b=n(754),_=n(755);function A(t){return function(t){if(Array.isArray(t))return 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)return;if("string"===typeof t)return w(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 w(t,e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(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 x=i.a.forwardRef((function(t,e){var n=t.attachments,o=(t.attachmentNumber,t.recordSlug),a=t.loading,s=i.a.createRef(),u=Object(c.g)(),l=Object(f.debounce)((function(){var t=Array.from(document.querySelectorAll("[data-attachment-index]")).map((function(t){return t.getBoundingClientRect().top})),e=A(t.filter((function(t){return t>=0}))),n=e[0],r=(e.slice(1),t.indexOf(n));u("/map/records/".concat(o,"/gallery/").concat(r+1),{replace:!0})}),250);return Object(r.useLayoutEffect)((function(){if(s.current&&"true"!==document.body.dataset.hasScrollEvent)return document.body.dataset.hasScrollEvent="true",document.body.addEventListener("scroll",l,!0),function(){document.body.dataset.hasScrollEvent="false",document.body.removeEventListener("scroll",l,!0)}})),a?i.a.createElement(d.default,null):i.a.createElement("div",{ref:s},n.map((function(t,n){switch(t.type){case"image":return i.a.createElement(m.default,Object.assign({},t,{ref:function(t){return e.current[n]=t},key:"attachment-image-".concat(t.id),index:n}));case"video_embed":return i.a.createElement(g.default,Object.assign({},t,{ref:function(t){return e.current[n]=t},key:"attachment-video-embed-".concat(t.id),index:n}));case"audio_embed":return i.a.createElement(y.default,Object.assign({},t,{ref:function(t){return e.current[n]=t},key:"attachment-audio-embed-".concat(t.id),index:n}));case"iiif_embed":return i.a.createElement(v.default,Object.assign({},t,{ref:function(t){return e.current[n]=t},key:"attachment-iiif-embed-".concat(t.id),index:n}));case"street_view_overlay":return i.a.createElement(b.default,Object.assign({},t,{ref:function(t){return e.current[n]=t},key:"attachment-street-view-overlay-".concat(t.id),index:n}));case"sketchfab_embed":return i.a.createElement(_.default,Object.assign({},t,{ref:function(t){return e.current[n]=t},key:"attachment-sketchfab-embed-".concat(t.id),index:n}));default:return}})))}));e.default=Object(u.a)((function(t){var e=t.number,n=Object(l.useStore)(),u=n.record,f=n.loading,h=Object(r.useRef)([]),m=Object(r.useRef)([]),g=Object(c.g)(),y=parseInt(e||1);if(!u&&f.isLoading)return i.a.createElement(d.default,null);var v=function(){g("/map/records/".concat(u.slug))},b=1===u.allAttachments.length?"item":"items",_=function(t){g("/map/records/".concat(u.slug,"/gallery/").concat(t));var e=h.current[t-1].offsetTop;m.current.scrollTop=e};return i.a.createElement(o.a,{full:!0,plain:!0,animation:"fadeIn",onClickOutside:v,margin:"0"},i.a.createElement("div",{className:p.a.MediaGallery,ref:m},i.a.createElement("div",{className:p.a.header},i.a.createElement("div",{className:p.a.title},i.a.createElement("h1",null,i.a.createElement("span",null,I18n.t("gallery"))," ",u.name)),!u.attachmentsAreLoading&&i.a.createElement("div",{className:p.a.controls},i.a.createElement("div",{className:p.a.count},e," / ",u.allAttachments.length," ",i.a.createElement("span",null,b)),u.allAttachments.length>1&&i.a.createElement(i.a.Fragment,null,i.a.createElement("button",{onClick:function(){_(y>1?y-1:1)},title:"Previous",disabled:y<=1},i.a.createElement(a.a,{icon:s.b})),i.a.createElement("button",{onClick:function(){_(y+1)},title:"Next",disabled:y>=u.allAttachments.length},i.a.createElement(a.a,{icon:s.a})))),i.a.createElement("button",{className:p.a.close,onClick:v,dangerouslySetInnerHTML:{__html:I18n.t("components.media_gallery.close_gallery")}})),i.a.createElement("div",{className:p.a.mediaItems},i.a.createElement(x,{attachmentNumber:y||1,attachments:u.allAttachments,loading:u.attachmentsAreLoading,recordSlug:u.slug,ref:h}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(71),s=n(109),u=n(1062),l=n.n(u);e.default=Object(o.a)((function(t){var e=t.customFields;if(!e||!e.identifier)return null;var n="/iiif_page/".concat(encodeURIComponent(e.identifier)).concat(e.first_iiif_page?"/".concat(e.first_iiif_page):"");return i.a.createElement("div",{className:l.a.RecordBoothIIIFLink},i.a.createElement("a",{href:n},i.a.createElement(a.a,{icon:s.c})," Open in notebook"))}))},function(t,e,n){"use strict";n.r(e),n.d(e,"RecordViewDetail",(function(){return G})),n.d(e,"RecordViewTrayOverview",(function(){return H}));var r=n(0),i=n.n(r),o=n(7),a=n(17),s=n(14),u=n(18),l=n(1067),c=(n(154),n(558)),f=n(77),h=n(374),p=n.n(h),d=n(339),m=n(772),g=n(193),y=n(770),v=n(194),b=n(63),_=n(54),A=n(70),w=n(127),x=n(771),E=n(765),O=n(764),S=n(769),P=n(768),C=n(471),T=n(78),k=n(283),I=n(431),L=n(252),j=n(773),M=n(767),R=n(202),N=n(620),D=n(766),F=["record"];function B(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||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)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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}function U(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}var G=Object(o.a)((function(t){var e,n=t.record,r=U(t,F);if(Object(u.hasFeature)("booth_map_features")){var o=Object(l.getNotebookCollectionSlug)(n.name);e=Object(f.useParentContext)({currentItem:n,setTo:o})}else e=Object(f.useParentContext)({currentItem:n});Object(c.default)(null!==n&&void 0!==n&&n.associated_overlay_group_slug?n:e||null);Object(u.hasFeature)("projects");var a=Object(u.hasFeature)("routes"),s=Object(u.hasFeature)("timelines"),h=Object(u.hasFeature)("activity_logs"),v=Object(u.hasFeature)("commento"),_=Object(u.hasFeature)("keyword_links");return i.a.createElement("div",{className:p.a.RecordView},i.a.createElement(T.default,{title:n.name,description:n.sanitised_content}),i.a.createElement(b.default,null,r.children,!!e&&i.a.createElement(i.a.Fragment,null,i.a.createElement(k.default,null),(a||s)&&(e.isRoute||e.isTimeline)&&i.a.createElement(I.default,{entity:e,currentItem:n})),i.a.createElement("div",{className:p.a.trayHeader},i.a.createElement(g.default,null,I18n.t("close_record")),i.a.createElement(A.default,null,i.a.createElement("h1",null,n.name)),i.a.createElement(q,{record:n})),i.a.createElement(x.default,{record:n}),n.sanitised_content&&i.a.createElement(w.default,{layoutType:"centred"},i.a.createElement(y.default,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:n.sanitised_content}}))),n.terms.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,I18n.t("components.records.record_view.title")),i.a.createElement(d.default,{terms:n.terms})),i.a.createElement(P.default,{record:n}),_&&i.a.createElement(M.default,{record:n}),n.allAttachments.length>1&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,I18n.t("gallery")),i.a.createElement(m.default,{recordId:n.slug,attachments:n.allAttachments.slice(1),loading:n.attachmentsAreLoading})),n.attributions.length>0&&i.a.createElement("div",null,i.a.createElement("h2",null,I18n.t("components.records.record_view.attributions")),i.a.createElement("ul",{className:p.a.sourcesList},n.attributions.map((function(t,e){return i.a.createElement("li",{key:"record-attribution-".concat(e),dangerouslySetInnerHTML:{__html:t}})})))),v&&i.a.createElement(j.default,{record:n}),Object(u.hasFeature)("booth_map_features")&&i.a.createElement(N.default,{customFields:n.custom_fields}),i.a.createElement(E.default,{record:n}),i.a.createElement(S.default,{record:n}),h&&i.a.createElement(L.default,{item:n,showActivityLog:!0}),i.a.createElement(O.default,{record:n}),n.hasCTA&&i.a.createElement(C.default,{title:n.cta.title,buttonText:n.cta.button_text,description:n.cta.description,url:n.cta.url})))})),V=function(t){var e=Object(a.useStore)(),n=(e.setCollectionSlug,e.parentContext,e.parentContext.pending,e.fetchCollection,e.setRecordSlug),o=e.record,s=e.loading;return Object(r.useEffect)((function(){n(t.recordId)})),!o&&s.isLoading?i.a.createElement(b.default,null,i.a.createElement(k.default,null),i.a.createElement(_.default,null)):s.didFail?i.a.createElement(b.default,null,i.a.createElement(R.default,{contentType:"record",viewType:"item"})):o?i.a.createElement(G,{record:o},t.children):i.a.createElement(i.a.Fragment,null)};V.defaultProps={afterResourceLoadedCallback:function(){}};var q=function(t){var e=t.record,n=Object(u.hasFeature)("ugc");return i.a.createElement(v.default,{title:I18n.t("record")},n&&e.user&&i.a.createElement("span",null,I18n.t("by")," ",i.a.createElement(s.a,{to:"/map/contribute/user/".concat(e.user.id)},e.user.name)),e.dateRange&&e.dateRange.length>0&&i.a.createElement("span",{className:p.a.date},e.dateRange.join(" - ")))},H=Object(o.a)((function(t){var e=Object(a.useStore)().record,n=B(Object(r.useState)(null),2),o=n[0],s=n[1];Object(r.useEffect)((function(){e&&s(e)}),[e]);var l=e||o;return l?i.a.createElement("div",{className:p.a.RecordViewTrayOverview},!!parent&&i.a.createElement(k.default,null),i.a.createElement(q,{record:l}),i.a.createElement("h1",null,l.name),l.terms.length>0&&i.a.createElement(d.default,{terms:l.terms}),i.a.createElement("article",{dangerouslySetInnerHTML:{__html:l.excerpt}}),Object(u.hasFeature)("booth_map_features")&&i.a.createElement(i.a.Fragment,null,i.a.createElement(D.default,null),i.a.createElement(N.default,{customFields:l.custom_fields})),i.a.createElement("button",{className:p.a.openTrayButton,onClick:function(){return setTrayVisible(!trayVisible)}},I18n.t("open_tray_to_read_in_full"))):i.a.createElement(i.a.Fragment,null)}));e.default=Object(o.a)(V)},function(t,e,n){"use strict";n.r(e);n(0);var r=n(363),i=n(145),o=n(268),a=n(270);function s(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 u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("raster"===t.layer_type){var n={id:"layer-".concat(t.id),opacity:t.opacity,data:t.url,tileSize:256,maxRequests:20,pickable:!1,minZoom:t.min_zoom,maxZoom:t.max_zoom,renderSubLayers:function(t){var e=t.tile.bbox,n=e.west,i=e.south,o=e.east,a=e.north;return[new r.a(t,{data:null,image:t.data,bounds:[n,i,o,a]})]},onTileError:function(t){}};return new i.a(n)}if("vector"===t.layer_type){var s=u({id:"layer-".concat(t.id),data:t.url,opacity:t.opacity,pickable:!0,minZoom:t.min_zoom,maxZoom:t.max_zoom,filled:t.fill_polygons,getRenderedFeatures:function(t){return console.info(t)},getLineWidth:1,lineWidthUnits:"meters",lineWidthMinPixels:1,getLineColor:Object(a.hexToRGB)(t.layer_color),getFillColor:function(e){if(t.custom_coloring&&Object.keys(t.custom_coloring).length>0){var n=Object.keys(t.custom_coloring)[0],r=t.custom_coloring[n],i=e.properties[n];return Object(a.hexToRGB)(r[i]||t.layer_color)}return Object(a.hexToRGB)(t.layer_color)},getPointRadius:2,pointRadiusUnits:"meters",onTileError:function(t){}},e);return new o.a(s)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(624),a=n(1114),s=n.n(a);e.default=function(t){var e=t.feature;return e.completed_by||e.validated_by?i.a.createElement("div",{className:s.a.FeatureMetadata},e.completed_by&&i.a.createElement(o.default,{label:"Completed by",value:e.completed_by}),e.validated_by&&i.a.createElement(o.default,{label:"Validated by",value:e.validated_by})):i.a.createElement(i.a.Fragment,null)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1113),a=n.n(o);e.default=function(t){var e=t.label,n=t.value;return i.a.createElement("div",{className:a.a.FeatureMetadataRow},i.a.createElement("h4",null,e),i.a.createElement("p",null,n))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(810),u=n(380),l=n.n(u);n(610);function c(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(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 f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(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}e.default=Object(o.a)((function(t){var e=t.setIsShowingShareOptions,n=Object(a.useStore)().place,o=n.currentGridSquare,u=n.currentFeatureLayer.activeFeature,f=c(Object(r.useState)(),2),h=f[0],p=f[1],d=c(Object(r.useState)(),2),m=d[0],g=d[1],y=c(Object(r.useState)(null),2),v=y[0],b=y[1],_=c(Object(r.useState)(null),2),A=_[0],w=_[1];Object(r.useEffect)((function(){!function(){if(window.self===window.top){var t=new URL(window.location.toString());b(t.href),t.searchParams.set("feature_id",u.id),w(t.href)}else Object(s.default)({type:"getCurrentUrl"}),document.addEventListener("Placemaker.currentUrl",(function(t){var e=new URL(t.detail);e.hash="square-".concat(o.id),b(e.href),e.hash="feature-".concat(u.id),w(e.href)}),{once:!0})}()}),[]);return i.a.createElement("div",{className:l.a.FeatureSharePanel},i.a.createElement("header",null,i.a.createElement("h2",null,I18n.t("share")),i.a.createElement("button",{className:l.a.done,onClick:function(t){t.preventDefault(),e(!1)}},I18n.t("done"))),A&&i.a.createElement("div",null,i.a.createElement("h5",null,I18n.t("embeds.link_to_feature")),i.a.createElement("div",{className:l.a.url,contentEditable:!0},A),h&&i.a.createElement("span",{className:l.a.copyResponseFeature},h),i.a.createElement("button",{onClick:function(t){t.preventDefault(),navigator.clipboard&&window.isSecureContext?window.navigator.clipboard.writeText(A).then((function(){p(I18n.t("embeds.copied_to_clipboard"))})):p(I18n.t("embeds.clipboard_error"))}},I18n.t("embeds.copy_to_clipboard"))),v&&i.a.createElement("div",null,i.a.createElement("h5",null,I18n.t("embeds.link_to_square")),i.a.createElement("div",{className:l.a.url,contentEditable:!0},v),m&&i.a.createElement("span",{className:l.a.copyResponseSquare},m),i.a.createElement("button",{onClick:function(t){t.preventDefault(),navigator.clipboard&&window.isSecureContext?window.navigator.clipboard.writeText(v).then((function(){g(I18n.t("embeds.copied_to_clipboard"))})):g(I18n.t("embeds.clipboard_error"))}},I18n.t("embeds.copy_to_clipboard"))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1116),s=n.n(a);e.default=Object(o.a)((function(t){return i.a.createElement("div",{className:s.a.FeaturePopoverContainer},t.children)}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(7),s=n(43),u=n(265),l=n(1130),c=n.n(l),f=n(341),h=n(333),p=n(334),d=n(227),m=n(653),g=n(195),y=n(253);function v(){v=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function b(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function _(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){b(o,r,i,a,s,"next",t)}function s(t){b(o,r,i,a,s,"throw",t)}a(void 0)}))}}e.default=Object(a.a)((function(t){var e=Object(s.useStore)(),n=e.place,a=e.drawingMode.setEnabledTool;Object(r.useEffect)((function(){function e(){return(e=_(v().mark((function e(){var r;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(u.fetchAllFeatures)({feature_layer_id:n.currentFeatureLayer.id});case 3:r=e.sent,n.currentFeatureLayer.setFeatures(r.features),t.id&&n.currentFeatureLayer.showFeaturesForUser(t.id),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.error("Error fetching data:",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}return function(){e.apply(this,arguments)}(),function(){n.currentFeatureLayer.setFeatures([])}}),[t.id]);var l=[{label:I18n.t("placemaker.components.grid.square.inspect_tools"),tools:[{label:I18n.t("placemaker.components.grid.square.inspect"),mode:"inspect"},{label:I18n.t("placemaker.components.grid.square.measure"),mode:"measure"}]}];return a({mode:"inspect"}),n&&n.currentFeatureLayer.features?i.a.createElement("div",{className:c.a.SearchByUser},i.a.createElement(d.default,null),i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}},i.a.createElement(g.default,null,i.a.createElement(y.default,null,i.a.createElement("h1",null,"Search by user"),i.a.createElement("p",null,"Search for a user, or click the links in the popover to see all content by that user. Bear in mind that users are associated with any features that they touch at all - they may not be primarily responsive for drawing it.")),i.a.createElement(m.default,null),i.a.createElement(p.default,{layers:n.visibleFeatureLayers}),i.a.createElement(h.default,{layersCollection:n.referenceLayers})))),i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}},i.a.createElement(f.default,{tools:l})))):i.a.createElement(i.a.Fragment,null)}))},function(t,e,n){"use strict";var r=n(0),i=n(3),o=n.n(i),a=n(827),s=n.n(a),u=n(49),l=n(39),c=n(40),f=n(134),h=n(94),p=n(84),d=n(58),m=n(20),g=n(33);function y(t,e){var n=g.n([],e,t);return g.k(n,n,1/n[3]),n}var v=n(13),b=n(26),_=n(23);function A(t,e){if(!t)throw new Error(e||"viewport-mercator-project: assertion failed.")}var w=Math.PI,x=w/4,E=w/180,O=180/w,S=4003e4;function P(t){return Math.pow(2,t)}function C(t,e){var n=Object(m.a)(t,2),r=n[0],i=n[1];A(Number.isFinite(r)&&Number.isFinite(e)),A(Number.isFinite(i)&&i>=-90&&i<=90,"invalid latitude");var o=i*E;return[(e*=512)*(r*E+w)/(2*w),e*(w-Math.log(Math.tan(x+.5*o)))/(2*w)]}function T(t,e){var n=Object(m.a)(t,2),r=n[0],i=n[1],o=r/(e*=512)*(2*w)-w,a=2*(Math.atan(Math.exp(w-i/e*(2*w)))-x);return[o*O,a*O]}function k(t){var e=t.latitude,n=t.longitude,r=t.zoom,i=t.scale,o=t.highPrecision,a=void 0!==o&&o;i=void 0!==i?i:P(r),A(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(i));var s={},u=512*i,l=Math.cos(e*E),c=u/360,f=c/l,h=u/S/l;if(s.pixelsPerMeter=[h,-h,h],s.metersPerPixel=[1/h,-1/h,1/h],s.pixelsPerDegree=[c,-f,h],s.degreesPerPixel=[1/c,-1/f,1/h],a){var p=E*Math.tan(e*E)/l,d=c*p/2,m=u/S*p,g=m/f*h;s.pixelsPerDegree2=[0,-d,m],s.pixelsPerMeter2=[g,0,g]}return s}function I(t){var e=t.height,n=t.pitch,r=t.bearing,i=t.altitude,o=t.center,a=void 0===o?null:o,s=t.flipY,u=void 0!==s&&s,l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return v.p(l,l,[0,0,-i]),v.o(l,l,[1,1,1/e]),v.l(l,l,-n*E),v.n(l,l,r*E),u&&v.o(l,l,[1,-1,1]),a&&v.p(l,l,_.l([],a)),l}function L(t){var e=t.width,n=t.height,r=t.pitch,i=function(t){var e=t.width,n=t.height,r=t.altitude,i=void 0===r?1.5:r,o=t.pitch,a=void 0===o?0:o,s=t.nearZMultiplier,u=void 0===s?1:s,l=t.farZMultiplier,c=void 0===l?1:l,f=a*E,h=Math.atan(.5/i),p=Math.sin(h)*i/Math.sin(Math.PI/2-f-h),d=Math.cos(Math.PI/2-f)*p+i;return{fov:2*Math.atan(n/2/i),aspect:e/n,focalDistance:i,near:u,far:d*c}}({width:e,height:n,altitude:t.altitude,pitch:r,nearZMultiplier:t.nearZMultiplier,farZMultiplier:t.farZMultiplier}),o=i.fov,a=i.aspect,s=i.near,u=i.far;return v.j([],o,a,s,u)}function j(t,e){var n=Object(m.a)(t,3),r=n[0],i=n[1],o=n[2],a=void 0===o?0:o;return A(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)),y(e,[r,i,a,1])}function M(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(m.a)(t,3),i=r[0],o=r[1],a=r[2];if(A(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a)){var s=y(e,[i,o,a,1]);return s}var u=y(e,[i,o,0,1]),l=y(e,[i,o,1,1]),c=u[2],f=l[2],h=c===f?0:((n||0)-c)/(f-c);return b.c([],u,l,h)}var R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],N=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width,r=e.height,i=e.viewMatrix,o=void 0===i?R:i,a=e.projectionMatrix,s=void 0===a?R:a;Object(l.a)(this,t),this.width=n||1,this.height=r||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=o,this.projectionMatrix=s;var u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];v.h(u,u,this.projectionMatrix),v.h(u,u,this.viewMatrix),this.viewProjectionMatrix=u;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];v.o(c,c,[this.width/2,-this.height/2,1]),v.p(c,c,[1,-1,0]),v.h(c,c,this.viewProjectionMatrix);var f=v.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c);if(!f)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=c,this.pixelUnprojectionMatrix=f,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)}return Object(c.a)(t,[{key:"equals",value:function(e){return e instanceof t&&(e.width===this.width&&e.height===this.height&&v.b(e.projectionMatrix,this.projectionMatrix)&&v.b(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=this.projectPosition(t),o=j(i,this.pixelProjectionMatrix),a=Object(m.a)(o,2),s=a[0],u=a[1],l=r?u:this.height-u;return 2===t.length?[s,l]:[s,l,o[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=e.targetZ,o=Object(m.a)(t,3),a=o[0],s=o[1],u=o[2],l=r?s:this.height-s,c=i&&i*this.pixelsPerMeter,f=M([a,l,u],this.pixelUnprojectionMatrix,c),h=this.unprojectPosition(f),p=Object(m.a)(h,3),d=p[0],g=p[1],y=p[2];return Number.isFinite(u)?[d,g,y]:Number.isFinite(i)?[d,g,i]:[d,g]}},{key:"projectPosition",value:function(t){var e=this.projectFlat(t),n=Object(m.a)(e,2);return[n[0],n[1],(t[2]||0)*this.pixelsPerMeter]}},{key:"unprojectPosition",value:function(t){var e=this.unprojectFlat(t),n=Object(m.a)(e,2);return[n[0],n[1],(t[2]||0)/this.pixelsPerMeter]}},{key:"projectFlat",value:function(t){arguments.length>1&&void 0!==arguments[1]||this.scale;return t}},{key:"unprojectFlat",value:function(t){arguments.length>1&&void 0!==arguments[1]||this.scale;return t}}]),t}();function D(t){var e=t.width,n=t.height,r=t.bounds,i=t.padding,o=void 0===i?0:i,a=t.offset,s=void 0===a?[0,0]:a,u=Object(m.a)(r,2),l=Object(m.a)(u[0],2),c=l[0],f=l[1],h=Object(m.a)(u[1],2),p=h[0],d=h[1];if(Number.isFinite(o)){o={top:o,bottom:o,left:o,right:o}}else A(Number.isFinite(o.top)&&Number.isFinite(o.bottom)&&Number.isFinite(o.left)&&Number.isFinite(o.right));var g=new F({width:e,height:n,longitude:0,latitude:0,zoom:0}),y=g.project([c,d]),v=g.project([p,f]),b=[Math.abs(v[0]-y[0]),Math.abs(v[1]-y[1])],_=[e-o.left-o.right-2*Math.abs(s[0]),n-o.top-o.bottom-2*Math.abs(s[1])];A(_[0]>0&&_[1]>0);var w=_[0]/b[0],x=_[1]/b[1],E=(o.right-o.left)/2/w,O=(o.bottom-o.top)/2/x,S=[(v[0]+y[0])/2+E,(v[1]+y[1])/2+O],P=g.unproject(S),C=g.zoom+Math.log2(Math.abs(Math.min(w,x)));return{longitude:P[0],latitude:P[1],zoom:C}}var F=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.width,i=n.height,o=n.latitude,a=void 0===o?0:o,s=n.longitude,u=void 0===s?0:s,c=n.zoom,p=void 0===c?0:c,m=n.pitch,g=void 0===m?0:m,y=n.bearing,v=void 0===y?0:y,b=n.altitude,_=void 0===b?1.5:b,A=n.nearZMultiplier,w=n.farZMultiplier;Object(l.a)(this,e),r=r||1,i=i||1;var x=P(p);_=Math.max(.75,_);var E=C([u,a],x);E[2]=0;var O=L({width:r,height:i,pitch:g,bearing:v,altitude:_,nearZMultiplier:A||1/i,farZMultiplier:w||1.01}),S=I({height:i,center:E,pitch:g,bearing:v,altitude:_,flipY:!0});return(t=Object(f.a)(this,Object(h.a)(e).call(this,{width:r,height:i,viewMatrix:S,projectionMatrix:O}))).latitude=a,t.longitude=u,t.zoom=p,t.pitch=g,t.bearing=v,t.altitude=_,t.scale=x,t.center=E,t.pixelsPerMeter=k(Object(d.a)(Object(d.a)(t))).pixelsPerMeter[2],Object.freeze(Object(d.a)(Object(d.a)(t))),t}return Object(p.a)(e,t),Object(c.a)(e,[{key:"projectFlat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return C(t,e)}},{key:"unprojectFlat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return T(t,e)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,n=M(t.pos,this.pixelUnprojectionMatrix),r=C(e,this.scale),i=b.a([],r,b.d([],n));return T(b.a([],this.center,i),this.scale)}},{key:"getLocationAtPoint",value:function(t){var e=t.lngLat,n=t.pos;return this.getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,o=D(Object.assign({width:r,height:i,bounds:t},n)),a=o.longitude,s=o.latitude,u=o.zoom;return new e({width:r,height:i,longitude:a,latitude:s,zoom:u})}}]),e}(N),B=n(276),z=n.n(B),U=["top-left","top-right","bottom-left","bottom-right"],G=function(t){var e,n;function r(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).geocoder=null,e.cachedResult=null,e.initializeGeocoder=function(){var t=e.getMapboxMap(),n=e.getContainerNode(),r=e.props,i=r.inputValue,o=r.render,a=r.getItemValue,u=r.onInit,l=r.position,c={accessToken:r.mapboxApiAccessToken,origin:r.origin,zoom:r.zoom,flyTo:!1,placeholder:r.placeholder,proximity:r.proximity,trackProximity:r.trackProximity,collapsed:r.collapsed,clearAndBlurOnEsc:r.clearAndBlurOnEsc,clearOnBlur:r.clearOnBlur,bbox:r.bbox,types:r.types,countries:r.countries,minLength:r.minLength,limit:r.limit,language:r.language,filter:r.filter,localGeocoder:r.localGeocoder,localGeocoderOnly:r.localGeocoderOnly,reverseGeocode:r.reverseGeocode,enableEventLogging:r.enableEventLogging,marker:r.marker,mapboxgl:z.a};o&&"function"==typeof o&&(c.render=o),a&&"function"==typeof a&&(c.getItemValue=a),e.geocoder=new s.a(c),e.subscribeEvents(),n?n.appendChild(e.geocoder.onAdd(t)):t.addControl(e.geocoder,U.find((function(t){return l===t}))),null!=i?e.geocoder.setInput(i):e.cachedResult&&e.geocoder.setInput(e.cachedResult.place_name),(e.cachedResult||null!=i)&&e.showClearIcon(),u(e.geocoder)},e.showClearIcon=function(){e.geocoder._clearEl.style.display="block"},e.getMapboxMap=function(){var t=e.props.mapRef;return t&&t.current&&t.current.getMap()||null},e.getContainerNode=function(){var t=e.props.containerRef;return t&&t.current||null},e.subscribeEvents=function(){e.geocoder.on("clear",e.handleClear),e.geocoder.on("loading",e.handleLoading),e.geocoder.on("results",e.handleResults),e.geocoder.on("result",e.handleResult),e.geocoder.on("error",e.handleError)},e.unsubscribeEvents=function(){e.geocoder.off("clear",e.handleClear),e.geocoder.off("loading",e.handleLoading),e.geocoder.off("results",e.handleResults),e.geocoder.off("result",e.handleResult),e.geocoder.off("error",e.handleError)},e.removeGeocoder=function(){var t=e.getMapboxMap();e.unsubscribeEvents(),t&&t.removeControl&&e.getMapboxMap().removeControl(e.geocoder),e.geocoder=null},e.handleClear=function(){e.cachedResult=null,e.props.onClear()},e.handleLoading=function(t){e.props.onLoading(t)},e.handleResults=function(t){e.props.onResults(t)},e.handleResult=function(t){var n=t.result,r=e.props,i=r.onViewportChange,o=r.onResult,a=n.bbox,s=n.center,l=n.properties,c=(void 0===l?{}:l).short_code,f=s[0],h=s[1],p={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}},d=e.getMapboxMap().getContainer().getBoundingClientRect(),m=d.width,g=d.height,y=e.geocoder.options.zoom,v=function(t,e){return new F(e).fitBounds(t)};try{!p[c]&&a?y=v([[a[0],a[1]],[a[2],a[3]]],{width:m,height:g}).zoom:p[c]&&(y=v(p[c].bbox,{width:m,height:g}).zoom)}catch(t){console.warn("following result caused an error when trying to zoom to bbox: ",n),y=e.geocoder.options.zoom}i({longitude:f,latitude:h,zoom:y,transitionInterpolator:new u.a,transitionDuration:3e3}),o(t),e.cachedResult=n,e.geocoder._typeahead.selected=null,e.showClearIcon()},e.handleError=function(t){e.props.onError(t)},e}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.initializeGeocoder()},i.componentWillUnmount=function(){this.removeGeocoder()},i.componentDidUpdate=function(){this.removeGeocoder(),this.initializeGeocoder()},i.getGeocoder=function(){return this.geocoder},i.render=function(){return null},r}(r.PureComponent);G.propTypes={mapRef:o.a.object.isRequired,containerRef:o.a.object,onViewportChange:o.a.func,mapboxApiAccessToken:o.a.string.isRequired,inputValue:o.a.string,origin:o.a.string,zoom:o.a.number,placeholder:o.a.string,proximity:o.a.object,trackProximity:o.a.bool,collapsed:o.a.bool,clearAndBlurOnEsc:o.a.bool,clearOnBlur:o.a.bool,bbox:o.a.array,types:o.a.string,countries:o.a.string,minLength:o.a.number,limit:o.a.number,language:o.a.string,filter:o.a.func,localGeocoder:o.a.func,localGeocoderOnly:o.a.bool,reverseGeocode:o.a.bool,enableEventLogging:o.a.bool,marker:o.a.oneOfType([o.a.bool,o.a.object]),render:o.a.func,getItemValue:o.a.func,position:o.a.oneOf(U),onInit:o.a.func,onClear:o.a.func,onLoading:o.a.func,onResults:o.a.func,onResult:o.a.func,onError:o.a.func},G.defaultProps={onViewportChange:function(){},origin:"https://api.mapbox.com",zoom:16,placeholder:"Search",trackProximity:!1,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,minLength:2,limit:5,reverseGeocode:!1,enableEventLogging:!0,marker:!0,position:"top-right",onInit:function(){},onClear:function(){},onLoading:function(){},onResults:function(){},onResult:function(){},onError:function(){}};e.a=G},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1148),a=n.n(o),s=n(1345);e.default=function(t){t.children;return i.a.createElement("div",{className:a.a.Record},i.a.createElement(s.default,{width:"500",height:"200"}),i.a.createElement("div",{className:a.a.textContent},i.a.createElement("span",{className:a.a.type},I18n.t("record")),i.a.createElement("h3",null,"Duis Bibendum eu Magna id Egestas Proin"),i.a.createElement("p",null,"Donec libero nisi, sollicitudin faucibus bibendum sit amet, scelerisque eget urna. Curabitur vulputate urna auctor, fermentum nunc eu, vulputate ex. Etiam mauris mauris, blandit et mi id, vestibulum.")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return A}));var r=n(0),i=n.n(r),o=n(143),a=n(186),s=n(4),u=n(51),l=n(56),c=n(1594),f=n(32),h=function(t,e){return t.theme.rangeInput&&t.theme.rangeInput.track&&t.theme.rangeInput.track[e]&&t.theme.rangeInput.track[e].opacity?t.theme.rangeInput.track[e].opacity:1},p=function(t,e){return t.theme.rangeInput&&t.theme.rangeInput.track&&t.theme.rangeInput.track[e]&&t.theme.rangeInput.track[e].color?Object(a.a)(Object(u.c)(t.theme.rangeInput.track[e].color,t.theme),h(t,e)):Object(a.a)(Object(u.c)(t.theme.rangeInput.track.color,t.theme),h(t,e))},d=function(t){if(t.theme.rangeInput&&t.theme.rangeInput.track&&!t.theme.rangeInput.track.lower&&!t.theme.rangeInput.track.upper){var e=Object(a.a)(Object(u.c)(t.theme.rangeInput.track.color,t.theme),.2);return"rgba(0,0,0,0.2)"===e?"background: "+e:"background: "+Object(a.a)(Object(u.c)(t.theme.rangeInput.track.color,t.theme),t.theme.rangeInput.track.opacity||1)}var n=t.max||100,r=t.min||0,i=(t.value-r)/(n-r)*100+"%",o=p(t,"lower"),s=p(t,"upper");return"background: linear-gradient(\n      to right,\n      "+o+",\n      "+o+" "+i+",\n      "+s+" "+i+",\n      "+s+"\n    );\n  "},m=Object(s.css)(["box-sizing:border-box;width:100%;height:",";",";",""],(function(t){return t.theme.rangeInput.track.height}),(function(t){return d(t)}),(function(t){return t.theme.rangeInput&&t.theme.rangeInput.track&&t.theme.rangeInput.track.extend})),g=Object(s.css)(["box-sizing:border-box;position:relative;border-radius:",";height:",";width:",";overflow:visible;background:",";-webkit-appearance:none;cursor:pointer;",""],(function(t){return t.theme.global.spacing}),(function(t){return t.theme.global.spacing}),(function(t){return t.theme.global.spacing}),(function(t){return Object(u.c)(t.theme.rangeInput.thumb.color||"control",t.theme)}),(function(t){return t.theme.rangeInput&&t.theme.rangeInput.thumb&&t.theme.rangeInput.thumb.extend})),y=Object(s.css)([""," margin-top:0px;height:",";width:",";",""],g,(function(t){return t.theme.global.spacing}),(function(t){return t.theme.global.spacing}),(function(t){return t.theme.rangeInput&&t.theme.rangeInput.thumb&&t.theme.rangeInput.thumb.extend})),v=s.default.input.withConfig({displayName:"StyledRangeInput",componentId:"sc-15st9ck-0"})(["box-sizing:border-box;position:relative;-webkit-appearance:none;border-color:transparent;height:",";width:100%;padding:0px;cursor:pointer;background:transparent;&::-moz-focus-inner{border:none;}&::-moz-focus-outer{border:none;}&::-webkit-slider-runnable-track{","}&::-webkit-slider-thumb{margin-top:-","px;"," ","}&::-moz-range-track{","}&::-moz-range-thumb{","}&::-ms-thumb{","}"," &::-ms-track{"," border-color:transparent;color:transparent;}&::-ms-fill-lower{",";border-color:transparent;}&::-ms-fill-upper{",";border-color:transparent;}"," ",""],(function(t){return t.theme.global.spacing}),m,(function(t){return.5*(Object(l.b)(t.theme.global.spacing)-Object(l.b)(t.theme.rangeInput.track.height||0))}),g,(function(t){return!t.disabled&&Object(s.css)(["&:hover{box-shadow:0px 0px 0px 2px ",";}"],Object(u.c)(t.theme.rangeInput.thumb.color||"control",t.theme))}),m,y,y,(function(t){return!t.disabled&&Object(s.css)(["&:hover::-moz-range-thumb{box-shadow:0px 0px 0px 2px ",";}&:hover::-ms-thumb{box-shadow:0px 0px 0px 2px ",";}"],Object(u.c)(t.theme.rangeInput.thumb.color||"control",t.theme),Object(u.c)(t.theme.rangeInput.thumb.color||"control",t.theme))}),m,(function(t){return d(t)}),(function(t){return d(t)}),(function(t){return t.focus&&Object(c.f)()}),(function(t){return t.theme.rangeInput&&t.theme.rangeInput.extend}));function b(){return b=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},b.apply(this,arguments)}v.defaultProps={},Object.setPrototypeOf(v.defaultProps,f.a);var _=Object(r.forwardRef)((function(t,e){var n=t.a11yTitle,a=t.name,s=t.onChange,u=t.onFocus,l=t.onBlur,c=t.value,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,["a11yTitle","name","onChange","onFocus","onBlur","value"]),h=Object(r.useContext)(o.a).useFormInput(a,c),p=h[0],d=h[1],m=Object(r.useState)(),g=m[0],y=m[1];return i.a.createElement(v,b({"aria-label":n,ref:e,name:a,focus:g,value:p},f,{onFocus:function(t){y(!0),u&&u(t)},onBlur:function(t){y(!1),l&&l(t)},onChange:function(t){d(t.target.value),s&&s(t)},type:"range"}))}));_.displayName="RangeInput";var A=_},function(t,e,n){"use strict";var r=n(259),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function y(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||v}function A(){}function w(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||v}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error(y(85));this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},A.prototype=_.prototype;var x=w.prototype=new A;x.constructor=w,r(x,_.prototype),x.isPureReactComponent=!0;var E={current:null},O=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function P(t,e,n){var r,i={},a=null,s=null;if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)O.call(e,r)&&!S.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:t,key:a,ref:s,props:i,_owner:E.current}}function C(t){return"object"===typeof t&&null!==t&&t.$$typeof===o}var T=/\/+/g,k=[];function I(t,e,n,r){if(k.length){var i=k.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function L(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>k.length&&k.push(t)}function j(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var s=!1;if(null===t)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case a:s=!0}}if(s)return n(r,t,""===e?"."+R(t,0):e),1;if(s=0,e=""===e?".":e+":",Array.isArray(t))for(var u=0;u<t.length;u++){var l=e+R(i=t[u],u);s+=j(i,l,n,r)}else if(null===t||"object"!==typeof t?l=null:l="function"===typeof(l=g&&t[g]||t["@@iterator"])?l:null,"function"===typeof l)for(t=l.call(t),u=0;!(i=t.next()).done;)s+=j(i=i.value,l=e+R(i,u++),n,r);else if("object"===i)throw n=""+t,Error(y(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return s}function M(t,e,n){return null==t?0:j(t,"",e,n)}function R(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function N(t,e){t.func.call(t.context,e,t.count++)}function D(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?F(t,r,n,(function(t){return t})):null!=t&&(C(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(T,"$&/")+"/")+n)),r.push(t))}function F(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(T,"$&/")+"/"),M(t,D,e=I(e,o,r,i)),L(e)}var B={current:null};function z(){var t=B.current;if(null===t)throw Error(y(321));return t}var U={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:function(t,e,n){if(null==t)return t;var r=[];return F(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;M(t,N,e=I(null,null,e,n)),L(e)},count:function(t){return M(t,(function(){return null}),null)},toArray:function(t){var e=[];return F(t,e,null,(function(t){return t})),e},only:function(t){if(!C(t))throw Error(y(143));return t}},e.Component=_,e.Fragment=s,e.Profiler=l,e.PureComponent=w,e.StrictMode=u,e.Suspense=p,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,e.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error(y(267,t));var i=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=E.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)O.call(e,c)&&!S.hasOwnProperty(c)&&(i[c]=void 0===e[c]&&void 0!==l?l[c]:e[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var f=0;f<c;f++)l[f]=arguments[f+2];i.children=l}return{$$typeof:o,type:t.type,key:a,ref:s,props:i,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:f,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:t},t.Consumer=t},e.createElement=P,e.createFactory=function(t){var e=P.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:h,render:t}},e.isValidElement=C,e.lazy=function(t){return{$$typeof:m,_ctor:t,_status:-1,_result:null}},e.memo=function(t,e){return{$$typeof:d,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return z().useCallback(t,e)},e.useContext=function(t,e){return z().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return z().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return z().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return z().useLayoutEffect(t,e)},e.useMemo=function(t,e){return z().useMemo(t,e)},e.useReducer=function(t,e,n){return z().useReducer(t,e,n)},e.useRef=function(t){return z().useRef(t)},e.useState=function(t){return z().useState(t)},e.version="16.13.1"},function(t,e,n){"use strict";var r=n(633);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r=n(0),i=n(259),o=n(635);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(t,e,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(c){this.onError(c)}}var u=!1,l=null,c=!1,f=null,h={onError:function(t){u=!0,l=t}};function p(t,e,n,r,i,o,a,c,f){u=!1,l=null,s.apply(h,arguments)}var d=null,m=null,g=null;function y(t,e,n){var r=t.type||"unknown-event";t.currentTarget=g(n),function(t,e,n,r,i,o,s,h,d){if(p.apply(this,arguments),u){if(!u)throw Error(a(198));var m=l;u=!1,l=null,c||(c=!0,f=m)}}(r,e,void 0,t),t.currentTarget=null}var v=null,b={};function _(){if(v)for(var t in b){var e=b[t],n=v.indexOf(t);if(!(-1<n))throw Error(a(96,t));if(!w[n]){if(!e.extractEvents)throw Error(a(97,t));for(var r in w[n]=e,n=e.eventTypes){var i=void 0,o=n[r],s=e,u=r;if(x.hasOwnProperty(u))throw Error(a(99,u));x[u]=o;var l=o.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&A(l[i],s,u);i=!0}else o.registrationName?(A(o.registrationName,s,u),i=!0):i=!1;if(!i)throw Error(a(98,r,t))}}}}function A(t,e,n){if(E[t])throw Error(a(100,t));E[t]=e,O[t]=e.eventTypes[n].dependencies}var w=[],x={},E={},O={};function S(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];if(!b.hasOwnProperty(e)||b[e]!==r){if(b[e])throw Error(a(102,e));b[e]=r,n=!0}}n&&_()}var P=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),C=null,T=null,k=null;function I(t){if(t=m(t)){if("function"!==typeof C)throw Error(a(280));var e=t.stateNode;e&&(e=d(e),C(t.stateNode,t.type,e))}}function L(t){T?k?k.push(t):k=[t]:T=t}function j(){if(T){var t=T,e=k;if(k=T=null,I(t),e)for(t=0;t<e.length;t++)I(e[t])}}function M(t,e){return t(e)}function R(t,e,n,r,i){return t(e,n,r,i)}function N(){}var D=M,F=!1,B=!1;function z(){null===T&&null===k||(N(),j())}function U(t,e,n){if(B)return t(e,n);B=!0;try{return D(t,e,n)}finally{B=!1,z()}}var G=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,q={},H={};function W(t,e,n,r,i,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o}var X={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){X[t]=new W(t,0,!1,t,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];X[e]=new W(e,1,!1,t[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){X[t]=new W(t,2,!1,t.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){X[t]=new W(t,2,!1,t,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){X[t]=new W(t,3,!1,t.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(t){X[t]=new W(t,3,!0,t,null,!1)})),["capture","download"].forEach((function(t){X[t]=new W(t,4,!1,t,null,!1)})),["cols","rows","size","span"].forEach((function(t){X[t]=new W(t,6,!1,t,null,!1)})),["rowSpan","start"].forEach((function(t){X[t]=new W(t,5,!1,t.toLowerCase(),null,!1)}));var Y=/[\-:]([a-z])/g;function Z(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(Y,Z);X[e]=new W(e,1,!1,t,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(Y,Z);X[e]=new W(e,1,!1,t,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(Y,Z);X[e]=new W(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(t){X[t]=new W(t,1,!1,t.toLowerCase(),null,!1)})),X.xlinkHref=new W("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(t){X[t]=new W(t,1,!1,t.toLowerCase(),null,!0)}));var K=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function $(t,e,n,r){var i=X.hasOwnProperty(e)?X[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||"undefined"===typeof e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!V.call(H,t)||!V.call(q,t)&&(G.test(t)?H[t]=!0:(q[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}K.hasOwnProperty("ReactCurrentDispatcher")||(K.ReactCurrentDispatcher={current:null}),K.hasOwnProperty("ReactCurrentBatchConfig")||(K.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Q="function"===typeof Symbol&&Symbol.for,tt=Q?Symbol.for("react.element"):60103,et=Q?Symbol.for("react.portal"):60106,nt=Q?Symbol.for("react.fragment"):60107,rt=Q?Symbol.for("react.strict_mode"):60108,it=Q?Symbol.for("react.profiler"):60114,ot=Q?Symbol.for("react.provider"):60109,at=Q?Symbol.for("react.context"):60110,st=Q?Symbol.for("react.concurrent_mode"):60111,ut=Q?Symbol.for("react.forward_ref"):60112,lt=Q?Symbol.for("react.suspense"):60113,ct=Q?Symbol.for("react.suspense_list"):60120,ft=Q?Symbol.for("react.memo"):60115,ht=Q?Symbol.for("react.lazy"):60116,pt=Q?Symbol.for("react.block"):60121,dt="function"===typeof Symbol&&Symbol.iterator;function mt(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=dt&&t[dt]||t["@@iterator"])?t:null}function gt(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case nt:return"Fragment";case et:return"Portal";case it:return"Profiler";case rt:return"StrictMode";case lt:return"Suspense";case ct:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case at:return"Context.Consumer";case ot:return"Context.Provider";case ut:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case ft:return gt(t.type);case pt:return gt(t.render);case ht:if(t=1===t._status?t._result:null)return gt(t)}return null}function yt(t){var e="";do{t:switch(t.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break t;default:var r=t._debugOwner,i=t._debugSource,o=gt(t.type);n=null,r&&(n=gt(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(J,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+o}e+=n,t=t.return}while(t);return e}function vt(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function bt(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function _t(t){t._valueTracker||(t._valueTracker=function(t){var e=bt(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function At(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=bt(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function wt(t,e){var n=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function xt(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=vt(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function Et(t,e){null!=(e=e.checked)&&$(t,"checked",e,!1)}function Ot(t,e){Et(t,e);var n=vt(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?Pt(t,e.type,n):e.hasOwnProperty("defaultValue")&&Pt(t,e.type,vt(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function St(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function Pt(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function Ct(t,e){return t=i({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function Tt(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+vt(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function kt(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return i({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function It(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:vt(n)}}function Lt(t,e){var n=vt(e.value),r=vt(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function jt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var Mt="http://www.w3.org/1999/xhtml",Rt="http://www.w3.org/2000/svg";function Nt(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?Nt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Ft,Bt,zt=(Bt=function(t,e){if(t.namespaceURI!==Rt||"innerHTML"in t)t.innerHTML=e;else{for((Ft=Ft||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ft.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return Bt(t,e)}))}:Bt);function Ut(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}function Gt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Vt={animationend:Gt("Animation","AnimationEnd"),animationiteration:Gt("Animation","AnimationIteration"),animationstart:Gt("Animation","AnimationStart"),transitionend:Gt("Transition","TransitionEnd")},qt={},Ht={};function Wt(t){if(qt[t])return qt[t];if(!Vt[t])return t;var e,n=Vt[t];for(e in n)if(n.hasOwnProperty(e)&&e in Ht)return qt[t]=n[e];return t}P&&(Ht=document.createElement("div").style,"AnimationEvent"in window||(delete Vt.animationend.animation,delete Vt.animationiteration.animation,delete Vt.animationstart.animation),"TransitionEvent"in window||delete Vt.transitionend.transition);var Xt=Wt("animationend"),Yt=Wt("animationiteration"),Zt=Wt("animationstart"),Kt=Wt("transitionend"),$t="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Jt=new("function"===typeof WeakMap?WeakMap:Map);function Qt(t){var e=Jt.get(t);return void 0===e&&(e=new Map,Jt.set(t,e)),e}function te(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).effectTag)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function ee(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function ne(t){if(te(t)!==t)throw Error(a(188))}function re(t){if(t=function(t){var e=t.alternate;if(!e){if(null===(e=te(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ne(i),t;if(o===r)return ne(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t),!t)return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function ie(t,e){if(null==e)throw Error(a(30));return null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function oe(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var ae=null;function se(t){if(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e))for(var r=0;r<e.length&&!t.isPropagationStopped();r++)y(t,e[r],n[r]);else e&&y(t,e,n);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function ue(t){if(null!==t&&(ae=ie(ae,t)),t=ae,ae=null,t){if(oe(t,se),ae)throw Error(a(95));if(c)throw t=f,c=!1,f=null,t}}function le(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function ce(t){if(!P)return!1;var e=(t="on"+t)in document;return e||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"===typeof e[t]),e}var fe=[];function he(t){t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>fe.length&&fe.push(t)}function pe(t,e,n,r){if(fe.length){var i=fe.pop();return i.topLevelType=t,i.eventSystemFlags=r,i.nativeEvent=e,i.targetInst=n,i}return{topLevelType:t,eventSystemFlags:r,nativeEvent:e,targetInst:n,ancestors:[]}}function de(t){var e=t.targetInst,n=e;do{if(!n){t.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(e=n.tag)&&6!==e||t.ancestors.push(n),n=In(r)}while(n);for(n=0;n<t.ancestors.length;n++){e=t.ancestors[n];var i=le(t.nativeEvent);r=t.topLevelType;var o=t.nativeEvent,a=t.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<w.length;u++){var l=w[u];l&&(l=l.extractEvents(r,e,o,i,a))&&(s=ie(s,l))}ue(s)}}function me(t,e,n){if(!n.has(t)){switch(t){case"scroll":Ze(e,"scroll",!0);break;case"focus":case"blur":Ze(e,"focus",!0),Ze(e,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ce(t)&&Ze(e,t,!0);break;case"invalid":case"submit":case"reset":break;default:-1===$t.indexOf(t)&&Ye(t,e)}n.set(t,null)}}var ge,ye,ve,be=!1,_e=[],Ae=null,we=null,xe=null,Ee=new Map,Oe=new Map,Se=[],Pe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ce="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Te(t,e,n,r,i){return{blockedOn:t,topLevelType:e,eventSystemFlags:32|n,nativeEvent:i,container:r}}function ke(t,e){switch(t){case"focus":case"blur":Ae=null;break;case"dragenter":case"dragleave":we=null;break;case"mouseover":case"mouseout":xe=null;break;case"pointerover":case"pointerout":Ee.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oe.delete(e.pointerId)}}function Ie(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t=Te(e,n,r,i,o),null!==e&&(null!==(e=Ln(e))&&ye(e)),t):(t.eventSystemFlags|=r,t)}function Le(t){var e=In(t.target);if(null!==e){var n=te(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=ee(n)))return t.blockedOn=e,void o.unstable_runWithPriority(t.priority,(function(){ve(n)}))}else if(3===e&&n.stateNode.hydrate)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function je(t){if(null!==t.blockedOn)return!1;var e=Qe(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);if(null!==e){var n=Ln(e);return null!==n&&ye(n),t.blockedOn=e,!1}return!0}function Me(t,e,n){je(t)&&n.delete(e)}function Re(){for(be=!1;0<_e.length;){var t=_e[0];if(null!==t.blockedOn){null!==(t=Ln(t.blockedOn))&&ge(t);break}var e=Qe(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);null!==e?t.blockedOn=e:_e.shift()}null!==Ae&&je(Ae)&&(Ae=null),null!==we&&je(we)&&(we=null),null!==xe&&je(xe)&&(xe=null),Ee.forEach(Me),Oe.forEach(Me)}function Ne(t,e){t.blockedOn===e&&(t.blockedOn=null,be||(be=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Re)))}function De(t){function e(e){return Ne(e,t)}if(0<_e.length){Ne(_e[0],t);for(var n=1;n<_e.length;n++){var r=_e[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==Ae&&Ne(Ae,t),null!==we&&Ne(we,t),null!==xe&&Ne(xe,t),Ee.forEach(e),Oe.forEach(e),n=0;n<Se.length;n++)(r=Se[n]).blockedOn===t&&(r.blockedOn=null);for(;0<Se.length&&null===(n=Se[0]).blockedOn;)Le(n),null===n.blockedOn&&Se.shift()}var Fe={},Be=new Map,ze=new Map,Ue=["abort","abort",Xt,"animationEnd",Yt,"animationIteration",Zt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Kt,"transitionEnd","waiting","waiting"];function Ge(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:e},ze.set(r,e),Be.set(r,o),Fe[i]=o}}Ge("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ge("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ge(Ue,2);for(var Ve="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),qe=0;qe<Ve.length;qe++)ze.set(Ve[qe],0);var He=o.unstable_UserBlockingPriority,We=o.unstable_runWithPriority,Xe=!0;function Ye(t,e){Ze(e,t,!1)}function Ze(t,e,n){var r=ze.get(e);switch(void 0===r?2:r){case 0:r=Ke.bind(null,e,1,t);break;case 1:r=$e.bind(null,e,1,t);break;default:r=Je.bind(null,e,1,t)}n?t.addEventListener(e,r,!0):t.addEventListener(e,r,!1)}function Ke(t,e,n,r){F||N();var i=Je,o=F;F=!0;try{R(i,t,e,n,r)}finally{(F=o)||z()}}function $e(t,e,n,r){We(He,Je.bind(null,t,e,n,r))}function Je(t,e,n,r){if(Xe)if(0<_e.length&&-1<Pe.indexOf(t))t=Te(null,t,e,n,r),_e.push(t);else{var i=Qe(t,e,n,r);if(null===i)ke(t,r);else if(-1<Pe.indexOf(t))t=Te(i,t,e,n,r),_e.push(t);else if(!function(t,e,n,r,i){switch(e){case"focus":return Ae=Ie(Ae,t,e,n,r,i),!0;case"dragenter":return we=Ie(we,t,e,n,r,i),!0;case"mouseover":return xe=Ie(xe,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ee.set(o,Ie(Ee.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Oe.set(o,Ie(Oe.get(o)||null,t,e,n,r,i)),!0}return!1}(i,t,e,n,r)){ke(t,r),t=pe(t,r,null,e);try{U(de,t)}finally{he(t)}}}}function Qe(t,e,n,r){if(null!==(n=In(n=le(r)))){var i=te(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=ee(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}t=pe(t,r,n,e);try{U(de,t)}finally{he(t)}return null}var tn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function nn(t,e,n){return null==e||"boolean"===typeof e||""===e?"":n||"number"!==typeof e||0===e||tn.hasOwnProperty(t)&&tn[t]?(""+e).trim():e+"px"}function rn(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=nn(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(tn).forEach((function(t){en.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),tn[e]=tn[t]}))}));var on=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(t,e){if(e){if(on[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t,""));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(a(62,""))}}function sn(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var un=Mt;function ln(t,e){var n=Qt(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=O[e];for(var r=0;r<e.length;r++)me(e[r],t,n)}function cn(){}function fn(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function hn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function pn(t,e){var n,r=hn(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=hn(r)}}function dn(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?dn(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function mn(){for(var t=window,e=fn();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(r){n=!1}if(!n)break;e=fn((t=e.contentWindow).document)}return e}function gn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var yn="$?",vn="$!",bn=null,_n=null;function An(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function wn(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var xn="function"===typeof setTimeout?setTimeout:void 0,En="function"===typeof clearTimeout?clearTimeout:void 0;function On(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function Sn(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||n===vn||n===yn){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var Pn=Math.random().toString(36).slice(2),Cn="__reactInternalInstance$"+Pn,Tn="__reactEventHandlers$"+Pn,kn="__reactContainere$"+Pn;function In(t){var e=t[Cn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[kn]||n[Cn]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=Sn(t);null!==t;){if(n=t[Cn])return n;t=Sn(t)}return e}n=(t=n).parentNode}return null}function Ln(t){return!(t=t[Cn]||t[kn])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function jn(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function Mn(t){return t[Tn]||null}function Rn(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Nn(t,e){var n=t.stateNode;if(!n)return null;var r=d(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(a(231,e,typeof n));return n}function Dn(t,e,n){(e=Nn(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=ie(n._dispatchListeners,e),n._dispatchInstances=ie(n._dispatchInstances,t))}function Fn(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=Rn(e);for(e=n.length;0<e--;)Dn(n[e],"captured",t);for(e=0;e<n.length;e++)Dn(n[e],"bubbled",t)}}function Bn(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=Nn(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=ie(n._dispatchListeners,e),n._dispatchInstances=ie(n._dispatchInstances,t))}function zn(t){t&&t.dispatchConfig.registrationName&&Bn(t._targetInst,null,t)}function Un(t){oe(t,Fn)}var Gn=null,Vn=null,qn=null;function Hn(){if(qn)return qn;var t,e,n=Vn,r=n.length,i="value"in Gn?Gn.value:Gn.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return qn=i.slice(t,1<e?1-e:void 0)}function Wn(){return!0}function Xn(){return!1}function Yn(t,e,n,r){for(var i in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wn:Xn,this.isPropagationStopped=Xn,this}function Zn(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function Kn(t){if(!(t instanceof this))throw Error(a(279));t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function $n(t){t.eventPool=[],t.getPooled=Zn,t.release=Kn}i(Yn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){this.isPersistent=Wn},isPersistent:Xn,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Xn,this._dispatchInstances=this._dispatchListeners=null}}),Yn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Yn.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,$n(n),n},$n(Yn);var Jn=Yn.extend({data:null}),Qn=Yn.extend({data:null}),tr=[9,13,27,32],er=P&&"CompositionEvent"in window,nr=null;P&&"documentMode"in document&&(nr=document.documentMode);var rr=P&&"TextEvent"in window&&!nr,ir=P&&(!er||nr&&8<nr&&11>=nr),or=String.fromCharCode(32),ar={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},sr=!1;function ur(t,e){switch(t){case"keyup":return-1!==tr.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function lr(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var cr=!1;var fr={eventTypes:ar,extractEvents:function(t,e,n,r){var i;if(er)t:{switch(t){case"compositionstart":var o=ar.compositionStart;break t;case"compositionend":o=ar.compositionEnd;break t;case"compositionupdate":o=ar.compositionUpdate;break t}o=void 0}else cr?ur(t,n)&&(o=ar.compositionEnd):"keydown"===t&&229===n.keyCode&&(o=ar.compositionStart);return o?(ir&&"ko"!==n.locale&&(cr||o!==ar.compositionStart?o===ar.compositionEnd&&cr&&(i=Hn()):(Vn="value"in(Gn=r)?Gn.value:Gn.textContent,cr=!0)),o=Jn.getPooled(o,e,n,r),i?o.data=i:null!==(i=lr(n))&&(o.data=i),Un(o),i=o):i=null,(t=rr?function(t,e){switch(t){case"compositionend":return lr(e);case"keypress":return 32!==e.which?null:(sr=!0,or);case"textInput":return(t=e.data)===or&&sr?null:t;default:return null}}(t,n):function(t,e){if(cr)return"compositionend"===t||!er&&ur(t,e)?(t=Hn(),qn=Vn=Gn=null,cr=!1,t):null;switch(t){case"paste":default:return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return ir&&"ko"!==e.locale?null:e.data}}(t,n))?((e=Qn.getPooled(ar.beforeInput,e,n,r)).data=t,Un(e)):e=null,null===i?e:null===e?i:[i,e]}},hr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!hr[t.type]:"textarea"===e}var dr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function mr(t,e,n){return(t=Yn.getPooled(dr.change,t,e,n)).type="change",L(n),Un(t),t}var gr=null,yr=null;function vr(t){ue(t)}function br(t){if(At(jn(t)))return t}function _r(t,e){if("change"===t)return e}var Ar=!1;function wr(){gr&&(gr.detachEvent("onpropertychange",xr),yr=gr=null)}function xr(t){if("value"===t.propertyName&&br(yr))if(t=mr(yr,t,le(t)),F)ue(t);else{F=!0;try{M(vr,t)}finally{F=!1,z()}}}function Er(t,e,n){"focus"===t?(wr(),yr=n,(gr=e).attachEvent("onpropertychange",xr)):"blur"===t&&wr()}function Or(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return br(yr)}function Sr(t,e){if("click"===t)return br(e)}function Pr(t,e){if("input"===t||"change"===t)return br(e)}P&&(Ar=ce("input")&&(!document.documentMode||9<document.documentMode));var Cr={eventTypes:dr,_isInputEventSupported:Ar,extractEvents:function(t,e,n,r){var i=e?jn(e):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=_r;else if(pr(i))if(Ar)a=Pr;else{a=Or;var s=Er}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Sr);if(a&&(a=a(t,e)))return mr(a,n,r);s&&s(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&Pt(i,"number",i.value)}},Tr=Yn.extend({view:null,detail:null}),kr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ir(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=kr[t])&&!!e[t]}function Lr(){return Ir}var jr=0,Mr=0,Rr=!1,Nr=!1,Dr=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Lr,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},movementX:function(t){if("movementX"in t)return t.movementX;var e=jr;return jr=t.screenX,Rr?"mousemove"===t.type?t.screenX-e:0:(Rr=!0,0)},movementY:function(t){if("movementY"in t)return t.movementY;var e=Mr;return Mr=t.screenY,Nr?"mousemove"===t.type?t.screenY-e:0:(Nr=!0,0)}}),Fr=Dr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Br={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},zr={eventTypes:Br,extractEvents:function(t,e,n,r,i){var o="mouseover"===t||"pointerover"===t,a="mouseout"===t||"pointerout"===t;if(o&&0===(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a)?(a=e,null!==(e=(e=n.relatedTarget||n.toElement)?In(e):null)&&(e!==te(e)||5!==e.tag&&6!==e.tag)&&(e=null)):a=null;if(a===e)return null;if("mouseout"===t||"mouseover"===t)var s=Dr,u=Br.mouseLeave,l=Br.mouseEnter,c="mouse";else"pointerout"!==t&&"pointerover"!==t||(s=Fr,u=Br.pointerLeave,l=Br.pointerEnter,c="pointer");if(t=null==a?o:jn(a),o=null==e?o:jn(e),(u=s.getPooled(u,a,n,r)).type=c+"leave",u.target=t,u.relatedTarget=o,(n=s.getPooled(l,e,n,r)).type=c+"enter",n.target=o,n.relatedTarget=t,c=e,(r=a)&&c)t:{for(l=c,a=0,t=s=r;t;t=Rn(t))a++;for(t=0,e=l;e;e=Rn(e))t++;for(;0<a-t;)s=Rn(s),a--;for(;0<t-a;)l=Rn(l),t--;for(;a--;){if(s===l||s===l.alternate)break t;s=Rn(s),l=Rn(l)}s=null}else s=null;for(l=s,s=[];r&&r!==l&&(null===(a=r.alternate)||a!==l);)s.push(r),r=Rn(r);for(r=[];c&&c!==l&&(null===(a=c.alternate)||a!==l);)r.push(c),c=Rn(c);for(c=0;c<s.length;c++)Bn(s[c],"bubbled",u);for(c=r.length;0<c--;)Bn(r[c],"captured",n);return 0===(64&i)?[u]:[u,n]}};var Ur="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},Gr=Object.prototype.hasOwnProperty;function Vr(t,e){if(Ur(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Gr.call(e,n[r])||!Ur(t[n[r]],e[n[r]]))return!1;return!0}var qr=P&&"documentMode"in document&&11>=document.documentMode,Hr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wr=null,Xr=null,Yr=null,Zr=!1;function Kr(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return Zr||null==Wr||Wr!==fn(n)?null:("selectionStart"in(n=Wr)&&gn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Yr&&Vr(Yr,n)?null:(Yr=n,(t=Yn.getPooled(Hr.select,Xr,t,e)).type="select",t.target=Wr,Un(t),t))}var $r={eventTypes:Hr,extractEvents:function(t,e,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){t:{i=Qt(i),o=O.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break t}i=!0}o=!i}if(o)return null;switch(i=e?jn(e):window,t){case"focus":(pr(i)||"true"===i.contentEditable)&&(Wr=i,Xr=e,Yr=null);break;case"blur":Yr=Xr=Wr=null;break;case"mousedown":Zr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Zr=!1,Kr(n,r);case"selectionchange":if(qr)break;case"keydown":case"keyup":return Kr(n,r)}return null}},Jr=Yn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qr=Yn.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ti=Tr.extend({relatedTarget:null});function ei(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var ni={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ri={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ii=Tr.extend({key:function(t){if(t.key){var e=ni[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=ei(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?ri[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Lr,charCode:function(t){return"keypress"===t.type?ei(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?ei(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),oi=Dr.extend({dataTransfer:null}),ai=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Lr}),si=Yn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ui=Dr.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),li={eventTypes:Fe,extractEvents:function(t,e,n,r){var i=Be.get(t);if(!i)return null;switch(t){case"keypress":if(0===ei(n))return null;case"keydown":case"keyup":t=ii;break;case"blur":case"focus":t=ti;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=Dr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=ai;break;case Xt:case Yt:case Zt:t=Jr;break;case Kt:t=si;break;case"scroll":t=Tr;break;case"wheel":t=ui;break;case"copy":case"cut":case"paste":t=Qr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=Fr;break;default:t=Yn}return Un(e=t.getPooled(i,e,n,r)),e}};if(v)throw Error(a(101));v=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_(),d=Mn,m=Ln,g=jn,S({SimpleEventPlugin:li,EnterLeaveEventPlugin:zr,ChangeEventPlugin:Cr,SelectEventPlugin:$r,BeforeInputEventPlugin:fr});var ci=[],fi=-1;function hi(t){0>fi||(t.current=ci[fi],ci[fi]=null,fi--)}function pi(t,e){fi++,ci[fi]=t.current,t.current=e}var di={},mi={current:di},gi={current:!1},yi=di;function vi(t,e){var n=t.type.contextTypes;if(!n)return di;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function bi(t){return null!==(t=t.childContextTypes)&&void 0!==t}function _i(){hi(gi),hi(mi)}function Ai(t,e,n){if(mi.current!==di)throw Error(a(168));pi(mi,e),pi(gi,n)}function wi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,gt(e)||"Unknown",o));return i({},n,{},r)}function xi(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||di,yi=mi.current,pi(mi,t),pi(gi,gi.current),!0}function Ei(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=wi(t,e,yi),r.__reactInternalMemoizedMergedChildContext=t,hi(gi),hi(mi),pi(mi,t)):hi(gi),pi(gi,n)}var Oi=o.unstable_runWithPriority,Si=o.unstable_scheduleCallback,Pi=o.unstable_cancelCallback,Ci=o.unstable_requestPaint,Ti=o.unstable_now,ki=o.unstable_getCurrentPriorityLevel,Ii=o.unstable_ImmediatePriority,Li=o.unstable_UserBlockingPriority,ji=o.unstable_NormalPriority,Mi=o.unstable_LowPriority,Ri=o.unstable_IdlePriority,Ni={},Di=o.unstable_shouldYield,Fi=void 0!==Ci?Ci:function(){},Bi=null,zi=null,Ui=!1,Gi=Ti(),Vi=1e4>Gi?Ti:function(){return Ti()-Gi};function qi(){switch(ki()){case Ii:return 99;case Li:return 98;case ji:return 97;case Mi:return 96;case Ri:return 95;default:throw Error(a(332))}}function Hi(t){switch(t){case 99:return Ii;case 98:return Li;case 97:return ji;case 96:return Mi;case 95:return Ri;default:throw Error(a(332))}}function Wi(t,e){return t=Hi(t),Oi(t,e)}function Xi(t,e,n){return t=Hi(t),Si(t,e,n)}function Yi(t){return null===Bi?(Bi=[t],zi=Si(Ii,Ki)):Bi.push(t),Ni}function Zi(){if(null!==zi){var t=zi;zi=null,Pi(t)}Ki()}function Ki(){if(!Ui&&null!==Bi){Ui=!0;var t=0;try{var e=Bi;Wi(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),Bi=null}catch(n){throw null!==Bi&&(Bi=Bi.slice(t+1)),Si(Ii,Zi),n}finally{Ui=!1}}}function $i(t,e,n){return 1073741821-(1+((1073741821-t+e/10)/(n/=10)|0))*n}function Ji(t,e){if(t&&t.defaultProps)for(var n in e=i({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var Qi={current:null},to=null,eo=null,no=null;function ro(){no=eo=to=null}function io(t){var e=Qi.current;hi(Qi),t.type._context._currentValue=e}function oo(t,e){for(;null!==t;){var n=t.alternate;if(t.childExpirationTime<e)t.childExpirationTime=e,null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e);else{if(!(null!==n&&n.childExpirationTime<e))break;n.childExpirationTime=e}t=t.return}}function ao(t,e){to=t,no=eo=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(t.expirationTime>=e&&(Ma=!0),t.firstContext=null)}function so(t,e){if(no!==t&&!1!==e&&0!==e)if("number"===typeof e&&1073741823!==e||(no=t,e=1073741823),e={context:t,observedBits:e,next:null},null===eo){if(null===to)throw Error(a(308));eo=e,to.dependencies={expirationTime:0,firstContext:e,responders:null}}else eo=eo.next=e;return t._currentValue}var uo=!1;function lo(t){t.updateQueue={baseState:t.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function co(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,baseQueue:t.baseQueue,shared:t.shared,effects:t.effects})}function fo(t,e){return(t={expirationTime:t,suspenseConfig:e,tag:0,payload:null,callback:null,next:null}).next=t}function ho(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function po(t,e){var n=t.alternate;null!==n&&co(n,t),null===(n=(t=t.updateQueue).baseQueue)?(t.baseQueue=e.next=e,e.next=e):(e.next=n.next,n.next=e)}function mo(t,e,n,r){var o=t.updateQueue;uo=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,o.shared.pending=null,null!==(u=t.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var l=o.baseState,c=0,f=null,h=null,p=null;if(null!==u)for(var d=u;;){if((s=d.expirationTime)<r){var m={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===p?(h=p=m,f=l):p=p.next=m,s>c&&(c=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),pu(s,d.suspenseConfig);t:{var g=t,y=d;switch(s=e,m=n,y.tag){case 1:if("function"===typeof(g=y.payload)){l=g.call(m,l,s);break t}l=g;break t;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null===(s="function"===typeof(g=y.payload)?g.call(m,l,s):g)||void 0===s)break t;l=i({},l,s);break t;case 2:uo=!0}}null!==d.callback&&(t.effectTag|=32,null===(s=o.effects)?o.effects=[d]:s.push(d))}if(null===(d=d.next)||d===u){if(null===(s=o.shared.pending))break;d=a.next=s.next,s.next=u,o.baseQueue=a=s,o.shared.pending=null}}null===p?f=l:p.next=h,o.baseState=f,o.baseQueue=p,du(c),t.expirationTime=c,t.memoizedState=l}}function go(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!==typeof r)throw Error(a(191,r));r.call(i)}}}var yo=K.ReactCurrentBatchConfig,vo=(new r.Component).refs;function bo(t,e,n,r){n=null===(n=n(r,e=t.memoizedState))||void 0===n?e:i({},e,n),t.memoizedState=n,0===t.expirationTime&&(t.updateQueue.baseState=n)}var _o={isMounted:function(t){return!!(t=t._reactInternalFiber)&&te(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=tu(),i=yo.suspense;(i=fo(r=eu(r,t,i),i)).payload=e,void 0!==n&&null!==n&&(i.callback=n),ho(t,i),nu(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=tu(),i=yo.suspense;(i=fo(r=eu(r,t,i),i)).tag=1,i.payload=e,void 0!==n&&null!==n&&(i.callback=n),ho(t,i),nu(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=tu(),r=yo.suspense;(r=fo(n=eu(n,t,r),r)).tag=2,void 0!==e&&null!==e&&(r.callback=e),ho(t,r),nu(t,n)}};function Ao(t,e,n,r,i,o,a){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!Vr(n,r)||!Vr(i,o))}function wo(t,e,n){var r=!1,i=di,o=e.contextType;return"object"===typeof o&&null!==o?o=so(o):(i=bi(e)?yi:mi.current,o=(r=null!==(r=e.contextTypes)&&void 0!==r)?vi(t,i):di),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=_o,t.stateNode=e,e._reactInternalFiber=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function xo(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&_o.enqueueReplaceState(e,e.state,null)}function Eo(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=vo,lo(t);var o=e.contextType;"object"===typeof o&&null!==o?i.context=so(o):(o=bi(e)?yi:mi.current,i.context=vi(t,o)),mo(t,n,i,r),i.state=t.memoizedState,"function"===typeof(o=e.getDerivedStateFromProps)&&(bo(t,e,o,n),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&_o.enqueueReplaceState(i,i.state,null),mo(t,n,i,r),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.effectTag|=4)}var Oo=Array.isArray;function So(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,t));var i=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===i?e.ref:(e=function(t){var e=r.refs;e===vo&&(e=r.refs={}),null===t?delete e[i]:e[i]=t},e._stringRef=i,e)}if("string"!==typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Po(t,e){if("textarea"!==t.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,""))}function Co(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=Mu(t,e)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function s(e){return t&&null===e.alternate&&(e.effectTag=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Du(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function l(t,e,n,r){return null!==e&&e.elementType===n.type?((r=i(e,n.props)).ref=So(t,e,n),r.return=t,r):((r=Ru(n.type,n.key,n.props,null,t.mode,r)).ref=So(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Fu(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function f(t,e,n,r,o){return null===e||7!==e.tag?((e=Nu(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function h(t,e,n){if("string"===typeof e||"number"===typeof e)return(e=Du(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case tt:return(n=Ru(e.type,e.key,e.props,null,t.mode,n)).ref=So(t,null,e),n.return=t,n;case et:return(e=Fu(e,t.mode,n)).return=t,e}if(Oo(e)||mt(e))return(e=Nu(e,t.mode,n,null)).return=t,e;Po(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case tt:return n.key===i?n.type===nt?f(t,e,n.props.children,r,i):l(t,e,n,r):null;case et:return n.key===i?c(t,e,n,r):null}if(Oo(n)||mt(n))return null!==i?null:f(t,e,n,r,null);Po(t,n)}return null}function d(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case tt:return t=t.get(null===r.key?n:r.key)||null,r.type===nt?f(e,t,r.props.children,i,r.key):l(e,t,r,i);case et:return c(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(Oo(r)||mt(r))return f(e,t=t.get(n)||null,r,i,null);Po(e,r)}return null}function m(i,a,s,u){for(var l=null,c=null,f=a,m=a=0,g=null;null!==f&&m<s.length;m++){f.index>m?(g=f,f=null):g=f.sibling;var y=p(i,f,s[m],u);if(null===y){null===f&&(f=g);break}t&&f&&null===y.alternate&&e(i,f),a=o(y,a,m),null===c?l=y:c.sibling=y,c=y,f=g}if(m===s.length)return n(i,f),l;if(null===f){for(;m<s.length;m++)null!==(f=h(i,s[m],u))&&(a=o(f,a,m),null===c?l=f:c.sibling=f,c=f);return l}for(f=r(i,f);m<s.length;m++)null!==(g=d(f,i,m,s[m],u))&&(t&&null!==g.alternate&&f.delete(null===g.key?m:g.key),a=o(g,a,m),null===c?l=g:c.sibling=g,c=g);return t&&f.forEach((function(t){return e(i,t)})),l}function g(i,s,u,l){var c=mt(u);if("function"!==typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,m=s,g=s=0,y=null,v=u.next();null!==m&&!v.done;g++,v=u.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=p(i,m,v.value,l);if(null===b){null===m&&(m=y);break}t&&m&&null===b.alternate&&e(i,m),s=o(b,s,g),null===f?c=b:f.sibling=b,f=b,m=y}if(v.done)return n(i,m),c;if(null===m){for(;!v.done;g++,v=u.next())null!==(v=h(i,v.value,l))&&(s=o(v,s,g),null===f?c=v:f.sibling=v,f=v);return c}for(m=r(i,m);!v.done;g++,v=u.next())null!==(v=d(m,i,g,v.value,l))&&(t&&null!==v.alternate&&m.delete(null===v.key?g:v.key),s=o(v,s,g),null===f?c=v:f.sibling=v,f=v);return t&&m.forEach((function(t){return e(i,t)})),c}return function(t,r,o,u){var l="object"===typeof o&&null!==o&&o.type===nt&&null===o.key;l&&(o=o.props.children);var c="object"===typeof o&&null!==o;if(c)switch(o.$$typeof){case tt:t:{for(c=o.key,l=r;null!==l;){if(l.key===c){if(7===l.tag){if(o.type===nt){n(t,l.sibling),(r=i(l,o.props.children)).return=t,t=r;break t}}else if(l.elementType===o.type){n(t,l.sibling),(r=i(l,o.props)).ref=So(t,l,o),r.return=t,t=r;break t}n(t,l);break}e(t,l),l=l.sibling}o.type===nt?((r=Nu(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=Ru(o.type,o.key,o.props,null,t.mode,u)).ref=So(t,r,o),u.return=t,t=u)}return s(t);case et:t:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Fu(o,t.mode,u)).return=t,t=r}return s(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Du(o,t.mode,u)).return=t,t=r),s(t);if(Oo(o))return m(t,r,o,u);if(mt(o))return g(t,r,o,u);if(c&&Po(t,o),"undefined"===typeof o&&!l)switch(t.tag){case 1:case 0:throw t=t.type,Error(a(152,t.displayName||t.name||"Component"))}return n(t,r)}}var To=Co(!0),ko=Co(!1),Io={},Lo={current:Io},jo={current:Io},Mo={current:Io};function Ro(t){if(t===Io)throw Error(a(174));return t}function No(t,e){switch(pi(Mo,e),pi(jo,t),pi(Lo,Io),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Dt(null,"");break;default:e=Dt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}hi(Lo),pi(Lo,e)}function Do(){hi(Lo),hi(jo),hi(Mo)}function Fo(t){Ro(Mo.current);var e=Ro(Lo.current),n=Dt(e,t.type);e!==n&&(pi(jo,t),pi(Lo,n))}function Bo(t){jo.current===t&&(hi(Lo),hi(jo))}var zo={current:0};function Uo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===yn||n.data===vn))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(64&e.effectTag))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function Go(t,e){return{responder:t,props:e}}var Vo=K.ReactCurrentDispatcher,qo=K.ReactCurrentBatchConfig,Ho=0,Wo=null,Xo=null,Yo=null,Zo=!1;function Ko(){throw Error(a(321))}function $o(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Ur(t[n],e[n]))return!1;return!0}function Jo(t,e,n,r,i,o){if(Ho=o,Wo=e,e.memoizedState=null,e.updateQueue=null,e.expirationTime=0,Vo.current=null===t||null===t.memoizedState?Aa:wa,t=n(r,i),e.expirationTime===Ho){o=0;do{if(e.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Yo=Xo=null,e.updateQueue=null,Vo.current=xa,t=n(r,i)}while(e.expirationTime===Ho)}if(Vo.current=_a,e=null!==Xo&&null!==Xo.next,Ho=0,Yo=Xo=Wo=null,Zo=!1,e)throw Error(a(300));return t}function Qo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Yo?Wo.memoizedState=Yo=t:Yo=Yo.next=t,Yo}function ta(){if(null===Xo){var t=Wo.alternate;t=null!==t?t.memoizedState:null}else t=Xo.next;var e=null===Yo?Wo.memoizedState:Yo.next;if(null!==e)Yo=e,Xo=t;else{if(null===t)throw Error(a(310));t={memoizedState:(Xo=t).memoizedState,baseState:Xo.baseState,baseQueue:Xo.baseQueue,queue:Xo.queue,next:null},null===Yo?Wo.memoizedState=Yo=t:Yo=Yo.next=t}return Yo}function ea(t,e){return"function"===typeof e?e(t):e}function na(t){var e=ta(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=Xo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,l=i;do{var c=l.expirationTime;if(c<Ho){var f={expirationTime:l.expirationTime,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(s=u=f,o=r):u=u.next=f,c>Wo.expirationTime&&(Wo.expirationTime=c,du(c))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),pu(c,l.suspenseConfig),r=l.eagerReducer===t?l.eagerState:t(r,l.action);l=l.next}while(null!==l&&l!==i);null===u?o=r:u.next=s,Ur(r,e.memoizedState)||(Ma=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function ra(t){var e=ta(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);Ur(o,e.memoizedState)||(Ma=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function ia(t){var e=Qo();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:ea,lastRenderedState:t}).dispatch=ba.bind(null,Wo,t),[e.memoizedState,t]}function oa(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Wo.updateQueue)?(e={lastEffect:null},Wo.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function aa(){return ta().memoizedState}function sa(t,e,n,r){var i=Qo();Wo.effectTag|=t,i.memoizedState=oa(1|e,n,void 0,void 0===r?null:r)}function ua(t,e,n,r){var i=ta();r=void 0===r?null:r;var o=void 0;if(null!==Xo){var a=Xo.memoizedState;if(o=a.destroy,null!==r&&$o(r,a.deps))return void oa(e,n,o,r)}Wo.effectTag|=t,i.memoizedState=oa(1|e,n,o,r)}function la(t,e){return sa(516,4,t,e)}function ca(t,e){return ua(516,4,t,e)}function fa(t,e){return ua(4,2,t,e)}function ha(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function pa(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ua(4,2,ha.bind(null,e,t),n)}function da(){}function ma(t,e){return Qo().memoizedState=[t,void 0===e?null:e],t}function ga(t,e){var n=ta();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&$o(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function ya(t,e){var n=ta();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&$o(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function va(t,e,n){var r=qi();Wi(98>r?98:r,(function(){t(!0)})),Wi(97<r?97:r,(function(){var r=qo.suspense;qo.suspense=void 0===e?null:e;try{t(!1),n()}finally{qo.suspense=r}}))}function ba(t,e,n){var r=tu(),i=yo.suspense;i={expirationTime:r=eu(r,t,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=e.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),e.pending=i,o=t.alternate,t===Wo||null!==o&&o===Wo)Zo=!0,i.expirationTime=Ho,Wo.expirationTime=Ho;else{if(0===t.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,Ur(s,a))return}catch(u){}nu(t,r)}}var _a={readContext:so,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useResponder:Ko,useDeferredValue:Ko,useTransition:Ko},Aa={readContext:so,useCallback:ma,useContext:so,useEffect:la,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,sa(4,2,ha.bind(null,e,t),n)},useLayoutEffect:function(t,e){return sa(4,2,t,e)},useMemo:function(t,e){var n=Qo();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Qo();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=ba.bind(null,Wo,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Qo().memoizedState=t},useState:ia,useDebugValue:da,useResponder:Go,useDeferredValue:function(t,e){var n=ia(t),r=n[0],i=n[1];return la((function(){var n=qo.suspense;qo.suspense=void 0===e?null:e;try{i(t)}finally{qo.suspense=n}}),[t,e]),r},useTransition:function(t){var e=ia(!1),n=e[0];return e=e[1],[ma(va.bind(null,e,t),[e,t]),n]}},wa={readContext:so,useCallback:ga,useContext:so,useEffect:ca,useImperativeHandle:pa,useLayoutEffect:fa,useMemo:ya,useReducer:na,useRef:aa,useState:function(){return na(ea)},useDebugValue:da,useResponder:Go,useDeferredValue:function(t,e){var n=na(ea),r=n[0],i=n[1];return ca((function(){var n=qo.suspense;qo.suspense=void 0===e?null:e;try{i(t)}finally{qo.suspense=n}}),[t,e]),r},useTransition:function(t){var e=na(ea),n=e[0];return e=e[1],[ga(va.bind(null,e,t),[e,t]),n]}},xa={readContext:so,useCallback:ga,useContext:so,useEffect:ca,useImperativeHandle:pa,useLayoutEffect:fa,useMemo:ya,useReducer:ra,useRef:aa,useState:function(){return ra(ea)},useDebugValue:da,useResponder:Go,useDeferredValue:function(t,e){var n=ra(ea),r=n[0],i=n[1];return ca((function(){var n=qo.suspense;qo.suspense=void 0===e?null:e;try{i(t)}finally{qo.suspense=n}}),[t,e]),r},useTransition:function(t){var e=ra(ea),n=e[0];return e=e[1],[ga(va.bind(null,e,t),[e,t]),n]}},Ea=null,Oa=null,Sa=!1;function Pa(t,e){var n=Lu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function Ca(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);default:return!1}}function Ta(t){if(Sa){var e=Oa;if(e){var n=e;if(!Ca(t,e)){if(!(e=On(n.nextSibling))||!Ca(t,e))return t.effectTag=-1025&t.effectTag|2,Sa=!1,void(Ea=t);Pa(Ea,n)}Ea=t,Oa=On(e.firstChild)}else t.effectTag=-1025&t.effectTag|2,Sa=!1,Ea=t}}function ka(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;Ea=t}function Ia(t){if(t!==Ea)return!1;if(!Sa)return ka(t),Sa=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!wn(e,t.memoizedProps))for(e=Oa;e;)Pa(t,e),e=On(e.nextSibling);if(ka(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){Oa=On(t.nextSibling);break t}e--}else"$"!==n&&n!==vn&&n!==yn||e++}t=t.nextSibling}Oa=null}}else Oa=Ea?On(t.stateNode.nextSibling):null;return!0}function La(){Oa=Ea=null,Sa=!1}var ja=K.ReactCurrentOwner,Ma=!1;function Ra(t,e,n,r){e.child=null===t?ko(e,null,n,r):To(e,t.child,n,r)}function Na(t,e,n,r,i){n=n.render;var o=e.ref;return ao(e,i),r=Jo(t,e,n,r,o,i),null===t||Ma?(e.effectTag|=1,Ra(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Ja(t,e,i))}function Da(t,e,n,r,i,o){if(null===t){var a=n.type;return"function"!==typeof a||ju(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Ru(n.type,null,r,null,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Fa(t,e,a,r,i,o))}return a=t.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Vr)(i,r)&&t.ref===e.ref)?Ja(t,e,o):(e.effectTag|=1,(t=Mu(a,r)).ref=e.ref,t.return=e,e.child=t)}function Fa(t,e,n,r,i,o){return null!==t&&Vr(t.memoizedProps,r)&&t.ref===e.ref&&(Ma=!1,i<o)?(e.expirationTime=t.expirationTime,Ja(t,e,o)):za(t,e,n,r,o)}function Ba(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function za(t,e,n,r,i){var o=bi(n)?yi:mi.current;return o=vi(e,o),ao(e,i),n=Jo(t,e,n,r,o,i),null===t||Ma?(e.effectTag|=1,Ra(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Ja(t,e,i))}function Ua(t,e,n,r,i){if(bi(n)){var o=!0;xi(e)}else o=!1;if(ao(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),wo(e,n,r),Eo(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,l=n.contextType;"object"===typeof l&&null!==l?l=so(l):l=vi(e,l=bi(n)?yi:mi.current);var c=n.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==l)&&xo(e,a,r,l),uo=!1;var h=e.memoizedState;a.state=h,mo(e,r,a,i),u=e.memoizedState,s!==r||h!==u||gi.current||uo?("function"===typeof c&&(bo(e,n,c,r),u=e.memoizedState),(s=uo||Ao(e,n,s,r,h,u,l))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(e.effectTag|=4)):("function"===typeof a.componentDidMount&&(e.effectTag|=4),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"===typeof a.componentDidMount&&(e.effectTag|=4),r=!1)}else a=e.stateNode,co(t,e),s=e.memoizedProps,a.props=e.type===e.elementType?s:Ji(e.type,s),u=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=so(l):l=vi(e,l=bi(n)?yi:mi.current),(f="function"===typeof(c=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==l)&&xo(e,a,r,l),uo=!1,u=e.memoizedState,a.state=u,mo(e,r,a,i),h=e.memoizedState,s!==r||u!==h||gi.current||uo?("function"===typeof c&&(bo(e,n,c,r),h=e.memoizedState),(c=uo||Ao(e,n,s,r,u,h,l))?(f||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"===typeof a.componentDidUpdate&&(e.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),e.memoizedProps=r,e.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),r=!1);return Ga(t,e,n,r,o,i)}function Ga(t,e,n,r,i,o){Ba(t,e);var a=0!==(64&e.effectTag);if(!r&&!a)return i&&Ei(e,n,!1),Ja(t,e,o);r=e.stateNode,ja.current=e;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return e.effectTag|=1,null!==t&&a?(e.child=To(e,t.child,null,o),e.child=To(e,null,s,o)):Ra(t,e,s,o),e.memoizedState=r.state,i&&Ei(e,n,!0),e.child}function Va(t){var e=t.stateNode;e.pendingContext?Ai(0,e.pendingContext,e.pendingContext!==e.context):e.context&&Ai(0,e.context,!1),No(t,e.containerInfo)}var qa,Ha,Wa,Xa={dehydrated:null,retryTime:0};function Ya(t,e,n){var r,i=e.mode,o=e.pendingProps,a=zo.current,s=!1;if((r=0!==(64&e.effectTag))||(r=0!==(2&a)&&(null===t||null!==t.memoizedState)),r?(s=!0,e.effectTag&=-65):null!==t&&null===t.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),pi(zo,1&a),null===t){if(void 0!==o.fallback&&Ta(e),s){if(s=o.fallback,(o=Nu(null,i,0,null)).return=e,0===(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=Nu(s,i,n,null)).return=e,o.sibling=n,e.memoizedState=Xa,e.child=o,n}return i=o.children,e.memoizedState=null,e.child=ko(e,null,i,n)}if(null!==t.memoizedState){if(i=(t=t.child).sibling,s){if(o=o.fallback,(n=Mu(t,t.pendingProps)).return=e,0===(2&e.mode)&&(s=null!==e.memoizedState?e.child.child:e.child)!==t.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Mu(i,o)).return=e,n.sibling=i,n.childExpirationTime=0,e.memoizedState=Xa,e.child=n,i}return n=To(e,t.child,o.children,n),e.memoizedState=null,e.child=n}if(t=t.child,s){if(s=o.fallback,(o=Nu(null,i,0,null)).return=e,o.child=t,null!==t&&(t.return=o),0===(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=Nu(s,i,n,null)).return=e,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,e.memoizedState=Xa,e.child=o,n}return e.memoizedState=null,e.child=To(e,t,o.children,n)}function Za(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e),oo(t.return,e)}function Ka(t,e,n,r,i,o){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function $a(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Ra(t,e,r.children,n),0!==(2&(r=zo.current)))r=1&r|2,e.effectTag|=64;else{if(null!==t&&0!==(64&t.effectTag))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Za(t,n);else if(19===t.tag)Za(t,n);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(pi(zo,r),0===(2&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===Uo(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Ka(e,!1,i,n,o,e.lastEffect);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===Uo(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Ka(e,!0,n,null,o,e.lastEffect);break;case"together":Ka(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Ja(t,e,n){null!==t&&(e.dependencies=t.dependencies);var r=e.expirationTime;if(0!==r&&du(r),e.childExpirationTime<n)return null;if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=Mu(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Mu(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function Qa(t,e){switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ts(t,e,n){var r=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return bi(e.type)&&_i(),null;case 3:return Do(),hi(gi),hi(mi),(n=e.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||!Ia(e)||(e.effectTag|=4),null;case 5:Bo(e),n=Ro(Mo.current);var o=e.type;if(null!==t&&null!=e.stateNode)Ha(t,e,o,r,n),t.ref!==e.ref&&(e.effectTag|=128);else{if(!r){if(null===e.stateNode)throw Error(a(166));return null}if(t=Ro(Lo.current),Ia(e)){r=e.stateNode,o=e.type;var s=e.memoizedProps;switch(r[Cn]=e,r[Tn]=s,o){case"iframe":case"object":case"embed":Ye("load",r);break;case"video":case"audio":for(t=0;t<$t.length;t++)Ye($t[t],r);break;case"source":Ye("error",r);break;case"img":case"image":case"link":Ye("error",r),Ye("load",r);break;case"form":Ye("reset",r),Ye("submit",r);break;case"details":Ye("toggle",r);break;case"input":xt(r,s),Ye("invalid",r),ln(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ye("invalid",r),ln(n,"onChange");break;case"textarea":It(r,s),Ye("invalid",r),ln(n,"onChange")}for(var u in an(o,s),t=null,s)if(s.hasOwnProperty(u)){var l=s[u];"children"===u?"string"===typeof l?r.textContent!==l&&(t=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(t=["children",""+l]):E.hasOwnProperty(u)&&null!=l&&ln(n,u)}switch(o){case"input":_t(r),St(r,s,!0);break;case"textarea":_t(r),jt(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=cn)}n=t,e.updateQueue=n,null!==n&&(e.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,t===un&&(t=Nt(o)),t===un?"script"===o?((t=u.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof r.is?t=u.createElement(o,{is:r.is}):(t=u.createElement(o),"select"===o&&(u=t,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):t=u.createElementNS(t,o),t[Cn]=e,t[Tn]=r,qa(t,e),e.stateNode=t,u=sn(o,r),o){case"iframe":case"object":case"embed":Ye("load",t),l=r;break;case"video":case"audio":for(l=0;l<$t.length;l++)Ye($t[l],t);l=r;break;case"source":Ye("error",t),l=r;break;case"img":case"image":case"link":Ye("error",t),Ye("load",t),l=r;break;case"form":Ye("reset",t),Ye("submit",t),l=r;break;case"details":Ye("toggle",t),l=r;break;case"input":xt(t,r),l=wt(t,r),Ye("invalid",t),ln(n,"onChange");break;case"option":l=Ct(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},l=i({},r,{value:void 0}),Ye("invalid",t),ln(n,"onChange");break;case"textarea":It(t,r),l=kt(t,r),Ye("invalid",t),ln(n,"onChange");break;default:l=r}an(o,l);var c=l;for(s in c)if(c.hasOwnProperty(s)){var f=c[s];"style"===s?rn(t,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&zt(t,f):"children"===s?"string"===typeof f?("textarea"!==o||""!==f)&&Ut(t,f):"number"===typeof f&&Ut(t,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(E.hasOwnProperty(s)?null!=f&&ln(n,s):null!=f&&$(t,s,f,u))}switch(o){case"input":_t(t),St(t,r,!1);break;case"textarea":_t(t),jt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+vt(r.value));break;case"select":t.multiple=!!r.multiple,null!=(n=r.value)?Tt(t,!!r.multiple,n,!1):null!=r.defaultValue&&Tt(t,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof l.onClick&&(t.onclick=cn)}An(o,r)&&(e.effectTag|=4)}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Wa(0,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(a(166));n=Ro(Mo.current),Ro(Lo.current),Ia(e)?(n=e.stateNode,r=e.memoizedProps,n[Cn]=e,n.nodeValue!==r&&(e.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Cn]=e,e.stateNode=n)}return null;case 13:return hi(zo),r=e.memoizedState,0!==(64&e.effectTag)?(e.expirationTime=n,e):(n=null!==r,r=!1,null===t?void 0!==e.memoizedProps.fallback&&Ia(e):(r=null!==(o=t.memoizedState),n||null===o||null!==(o=t.child.sibling)&&(null!==(s=e.firstEffect)?(e.firstEffect=o,o.nextEffect=s):(e.firstEffect=e.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!==(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!==(1&zo.current)?Rs===Cs&&(Rs=Ts):(Rs!==Cs&&Rs!==Ts||(Rs=ks),0!==zs&&null!==Ls&&(Uu(Ls,Ms),Gu(Ls,zs)))),(n||r)&&(e.effectTag|=4),null);case 4:return Do(),null;case 10:return io(e),null;case 19:if(hi(zo),null===(r=e.memoizedState))return null;if(o=0!==(64&e.effectTag),null===(s=r.rendering)){if(o)Qa(r,!1);else if(Rs!==Cs||null!==t&&0!==(64&t.effectTag))for(s=e.child;null!==s;){if(null!==(t=Uo(s))){for(e.effectTag|=64,Qa(r,!1),null!==(o=t.updateQueue)&&(e.updateQueue=o,e.effectTag|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=e.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(t=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=t.childExpirationTime,o.expirationTime=t.expirationTime,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,s=t.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return pi(zo,1&zo.current|2),e.child}s=s.sibling}}else{if(!o)if(null!==(t=Uo(s))){if(e.effectTag|=64,o=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.effectTag|=4),Qa(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Vi()-r.renderingStartTime>r.tailExpiration&&1<n&&(e.effectTag|=64,o=!0,Qa(r,!1),e.expirationTime=e.childExpirationTime=n-1);r.isBackwards?(s.sibling=e.child,e.child=s):(null!==(n=r.last)?n.sibling=s:e.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Vi()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=Vi(),n.sibling=null,e=zo.current,pi(zo,o?1&e|2:1&e),n):null}throw Error(a(156,e.tag))}function es(t){switch(t.tag){case 1:bi(t.type)&&_i();var e=t.effectTag;return 4096&e?(t.effectTag=-4097&e|64,t):null;case 3:if(Do(),hi(gi),hi(mi),0!==(64&(e=t.effectTag)))throw Error(a(285));return t.effectTag=-4097&e|64,t;case 5:return Bo(t),null;case 13:return hi(zo),4096&(e=t.effectTag)?(t.effectTag=-4097&e|64,t):null;case 19:return hi(zo),null;case 4:return Do(),null;case 10:return io(t),null;default:return null}}function ns(t,e){return{value:t,source:e,stack:yt(e)}}qa=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ha=function(t,e,n,r,o){var a=t.memoizedProps;if(a!==r){var s,u,l=e.stateNode;switch(Ro(Lo.current),t=null,n){case"input":a=wt(l,a),r=wt(l,r),t=[];break;case"option":a=Ct(l,a),r=Ct(l,r),t=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),t=[];break;case"textarea":a=kt(l,a),r=kt(l,r),t=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(l.onclick=cn)}for(s in an(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in l=a[s])l.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(E.hasOwnProperty(s)?t||(t=[]):(t=t||[]).push(s,null));for(s in r){var c=r[s];if(l=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&c!==l&&(null!=c||null!=l))if("style"===s)if(l){for(u in l)!l.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in c)c.hasOwnProperty(u)&&l[u]!==c[u]&&(n||(n={}),n[u]=c[u])}else n||(t||(t=[]),t.push(s,n)),n=c;else"dangerouslySetInnerHTML"===s?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(t=t||[]).push(s,c)):"children"===s?l===c||"string"!==typeof c&&"number"!==typeof c||(t=t||[]).push(s,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(E.hasOwnProperty(s)?(null!=c&&ln(o,s),t||l===c||(t=[])):(t=t||[]).push(s,c))}n&&(t=t||[]).push("style",n),o=t,(e.updateQueue=o)&&(e.effectTag|=4)}},Wa=function(t,e,n,r){n!==r&&(e.effectTag|=4)};var rs="function"===typeof WeakSet?WeakSet:Set;function is(t,e){var n=e.source,r=e.stack;null===r&&null!==n&&(r=yt(n)),null!==n&&gt(n.type),e=e.value,null!==t&&1===t.tag&&gt(t.type);try{console.error(e)}catch(i){setTimeout((function(){throw i}))}}function os(t){var e=t.ref;if(null!==e)if("function"===typeof e)try{e(null)}catch(n){Su(t,n)}else e.current=null}function as(t,e){switch(e.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&e.effectTag&&null!==t){var n=t.memoizedProps,r=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:Ji(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return}throw Error(a(163))}function ss(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==e)}}function us(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function ls(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:return void us(3,n);case 1:if(t=n.stateNode,4&n.effectTag)if(null===e)t.componentDidMount();else{var r=n.elementType===n.type?e.memoizedProps:Ji(n.type,e.memoizedProps);t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate)}return void(null!==(e=n.updateQueue)&&go(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:case 1:t=n.child.stateNode}go(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.effectTag&&An(n.type,n.memoizedProps)&&t.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&De(n)))))}throw Error(a(163))}function cs(t,e,n){switch("function"===typeof ku&&ku(e),e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var r=t.next;Wi(97<n?97:n,(function(){var t=r;do{var n=t.destroy;if(void 0!==n){var i=e;try{n()}catch(o){Su(i,o)}}t=t.next}while(t!==r)}))}break;case 1:os(e),"function"===typeof(n=e.stateNode).componentWillUnmount&&function(t,e){try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(n){Su(t,n)}}(e,n);break;case 5:os(e);break;case 4:gs(t,e,n)}}function fs(t){var e=t.alternate;t.return=null,t.child=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.alternate=null,t.firstEffect=null,t.lastEffect=null,t.pendingProps=null,t.memoizedProps=null,t.stateNode=null,null!==e&&fs(e)}function hs(t){return 5===t.tag||3===t.tag||4===t.tag}function ps(t){t:{for(var e=t.return;null!==e;){if(hs(e)){var n=e;break t}e=e.return}throw Error(a(160))}switch(e=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:e=e.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ut(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||hs(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}r?ds(t,n,e):ms(t,n,e)}function ds(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!==(n=n._reactRootContainer)&&void 0!==n||null!==e.onclick||(e.onclick=cn));else if(4!==r&&null!==(t=t.child))for(ds(t,e,n),t=t.sibling;null!==t;)ds(t,e,n),t=t.sibling}function ms(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(ms(t,e,n),t=t.sibling;null!==t;)ms(t,e,n),t=t.sibling}function gs(t,e,n){for(var r,i,o=e,s=!1;;){if(!s){s=o.return;t:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break t;case 3:case 4:r=r.containerInfo,i=!0;break t}s=s.return}s=!0}if(5===o.tag||6===o.tag){t:for(var u=t,l=o,c=n,f=l;;)if(cs(u,f,c),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===l)break t;for(;null===f.sibling;){if(null===f.return||f.return===l)break t;f=f.return}f.sibling.return=f.return,f=f.sibling}i?(u=r,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(cs(t,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function ys(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:return void ss(3,e);case 1:case 12:case 17:return;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps,i=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,null!==o){for(n[Tn]=r,"input"===t&&"radio"===r.type&&null!=r.name&&Et(n,r),sn(t,i),e=sn(t,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?rn(n,u):"dangerouslySetInnerHTML"===s?zt(n,u):"children"===s?Ut(n,u):$(n,s,u,e)}switch(t){case"input":Ot(n,r);break;case"textarea":Lt(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(t=r.value)?Tt(n,!!r.multiple,t,!1):e!==!!r.multiple&&(null!=r.defaultValue?Tt(n,!!r.multiple,r.defaultValue,!0):Tt(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===e.stateNode)throw Error(a(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((e=e.stateNode).hydrate&&(e.hydrate=!1,De(e.containerInfo)));case 13:if(n=e,null===e.memoizedState?r=!1:(r=!0,n=e.child,Gs=Vi()),null!==n)t:for(t=n;;){if(5===t.tag)o=t.stateNode,r?"function"===typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=t.stateNode,i=void 0!==(i=t.memoizedProps.style)&&null!==i&&i.hasOwnProperty("display")?i.display:null,o.style.display=nn("display",i));else if(6===t.tag)t.stateNode.nodeValue=r?"":t.memoizedProps;else{if(13===t.tag&&null!==t.memoizedState&&null===t.memoizedState.dehydrated){(o=t.child.sibling).return=t,t=o;continue}if(null!==t.child){t.child.return=t,t=t.child;continue}}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}return void vs(e);case 19:return void vs(e)}throw Error(a(163))}function vs(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new rs),e.forEach((function(e){var r=Cu.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}var bs="function"===typeof WeakMap?WeakMap:Map;function _s(t,e,n){(n=fo(n,null)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){qs||(qs=!0,Hs=r),is(t,e)},n}function As(t,e,n){(n=fo(n,null)).tag=3;var r=t.type.getDerivedStateFromError;if("function"===typeof r){var i=e.value;n.payload=function(){return is(t,e),r(i)}}var o=t.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Ws?Ws=new Set([this]):Ws.add(this),is(t,e));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}var ws,xs=Math.ceil,Es=K.ReactCurrentDispatcher,Os=K.ReactCurrentOwner,Ss=16,Ps=32,Cs=0,Ts=3,ks=4,Is=0,Ls=null,js=null,Ms=0,Rs=Cs,Ns=null,Ds=1073741823,Fs=1073741823,Bs=null,zs=0,Us=!1,Gs=0,Vs=null,qs=!1,Hs=null,Ws=null,Xs=!1,Ys=null,Zs=90,Ks=null,$s=0,Js=null,Qs=0;function tu(){return 0!==(48&Is)?1073741821-(Vi()/10|0):0!==Qs?Qs:Qs=1073741821-(Vi()/10|0)}function eu(t,e,n){if(0===(2&(e=e.mode)))return 1073741823;var r=qi();if(0===(4&e))return 99===r?1073741823:1073741822;if(0!==(Is&Ss))return Ms;if(null!==n)t=$i(t,0|n.timeoutMs||5e3,250);else switch(r){case 99:t=1073741823;break;case 98:t=$i(t,150,100);break;case 97:case 96:t=$i(t,5e3,250);break;case 95:t=2;break;default:throw Error(a(326))}return null!==Ls&&t===Ms&&--t,t}function nu(t,e){if(50<$s)throw $s=0,Js=null,Error(a(185));if(null!==(t=ru(t,e))){var n=qi();1073741823===e?0!==(8&Is)&&0===(48&Is)?su(t):(ou(t),0===Is&&Zi()):ou(t),0===(4&Is)||98!==n&&99!==n||(null===Ks?Ks=new Map([[t,e]]):(void 0===(n=Ks.get(t))||n>e)&&Ks.set(t,e))}}function ru(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e);var r=t.return,i=null;if(null===r&&3===t.tag)i=t.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<e&&(r.childExpirationTime=e),null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Ls===i&&(du(e),Rs===ks&&Uu(i,Ms)),Gu(i,e)),i}function iu(t){var e=t.lastExpiredTime;if(0!==e)return e;if(!zu(t,e=t.firstPendingTime))return e;var n=t.lastPingedTime;return 2>=(t=n>(t=t.nextKnownPendingLevel)?n:t)&&e!==t?0:t}function ou(t){if(0!==t.lastExpiredTime)t.callbackExpirationTime=1073741823,t.callbackPriority=99,t.callbackNode=Yi(su.bind(null,t));else{var e=iu(t),n=t.callbackNode;if(0===e)null!==n&&(t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90);else{var r=tu();if(1073741823===e?r=99:1===e||2===e?r=95:r=0>=(r=10*(1073741821-e)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=t.callbackPriority;if(t.callbackExpirationTime===e&&i>=r)return;n!==Ni&&Pi(n)}t.callbackExpirationTime=e,t.callbackPriority=r,e=1073741823===e?Yi(su.bind(null,t)):Xi(r,au.bind(null,t),{timeout:10*(1073741821-e)-Vi()}),t.callbackNode=e}}}function au(t,e){if(Qs=0,e)return Vu(t,e=tu()),ou(t),null;var n=iu(t);if(0!==n){if(e=t.callbackNode,0!==(48&Is))throw Error(a(327));if(xu(),t===Ls&&n===Ms||cu(t,n),null!==js){var r=Is;Is|=Ss;for(var i=hu();;)try{gu();break}catch(u){fu(t,u)}if(ro(),Is=r,Es.current=i,1===Rs)throw e=Ns,cu(t,n),Uu(t,n),ou(t),e;if(null===js)switch(i=t.finishedWork=t.current.alternate,t.finishedExpirationTime=n,r=Rs,Ls=null,r){case Cs:case 1:throw Error(a(345));case 2:Vu(t,2<n?2:n);break;case Ts:if(Uu(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=bu(i)),1073741823===Ds&&10<(i=Gs+500-Vi())){if(Us){var o=t.lastPingedTime;if(0===o||o>=n){t.lastPingedTime=n,cu(t,n);break}}if(0!==(o=iu(t))&&o!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}t.timeoutHandle=xn(_u.bind(null,t),i);break}_u(t);break;case ks:if(Uu(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=bu(i)),Us&&(0===(i=t.lastPingedTime)||i>=n)){t.lastPingedTime=n,cu(t,n);break}if(0!==(i=iu(t))&&i!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}if(1073741823!==Fs?r=10*(1073741821-Fs)-Vi():1073741823===Ds?r=0:(r=10*(1073741821-Ds)-5e3,0>(r=(i=Vi())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xs(r/1960))-r)&&(r=n)),10<r){t.timeoutHandle=xn(_u.bind(null,t),r);break}_u(t);break;case 5:if(1073741823!==Ds&&null!==Bs){o=Ds;var s=Bs;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Vi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Uu(t,n),t.timeoutHandle=xn(_u.bind(null,t),r);break}}_u(t);break;default:throw Error(a(329))}if(ou(t),t.callbackNode===e)return au.bind(null,t)}}return null}function su(t){var e=t.lastExpiredTime;if(e=0!==e?e:1073741823,0!==(48&Is))throw Error(a(327));if(xu(),t===Ls&&e===Ms||cu(t,e),null!==js){var n=Is;Is|=Ss;for(var r=hu();;)try{mu();break}catch(i){fu(t,i)}if(ro(),Is=n,Es.current=r,1===Rs)throw n=Ns,cu(t,e),Uu(t,e),ou(t),n;if(null!==js)throw Error(a(261));t.finishedWork=t.current.alternate,t.finishedExpirationTime=e,Ls=null,_u(t),ou(t)}return null}function uu(t,e){var n=Is;Is|=1;try{return t(e)}finally{0===(Is=n)&&Zi()}}function lu(t,e){var n=Is;Is&=-2,Is|=8;try{return t(e)}finally{0===(Is=n)&&Zi()}}function cu(t,e){t.finishedWork=null,t.finishedExpirationTime=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,En(n)),null!==js)for(n=js.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&_i();break;case 3:Do(),hi(gi),hi(mi);break;case 5:Bo(r);break;case 4:Do();break;case 13:case 19:hi(zo);break;case 10:io(r)}n=n.return}Ls=t,js=Mu(t.current,null),Ms=e,Rs=Cs,Ns=null,Fs=Ds=1073741823,Bs=null,zs=0,Us=!1}function fu(t,e){for(;;){try{if(ro(),Vo.current=_a,Zo)for(var n=Wo.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ho=0,Yo=Xo=Wo=null,Zo=!1,null===js||null===js.return)return Rs=1,Ns=e,js=null;t:{var i=t,o=js.return,a=js,s=e;if(e=Ms,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var u=s;if(0===(2&a.mode)){var l=a.alternate;l?(a.updateQueue=l.updateQueue,a.memoizedState=l.memoizedState,a.expirationTime=l.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var c=0!==(1&zo.current),f=o;do{var h;if(h=13===f.tag){var p=f.memoizedState;if(null!==p)h=null!==p.dehydrated;else{var d=f.memoizedProps;h=void 0!==d.fallback&&(!0!==d.unstable_avoidThisFallback||!c)}}if(h){var m=f.updateQueue;if(null===m){var g=new Set;g.add(u),f.updateQueue=g}else m.add(u);if(0===(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=fo(1073741823,null);y.tag=2,ho(a,y)}a.expirationTime=1073741823;break t}s=void 0,a=e;var v=i.pingCache;if(null===v?(v=i.pingCache=new bs,s=new Set,v.set(u,s)):void 0===(s=v.get(u))&&(s=new Set,v.set(u,s)),!s.has(a)){s.add(a);var b=Pu.bind(null,i,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=e;break t}f=f.return}while(null!==f);s=Error((gt(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+yt(a))}5!==Rs&&(Rs=2),s=ns(s,a),f=o;do{switch(f.tag){case 3:u=s,f.effectTag|=4096,f.expirationTime=e,po(f,_s(f,u,e));break t;case 1:u=s;var _=f.type,A=f.stateNode;if(0===(64&f.effectTag)&&("function"===typeof _.getDerivedStateFromError||null!==A&&"function"===typeof A.componentDidCatch&&(null===Ws||!Ws.has(A)))){f.effectTag|=4096,f.expirationTime=e,po(f,As(f,u,e));break t}}f=f.return}while(null!==f)}js=vu(js)}catch(w){e=w;continue}break}}function hu(){var t=Es.current;return Es.current=_a,null===t?_a:t}function pu(t,e){t<Ds&&2<t&&(Ds=t),null!==e&&t<Fs&&2<t&&(Fs=t,Bs=e)}function du(t){t>zs&&(zs=t)}function mu(){for(;null!==js;)js=yu(js)}function gu(){for(;null!==js&&!Di();)js=yu(js)}function yu(t){var e=ws(t.alternate,t,Ms);return t.memoizedProps=t.pendingProps,null===e&&(e=vu(t)),Os.current=null,e}function vu(t){js=t;do{var e=js.alternate;if(t=js.return,0===(2048&js.effectTag)){if(e=ts(e,js,Ms),1===Ms||1!==js.childExpirationTime){for(var n=0,r=js.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}js.childExpirationTime=n}if(null!==e)return e;null!==t&&0===(2048&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=js.firstEffect),null!==js.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=js.firstEffect),t.lastEffect=js.lastEffect),1<js.effectTag&&(null!==t.lastEffect?t.lastEffect.nextEffect=js:t.firstEffect=js,t.lastEffect=js))}else{if(null!==(e=es(js)))return e.effectTag&=2047,e;null!==t&&(t.firstEffect=t.lastEffect=null,t.effectTag|=2048)}if(null!==(e=js.sibling))return e;js=t}while(null!==js);return Rs===Cs&&(Rs=5),null}function bu(t){var e=t.expirationTime;return e>(t=t.childExpirationTime)?e:t}function _u(t){var e=qi();return Wi(99,Au.bind(null,t,e)),null}function Au(t,e){do{xu()}while(null!==Ys);if(0!==(48&Is))throw Error(a(327));var n=t.finishedWork,r=t.finishedExpirationTime;if(null===n)return null;if(t.finishedWork=null,t.finishedExpirationTime=0,n===t.current)throw Error(a(177));t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90,t.nextKnownPendingLevel=0;var i=bu(n);if(t.firstPendingTime=i,r<=t.lastSuspendedTime?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:r<=t.firstSuspendedTime&&(t.firstSuspendedTime=r-1),r<=t.lastPingedTime&&(t.lastPingedTime=0),r<=t.lastExpiredTime&&(t.lastExpiredTime=0),t===Ls&&(js=Ls=null,Ms=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Is;Is|=Ps,Os.current=null,bn=Xe;var s=mn();if(gn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else t:{var l=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(l&&0!==l.rangeCount){u=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{u.nodeType,f.nodeType}catch(S){u=null;break t}var h=0,p=-1,d=-1,m=0,g=0,y=s,v=null;e:for(;;){for(var b;y!==u||0!==c&&3!==y.nodeType||(p=h+c),y!==f||0!==l&&3!==y.nodeType||(d=h+l),3===y.nodeType&&(h+=y.nodeValue.length),null!==(b=y.firstChild);)v=y,y=b;for(;;){if(y===s)break e;if(v===u&&++m===c&&(p=h),v===f&&++g===l&&(d=h),null!==(b=y.nextSibling))break;v=(y=v).parentNode}y=b}u=-1===p||-1===d?null:{start:p,end:d}}else u=null}u=u||{start:0,end:0}}else u=null;_n={activeElementDetached:null,focusedElem:s,selectionRange:u},Xe=!1,Vs=i;do{try{wu()}catch(S){if(null===Vs)throw Error(a(330));Su(Vs,S),Vs=Vs.nextEffect}}while(null!==Vs);Vs=i;do{try{for(s=t,u=e;null!==Vs;){var _=Vs.effectTag;if(16&_&&Ut(Vs.stateNode,""),128&_){var A=Vs.alternate;if(null!==A){var w=A.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&_){case 2:ps(Vs),Vs.effectTag&=-3;break;case 6:ps(Vs),Vs.effectTag&=-3,ys(Vs.alternate,Vs);break;case 1024:Vs.effectTag&=-1025;break;case 1028:Vs.effectTag&=-1025,ys(Vs.alternate,Vs);break;case 4:ys(Vs.alternate,Vs);break;case 8:gs(s,c=Vs,u),fs(c)}Vs=Vs.nextEffect}}catch(S){if(null===Vs)throw Error(a(330));Su(Vs,S),Vs=Vs.nextEffect}}while(null!==Vs);if(w=_n,A=mn(),_=w.focusedElem,u=w.selectionRange,A!==_&&_&&_.ownerDocument&&dn(_.ownerDocument.documentElement,_)){null!==u&&gn(_)&&(A=u.start,void 0===(w=u.end)&&(w=A),"selectionStart"in _?(_.selectionStart=A,_.selectionEnd=Math.min(w,_.value.length)):(w=(A=_.ownerDocument||document)&&A.defaultView||window).getSelection&&(w=w.getSelection(),c=_.textContent.length,s=Math.min(u.start,c),u=void 0===u.end?s:Math.min(u.end,c),!w.extend&&s>u&&(c=u,u=s,s=c),c=pn(_,s),f=pn(_,u),c&&f&&(1!==w.rangeCount||w.anchorNode!==c.node||w.anchorOffset!==c.offset||w.focusNode!==f.node||w.focusOffset!==f.offset)&&((A=A.createRange()).setStart(c.node,c.offset),w.removeAllRanges(),s>u?(w.addRange(A),w.extend(f.node,f.offset)):(A.setEnd(f.node,f.offset),w.addRange(A))))),A=[];for(w=_;w=w.parentNode;)1===w.nodeType&&A.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_<A.length;_++)(w=A[_]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Xe=!!bn,_n=bn=null,t.current=n,Vs=i;do{try{for(_=t;null!==Vs;){var x=Vs.effectTag;if(36&x&&ls(_,Vs.alternate,Vs),128&x){A=void 0;var E=Vs.ref;if(null!==E){var O=Vs.stateNode;Vs.tag,A=O,"function"===typeof E?E(A):E.current=A}}Vs=Vs.nextEffect}}catch(S){if(null===Vs)throw Error(a(330));Su(Vs,S),Vs=Vs.nextEffect}}while(null!==Vs);Vs=null,Fi(),Is=o}else t.current=n;if(Xs)Xs=!1,Ys=t,Zs=e;else for(Vs=i;null!==Vs;)e=Vs.nextEffect,Vs.nextEffect=null,Vs=e;if(0===(e=t.firstPendingTime)&&(Ws=null),1073741823===e?t===Js?$s++:($s=0,Js=t):$s=0,"function"===typeof Tu&&Tu(n.stateNode,r),ou(t),qs)throw qs=!1,t=Hs,Hs=null,t;return 0!==(8&Is)||Zi(),null}function wu(){for(;null!==Vs;){var t=Vs.effectTag;0!==(256&t)&&as(Vs.alternate,Vs),0===(512&t)||Xs||(Xs=!0,Xi(97,(function(){return xu(),null}))),Vs=Vs.nextEffect}}function xu(){if(90!==Zs){var t=97<Zs?97:Zs;return Zs=90,Wi(t,Eu)}}function Eu(){if(null===Ys)return!1;var t=Ys;if(Ys=null,0!==(48&Is))throw Error(a(331));var e=Is;for(Is|=Ps,t=t.current.firstEffect;null!==t;){try{var n=t;if(0!==(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:ss(5,n),us(5,n)}}catch(r){if(null===t)throw Error(a(330));Su(t,r)}n=t.nextEffect,t.nextEffect=null,t=n}return Is=e,Zi(),!0}function Ou(t,e,n){ho(t,e=_s(t,e=ns(n,e),1073741823)),null!==(t=ru(t,1073741823))&&ou(t)}function Su(t,e){if(3===t.tag)Ou(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){Ou(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ws||!Ws.has(r))){ho(n,t=As(n,t=ns(e,t),1073741823)),null!==(n=ru(n,1073741823))&&ou(n);break}}n=n.return}}function Pu(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),Ls===t&&Ms===n?Rs===ks||Rs===Ts&&1073741823===Ds&&Vi()-Gs<500?cu(t,Ms):Us=!0:zu(t,n)&&(0!==(e=t.lastPingedTime)&&e<n||(t.lastPingedTime=n,ou(t)))}function Cu(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(e=eu(e=tu(),t,null)),null!==(t=ru(t,e))&&ou(t)}ws=function(t,e,n){var r=e.expirationTime;if(null!==t){var i=e.pendingProps;if(t.memoizedProps!==i||gi.current)Ma=!0;else{if(r<n){switch(Ma=!1,e.tag){case 3:Va(e),La();break;case 5:if(Fo(e),4&e.mode&&1!==n&&i.hidden)return e.expirationTime=e.childExpirationTime=1,null;break;case 1:bi(e.type)&&xi(e);break;case 4:No(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value,i=e.type._context,pi(Qi,i._currentValue),i._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(r=e.child.childExpirationTime)&&r>=n?Ya(t,e,n):(pi(zo,1&zo.current),null!==(e=Ja(t,e,n))?e.sibling:null);pi(zo,1&zo.current);break;case 19:if(r=e.childExpirationTime>=n,0!==(64&t.effectTag)){if(r)return $a(t,e,n);e.effectTag|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null),pi(zo,zo.current),!r)return null}return Ja(t,e,n)}Ma=!1}}else Ma=!1;switch(e.expirationTime=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,i=vi(e,mi.current),ao(e,n),i=Jo(null,e,r,t,i,n),e.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,bi(r)){var o=!0;xi(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,lo(e);var s=r.getDerivedStateFromProps;"function"===typeof s&&bo(e,r,s,t),i.updater=_o,e.stateNode=i,i._reactInternalFiber=e,Eo(e,r,t,n),e=Ga(null,e,r,!0,o,n)}else e.tag=0,Ra(null,e,i,n),e=e.child;return e;case 16:t:{if(i=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,function(t){if(-1===t._status){t._status=0;var e=t._ctor;e=e(),t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,e.type=i,o=e.tag=function(t){if("function"===typeof t)return ju(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===ut)return 11;if(t===ft)return 14}return 2}(i),t=Ji(i,t),o){case 0:e=za(null,e,i,t,n);break t;case 1:e=Ua(null,e,i,t,n);break t;case 11:e=Na(null,e,i,t,n);break t;case 14:e=Da(null,e,i,Ji(i.type,t),r,n);break t}throw Error(a(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,za(t,e,r,i=e.elementType===r?i:Ji(r,i),n);case 1:return r=e.type,i=e.pendingProps,Ua(t,e,r,i=e.elementType===r?i:Ji(r,i),n);case 3:if(Va(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,co(t,e),mo(e,r,null,n),(r=e.memoizedState.element)===i)La(),e=Ja(t,e,n);else{if((i=e.stateNode.hydrate)&&(Oa=On(e.stateNode.containerInfo.firstChild),Ea=e,i=Sa=!0),i)for(n=ko(e,null,r,n),e.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ra(t,e,r,n),La();e=e.child}return e;case 5:return Fo(e),null===t&&Ta(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,s=i.children,wn(r,i)?s=null:null!==o&&wn(r,o)&&(e.effectTag|=16),Ba(t,e),4&e.mode&&1!==n&&i.hidden?(e.expirationTime=e.childExpirationTime=1,e=null):(Ra(t,e,s,n),e=e.child),e;case 6:return null===t&&Ta(e),null;case 13:return Ya(t,e,n);case 4:return No(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=To(e,null,r,n):Ra(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,Na(t,e,r,i=e.elementType===r?i:Ji(r,i),n);case 7:return Ra(t,e,e.pendingProps,n),e.child;case 8:case 12:return Ra(t,e,e.pendingProps.children,n),e.child;case 10:t:{r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value;var u=e.type._context;if(pi(Qi,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=Ur(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!gi.current){e=Ja(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&o)){1===u.tag&&((c=fo(n,null)).tag=2,ho(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),oo(u.return,n),l.expirationTime<n&&(l.expirationTime=n);break}c=c.next}}else s=10===u.tag&&u.type===e.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===e){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Ra(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=(o=e.pendingProps).children,ao(e,n),r=r(i=so(i,o.unstable_observedBits)),e.effectTag|=1,Ra(t,e,r,n),e.child;case 14:return o=Ji(i=e.type,e.pendingProps),Da(t,e,i,o=Ji(i.type,o),r,n);case 15:return Fa(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ji(r,i),null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),e.tag=1,bi(r)?(t=!0,xi(e)):t=!1,ao(e,n),wo(e,r,i),Eo(e,r,i,n),Ga(null,e,r,!0,t,n);case 19:return $a(t,e,n)}throw Error(a(156,e.tag))};var Tu=null,ku=null;function Iu(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Lu(t,e,n,r){return new Iu(t,e,n,r)}function ju(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Mu(t,e){var n=t.alternate;return null===n?((n=Lu(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=t.childExpirationTime,n.expirationTime=t.expirationTime,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{expirationTime:e.expirationTime,firstContext:e.firstContext,responders:e.responders},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ru(t,e,n,r,i,o){var s=2;if(r=t,"function"===typeof t)ju(t)&&(s=1);else if("string"===typeof t)s=5;else t:switch(t){case nt:return Nu(n.children,i,o,e);case st:s=8,i|=7;break;case rt:s=8,i|=1;break;case it:return(t=Lu(12,n,e,8|i)).elementType=it,t.type=it,t.expirationTime=o,t;case lt:return(t=Lu(13,n,e,i)).type=lt,t.elementType=lt,t.expirationTime=o,t;case ct:return(t=Lu(19,n,e,i)).elementType=ct,t.expirationTime=o,t;default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case ot:s=10;break t;case at:s=9;break t;case ut:s=11;break t;case ft:s=14;break t;case ht:s=16,r=null;break t;case pt:s=22;break t}throw Error(a(130,null==t?t:typeof t,""))}return(e=Lu(s,n,e,i)).elementType=t,e.type=r,e.expirationTime=o,e}function Nu(t,e,n,r){return(t=Lu(7,t,r,e)).expirationTime=n,t}function Du(t,e,n){return(t=Lu(6,t,null,e)).expirationTime=n,t}function Fu(t,e,n){return(e=Lu(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Bu(t,e,n){this.tag=e,this.current=null,this.containerInfo=t,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function zu(t,e){var n=t.firstSuspendedTime;return t=t.lastSuspendedTime,0!==n&&n>=e&&t<=e}function Uu(t,e){var n=t.firstSuspendedTime,r=t.lastSuspendedTime;n<e&&(t.firstSuspendedTime=e),(r>e||0===n)&&(t.lastSuspendedTime=e),e<=t.lastPingedTime&&(t.lastPingedTime=0),e<=t.lastExpiredTime&&(t.lastExpiredTime=0)}function Gu(t,e){e>t.firstPendingTime&&(t.firstPendingTime=e);var n=t.firstSuspendedTime;0!==n&&(e>=n?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:e>=t.lastSuspendedTime&&(t.lastSuspendedTime=e+1),e>t.nextKnownPendingLevel&&(t.nextKnownPendingLevel=e))}function Vu(t,e){var n=t.lastExpiredTime;(0===n||n>e)&&(t.lastExpiredTime=e)}function qu(t,e,n,r){var i=e.current,o=tu(),s=yo.suspense;o=eu(o,i,s);t:if(n){e:{if(te(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(bi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(bi(l)){n=wi(n,l,u);break t}}n=u}else n=di;return null===e.context?e.context=n:e.pendingContext=n,(e=fo(o,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),ho(i,e),nu(i,o),o}function Hu(t){return(t=t.current).child?(t.child.tag,t.child.stateNode):null}function Wu(t,e){null!==(t=t.memoizedState)&&null!==t.dehydrated&&t.retryTime<e&&(t.retryTime=e)}function Xu(t,e){Wu(t,e),(t=t.alternate)&&Wu(t,e)}function Yu(t,e,n){var r=new Bu(t,e,n=null!=n&&!0===n.hydrate),i=Lu(3,null,null,2===e?7:1===e?3:0);r.current=i,i.stateNode=r,lo(i),t[kn]=r.current,n&&0!==e&&function(t,e){var n=Qt(e);Pe.forEach((function(t){me(t,e,n)})),Ce.forEach((function(t){me(t,e,n)}))}(0,9===t.nodeType?t:t.ownerDocument),this._internalRoot=r}function Zu(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Ku(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var t=Hu(a);s.call(t)}}qu(e,a,t,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new Yu(t,0,e?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var t=Hu(a);u.call(t)}}lu((function(){qu(e,a,t,i)}))}return Hu(a)}function $u(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:et,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function Ju(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zu(e))throw Error(a(200));return $u(t,e,null,n)}Yu.prototype.render=function(t){qu(t,this._internalRoot,null,null)},Yu.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;qu(null,t,null,(function(){e[kn]=null}))},ge=function(t){if(13===t.tag){var e=$i(tu(),150,100);nu(t,e),Xu(t,e)}},ye=function(t){13===t.tag&&(nu(t,3),Xu(t,3))},ve=function(t){if(13===t.tag){var e=tu();nu(t,e=eu(e,t,null)),Xu(t,e)}},C=function(t,e,n){switch(e){case"input":if(Ot(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=Mn(r);if(!i)throw Error(a(90));At(r),Ot(r,i)}}}break;case"textarea":Lt(t,n);break;case"select":null!=(e=n.value)&&Tt(t,!!n.multiple,e,!1)}},M=uu,R=function(t,e,n,r,i){var o=Is;Is|=4;try{return Wi(98,t.bind(null,e,n,r,i))}finally{0===(Is=o)&&Zi()}},N=function(){0===(49&Is)&&(function(){if(null!==Ks){var t=Ks;Ks=null,t.forEach((function(t,e){Vu(e,t),ou(e)})),Zi()}}(),xu())},D=function(t,e){var n=Is;Is|=2;try{return t(e)}finally{0===(Is=n)&&Zi()}};var Qu={Events:[Ln,jn,Mn,S,x,Un,function(t){oe(t,zn)},L,j,Je,ue,xu,{current:!1}]};!function(t){var e=t.findFiberByHostInstance;(function(t){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);Tu=function(t){try{e.onCommitFiberRoot(n,t,void 0,64===(64&t.current.effectTag))}catch(r){}},ku=function(t){try{e.onCommitFiberUnmount(n,t)}catch(r){}}}catch(r){}})(i({},t,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=re(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:In,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}),e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qu,e.createPortal=Ju,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternalFiber;if(void 0===e){if("function"===typeof t.render)throw Error(a(188));throw Error(a(268,Object.keys(t)))}return t=null===(t=re(e))?null:t.stateNode},e.flushSync=function(t,e){if(0!==(48&Is))throw Error(a(187));var n=Is;Is|=1;try{return Wi(99,t.bind(null,e))}finally{Is=n,Zi()}},e.hydrate=function(t,e,n){if(!Zu(e))throw Error(a(200));return Ku(null,t,e,!0,n)},e.render=function(t,e,n){if(!Zu(e))throw Error(a(200));return Ku(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!Zu(t))throw Error(a(40));return!!t._reactRootContainer&&(lu((function(){Ku(null,null,t,!1,(function(){t._reactRootContainer=null,t[kn]=null}))})),!0)},e.unstable_batchedUpdates=uu,e.unstable_createPortal=function(t,e){return Ju(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Zu(n))throw Error(a(200));if(null==t||void 0===t._reactInternalFiber)throw Error(a(38));return Ku(t,e,n,!1,r)},e.version="16.13.1"},function(t,e,n){"use strict";t.exports=n(636)},function(t,e,n){"use strict";var r,i,o,a,s;if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,l=null,c=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(n){throw setTimeout(c,0),n}},f=Date.now();e.unstable_now=function(){return Date.now()-f},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(c,0))},i=function(t,e){l=setTimeout(t,e)},o=function(){clearTimeout(l)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var h=window.performance,p=window.Date,d=window.setTimeout,m=window.clearTimeout;if("undefined"!==typeof console){var g=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof h&&"function"===typeof h.now)e.unstable_now=function(){return h.now()};else{var y=p.now();e.unstable_now=function(){return p.now()-y}}var v=!1,b=null,_=-1,A=5,w=0;a=function(){return e.unstable_now()>=w},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):A=0<t?Math.floor(1e3/t):5};var x=new MessageChannel,E=x.port2;x.port1.onmessage=function(){if(null!==b){var t=e.unstable_now();w=t+A;try{b(!0,t)?E.postMessage(null):(v=!1,b=null)}catch(n){throw E.postMessage(null),n}}else v=!1},r=function(t){b=t,v||(v=!0,E.postMessage(null))},i=function(t,n){_=d((function(){t(e.unstable_now())}),n)},o=function(){m(_),_=-1}}function O(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,i=t[r];if(!(void 0!==i&&0<C(i,e)))break t;t[r]=e,t[n]=i,n=r}}function S(t){return void 0===(t=t[0])?null:t}function P(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var o=2*(r+1)-1,a=t[o],s=o+1,u=t[s];if(void 0!==a&&0>C(a,n))void 0!==u&&0>C(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[o]=n,r=o);else{if(!(void 0!==u&&0>C(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function C(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var T=[],k=[],I=1,L=null,j=3,M=!1,R=!1,N=!1;function D(t){for(var e=S(k);null!==e;){if(null===e.callback)P(k);else{if(!(e.startTime<=t))break;P(k),e.sortIndex=e.expirationTime,O(T,e)}e=S(k)}}function F(t){if(N=!1,D(t),!R)if(null!==S(T))R=!0,r(B);else{var e=S(k);null!==e&&i(F,e.startTime-t)}}function B(t,n){R=!1,N&&(N=!1,o()),M=!0;var r=j;try{for(D(n),L=S(T);null!==L&&(!(L.expirationTime>n)||t&&!a());){var s=L.callback;if(null!==s){L.callback=null,j=L.priorityLevel;var u=s(L.expirationTime<=n);n=e.unstable_now(),"function"===typeof u?L.callback=u:L===S(T)&&P(T),D(n)}else P(T);L=S(T)}if(null!==L)var l=!0;else{var c=S(k);null!==c&&i(F,c.startTime-n),l=!1}return l}finally{L=null,j=r,M=!1}}function z(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=s;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){R||M||(R=!0,r(B))},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_getFirstCallbackNode=function(){return S(T)},e.unstable_next=function(t){switch(j){case 1:case 2:case 3:var e=3;break;default:e=j}var n=j;j=e;try{return t()}finally{j=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=U,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=j;j=t;try{return e()}finally{j=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0<u?s+u:s,a="number"===typeof a.timeout?a.timeout:z(t)}else a=z(t),u=s;return t={id:I++,callback:n,priorityLevel:t,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(t.sortIndex=u,O(k,t),null===S(T)&&t===S(k)&&(N?o():N=!0,i(F,u-s))):(t.sortIndex=a,O(T,t),R||M||(R=!0,r(B))),t},e.unstable_shouldYield=function(){var t=e.unstable_now();D(t);var n=S(T);return n!==L&&null!==L&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<L.expirationTime||a()},e.unstable_wrapCallback=function(t){var e=j;return function(){var n=j;j=e;try{return t.apply(this,arguments)}finally{j=n}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(1),i=n(87),o=n(111),a=n(42),s=n(50);class u{constructor(t){Object(r.a)(this,"opts",void 0),Object(r.a)(this,"typedArrayManager",void 0),Object(r.a)(this,"indexStarts",[0]),Object(r.a)(this,"vertexStarts",[0]),Object(r.a)(this,"vertexCount",0),Object(r.a)(this,"instanceCount",0),Object(r.a)(this,"attributes",void 0),Object(r.a)(this,"_attributeDefs",void 0),Object(r.a)(this,"data",void 0),Object(r.a)(this,"getGeometry",void 0),Object(r.a)(this,"geometryBuffer",void 0),Object(r.a)(this,"buffers",void 0),Object(r.a)(this,"positionSize",void 0),Object(r.a)(this,"normalize",void 0);const{attributes:e={}}=t;this.typedArrayManager=o.a,this.attributes={},this._attributeDefs=e,this.opts=t,this.updateGeometry(t)}updateGeometry(t){Object.assign(this.opts,t);const{data:e,buffers:n={},getGeometry:r,geometryBuffer:i,positionFormat:o,dataChanged:s,normalize:u=!0}=this.opts;if(this.data=e,this.getGeometry=r,this.positionSize=i&&i.size||("XY"===o?2:3),this.buffers=n,this.normalize=u,i&&(Object(a.a)(e.startIndices),this.getGeometry=this.getGeometryFromBuffer(i),u||(n.positions=i)),this.geometryBuffer=n.positions,Array.isArray(s))for(const a of s)this._rebuildGeometry(a);else this._rebuildGeometry()}updatePartialGeometry({startRow:t,endRow:e}){this._rebuildGeometry({startRow:t,endRow:e})}getGeometryFromBuffer(t){const e=t.value||t;return ArrayBuffer.isView(e)?Object(i.b)(e,{size:this.positionSize,offset:t.offset,stride:t.stride,startIndices:this.data.startIndices}):null}_allocate(t,e){const{attributes:n,buffers:r,_attributeDefs:i,typedArrayManager:o}=this;for(const a in i)if(a in r)o.release(n[a]),n[a]=null;else{const r=i[a];r.copy=e,n[a]=o.allocate(n[a],t,r)}}_forEachGeometry(t,e,n){const{data:r,getGeometry:o}=this,{iterable:a,objectInfo:s}=Object(i.a)(r,e,n);for(const i of a){s.index++;t(o?o(i,s):null,s.index)}}_rebuildGeometry(t){if(!this.data)return;let{indexStarts:e,vertexStarts:n,instanceCount:r}=this;const{data:i,geometryBuffer:o}=this,{startRow:a=0,endRow:u=1/0}=t||{},l={};if(t||(e=[0],n=[0]),this.normalize||!o)this._forEachGeometry(((t,e)=>{const r=t&&this.normalizeGeometry(t);l[e]=r,n[e+1]=n[e]+(r?this.getGeometrySize(r):0)}),a,u),r=n[n.length-1];else if(n=i.startIndices,r=n[i.length]||0,ArrayBuffer.isView(o))r=r||o.length/this.positionSize;else if(o instanceof s.a){const t=o.accessor.stride||4*this.positionSize;r=r||o.byteLength/t}else if(o.buffer){const t=o.stride||4*this.positionSize;r=r||o.buffer.byteLength/t}else if(o.value){const t=o.value,e=o.stride/t.BYTES_PER_ELEMENT||this.positionSize;r=r||t.length/e}this._allocate(r,Boolean(t)),this.indexStarts=e,this.vertexStarts=n,this.instanceCount=r;const c={};this._forEachGeometry(((t,i)=>{const o=l[i]||t;c.vertexStart=n[i],c.indexStart=e[i];const a=i<n.length-1?n[i+1]:r;c.geometrySize=a-n[i],c.geometryIndex=i,this.updateGeometryAttributes(o,c)}),a,u),this.vertexCount=e[e.length-1]}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r,i=n(303),o=n(22),a=n(93),s=n(95),u=n(26),l=n(23);!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"}(r||(r={}));const c=Object.freeze([1,0,0,0,1,0,0,0,1]);class f extends i.a{static get IDENTITY(){return function(){p||(p=new f,Object.freeze(p));return p}()}static get ZERO(){return function(){h||(h=new f([0,0,0,0,0,0,0,0,0]),Object.freeze(h));return h}()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return r}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):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.check()}identity(){return this.copy(c)}fromObject(t){return this.check()}fromQuaternion(t){return s.c(this,t),this.check()}set(t,e,n,r,i,o,a,s,u){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=u,this.check()}setRowMajor(t,e,n,r,i,o,a,s,u){return this[0]=t,this[1]=r,this[2]=a,this[3]=e,this[4]=i,this[5]=s,this[6]=n,this[7]=o,this[8]=u,this.check()}determinant(){return s.b(this)}transpose(){return s.i(this,this),this.check()}invert(){return s.d(this,this),this.check()}multiplyLeft(t){return s.e(this,t,this),this.check()}multiplyRight(t){return s.e(this,this,t),this.check()}rotate(t){return s.f(this,this,t),this.check()}scale(t){return Array.isArray(t)?s.g(this,this,t):s.g(this,this,[t,t]),this.check()}translate(t){return s.h(this,this,t),this.check()}transform(t,e){let n;switch(t.length){case 2:n=u.i(e||[-0,-0],t,this);break;case 3:n=l.s(e||[-0,-0,-0],t,this);break;case 4:n=Object(a.e)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(o.b)(n,t.length),n}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}}let h,p},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(201),i=n(12),o=n(22),a=n(26),s=n(93);class u extends r.a{constructor(t=0,e=0){super(2),Object(i.m)(t)&&1===arguments.length?this.copy(t):(i.f.debug&&(Object(o.a)(t),Object(o.a)(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return i.f.debug&&(Object(o.a)(t.x),Object(o.a)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return a.j(this,this,t),this.check()}transformAsVector(t){return Object(s.a)(this,this,t),this.check()}transformByMatrix3(t){return a.i(this,this,t),this.check()}transformByMatrix2x3(t){return a.h(this,this,t),this.check()}transformByMatrix2(t){return a.g(this,this,t),this.check()}}},function(t,e,n){"use strict";e.a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1),i=n(101);class o{constructor(t){Object(r.a)(this,"opts",void 0),t&&(this.opts=t)}equals(t){return this===t||this.constructor===t.constructor&&Object(i.a)(this.opts,t.opts)}getShaders(t){return null}getSubLayerProps(t){const{defaultProps:e}=t.constructor,n={updateTriggers:{}};for(const r in e)if(r in this.props){const t=e[r],i=this.props[r];n[r]=i,t&&"accessor"===t.type&&(n.updateTriggers[r]=this.props.updateTriggers[r],"function"===typeof i&&(n[r]=this.getSubLayerAccessor(i)))}return n}initializeState(t,e){}updateState(t,e){}draw(t,e){}finalizeState(t,e){}}Object(r.a)(o,"defaultProps",{})},function(t,e){t.exports=function(t){return t&&"object"===typeof t&&t.nodeType===Node.ELEMENT_NODE}},function(t,e){t.exports=function(){var t=document.createElement("div");return"draggable"in t&&"ondragstart"in t&&"ondrop"in t&&("FormData"in window&&"FileReader"in window)}},function(t,e){t.exports=function(t){for(;t&&!t.dir;)t=t.parentNode;return t?t.dir:void 0}},function(t,e,n){var r=n(937),i=n(940);t.exports=function(t,e){var n=(void 0===e?{}:e).logDropError,o=void 0===n?function(){}:n;return t.items&&t.items[0]&&"webkitGetAsEntry"in t.items[0]?r(t,o):i(t)}},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.TwoClickPolygonMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"handleClick",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw||(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"handleStartDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),t.cancelPan())}},{key:"handleStopDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"checkAndFinishPolygon",value:function(t){var e=this.getClickSequence(),n=this.getTentativeGuide(t);if(e.length>1&&n&&"Polygon"===n.geometry.type){var r={type:"Feature",properties:{shape:n.properties.shape},geometry:{type:"Polygon",coordinates:n.geometry.coordinates}},i=this.getAddFeatureOrBooleanPolygonAction(r,t);this.resetClickSequence(),i&&t.onEdit(i)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var o=r[0],a=e.mapCoords,s=this.getTwoClickPolygon(o,a,n);return s&&i.features.push({type:"Feature",properties:{shape:s.properties&&s.properties.shape,guideType:"tentative"},geometry:s.geometry}),i}},{key:"getTwoClickPolygon",value:function(t,e,n){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),a(l(p.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length&&(e=this.getTwoClickPolygon(r[0],i[0],t.modeConfig)),e}}])&&o(n.prototype,r),f&&o(n,f),p}(n(112).GeoJsonEditMode);e.TwoClickPolygonMode=f},function(t,e,n){},function(t,e,n){"use strict";n.d(e,"a",(function(){return q}));var r=n(1),i=n(357),o=n(491),a=n(492),s=n(27),u=n(6),l="#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 c={lightSources:{}};function f(){let{color:t=[0,0,0],intensity:e=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.map((t=>t*e/255))}function h(t){let{ambientLight:e,pointLights:n=[],directionalLights:r=[]}=t;const i={};return i["lighting_uAmbientLight.color"]=e?f(e):[0,0,0],n.forEach(((t,e)=>{i["lighting_uPointLight[".concat(e,"].color")]=f(t),i["lighting_uPointLight[".concat(e,"].position")]=t.position,i["lighting_uPointLight[".concat(e,"].attenuation")]=t.attenuation||[1,0,0]})),i.lighting_uPointLightCount=n.length,r.forEach(((t,e)=>{i["lighting_uDirectionalLight[".concat(e,"].color")]=f(t),i["lighting_uDirectionalLight[".concat(e,"].direction")]=t.direction})),i.lighting_uDirectionalLightCount=r.length,i}const p={name:"lights",vs:l,fs:l,getUniforms:function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;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({},h({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}};const d={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;\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;\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:[p]};var m=n(100),g=n(61),y=n(73),v=n(10);class b{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e}=t;this.id=e||Object(y.c)(this.constructor.name),this.display=!0,this.position=new m.a,this.rotation=new m.a,this.scale=new m.a(1,1,1),this.matrix=new g.a,this.userData={},this.props={},this._setScenegraphNodeProps(t)}delete(){}setProps(t){return this._setScenegraphNodeProps(t),this}toString(){return"{type: ScenegraphNode, id: ".concat(this.id,")}")}setPosition(t){return Object(v.a)(3===t.length,"setPosition requires vector argument"),this.position=t,this}setRotation(t){return Object(v.a)(3===t.length,"setRotation requires vector argument"),this.rotation=t,this}setScale(t){return Object(v.a)(3===t.length,"setScale requires vector argument"),this.scale=t,this}setMatrix(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.matrix.copy(t):this.matrix=t}setMatrixComponents(t){let{position:e,rotation:n,scale:r,update:i=!0}=t;return e&&this.setPosition(e),n&&this.setRotation(n),r&&this.setScale(r),i&&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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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){Object(v.a)(t),e=e||this.matrix;const n=new g.a(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 _=n(50),A=n(104);class w extends b{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=Array.isArray(t)?{children:t}:t;const{children:e=[]}=t;u.k.assert(e.every((t=>t instanceof b)),"every child must an instance of ScenegraphNode"),super(t),this.children=e}add(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(const r of e)Array.isArray(r)?this.add(...r):this.children.push(r);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}delete(){this.children.forEach((t=>t.delete())),this.removeAll(),super.delete()}traverse(t){let{worldMatrix:e=new g.a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new g.a(e).multiplyRight(this.matrix);for(const r of this.children)r instanceof w?r.traverse(t,{worldMatrix:n}):t(r,{worldMatrix:n})}}var x=n(335);const E={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},O={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function S(t){if(!t._animation){const e=O[t.componentType],n=E[t.type],r=n*t.count,{buffer:i,byteOffset:o}=t.bufferView.data,a=new e(i,o+(t.byteOffset||0),r);if(1===n)t._animation=Array.from(a);else{const e=[];for(let t=0;t<a.length;t+=n)e.push(Array.from(a.slice(t,t+n)));t._animation=e}}return t._animation}const P=new g.a;const C=new x.a;function T(t,e,n,r){let{input:i,interpolation:o,output:a}=e;const s=t%i[i.length-1],l=i.findIndex((t=>t>=s)),c=Math.max(0,l-1);if(!Array.isArray(n[r]))switch(r){case"translation":n[r]=[0,0,0];break;case"rotation":n[r]=[0,0,0,1];break;case"scale":n[r]=[1,1,1];break;default:u.k.warn("Bad animation path ".concat(r))()}Object(v.a)(n[r].length===a[c].length);const f=i[c],h=i[l];switch(o){case"STEP":!function(t,e,n){for(let r=0;r<n.length;r++)t[e][r]=n[r]}(n,r,a[c]);break;case"LINEAR":if(h>f){const t=(s-f)/(h-f);!function(t,e,n,r,i){if("rotation"===e){C.slerp({start:n,target:r,ratio:i});for(let n=0;n<C.length;n++)t[e][n]=C[n]}else for(let o=0;o<n.length;o++)t[e][o]=i*r[o]+(1-i)*n[o]}(n,r,a[c],a[l],t)}break;case"CUBICSPLINE":if(h>f){const t=(s-f)/(h-f),e=h-f;!function(t,e,n){let{p0:r,outTangent0:i,inTangent1:o,p1:a,tDiff:s,ratio:u}=n;for(let l=0;l<t[e].length;l++){const n=i[l]*s,c=o[l]*s;t[e][l]=(2*Math.pow(u,3)-3*Math.pow(u,2)+1)*r[l]+(Math.pow(u,3)-2*Math.pow(u,2)+u)*n+(-2*Math.pow(u,3)+3*Math.pow(u,2))*a[l]+(Math.pow(u,3)-Math.pow(u,2))*c}}(n,r,{p0:a[3*c+1],outTangent0:a[3*c+2],inTangent1:a[3*l+0],p1:a[3*l+1],tDiff:e,ratio:t})}break;default:u.k.warn("Interpolation ".concat(o," 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;this.channels.forEach((t=>{let{sampler:n,target:r,path:i}=t;T(e,n,r,i),function(t,e){if(e.matrix.identity(),t.translation&&e.matrix.translate(t.translation),t.rotation){const n=P.fromQuaternion(t.rotation);e.matrix.multiplyRight(n)}t.scale&&e.matrix.scale(t.scale)}(r,r._node)}))}}class I{constructor(t){this.animations=t.animations.map(((e,n)=>{const r=e.name||"Animation-".concat(n),i=e.samplers.map((e=>{let{input:n,interpolation:r="LINEAR",output:i}=e;return{input:S(t.accessors[n]),interpolation:r,output:S(t.accessors[i])}})),o=e.channels.map((e=>{let{sampler:n,target:r}=e;return{sampler:i[n],target:t.nodes[r.node],path:r.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 L=n(366);class j extends b{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.onBeforeRender=null,this.AfterRender=null,t instanceof L.a?(this.model=t,this._setModelNodeProps(e)):this.model=new L.a(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(){return this.model.draw(...arguments)}setUniforms(){return this.model.setUniforms(...arguments),this}setAttributes(){return this.model.setAttributes(...arguments),this}updateModuleSettings(){return this.model.updateModuleSettings(...arguments),this}_setModelNodeProps(t){this.model.setProps(t)}}var M=n(569);function R(t,e){return Object(u.j)(t)?"#version 300 es\n".concat(e):e}const N={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},D={modelOptions:{},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1};class F{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.options=Object.assign({},D,e)}instantiate(t){this.gltf=t;return(t.scenes||[]).map((t=>this.createScene(t)))}createAnimator(){return Array.isArray(this.gltf.animations)?new I(this.gltf):null}createScene(t){const e=(t.nodes||[]).map((t=>this.createNode(t)));return new w({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 w({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 g.a).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 w({id:t.name||t.id,children:e});t._mesh=n}return t._mesh}getVertexCount(t){u.k.warn("getVertexCount() not found")()}createPrimitive(t,e,n){return function(t,e){const{id:n,drawMode:r,vertexCount:i,attributes:o,modelOptions:a}=e,s=new M.a(t,e);u.k.info(4,"createGLTFModel defines: ",s.defines)();const l=[];l.push(...s.generatedTextures),l.push(...Object.values(o).map((t=>t.buffer)));const c=new j(t,Object.assign({id:n,drawMode:r,vertexCount:i,modules:[d],defines:s.defines,parameters:s.parameters,vs:R(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:R(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:l},a));return c.setProps({attributes:o}),c.setUniforms(s.uniforms),c}(this.gl,Object.assign({id:t.name||"".concat(n.name||n.id,"-primitive-").concat(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))),u.k.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 _.a(this.gl,{id:"from-".concat(n.id),data:n.data||t.value,target:e})),n.lumaBuffers[e]}createAccessor(t,e){return new A.a({buffer:e,offset:t.byteOffset||0,stride:t.bufferView.byteStride||0,type:t.componentType,size:N[t.type]})}createSampler(t){return t}needsPOT(){return!1}}var B=n(1528);async function z(t){const e=[];return 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 U=n(207);const G=[255,255,255,255],V={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:G},_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:[B.a]};class q extends i.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(){const t=[o.a,a.a];return"pbr"===this.props._lighting&&t.push(d),{vs:"#version 300 es\n\n// Instance attributes\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\n\n// Uniforms\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform mat4 sceneModelMatrix;\nuniform bool composeModelMatrix;\n\n// Attributes\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\n\n// Varying\nout vec4 vColor;\n\n// MODULE_PBR contains all the varying definitions needed\n#ifndef MODULE_PBR\n  #ifdef HAS_UV\n    out vec2 vTEXCOORD_0;\n  #endif\n#endif\n\n// Main\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  vec3 normal = vec3(0.0, 0.0, 1.0);\n  #ifdef MODULE_PBR\n    #ifdef HAS_NORMALS\n      normal = instanceModelMatrix * (sceneModelMatrix * vec4(NORMAL.xyz, 0.0)).xyz;\n    #endif\n  #endif\n\n  float originalSize = project_size_to_pixel(sizeScale);\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    // using instancePositions as world coordinates\n    // when using globe mode, this branch does not re-orient the model to align with the surface of the earth\n    // call project_normal before setting position to avoid rotation\n    geometry.normal = project_normal(normal);\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    geometry.normal = project_normal(normal);\n  }\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  #ifdef MODULE_PBR\n    // set PBR data\n    pbr_vPosition = geometry.position.xyz;\n    #ifdef HAS_NORMALS\n      pbr_vNormal = geometry.normal;\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  vColor = instanceColors;\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n\n// Uniforms\nuniform float opacity;\n\n// Varying\nin vec4 vColor;\n\nout vec4 fragmentColor;\n\n// MODULE_PBR contains all the varying definitions needed\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:G,transition:!0},instanceModelMatrix:U.a})}updateState(t){super.updateState(t);const{props:e,oldProps:n}=t;e.scenegraph!==n.scenegraph?this._updateScenegraph():e._animations!==n._animations&&this._applyAnimationsProp(this.state.scenegraph,this.state.animator,e._animations)}finalizeState(t){super.finalizeState(t),this._deleteScenegraph()}_updateScenegraph(){const t=this.props,{gl:e}=this.context;let n=null;if(t.scenegraph instanceof b)n={scenes:[t.scenegraph]};else if(t.scenegraph&&!t.scenegraph.gltf){const r=t.scenegraph,i=function(t,e,n){const r=new F(t,n);return{scenes:r.instantiate(e),animator:r.createAnimator()}}(e,r,this._getModelOptions());n={gltf:r,...i},z(i).then((()=>this.setNeedsRedraw()))}else t.scenegraph&&(s.a.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 b?(this._deleteScenegraph(),this._applyAllAttributes(i),this._applyAnimationsProp(i,o,t._animations),this.setState({scenegraph:i,animator:o})):null!==i&&s.a.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):s.a.warn("animation ".concat(t," not found"))()}else{const n=r.find((({name:e})=>e===t));n?Object.assign(n,e):s.a.warn("animation ".concat(t," not found"))()}}))}_deleteScenegraph(){const{scenegraph:t}=this.state;t instanceof b&&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:!Object(u.j)(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}=this.context,{sizeScale:i,sizeMinPixels:o,sizeMaxPixels:a,opacity:s,coordinateSystem:u}=this.props,l=this.getNumInstances();this.state.scenegraph.traverse(((n,{worldMatrix:c})=>{n.model.setInstanceCount(l),n.updateModuleSettings(t),n.draw({parameters:e,uniforms:{sizeScale:i,opacity:s,sizeMinPixels:o,sizeMaxPixels:a,composeModelMatrix:Object(U.b)(r,u),sceneModelMatrix:c,u_Camera:n.model.getUniforms().project_uCameraPosition}})}))}}Object(r.a)(q,"defaultProps",V),Object(r.a)(q,"layerName","ScenegraphLayer")},function(t,e,n){"use strict";n.d(e,"a",(function(){return W}));var r=n(1),i=n(359),o=n(101),a=n(27),s=n(108);class u{constructor(t){Object(r.a)(this,"width",void 0),Object(r.a)(this,"height",void 0),Object(r.a)(this,"views",void 0),Object(r.a)(this,"viewState",void 0),Object(r.a)(this,"controllers",void 0),Object(r.a)(this,"timeline",void 0),Object(r.a)(this,"_viewports",void 0),Object(r.a)(this,"_viewportMap",void 0),Object(r.a)(this,"_isUpdating",void 0),Object(r.a)(this,"_needsRedraw",void 0),Object(r.a)(this,"_needsUpdate",void 0),Object(r.a)(this,"_eventManager",void 0),Object(r.a)(this,"_eventCallbacks",void 0),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="First render",this._needsUpdate="Initialize",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){const e=this.controllers[t];e&&e.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 this.views.find((e=>e.id===t))}getViewState(t){const e="string"===typeof t?this.getView(t):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}setProps(t){t.views&&this._setViews(t.views),t.viewState&&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=Object(s.b)(t,Boolean);this._diffViews(t,this.views)&&this.setNeedsUpdate("views changed"),this.views=t}_setViewState(t){if(t){!Object(o.a)(t,this.viewState)&&this.setNeedsUpdate("viewState changed"),this.viewState=t}else a.a.warn("missing `viewState` or `initialViewState`")()}_onViewStateChange(t,e){this._eventCallbacks.onViewStateChange&&this._eventCallbacks.onViewStateChange({...e,viewId:t})}_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=>{var n;return null===(n=this.getView(t.id))||void 0===n?void 0:n.makeViewport({viewState:e,width:this.width,height:this.height})}})}_updateController(t,e,n,r){const i=t.controller;if(i){const o={...e,...i,id:t.id,x:n.x,y:n.y,width:n.width,height:n.height};return r||(r=this._createController(t,o)),r&&r.setProps(o),r}return null}_rebuildViewports(){const{views:t}=this,e=this.controllers;this._viewports=[],this.controllers={};let n=!1;for(let r=t.length;r--;){const i=t[r],o=this.getViewState(i),a=i.makeViewport({viewState:o,width:this.width,height:this.height});let s=e[i.id];const u=Boolean(i.controller);u&&!s&&(n=!0),!n&&u||!s||(s.finalize(),s=null),this.controllers[i.id]=this._updateController(i,o,a,s),this._viewports.unshift(a)}for(const r in e){const t=e[r];t&&!this.controllers[r]&&t.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 l=n(301),c=n(264),f=n(173),h=n(12),p=n(123),d=n(6),m=n(15),g=n(129);class y extends g.a{constructor(t,e){super(t,e),Object(r.a)(this,"maskMap",void 0),Object(r.a)(this,"fbo",void 0);const{mapSize:n=2048}=e;this.maskMap=new f.a(t,{width:n,height:n,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.fbo=new p.a(t,{id:"maskmap",width:n,height:n,attachments:{36064:this.maskMap}})}render(t){const e=this.gl,n=[!1,!1,!1,!1];return n[t.channel]=!0,Object(d.o)(e,{clearColor:[255,255,255,255],blend:!0,blendFunc:[0,1],blendEquation:32778,colorMask:n,depthTest:!1},(()=>super.render({...t,target:this.fbo,pass:"mask"})))}shouldDrawLayer(t){return t.props.operation===m.c.MASK}delete(){this.fbo.delete(),this.maskMap.delete()}}var v=n(354),b=n(115),_=n(24);class A{constructor(){Object(r.a)(this,"id","mask-effect"),Object(r.a)(this,"props",null),Object(r.a)(this,"useInPicking",!0),Object(r.a)(this,"dummyMaskMap",void 0),Object(r.a)(this,"channels",[]),Object(r.a)(this,"masks",null),Object(r.a)(this,"maskPass",void 0),Object(r.a)(this,"maskMap",void 0),Object(r.a)(this,"lastViewport",void 0)}preRender(t,{layers:e,layerFilter:n,viewports:r,onViewportActive:i,views:o}){this.dummyMaskMap||(this.dummyMaskMap=new f.a(t,{width:1,height:1}));const a=e.filter((t=>t.props.visible&&t.props.operation===m.c.MASK));if(0===a.length)return this.masks=null,void(this.channels.length=0);this.masks={},this.maskPass||(this.maskPass=new y(t,{id:"default-mask"}),this.maskMap=this.maskPass.maskMap);const s=this._sortMaskChannels(a),u=r[0],l=!this.lastViewport||!this.lastViewport.equals(u);for(const c in s)this._renderChannel(s[c],{layerFilter:n,onViewportActive:i,views:o,viewport:u,viewportChanged:l})}_renderChannel(t,{layerFilter:e,onViewportActive:n,views:r,viewport:i,viewportChanged:o}){const a=this.channels[t.index];if(!a)return;const s=t===a||a.layers.length!==t.layers.length||t.layerBounds.some(((t,e)=>t!==a.layerBounds[e]));if(t.bounds=a.bounds,t.maskBounds=a.maskBounds,this.channels[t.index]=t,(s||o)&&(this.lastViewport=i,t.bounds=function({layers:t,viewport:e}){let n=null;for(const o of t){const t=o.getBounds();t&&(n?(n[0]=Math.min(n[0],t[0][0]),n[1]=Math.min(n[1],t[0][1]),n[2]=Math.max(n[2],t[1][0]),n[3]=Math.max(n[3],t[1][1])):n=[t[0][0],t[0][1],t[1][0],t[1][1]])}const r=e.getBounds();if(!n)return r;const i=function(t){const e={x:t[2]-t[0],y:t[3]-t[1]},n={x:t[0]+.5*e.x,y:t[1]+.5*e.y};return[n.x-e.x,n.y-e.y,n.x+e.x,n.y+e.y]}(r);return n[2]-n[0]<i[2]-i[0]||n[3]-n[1]<i[3]-i[1]||(n[0]=Math.max(n[0],i[0]),n[1]=Math.max(n[1],i[1]),n[2]=Math.min(n[2],i[2]),n[3]=Math.min(n[3],i[3])),n}({layers:t.layers,viewport:i}),s||!Object(h.j)(t.bounds,a.bounds))){const{maskPass:o,maskMap:a}=this,s=function({bounds:t,viewport:e,width:n,height:r}){if(t[2]<=t[0]||t[3]<=t[1])return null;if(n-=2,r-=2,e instanceof b.a){const{longitude:e,latitude:i,zoom:o}=Object(_.d)({width:n,height:r,bounds:[[t[0],t[1]],[t[2],t[3]]],maxZoom:20});return new b.a({longitude:e,latitude:i,zoom:o,x:1,y:1,width:n,height:r})}const i=[(t[0]+t[2])/2,(t[1]+t[3])/2,0],o=Math.min(20,n/(t[2]-t[0]),r/(t[3]-t[1]));return new v.a({x:1,y:1}).makeViewport({width:n,height:r,viewState:{target:i,zoom:Math.log2(o)}})}({bounds:t.bounds,viewport:i,width:a.width,height:a.height});t.maskBounds=s?s.getBounds():[0,0,1,1],o.render({pass:"mask",channel:t.index,layers:t.layers,layerFilter:e,viewports:s?[s]:[],onViewportActive:n,views:r,moduleParameters:{devicePixelRatio:1}})}this.masks[t.id]={index:t.index,bounds:t.maskBounds,coordinateOrigin:t.coordinateOrigin,coordinateSystem:t.coordinateSystem}}_sortMaskChannels(t){const e={};let n=0;for(const r of t){const{id:t}=r.root;let i=e[t];if(!i){if(++n>4){a.a.warn("Too many mask layers. The max supported is 4")();continue}i={id:t,index:this.channels.findIndex((e=>(null===e||void 0===e?void 0:e.id)===t)),layers:[],layerBounds:[],coordinateOrigin:r.root.props.coordinateOrigin,coordinateSystem:r.root.props.coordinateSystem},e[t]=i}i.layers.push(r),i.layerBounds.push(r.getBounds())}for(let r=0;r<4;r++){const t=this.channels[r];t&&t.id in e||(this.channels[r]=null)}for(const r in e){const t=e[r];t.index<0&&(t.index=this.channels.findIndex((t=>!t)),this.channels[t.index]=t)}return e}getModuleParameters(){return{maskMap:this.masks?this.maskMap:this.dummyMaskMap,maskChannels:this.masks}}cleanup(){this.dummyMaskMap&&(this.dummyMaskMap.delete(),this.dummyMaskMap=void 0),this.maskPass&&(this.maskPass.delete(),this.maskPass=void 0,this.maskMap=void 0),this.lastViewport=void 0,this.masks=null,this.channels.length=0}}const w=new c.a;class x{constructor(){Object(r.a)(this,"effects",void 0),Object(r.a)(this,"_internalEffects",void 0),Object(r.a)(this,"_needsRedraw",void 0),this.effects=[],this._internalEffects=[],this._needsRedraw="Initial render",this.setEffects()}setProps(t){"effects"in t&&(t.effects.length===this.effects.length&&Object(o.a)(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._internalEffects=t.slice(),this._internalEffects.push(new A),t.some((t=>t instanceof c.a))||this._internalEffects.push(w)}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}}var E=n(360),O=n(411),S=n(311);const P={pickedColor:null,pickedObjectIndex:-1};function C({pickedColors:t,decodePickingColor:e,deviceX:n,deviceY:r,deviceRadius:i,deviceRect:o}){const{x:s,y:u,width:l,height:c}=o;let f=i*i,h=-1,p=0;for(let a=0;a<c;a++){const e=a+u-r,i=e*e;if(i>f)p+=4*l;else for(let r=0;r<l;r++){if(t[p+3]-1>=0){const t=r+s-n,e=t*t+i;e<=f&&(f=e,h=p)}p+=4}}if(h>=0){const n=t.slice(h,h+4),r=e(n);if(r){const t=Math.floor(h/4/l),e=h/4-t*l;return{...r,pickedColor:n,pickedX:s+e,pickedY:u+t}}a.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}return P}function T({pickInfo:t,viewports:e,pixelRatio:n,x:r,y:i,z:o}){let a,s=e[0];if(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})),s){const t=[r-s.x,i-s.y];void 0!==o&&(t[2]=o),a=s.unproject(t)}return{color:null,layer:null,viewport:s,index:-1,picked:!1,x:r,y:i,pixel:[r,i],coordinate:a,devicePixel:t&&"pickedX"in t?[t.pickedX,t.pickedY]:void 0,pixelRatio:n}}function k(t){const{pickInfo:e,lastPickedInfo:n,mode:r,layers:i}=t,{pickedColor:o,pickedLayer:a,pickedObjectIndex:s}=e,u=a?[a]:[];if("hover"===r){const t=n.index,e=n.layerId,r=a?a.props.id:null;if(r!==e||s!==t){if(r!==e){const t=i.find((t=>t.props.id===e));t&&u.unshift(t)}n.layerId=r,n.index=s,n.info=null}}const l=T(t),c=new Map;return c.set(null,l),u.forEach((t=>{let e={...l};t===a&&(e.color=o,e.index=s,e.picked=!0),e=I({layer:t,info:e,mode:r});const i=e.layer;t===a&&"hover"===r&&(n.info=e),c.set(i.id,e),"hover"===r&&i.updateAutoHighlight(e)})),c}function I({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 L{constructor(t){Object(r.a)(this,"gl",void 0),Object(r.a)(this,"pickingFBO",void 0),Object(r.a)(this,"depthFBO",void 0),Object(r.a)(this,"pickLayersPass",void 0),Object(r.a)(this,"layerFilter",void 0),Object(r.a)(this,"lastPickedInfo",void 0),Object(r.a)(this,"_pickable",!0),this.gl=t,this.pickLayersPass=new S.a(t),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())}pickObject(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,a=i&&i.viewport&&i.viewport.id,s=o?n.find((t=>t.id===o)):null,u=a&&r.find((t=>t.id===a))||r[0],l=u&&u.unproject([t-u.x,e-u.y]),c={x:t,y:e,viewport:u,coordinate:l,layer:s};return{...i,...c}}_resizeBuffer(){var t,e;const{gl:n}=this;if(!this.pickingFBO&&(this.pickingFBO=new p.a(n),p.a.isSupported(n,{colorBufferFloat:!0}))){const t=new p.a(n);t.attach({36064:new f.a(n,{format:Object(d.j)(n)?34836:6408,type:5126})}),this.depthFBO=t}null===(t=this.pickingFBO)||void 0===t||t.resize({width:n.canvas.width,height:n.canvas.height}),null===(e=this.depthFBO)||void 0===e||e.resize({width:n.canvas.width,height:n.canvas.height})}_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:a=1,mode:s="query",unproject3D:u,onViewportActive:l,effects:c}){const f=this._getPickable(t),h=Object(d.e)(this.gl);if(!f)return{result:[],emptyInfo:T({viewports:n,x:r,y:i,pixelRatio:h})};this._resizeBuffer();const p=Object(d.d)(this.gl,[r,i],!0),m=[p.x+Math.floor(p.width/2),p.y+Math.floor(p.height/2)],g=Math.round(o*h),{width:y,height:v}=this.pickingFBO,b=this._getPickingRect({deviceX:m[0],deviceY:m[1],deviceRadius:g,deviceWidth:y,deviceHeight:v}),_={x:r-o,y:i-o,width:2*o+1,height:2*o+1};let A;const w=[],x=new Set;for(let d=0;d<a;d++){let t,o;if(b){t=C({...this._drawAndSample({layers:f,views:e,viewports:n,onViewportActive:l,deviceRect:b,cullRect:_,effects:c,pass:"picking:".concat(s)}),deviceX:m[0],deviceY:m[1],deviceRadius:g,deviceRect:b})}else t={pickedColor:null,pickedObjectIndex:-1};if(t.pickedLayer&&u&&this.depthFBO){o=this._drawAndSample({layers:[t.pickedLayer],views:e,viewports:n,onViewportActive:l,deviceRect:{x:t.pickedX,y:t.pickedY,width:1,height:1},cullRect:_,effects:c,pass:"picking:".concat(s,":z")},!0).pickedColors[0]}t.pickedLayer&&d+1<a&&(x.add(t.pickedLayer),t.pickedLayer.disablePickingIndex(t.pickedObjectIndex)),A=k({pickInfo:t,lastPickedInfo:this.lastPickedInfo,mode:s,layers:f,viewports:n,x:r,y:i,z:o,pixelRatio:h});for(const e of A.values())e.layer&&w.push(e);if(!t.pickedColor)break}for(const d of x)d.restorePickingColors();return{result:w,emptyInfo:A.get(null)}}_pickVisibleObjects({layers:t,views:e,viewports:n,x:r,y:i,width:o=1,height:s=1,mode:u="query",maxObjects:l=null,onViewportActive:c,effects:f}){const h=this._getPickable(t);if(!h)return[];this._resizeBuffer();const p=Object(d.e)(this.gl),m=Object(d.d)(this.gl,[r,i],!0),g=m.x,y=m.y+m.height,v=Object(d.d)(this.gl,[r+o,i+s],!0),b=v.x+v.width,_=v.y,A={x:g,y:_,width:b-g,height:y-_},w=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,color:i}):a.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return Array.from(n.values())}(this._drawAndSample({layers:h,views:e,viewports:n,onViewportActive:c,deviceRect:A,cullRect:{x:r,y:i,width:o,height:s},effects:f,pass:"picking:".concat(u)})),x=new Map,E=Number.isFinite(l);for(let a=0;a<w.length&&!(E&&l&&x.size>=l);a++){const t=w[a];let e={color:t.pickedColor,layer:null,index:t.pickedObjectIndex,picked:!0,x:r,y:i,pixelRatio:p};e=I({layer:t.pickedLayer,info:e,mode:u}),x.has(e.object)||x.set(e.object,e)}return Array.from(x.values())}_drawAndSample({layers:t,views:e,viewports:n,onViewportActive:r,deviceRect:i,cullRect:o,effects:a,pass:s},u=!1){const l=u?this.depthFBO:this.pickingFBO,{decodePickingColor:c}=this.pickLayersPass.render({layers:t,layerFilter:this.layerFilter,views:e,viewports:n,onViewportActive:r,pickingFBO:l,deviceRect:i,cullRect:o,effects:a,pass:s,pickZ:u}),{x:f,y:h,width:p,height:d}=i,m=new(u?Float32Array:Uint8Array)(p*d*4);return Object(O.c)(l,{sourceX:f,sourceY:h,sourceWidth:p,sourceHeight:d,target:m}),{pickedColors:m,decodePickingColor:c}}_getPickingRect({deviceX:t,deviceY:e,deviceRadius:n,deviceWidth:r,deviceHeight:i}){const o=Math.max(0,t-n),a=Math.max(0,e-n),s=Math.min(r,t+n+1)-o,u=Math.min(i,e+n+1)-a;return s<=0||u<=0?null:{x:o,y:a,width:s,height:u}}}const j={zIndex:"1",position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:"0",left:"0",display:"none"};class M{constructor(t){Object(r.a)(this,"el",null),Object(r.a)(this,"isVisible",!1);const e=t.parentElement;e&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,j),e.appendChild(this.el))}setTooltip(t,e,n){const r=this.el;if(r){if("string"===typeof t)r.innerText=t;else{if(!t)return this.isVisible=!1,void(r.style.display="none");t.text&&(r.innerText=t.text),t.html&&(r.innerHTML=t.html),t.className&&(r.className=t.className),Object.assign(r.style,t.style)}this.isVisible=!0,r.style.display="block",r.style.transform="translate(".concat(e,"px, ").concat(n,"px)")}}remove(){this.el&&(this.el.remove(),this.el=null)}}var R=n(111),N=n(429),D=n(1430),F=n(1534),B=n(1446),z=n(208),U=n(124),G=n(251),V=n(42);function q(){}const H={id:"",width:"100%",height:"100%",style:null,viewState:null,initialViewState:null,pickingRadius:0,layerFilter:null,glOptions:{},parameters:{},parent:null,gl:null,canvas:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},_customRender:null,onWebGLInitialized:q,onResize:q,onViewStateChange:q,onInteractionStateChange:q,onBeforeRender:q,onAfterRender:q,onLoad:q,onError:t=>a.a.error(t.message)(),onHover:null,onClick:null,onDragStart:null,onDrag:null,onDragEnd:null,_onMetrics:null,getCursor:({isDragging:t})=>t?"grabbing":"grab",getTooltip:null,debug:!1,drawPickingColors:!1};class W{constructor(t){Object(r.a)(this,"props",void 0),Object(r.a)(this,"width",0),Object(r.a)(this,"height",0),Object(r.a)(this,"userData",{}),Object(r.a)(this,"canvas",null),Object(r.a)(this,"viewManager",null),Object(r.a)(this,"layerManager",null),Object(r.a)(this,"effectManager",null),Object(r.a)(this,"deckRenderer",null),Object(r.a)(this,"deckPicker",null),Object(r.a)(this,"eventManager",null),Object(r.a)(this,"tooltip",null),Object(r.a)(this,"metrics",void 0),Object(r.a)(this,"animationLoop",void 0),Object(r.a)(this,"stats",void 0),Object(r.a)(this,"viewState",void 0),Object(r.a)(this,"cursorState",void 0),Object(r.a)(this,"_needsRedraw",void 0),Object(r.a)(this,"_pickRequest",void 0),Object(r.a)(this,"_lastPointerDownInfo",null),Object(r.a)(this,"_metricsCounter",void 0),Object(r.a)(this,"_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})),Object(r.a)(this,"_onEvent",(t=>{const e=m.b[t.type],n=t.offsetCenter;if(!e||!n||!this.layerManager)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,a=o&&(o[e.handler]||o.props[e.handler]),s=this.props[e.handler];let u=!1;a&&(u=a.call(o,i,t)),!u&&s&&s(i,t)})),Object(r.a)(this,"_onPointerDown",(t=>{const e=t.offsetCenter,n=this._pick("pickObject","pickObject Time",{x:e.x,y:e.y,radius:this.props.pickingRadius});this._lastPointerDownInfo=n.result[0]||n.emptyInfo})),this.props={...H,...t},t=this.props,this._needsRedraw="Initial render",this._pickRequest={mode:"hover",x:-1,y:-1,radius:0,event:null},this.cursorState={isHovering:!1,isDragging:!1},t.viewState&&t.initialViewState&&a.a.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===Object(D.a)()&&a.a.warn("IE 11 is not supported")(),this.viewState=t.initialViewState,t.gl||"undefined"!==typeof document&&(this.canvas=this._createCanvas(t)),this.animationLoop=this._createAnimationLoop(t),this.stats=new U.a({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&&R.a.setOptions(t._typedArrayManagerProps),this.animationLoop.start()}finalize(){var t,e,n,r,i,o,a,s;(this.animationLoop.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,null===(t=this.layerManager)||void 0===t||t.finalize(),this.layerManager=null,null===(e=this.viewManager)||void 0===e||e.finalize(),this.viewManager=null,null===(n=this.effectManager)||void 0===n||n.finalize(),this.effectManager=null,null===(r=this.deckRenderer)||void 0===r||r.finalize(),this.deckRenderer=null,null===(i=this.deckPicker)||void 0===i||i.finalize(),this.deckPicker=null,null===(o=this.eventManager)||void 0===o||o.destroy(),this.eventManager=null,null===(a=this.tooltip)||void 0===a||a.remove(),this.tooltip=null,this.props.canvas||this.props.gl||!this.canvas)||(null===(s=this.canvas.parentElement)||void 0===s||s.removeChild(this.canvas),this.canvas=null)}setProps(t){this.stats.get("setProps Time").timeStart(),"onLayerHover"in t&&a.a.removed("onLayerHover","onHover")(),"onLayerClick"in t&&a.a.removed("onLayerClick","onClick")(),t.initialViewState&&!Object(o.a)(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.layerManager)return!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;let e=this.needsRedraw({clearRedrawFlags:!0});e=t||e,e&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(e):this._drawLayers(e))}get isInitialized(){return null!==this.viewManager}getViews(){return Object(V.a)(this.viewManager),this.viewManager.views}getViewports(t){return Object(V.a)(this.viewManager),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){Object(V.a)(this.deckPicker);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,effects:this.effectManager.getEffects(),...n});return r.get(e).timeEnd(),i}_createCanvas(t){let e=t.canvas;if("string"===typeof e&&(e=document.getElementById(e),Object(V.a)(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;const{width:e,height:n}=t;if(e||0===e){const t=Number.isFinite(e)?"".concat(e,"px"):e;this.canvas.style.width=t}if(n||0===n){var r;const e=Number.isFinite(n)?"".concat(n,"px"):n;this.canvas.style.position=(null===(r=t.style)||void 0===r?void 0:r.position)||"absolute",this.canvas.style.height=e}}_updateCanvasSize(){const{canvas:t}=this;if(!t)return;const e=t.clientWidth||t.width,n=t.clientHeight||t.height;var r;e===this.width&&n===this.height||(this.width=e,this.height=n,null===(r=this.viewManager)||void 0===r||r.setProps({width:e,height:n}),this.props.onResize({width:e,height:n}))}_createAnimationLoop(t){const{width:e,height:n,gl:r,glOptions:i,debug:o,onError:a,onBeforeRender:s,onAfterRender:u,useDevicePixels:l}=t;return new F.a({width:e,height:n,useDevicePixels:l,autoResizeViewport:!1,gl:r,onCreateContext:t=>Object(d.c)({...i,...t,canvas:this.canvas,debug:o,onContextLost:()=>this._onContextLost()}),onInitialize:t=>this._setGLContext(t.gl),onRender:this._onRenderFrame.bind(this),onBeforeRender:s,onAfterRender:u,onError:a})}_getViewState(){return this.props.viewState||this.viewState}_getViews(){let t=this.props.views||[new l.a({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"))}_pickAndCallback(){const{_pickRequest:t}=this;if(t.event){const{result:n,emptyInfo:r}=this._pick("pickObject","pickObject Time",t);this.cursorState.isHovering=n.length>0;let i=r,o=!1;for(const a of n){var e;i=a,o=(null===(e=a.layer)||void 0===e?void 0:e.onHover(a,t.event))||o}if(!o&&this.props.onHover&&this.props.onHover(i,t.event),this.props.getTooltip&&this.tooltip){const t=this.props.getTooltip(i);this.tooltip.setTooltip(t,i.x,i.y)}t.event=null}}_updateCursor(){const t=this.props.parent||this.canvas;t&&(t.style.cursor=this.props.getCursor(this.cursorState))}_setGLContext(t){if(this.layerManager)return;this.canvas||(this.canvas=t.canvas,Object(d.h)(t,{enable:!0,copyState:!0})),this.tooltip=new M(this.canvas),Object(d.n)(t,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(t);const e=new B.a;e.play(),this.animationLoop.attachTimeline(e),this.eventManager=new G.a(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 m.b)this.eventManager.on(r,this._onEvent);this.viewManager=new u({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 i.a(t,{deck:this,stats:this.stats,viewport:n,timeline:e}),this.effectManager=new x,this.deckRenderer=new E.a(t),this.deckPicker=new L(t),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}_drawLayers(t,e){const{gl:n}=this.layerManager.context;Object(d.n)(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(),a.a.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(),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.cursorState.isDragging=t.isDragging||!1,this.props.onInteractionStateChange(t)}_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=z.b.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}}Object(r.a)(W,"defaultProps",H),Object(r.a)(W,"VERSION",N.a.VERSION)},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(1),i=n(27),o=n(357),a=n(491),s=n(531),u=n(492),l=n(130),c=n(6),f=n(173),h=n(366),p=n(608),d=n(315),m=n(207);function g(t,e){(t.COLOR_0||t.colors)&&e||(t.colors={constant:!0,value:new Float32Array([1,1,1])}),i.a.assert(t.positions||t.POSITION,'no "postions" or "POSITION" attribute in mesh')}function y(t,e){if(t.attributes)return g(t.attributes,e),t instanceof l.a?t:new l.a(t);if(t.positions||t.POSITION)return g(t,e),new l.a({attributes:t});throw Error("Invalid mesh")}const v={mesh:{type:"object",value:null,async:!0},texture:{type:"image",value:null,async:!0},sizeScale:{type:"number",value:1,min:0},_useMeshColors:{type:"boolean",value:!1},_instanced:!0,wireframe:!1,material:!0,getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:[0,0,0,255]},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:[]}};class b extends o.a{constructor(...t){super(...t),Object(r.a)(this,"state",void 0)}getShaders(){const t=!Object(c.j)(this.context.gl),e={};return Object(p.b)(this.context.gl,d.a.GLSL_DERIVATIVES)&&(e.DERIVATIVES_AVAILABLE=1),super.getShaders({vs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\nuniform bool composeModelMatrix;\n\n// Primitive attributes\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\n\n// Instance attributes\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\n\n// Outputs to fragment shader\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = instancePickingColors;\n\n  vTexCoord = texCoords;\n  cameraPosition = project_uCameraPosition;\n  vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n\n  vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n\n  if (composeModelMatrix) {\n    DECKGL_FILTER_SIZE(pos, geometry);\n    // using instancePositions as world coordinates\n    // when using globe mode, this branch does not re-orient the model to align with the surface of the earth\n    // call project_normal before setting position to avoid rotation\n    normals_commonspace = project_normal(instanceModelMatrix * normals);\n    gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), position_commonspace);\n    geometry.position = position_commonspace;\n  }\n  else {\n    pos = project_size(pos);\n    DECKGL_FILTER_SIZE(pos, geometry);\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, position_commonspace);\n    geometry.position = position_commonspace;\n    normals_commonspace = project_normal(instanceModelMatrix * normals);\n  }\n\n  geometry.normal = normals_commonspace;\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n  geometry.uv = vTexCoord;\n\n  vec3 normal;\n  if (flatShading) {\n\n// NOTE(Tarek): This is necessary because\n// headless.gl reports the extension as\n// available but does not support it in\n// the shader.\n#ifdef DERIVATIVES_AVAILABLE\n    normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n    normal = vec3(0.0, 0.0, 1.0);\n#endif\n  } else {\n    normal = normals_commonspace;\n  }\n\n  vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n  vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n  fragColor = vec4(lightColor, color.a * opacity);\n\n  DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",modules:[a.a,s.b,u.a],transpileToGLSL100:t,defines:e})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{transition:!0,type:5130,fp64:this.use64bitPositions(),size:3,accessor:"getPosition"},instanceColors:{type:5121,transition:!0,size:this.props.colorFormat.length,normalized:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceModelMatrix:m.a}),this.setState({emptyTexture:new f.a(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}updateState(t){super.updateState(t);const{props:e,oldProps:n,changeFlags:r}=t;if(e.mesh!==n.mesh||r.extensionsChanged){var i;if(null===(i=this.state.model)||void 0===i||i.delete(),e.mesh){this.state.model=this.getModel(e.mesh);const t=e.mesh.attributes||e.mesh;this.setState({hasNormals:Boolean(t.NORMAL||t.normals)})}this.getAttributeManager().invalidateAll()}e.texture!==n.texture&&this.setTexture(e.texture),this.state.model&&this.state.model.setDrawMode(this.props.wireframe?3:4)}finalizeState(t){super.finalizeState(t),this.state.emptyTexture.delete()}draw({uniforms:t}){if(!this.state.model)return;const{viewport:e}=this.context,{sizeScale:n,coordinateSystem:r,_instanced:i}=this.props;this.state.model.setUniforms(t).setUniforms({sizeScale:n,composeModelMatrix:!i||Object(m.b)(e,r),flatShading:!this.state.hasNormals}).draw()}getModel(t){const e=new h.a(this.context.gl,{...this.getShaders(),id:this.props.id,geometry:y(t,this.props._useMeshColors),isInstanced:!0}),{texture:n}=this.props,{emptyTexture:r}=this.state;return e.setUniforms({sampler:n||r,hasTexture:Boolean(n)}),e}setTexture(t){const{emptyTexture:e,model:n}=this.state;n&&n.setUniforms({sampler:t||e,hasTexture:Boolean(t)})}}Object(r.a)(b,"defaultProps",v),Object(r.a)(b,"layerName","SimpleMeshLayer")},function(t,e,n){var r,i,o,a,s;function u(t){return new u.Viewer(t)}!function(t){t.version={versionStr:"4.1.1",major:parseInt("4",10),minor:parseInt("1",10),revision:parseInt("1",10)};var e,n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object AsyncFunction]":"function","[object Promise]":"promise","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},r=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.isFunction=function(e){return"function"===t.type(e)},t.isArray=Array.isArray||function(e){return"array"===t.type(e)},t.isWindow=function(t){return t&&"object"===typeof t&&"setInterval"in t},t.type=function(t){return null===t||void 0===t?String(t):n[r.call(t)]||"object"},t.isPlainObject=function(e){if(!e||"object"!==u.type(e)||e.nodeType||t.isWindow(e))return!1;if(e.constructor&&!i.call(e,"constructor")&&!i.call(e.constructor.prototype,"isPrototypeOf"))return!1;var n;for(var r in e)n=r;return void 0===n||i.call(e,n)},t.isEmptyObject=function(t){for(var e in t)return!1;return!0},t.freezeObject=function(e){return Object.freeze?t.freezeObject=Object.freeze:t.freezeObject=function(t){return t},t.freezeObject(e)},t.supportsCanvas=(e=document.createElement("canvas"),!(!t.isFunction(e.getContext)||!e.getContext("2d"))),t.isCanvasTainted=function(t){var e=!1;try{t.getContext("2d").getImageData(0,0,1,1)}catch(n){e=!0}return e},t.supportsAddEventListener=!(!document.documentElement.addEventListener||!document.addEventListener),t.supportsRemoveEventListener=!(!document.documentElement.removeEventListener||!document.removeEventListener),t.supportsEventListenerOptions=function(){var e=0;if(t.supportsAddEventListener)try{var n={get capture(){return e++,!1},get once(){return e++,!1},get passive(){return e++,!1}};window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(r){e=0}return e>=3}(),t.getCurrentPixelDensityRatio=function(){if(t.supportsCanvas){var e=document.createElement("canvas").getContext("2d"),n=window.devicePixelRatio||1,r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return Math.max(n,1)/r}return 1},t.pixelDensityRatio=t.getCurrentPixelDensityRatio()}(u),function(t){t.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=arguments.length,c=!1,f=1;for("boolean"===typeof s&&(c=s,s=arguments[1]||{},f=2),"object"===typeof s||u.isFunction(s)||(s={}),l===f&&(s=this,--f);f<l;f++)if(null!==(e=arguments[f])||void 0!==e)for(n in e){var h=Object.getOwnPropertyDescriptor(e,n);void 0!==h?h.get||h.set?Object.defineProperty(s,n,h):s!==(i=h.value)&&(c&&i&&(u.isPlainObject(i)||(o=u.isArray(i)))?(r=s[n],o?(o=!1,a=r&&u.isArray(r)?r:[]):a=r&&u.isPlainObject(r)?r:{},s[n]=u.extend(c,a,i)):void 0!==i&&(s[n]=i)):t.console.warn('Could not copy inherited property "'+n+'".')}return s};t.extend(t,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},splitHashDataForPost:!1,panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{dragToPan:!0,scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!1,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerDblClickDrag:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:function(){if("object"!==typeof navigator)return!1;var t=navigator.userAgent;return"string"===typeof t&&(-1!==t.indexOf("iPhone")||-1!==t.indexOf("iPad")||-1!==t.indexOf("iPod"))}(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorElement:null,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,opacity:1,preload:!1,compositeOperation:null,imageSmoothingEnabled:!0,placeholderFillStyle:null,subPixelRoundingForTransparency:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,useCanvas:!0,tileRetryMax:0,tileRetryDelay:2500,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"],silenceMultiImageWarnings:!1},SIGNAL:"----seadragon----",delegate:function(t,e){return function(){var n=arguments;return void 0===n&&(n=[]),e.apply(t,n)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},SUBPIXEL_ROUNDING_OCCURRENCES:{NEVER:0,ONLY_AT_REST:1,ALWAYS:2},_viewers:new Map,getViewer:function(e){return t._viewers.get(this.getElement(e))},getElement:function(t){return"string"===typeof t&&(t=document.getElementById(t)),t},getElementPosition:function(e){var n,r,o=new t.Point;for(r=i(e=t.getElement(e),n="fixed"===t.getElementStyle(e).position);r;)o.x+=e.offsetLeft,o.y+=e.offsetTop,n&&(o=o.plus(t.getPageScroll())),r=i(e=r,n="fixed"===t.getElementStyle(e).position);return o},getElementOffset:function(e){var n,r,i=(e=t.getElement(e))&&e.ownerDocument,o={top:0,left:0};return i?(n=i.documentElement,"undefined"!==typeof e.getBoundingClientRect&&(o=e.getBoundingClientRect()),r=i===i.window?i:9===i.nodeType&&(i.defaultView||i.parentWindow),new t.Point(o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0))):new t.Point},getElementSize:function(e){return e=t.getElement(e),new t.Point(e.clientWidth,e.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(e){return(e=t.getElement(e)).currentStyle}:function(e){return e=t.getElement(e),window.getComputedStyle(e,"")},getCssPropertyWithVendorPrefix:function(e){var n={};return t.getCssPropertyWithVendorPrefix=function(e){if(void 0!==n[e])return n[e];var r=document.createElement("div").style,i=null;if(void 0!==r[e])i=e;else for(var o=["Webkit","Moz","MS","O","webkit","moz","ms","o"],a=t.capitalizeFirstLetter(e),s=0;s<o.length;s++){var u=o[s]+a;if(void 0!==r[u]){i=u;break}}return n[e]=i,i},t.getCssPropertyWithVendorPrefix(e)},capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},positiveModulo:function(t,e){var n=t%e;return n<0&&(n+=e),n},pointInElement:function(e,n){e=t.getElement(e);var r=t.getElementOffset(e),i=t.getElementSize(e);return n.x>=r.x&&n.x<r.x+i.x&&n.y<r.y+i.y&&n.y>=r.y},getMousePosition:function(e){if("number"===typeof e.pageX)t.getMousePosition=function(e){var n=new t.Point;return n.x=e.pageX,n.y=e.pageY,n};else{if("number"!==typeof e.clientX)throw new Error("Unknown event mouse position, no known technique.");t.getMousePosition=function(e){var n=new t.Point;return n.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop,n}}return t.getMousePosition(e)},getPageScroll:function(){var e=document.documentElement||{},n=document.body||{};if("number"===typeof window.pageXOffset)t.getPageScroll=function(){return new t.Point(window.pageXOffset,window.pageYOffset)};else if(n.scrollLeft||n.scrollTop)t.getPageScroll=function(){return new t.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!e.scrollLeft&&!e.scrollTop)return new t.Point(0,0);t.getPageScroll=function(){return new t.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return t.getPageScroll()},setPageScroll:function(e){if("undefined"!==typeof window.scrollTo)t.setPageScroll=function(t){window.scrollTo(t.x,t.y)};else{var n=t.getPageScroll();if(n.x===e.x&&n.y===e.y)return;document.body.scrollLeft=e.x,document.body.scrollTop=e.y;var r=t.getPageScroll();if(r.x!==n.x&&r.y!==n.y)return void(t.setPageScroll=function(t){document.body.scrollLeft=t.x,document.body.scrollTop=t.y});if(document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y,(r=t.getPageScroll()).x!==n.x&&r.y!==n.y)return void(t.setPageScroll=function(t){document.documentElement.scrollLeft=t.x,document.documentElement.scrollTop=t.y});t.setPageScroll=function(t){}}t.setPageScroll(e)},getWindowSize:function(){var e=document.documentElement||{},n=document.body||{};if("number"===typeof window.innerWidth)t.getWindowSize=function(){return new t.Point(window.innerWidth,window.innerHeight)};else if(e.clientWidth||e.clientHeight)t.getWindowSize=function(){return new t.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!n.clientWidth&&!n.clientHeight)throw new Error("Unknown window size, no known technique.");t.getWindowSize=function(){return new t.Point(document.body.clientWidth,document.body.clientHeight)}}return t.getWindowSize()},makeCenteredNode:function(e){e=t.getElement(e);var n=[t.makeNeutralElement("div"),t.makeNeutralElement("div"),t.makeNeutralElement("div")];return t.extend(n[0].style,{display:"table",height:"100%",width:"100%"}),t.extend(n[1].style,{display:"table-row"}),t.extend(n[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),n[0].appendChild(n[1]),n[1].appendChild(n[2]),n[2].appendChild(e),n[0]},makeNeutralElement:function(t){var e=document.createElement(t),n=e.style;return n.background="transparent none",n.border="none",n.margin="0px",n.padding="0px",n.position="static",e},now:function(){return Date.now?t.now=Date.now:t.now=function(){return(new Date).getTime()},t.now()},makeTransparentImage:function(e){var n=t.makeNeutralElement("img");return n.src=e,n},setElementOpacity:function(e,n,r){var i;e=t.getElement(e),r&&!t.Browser.alpha&&(n=Math.round(n)),t.Browser.opacity?e.style.opacity=n<1?n:"":n<1?(i="alpha(opacity="+Math.round(100*n)+")",e.style.filter=i):e.style.filter=""},setElementTouchActionNone:function(e){"undefined"!==typeof(e=t.getElement(e)).style.touchAction?e.style.touchAction="none":"undefined"!==typeof e.style.msTouchAction&&(e.style.msTouchAction="none")},setElementPointerEvents:function(e,n){"undefined"!==typeof(e=t.getElement(e)).style&&"undefined"!==typeof e.style.pointerEvents&&(e.style.pointerEvents=n)},setElementPointerEventsNone:function(e){t.setElementPointerEvents(e,"none")},addClass:function(e,n){(e=t.getElement(e)).className?-1===(" "+e.className+" ").indexOf(" "+n+" ")&&(e.className+=" "+n):e.className=n},indexOf:function(t,e,n){return Array.prototype.indexOf?this.indexOf=function(t,e,n){return t.indexOf(e,n)}:this.indexOf=function(t,e,n){var r,i,o=n||0;if(!t)throw new TypeError;if(0===(i=t.length)||o>=i)return-1;for(o<0&&(o=i-Math.abs(o)),r=o;r<i;r++)if(t[r]===e)return r;return-1},this.indexOf(t,e,n)},removeClass:function(e,n){var r,i,o=[];for(r=(e=t.getElement(e)).className.split(/\s+/),i=0;i<r.length;i++)r[i]&&r[i]!==n&&o.push(r[i]);e.className=o.join(" ")},normalizeEventListenerOptions:function(e){return"undefined"!==typeof e?"boolean"===typeof e?t.supportsEventListenerOptions?{capture:e}:e:t.supportsEventListenerOptions?e:"undefined"!==typeof e.capture&&e.capture:!!t.supportsEventListenerOptions&&{capture:!1}},addEvent:function(){if(t.supportsAddEventListener)return function(e,n,r,i){i=t.normalizeEventListenerOptions(i),(e=t.getElement(e)).addEventListener(n,r,i)};if(document.documentElement.attachEvent&&document.attachEvent)return function(e,n,r){(e=t.getElement(e)).attachEvent("on"+n,r)};throw new Error("No known event model.")}(),removeEvent:function(){if(t.supportsRemoveEventListener)return function(e,n,r,i){i=t.normalizeEventListenerOptions(i),(e=t.getElement(e)).removeEventListener(n,r,i)};if(document.documentElement.detachEvent&&document.detachEvent)return function(e,n,r){(e=t.getElement(e)).detachEvent("on"+n,r)};throw new Error("No known event model.")}(),cancelEvent:function(t){t.preventDefault()},eventIsCanceled:function(t){return t.defaultPrevented},stopEvent:function(t){t.stopPropagation()},createCallback:function(t,e){var n,r=[];for(n=2;n<arguments.length;n++)r.push(arguments[n]);return function(){var n,i=r.concat([]);for(n=0;n<arguments.length;n++)i.push(arguments[n]);return e.apply(t,i)}},getUrlParameter:function(t){var e=r[t];return e||null},getUrlProtocol:function(t){var e=t.match(/^([a-z]+:)\/\//i);return null===e?window.location.protocol:e[1].toLowerCase()},createAjaxRequest:function(e){var n;try{n=!!new ActiveXObject("Microsoft.XMLHTTP")}catch(r){n=!1}if(n)window.XMLHttpRequest?t.createAjaxRequest=function(t){return t?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}:t.createAjaxRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};else{if(!window.XMLHttpRequest)throw new Error("Browser doesn't support XMLHttpRequest.");t.createAjaxRequest=function(){return new XMLHttpRequest}}return t.createAjaxRequest(e)},makeAjaxRequest:function(e,n,r){var i,o,a,s;t.isPlainObject(e)&&(n=e.success,r=e.error,i=e.withCredentials,o=e.headers,a=e.responseType||null,s=e.postData||null,e=e.url);var u=t.getUrlProtocol(e),l=t.createAjaxRequest("file:"===u);if(!t.isFunction(n))throw new Error("makeAjaxRequest requires a success callback");l.onreadystatechange=function(){4===l.readyState&&(l.onreadystatechange=function(){},l.status>=200&&l.status<300||0===l.status&&"http:"!==u&&"https:"!==u?n(l):t.isFunction(r)?r(l):t.console.error("AJAX request returned %d: %s",l.status,e))};var c=s?"POST":"GET";try{if(l.open(c,e,!0),a&&(l.responseType=a),o)for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&o[f]&&l.setRequestHeader(f,o[f]);i&&(l.withCredentials=!0),l.send(s)}catch(h){t.console.error("%s while making AJAX request: %s",h.name,h.message),l.onreadystatechange=function(){},t.isFunction(r)&&r(l,h)}return l},jsonp:function(e){var n,r=e.url,i=document.head||document.getElementsByTagName("head")[0]||document.documentElement,o=e.callbackName||"openseadragon"+t.now(),a=window[o],s="$1"+o+"$2",u=e.param||"callback",l=e.callback;r=r.replace(/(=)\?(&|$)|\?\?/i,s),r+=(/\?/.test(r)?"&":"?")+u+"="+o,window[o]=function(e){if(a)window[o]=a;else try{delete window[o]}catch(n){}l&&t.isFunction(l)&&l(e)},n=document.createElement("script"),void 0===e.async&&!1===e.async||(n.async="async"),e.scriptCharset&&(n.charset=e.scriptCharset),n.src=r,n.onload=n.onreadystatechange=function(t,e){(e||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,i&&n.parentNode&&i.removeChild(n),n=void 0)},i.insertBefore(n,i.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(e){if(window.DOMParser)t.parseXml=function(t){return(new DOMParser).parseFromString(t,"text/xml")};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");t.parseXml=function(t){var e=null;return(e=new ActiveXObject("Microsoft.XMLDOM")).async=!1,e.loadXML(t),e}}return t.parseXml(e)},parseJSON:function(e){return t.parseJSON=window.JSON.parse,t.parseJSON(e)},imageFormatSupported:function(t){return!!n[(t=t||"").toLowerCase()]},setImageFormatsSupported:function(e){t.extend(n,e)}});var e=function(t){};t.console=window.console||{log:e,debug:e,info:e,warn:e,error:e,assert:e},t.Browser={vendor:t.BROWSERS.UNKNOWN,version:0,alpha:!0};var n={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},r={};function i(t,e){return e&&t!==document.body?document.body:t.offsetParent}!function(){var e=navigator.appVersion,n=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(t.Browser.vendor=t.BROWSERS.IE,t.Browser.version=parseFloat(n.substring(n.indexOf("MSIE")+5,n.indexOf(";",n.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(n.indexOf("Edge")>=0?(t.Browser.vendor=t.BROWSERS.EDGE,t.Browser.version=parseFloat(n.substring(n.indexOf("Edge")+5))):n.indexOf("Edg")>=0?(t.Browser.vendor=t.BROWSERS.CHROMEEDGE,t.Browser.version=parseFloat(n.substring(n.indexOf("Edg")+4))):n.indexOf("Firefox")>=0?(t.Browser.vendor=t.BROWSERS.FIREFOX,t.Browser.version=parseFloat(n.substring(n.indexOf("Firefox")+8))):n.indexOf("Safari")>=0?(t.Browser.vendor=n.indexOf("Chrome")>=0?t.BROWSERS.CHROME:t.BROWSERS.SAFARI,t.Browser.version=parseFloat(n.substring(n.substring(0,n.indexOf("Safari")).lastIndexOf("/")+1,n.indexOf("Safari")))):null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(n)&&(t.Browser.vendor=t.BROWSERS.IE,t.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":t.Browser.vendor=t.BROWSERS.OPERA,t.Browser.version=parseFloat(e)}var i,o,a,s=window.location.search.substring(1).split("&");for(a=0;a<s.length;a++)if((o=(i=s[a]).indexOf("="))>0){var u=i.substring(0,o),l=i.substring(o+1);try{r[u]=decodeURIComponent(l)}catch(c){t.console.error("Ignoring malformed URL parameter: %s=%s",u,l)}}t.Browser.alpha=!(t.Browser.vendor===t.BROWSERS.CHROME&&t.Browser.version<2),t.Browser.opacity=!0,t.Browser.vendor===t.BROWSERS.IE&&t.Browser.version<11&&t.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")}(),function(e){var n=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame,r=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame;if(n&&r)t.requestAnimationFrame=function(){return n.apply(e,arguments)},t.cancelAnimationFrame=function(){return r.apply(e,arguments)};else{var i,o=[],a=[],s=0;t.requestAnimationFrame=function(e){return o.push([++s,e]),i||(i=setInterval((function(){if(o.length){var e=t.now(),n=a;for(a=o,o=n;a.length;)a.shift()[1](e)}else clearInterval(i),i=void 0}),20)),s},t.cancelAnimationFrame=function(t){var e,n;for(e=0,n=o.length;e<n;e+=1)if(o[e][0]===t)return void o.splice(e,1);for(e=0,n=a.length;e<n;e+=1)if(a[e][0]===t)return void a.splice(e,1)}}}(window)}(u),i=[],void 0===(o="function"===typeof(r=function(){return u})?r.apply(e,i):r)||(t.exports=o),a=u,s={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""},document.exitFullscreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.fullscreenElement},s.requestFullScreen=function(t){return t.requestFullscreen()},s.exitFullScreen=function(){document.exitFullscreen()},s.fullScreenEventName="fullscreenchange",s.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.msFullscreenElement},s.requestFullScreen=function(t){return t.msRequestFullscreen()},s.exitFullScreen=function(){document.msExitFullscreen()},s.fullScreenEventName="MSFullscreenChange",s.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.webkitFullscreenElement},s.requestFullScreen=function(t){return t.webkitRequestFullscreen()},s.exitFullScreen=function(){document.webkitExitFullscreen()},s.fullScreenEventName="webkitfullscreenchange",s.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},s.requestFullScreen=function(t){return t.webkitRequestFullScreen()},s.exitFullScreen=function(){document.webkitCancelFullScreen()},s.fullScreenEventName="webkitfullscreenchange",s.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.mozFullScreenElement},s.requestFullScreen=function(t){return t.mozRequestFullScreen()},s.exitFullScreen=function(){document.mozCancelFullScreen()},s.fullScreenEventName="mozfullscreenchange",s.fullScreenErrorEventName="mozfullscreenerror"),s.isFullScreen=function(){return null!==s.getFullScreenElement()},s.cancelFullScreen=function(){a.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),s.exitFullScreen()},a.extend(a,s),function(t){t.EventSource=function(){this.events={}},t.EventSource.prototype={addOnceHandler:function(t,e,n,r,i){var o=this;r=r||1;var a=0,s=function(n){return++a===r&&o.removeHandler(t,s),e(n)};this.addHandler(t,s,n,i)},addHandler:function(e,n,r,i){var o=this.events[e];if(o||(this.events[e]=o=[]),n&&t.isFunction(n)){var a=o.length,s={handler:n,userData:r||null,priority:i||0};for(o[a]=s;a>0&&o[a-1].priority<o[a].priority;)o[a]=o[a-1],o[a-1]=s,a--}},removeHandler:function(e,n){var r,i=this.events[e],o=[];if(i&&t.isArray(i)){for(r=0;r<i.length;r++)i[r].handler!==n&&o.push(i[r]);this.events[e]=o}},numberOfHandlers:function(t){var e=this.events[t];return e?e.length:0},removeAllHandlers:function(t){if(t)this.events[t]=[];else for(var e in this.events)this.events[e]=[]},getHandler:function(t){var e=this.events[t];return e&&e.length?(e=1===e.length?[e[0]]:Array.apply(null,e),function(t,n){var r,i=e.length;for(r=0;r<i;r++)e[r]&&(n.eventSource=t,n.userData=e[r].userData,e[r].handler(n))}):null},raiseEvent:function(t,e){var n=this.getHandler(t);if(n)return n(this,e||{})}}}(u),function(t){var e=[],n={};t.MouseTracker=function(r){e.push(this);var i=arguments;t.isPlainObject(r)||(r={element:i[0],clickTimeThreshold:i[1],clickDistThreshold:i[2]}),this.hash=Math.random(),this.element=t.getElement(r.element),this.clickTimeThreshold=r.clickTimeThreshold||t.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=r.clickDistThreshold||t.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=r.dblClickTimeThreshold||t.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=r.dblClickDistThreshold||t.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=r.userData||null,this.stopDelay=r.stopDelay||50,this.preProcessEventHandler=r.preProcessEventHandler||null,this.contextMenuHandler=r.contextMenuHandler||null,this.enterHandler=r.enterHandler||null,this.leaveHandler=r.leaveHandler||null,this.exitHandler=r.exitHandler||null,this.overHandler=r.overHandler||null,this.outHandler=r.outHandler||null,this.pressHandler=r.pressHandler||null,this.nonPrimaryPressHandler=r.nonPrimaryPressHandler||null,this.releaseHandler=r.releaseHandler||null,this.nonPrimaryReleaseHandler=r.nonPrimaryReleaseHandler||null,this.moveHandler=r.moveHandler||null,this.scrollHandler=r.scrollHandler||null,this.clickHandler=r.clickHandler||null,this.dblClickHandler=r.dblClickHandler||null,this.dragHandler=r.dragHandler||null,this.dragEndHandler=r.dragEndHandler||null,this.pinchHandler=r.pinchHandler||null,this.stopHandler=r.stopHandler||null,this.keyDownHandler=r.keyDownHandler||null,this.keyUpHandler=r.keyUpHandler||null,this.keyHandler=r.keyHandler||null,this.focusHandler=r.focusHandler||null,this.blurHandler=r.blurHandler||null;var o=this;n[this.hash]={click:function(t){w(o,t)},dblclick:function(t){x(o,t)},keydown:function(t){E(o,t)},keyup:function(t){O(o,t)},keypress:function(t){S(o,t)},focus:function(t){P(o,t)},blur:function(t){C(o,t)},contextmenu:function(t){T(o,t)},wheel:function(t){k(o,t)},mousewheel:function(t){I(o,t)},DOMMouseScroll:function(t){I(o,t)},MozMousePixelScroll:function(t){I(o,t)},losecapture:function(t){j(o,t)},mouseenter:function(t){G(o,t)},mouseleave:function(t){V(o,t)},mouseover:function(t){q(o,t)},mouseout:function(t){H(o,t)},mousedown:function(t){W(o,t)},mouseup:function(t){X(o,t)},mousemove:function(t){K(o,t)},touchstart:function(t){M(o,t)},touchend:function(t){R(o,t)},touchmove:function(t){N(o,t)},touchcancel:function(t){D(o,t)},gesturestart:function(t){F(o,t)},gesturechange:function(t){B(o,t)},gotpointercapture:function(t){z(o,t)},lostpointercapture:function(t){U(o,t)},pointerenter:function(t){G(o,t)},pointerleave:function(t){V(o,t)},pointerover:function(t){q(o,t)},pointerout:function(t){H(o,t)},pointerdown:function(t){W(o,t)},pointerup:function(t){X(o,t)},pointermove:function(t){K(o,t)},pointercancel:function(t){Q(o,t)},pointerupcaptured:function(t){Y(o,t)},pointermovecaptured:function(t){$(o,t)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null,sentDragEvent:!1},this.hasGestureHandlers=!!(this.pressHandler||this.nonPrimaryPressHandler||this.releaseHandler||this.nonPrimaryReleaseHandler||this.clickHandler||this.dblClickHandler||this.dragHandler||this.dragEndHandler||this.pinchHandler),this.hasScrollHandler=!!this.scrollHandler,t.MouseTracker.havePointerEvents&&t.setElementPointerEvents(this.element,"auto"),this.exitHandler&&t.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),r.startDisabled||this.setTracking(!0)},t.MouseTracker.prototype={destroy:function(){var t;for(h(this),this.element=null,t=0;t<e.length;t++)if(e[t]===this){e.splice(t,1);break}n[this.hash]=null,delete n[this.hash]},isTracking:function(){return n[this.hash].tracking},setTracking:function(e){return e?function(e){var r,i,o=n[e.hash];if(!o.tracking){for(i=0;i<t.MouseTracker.subscribeEvents.length;i++)r=t.MouseTracker.subscribeEvents[i],t.addEvent(e.element,r,o[r],r===t.MouseTracker.wheelEventName&&{passive:!1,capture:!1});f(e),o.tracking=!0}}(this):h(this),this},getActivePointersListByType:function(e){var r,i,o=n[this.hash],a=o.activePointersLists.length;for(r=0;r<a;r++)if(o.activePointersLists[r].type===e)return o.activePointersLists[r];return i=new t.MouseTracker.GesturePointList(e),o.activePointersLists.push(i),i},getActivePointerCount:function(){var t,e=n[this.hash],r=e.activePointersLists.length,i=0;for(t=0;t<r;t++)i+=e.activePointersLists[t].getLength();return i},preProcessEventHandler:function(){},contextMenuHandler:function(){},enterHandler:function(){},leaveHandler:function(){},exitHandler:function(){},overHandler:function(){},outHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}};var r,i,o,a,s,u,l=function(){try{return window.self!==window.top}catch(t){return!0}}();function c(t){try{return t.addEventListener&&t.removeEventListener}catch(e){return!1}}function f(t){var e,r,i,o,a,s=n[t.hash],u=s.activePointersLists.length;for(e=0;e<u;e++)if((i=s.activePointersLists[e]).getLength()>0){for(a=[],o=i.asArray(),r=0;r<o.length;r++)a.push(o[r]);for(r=0;r<a.length;r++)et(t,i,a[r])}for(e=0;e<u;e++)s.activePointersLists.pop();s.sentDragEvent=!1}function h(e){var r,i,o=n[e.hash];if(o.tracking){for(i=0;i<t.MouseTracker.subscribeEvents.length;i++)r=t.MouseTracker.subscribeEvents[i],t.removeEvent(e.element,r,o[r],!1);f(e),o.tracking=!1}}function p(t,e){var r=n[t.hash];if("pointerevent"===e)return{upName:"pointerup",upHandler:r.pointerupcaptured,moveName:"pointermove",moveHandler:r.pointermovecaptured};if("mouse"===e)return{upName:"pointerup",upHandler:r.pointerupcaptured,moveName:"pointermove",moveHandler:r.pointermovecaptured};if("touch"===e)return{upName:"touchend",upHandler:r.touchendcaptured,moveName:"touchmove",moveHandler:r.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function d(e,n){var r,i;if(t.MouseTracker.havePointerCapture)if(t.MouseTracker.havePointerEvents){if(!(i=e.getActivePointersListByType(n.type).getById(n.id))||!i.captured)return;try{e.element.releasePointerCapture(n.id)}catch(o){}}else e.element.releaseCapture();else r=p(e,t.MouseTracker.havePointerEvents?"pointerevent":n.type),l&&c(window.top)&&t.removeEvent(window.top,r.upName,r.upHandler,!0),t.removeEvent(t.MouseTracker.captureElement,r.moveName,r.moveHandler,!0),t.removeEvent(t.MouseTracker.captureElement,r.upName,r.upHandler,!0);rt(e,n,!1)}function m(e){return t.MouseTracker.havePointerEvents?e.pointerId:t.MouseTracker.mousePointerId}function g(e){return t.MouseTracker.havePointerEvents?e.pointerType||(t.Browser.vendor===t.BROWSERS.IE?"mouse":""):"mouse"}function y(e){return!t.MouseTracker.havePointerEvents||e.isPrimary}function v(e){return t.getMousePosition(e)}function b(t,e){return _(v(t),e)}function _(e,n){var r=t.getElementOffset(n);return e.minus(r)}function A(e,n){return new t.Point((e.x+n.x)/2,(e.y+n.y)/2)}function w(e,n){var r={originalEvent:n,eventType:"click",pointerType:"mouse",isEmulated:!1};nt(e,r),r.preventDefault&&!r.defaultPrevented&&t.cancelEvent(n),r.stopPropagation&&t.stopEvent(n)}function x(e,n){var r={originalEvent:n,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};nt(e,r),r.preventDefault&&!r.defaultPrevented&&t.cancelEvent(n),r.stopPropagation&&t.stopEvent(n)}function E(e,n){var r=null,i={originalEvent:n,eventType:"keydown",pointerType:"",isEmulated:!1};nt(e,i),!e.keyDownHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:e,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:e.userData},e.keyDownHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n)}function O(e,n){var r=null,i={originalEvent:n,eventType:"keyup",pointerType:"",isEmulated:!1};nt(e,i),!e.keyUpHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:e,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:e.userData},e.keyUpHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n)}function S(e,n){var r=null,i={originalEvent:n,eventType:"keypress",pointerType:"",isEmulated:!1};nt(e,i),!e.keyHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:e,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:e.userData},e.keyHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n)}function P(t,e){var n={originalEvent:e,eventType:"focus",pointerType:"",isEmulated:!1};nt(t,n),t.focusHandler&&!n.preventGesture&&t.focusHandler({eventSource:t,originalEvent:e,userData:t.userData})}function C(t,e){var n={originalEvent:e,eventType:"blur",pointerType:"",isEmulated:!1};nt(t,n),t.blurHandler&&!n.preventGesture&&t.blurHandler({eventSource:t,originalEvent:e,userData:t.userData})}function T(e,n){var r=null,i={originalEvent:n,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};nt(e,i),!e.contextMenuHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:e,position:_(v(n),e.element),originalEvent:i.originalEvent,preventDefault:i.preventDefault||i.defaultPrevented,userData:e.userData},e.contextMenuHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n)}function k(t,e){L(t,e,e)}function I(e,n){var r={target:n.target||n.srcElement,type:"wheel",shiftKey:n.shiftKey||!1,clientX:n.clientX,clientY:n.clientY,pageX:n.pageX?n.pageX:n.clientX,pageY:n.pageY?n.pageY:n.clientY,deltaMode:"MozMousePixelScroll"===n.type?0:1,deltaX:0,deltaZ:0};"mousewheel"===t.MouseTracker.wheelEventName?r.deltaY=-n.wheelDelta/t.DEFAULT_SETTINGS.pixelsPerWheelLine:r.deltaY=n.detail,L(e,r,n)}function L(e,n,r){var i,o,a=null;i=n.deltaY<0?1:-1,nt(e,o={originalEvent:n,eventType:"wheel",pointerType:"mouse",isEmulated:n!==r}),!e.scrollHandler||o.preventGesture||o.defaultPrevented||(a={eventSource:e,pointerType:"mouse",position:b(n,e.element),scroll:i,shift:n.shiftKey,isTouchEvent:!1,originalEvent:r,preventDefault:o.preventDefault||o.defaultPrevented,userData:e.userData},e.scrollHandler(a)),o.stopPropagation&&t.stopEvent(r),(a&&a.preventDefault||o.preventDefault&&!o.defaultPrevented)&&t.cancelEvent(r)}function j(e,n){var r={id:t.MouseTracker.mousePointerId,type:"mouse"},i={originalEvent:n,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};nt(e,i),n.target===e.element&&rt(e,r,!1),i.stopPropagation&&t.stopEvent(n)}function M(e,n){var r,i,o,a=n.changedTouches.length,s=e.getActivePointersListByType("touch");r=t.now(),s.getLength()>n.touches.length-a&&t.console.warn("Tracked touch contact count doesn't match event.touches.length");var u={originalEvent:n,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(nt(e,u),i=0;i<a;i++)it(e,u,o={id:n.changedTouches[i].identifier,type:"touch",isPrimary:0===s.getLength(),currentPos:v(n.changedTouches[i]),currentTime:r}),at(e,u,o,0),rt(e,o,!0);u.preventDefault&&!u.defaultPrevented&&t.cancelEvent(n),u.stopPropagation&&t.stopEvent(n)}function R(e,n){var r,i,o,a=n.changedTouches.length;r=t.now();var s={originalEvent:n,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(nt(e,s),i=0;i<a;i++)st(e,s,o={id:n.changedTouches[i].identifier,type:"touch",currentPos:v(n.changedTouches[i]),currentTime:r},0),rt(e,o,!1),ot(e,s,o);s.preventDefault&&!s.defaultPrevented&&t.cancelEvent(n),s.stopPropagation&&t.stopEvent(n)}function N(e,n){var r,i,o=n.changedTouches.length;r=t.now();var a={originalEvent:n,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(nt(e,a),i=0;i<o;i++)ut(e,a,{id:n.changedTouches[i].identifier,type:"touch",currentPos:v(n.changedTouches[i]),currentTime:r});a.preventDefault&&!a.defaultPrevented&&t.cancelEvent(n),a.stopPropagation&&t.stopEvent(n)}function D(e,n){var r,i=n.changedTouches.length,o={originalEvent:n,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(nt(e,o),r=0;r<i;r++)lt(e,o,{id:n.changedTouches[r].identifier,type:"touch"});o.stopPropagation&&t.stopEvent(n)}function F(e,n){return t.eventIsCanceled(n)||n.preventDefault(),!1}function B(e,n){return t.eventIsCanceled(n)||n.preventDefault(),!1}function z(e,n){var r={originalEvent:n,eventType:"gotpointercapture",pointerType:g(n),isEmulated:!1};nt(e,r),n.target===e.element&&rt(e,{id:n.pointerId,type:g(n)},!0),r.stopPropagation&&t.stopEvent(n)}function U(e,n){var r={originalEvent:n,eventType:"lostpointercapture",pointerType:g(n),isEmulated:!1};nt(e,r),n.target===e.element&&rt(e,{id:n.pointerId,type:g(n)},!1),r.stopPropagation&&t.stopEvent(n)}function G(e,n){var r={id:m(n),type:g(n),isPrimary:y(n),currentPos:v(n),currentTime:t.now()},i={originalEvent:n,eventType:"pointerenter",pointerType:r.type,isEmulated:!1};nt(e,i),it(e,i,r)}function V(e,n){var r={id:m(n),type:g(n),isPrimary:y(n),currentPos:v(n),currentTime:t.now()},i={originalEvent:n,eventType:"pointerleave",pointerType:r.type,isEmulated:!1};nt(e,i),ot(e,i,r)}function q(e,n){var r={id:m(n),type:g(n),isPrimary:y(n),currentPos:v(n),currentTime:t.now()},i={originalEvent:n,eventType:"pointerover",pointerType:r.type,isEmulated:!1};nt(e,i),function(t,e,n){var r,i;r=t.getActivePointersListByType(n.type),(i=r.getById(n.id))?n=i:(n.captured=!1,n.insideElementPressed=!1);t.overHandler&&t.overHandler({eventSource:t,pointerType:n.type,position:_(n.currentPos,t.element),buttons:r.buttons,pointers:t.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==r.buttons,isTouchEvent:"touch"===n.type,originalEvent:e.originalEvent,userData:t.userData})}(e,i,r),i.preventDefault&&!i.defaultPrevented&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n)}function H(e,n){var r={id:m(n),type:g(n),isPrimary:y(n),currentPos:v(n),currentTime:t.now()},i={originalEvent:n,eventType:"pointerout",pointerType:r.type,isEmulated:!1};nt(e,i),function(t,e,n){var r,i;r=t.getActivePointersListByType(n.type),(i=r.getById(n.id))?n=i:(n.captured=!1,n.insideElementPressed=!1);t.outHandler&&t.outHandler({eventSource:t,pointerType:n.type,position:n.currentPos&&_(n.currentPos,t.element),buttons:r.buttons,pointers:t.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==r.buttons,isTouchEvent:"touch"===n.type,originalEvent:e.originalEvent,userData:t.userData})}(e,i,r),i.preventDefault&&!i.defaultPrevented&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n)}function W(e,n){var r={id:m(n),type:g(n),isPrimary:y(n),currentPos:v(n),currentTime:t.now()},i=t.MouseTracker.havePointerEvents&&"touch"===r.type&&t.Browser.vendor!==t.BROWSERS.IE,o={originalEvent:n,eventType:"pointerdown",pointerType:r.type,isEmulated:!1};nt(e,o),at(e,o,r,n.button),o.preventDefault&&!o.defaultPrevented&&t.cancelEvent(n),o.stopPropagation&&t.stopEvent(n),o.shouldCapture&&(i?rt(e,r,!0):function(e,n){var r;if(t.MouseTracker.havePointerCapture)if(t.MouseTracker.havePointerEvents)try{e.element.setPointerCapture(n.id)}catch(i){return void t.console.warn("setPointerCapture() called on invalid pointer ID")}else e.element.setCapture(!0);else r=p(e,t.MouseTracker.havePointerEvents?"pointerevent":n.type),l&&c(window.top)&&t.addEvent(window.top,r.upName,r.upHandler,!0),t.addEvent(t.MouseTracker.captureElement,r.upName,r.upHandler,!0),t.addEvent(t.MouseTracker.captureElement,r.moveName,r.moveHandler,!0);rt(e,n,!0)}(e,r))}function X(t,e){Z(t,e)}function Y(e,n){e.getActivePointersListByType(g(n)).getById(n.pointerId)&&Z(e,n),t.stopEvent(n)}function Z(e,n){var r,i={originalEvent:n,eventType:"pointerup",pointerType:(r={id:m(n),type:g(n),isPrimary:y(n),currentPos:v(n),currentTime:t.now()}).type,isEmulated:!1};nt(e,i),st(e,i,r,n.button),i.preventDefault&&!i.defaultPrevented&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n),i.shouldReleaseCapture&&(n.target===e.element?d(e,r):rt(e,r,!1))}function K(t,e){J(t,e)}function $(e,n){e.getActivePointersListByType(g(n)).getById(n.pointerId)&&J(e,n),t.stopEvent(n)}function J(e,n){var r={id:m(n),type:g(n),isPrimary:y(n),currentPos:v(n),currentTime:t.now()},i={originalEvent:n,eventType:"pointermove",pointerType:r.type,isEmulated:!1};nt(e,i),ut(e,i,r),i.preventDefault&&!i.defaultPrevented&&t.cancelEvent(n),i.stopPropagation&&t.stopEvent(n)}function Q(e,n){var r={id:n.pointerId,type:g(n)},i={originalEvent:n,eventType:"pointercancel",pointerType:r.type,isEmulated:!1};nt(e,i),lt(e,i,r),i.stopPropagation&&t.stopEvent(n)}function tt(t,e){return e.speed=0,e.direction=0,e.contactPos=e.currentPos,e.contactTime=e.currentTime,e.lastPos=e.currentPos,e.lastTime=e.currentTime,t.add(e)}function et(e,n,r){var i,o=n.getById(r.id);return o?(o.captured&&(t.console.warn("stopTrackingPointer() called on captured pointer"),d(e,o)),n.removeContact(),i=n.removeById(r.id)):i=n.getLength(),i}function nt(e,n){n.eventSource=e,n.eventPhase=n.originalEvent&&"undefined"!==typeof n.originalEvent.eventPhase?n.originalEvent.eventPhase:0,n.defaultPrevented=t.eventIsCanceled(n.originalEvent),n.shouldCapture=!1,n.shouldReleaseCapture=!1,n.userData=e.userData,function(t,e){switch(e.eventType){case"pointermove":case"pointerdown":case"pointerup":e.isStoppable=!0,e.isCancelable=!0,e.preventDefault=!1,e.preventGesture=!t.hasGestureHandlers,e.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":e.isStoppable=!0,e.isCancelable=!0,e.preventDefault=!1,e.preventGesture=!1,e.stopPropagation=!1;break;case"wheel":e.isStoppable=!0,e.isCancelable=!0,e.preventDefault=!1,e.preventGesture=!t.hasScrollHandler,e.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":e.isStoppable=!0,e.isCancelable=!1,e.preventDefault=!1,e.preventGesture=!1,e.stopPropagation=!1;break;case"click":e.isStoppable=!0,e.isCancelable=!0,e.preventDefault=!!t.clickHandler,e.preventGesture=!1,e.stopPropagation=!1;break;case"dblclick":e.isStoppable=!0,e.isCancelable=!0,e.preventDefault=!!t.dblClickHandler,e.preventGesture=!1,e.stopPropagation=!1;break;default:e.isStoppable=!1,e.isCancelable=!1,e.preventDefault=!1,e.preventGesture=!1,e.stopPropagation=!1}}(e,n),e.preProcessEventHandler&&e.preProcessEventHandler(n)}function rt(e,n,r){var i=e.getActivePointersListByType(n.type),o=i.getById(n.id);o?r&&!o.captured?(o.captured=!0,i.captureCount++):!r&&o.captured&&(o.captured=!1,i.captureCount--,i.captureCount<0&&(i.captureCount=0,t.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):t.console.warn("updatePointerCaptured() called on untracked pointer")}function it(t,e,n){var r,i=t.getActivePointersListByType(n.type);(r=i.getById(n.id))?(r.insideElement=!0,r.lastPos=r.currentPos,r.lastTime=r.currentTime,r.currentPos=n.currentPos,r.currentTime=n.currentTime,n=r):(n.captured=!1,n.insideElementPressed=!1,n.insideElement=!0,tt(i,n)),t.enterHandler&&t.enterHandler({eventSource:t,pointerType:n.type,position:_(n.currentPos,t.element),buttons:i.buttons,pointers:t.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==i.buttons,isTouchEvent:"touch"===n.type,originalEvent:e.originalEvent,userData:t.userData})}function ot(t,e,n){var r,i,o=t.getActivePointersListByType(n.type);(r=o.getById(n.id))?(r.captured?(r.insideElement=!1,r.lastPos=r.currentPos,r.lastTime=r.currentTime,r.currentPos=n.currentPos,r.currentTime=n.currentTime):et(t,o,r),n=r):(n.captured=!1,n.insideElementPressed=!1),(t.leaveHandler||t.exitHandler)&&(i={eventSource:t,pointerType:n.type,position:n.currentPos&&_(n.currentPos,t.element),buttons:o.buttons,pointers:t.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==o.buttons,isTouchEvent:"touch"===n.type,originalEvent:e.originalEvent,userData:t.userData},t.leaveHandler&&t.leaveHandler(i),t.exitHandler&&t.exitHandler(i))}function at(e,r,i,o){var a,s=n[e.hash],u=e.getActivePointersListByType(i.type);if("undefined"!==typeof r.originalEvent.buttons?u.buttons=r.originalEvent.buttons:0===o?u.buttons|=1:1===o?u.buttons|=4:2===o?u.buttons|=2:3===o?u.buttons|=8:4===o?u.buttons|=16:5===o&&(u.buttons|=32),0!==o)return r.shouldCapture=!1,r.shouldReleaseCapture=!1,void(!e.nonPrimaryPressHandler||r.preventGesture||r.defaultPrevented||(r.preventDefault=!0,e.nonPrimaryPressHandler({eventSource:e,pointerType:i.type,position:_(i.currentPos,e.element),button:o,buttons:u.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:e.userData})));(a=u.getById(i.id))?(a.insideElementPressed=!0,a.insideElement=!0,a.originalTarget=r.originalEvent.target,a.contactPos=i.currentPos,a.contactTime=i.currentTime,a.lastPos=a.currentPos,a.lastTime=a.currentTime,a.currentPos=i.currentPos,a.currentTime=i.currentTime,i=a):(i.captured=!1,i.insideElementPressed=!0,i.insideElement=!0,i.originalTarget=r.originalEvent.target,tt(u,i)),u.addContact(),r.preventGesture||r.defaultPrevented?(r.shouldCapture=!1,r.shouldReleaseCapture=!1):(r.shouldCapture=!0,r.shouldReleaseCapture=!1,r.preventDefault=!0,(e.dragHandler||e.dragEndHandler||e.pinchHandler)&&t.MouseTracker.gesturePointVelocityTracker.addPoint(e,i),1===u.contacts?e.pressHandler&&!r.preventGesture&&e.pressHandler({eventSource:e,pointerType:i.type,position:_(i.contactPos,e.element),buttons:u.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:e.userData}):2===u.contacts&&e.pinchHandler&&"touch"===i.type&&(s.pinchGPoints=u.asArray(),s.lastPinchDist=s.currentPinchDist=s.pinchGPoints[0].currentPos.distanceTo(s.pinchGPoints[1].currentPos),s.lastPinchCenter=s.currentPinchCenter=A(s.pinchGPoints[0].currentPos,s.pinchGPoints[1].currentPos)))}function st(e,r,i,o){var a,s,u,l,c=n[e.hash],f=e.getActivePointersListByType(i.type),h=!1;if("undefined"!==typeof r.originalEvent.buttons?f.buttons=r.originalEvent.buttons:0===o?f.buttons^=-2:1===o?f.buttons^=-5:2===o?f.buttons^=-3:3===o?f.buttons^=-9:4===o?f.buttons^=-17:5===o&&(f.buttons^=-33),r.shouldCapture=!1,0!==o)return r.shouldReleaseCapture=!1,void(!e.nonPrimaryReleaseHandler||r.preventGesture||r.defaultPrevented||(r.preventDefault=!0,e.nonPrimaryReleaseHandler({eventSource:e,pointerType:i.type,position:_(i.currentPos,e.element),button:o,buttons:f.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:e.userData})));(u=f.getById(i.id))?(f.removeContact(),u.captured&&(h=!0),u.lastPos=u.currentPos,u.lastTime=u.currentTime,u.currentPos=i.currentPos,u.currentTime=i.currentTime,u.insideElement||et(e,f,u),a=u.currentPos,s=u.currentTime):(i.captured=!1,i.insideElementPressed=!1,i.insideElement=!0,tt(f,i),u=i),r.preventGesture||r.defaultPrevented||(h?(r.shouldReleaseCapture=!0,r.preventDefault=!0,(e.dragHandler||e.dragEndHandler||e.pinchHandler)&&t.MouseTracker.gesturePointVelocityTracker.removePoint(e,u),0===f.contacts?(e.releaseHandler&&a&&e.releaseHandler({eventSource:e,pointerType:u.type,position:_(a,e.element),buttons:f.buttons,insideElementPressed:u.insideElementPressed,insideElementReleased:u.insideElement,isTouchEvent:"touch"===u.type,originalEvent:r.originalEvent,userData:e.userData}),e.dragEndHandler&&c.sentDragEvent&&e.dragEndHandler({eventSource:e,pointerType:u.type,position:_(u.currentPos,e.element),speed:u.speed,direction:u.direction,shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===u.type,originalEvent:r.originalEvent,userData:e.userData}),c.sentDragEvent=!1,(e.clickHandler||e.dblClickHandler)&&u.insideElement&&(l=s-u.contactTime<=e.clickTimeThreshold&&u.contactPos.distanceTo(a)<=e.clickDistThreshold,e.clickHandler&&e.clickHandler({eventSource:e,pointerType:u.type,position:_(u.currentPos,e.element),quick:l,shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===u.type,originalEvent:r.originalEvent,originalTarget:u.originalTarget,userData:e.userData}),e.dblClickHandler&&l&&(f.clicks++,1===f.clicks?(c.lastClickPos=a,c.dblClickTimeOut=setTimeout((function(){f.clicks=0}),e.dblClickTimeThreshold)):2===f.clicks&&(clearTimeout(c.dblClickTimeOut),f.clicks=0,c.lastClickPos.distanceTo(a)<=e.dblClickDistThreshold&&e.dblClickHandler({eventSource:e,pointerType:u.type,position:_(u.currentPos,e.element),shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===u.type,originalEvent:r.originalEvent,userData:e.userData}),c.lastClickPos=null)))):2===f.contacts&&e.pinchHandler&&"touch"===u.type&&(c.pinchGPoints=f.asArray(),c.lastPinchDist=c.currentPinchDist=c.pinchGPoints[0].currentPos.distanceTo(c.pinchGPoints[1].currentPos),c.lastPinchCenter=c.currentPinchCenter=A(c.pinchGPoints[0].currentPos,c.pinchGPoints[1].currentPos))):(r.shouldReleaseCapture=!1,e.releaseHandler&&a&&(e.releaseHandler({eventSource:e,pointerType:u.type,position:_(a,e.element),buttons:f.buttons,insideElementPressed:u.insideElementPressed,insideElementReleased:u.insideElement,isTouchEvent:"touch"===u.type,originalEvent:r.originalEvent,userData:e.userData}),r.preventDefault=!0)))}function ut(t,e,r){var i,o,a,s=n[t.hash],u=t.getActivePointersListByType(r.type);"undefined"!==typeof e.originalEvent.buttons&&(u.buttons=e.originalEvent.buttons),(i=u.getById(r.id))&&(i.lastPos=i.currentPos,i.lastTime=i.currentTime,i.currentPos=r.currentPos,i.currentTime=r.currentTime,e.shouldCapture=!1,e.shouldReleaseCapture=!1,t.stopHandler&&"mouse"===r.type&&(clearTimeout(t.stopTimeOut),t.stopTimeOut=setTimeout((function(){!function(t,e,n){t.stopHandler&&t.stopHandler({eventSource:t,pointerType:n,position:b(e,t.element),buttons:t.getActivePointersListByType(n).buttons,isTouchEvent:"touch"===n,originalEvent:e,userData:t.userData})}(t,e.originalEvent,r.type)}),t.stopDelay)),0===u.contacts?t.moveHandler&&t.moveHandler({eventSource:t,pointerType:r.type,position:_(r.currentPos,t.element),buttons:u.buttons,isTouchEvent:"touch"===r.type,originalEvent:e.originalEvent,userData:t.userData}):1===u.contacts?(t.moveHandler&&(i=u.asArray()[0],t.moveHandler({eventSource:t,pointerType:i.type,position:_(i.currentPos,t.element),buttons:u.buttons,isTouchEvent:"touch"===i.type,originalEvent:e.originalEvent,userData:t.userData})),!t.dragHandler||e.preventGesture||e.defaultPrevented||(a=(i=u.asArray()[0]).currentPos.minus(i.lastPos),t.dragHandler({eventSource:t,pointerType:i.type,position:_(i.currentPos,t.element),buttons:u.buttons,delta:a,speed:i.speed,direction:i.direction,shift:e.originalEvent.shiftKey,isTouchEvent:"touch"===i.type,originalEvent:e.originalEvent,userData:t.userData}),e.preventDefault=!0,s.sentDragEvent=!0)):2===u.contacts&&(t.moveHandler&&(o=u.asArray(),t.moveHandler({eventSource:t,pointerType:o[0].type,position:_(A(o[0].currentPos,o[1].currentPos),t.element),buttons:u.buttons,isTouchEvent:"touch"===o[0].type,originalEvent:e.originalEvent,userData:t.userData})),!t.pinchHandler||"touch"!==r.type||e.preventGesture||e.defaultPrevented||(a=s.pinchGPoints[0].currentPos.distanceTo(s.pinchGPoints[1].currentPos))!==s.currentPinchDist&&(s.lastPinchDist=s.currentPinchDist,s.currentPinchDist=a,s.lastPinchCenter=s.currentPinchCenter,s.currentPinchCenter=A(s.pinchGPoints[0].currentPos,s.pinchGPoints[1].currentPos),t.pinchHandler({eventSource:t,pointerType:"touch",gesturePoints:s.pinchGPoints,lastCenter:_(s.lastPinchCenter,t.element),center:_(s.currentPinchCenter,t.element),lastDistance:s.lastPinchDist,distance:s.currentPinchDist,shift:e.originalEvent.shiftKey,originalEvent:e.originalEvent,userData:t.userData}),e.preventDefault=!0)))}function lt(t,e,n){var r,i=t.getActivePointersListByType(n.type);(r=i.getById(n.id))&&et(t,i,r)}t.MouseTracker.gesturePointVelocityTracker=(r=[],i=0,o=0,a=function(t,e){return t.hash.toString()+e.type+e.id.toString()},s=function(){var e,n,i,a,s,u,l=r.length,c=t.now();for(a=c-o,o=c,e=0;e<l;e++)(i=(n=r[e]).gPoint).direction=Math.atan2(i.currentPos.y-n.lastPos.y,i.currentPos.x-n.lastPos.x),s=n.lastPos.distanceTo(i.currentPos),n.lastPos=i.currentPos,u=1e3*s/(a+1),i.speed=.75*u+.25*i.speed},{addPoint:function(e,n){var u=a(e,n);r.push({guid:u,gPoint:n,lastPos:n.currentPos}),1===r.length&&(o=t.now(),i=window.setInterval(s,50))},removePoint:function(t,e){var n,o=a(t,e),s=r.length;for(n=0;n<s;n++)if(r[n].guid===o){r.splice(n,1),0===--s&&window.clearInterval(i);break}}}),t.MouseTracker.captureElement=document,t.MouseTracker.wheelEventName=t.Browser.vendor===t.BROWSERS.IE&&t.Browser.version>8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",t.MouseTracker.wheelEventName],"DOMMouseScroll"===t.MouseTracker.wheelEventName&&t.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(t.MouseTracker.havePointerEvents=!0,t.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),t.MouseTracker.havePointerCapture=(u=document.createElement("div"),t.isFunction(u.setPointerCapture)&&t.isFunction(u.releasePointerCapture)),t.MouseTracker.havePointerCapture&&t.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(t.MouseTracker.havePointerEvents=!1,t.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),t.MouseTracker.mousePointerId="legacy-mouse",t.MouseTracker.havePointerCapture=function(){var e=document.createElement("div");return t.isFunction(e.setCapture)&&t.isFunction(e.releaseCapture)}(),t.MouseTracker.havePointerCapture&&t.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&t.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&t.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),t.MouseTracker.GesturePointList=function(t){this._gPoints=[],this.type=t,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},t.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(t){return this._gPoints.push(t)},removeById:function(t){var e,n=this._gPoints.length;for(e=0;e<n;e++)if(this._gPoints[e].id===t){this._gPoints.splice(e,1);break}return this._gPoints.length},getByIndex:function(t){return t<this._gPoints.length?this._gPoints[t]:null},getById:function(t){var e,n=this._gPoints.length;for(e=0;e<n;e++)if(this._gPoints[e].id===t)return this._gPoints[e];return null},getPrimary:function(t){var e,n=this._gPoints.length;for(e=0;e<n;e++)if(this._gPoints[e].isPrimary)return this._gPoints[e];return null},addContact:function(){++this.contacts,this.contacts>1&&("mouse"===this.type||"pen"===this.type)&&(t.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}}}(u),function(t){t.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},t.Control=function(e,n,r){var i=e.parentNode;"number"===typeof n&&(t.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead.  Support for this deprecated variant is scheduled for removal in December 2013"),n={anchor:n}),n.attachToViewer="undefined"===typeof n.attachToViewer||n.attachToViewer,this.autoFade="undefined"===typeof n.autoFade||n.autoFade,this.element=e,this.anchor=n.anchor,this.container=r,this.anchor===t.ControlAnchor.ABSOLUTE?(this.wrapper=t.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"===typeof n.top?n.top+"px":n.top,this.wrapper.style.left="number"===typeof n.left?n.left+"px":n.left,this.wrapper.style.height="number"===typeof n.height?n.height+"px":n.height,this.wrapper.style.width="number"===typeof n.width?n.width+"px":n.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=t.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===t.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),n.attachToViewer?this.anchor===t.ControlAnchor.TOP_RIGHT||this.anchor===t.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):i.appendChild(this.wrapper)},t.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==t.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!==this.wrapper.style.display},setVisible:function(e){this.wrapper.style.display=e?this.anchor===t.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(e){this.element[t.SIGNAL]&&t.Browser.vendor===t.BROWSERS.IE?t.setElementOpacity(this.element,e,!0):t.setElementOpacity(this.wrapper,e,!0)}}}(u),function(t){function e(t,e){var n,r=t.controls;for(n=r.length-1;n>=0;n--)if(r[n].element===e)return n;return-1}t.ControlDock=function(e){var n,r,i=["topleft","topright","bottomright","bottomleft"];for(t.extend(!0,this,{id:"controldock-"+t.now()+"-"+Math.floor(1e6*Math.random()),container:t.makeNeutralElement("div"),controls:[]},e),this.container.onsubmit=function(){return!1},this.element&&(this.element=t.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),r=0;r<i.length;r++)n=i[r],this.controls[n]=t.makeNeutralElement("div"),this.controls[n].style.position="absolute",n.match("left")&&(this.controls[n].style.left="0px"),n.match("right")&&(this.controls[n].style.right="0px"),n.match("top")&&(this.controls[n].style.top="0px"),n.match("bottom")&&(this.controls[n].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},t.ControlDock.prototype={addControl:function(n,r){var i=null;if(!(e(this,n=t.getElement(n))>=0)){switch(r.anchor){case t.ControlAnchor.TOP_RIGHT:i=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case t.ControlAnchor.BOTTOM_RIGHT:i=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case t.ControlAnchor.BOTTOM_LEFT:i=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case t.ControlAnchor.TOP_LEFT:i=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case t.ControlAnchor.ABSOLUTE:default:case t.ControlAnchor.NONE:i=this.container,n.style.margin="0px",n.style.padding="0px"}this.controls.push(new t.Control(n,r,i)),n.style.display="inline-block"}},removeControl:function(n){var r=e(this,n=t.getElement(n));return r>=0&&(this.controls[r].destroy(),this.controls.splice(r,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var t;for(t=this.controls.length-1;t>=0;t--)if(this.controls[t].isVisible())return!0;return!1},setControlsEnabled:function(t){var e;for(e=this.controls.length-1;e>=0;e--)this.controls[e].setVisible(t);return this}}}(u),function(t){t.Placement=t.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(u),function(t){var e={},n=1;function r(e){return e=t.getElement(e),new t.Point(0===e.clientWidth?1:e.clientWidth,0===e.clientHeight?1:e.clientHeight)}function i(e,n){if(n instanceof t.Overlay)return n;var r=null;if(n.element)r=t.getElement(n.element);else{var i=n.id?n.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(r=t.getElement(n.id))||((r=document.createElement("a")).href="#/overlay/"+i),r.id=i,t.addClass(r,n.className?n.className:"openseadragon-overlay")}var o=n.location,a=n.width,s=n.height;if(!o){var u=n.x,l=n.y;if(void 0!==n.px){var c=e.viewport.imageToViewportRectangle(new t.Rect(n.px,n.py,a||0,s||0));u=c.x,l=c.y,a=void 0!==a?c.width:void 0,s=void 0!==s?c.height:void 0}o=new t.Point(u,l)}var f=n.placement;return f&&"string"===t.type(f)&&(f=t.Placement[n.placement.toUpperCase()]),new t.Overlay({element:r,location:o,placement:f,onDraw:n.onDraw,checkResize:n.checkResize,width:a,height:s,rotationMode:n.rotationMode})}function o(t,e){var n;for(n=t.length-1;n>=0;n--)if(t[n].element===e)return n;return-1}function a(e,n){return t.requestAnimationFrame((function(){n(e)}))}function s(e){t.requestAnimationFrame((function(){!function(e){var n,r;if(e.controlsShouldFade){for(n=1-(t.now()-e.controlsFadeBeginTime)/e.controlsFadeLength,n=Math.min(1,n),n=Math.max(0,n),r=e.controls.length-1;r>=0;r--)e.controls[r].autoFade&&e.controls[r].setOpacity(n);n>0&&s(e)}}(e)}))}function u(e){e.autoHideControls&&(e.controlsShouldFade=!0,e.controlsFadeBeginTime=t.now()+e.controlsFadeDelay,window.setTimeout((function(){s(e)}),e.controlsFadeDelay))}function l(t){var e;for(t.controlsShouldFade=!1,e=t.controls.length-1;e>=0;e--)t.controls[e].setOpacity(1)}function c(){l(this)}function f(){u(this)}function h(t){var e={tracker:t.eventSource,position:t.position,originalEvent:t.originalEvent,preventDefault:t.preventDefault};this.raiseEvent("canvas-contextmenu",e),t.preventDefault=e.preventDefault}function p(e){var n={originalEvent:e.originalEvent,preventDefaultAction:!1,preventVerticalPan:e.preventVerticalPan||!this.panVertical,preventHorizontalPan:e.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||e.ctrl||e.alt||e.meta)e.preventDefault=!1;else switch(e.keyCode){case 38:n.preventVerticalPan||(e.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 40:n.preventVerticalPan||(e.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 37:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 39:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 187:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),e.preventDefault=!0;break;case 189:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),e.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),e.preventDefault=!0;break;case 87:n.preventVerticalPan||(e.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,-40))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 83:n.preventVerticalPan||(e.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,40))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 65:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(-40,0))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 68:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(40,0))),this.viewport.applyConstraints()),e.preventDefault=!0;break;case 82:e.shift?this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement),this.viewport.applyConstraints(),e.preventDefault=!0;break;case 70:this.viewport.toggleFlip(),e.preventDefault=!0;break;case 74:this.goToPreviousPage();break;case 75:this.goToNextPage();break;default:e.preventDefault=!1}}function d(t){var e={originalEvent:t.originalEvent};this.raiseEvent("canvas-key-press",e)}function m(n){var r;document.activeElement===this.canvas||this.canvas.focus(),this.viewport.flipped&&(n.position.x=this.viewport.getContainerSize().x-n.position.x);var i={tracker:n.eventSource,position:n.position,quick:n.quick,shift:n.shift,originalEvent:n.originalEvent,originalTarget:n.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",i),!i.preventDefaultAction&&this.viewport&&n.quick&&(!0===(r=this.gestureSettingsByDeviceType(n.pointerType)).clickToZoom&&(this.viewport.zoomBy(n.shift?1/this.zoomPerClick:this.zoomPerClick,r.zoomToRefPoint?this.viewport.pointFromPixel(n.position,!0):null),this.viewport.applyConstraints()),r.dblClickDragToZoom&&(!0===e[this.hash].draggingToZoom?(e[this.hash].lastClickTime=null,e[this.hash].draggingToZoom=!1):e[this.hash].lastClickTime=t.now()))}function g(t){var e,n={tracker:t.eventSource,position:t.position,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",n),!n.preventDefaultAction&&this.viewport&&(e=this.gestureSettingsByDeviceType(t.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(t.shift?1/this.zoomPerClick:this.zoomPerClick,e.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints())}function y(t){var n,r={tracker:t.eventSource,pointerType:t.pointerType,position:t.position,delta:t.delta,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",r),n=this.gestureSettingsByDeviceType(t.pointerType),!r.preventDefaultAction&&this.viewport)if(n.dblClickDragToZoom&&e[this.hash].draggingToZoom){var i=Math.pow(this.zoomPerDblClickDrag,t.delta.y/50);this.viewport.zoomBy(i)}else if(n.dragToPan&&!e[this.hash].draggingToZoom){if(this.panHorizontal||(t.delta.x=0),this.panVertical||(t.delta.y=0),this.viewport.flipped&&(t.delta.x=-t.delta.x),this.constrainDuringPan){var o=this.viewport.deltaPointsFromPixels(t.delta.negate());this.viewport.centerSpringX.target.value+=o.x,this.viewport.centerSpringY.target.value+=o.y;var a=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=o.x,this.viewport.centerSpringY.target.value-=o.y,a.xConstrained&&(t.delta.x=0),a.yConstrained&&(t.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(t.delta.negate()),n.flickEnabled&&!this.constrainDuringPan)}}function v(n){var r,i={tracker:n.eventSource,pointerType:n.pointerType,position:n.position,speed:n.speed,direction:n.direction,shift:n.shift,originalEvent:n.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",i),r=this.gestureSettingsByDeviceType(n.pointerType),!i.preventDefaultAction&&this.viewport){if(!e[this.hash].draggingToZoom&&r.flickEnabled&&n.speed>=r.flickMinSpeed){var o=0;this.panHorizontal&&(o=r.flickMomentum*n.speed*Math.cos(n.direction));var a=0;this.panVertical&&(a=r.flickMomentum*n.speed*Math.sin(n.direction));var s=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),u=this.viewport.pointFromPixel(new t.Point(s.x-o,s.y-a));this.viewport.panTo(u,!1)}this.viewport.applyConstraints()}r.dblClickDragToZoom&&!0===e[this.hash].draggingToZoom&&(e[this.hash].draggingToZoom=!1)}function b(t){this.raiseEvent("canvas-enter",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function _(t){this.raiseEvent("canvas-exit",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function A(n){if(this.raiseEvent("canvas-press",{tracker:n.eventSource,pointerType:n.pointerType,position:n.position,insideElementPressed:n.insideElementPressed,insideElementReleased:n.insideElementReleased,originalEvent:n.originalEvent}),this.gestureSettingsByDeviceType(n.pointerType).dblClickDragToZoom){var r=e[this.hash].lastClickTime,i=t.now();if(null===r)return;i-r<this.dblClickTimeThreshold&&(e[this.hash].draggingToZoom=!0),e[this.hash].lastClickTime=null}}function w(t){this.raiseEvent("canvas-release",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,insideElementPressed:t.insideElementPressed,insideElementReleased:t.insideElementReleased,originalEvent:t.originalEvent})}function x(t){this.raiseEvent("canvas-nonprimary-press",{tracker:t.eventSource,position:t.position,pointerType:t.pointerType,button:t.button,buttons:t.buttons,originalEvent:t.originalEvent})}function E(t){this.raiseEvent("canvas-nonprimary-release",{tracker:t.eventSource,position:t.position,pointerType:t.pointerType,button:t.button,buttons:t.buttons,originalEvent:t.originalEvent})}function O(t){var e,n,r,i={tracker:t.eventSource,pointerType:t.pointerType,gesturePoints:t.gesturePoints,lastCenter:t.lastCenter,center:t.center,lastDistance:t.lastDistance,distance:t.distance,shift:t.shift,originalEvent:t.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",i),this.viewport&&(!(e=this.gestureSettingsByDeviceType(t.pointerType)).pinchToZoom||i.preventDefaultPanAction&&i.preventDefaultZoomAction||(n=this.viewport.pointFromPixel(t.center,!0),e.zoomToRefPoint&&!i.preventDefaultPanAction&&(r=this.viewport.pointFromPixel(t.lastCenter,!0).minus(n),this.panHorizontal||(r.x=0),this.panVertical||(r.y=0),this.viewport.panBy(r,!0)),i.preventDefaultZoomAction||this.viewport.zoomBy(t.distance/t.lastDistance,n,!0),this.viewport.applyConstraints()),e.pinchRotate&&!i.preventDefaultRotateAction)){var o=Math.atan2(t.gesturePoints[0].currentPos.y-t.gesturePoints[1].currentPos.y,t.gesturePoints[0].currentPos.x-t.gesturePoints[1].currentPos.x),a=Math.atan2(t.gesturePoints[0].lastPos.y-t.gesturePoints[1].lastPos.y,t.gesturePoints[0].lastPos.x-t.gesturePoints[1].lastPos.x);n=this.viewport.pointFromPixel(t.center,!0),this.viewport.rotateTo(this.viewport.getRotation(!0)+(o-a)*(180/Math.PI),n,!0)}}function S(t){this.raiseEvent("canvas-focus",{tracker:t.eventSource,originalEvent:t.originalEvent})}function P(t){this.raiseEvent("canvas-blur",{tracker:t.eventSource,originalEvent:t.originalEvent})}function C(e){var n,r,i,o;(o=t.now())-this._lastScrollTime>this.minScrollDeltaTime?(this._lastScrollTime=o,n={tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",n),!n.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x),(r=this.gestureSettingsByDeviceType(e.pointerType)).scrollToZoom&&(i=Math.pow(this.zoomPerScroll,e.scroll),this.viewport.zoomBy(i,r.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())),e.preventDefault=n.preventDefault):e.preventDefault=!0}function T(t){e[this.hash].mouseInside=!0,l(this),this.raiseEvent("container-enter",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function k(t){t.pointers<1&&(e[this.hash].mouseInside=!1,e[this.hash].animating||u(this)),this.raiseEvent("container-exit",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function I(n){!function(n){if(n._opening||!e[n.hash])return;if(n.autoResize||e[n.hash].forceResize){var i;if(n._autoResizePolling){i=r(n.container);var o=e[n.hash].prevContainerSize;i.equals(o)||(e[n.hash].needsResize=!0)}e[n.hash].needsResize&&function(n,r){var i,o=n.viewport,a=o.getZoom(),s=o.getCenter();if(o.resize(r,n.preserveImageSizeOnResize),o.panTo(s,!0),n.preserveImageSizeOnResize)i=e[n.hash].prevContainerSize.x/r.x;else{var u=new t.Point(0,0),l=new t.Point(e[n.hash].prevContainerSize.x,e[n.hash].prevContainerSize.y).distanceTo(u);i=new t.Point(r.x,r.y).distanceTo(u)/l*e[n.hash].prevContainerSize.x/r.x}o.zoomTo(a*i,null,!0),e[n.hash].prevContainerSize=r,e[n.hash].forceRedraw=!0,e[n.hash].needsResize=!1,e[n.hash].forceResize=!1}(n,i||r(n.container))}var a=n.viewport.update(),s=n.world.update()||a;a&&n.raiseEvent("viewport-change");n.referenceStrip&&(s=n.referenceStrip.update(n.viewport)||s);var c=e[n.hash].animating;!c&&s&&(n.raiseEvent("animation-start"),l(n));var f=c&&!s;f&&(e[n.hash].animating=!1);(s||f||e[n.hash].forceRedraw||n.world.needsDraw())&&(!function(t){t.imageLoader.clear(),t.drawer.clear(),t.world.draw(),t.raiseEvent("update-viewport",{})}(n),n._drawOverlays(),n.navigator&&n.navigator.update(n.viewport),e[n.hash].forceRedraw=!1,s&&n.raiseEvent("animation"));f&&(n.raiseEvent("animation-finish"),e[n.hash].mouseInside||u(n));e[n.hash].animating=s}(n),n.isOpen()?n._updateRequestId=a(n,I):n._updateRequestId=!1}function L(t,e){return t?t+e:e}function j(){e[this.hash].lastZoomTime=t.now(),e[this.hash].zoomFactor=this.zoomPerSecond,e[this.hash].zooming=!0,N(this)}function M(){e[this.hash].lastZoomTime=t.now(),e[this.hash].zoomFactor=1/this.zoomPerSecond,e[this.hash].zooming=!0,N(this)}function R(){e[this.hash].zooming=!1}function N(e){t.requestAnimationFrame(t.delegate(e,D))}function D(){var n,r,i;e[this.hash].zooming&&this.viewport&&(r=(n=t.now())-e[this.hash].lastZoomTime,i=Math.pow(e[this.hash].zoomFactor,r/1e3),this.viewport.zoomBy(i),this.viewport.applyConstraints(),e[this.hash].lastZoomTime=n,N(this))}function F(){this.viewport&&(e[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function B(){this.viewport&&(e[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function z(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function U(){this.viewport&&this.viewport.goHome()}function G(){this.isFullPage()&&!t.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function V(){if(this.viewport){var t=this.viewport.getRotation();this.viewport.flipped?t+=this.rotationIncrement:t-=this.rotationIncrement,this.viewport.setRotation(t)}}function q(){if(this.viewport){var t=this.viewport.getRotation();this.viewport.flipped?t-=this.rotationIncrement:t+=this.rotationIncrement,this.viewport.setRotation(t)}}function H(){this.viewport.toggleFlip()}t.Viewer=function(i){var o,s,l=arguments,c=this;if(t.isPlainObject(i)||(i={id:l[0],xmlPath:l.length>1?l[1]:void 0,prefixUrl:l.length>2?l[2]:void 0,controls:l.length>3?l[3]:void 0,overlays:l.length>4?l[4]:void 0}),i.config&&(t.extend(!0,i,i.config),delete i.config),t.extend(!0,this,{id:i.id,hash:i.hash||n++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttonGroup:null,profiler:null},t.DEFAULT_SETTINGS,i),"undefined"===typeof this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for("undefined"!==typeof e[this.hash]&&t.console.warn("Hash "+this.hash+" has already been used."),e[this.hash]={fsBoundsDelta:new t.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,needsResize:!1,forceResize:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null,lastClickTime:null,draggingToZoom:!1},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=t.now(),t.EventSource.call(this),this.addHandler("open-failed",(function(e){var n=t.getString("Errors.OpenFailed",e.eventSource,e.message);c._showMessage(n)})),t.ControlDock.call(this,i),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=t.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(s=this.canvas.style).width="100%",s.height="100%",s.overflow="hidden",s.position="absolute",s.top="0px",s.left="0px",t.setElementTouchActionNone(this.canvas),""!==i.tabIndex&&(this.canvas.tabIndex=void 0===i.tabIndex?0:i.tabIndex),this.container.className="openseadragon-container",function(t){t.width="100%",t.height="100%",t.position="relative",t.overflow="hidden",t.left="0px",t.top="0px",t.textAlign="left"}(this.container.style),t.setElementTouchActionNone(this.container),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new t.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:t.delegate(this,h),keyDownHandler:t.delegate(this,p),keyHandler:t.delegate(this,d),clickHandler:t.delegate(this,m),dblClickHandler:t.delegate(this,g),dragHandler:t.delegate(this,y),dragEndHandler:t.delegate(this,v),enterHandler:t.delegate(this,b),leaveHandler:t.delegate(this,_),pressHandler:t.delegate(this,A),releaseHandler:t.delegate(this,w),nonPrimaryPressHandler:t.delegate(this,x),nonPrimaryReleaseHandler:t.delegate(this,E),scrollHandler:t.delegate(this,C),pinchHandler:t.delegate(this,O),focusHandler:t.delegate(this,S),blurHandler:t.delegate(this,P)}),this.outerTracker=new t.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:t.delegate(this,T),leaveHandler:t.delegate(this,k)}),this.toolbar&&(this.toolbar=new t.ControlDock({element:this.toolbar})),this.bindStandardControls(),e[this.hash].prevContainerSize=r(this.container),window.ResizeObserver?(this._autoResizePolling=!1,this._resizeObserver=new ResizeObserver((function(){e[c.hash].needsResize=!0})),this._resizeObserver.observe(this.container,{})):this._autoResizePolling=!0,this.world=new t.World({viewer:this}),this.world.addHandler("add-item",(function(t){c.source=c.world.getItemAt(0).source,e[c.hash].forceRedraw=!0,c._updateRequestId||(c._updateRequestId=a(c,I))})),this.world.addHandler("remove-item",(function(t){c.world.getItemCount()?c.source=c.world.getItemAt(0).source:c.source=null,e[c.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(t){c.viewport&&c.viewport._setContentBounds(c.world.getHomeBounds(),c.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(t){c.source=c.world.getItemAt(0).source})),this.viewport=new t.Viewport({containerSize:e[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new t.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:i.timeout,tileRetryMax:this.tileRetryMax,tileRetryDelay:this.tileRetryDelay}),this.tileCache=new t.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new t.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=t.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(o=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new t.Navigator({element:this.navigatorElement,id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy,animationTime:this.animationTime})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),o=0;o<this.customControls.length;o++)this.addControl(this.customControls[o].id,{anchor:this.customControls[o].anchor});t.requestAnimationFrame((function(){u(c)})),void 0===this.imageSmoothingEnabled||this.imageSmoothingEnabled||this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),t._viewers.set(this.element,this)},t.extend(t.Viewer.prototype,t.EventSource.prototype,t.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(e){return t.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(e)},openTileSource:function(e){return t.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(e)},get buttons(){return t.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"),this.buttonGroup},open:function(e,n){var r=this;if(this.close(),!e)return this;if(this.sequenceMode&&t.isArray(e))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),"undefined"===typeof n||isNaN(n)||(this.initialPage=n),this.tileSources=e,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),this._updateSequenceButtons(this._sequenceIndex),this;if(t.isArray(e)||(e=[e]),!e.length)return this;this._opening=!0;for(var o,a=e.length,s=0,u=0,l=function(){if(s+u===a)if(s){!r._firstOpen&&r.preserveViewport||(r.viewport.goHome(!0),r.viewport.update()),r._firstOpen=!1;var t=e[0];if(t.tileSource&&(t=t.tileSource),r.overlays&&!r.preserveOverlays)for(var n=0;n<r.overlays.length;n++)r.currentOverlays[n]=i(r,r.overlays[n]);r._drawOverlays(),r._opening=!1,r.raiseEvent("open",{source:t})}else r._opening=!1,r.raiseEvent("open-failed",o)},c=function(e){t.isPlainObject(e)&&e.tileSource||(e={tileSource:e}),void 0!==e.index&&(t.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete e.index),void 0===e.collectionImmediately&&(e.collectionImmediately=!0);var n=e.success;e.success=function(t){if(s++,e.tileSource.overlays)for(var i=0;i<e.tileSource.overlays.length;i++)r.addOverlay(e.tileSource.overlays[i]);n&&n(t),l()};var i=e.error;e.error=function(t){u++,o||(o=t),i&&i(t),l()},r.addTiledImage(e)},f=0;f<e.length;f++)c(e[f]);return this},close:function(){return e[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),e[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(e[this.hash]){if(this.raiseEvent("before-destroy"),this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this._resizeObserver&&this._resizeObserver.disconnect(),this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),null!==this._updateRequestId&&(t.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),e[this.navigator.hash]=null,delete e[this.navigator.hash],this.navigator=null),this.buttonGroup)this.buttonGroup.destroy();else if(this.customButtons)for(;this.customButtons.length;)this.customButtons.pop().destroy();if(this.paging&&this.paging.destroy(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.container.onsubmit=null,this.clearControls(),this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),e[this.hash]=null,delete e[this.hash],this.canvas=null,this.container=null,t._viewers.delete(this.element),this.element=null,this.raiseEvent("destroy"),this.removeAllHandlers()}},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(t){return this.innerTracker.setTracking(t),this.outerTracker.setTracking(t),this.raiseEvent("mouse-enabled",{enabled:t}),this},areControlsEnabled:function(){var t,e=this.controls.length;for(t=0;t<this.controls.length;t++)e=e&&this.controls[t].isVisible();return e},setControlsEnabled:function(t){return t?l(this):u(this),this.raiseEvent("controls-enabled",{enabled:t}),this},setDebugMode:function(t){for(var e=0;e<this.world.getItemCount();e++)this.world.getItemAt(e).debugMode=t;this.debugMode=t,this.forceRedraw()},setAjaxHeaders:function(e,n){if(null===e&&(e={}),t.isPlainObject(e)){if(void 0===n&&(n=!0),this.ajaxHeaders=e,n){for(var r=0;r<this.world.getItemCount();r++)this.world.getItemAt(r)._updateAjaxHeaders(!0);if(this.navigator&&this.navigator.setAjaxHeaders(this.ajaxHeaders,!0),this.referenceStrip&&this.referenceStrip.miniViewers)for(var i in this.referenceStrip.miniViewers)this.referenceStrip.miniViewers[i].setAjaxHeaders(this.ajaxHeaders,!0)}}else console.error("[Viewer.setAjaxHeaders] Ignoring invalid headers, must be a plain object")},addButton:function(t){this.buttonGroup.addButton(t)},isFullPage:function(){return e[this.hash].fullPage},setFullPage:function(n){var r,i,o=document.body,a=o.style,s=document.documentElement.style,u=this;if(n===this.isFullPage())return this;var l={fullPage:n,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",l),l.preventDefaultAction)return this;if(n){for(this.elementSize=t.getElementSize(this.element),this.pageScroll=t.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=a.margin,this.docMargin=s.margin,a.margin="0",s.margin="0",this.bodyPadding=a.padding,this.docPadding=s.padding,a.padding="0",s.padding="0",this.bodyWidth=a.width,this.docWidth=s.width,a.width="100%",s.width="100%",this.bodyHeight=a.height,this.docHeight=s.height,a.height="100%",s.height="100%",this.bodyDisplay=a.display,a.display="block",this.previousBody=[],e[this.hash].prevElementParent=this.element.parentNode,e[this.hash].prevNextSibling=this.element.nextSibling,e[this.hash].prevElementWidth=this.element.style.width,e[this.hash].prevElementHeight=this.element.style.height,r=o.childNodes.length,i=0;i<r;i++)this.previousBody.push(o.childNodes[0]),o.removeChild(o.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,o.appendChild(this.toolbar.element),t.addClass(this.toolbar.element,"fullpage")),t.addClass(this.element,"fullpage"),o.appendChild(this.element),this.element.style.height="100vh",this.element.style.width="100vw",this.toolbar&&this.toolbar.element&&(this.element.style.height=t.getElementSize(this.element).y-t.getElementSize(this.toolbar.element).y+"px"),e[this.hash].fullPage=!0,t.delegate(this,T)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,a.margin=this.bodyMargin,s.margin=this.docMargin,a.padding=this.bodyPadding,s.padding=this.docPadding,a.width=this.bodyWidth,s.width=this.docWidth,a.height=this.bodyHeight,s.height=this.docHeight,a.display=this.bodyDisplay,o.removeChild(this.element),r=this.previousBody.length,i=0;i<r;i++)o.appendChild(this.previousBody.shift());t.removeClass(this.element,"fullpage"),e[this.hash].prevElementParent.insertBefore(this.element,e[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(o.removeChild(this.toolbar.element),t.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=e[this.hash].prevElementWidth,this.element.style.height=e[this.hash].prevElementHeight;var c=0,f=function(){t.setPageScroll(u.pageScroll);var e=t.getPageScroll();++c<10&&(e.x!==u.pageScroll.x||e.y!==u.pageScroll.y)&&t.requestAnimationFrame(f)};t.requestAnimationFrame(f),e[this.hash].fullPage=!1,t.delegate(this,k)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:n}),this},setFullScreen:function(e){var n=this;if(!t.supportsFullScreen)return this.setFullPage(e);if(t.isFullScreen()===e)return this;var r={fullScreen:e,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",r),r.preventDefaultAction)return this;if(e){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var i=function(){var e=t.isFullScreen();e||(t.removeEvent(document,t.fullScreenEventName,i),t.removeEvent(document,t.fullScreenErrorEventName,i),n.setFullPage(!1),n.isFullPage()&&(n.element.style.width=n.fullPageStyleWidth,n.element.style.height=n.fullPageStyleHeight)),n.navigator&&n.viewport&&setTimeout((function(){n.navigator.update(n.viewport)})),n.raiseEvent("full-screen",{fullScreen:e})};t.addEvent(document,t.fullScreenEventName,i),t.addEvent(document,t.fullScreenErrorEventName,i),t.requestFullScreen(document.body)}else t.exitFullScreen();return this},isVisible:function(){return"hidden"!==this.container.style.visibility},isFullScreen:function(){return t.isFullScreen()&&this.isFullPage()},setVisible:function(t){return this.container.style.visibility=t?"":"hidden",this.raiseEvent("visible",{visible:t}),this},addTiledImage:function(e){t.console.assert(e,"[Viewer.addTiledImage] options is required"),t.console.assert(e.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),t.console.assert(!e.replace||e.index>-1&&e.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var n=this;e.replace&&(e.replaceItem=n.world.getItemAt(e.index)),this._hideMessage(),void 0===e.placeholderFillStyle&&(e.placeholderFillStyle=this.placeholderFillStyle),void 0===e.opacity&&(e.opacity=this.opacity),void 0===e.preload&&(e.preload=this.preload),void 0===e.compositeOperation&&(e.compositeOperation=this.compositeOperation),void 0===e.crossOriginPolicy&&(e.crossOriginPolicy=void 0!==e.tileSource.crossOriginPolicy?e.tileSource.crossOriginPolicy:this.crossOriginPolicy),void 0===e.ajaxWithCredentials&&(e.ajaxWithCredentials=this.ajaxWithCredentials),void 0===e.loadTilesWithAjax&&(e.loadTilesWithAjax=this.loadTilesWithAjax),t.isPlainObject(e.ajaxHeaders)||(e.ajaxHeaders={});var r={options:e};function i(t){for(var i=0;i<n._loadQueue.length;i++)if(n._loadQueue[i]===r){n._loadQueue.splice(i,1);break}0===n._loadQueue.length&&o(r),n.raiseEvent("add-item-failed",t),e.error&&e.error(t)}function o(t){n.collectionMode&&(n.world.arrange({immediately:t.options.collectionImmediately,rows:n.collectionRows,columns:n.collectionColumns,layout:n.collectionLayout,tileSize:n.collectionTileSize,tileMargin:n.collectionTileMargin}),n.world.setAutoRefigureSizes(!0))}function a(){for(var e,r,i;n._loadQueue.length&&(e=n._loadQueue[0]).tileSource;){if(n._loadQueue.splice(0,1),e.options.replace){var a=n.world.getIndexOfItem(e.options.replaceItem);-1!==a&&(e.options.index=a),n.world.removeItem(e.options.replaceItem)}r=new t.TiledImage({viewer:n,source:e.tileSource,viewport:n.viewport,drawer:n.drawer,tileCache:n.tileCache,imageLoader:n.imageLoader,x:e.options.x,y:e.options.y,width:e.options.width,height:e.options.height,fitBounds:e.options.fitBounds,fitBoundsPlacement:e.options.fitBoundsPlacement,clip:e.options.clip,placeholderFillStyle:e.options.placeholderFillStyle,opacity:e.options.opacity,preload:e.options.preload,degrees:e.options.degrees,flipped:e.options.flipped,compositeOperation:e.options.compositeOperation,springStiffness:n.springStiffness,animationTime:n.animationTime,minZoomImageRatio:n.minZoomImageRatio,wrapHorizontal:n.wrapHorizontal,wrapVertical:n.wrapVertical,immediateRender:n.immediateRender,blendTime:n.blendTime,alwaysBlend:n.alwaysBlend,minPixelRatio:n.minPixelRatio,smoothTileEdgesMinZoom:n.smoothTileEdgesMinZoom,iOSDevice:n.iOSDevice,crossOriginPolicy:e.options.crossOriginPolicy,ajaxWithCredentials:e.options.ajaxWithCredentials,loadTilesWithAjax:e.options.loadTilesWithAjax,ajaxHeaders:e.options.ajaxHeaders,debugMode:n.debugMode,subPixelRoundingForTransparency:n.subPixelRoundingForTransparency}),n.collectionMode&&n.world.setAutoRefigureSizes(!1),n.navigator&&(i=t.extend({},e.options,{replace:!1,originalTiledImage:r,tileSource:e.tileSource}),n.navigator.addTiledImage(i)),n.world.addItem(r,{index:e.options.index}),0===n._loadQueue.length&&o(e),1!==n.world.getItemCount()||n.preserveViewport||n.viewport.goHome(!0),e.options.success&&e.options.success({item:r})}}t.isArray(e.tileSource)?setTimeout((function(){i({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:e.tileSource,options:e})})):(this._loadQueue.push(r),function(e,n,r,i,o){var a=e;if("string"===t.type(n))if(n.match(/^\s*<.*>\s*$/))n=t.parseXml(n);else if(n.match(/^\s*[{[].*[}\]]\s*$/))try{var s=t.parseJSON(n);n=s}catch(l){}function u(t,e){t.ready?i(t):(t.addHandler("ready",(function(){i(t)})),t.addHandler("open-failed",(function(t){o({message:t.message,source:e})})))}setTimeout((function(){if("string"===t.type(n))(n=new t.TileSource({url:n,crossOriginPolicy:void 0!==r.crossOriginPolicy?r.crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,ajaxHeaders:r.ajaxHeaders?r.ajaxHeaders:e.ajaxHeaders,splitHashDataForPost:e.splitHashDataForPost,useCanvas:e.useCanvas,success:function(t){i(t.tileSource)}})).addHandler("open-failed",(function(t){o(t)}));else if(t.isPlainObject(n)||n.nodeType)if(void 0!==n.crossOriginPolicy||void 0===r.crossOriginPolicy&&void 0===e.crossOriginPolicy||(n.crossOriginPolicy=void 0!==r.crossOriginPolicy?r.crossOriginPolicy:e.crossOriginPolicy),void 0===n.ajaxWithCredentials&&(n.ajaxWithCredentials=e.ajaxWithCredentials),void 0===n.useCanvas&&(n.useCanvas=e.useCanvas),t.isFunction(n.getTileUrl)){var s=new t.TileSource(n);s.getTileUrl=n.getTileUrl,i(s)}else{var l=t.TileSource.determineType(a,n);if(!l)return void o({message:"Unable to load TileSource",source:n});var c=l.prototype.configure.apply(a,[n]);u(new l(c),n)}else u(n,n)}))}(this,e.tileSource,e,(function(t){r.tileSource=t,a()}),(function(t){t.options=e,i(t),a()})))},addSimpleImage:function(e){t.console.assert(e,"[Viewer.addSimpleImage] options is required"),t.console.assert(e.url,"[Viewer.addSimpleImage] options.url is required");var n=t.extend({},e,{tileSource:{type:"image",url:e.url}});delete n.url,this.addTiledImage(n)},addLayer:function(e){var n=this;t.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var r=t.extend({},e,{success:function(t){n.raiseEvent("add-layer",{options:e,drawer:t.item})},error:function(t){n.raiseEvent("add-layer-failed",t)}});return this.addTiledImage(r),this},getLayerAtLevel:function(e){return t.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(e)},getLevelOfLayer:function(e){return t.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(e)},getLayersCount:function(){return t.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(e,n){return t.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(e,n)},removeLayer:function(e){return t.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(e)},forceRedraw:function(){return e[this.hash].forceRedraw=!0,this},forceResize:function(){e[this.hash].needsResize=!0,e[this.hash].forceResize=!0},bindSequenceControls:function(){var e=t.delegate(this,c),n=t.delegate(this,f),r=t.delegate(this,this.goToNextPage),i=t.delegate(this,this.goToPreviousPage),o=this.navImages,a=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(a=!1),this.previousButton=new t.Button({element:this.previousButton?t.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.PreviousPage"),srcRest:L(this.prefixUrl,o.previous.REST),srcGroup:L(this.prefixUrl,o.previous.GROUP),srcHover:L(this.prefixUrl,o.previous.HOVER),srcDown:L(this.prefixUrl,o.previous.DOWN),onRelease:i,onFocus:e,onBlur:n}),this.nextButton=new t.Button({element:this.nextButton?t.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.NextPage"),srcRest:L(this.prefixUrl,o.next.REST),srcGroup:L(this.prefixUrl,o.next.GROUP),srcHover:L(this.prefixUrl,o.next.HOVER),srcDown:L(this.prefixUrl,o.next.DOWN),onRelease:r,onFocus:e,onBlur:n}),this.navPrevNextWrap||this.previousButton.disable(),this.tileSources&&this.tileSources.length||this.nextButton.disable(),a&&(this.paging=new t.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:t.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||t.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var e=t.delegate(this,j),n=t.delegate(this,R),r=t.delegate(this,F),i=t.delegate(this,M),o=t.delegate(this,B),a=t.delegate(this,U),s=t.delegate(this,G),u=t.delegate(this,V),l=t.delegate(this,q),h=t.delegate(this,H),p=t.delegate(this,c),d=t.delegate(this,f),m=this.navImages,g=[],y=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(y=!1),this.showZoomControl&&(g.push(this.zoomInButton=new t.Button({element:this.zoomInButton?t.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.ZoomIn"),srcRest:L(this.prefixUrl,m.zoomIn.REST),srcGroup:L(this.prefixUrl,m.zoomIn.GROUP),srcHover:L(this.prefixUrl,m.zoomIn.HOVER),srcDown:L(this.prefixUrl,m.zoomIn.DOWN),onPress:e,onRelease:n,onClick:r,onEnter:e,onExit:n,onFocus:p,onBlur:d})),g.push(this.zoomOutButton=new t.Button({element:this.zoomOutButton?t.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.ZoomOut"),srcRest:L(this.prefixUrl,m.zoomOut.REST),srcGroup:L(this.prefixUrl,m.zoomOut.GROUP),srcHover:L(this.prefixUrl,m.zoomOut.HOVER),srcDown:L(this.prefixUrl,m.zoomOut.DOWN),onPress:i,onRelease:n,onClick:o,onEnter:i,onExit:n,onFocus:p,onBlur:d}))),this.showHomeControl&&g.push(this.homeButton=new t.Button({element:this.homeButton?t.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.Home"),srcRest:L(this.prefixUrl,m.home.REST),srcGroup:L(this.prefixUrl,m.home.GROUP),srcHover:L(this.prefixUrl,m.home.HOVER),srcDown:L(this.prefixUrl,m.home.DOWN),onRelease:a,onFocus:p,onBlur:d})),this.showFullPageControl&&g.push(this.fullPageButton=new t.Button({element:this.fullPageButton?t.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.FullPage"),srcRest:L(this.prefixUrl,m.fullpage.REST),srcGroup:L(this.prefixUrl,m.fullpage.GROUP),srcHover:L(this.prefixUrl,m.fullpage.HOVER),srcDown:L(this.prefixUrl,m.fullpage.DOWN),onRelease:s,onFocus:p,onBlur:d})),this.showRotationControl&&(g.push(this.rotateLeftButton=new t.Button({element:this.rotateLeftButton?t.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.RotateLeft"),srcRest:L(this.prefixUrl,m.rotateleft.REST),srcGroup:L(this.prefixUrl,m.rotateleft.GROUP),srcHover:L(this.prefixUrl,m.rotateleft.HOVER),srcDown:L(this.prefixUrl,m.rotateleft.DOWN),onRelease:u,onFocus:p,onBlur:d})),g.push(this.rotateRightButton=new t.Button({element:this.rotateRightButton?t.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.RotateRight"),srcRest:L(this.prefixUrl,m.rotateright.REST),srcGroup:L(this.prefixUrl,m.rotateright.GROUP),srcHover:L(this.prefixUrl,m.rotateright.HOVER),srcDown:L(this.prefixUrl,m.rotateright.DOWN),onRelease:l,onFocus:p,onBlur:d}))),this.showFlipControl&&g.push(this.flipButton=new t.Button({element:this.flipButton?t.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.Flip"),srcRest:L(this.prefixUrl,m.flip.REST),srcGroup:L(this.prefixUrl,m.flip.GROUP),srcHover:L(this.prefixUrl,m.flip.HOVER),srcDown:L(this.prefixUrl,m.flip.DOWN),onRelease:h,onFocus:p,onBlur:d})),y?(this.buttonGroup=new t.ButtonGroup({buttons:g,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",t.delegate(this,z)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||t.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||t.ControlAnchor.TOP_LEFT})):this.customButtons=g),this},currentPage:function(){return this._sequenceIndex},goToPage:function(t){return this.tileSources&&t>=0&&t<this.tileSources.length&&(this._sequenceIndex=t,this._updateSequenceButtons(t),this.open(this.tileSources[t]),this.referenceStrip&&this.referenceStrip.setFocus(t),this.raiseEvent("page",{page:t})),this},addOverlay:function(e,n,r,a){var s;if(s=t.isPlainObject(e)?e:{element:e,location:n,placement:r,onDraw:a},e=t.getElement(s.element),o(this.currentOverlays,e)>=0)return this;var u=i(this,s);return this.currentOverlays.push(u),u.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:e,location:s.location,placement:s.placement}),this},updateOverlay:function(n,r,i){var a;return n=t.getElement(n),(a=o(this.currentOverlays,n))>=0&&(this.currentOverlays[a].update(r,i),e[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:n,location:r,placement:i})),this},removeOverlay:function(n){var r;return n=t.getElement(n),(r=o(this.currentOverlays,n))>=0&&(this.currentOverlays[r].destroy(),this.currentOverlays.splice(r,1),e[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:n})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return e[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(e){var n;return e=t.getElement(e),(n=o(this.currentOverlays,e))>=0?this.currentOverlays[n]:null},_updateSequenceButtons:function(t){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==t?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(t>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(e){this._hideMessage();var n=t.makeNeutralElement("div");n.appendChild(document.createTextNode(e)),this.messageDiv=t.makeCenteredNode(n),t.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var t=this.messageDiv;t&&(t.parentNode.removeChild(t),delete this.messageDiv)},gestureSettingsByDeviceType:function(t){switch(t){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var t,e=this.currentOverlays.length;for(t=0;t<e;t++)this.currentOverlays[t].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(this.referenceStrip=new t.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else t.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),t.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){t.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var e=t.pixelDensityRatio,n=t.getCurrentPixelDensityRatio();e!==n&&(t.pixelDensityRatio=n,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var t=this._sequenceIndex-1;this.navPrevNextWrap&&t<0&&(t+=this.tileSources.length),this.goToPage(t)},goToNextPage:function(){var t=this._sequenceIndex+1;this.navPrevNextWrap&&t>=this.tileSources.length&&(t=0),this.goToPage(t)},isAnimating:function(){return e[this.hash].animating}})}(u),function(t){function e(t){var e={tracker:t.eventSource,position:t.position,quick:t.quick,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",e),!e.preventDefaultAction&&t.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x);var n=this.viewport.pointFromPixel(t.position);this.panVertical?this.panHorizontal||(n.x=this.viewer.viewport.getCenter(!0).x):n.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(n),this.viewer.viewport.applyConstraints()}}function n(t){var e={tracker:t.eventSource,position:t.position,delta:t.delta,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",e),!e.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(t.delta.x=0),this.panVertical||(t.delta.y=0),this.viewer.viewport.flipped&&(t.delta.x=-t.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(t.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function r(t){t.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function i(t){var e={tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent,preventDefault:t.preventDefault};this.viewer.raiseEvent("navigator-scroll",e),t.preventDefault=e.preventDefault}function o(t,e){a(t,"rotate("+e+"deg)")}function a(t,e){t.style.webkitTransform=e,t.style.mozTransform=e,t.style.msTransform=e,t.style.oTransform=e,t.style.transform=e}t.Navigator=function(a){var s,u,l,c,f=a.viewer,h=this;function p(t,e){o(h.displayRegionContainer,t),o(h.displayRegion,-t),h.viewport.setRotation(t,e)}(a.element||a.id?(a.element?(a.id&&t.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."),a.element.id?a.id=a.element.id:a.id="navigator-"+t.now(),this.element=a.element):this.element=document.getElementById(a.id),a.controlOptions={anchor:t.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(a.id="navigator-"+t.now(),this.element=t.makeNeutralElement("div"),a.controlOptions={anchor:t.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:a.autoFade},a.position&&("BOTTOM_RIGHT"===a.position?a.controlOptions.anchor=t.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"===a.position?a.controlOptions.anchor=t.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"===a.position?a.controlOptions.anchor=t.ControlAnchor.TOP_RIGHT:"TOP_LEFT"===a.position?a.controlOptions.anchor=t.ControlAnchor.TOP_LEFT:"ABSOLUTE"===a.position&&(a.controlOptions.anchor=t.ControlAnchor.ABSOLUTE,a.controlOptions.top=a.top,a.controlOptions.left=a.left,a.controlOptions.height=a.height,a.controlOptions.width=a.width))),this.element.id=a.id,this.element.className+=" navigator",(a=t.extend(!0,{sizeRatio:t.DEFAULT_SETTINGS.navigatorSizeRatio},a,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:a.animationTime,autoResize:!1,minZoomImageRatio:1,background:a.background,opacity:a.opacity,borderColor:a.borderColor,displayRegionColor:a.displayRegionColor})).minPixelRatio=this.minPixelRatio=f.minPixelRatio,t.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new t.Point(1,1),this.totalBorderWidths=new t.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),a.controlOptions.anchor!==t.ControlAnchor.NONE&&(l=this.element.style,c=this.borderWidth,l.margin="0px",l.border=c+"px solid "+a.borderColor,l.padding="0px",l.background=a.background,l.opacity=a.opacity,l.overflow="hidden"),this.displayRegion=t.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(t,e){t.position="relative",t.top="0px",t.left="0px",t.fontSize="0px",t.overflow="hidden",t.border=e+"px solid "+a.displayRegionColor,t.margin="0px",t.padding="0px",t.background="transparent",t.float="left",t.cssFloat="left",t.styleFloat="left",t.zIndex=999999999,t.cursor="default",t.boxSizing="content-box"}(this.displayRegion.style,this.borderWidth),t.setElementPointerEventsNone(this.displayRegion),t.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=t.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",t.setElementPointerEventsNone(this.displayRegionContainer),t.setElementTouchActionNone(this.displayRegionContainer),f.addControl(this.element,a.controlOptions),this._resizeWithViewer=a.controlOptions.anchor!==t.ControlAnchor.ABSOLUTE&&a.controlOptions.anchor!==t.ControlAnchor.NONE,a.width&&a.height?(this.setWidth(a.width),this.setHeight(a.height)):this._resizeWithViewer&&(s=t.getElementSize(f.element),this.element.style.height=Math.round(s.y*a.sizeRatio)+"px",this.element.style.width=Math.round(s.x*a.sizeRatio)+"px",this.oldViewerSize=s,u=t.getElementSize(this.element),this.elementArea=u.x*u.y),this.oldContainerSize=new t.Point(0,0),t.Viewer.apply(this,[a]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),a.navigatorRotate)&&(p(a.viewer.viewport?a.viewer.viewport.getRotation():a.viewer.degrees||0,!0),a.viewer.addHandler("rotate",(function(t){p(t.degrees,t.immediately)})));this.innerTracker.destroy(),this.innerTracker=new t.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:t.delegate(this,n),clickHandler:t.delegate(this,e),releaseHandler:t.delegate(this,r),scrollHandler:t.delegate(this,i),preProcessEventHandler:function(t){"wheel"===t.eventType&&(t.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",t.setElementPointerEventsNone(this.canvas),t.setElementPointerEventsNone(this.container),this.addHandler("reset-size",(function(){h.viewport&&h.viewport.goHome(!0)})),f.world.addHandler("item-index-change",(function(t){window.setTimeout((function(){var e=h.world.getItemAt(t.previousIndex);h.world.setItemIndex(e,t.newIndex)}),1)})),f.world.addHandler("remove-item",(function(t){var e=t.item,n=h._getMatchingItem(e);n&&h.world.removeItem(n)})),this.update(f.viewport)},t.extend(t.Navigator.prototype,t.EventSource.prototype,t.Viewer.prototype,{updateSize:function(){if(this.viewport){var e=new t.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);e.equals(this.oldContainerSize)||(this.viewport.resize(e,!0),this.viewport.goHome(!0),this.oldContainerSize=e,this.drawer.clear(),this.world.draw())}},setWidth:function(t){this.width=t,this.element.style.width="number"===typeof t?t+"px":t,this._resizeWithViewer=!1,this.updateSize()},setHeight:function(t){this.height=t,this.element.style.height="number"===typeof t?t+"px":t,this._resizeWithViewer=!1,this.updateSize()},setFlip:function(t){return this.viewport.setFlip(t),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(t){a(this.displayRegion,t),a(this.canvas,t),a(this.element,t)},update:function(e){var n,r,i,a,s,u;if(n=t.getElementSize(this.viewer.element),this._resizeWithViewer&&n.x&&n.y&&!n.equals(this.oldViewerSize)&&(this.oldViewerSize=n,this.maintainSizeRatio||!this.elementArea?(r=n.x*this.sizeRatio,i=n.y*this.sizeRatio):(r=Math.sqrt(this.elementArea*(n.x/n.y)),i=this.elementArea/r),this.element.style.width=Math.round(r)+"px",this.element.style.height=Math.round(i)+"px",this.elementArea||(this.elementArea=r*i),this.updateSize()),e&&this.viewport){if(a=e.getBoundsNoRotate(!0),s=this.viewport.pixelFromPointNoRotate(a.getTopLeft(),!1),u=this.viewport.pixelFromPointNoRotate(a.getBottomRight(),!1).minus(this.totalBorderWidths),!this.navigatorRotate){var l=e.getRotation(!0);o(this.displayRegion,-l)}var c=this.displayRegion.style;c.display=this.world.getItemCount()?"block":"none",c.top=s.y.toFixed(2)+"px",c.left=s.x.toFixed(2)+"px";var f=u.x-s.x,h=u.y-s.y;c.width=Math.round(Math.max(f,0))+"px",c.height=Math.round(Math.max(h,0))+"px"}},addTiledImage:function(e){var n=this,r=e.originalTiledImage;delete e.original;var i=t.extend({},e,{success:function(t){var e=t.item;function i(){n._matchBounds(e,r)}e._originalForNavigator=r,n._matchBounds(e,r,!0),n._matchOpacity(e,r),n._matchCompositeOperation(e,r),r.addHandler("bounds-change",i),r.addHandler("clip-change",i),r.addHandler("opacity-change",(function(){n._matchOpacity(e,r)})),r.addHandler("composite-operation-change",(function(){n._matchCompositeOperation(e,r)}))}});return t.Viewer.prototype.addTiledImage.apply(this,[i])},destroy:function(){return t.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(t){for(var e,n=this.world.getItemCount(),r=0;r<n;r++)if((e=this.world.getItemAt(r))._originalForNavigator===t)return e;return null},_matchBounds:function(t,e,n){var r=e.getBoundsNoRotate();t.setPosition(r.getTopLeft(),n),t.setWidth(r.width,n),t.setRotation(e.getRotation(),n),t.setClip(e.getClip()),t.setFlip(e.getFlip())},_matchOpacity:function(t,e){t.setOpacity(e.opacity)},_matchCompositeOperation:function(t,e){t.setCompositeOperation(e.compositeOperation)}})}(u),function(t){var e={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};t.extend(t,{getString:function(n){var r,i=n.split("."),o=null,a=arguments,s=e;for(r=0;r<i.length-1;r++)s=s[i[r]]||{};return"string"!==typeof(o=s[i[r]])&&(t.console.error("Untranslated source string:",n),o=""),o.replace(/\{\d+\}/g,(function(t){var e=parseInt(t.match(/\d+/),10)+1;return e<a.length?a[e]:""}))},setString:function(t,n){var r,i=t.split("."),o=e;for(r=0;r<i.length-1;r++)o[i[r]]||(o[i[r]]={}),o=o[i[r]];o[i[r]]=n}})}(u),function(t){t.Point=function(t,e){this.x="number"===typeof t?t:0,this.y="number"===typeof e?e:0},t.Point.prototype={clone:function(){return new t.Point(this.x,this.y)},plus:function(e){return new t.Point(this.x+e.x,this.y+e.y)},minus:function(e){return new t.Point(this.x-e.x,this.y-e.y)},times:function(e){return new t.Point(this.x*e,this.y*e)},divide:function(e){return new t.Point(this.x/e,this.y/e)},negate:function(){return new t.Point(-this.x,-this.y)},distanceTo:function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},squaredDistanceTo:function(t){return Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2)},apply:function(e){return new t.Point(e(this.x),e(this.y))},equals:function(e){return e instanceof t.Point&&this.x===e.x&&this.y===e.y},rotate:function(e,n){var r,i;if(n=n||new t.Point(0,0),e%90===0){switch(t.positiveModulo(e,360)){case 0:r=1,i=0;break;case 90:r=0,i=1;break;case 180:r=-1,i=0;break;case 270:r=0,i=-1}}else{var o=e*Math.PI/180;r=Math.cos(o),i=Math.sin(o)}var a=r*(this.x-n.x)-i*(this.y-n.y)+n.x,s=i*(this.x-n.x)+r*(this.y-n.y)+n.y;return new t.Point(a,s)},toString:function(){return"("+Math.round(100*this.x)/100+","+Math.round(100*this.y)/100+")"}}}(u),function(t){t.TileSource=function(e,n,r,i,o,a){var s,u,l=this,c=arguments;if(s=t.isPlainObject(e)?e:{width:c[0],height:c[1],tileSize:c[2],tileOverlap:c[3],minLevel:c[4],maxLevel:c[5]},t.EventSource.call(this),t.extend(!0,this,s),!this.success)for(u=0;u<arguments.length;u++)if(t.isFunction(arguments[u])){this.success=arguments[u];break}this.success&&this.addHandler("ready",(function(t){l.success(t)})),"string"===t.type(arguments[0])&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new t.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=s.width&&s.height?s.width/s.height:1,this.dimensions=new t.Point(s.width,s.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=s.tileOverlap?s.tileOverlap:0,this.minLevel=s.minLevel?s.minLevel:0,this.maxLevel=void 0!==s.maxLevel&&null!==s.maxLevel?s.maxLevel:s.width&&s.height?Math.ceil(Math.log(Math.max(s.width,s.height))/Math.log(2)):0,this.success&&t.isFunction(this.success)&&this.success(this))},t.TileSource.prototype={getTileSize:function(e){return t.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(t){return this._tileWidth?this._tileWidth:this.getTileSize(t)},getTileHeight:function(t){return this._tileHeight?this._tileHeight:this.getTileSize(t)},setMaxLevel:function(t){this.maxLevel=t,this._memoizeLevelScale()},getLevelScale:function(t){return this._memoizeLevelScale(),this.getLevelScale(t)},_memoizeLevelScale:function(){var t,e={};for(t=0;t<=this.maxLevel;t++)e[t]=1/Math.pow(2,this.maxLevel-t);this.getLevelScale=function(t){return e[t]}},getNumTiles:function(e){var n=this.getLevelScale(e),r=Math.ceil(n*this.dimensions.x/this.getTileWidth(e)),i=Math.ceil(n*this.dimensions.y/this.getTileHeight(e));return new t.Point(r,i)},getPixelRatio:function(e){var n=this.dimensions.times(this.getLevelScale(e)),r=1/n.x*t.pixelDensityRatio,i=1/n.y*t.pixelDensityRatio;return new t.Point(r,i)},getClosestLevel:function(){var t,e;for(t=this.minLevel+1;t<=this.maxLevel&&!((e=this.getNumTiles(t)).x>1||e.y>1);t++);return t-1},getTileAtPoint:function(e,n){var r=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;t.console.assert(r,"[TileSource.getTileAtPoint] must be called with a valid point.");var i=this.dimensions.x*this.getLevelScale(e),o=n.x*i,a=n.y*i,s=Math.floor(o/this.getTileWidth(e)),u=Math.floor(a/this.getTileHeight(e));n.x>=1&&(s=this.getNumTiles(e).x-1);return n.y>=1/this.aspectRatio-1e-15&&(u=this.getNumTiles(e).y-1),new t.Point(s,u)},getTileBounds:function(e,n,r,i){var o=this.dimensions.times(this.getLevelScale(e)),a=this.getTileWidth(e),s=this.getTileHeight(e),u=0===n?0:a*n-this.tileOverlap,l=0===r?0:s*r-this.tileOverlap,c=a+(0===n?1:2)*this.tileOverlap,f=s+(0===r?1:2)*this.tileOverlap,h=1/o.x;return c=Math.min(c,o.x-u),f=Math.min(f,o.y-l),i?new t.Rect(0,0,c,f):new t.Rect(u*h,l*h,c*h,f*h)},getImageInfo:function(e){var n,r,i,o,a,s,u,l=this;e&&(u=(s=(a=e.split("/"))[a.length-1]).lastIndexOf("."))>-1&&(a[a.length-1]=s.slice(0,u));var c=null;if(this.splitHashDataForPost){var f=e.indexOf("#");-1!==f&&(c=e.substring(f+1),e=e.substr(0,f))}r=function(n){"string"===typeof n&&(n=t.parseXml(n));var r=t.TileSource.determineType(l,n,e);r?(void 0===(o=r.prototype.configure.apply(l,[n,e,c])).ajaxWithCredentials&&(o.ajaxWithCredentials=l.ajaxWithCredentials),i=new r(o),l.ready=!0,l.raiseEvent("ready",{tileSource:i})):l.raiseEvent("open-failed",{message:"Unable to load TileSource",source:e})},e.match(/\.js$/)?(n=e.split("/").pop().replace(".js",""),t.jsonp({url:e,async:!1,callbackName:n,callback:r})):t.makeAjaxRequest({url:e,postData:c,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(e){var n=function(e){var n,r,i=e.responseText,o=e.status;if(!e)throw new Error(t.getString("Errors.Security"));if(200!==e.status&&0!==e.status)throw n=404===(o=e.status)?"Not Found":e.statusText,new Error(t.getString("Errors.Status",o,n));if(i.match(/^\s*<.*/))try{r=e.responseXML&&e.responseXML.documentElement?e.responseXML:t.parseXml(i)}catch(a){r=e.responseText}else if(i.match(/\s*[{[].*/))try{r=t.parseJSON(i)}catch(a){r=i}else r=i;return r}(e);r(n)},error:function(n,r){var i;try{i="HTTP "+n.status+" attempting to load TileSource: "+e}catch(o){i=("undefined"!==typeof r&&r.toString?r.toString():"Unknown error")+" attempting to load TileSource: "+e}t.console.error(i),l.raiseEvent("open-failed",{message:i,source:e,postData:c})}})},supports:function(t,e){return!1},configure:function(t,e,n){throw new Error("Method not implemented.")},getTileUrl:function(t,e,n){throw new Error("Method not implemented.")},getTilePostData:function(t,e,n){return null},getTileAjaxHeaders:function(t,e,n){return{}},getTileHashKey:function(t,e,n,r,i,o){function a(t){return i?t+"+"+JSON.stringify(i):t}return a("string"!==typeof r?t+"/"+e+"_"+n:r)},tileExists:function(t,e,n){var r=this.getNumTiles(t);return t>=this.minLevel&&t<=this.maxLevel&&e>=0&&n>=0&&e<r.x&&n<r.y},hasTransparency:function(t,e,n,r){return!!t||e.match(".png")},downloadTileStart:function(e){var n=e.userData,r=new Image;n.image=r,n.request=null;var i=function(t){r?(r.onload=r.onerror=r.onabort=null,e.finish(t?null:r,n.request,t)):e.finish(null,n.request,"Image load failed: undefined Image instance.")};r.onload=function(){i()},r.onabort=r.onerror=function(){i("Image load aborted.")},e.loadWithAjax?n.request=t.makeAjaxRequest({url:e.src,withCredentials:e.ajaxWithCredentials,headers:e.ajaxHeaders,responseType:"arraybuffer",postData:e.postData,success:function(t){var e;try{e=new window.Blob([t.response])}catch(a){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===a.name&&n){var o=new n;o.append(t.response),e=o.getBlob()}}0===e.size?i("Empty image response."):r.src=(window.URL||window.webkitURL).createObjectURL(e)},error:function(t){i("Image load aborted - XHR error")}}):(!1!==e.crossOriginPolicy&&(r.crossOrigin=e.crossOriginPolicy),r.src=e.src)},downloadTileAbort:function(t){t.userData.request&&t.userData.request.abort();var e=t.userData.image;t.userData.image&&(e.onload=e.onerror=e.onabort=null)},createTileCache:function(t,e,n){t._data=e},destroyTileCache:function(t){t._data=null,t._renderedContext=null},getTileCacheData:function(t){return t._data},getTileCacheDataAsImage:function(t){return t._data},getTileCacheDataAsContext2D:function(t){if(!t._renderedContext){var e=document.createElement("canvas");e.width=t._data.width,e.height=t._data.height,t._renderedContext=e.getContext("2d"),t._renderedContext.drawImage(t._data,0,0),t._data=null}return t._renderedContext}},t.extend(!0,t.TileSource.prototype,t.EventSource.prototype),t.TileSource.determineType=function(e,n,r){var i;for(i in u)if(i.match(/.+TileSource$/)&&t.isFunction(u[i])&&t.isFunction(u[i].prototype.supports)&&u[i].prototype.supports.call(e,n,r))return u[i];return t.console.error("No TileSource was able to open %s %s",r,n),null}}(u),function(t){function e(e,n){var r,i,o=n.Image,a=o.Url,s=o.Format,u=o.Size,l=o.DisplayRect||[],c=parseInt(u.Width,10),f=parseInt(u.Height,10),h=parseInt(o.TileSize,10),p=parseInt(o.Overlap,10),d=[];for(i=0;i<l.length;i++)r=l[i].Rect,d.push(new t.DisplayRect(parseInt(r.X,10),parseInt(r.Y,10),parseInt(r.Width,10),parseInt(r.Height,10),parseInt(r.MinLevel,10),parseInt(r.MaxLevel,10)));return t.extend(!0,{width:c,height:f,tileSize:h,tileOverlap:p,minLevel:null,maxLevel:null,tilesUrl:a,fileFormat:s,displayRects:d},n)}t.DziTileSource=function(e,n,r,i,o,a,s,u,l){var c,f,h,p;if(p=t.isPlainObject(e)?e:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=p.tilesUrl,this.fileFormat=p.fileFormat,this.displayRects=p.displayRects,this.displayRects)for(c=this.displayRects.length-1;c>=0;c--)for(h=(f=this.displayRects[c]).minLevel;h<=f.maxLevel;h++)this._levelRects[h]||(this._levelRects[h]=[]),this._levelRects[h].push(f);t.TileSource.apply(this,[p])},t.extend(t.DziTileSource.prototype,t.TileSource.prototype,{supports:function(t,e){var n;return t.Image?n=t.Image.xmlns:t.documentElement&&("Image"!==t.documentElement.localName&&"Image"!==t.documentElement.tagName||(n=t.documentElement.namespaceURI)),-1!==(n=(n||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==n.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,r,i){var o;return o=t.isPlainObject(n)?e(this,n):function(n,r){if(!r||!r.documentElement)throw new Error(t.getString("Errors.Xml"));var i,o,a,s,u,l=r.documentElement,c=l.localName||l.tagName,f=r.documentElement.namespaceURI,h=null,p=[];if("Image"===c)try{if(void 0===(s=l.getElementsByTagName("Size")[0])&&(s=l.getElementsByTagNameNS(f,"Size")[0]),h={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:l.getAttribute("Url"),Format:l.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(l.getAttribute("Overlap"),10),TileSize:parseInt(l.getAttribute("TileSize"),10),Size:{Height:parseInt(s.getAttribute("Height"),10),Width:parseInt(s.getAttribute("Width"),10)}}},!t.imageFormatSupported(h.Image.Format))throw new Error(t.getString("Errors.ImageFormat",h.Image.Format.toUpperCase()));for(void 0===(i=l.getElementsByTagName("DisplayRect"))&&(i=l.getElementsByTagNameNS(f,"DisplayRect")[0]),u=0;u<i.length;u++)void 0===(a=(o=i[u]).getElementsByTagName("Rect")[0])&&(a=o.getElementsByTagNameNS(f,"Rect")[0]),p.push({Rect:{X:parseInt(a.getAttribute("X"),10),Y:parseInt(a.getAttribute("Y"),10),Width:parseInt(a.getAttribute("Width"),10),Height:parseInt(a.getAttribute("Height"),10),MinLevel:parseInt(o.getAttribute("MinLevel"),10),MaxLevel:parseInt(o.getAttribute("MaxLevel"),10)}});return p.length&&(h.Image.DisplayRect=p),e(n,h)}catch(m){throw m instanceof Error?m:new Error(t.getString("Errors.Dzi"))}else{if("Collection"===c)throw new Error(t.getString("Errors.Dzc"));if("Error"===c){var d=l.getElementsByTagName("Message")[0].firstChild.nodeValue;throw new Error(d)}}throw new Error(t.getString("Errors.Dzi"))}(this,n),r&&!o.tilesUrl&&(o.tilesUrl=r.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),-1!==r.search(/\.(dzi|xml|js)\?/)?o.queryParams=r.match(/\?.*/):o.queryParams=""),o},getTileUrl:function(t,e,n){return[this.tilesUrl,t,"/",e,"_",n,".",this.fileFormat,this.queryParams].join("")},tileExists:function(t,e,n){var r,i,o,a,s,u,l,c=this._levelRects[t];if(this.minLevel&&t<this.minLevel||this.maxLevel&&t>this.maxLevel)return!1;if(!c||!c.length)return!0;for(l=c.length-1;l>=0;l--)if(!(t<(r=c[l]).minLevel||t>r.maxLevel)&&(i=this.getLevelScale(t),o=r.x*i,a=r.y*i,s=o+r.width*i,u=a+r.height*i,o=Math.floor(o/this._tileWidth),a=Math.floor(a/this._tileWidth),s=Math.ceil(s/this._tileWidth),u=Math.ceil(u/this._tileWidth),o<=e&&e<s&&a<=n&&n<u))return!0;return!1}})}(u),function(t){function e(t){var e=Array.isArray(t.profile)?t.profile[0]:t.profile,n=-1!==["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"].indexOf(e),r=!1;return 2===t.version&&t.profile.length>1&&t.profile[1].supports&&(r=-1!==t.profile[1].supports.indexOf("sizeByW")),3===t.version&&t.extraFeatures&&(r=-1!==t.extraFeatures.indexOf("sizeByWh")),!n||r}function n(t){for(var e=[],n=0;n<t.sizes.length;n++)e.push({url:t._id+"/full/"+t.sizes[n].width+","+(3===t.version?t.sizes[n].height:"")+"/0/default."+t.tileFormat,width:t.sizes[n].width,height:t.sizes[n].height});return e.sort((function(t,e){return t.width-e.width}))}function r(e,n,i){var o,a;if(3===e.nodeType&&i)(a=e.nodeValue.trim()).match(/^\d*$/)&&(a=Number(a)),n[i]?(t.isArray(n[i])||(n[i]=[n[i]]),n[i].push(a)):n[i]=a;else if(1===e.nodeType)for(o=0;o<e.childNodes.length;o++)r(e.childNodes[o],n,e.nodeName)}t.IIIFTileSource=function(r){if(t.extend(!0,this,r),this._id=this["@id"]||this.id||this.identifier||null,!(this.height&&this.width&&this._id))throw new Error("IIIF required parameters (width, height, or id) not provided.");if(r.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=r.version,this.tile_width&&this.tile_height)r.tileWidth=this.tile_width,r.tileHeight=this.tile_height;else if(this.tile_width)r.tileSize=this.tile_width;else if(this.tile_height)r.tileSize=this.tile_height;else if(this.tiles)if(1===this.tiles.length)r.tileWidth=this.tiles[0].width,r.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var i=0;i<this.tiles.length;i++)for(var o=0;o<this.tiles[i].scaleFactors.length;o++){var a=this.tiles[i].scaleFactors[o];this.scale_factors.push(a),r.tileSizePerScaleFactor[a]={width:this.tiles[i].width,height:this.tiles[i].height||this.tiles[i].width}}}else if(e(r)){for(var s=Math.min(this.height,this.width),u=[256,512,1024],l=[],c=0;c<u.length;c++)u[c]<=s&&l.push(u[c]);l.length>0?r.tileSize=Math.max.apply(null,l):r.tileSize=s}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,r.levels=n(this),t.extend(!0,r,{width:r.levels[r.levels.length-1].width,height:r.levels[r.levels.length-1].height,tileSize:Math.max(r.height,r.width),tileOverlap:0,minLevel:0,maxLevel:r.levels.length-1}),this.levels=r.levels):t.console.error("Nothing in the info.json to construct image pyramids from");if(!r.maxLevel&&!this.emulateLegacyImagePyramid)if(this.scale_factors){var f=Math.max.apply(null,this.scale_factors);r.maxLevel=Math.round(Math.log(f)*Math.LOG2E)}else r.maxLevel=Number(Math.round(Math.log(Math.max(this.width,this.height),2)));if(this.sizes){var h=this.sizes.length;h!==r.maxLevel&&h!==r.maxLevel+1||(this.levelSizes=this.sizes.slice().sort((function(t,e){return t.width-e.width})),h===r.maxLevel&&this.levelSizes.push({width:this.width,height:this.height}))}t.TileSource.apply(this,[r])},t.extend(t.IIIFTileSource.prototype,t.TileSource.prototype,{supports:function(t,e){return!(!t.protocol||"http://iiif.io/api/image"!==t.protocol)||(!(!t["@context"]||"http://library.stanford.edu/iiif/image-api/1.1/context.json"!==t["@context"]&&"http://iiif.io/api/image/1/context.json"!==t["@context"])||(!(!t.profile||0!==t.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html"))||(!!(t.identifier&&t.width&&t.height)||!(!t.documentElement||"info"!==t.documentElement.tagName||"http://library.stanford.edu/iiif/image-api/ns/"!==t.documentElement.namespaceURI))))},configure:function(e,n,i){if(t.isPlainObject(e)){if(e["@context"]){var o=e["@context"];if(Array.isArray(o))for(var a=0;a<o.length;a++)if("string"===typeof o[a]&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(o[a])||"http://library.stanford.edu/iiif/image-api/1.1/context.json"===o[a])){o=o[a];break}switch(o){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":e.version=1;break;case"http://iiif.io/api/image/2/context.json":e.version=2;break;case"http://iiif.io/api/image/3/context.json":e.version=3;break;default:t.console.error("Data has a @context property which contains no known IIIF context URI.")}}else e["@context"]="http://iiif.io/api/image/1.0/context.json",e["@id"]=n.replace("/info.json",""),e.version=1;if(e.preferredFormats)for(var s=0;s<e.preferredFormats.length;s++)if(u.imageFormatSupported(e.preferredFormats[s])){e.tileFormat=e.preferredFormats[s];break}return e}var l=function(e){if(!e||!e.documentElement)throw new Error(t.getString("Errors.Xml"));var n=e.documentElement,i=n.tagName,o=null;if("info"===i)try{return r(n,o={}),o}catch(a){throw a instanceof Error?a:new Error(t.getString("Errors.IIIF"))}throw new Error(t.getString("Errors.IIIF"))}(e);return l["@context"]="http://iiif.io/api/image/1.0/context.json",l["@id"]=n.replace("/info.xml",""),l.version=1,l},getTileWidth:function(e){if(this.emulateLegacyImagePyramid)return t.TileSource.prototype.getTileWidth.call(this,e);var n=Math.pow(2,this.maxLevel-e);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].width:this._tileWidth},getTileHeight:function(e){if(this.emulateLegacyImagePyramid)return t.TileSource.prototype.getTileHeight.call(this,e);var n=Math.pow(2,this.maxLevel-e);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].height:this._tileHeight},getLevelScale:function(e){if(this.emulateLegacyImagePyramid){var n=NaN;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].width/this.levels[this.maxLevel].width),n}return t.TileSource.prototype.getLevelScale.call(this,e)},getNumTiles:function(e){if(this.emulateLegacyImagePyramid)return this.getLevelScale(e)?new t.Point(1,1):new t.Point(0,0);if(this.levelSizes){var n=this.levelSizes[e],r=Math.ceil(n.width/this.getTileWidth(e)),i=Math.ceil(n.height/this.getTileHeight(e));return new t.Point(r,i)}return t.TileSource.prototype.getNumTiles.call(this,e)},getTileAtPoint:function(e,n){if(this.emulateLegacyImagePyramid)return new t.Point(0,0);if(this.levelSizes){var r=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;t.console.assert(r,"[TileSource.getTileAtPoint] must be called with a valid point.");var i=this.levelSizes[e].width,o=n.x*i,a=n.y*i,s=Math.floor(o/this.getTileWidth(e)),u=Math.floor(a/this.getTileHeight(e));n.x>=1&&(s=this.getNumTiles(e).x-1);return n.y>=1/this.aspectRatio-1e-15&&(u=this.getNumTiles(e).y-1),new t.Point(s,u)}return t.TileSource.prototype.getTileAtPoint.call(this,e,n)},getTileUrl:function(t,e,n){if(this.emulateLegacyImagePyramid){var r=null;return this.levels.length>0&&t>=this.minLevel&&t<=this.maxLevel&&(r=this.levels[t].url),r}var i,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b=Math.pow(.5,this.maxLevel-t);return this.levelSizes?(i=this.levelSizes[t].width,o=this.levelSizes[t].height):(i=Math.ceil(this.width*b),o=Math.ceil(this.height*b)),a=this.getTileWidth(t),s=this.getTileHeight(t),u=Math.round(a/b),l=Math.round(s/b),v=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,i<a&&o<s?(m=2===this.version&&i===this.width?"full":3===this.version&&i===this.width&&o===this.height?"max":3===this.version?i+","+o:i+",",c="full"):(f=e*u,h=n*l,p=Math.min(u,this.width-f),d=Math.min(l,this.height-h),c=0===e&&0===n&&p===this.width&&d===this.height?"full":[f,h,p,d].join(","),g=Math.min(a,i-e*a),y=Math.min(s,o-n*s),m=2===this.version&&g===this.width?"full":3===this.version&&g===this.width&&y===this.height?"max":3===this.version?g+","+y:g+","),[this._id,c,m,"0",v].join("/")},__testonly__:{canBeTiled:e,constructLevels:n}})}(u),function(t){t.OsmTileSource=function(e,n,r,i,o){var a;(a=t.isPlainObject(e)?e:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]}).width&&a.height||(a.width=65572864,a.height=65572864),a.tileSize||(a.tileSize=256,a.tileOverlap=0),a.tilesUrl||(a.tilesUrl="http://tile.openstreetmap.org/"),a.minLevel=8,t.TileSource.apply(this,[a])},t.extend(t.OsmTileSource.prototype,t.TileSource.prototype,{supports:function(t,e){return t.type&&"openstreetmaps"===t.type},configure:function(t,e,n){return t},getTileUrl:function(t,e,n){return this.tilesUrl+(t-8)+"/"+e+"/"+n+".png"}})}(u),function(t){t.TmsTileSource=function(e,n,r,i,o){var a;a=t.isPlainObject(e)?e:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var s,u=256*Math.ceil(a.width/256),l=256*Math.ceil(a.height/256);s=u>l?u/256:l/256,a.maxLevel=Math.ceil(Math.log(s)/Math.log(2))-1,a.tileSize=256,a.width=u,a.height=l,t.TileSource.apply(this,[a])},t.extend(t.TmsTileSource.prototype,t.TileSource.prototype,{supports:function(t,e){return t.type&&"tiledmapservice"===t.type},configure:function(t,e,n){return t},getTileUrl:function(t,e,n){var r=this.getNumTiles(t).y-1;return this.tilesUrl+t+"/"+e+"/"+(r-n)+".png"}})}(u),function(t){t.ZoomifyTileSource=function(t){"undefined"===typeof t.tileSize&&(t.tileSize=256),"undefined"===typeof t.fileFormat&&(t.fileFormat="jpg",this.fileFormat=t.fileFormat);var e={x:t.width,y:t.height};for(t.imageSizes=[{x:t.width,y:t.height}],t.gridSize=[this._getGridSize(t.width,t.height,t.tileSize)];parseInt(e.x,10)>t.tileSize||parseInt(e.y,10)>t.tileSize;)e.x=Math.floor(e.x/2),e.y=Math.floor(e.y/2),t.imageSizes.push({x:e.x,y:e.y}),t.gridSize.push(this._getGridSize(e.x,e.y,t.tileSize));t.imageSizes.reverse(),t.gridSize.reverse(),t.minLevel=0,t.maxLevel=t.gridSize.length-1,u.TileSource.apply(this,[t])},t.extend(t.ZoomifyTileSource.prototype,t.TileSource.prototype,{_getGridSize:function(t,e,n){return{x:Math.ceil(t/n),y:Math.ceil(e/n)}},_calculateAbsoluteTileNumber:function(t,e,n){for(var r=0,i={},o=0;o<t;o++)r+=(i=this.gridSize[o]).x*i.y;return r+=(i=this.gridSize[t]).x*n+e},supports:function(t,e){return t.type&&"zoomifytileservice"===t.type},configure:function(t,e,n){return t},getTileUrl:function(t,e,n){var r,i=this._calculateAbsoluteTileNumber(t,e,n);return r=Math.floor(i/256),this.tilesUrl+"TileGroup"+r+"/"+t+"-"+e+"-"+n+"."+this.fileFormat}})}(u),function(t){function e(t,e){return e.levels}t.LegacyTileSource=function(e){var n,r,i;t.isArray(e)&&(n={type:"legacy-image-pyramid",levels:e}),n.levels=function(e){var n,r,i=[];for(r=0;r<e.length;r++)(n=e[r]).height&&n.width&&n.url?i.push({url:n.url,width:Number(n.width),height:Number(n.height)}):t.console.error("Unsupported image format: %s",n.url?n.url:"<no URL>");return i.sort((function(t,e){return t.height-e.height}))}(n.levels),n.levels.length>0?(r=n.levels[n.levels.length-1].width,i=n.levels[n.levels.length-1].height):(r=0,i=0,t.console.error("No supported image formats found")),t.extend(!0,n,{width:r,height:i,tileSize:Math.max(i,r),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),t.TileSource.apply(this,[n]),this.levels=n.levels},t.extend(t.LegacyTileSource.prototype,t.TileSource.prototype,{supports:function(t,e){return t.type&&"legacy-image-pyramid"===t.type||t.documentElement&&"legacy-image-pyramid"===t.documentElement.getAttribute("type")},configure:function(n,r,i){return t.isPlainObject(n)?e(this,n):function(n,r){if(!r||!r.documentElement)throw new Error(t.getString("Errors.Xml"));var i,o,a=r.documentElement,s=a.tagName,u=null,l=[];if("image"===s)try{for(u={type:a.getAttribute("type"),levels:[]},l=a.getElementsByTagName("level"),o=0;o<l.length;o++)i=l[o],u.levels.push({url:i.getAttribute("url"),width:parseInt(i.getAttribute("width"),10),height:parseInt(i.getAttribute("height"),10)});return e(n,u)}catch(c){throw c instanceof Error?c:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if("collection"===s)throw new Error("Legacy Image Pyramid Collections not yet supported.");if("error"===s)throw new Error("Error: "+r)}throw new Error("Unknown element "+s)}(this,n)},getLevelScale:function(t){var e=NaN;return this.levels.length>0&&t>=this.minLevel&&t<=this.maxLevel&&(e=this.levels[t].width/this.levels[this.maxLevel].width),e},getNumTiles:function(e){return this.getLevelScale(e)?new t.Point(1,1):new t.Point(0,0)},getTileUrl:function(t,e,n){var r=null;return this.levels.length>0&&t>=this.minLevel&&t<=this.maxLevel&&(r=this.levels[t].url),r}})}(u),function(t){t.ImageTileSource=function(e){e=t.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},e),t.TileSource.apply(this,[e])},t.extend(t.ImageTileSource.prototype,t.TileSource.prototype,{supports:function(t,e){return t.type&&"image"===t.type},configure:function(t,e,n){return t},getImageInfo:function(e){var n=this._image=new Image,r=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),t.addEvent(n,"load",(function(){r.width=n.naturalWidth,r.height=n.naturalHeight,r.aspectRatio=r.width/r.height,r.dimensions=new t.Point(r.width,r.height),r._tileWidth=r.width,r._tileHeight=r.height,r.tileOverlap=0,r.minLevel=0,r.levels=r._buildLevels(),r.maxLevel=r.levels.length-1,r.ready=!0,r.raiseEvent("ready",{tileSource:r})})),t.addEvent(n,"error",(function(){r.raiseEvent("open-failed",{message:"Error loading image at "+e,source:e})})),n.src=e},getLevelScale:function(t){var e=NaN;return t>=this.minLevel&&t<=this.maxLevel&&(e=this.levels[t].width/this.levels[this.maxLevel].width),e},getNumTiles:function(e){return this.getLevelScale(e)?new t.Point(1,1):new t.Point(0,0)},getTileUrl:function(t,e,n){var r=null;return t>=this.minLevel&&t<=this.maxLevel&&(r=this.levels[t].url),r},getContext2D:function(t,e,n){var r=null;return t>=this.minLevel&&t<=this.maxLevel&&(r=this.levels[t].context2D),r},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var e=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!t.supportsCanvas||!this.useCanvas)return delete this._image,e;var n=this._image.naturalWidth,r=this._image.naturalHeight,i=document.createElement("canvas"),o=i.getContext("2d");if(i.width=n,i.height=r,o.drawImage(this._image,0,0,n,r),e[0].context2D=o,delete this._image,t.isCanvasTainted(i))return e;for(;n>=2&&r>=2;){n=Math.floor(n/2),r=Math.floor(r/2);var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=r,s.drawImage(i,0,0,n,r),e.splice(0,0,{context2D:s,width:n,height:r}),i=a,o=s}return e},_freeupCanvasMemory:function(){for(var t=0;t<this.levels.length;t++)this.levels[t].context2D&&(this.levels[t].context2D.canvas.height=0,this.levels[t].context2D.canvas.width=0)}})}(u),function(t){t.TileSourceCollection=function(e,n,r,i){t.console.error("TileSourceCollection is deprecated; use World instead")}}(u),function(t){function e(n){t.requestAnimationFrame((function(){!function(n){var r;n.shouldFade&&(r=1-(t.now()-n.fadeBeginTime)/n.fadeLength,r=Math.min(1,r),r=Math.max(0,r),n.imgGroup&&t.setElementOpacity(n.imgGroup,r,!0),r>0&&e(n))}(n)}))}function n(e,n){e.element.disabled||(n>=t.ButtonState.GROUP&&e.currentState===t.ButtonState.REST&&(!function(e){e.shouldFade=!1,e.imgGroup&&t.setElementOpacity(e.imgGroup,1,!0)}(e),e.currentState=t.ButtonState.GROUP),n>=t.ButtonState.HOVER&&e.currentState===t.ButtonState.GROUP&&(e.imgHover&&(e.imgHover.style.visibility=""),e.currentState=t.ButtonState.HOVER),n>=t.ButtonState.DOWN&&e.currentState===t.ButtonState.HOVER&&(e.imgDown&&(e.imgDown.style.visibility=""),e.currentState=t.ButtonState.DOWN))}function r(n,r){n.element.disabled||(r<=t.ButtonState.HOVER&&n.currentState===t.ButtonState.DOWN&&(n.imgDown&&(n.imgDown.style.visibility="hidden"),n.currentState=t.ButtonState.HOVER),r<=t.ButtonState.GROUP&&n.currentState===t.ButtonState.HOVER&&(n.imgHover&&(n.imgHover.style.visibility="hidden"),n.currentState=t.ButtonState.GROUP),r<=t.ButtonState.REST&&n.currentState===t.ButtonState.GROUP&&(!function(n){n.shouldFade=!0,n.fadeBeginTime=t.now()+n.fadeDelay,window.setTimeout((function(){e(n)}),n.fadeDelay)}(n),n.currentState=t.ButtonState.REST))}t.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},t.Button=function(e){var i=this;t.EventSource.call(this),t.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:t.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},e),this.element=e.element||t.makeNeutralElement("div"),e.element||(this.imgRest=t.makeTransparentImage(this.srcRest),this.imgGroup=t.makeTransparentImage(this.srcGroup),this.imgHover=t.makeTransparentImage(this.srcHover),this.imgDown=t.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,t.setElementPointerEventsNone(this.imgRest),t.setElementPointerEventsNone(this.imgGroup),t.setElementPointerEventsNone(this.imgHover),t.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",t.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",t.Browser.vendor===t.BROWSERS.FIREFOX&&t.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=t.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new t.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(e){e.insideElementPressed?(n(i,t.ButtonState.DOWN),i.raiseEvent("enter",{originalEvent:e.originalEvent})):e.buttonDownAny||n(i,t.ButtonState.HOVER)},focusHandler:function(t){i.tracker.enterHandler(t),i.raiseEvent("focus",{originalEvent:t.originalEvent})},leaveHandler:function(e){r(i,t.ButtonState.GROUP),e.insideElementPressed&&i.raiseEvent("exit",{originalEvent:e.originalEvent})},blurHandler:function(t){i.tracker.leaveHandler(t),i.raiseEvent("blur",{originalEvent:t.originalEvent})},pressHandler:function(e){n(i,t.ButtonState.DOWN),i.raiseEvent("press",{originalEvent:e.originalEvent})},releaseHandler:function(e){e.insideElementPressed&&e.insideElementReleased?(r(i,t.ButtonState.HOVER),i.raiseEvent("release",{originalEvent:e.originalEvent})):e.insideElementPressed?r(i,t.ButtonState.GROUP):n(i,t.ButtonState.HOVER)},clickHandler:function(t){t.quick&&i.raiseEvent("click",{originalEvent:t.originalEvent})},keyHandler:function(t){13===t.keyCode?(i.raiseEvent("click",{originalEvent:t.originalEvent}),i.raiseEvent("release",{originalEvent:t.originalEvent}),t.preventDefault=!0):t.preventDefault=!1}}),r(this,t.ButtonState.REST)},t.extend(t.Button.prototype,t.EventSource.prototype,{notifyGroupEnter:function(){n(this,t.ButtonState.GROUP)},notifyGroupExit:function(){r(this,t.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,this.tracker.setTracking(!1),t.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,this.tracker.setTracking(!0),t.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}})}(u),function(t){t.ButtonGroup=function(e){t.extend(!0,this,{buttons:[],clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:t.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},e);var n,r=this.buttons.concat([]),i=this;if(this.element=e.element||t.makeNeutralElement("div"),!e.group)for(this.element.style.display="inline-block",n=0;n<r.length;n++)this.element.appendChild(r[n].element);t.setElementTouchActionNone(this.element),this.tracker=new t.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){var e;for(e=0;e<i.buttons.length;e++)i.buttons[e].notifyGroupEnter()},leaveHandler:function(t){var e;if(!t.insideElementPressed)for(e=0;e<i.buttons.length;e++)i.buttons[e].notifyGroupExit()}})},t.ButtonGroup.prototype={addButton:function(t){this.buttons.push(t),this.element.appendChild(t.element)},emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var t=this.buttons.pop();this.element.removeChild(t.element),t.destroy()}this.tracker.destroy(),this.element=null}}}(u),function(t){t.Rect=function(e,n,r,i,o){var a,s;this.x="number"===typeof e?e:0,this.y="number"===typeof n?n:0,this.width="number"===typeof r?r:0,this.height="number"===typeof i?i:0,this.degrees="number"===typeof o?o:0,this.degrees=t.positiveModulo(this.degrees,360),this.degrees>=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=270):this.degrees>=180?(a=this.getBottomRight(),this.x=a.x,this.y=a.y,this.degrees-=180):this.degrees>=90&&(a=this.getBottomLeft(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=90)},t.Rect.fromSummits=function(e,n,r){var i=e.distanceTo(n),o=e.distanceTo(r),a=n.minus(e),s=Math.atan(a.y/a.x);return a.x<0?s+=Math.PI:a.y<0&&(s+=2*Math.PI),new t.Rect(e.x,e.y,i,o,s/Math.PI*180)},t.Rect.prototype={clone:function(){return new t.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new t.Point(this.x,this.y)},getBottomRight:function(){return new t.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new t.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new t.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new t.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new t.Point(this.width,this.height)},equals:function(e){return e instanceof t.Rect&&this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height&&this.degrees===e.degrees},times:function(e){return new t.Rect(this.x*e,this.y*e,this.width*e,this.height*e,this.degrees)},translate:function(e){return new t.Rect(this.x+e.x,this.y+e.y,this.width,this.height,this.degrees)},union:function(e){var n=this.getBoundingBox(),r=e.getBoundingBox(),i=Math.min(n.x,r.x),o=Math.min(n.y,r.y),a=Math.max(n.x+n.width,r.x+r.width),s=Math.max(n.y+n.height,r.y+r.height);return new t.Rect(i,o,a-i,s-o)},intersection:function(e){var n=1e-10,r=[],i=this.getTopLeft();e.containsPoint(i,n)&&r.push(i);var o=this.getTopRight();e.containsPoint(o,n)&&r.push(o);var a=this.getBottomLeft();e.containsPoint(a,n)&&r.push(a);var s=this.getBottomRight();e.containsPoint(s,n)&&r.push(s);var u=e.getTopLeft();this.containsPoint(u,n)&&r.push(u);var l=e.getTopRight();this.containsPoint(l,n)&&r.push(l);var c=e.getBottomLeft();this.containsPoint(c,n)&&r.push(c);var f=e.getBottomRight();this.containsPoint(f,n)&&r.push(f);for(var h=this._getSegments(),p=e._getSegments(),d=0;d<h.length;d++)for(var m=h[d],g=0;g<p.length;g++){var y=p[g],v=b(m[0],m[1],y[0],y[1]);v&&r.push(v)}function b(e,r,i,o){var a=r.minus(e),s=o.minus(i),u=-s.x*a.y+a.x*s.y;if(0===u)return null;var l=(a.x*(e.y-i.y)-a.y*(e.x-i.x))/u,c=(s.x*(e.y-i.y)-s.y*(e.x-i.x))/u;return-1e-10<=l&&l<=1-n&&-1e-10<=c&&c<=1-n?new t.Point(e.x+c*a.x,e.y+c*a.y):null}if(0===r.length)return null;for(var _=r[0].x,A=r[0].x,w=r[0].y,x=r[0].y,E=1;E<r.length;E++){var O=r[E];O.x<_&&(_=O.x),O.x>A&&(A=O.x),O.y<w&&(w=O.y),O.y>x&&(x=O.y)}return new t.Rect(_,w,A-_,x-w)},_getSegments:function(){var t=this.getTopLeft(),e=this.getTopRight(),n=this.getBottomLeft(),r=this.getBottomRight();return[[t,e],[e,r],[r,n],[n,t]]},rotate:function(e,n){if(0===(e=t.positiveModulo(e,360)))return this.clone();n=n||this.getCenter();var r=this.getTopLeft().rotate(e,n),i=this.getTopRight().rotate(e,n).minus(r);i=i.apply((function(t){return Math.abs(t)<1e-15?0:t}));var o=Math.atan(i.y/i.x);return i.x<0?o+=Math.PI:i.y<0&&(o+=2*Math.PI),new t.Rect(r.x,r.y,this.width,this.height,o/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var e=this.getTopLeft(),n=this.getTopRight(),r=this.getBottomLeft(),i=this.getBottomRight(),o=Math.min(e.x,n.x,r.x,i.x),a=Math.max(e.x,n.x,r.x,i.x),s=Math.min(e.y,n.y,r.y,i.y),u=Math.max(e.y,n.y,r.y,i.y);return new t.Rect(o,s,a-o,u-s)},getIntegerBoundingBox:function(){var e=this.getBoundingBox(),n=Math.floor(e.x),r=Math.floor(e.y),i=Math.ceil(e.width+e.x-n),o=Math.ceil(e.height+e.y-r);return new t.Rect(n,r,i,o)},containsPoint:function(t,e){e=e||0;var n=this.getTopLeft(),r=this.getTopRight(),i=this.getBottomLeft(),o=r.minus(n),a=i.minus(n);return(t.x-n.x)*o.x+(t.y-n.y)*o.y>=-e&&(t.x-r.x)*o.x+(t.y-r.y)*o.y<=e&&(t.x-n.x)*a.x+(t.y-n.y)*a.y>=-e&&(t.x-i.x)*a.x+(t.y-i.y)*a.y<=e},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(u),function(t){var e={};function n(t){var e;t.quick&&(e="horizontal"===this.scroll?Math.floor(t.position.x/(this.panelWidth+4)):Math.floor(t.position.y/this.panelHeight),this.viewer.goToPage(e));this.element.focus()}function r(e){if(this.dragging=!0,this.element){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),i=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=t.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?-e.delta.x>0?n>-(i-s.x)&&(this.element.style.marginLeft=n+2*e.delta.x+"px",o(this,s.x,n+2*e.delta.x)):-e.delta.x<0&&n<0&&(this.element.style.marginLeft=n+2*e.delta.x+"px",o(this,s.x,n+2*e.delta.x)):-e.delta.y>0?r>-(a-s.y)&&(this.element.style.marginTop=r+2*e.delta.y+"px",o(this,s.y,r+2*e.delta.y)):-e.delta.y<0&&r<0&&(this.element.style.marginTop=r+2*e.delta.y+"px",o(this,s.y,r+2*e.delta.y))}}function i(e){if(this.element){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),i=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=t.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?e.scroll>0?n>-(i-s.x)&&(this.element.style.marginLeft=n-60*e.scroll+"px",o(this,s.x,n-60*e.scroll)):e.scroll<0&&n<0&&(this.element.style.marginLeft=n-60*e.scroll+"px",o(this,s.x,n-60*e.scroll)):e.scroll<0?r>s.y-a&&(this.element.style.marginTop=r+60*e.scroll+"px",o(this,s.y,r+60*e.scroll)):e.scroll>0&&r<0&&(this.element.style.marginTop=r+60*e.scroll+"px",o(this,s.y,r+60*e.scroll)),e.preventDefault=!0}}function o(e,n,r){var i,o,a,s,u,l;for(i="horizontal"===e.scroll?e.panelWidth:e.panelHeight,o=Math.ceil(n/i)+5,u=o=(o=(a=Math.ceil((Math.abs(r)+n)/i)+1)-o)<0?0:o;u<a&&u<e.panels.length;u++)if(!(l=e.panels[u]).activePanel){var c,f=e.viewer.tileSources[u];c=f.referenceStripThumbnailUrl?{type:"image",url:f.referenceStripThumbnailUrl}:f,s=new t.Viewer({id:l.id,tileSources:[c],element:l,navigatorSizeRatio:e.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:e.viewer.loadTilesWithAjax,ajaxHeaders:e.viewer.ajaxHeaders,useCanvas:e.useCanvas}),t.setElementPointerEventsNone(s.canvas),t.setElementPointerEventsNone(s.container),s.innerTracker.setTracking(!1),s.outerTracker.setTracking(!1),e.miniViewers[l.id]=s,l.activePanel=!0}}function a(t){var e=t.eventSource.element;"horizontal"===this.scroll?e.style.marginBottom="0px":e.style.marginLeft="0px"}function s(e){var n=e.eventSource.element;"horizontal"===this.scroll?n.style.marginBottom="-"+t.getElementSize(n).y/2+"px":n.style.marginLeft="-"+t.getElementSize(n).x/2+"px"}function u(t){if(t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 38:case 39:i.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),t.preventDefault=!0;break;case 40:case 37:i.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),t.preventDefault=!0;break;default:t.preventDefault=!1}}function l(t){if(t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 61:case 48:case 119:case 87:case 100:i.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),t.preventDefault=!0;break;case 45:case 115:case 83:case 97:i.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),t.preventDefault=!0;break;default:t.preventDefault=!1}}t.ReferenceStrip=function(c){var f,h,p,d=c.viewer,m=t.getElementSize(d.element);for(c.id||(c.id="referencestrip-"+t.now(),this.element=t.makeNeutralElement("div"),this.element.id=c.id,this.element.className="referencestrip"),c=t.extend(!0,{sizeRatio:t.DEFAULT_SETTINGS.referenceStripSizeRatio,position:t.DEFAULT_SETTINGS.referenceStripPosition,scroll:t.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold},c,{element:this.element}),t.extend(this,c),e[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,(h=this.element.style).marginTop="0px",h.marginRight="0px",h.marginBottom="0px",h.marginLeft="0px",h.left="0px",h.bottom="0px",h.border="0px",h.background="#000",h.position="relative",t.setElementTouchActionNone(this.element),t.setElementOpacity(this.element,.8),this.viewer=d,this.tracker=new t.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:t.delegate(this,n),dragHandler:t.delegate(this,r),scrollHandler:t.delegate(this,i),enterHandler:t.delegate(this,a),leaveHandler:t.delegate(this,s),keyDownHandler:t.delegate(this,u),keyHandler:t.delegate(this,l),preProcessEventHandler:function(t){"wheel"===t.eventType&&(t.preventDefault=!0)}}),c.width&&c.height?(this.element.style.width=c.width+"px",this.element.style.height=c.height+"px",d.addControl(this.element,{anchor:t.ControlAnchor.BOTTOM_LEFT})):"horizontal"===c.scroll?(this.element.style.width=m.x*c.sizeRatio*d.tileSources.length+12*d.tileSources.length+"px",this.element.style.height=m.y*c.sizeRatio+"px",d.addControl(this.element,{anchor:t.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=m.y*c.sizeRatio*d.tileSources.length+12*d.tileSources.length+"px",this.element.style.width=m.x*c.sizeRatio+"px",d.addControl(this.element,{anchor:t.ControlAnchor.TOP_LEFT})),this.panelWidth=m.x*this.sizeRatio+8,this.panelHeight=m.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},p=0;p<d.tileSources.length;p++)(f=t.makeNeutralElement("div")).id=this.element.id+"-"+p,f.style.width=this.panelWidth+"px",f.style.height=this.panelHeight+"px",f.style.display="inline",f.style.float="left",f.style.cssFloat="left",f.style.styleFloat="left",f.style.padding="2px",t.setElementTouchActionNone(f),t.setElementPointerEventsNone(f),this.element.appendChild(f),f.activePanel=!1,this.panels.push(f);o(this,"vertical"===this.scroll?m.y:m.x,0),this.setFocus(0)},t.ReferenceStrip.prototype={setFocus:function(e){var n,r=this.element.querySelector("#"+this.element.id+"-"+e),i=t.getElementSize(this.viewer.canvas),s=Number(this.element.style.width.replace("px","")),u=Number(this.element.style.height.replace("px","")),l=-Number(this.element.style.marginLeft.replace("px","")),c=-Number(this.element.style.marginTop.replace("px",""));this.currentSelected!==r&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=r,this.currentSelected.style.background="#999","horizontal"===this.scroll?(n=Number(e)*(this.panelWidth+3))>l+i.x-this.panelWidth?(n=Math.min(n,s-i.x),this.element.style.marginLeft=-n+"px",o(this,i.x,-n)):n<l&&(n=Math.max(0,n-i.x/2),this.element.style.marginLeft=-n+"px",o(this,i.x,-n)):(n=Number(e)*(this.panelHeight+3))>c+i.y-this.panelHeight?(n=Math.min(n,u-i.y),this.element.style.marginTop=-n+"px",o(this,i.y,-n)):n<c&&(n=Math.max(0,n-i.y/2),this.element.style.marginTop=-n+"px",o(this,i.y,-n)),this.currentPage=e,a.call(this,{eventSource:this.tracker}))},update:function(){return!!e[this.id].animating},destroy:function(){if(this.miniViewers)for(var t in this.miniViewers)this.miniViewers[t].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}}}(u),function(t){t.DisplayRect=function(e,n,r,i,o,a){t.Rect.apply(this,[e,n,r,i]),this.minLevel=o,this.maxLevel=a},t.extend(t.DisplayRect.prototype,t.Rect.prototype)}(u),function(t){t.Spring=function(e){var n=arguments;"object"!==typeof e&&(e={initial:n.length&&"number"===typeof n[0]?n[0]:void 0,springStiffness:n.length>1?n[1].springStiffness:5,animationTime:n.length>1?n[1].animationTime:1.5}),t.console.assert("number"===typeof e.springStiffness&&0!==e.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),t.console.assert("number"===typeof e.animationTime&&e.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),e.exponential&&(this._exponential=!0,delete e.exponential),t.extend(!0,this,e),this.current={value:"number"===typeof this.initial?this.initial:this._exponential?0:1,time:t.now()},t.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},t.Spring.prototype={resetTo:function(e){t.console.assert(!this._exponential||0!==e,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=e,this.start.time=this.target.time=this.current.time=t.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(e){t.console.assert(!this._exponential||0!==e,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=e,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(e){this.start.value+=e,this.target.value+=e,this._exponential&&(t.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(e){this._exponential=e,this._exponential&&(t.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var e,n;this.current.time=t.now(),this._exponential?(e=this.start._logValue,n=this.target._logValue):(e=this.start.value,n=this.target.value);var r,i,o=this.current.time>=this.target.time?n:e+(n-e)*(r=this.springStiffness,i=(this.current.time-this.start.time)/(this.target.time-this.start.time),(1-Math.exp(r*-i))/(1-Math.exp(-r))),a=this.current.value;return this._exponential?this.current.value=Math.exp(o):this.current.value=o,a!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(u),function(t){t.ImageJob=function(e){t.extend(!0,this,{timeout:t.DEFAULT_SETTINGS.timeout,jobId:null,tries:0},e),this.data=null,this.userData={},this.errorMsg=null},t.ImageJob.prototype={start:function(){this.tries++;var t=this,e=this.abort;this.jobId=window.setTimeout((function(){t.finish(null,null,"Image load exceeded timeout ("+t.timeout+" ms)")}),this.timeout),this.abort=function(){t.source.downloadTileAbort(t),"function"===typeof e&&e()},this.source.downloadTileStart(this)},finish:function(t,e,n){this.data=t,this.request=e,this.errorMsg=n,this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},t.ImageLoader=function(e){t.extend(!0,this,{jobLimit:t.DEFAULT_SETTINGS.imageLoaderLimit,timeout:t.DEFAULT_SETTINGS.timeout,jobQueue:[],failedTiles:[],jobsInProgress:0},e)},t.ImageLoader.prototype={addJob:function(e){if(!e.source){t.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");var n=t.TileSource.prototype;e.source={downloadTileStart:n.downloadTileStart,downloadTileAbort:n.downloadTileAbort}}var r=this,i={src:e.src,tile:e.tile||{},source:e.source,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,postData:e.postData,callback:function(t){!function(t,e,n){""!==e.errorMsg&&(null===e.data||void 0===e.data)&&e.tries<1+t.tileRetryMax&&t.failedTiles.push(e);var r;t.jobsInProgress--,(!t.jobLimit||t.jobsInProgress<t.jobLimit)&&t.jobQueue.length>0&&((r=t.jobQueue.shift()).start(),t.jobsInProgress++);t.tileRetryMax>0&&0===t.jobQueue.length&&(!t.jobLimit||t.jobsInProgress<t.jobLimit)&&t.failedTiles.length>0&&(r=t.failedTiles.shift(),setTimeout((function(){r.start()}),t.tileRetryDelay),t.jobsInProgress++);n(e.data,e.errorMsg,e.request)}(r,t,e.callback)},abort:e.abort,timeout:this.timeout},o=new t.ImageJob(i);!this.jobLimit||this.jobsInProgress<this.jobLimit?(o.start(),this.jobsInProgress++):this.jobQueue.push(o)},clear:function(){for(var t=0;t<this.jobQueue.length;t++){var e=this.jobQueue[t];"function"===typeof e.abort&&e.abort()}this.jobQueue=[]}}}(u),function(t){t.Tile=function(e,n,r,i,o,a,s,u,l,c,f,h){this.level=e,this.x=n,this.y=r,this.bounds=i,this.sourceBounds=c,this.exists=o,this._url=a,this.postData=f,this.context2D=s,this.loadWithAjax=u,this.ajaxHeaders=l,void 0===h&&(t.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."),h=t.TileSource.prototype.getTileHashKey(e,n,r,a,l,f)),this.cacheKey=h,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.style=null,this.position=null,this.size=null,this.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.hasTransparency=!1,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},t.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return console.warn("Tile.prototype._hasTransparencyChannel() has been deprecated and will be removed in the future. Use TileSource.prototype.hasTransparency() instead."),!!this.context2D||this.getUrl().match(".png")},drawHTML:function(e){if(this.cacheImageRecord)if(this.loaded){if(!this.element){var n=this.getImage();if(!n)return;this.element=t.makeNeutralElement("div"),this.imgElement=n.cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"}this.element.parentNode!==e&&e.appendChild(this.element),this.imgElement.parentNode!==this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",this.flipped&&(this.style.transform="scaleX(-1)"),t.setElementOpacity(this.element,this.opacity)}else t.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());else t.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString())},get image(){return t.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."),this.getImage()},get url(){return t.console.error("[Tile.url] property has been deprecated. Use [Tile.prototype.getUrl] instead."),this.getUrl()},getImage:function(){return this.cacheImageRecord.getImage()},getUrl:function(){return"function"===typeof this._url?this._url():this._url},getCanvasContext:function(){return this.context2D||this.cacheImageRecord.getRenderedContext()},drawCanvas:function(e,n,r,i,o,a){var s,u,l,c=this.position.times(t.pixelDensityRatio),f=this.size.times(t.pixelDensityRatio);this.context2D||this.cacheImageRecord?(s=this.getCanvasContext(),this.loaded&&s?(e.save(),e.globalAlpha=this.opacity,"number"===typeof r&&1!==r&&(c=c.times(r),f=f.times(r)),i instanceof t.Point&&(c=c.plus(i)),1===e.globalAlpha&&this.hasTransparency&&(o&&(c.x=Math.round(c.x),c.y=Math.round(c.y),f.x=Math.round(f.x),f.y=Math.round(f.y)),e.clearRect(c.x,c.y,f.x,f.y)),n({context:e,tile:this,rendered:s}),this.sourceBounds?(u=Math.min(this.sourceBounds.width,s.canvas.width),l=Math.min(this.sourceBounds.height,s.canvas.height)):(u=s.canvas.width,l=s.canvas.height),e.translate(c.x+f.x/2,0),this.flipped&&e.scale(-1,1),e.drawImage(s.canvas,0,0,u,l,-f.x/2,c.y,f.x,f.y),e.restore()):t.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString())):t.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString())},getScaleForEdgeSmoothing:function(){var e;if(this.cacheImageRecord)e=this.cacheImageRecord.getRenderedContext();else{if(!this.context2D)return t.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;e=this.context2D}return e.canvas.width/(this.size.x*t.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(e,n,r){var i=Math.max(1,Math.ceil((r.x-n.x)/2)),o=Math.max(1,Math.ceil((r.y-n.y)/2));return new t.Point(i,o).minus(this.position.times(t.pixelDensityRatio).times(e||1).apply((function(t){return t%1})))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(u),function(t){t.OverlayPlacement=t.Placement,t.OverlayRotationMode=t.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),t.Overlay=function(e,n,r){var i;i=t.isPlainObject(e)?e:{element:e,location:n,placement:r},this.element=i.element,this.style=i.element.style,this._init(i)},t.Overlay.prototype={_init:function(e){this.location=e.location,this.placement=void 0===e.placement?t.Placement.TOP_LEFT:e.placement,this.onDraw=e.onDraw,this.checkResize=void 0===e.checkResize||e.checkResize,this.width=void 0===e.width?null:e.width,this.height=void 0===e.height?null:e.height,this.rotationMode=e.rotationMode||t.OverlayRotationMode.EXACT,this.location instanceof t.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=t.Placement.TOP_LEFT),this.scales=null!==this.width&&null!==this.height,this.bounds=new t.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(e,n){var r=t.Placement.properties[this.placement];r&&(r.isHorizontallyCentered?e.x-=n.x/2:r.isRight&&(e.x-=n.x),r.isVerticallyCentered?e.y-=n.y/2:r.isBottom&&(e.y-=n.y))},destroy:function(){var e=this.element,n=this.style;e.parentNode&&(e.parentNode.removeChild(e),e.prevElementParent&&(n.display="none",document.body.appendChild(e))),this.onDraw=null,n.top="",n.left="",n.position="",null!==this.width&&(n.width=""),null!==this.height&&(n.height="");var r=t.getCssPropertyWithVendorPrefix("transformOrigin"),i=t.getCssPropertyWithVendorPrefix("transform");r&&i&&(n[r]="",n[i]="")},drawHTML:function(e,n){var r=this.element;r.parentNode!==e&&(r.prevElementParent=r.parentNode,r.prevNextSibling=r.nextSibling,e.appendChild(r),this.style.position="absolute",this.size=t.getElementSize(r));var i=this._getOverlayPositionAndSize(n),o=i.position,a=this.size=i.size,s=i.rotate;if(this.onDraw)this.onDraw(o,a,this.element);else{var u=this.style;u.left=o.x+"px",u.top=o.y+"px",null!==this.width&&(u.width=a.x+"px"),null!==this.height&&(u.height=a.y+"px");var l=t.getCssPropertyWithVendorPrefix("transformOrigin"),c=t.getCssPropertyWithVendorPrefix("transform");l&&c&&(s?(u[l]=this._getTransformOrigin(),u[c]="rotate("+s+"deg)"):(u[l]="",u[c]="")),u.display="block"}},_getOverlayPositionAndSize:function(e){var n=e.pixelFromPoint(this.location,!0),r=this._getSizeInPixels(e);this.adjust(n,r);var i=0;if(e.getRotation(!0)&&this.rotationMode!==t.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===t.OverlayRotationMode.BOUNDING_BOX&&null!==this.width&&null!==this.height){var o=new t.Rect(n.x,n.y,r.x,r.y),a=this._getBoundingBox(o,e.getRotation(!0));n=a.getTopLeft(),r=a.getSize()}else i=e.getRotation(!0);return{position:n,size:r,rotate:i}},_getSizeInPixels:function(e){var n=this.size.x,r=this.size.y;if(null!==this.width||null!==this.height){var i=e.deltaPixelsFromPointsNoRotate(new t.Point(this.width||0,this.height||0),!0);null!==this.width&&(n=i.x),null!==this.height&&(r=i.y)}if(this.checkResize&&(null===this.width||null===this.height)){var o=this.size=t.getElementSize(this.element);null===this.width&&(n=o.x),null===this.height&&(r=o.y)}return new t.Point(n,r)},_getBoundingBox:function(t,e){var n=this._getPlacementPoint(t);return t.rotate(e,n).getBoundingBox()},_getPlacementPoint:function(e){var n=new t.Point(e.x,e.y),r=t.Placement.properties[this.placement];return r&&(r.isHorizontallyCentered?n.x+=e.width/2:r.isRight&&(n.x+=e.width),r.isVerticallyCentered?n.y+=e.height/2:r.isBottom&&(n.y+=e.height)),n},_getTransformOrigin:function(){var e="",n=t.Placement.properties[this.placement];return n?(n.isLeft?e="left":n.isRight&&(e="right"),n.isTop?e+=" top":n.isBottom&&(e+=" bottom"),e):e},update:function(e,n){var r=t.isPlainObject(e)?e:{location:e,placement:n};this._init({location:r.location||this.location,placement:void 0!==r.placement?r.placement:this.placement,onDraw:r.onDraw||this.onDraw,checkResize:r.checkResize||this.checkResize,width:void 0!==r.width?r.width:this.width,height:void 0!==r.height?r.height:this.height,rotationMode:r.rotationMode||this.rotationMode})},getBounds:function(e){t.console.assert(e,"A viewport must now be passed to Overlay.getBounds.");var n=this.width,r=this.height;if(null===n||null===r){var i=e.deltaPointsFromPixelsNoRotate(this.size,!0);null===n&&(n=i.x),null===r&&(r=i.y)}var o=this.location.clone();return this.adjust(o,new t.Point(n,r)),this._adjustBoundsForRotation(e,new t.Rect(o.x,o.y,n,r))},_adjustBoundsForRotation:function(e,n){if(!e||0===e.getRotation(!0)||this.rotationMode===t.OverlayRotationMode.EXACT)return n;if(this.rotationMode===t.OverlayRotationMode.BOUNDING_BOX){if(null===this.width||null===this.height)return n;var r=this._getOverlayPositionAndSize(e);return e.viewerElementToViewportRectangle(new t.Rect(r.position.x,r.position.y,r.size.x,r.size.y))}return n.rotate(-e.getRotation(!0),this._getPlacementPoint(n))}}}(u),function(t){t.Drawer=function(e){t.console.assert(e.viewer,"[Drawer] options.viewer is required");var n=arguments;if(t.isPlainObject(e)||(e={source:n[0],viewport:n[1],element:n[2]}),t.console.assert(e.viewport,"[Drawer] options.viewport is required"),t.console.assert(e.element,"[Drawer] options.element is required"),e.source&&t.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=e.viewer,this.viewport=e.viewport,this.debugGridColor="string"===typeof e.debugGridColor?[e.debugGridColor]:e.debugGridColor||t.DEFAULT_SETTINGS.debugGridColor,e.opacity&&t.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=t.supportsCanvas&&(!this.viewer||this.viewer.useCanvas),this.container=t.getElement(e.element),this.canvas=t.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var r=this._calculateCanvasSize();this.canvas.width=r.x,this.canvas.height=r.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",t.setElementOpacity(this.canvas,this.opacity,!0),t.setElementPointerEventsNone(this.canvas),t.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},t.Drawer.prototype={addOverlay:function(e,n,r,i){return t.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(e,n,r,i),this},updateOverlay:function(e,n,r){return t.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(e,n,r),this},removeOverlay:function(e){return t.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(e),this},clearOverlays:function(){return t.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(e){var n=this.viewport.pixelFromPointNoRotate(e,!0);return new t.Point(n.x*t.pixelDensityRatio,n.y*t.pixelDensityRatio)},clipWithPolygons:function(t,e){if(this.useCanvas){var n=this._getContext(e);n.beginPath(),t.forEach((function(t){t.forEach((function(t,e){n[0===e?"moveTo":"lineTo"](t.x,t.y)}))})),n.clip()}},setOpacity:function(e){t.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var n=this.viewer.world,r=0;r<n.getItemCount();r++)n.getItemAt(r).setOpacity(e);return this},getOpacity:function(){t.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");for(var e=this.viewer.world,n=0,r=0;r<e.getItemCount();r++){var i=e.getItemAt(r).getOpacity();i>n&&(n=i)}return n},needsUpdate:function(){return t.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return t.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return t.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return t.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var t=this._calculateCanvasSize();if((this.canvas.width!==t.x||this.canvas.height!==t.y)&&(this.canvas.width=t.x,this.canvas.height=t.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var e=this._calculateSketchCanvasSize();this.sketchCanvas.width=e.x,this.sketchCanvas.height=e.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(t,e){if(this.useCanvas){var n=this._getContext(t);if(e)n.clearRect(e.x,e.y,e.width,e.height);else{var r=n.canvas;n.clearRect(0,0,r.width,r.height)}}},viewportToDrawerRectangle:function(e){var n=this.viewport.pixelFromPointNoRotate(e.getTopLeft(),!0),r=this.viewport.deltaPixelsFromPointsNoRotate(e.getSize(),!0);return new t.Rect(n.x*t.pixelDensityRatio,n.y*t.pixelDensityRatio,r.x*t.pixelDensityRatio,r.y*t.pixelDensityRatio)},drawTile:function(e,n,r,i,o,a,s){if(t.console.assert(e,"[Drawer.drawTile] tile is required"),t.console.assert(n,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var u=this._getContext(r);i=i||1,e.drawCanvas(u,n,i,o,a,s)}else e.drawHTML(this.canvas)},_getContext:function(t){var e=this.context;if(t){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var n=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=n.x,this.sketchCanvas.height=n.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var r=this;this.viewer.addHandler("rotate",(function t(){if(0!==r.viewport.getRotation()){r.viewer.removeHandler("rotate",t);var e=r._calculateSketchCanvasSize();r.sketchCanvas.width=e.x,r.sketchCanvas.height=e.y}}))}this._updateImageSmoothingEnabled(this.sketchContext)}e=this.sketchContext}return e},saveContext:function(t){this.useCanvas&&this._getContext(t).save()},restoreContext:function(t){this.useCanvas&&this._getContext(t).restore()},setClip:function(t,e){if(this.useCanvas){var n=this._getContext(e);n.beginPath(),n.rect(t.x,t.y,t.width,t.height),n.clip()}},drawRectangle:function(t,e,n){if(this.useCanvas){var r=this._getContext(n);r.save(),r.fillStyle=e,r.fillRect(t.x,t.y,t.width,t.height),r.restore()}},blendSketch:function(e,n,r,i){var o=e;if(t.isPlainObject(o)||(o={opacity:e,scale:n,translate:r,compositeOperation:i}),this.useCanvas&&this.sketchCanvas){e=o.opacity,i=o.compositeOperation;var a=o.bounds;if(this.context.save(),this.context.globalAlpha=e,i&&(this.context.globalCompositeOperation=i),a)a.x<0&&(a.width+=a.x,a.x=0),a.x+a.width>this.canvas.width&&(a.width=this.canvas.width-a.x),a.y<0&&(a.height+=a.y,a.y=0),a.y+a.height>this.canvas.height&&(a.height=this.canvas.height-a.y),this.context.drawImage(this.sketchCanvas,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height);else{n=o.scale||1;var s=(r=o.translate)instanceof t.Point?r:new t.Point(0,0),u=0,l=0;if(r){var c=this.sketchCanvas.width-this.canvas.width,f=this.sketchCanvas.height-this.canvas.height;u=Math.round(c/2),l=Math.round(f/2)}this.context.drawImage(this.sketchCanvas,s.x-u*n,s.y-l*n,(this.canvas.width+2*u)*n,(this.canvas.height+2*l)*n,-u,-l,this.canvas.width+2*u,this.canvas.height+2*l)}this.context.restore()}},drawDebugInfo:function(e,n,r,i){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(i)%this.debugGridColor.length,a=this.context;a.save(),a.lineWidth=2*t.pixelDensityRatio,a.font="small-caps bold "+13*t.pixelDensityRatio+"px arial",a.strokeStyle=this.debugGridColor[o],a.fillStyle=this.debugGridColor[o],this.viewport.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:this.viewport.getRotation(!0)}),i.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:i.getRotation(!0),point:i.viewport.pixelFromPointNoRotate(i._getRotationPoint(!0),!0)}),i.viewport.getRotation(!0)%360===0&&i.getRotation(!0)%360===0&&i._drawer.viewer.viewport.getFlip()&&i._drawer._flip(),a.strokeRect(e.position.x*t.pixelDensityRatio,e.position.y*t.pixelDensityRatio,e.size.x*t.pixelDensityRatio,e.size.y*t.pixelDensityRatio);var s=(e.position.x+e.size.x/2)*t.pixelDensityRatio,u=(e.position.y+e.size.y/2)*t.pixelDensityRatio;a.translate(s,u),a.rotate(Math.PI/180*-this.viewport.getRotation(!0)),a.translate(-s,-u),0===e.x&&0===e.y&&(a.fillText("Zoom: "+this.viewport.getZoom(),e.position.x*t.pixelDensityRatio,(e.position.y-30)*t.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),e.position.x*t.pixelDensityRatio,(e.position.y-20)*t.pixelDensityRatio)),a.fillText("Level: "+e.level,(e.position.x+10)*t.pixelDensityRatio,(e.position.y+20)*t.pixelDensityRatio),a.fillText("Column: "+e.x,(e.position.x+10)*t.pixelDensityRatio,(e.position.y+30)*t.pixelDensityRatio),a.fillText("Row: "+e.y,(e.position.x+10)*t.pixelDensityRatio,(e.position.y+40)*t.pixelDensityRatio),a.fillText("Order: "+r+" of "+n,(e.position.x+10)*t.pixelDensityRatio,(e.position.y+50)*t.pixelDensityRatio),a.fillText("Size: "+e.size.toString(),(e.position.x+10)*t.pixelDensityRatio,(e.position.y+60)*t.pixelDensityRatio),a.fillText("Position: "+e.position.toString(),(e.position.x+10)*t.pixelDensityRatio,(e.position.y+70)*t.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),i.getRotation(!0)%360!==0&&this._restoreRotationChanges(),i.viewport.getRotation(!0)%360===0&&i.getRotation(!0)%360===0&&i._drawer.viewer.viewport.getFlip()&&i._drawer._flip(),a.restore()}},debugRect:function(e){if(this.useCanvas){var n=this.context;n.save(),n.lineWidth=2*t.pixelDensityRatio,n.strokeStyle=this.debugGridColor[0],n.fillStyle=this.debugGridColor[0],n.strokeRect(e.x*t.pixelDensityRatio,e.y*t.pixelDensityRatio,e.width*t.pixelDensityRatio,e.height*t.pixelDensityRatio),n.restore()}},setImageSmoothingEnabled:function(t){this.useCanvas&&(this._imageSmoothingEnabled=t,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(t){t.msImageSmoothingEnabled=this._imageSmoothingEnabled,t.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(e){var n=this._getContext(e).canvas;return new t.Point(n.width,n.height)},getCanvasCenter:function(){return new t.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(e){var n=e.point?e.point.times(t.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(e.useSketch);r.save(),r.translate(n.x,n.y),this.viewer.viewport.flipped?(r.rotate(Math.PI/180*-e.degrees),r.scale(-1,1)):r.rotate(Math.PI/180*e.degrees),r.translate(-n.x,-n.y)},_flip:function(e){var n=(e=e||{}).point?e.point.times(t.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(e.useSketch);r.translate(n.x,0),r.scale(-1,1),r.translate(-n.x,0)},_restoreRotationChanges:function(t){this._getContext(t).restore()},_calculateCanvasSize:function(){var e=t.pixelDensityRatio,n=this.viewport.getContainerSize();return{x:Math.round(n.x*e),y:Math.round(n.y*e)}},_calculateSketchCanvasSize:function(){var t=this._calculateCanvasSize();if(0===this.viewport.getRotation())return t;var e=Math.ceil(Math.sqrt(t.x*t.x+t.y*t.y));return{x:e,y:e}}}}(u),function(t){t.Viewport=function(e){var n=arguments;n.length&&n[0]instanceof t.Point&&(e={containerSize:n[0],contentSize:n[1],config:n[2]}),e.config&&(t.extend(!0,e,e.config),delete e.config),this._margins=t.extend({left:0,top:0,right:0,bottom:0},e.margins||{}),delete e.margins,e.initialDegrees=e.degrees,delete e.degrees,t.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,rotationPivot:null,viewer:null,springStiffness:t.DEFAULT_SETTINGS.springStiffness,animationTime:t.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:t.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:t.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:t.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:t.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:t.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:t.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:t.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:t.DEFAULT_SETTINGS.maxZoomLevel,initialDegrees:t.DEFAULT_SETTINGS.degrees,flipped:t.DEFAULT_SETTINGS.flipped,homeFillsViewer:t.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:t.DEFAULT_SETTINGS.silenceMultiImageWarnings},e),this._updateContainerInnerSize(),this.centerSpringX=new t.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new t.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new t.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.degreesSpring=new t.Spring({initial:e.initialDegrees,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value,this._setContentBounds(new t.Rect(0,0,1,1),1),this.goHome(!0),this.update()},t.Viewport.prototype={get degrees(){return t.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."),this.getRotation()},set degrees(e){t.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."),this.rotateTo(e)},resetContentSize:function(e){return t.console.assert(e,"[Viewport.resetContentSize] contentSize is required"),t.console.assert(e instanceof t.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),t.console.assert(e.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),t.console.assert(e.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new t.Rect(0,0,1,e.y/e.x),e.x),this},setHomeBounds:function(e,n){t.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(e,n)},_setContentBounds:function(e,n){t.console.assert(e,"[Viewport._setContentBounds] bounds is required"),t.console.assert(e instanceof t.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),t.console.assert(e.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),t.console.assert(e.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=e.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(n),this._contentBounds=e.rotate(this.getRotation()).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var t=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?t>=1?t:1:t>=1?1:t)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var e=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),r=n/this.getAspectRatio();return new t.Rect(e.x-n/2,e.y-r/2,n,r)},goHome:function(t){return this.viewer&&this.viewer.raiseEvent("home",{immediately:t}),this.fitBounds(this.getHomeBounds(),t)},getMinZoom:function(){var t=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*t},getMaxZoom:function(){var t=this.maxZoomLevel;return t||(t=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,t/=this._contentBounds.width),Math.max(t,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new t.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return t.extend({},this._margins)},setMargins:function(e){t.console.assert("object"===t.type(e),"[Viewport.setMargins] margins must be an object"),this._margins=t.extend({left:0,top:0,right:0,bottom:0},e),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(t){return this.getBoundsNoRotate(t).rotate(-this.getRotation(t))},getBoundsNoRotate:function(e){var n=this.getCenter(e),r=1/this.getZoom(e),i=r/this.getAspectRatio();return new t.Rect(n.x-r/2,n.y-i/2,r,i)},getBoundsWithMargins:function(t){return this.getBoundsNoRotateWithMargins(t).rotate(-this.getRotation(t),this.getCenter(t))},getBoundsNoRotateWithMargins:function(t){var e=this.getBoundsNoRotate(t),n=this._containerInnerSize.x*this.getZoom(t);return e.x-=this._margins.left/n,e.y-=this._margins.top/n,e.width+=(this._margins.left+this._margins.right)/n,e.height+=(this._margins.top+this._margins.bottom)/n,e},getCenter:function(e){var n,r,i,o,a,s,u=new t.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),l=new t.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return e?u:this.zoomPoint?(n=this.pixelFromPoint(this.zoomPoint,!0),o=(i=1/(r=this.getZoom()))/this.getAspectRatio(),a=new t.Rect(u.x-i/2,u.y-o/2,i,o),s=this._pixelFromPoint(this.zoomPoint,a).minus(n).rotate(-this.getRotation(!0)).divide(this._containerInnerSize.x*r),l.plus(s)):l},getZoom:function(t){return t?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(t){return Math.max(Math.min(t,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var e=this.viewportToViewerElementRectangle(t).getBoundingBox(),n=this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(),r=!1,i=!1;if(this.wrapHorizontal);else{var o,a,s,u=e.x+e.width,l=n.x+n.width;o=e.width>n.width?this.visibilityRatio*n.width:this.visibilityRatio*e.width,a=n.x-u+o,s=l-e.x-o,o>n.width?(e.x+=(a+s)/2,r=!0):s<0?(e.x+=s,r=!0):a>0&&(e.x+=a,r=!0)}if(this.wrapVertical);else{var c,f,h,p=e.y+e.height,d=n.y+n.height;c=e.height>n.height?this.visibilityRatio*n.height:this.visibilityRatio*e.height,f=n.y-p+c,h=d-e.y-c,c>n.height?(e.y+=(f+h)/2,i=!0):h<0?(e.y+=h,i=!0):f>0&&(e.y+=f,i=!0)}var m=r||i,g=m?this.viewerElementToViewportRectangle(e):t.clone();return g.xConstrained=r,g.yConstrained=i,g.constraintApplied=m,g},_raiseConstraintsEvent:function(t){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:t})},applyConstraints:function(t){var e=this.getZoom(),n=this._applyZoomConstraints(e);e!==n&&this.zoomTo(n,this.zoomPoint,t);var r=this.getConstrainedBounds(!1);return r.constraintApplied&&(this.fitBounds(r,t),this._raiseConstraintsEvent(t)),this},ensureVisible:function(t){return this.applyConstraints(t)},_fitBounds:function(e,n){var r=(n=n||{}).immediately||!1,i=n.constraints||!1,o=this.getAspectRatio(),a=e.getCenter(),s=new t.Rect(e.x,e.y,e.width,e.height,e.degrees+this.getRotation()).getBoundingBox();s.getAspectRatio()>=o?s.height=s.width/o:s.width=s.height*o,s.x=a.x-s.width/2,s.y=a.y-s.height/2;var u=1/s.width;if(r)return this.panTo(a,!0),this.zoomTo(u,null,!0),i&&this.applyConstraints(!0),this;var l=this.getCenter(!0),c=this.getZoom(!0);this.panTo(l,!0),this.zoomTo(c,null,!0);var f=this.getBounds(),h=this.getZoom();if(0===h||Math.abs(u/h-1)<1e-8)return this.zoomTo(u,null,!0),this.panTo(a,r),i&&this.applyConstraints(!1),this;if(i){this.panTo(a,!1),u=this._applyZoomConstraints(u),this.zoomTo(u,null,!1);var p=this.getConstrainedBounds();this.panTo(l,!0),this.zoomTo(c,null,!0),this.fitBounds(p)}else{var d=s.rotate(-this.getRotation()).getTopLeft().times(u).minus(f.getTopLeft().times(h)).divide(u-h);this.zoomTo(u,d,r)}return this},fitBounds:function(t,e){return this._fitBounds(t,{immediately:e,constraints:!1})},fitBoundsWithConstraints:function(t,e){return this._fitBounds(t,{immediately:e,constraints:!0})},fitVertically:function(e){var n=new t.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,e)},fitHorizontally:function(e){var n=new t.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,e)},getConstrainedBounds:function(t){var e;return e=this.getBounds(t),this._applyBoundaryConstraints(e)},panBy:function(e,n){var r=new t.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(r.plus(e),n)},panTo:function(t,e){return e?(this.centerSpringX.resetTo(t.x),this.centerSpringY.resetTo(t.y)):(this.centerSpringX.springTo(t.x),this.centerSpringY.springTo(t.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:t,immediately:e}),this},zoomBy:function(t,e,n){return this.zoomTo(this.zoomSpring.target.value*t,e,n)},zoomTo:function(e,n,r){var i=this;return this.zoomPoint=n instanceof t.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,r?this._adjustCenterSpringsForZoomPoint((function(){i.zoomSpring.resetTo(e)})):this.zoomSpring.springTo(e),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:e,refPoint:n,immediately:r}),this},setRotation:function(t,e){return this.rotateTo(t,null,e)},getRotation:function(t){return t?this.degreesSpring.current.value:this.degreesSpring.target.value},setRotationWithPivot:function(t,e,n){return this.rotateTo(t,e,n)},rotateTo:function(e,n,r){if(!this.viewer||!this.viewer.drawer.canRotate())return this;if(this.degreesSpring.target.value===e&&this.degreesSpring.isAtTargetValue())return this;if(this.rotationPivot=n instanceof t.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,r)if(this.rotationPivot){if(!(e-this._oldDegrees))return this.rotationPivot=null,this;this._rotateAboutPivot(e)}else this.degreesSpring.resetTo(e);else{var i=t.positiveModulo(this.degreesSpring.current.value,360),o=t.positiveModulo(e,360),a=o-i;a>180?o-=360:a<-180&&(o+=360);var s=i-o;this.degreesSpring.resetTo(e+s),this.degreesSpring.springTo(e)}return this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:e,immediately:!!r,pivot:this.rotationPivot||this.getCenter()}),this},rotateBy:function(t,e,n){return this.rotateTo(this.degreesSpring.target.value+t,e,n)},resize:function(t,e){var n,r=this.getBoundsNoRotate(),i=r;this.containerSize.x=t.x,this.containerSize.y=t.y,this._updateContainerInnerSize(),e&&(n=t.x/this.containerSize.x,i.width=r.width*n,i.height=i.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:t,maintain:e});var o=this.fitBounds(i,!0);return this.viewer&&this.viewer.raiseEvent("after-resize",{newContainerSize:t,maintain:e}),o},_updateContainerInnerSize:function(){this._containerInnerSize=new t.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var t=this;this._adjustCenterSpringsForZoomPoint((function(){t.zoomSpring.update()})),this.degreesSpring.isAtTargetValue()&&(this.rotationPivot=null),this.centerSpringX.update(),this.centerSpringY.update(),this.rotationPivot?this._rotateAboutPivot(!0):this.degreesSpring.update();var e=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom||this.degreesSpring.current.value!==this._oldDegrees;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value,e},_rotateAboutPivot:function(t){var e=!0===t,n=this.rotationPivot.minus(this.getCenter());this.centerSpringX.shiftBy(n.x),this.centerSpringY.shiftBy(n.y),e?this.degreesSpring.update():this.degreesSpring.resetTo(t);var r=this.degreesSpring.current.value-this._oldDegrees,i=n.rotate(-1*r).times(-1);this.centerSpringX.shiftBy(i.x),this.centerSpringY.shiftBy(i.y)},_adjustCenterSpringsForZoomPoint:function(t){if(this.zoomPoint){var e=this.pixelFromPoint(this.zoomPoint,!0);t();var n=this.pixelFromPoint(this.zoomPoint,!0).minus(e),r=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(r.x),this.centerSpringY.shiftBy(r.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else t()},deltaPixelsFromPointsNoRotate:function(t,e){return t.times(this._containerInnerSize.x*this.getZoom(e))},deltaPixelsFromPoints:function(t,e){return this.deltaPixelsFromPointsNoRotate(t.rotate(this.getRotation(e)),e)},deltaPointsFromPixelsNoRotate:function(t,e){return t.divide(this._containerInnerSize.x*this.getZoom(e))},deltaPointsFromPixels:function(t,e){return this.deltaPointsFromPixelsNoRotate(t,e).rotate(-this.getRotation(e))},pixelFromPointNoRotate:function(t,e){return this._pixelFromPointNoRotate(t,this.getBoundsNoRotate(e))},pixelFromPoint:function(t,e){return this._pixelFromPoint(t,this.getBoundsNoRotate(e))},_pixelFromPointNoRotate:function(e,n){return e.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new t.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(t,e){return this._pixelFromPointNoRotate(t.rotate(this.getRotation(!0),this.getCenter(!0)),e)},pointFromPixelNoRotate:function(e,n){var r=this.getBoundsNoRotate(n);return e.minus(new t.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/r.width).plus(r.getTopLeft())},pointFromPixel:function(t,e){return this.pointFromPixelNoRotate(t,e).rotate(-this.getRotation(e),this.getCenter(e))},_viewportToImageDelta:function(e,n){var r=this._contentBoundsNoRotate.width;return new t.Point(e*this._contentSizeNoRotate.x/r,n*this._contentSizeNoRotate.x/r)},viewportToImageCoordinates:function(e,n){if(e instanceof t.Point)return this.viewportToImageCoordinates(e.x,e.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===r){return this.viewer.world.getItemAt(0).viewportToImageCoordinates(e,n,!0)}}return this._viewportToImageDelta(e-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(e,n){var r=this._contentBoundsNoRotate.width;return new t.Point(e/this._contentSizeNoRotate.x*r,n/this._contentSizeNoRotate.x*r)},imageToViewportCoordinates:function(e,n){if(e instanceof t.Point)return this.imageToViewportCoordinates(e.x,e.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===r){return this.viewer.world.getItemAt(0).imageToViewportCoordinates(e,n,!0)}}var i=this._imageToViewportDelta(e,n);return i.x+=this._contentBoundsNoRotate.x,i.y+=this._contentBoundsNoRotate.y,i},imageToViewportRectangle:function(e,n,r,i){var o=e;if(o instanceof t.Rect||(o=new t.Rect(e,n,r,i)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).imageToViewportRectangle(e,n,r,i,!0)}}var s=this.imageToViewportCoordinates(o.x,o.y),u=this._imageToViewportDelta(o.width,o.height);return new t.Rect(s.x,s.y,u.x,u.y,o.degrees)},viewportToImageRectangle:function(e,n,r,i){var o=e;if(o instanceof t.Rect||(o=new t.Rect(e,n,r,i)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).viewportToImageRectangle(e,n,r,i,!0)}}var s=this.viewportToImageCoordinates(o.x,o.y),u=this._viewportToImageDelta(o.width,o.height);return new t.Rect(s.x,s.y,u.x,u.y,o.degrees)},viewerElementToImageCoordinates:function(t){var e=this.pointFromPixel(t,!0);return this.viewportToImageCoordinates(e)},imageToViewerElementCoordinates:function(t){var e=this.imageToViewportCoordinates(t);return this.pixelFromPoint(e,!0)},windowToImageCoordinates:function(e){t.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=e.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(e){return t.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(e).plus(t.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(t){return this.pointFromPixel(t,!0)},viewportToViewerElementCoordinates:function(t){return this.pixelFromPoint(t,!0)},viewerElementToViewportRectangle:function(e){return t.Rect.fromSummits(this.pointFromPixel(e.getTopLeft(),!0),this.pointFromPixel(e.getTopRight(),!0),this.pointFromPixel(e.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(e){return t.Rect.fromSummits(this.pixelFromPoint(e.getTopLeft(),!0),this.pixelFromPoint(e.getTopRight(),!0),this.pixelFromPoint(e.getBottomLeft(),!0))},windowToViewportCoordinates:function(e){t.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var n=e.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(e){return t.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(e).plus(t.getElementPosition(this.viewer.element))},viewportToImageZoom:function(e){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).viewportToImageZoom(e)}}var r=this._contentSizeNoRotate.x;return e*(this._containerInnerSize.x/r*this._contentBoundsNoRotate.width)},imageToViewportZoom:function(e){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).imageToViewportZoom(e)}}return e*(this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width)},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(t){return this.flipped===t||(this.flipped=t,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:t})),this}}}(u),function(t){t.TiledImage=function(e){var n=this;t.console.assert(e.tileCache,"[TiledImage] options.tileCache is required"),t.console.assert(e.drawer,"[TiledImage] options.drawer is required"),t.console.assert(e.viewer,"[TiledImage] options.viewer is required"),t.console.assert(e.imageLoader,"[TiledImage] options.imageLoader is required"),t.console.assert(e.source,"[TiledImage] options.source is required"),t.console.assert(!e.clip||e.clip instanceof t.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),t.EventSource.call(this),this._tileCache=e.tileCache,delete e.tileCache,this._drawer=e.drawer,delete e.drawer,this._imageLoader=e.imageLoader,delete e.imageLoader,e.clip instanceof t.Rect&&(this._clip=e.clip.clone()),delete e.clip;var r=e.x||0;delete e.x;var i=e.y||0;delete e.y,this.normHeight=e.source.dimensions.y/e.source.dimensions.x,this.contentAspectX=e.source.dimensions.x/e.source.dimensions.y;var o=1;e.width?(o=e.width,delete e.width,e.height&&(t.console.error("specifying both width and height to a tiledImage is not supported"),delete e.height)):e.height&&(o=e.height/this.normHeight,delete e.height);var a=e.fitBounds;delete e.fitBounds;var s=e.fitBoundsPlacement||u.Placement.CENTER;delete e.fitBoundsPlacement;var l=e.degrees||0;delete e.degrees;var c=e.ajaxHeaders;delete e.ajaxHeaders,t.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:t.DEFAULT_SETTINGS.springStiffness,animationTime:t.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:t.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:t.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:t.DEFAULT_SETTINGS.wrapVertical,immediateRender:t.DEFAULT_SETTINGS.immediateRender,blendTime:t.DEFAULT_SETTINGS.blendTime,alwaysBlend:t.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:t.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:t.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:t.DEFAULT_SETTINGS.iOSDevice,debugMode:t.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:t.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:t.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:t.DEFAULT_SETTINGS.placeholderFillStyle,opacity:t.DEFAULT_SETTINGS.opacity,preload:t.DEFAULT_SETTINGS.preload,compositeOperation:t.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:t.DEFAULT_SETTINGS.subPixelRoundingForTransparency},e),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new t.Spring({initial:r,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new t.Spring({initial:i,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new t.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new t.Spring({initial:l,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),a&&this.fitBounds(a,s,!0),this._drawingHandler=function(e){n.viewer.raiseEvent("tile-drawing",t.extend({tiledImage:n},e))},this._ownAjaxHeaders={},this.setAjaxHeaders(c,!1)},t.extend(t.TiledImage.prototype,t.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(t){t!==this._fullyLoaded&&(this._fullyLoaded=t,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=t.now(),this._needsDraw=!0},update:function(){var t=this._xSpring.update(),e=this._ySpring.update(),n=this._scaleSpring.update(),r=this._degreesSpring.update();return!!(t||e||n||r)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy()},getBounds:function(t){return this.getBoundsNoRotate(t).rotate(this.getRotation(t),this._getRotationPoint(t))},getBoundsNoRotate:function(e){return e?new t.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new t.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return t.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(e){var n=this.getBoundsNoRotate(e);if(this._clip){var r=(e?this._worldWidthCurrent:this._worldWidthTarget)/this.source.dimensions.x,i=this._clip.times(r);n=new t.Rect(n.x+i.x,n.y+i.y,i.width,i.height)}return n.rotate(this.getRotation(e),this._getRotationPoint(e))},getTileBounds:function(t,e,n){var r=this.source.getNumTiles(t),i=(r.x+e%r.x)%r.x,o=(r.y+n%r.y)%r.y,a=this.source.getTileBounds(t,i,o);return this.getFlip()&&(a.x=1-a.x-a.width),a.x+=(e-i)/r.x,a.y+=this._worldHeightCurrent/this._worldWidthCurrent*((n-o)/r.y),a},getContentSize:function(){return new t.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var e=this.imageToWindowCoordinates(new t.Point(0,0)),n=this.imageToWindowCoordinates(this.getContentSize());return new t.Point(n.x-e.x,n.y-e.y)},_viewportToImageDelta:function(e,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new t.Point(e*(this.source.dimensions.x/i),n*(this.source.dimensions.y*this.contentAspectX/i))},viewportToImageCoordinates:function(e,n,r){var i;return e instanceof t.Point?(r=n,i=e):i=new t.Point(e,n),i=i.rotate(-this.getRotation(r),this._getRotationPoint(r)),r?this._viewportToImageDelta(i.x-this._xSpring.current.value,i.y-this._ySpring.current.value):this._viewportToImageDelta(i.x-this._xSpring.target.value,i.y-this._ySpring.target.value)},_imageToViewportDelta:function(e,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new t.Point(e/this.source.dimensions.x*i,n/this.source.dimensions.y/this.contentAspectX*i)},imageToViewportCoordinates:function(e,n,r){e instanceof t.Point&&(r=n,n=e.y,e=e.x);var i=this._imageToViewportDelta(e,n);return r?(i.x+=this._xSpring.current.value,i.y+=this._ySpring.current.value):(i.x+=this._xSpring.target.value,i.y+=this._ySpring.target.value),i.rotate(this.getRotation(r),this._getRotationPoint(r))},imageToViewportRectangle:function(e,n,r,i,o){var a=e;a instanceof t.Rect?o=n:a=new t.Rect(e,n,r,i);var s=this.imageToViewportCoordinates(a.getTopLeft(),o),u=this._imageToViewportDelta(a.width,a.height,o);return new t.Rect(s.x,s.y,u.x,u.y,a.degrees+this.getRotation(o))},viewportToImageRectangle:function(e,n,r,i,o){var a=e;e instanceof t.Rect?o=n:a=new t.Rect(e,n,r,i);var s=this.viewportToImageCoordinates(a.getTopLeft(),o),u=this._viewportToImageDelta(a.width,a.height,o);return new t.Rect(s.x,s.y,u.x,u.y,a.degrees-this.getRotation(o))},viewerElementToImageCoordinates:function(t){var e=this.viewport.pointFromPixel(t,!0);return this.viewportToImageCoordinates(e)},imageToViewerElementCoordinates:function(t){var e=this.imageToViewportCoordinates(t);return this.viewport.pixelFromPoint(e,!0)},windowToImageCoordinates:function(t){var e=t.minus(u.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(e)},imageToWindowCoordinates:function(t){return this.imageToViewerElementCoordinates(t).plus(u.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(e){var n=this._scaleSpring.current.value;return e=e.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new t.Rect((e.x-this._xSpring.current.value)/n,(e.y-this._ySpring.current.value)/n,e.width/n,e.height/n,e.degrees)},viewportToImageZoom:function(t){return this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x*t},imageToViewportZoom:function(t){return t/(this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x)},setPosition:function(t,e){var n=this._xSpring.target.value===t.x&&this._ySpring.target.value===t.y;if(e){if(n&&this._xSpring.current.value===t.x&&this._ySpring.current.value===t.y)return;this._xSpring.resetTo(t.x),this._ySpring.resetTo(t.y),this._needsDraw=!0}else{if(n)return;this._xSpring.springTo(t.x),this._ySpring.springTo(t.y),this._needsDraw=!0}n||this._raiseBoundsChange()},setWidth:function(t,e){this._setScale(t,e)},setHeight:function(t,e){this._setScale(t/this.normHeight,e)},setCroppingPolygons:function(e){var n=function(e){return e.map((function(e){try{if(function(e){return e instanceof t.Point||"number"===typeof e.x&&"number"===typeof e.y}(e))return{x:e.x,y:e.y};throw new Error}catch(n){throw new Error("A Provided cropping polygon point is not supported")}}))};try{if(!t.isArray(e))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=e.map((function(t){return n(t)}))}catch(r){t.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),t.console.error(r),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(e,n,r){n=n||t.Placement.CENTER;var i=t.Placement.properties[n],o=this.contentAspectX,a=0,s=0,u=1,l=1;if(this._clip&&(o=this._clip.getAspectRatio(),u=this._clip.width/this.source.dimensions.x,l=this._clip.height/this.source.dimensions.y,e.getAspectRatio()>o?(a=this._clip.x/this._clip.height*e.height,s=this._clip.y/this._clip.height*e.height):(a=this._clip.x/this._clip.width*e.width,s=this._clip.y/this._clip.width*e.width)),e.getAspectRatio()>o){var c=e.height/l,f=0;i.isHorizontallyCentered?f=(e.width-e.height*o)/2:i.isRight&&(f=e.width-e.height*o),this.setPosition(new t.Point(e.x-a+f,e.y-s),r),this.setHeight(c,r)}else{var h=e.width/u,p=0;i.isVerticallyCentered?p=(e.height-e.width/o)/2:i.isBottom&&(p=e.height-e.width/o),this.setPosition(new t.Point(e.x-a,e.y-s+p),r),this.setWidth(h,r)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(e){t.console.assert(!e||e instanceof t.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),e instanceof t.Rect?this._clip=e.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(t){this.flipped=!!t,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(t){t!==this.opacity&&(this.opacity=t,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(t){this._preload=!!t,this._needsDraw=!0},getRotation:function(t){return t?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(t,e){this._degreesSpring.target.value===t&&this._degreesSpring.isAtTargetValue()||(e?this._degreesSpring.resetTo(t):this._degreesSpring.springTo(t),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(t){return this.getBoundsNoRotate(t).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(t){t!==this.compositeOperation&&(this.compositeOperation=t,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},setAjaxHeaders:function(e,n){null===e&&(e={}),t.isPlainObject(e)?(this._ownAjaxHeaders=e,this._updateAjaxHeaders(n)):console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object")},_updateAjaxHeaders:function(e){if(void 0===e&&(e=!0),t.isPlainObject(this.viewer.ajaxHeaders)?this.ajaxHeaders=t.extend({},this.viewer.ajaxHeaders,this._ownAjaxHeaders):this.ajaxHeaders=this._ownAjaxHeaders,e){var n,r,i,o;for(var a in this.tilesMatrix)for(var s in n=this.source.getNumTiles(a),this.tilesMatrix[a])for(var u in r=(n.x+s%n.x)%n.x,this.tilesMatrix[a][s])if(i=(n.y+u%n.y)%n.y,(o=this.tilesMatrix[a][s][u]).loadWithAjax=this.loadTilesWithAjax,o.loadWithAjax){var l=this.source.getTileAjaxHeaders(a,r,i);o.ajaxHeaders=t.extend({},this.ajaxHeaders,l)}else o.ajaxHeaders=null;for(var c=0;c<this._imageLoader.jobQueue.length;c++){var f=this._imageLoader.jobQueue[c];f.loadWithAjax=f.tile.loadWithAjax,f.ajaxHeaders=f.tile.loadWithAjax?f.tile.ajaxHeaders:null}}},_setScale:function(t,e){var n=this._scaleSpring.target.value===t;if(e){if(n&&this._scaleSpring.current.value===t)return;this._scaleSpring.resetTo(t),this._updateForScale(),this._needsDraw=!0}else{if(n)return;this._scaleSpring.springTo(t),this._updateForScale(),this._needsDraw=!0}n||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var t=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),e=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,n=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(e/this.minPixelRatio)/Math.log(2))));return n=Math.max(n,this.source.minLevel||0),{lowestLevel:t=Math.min(t,n),highestLevel:n}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){this.lastDrawn.pop().beingDrawn=!1}var e=this.viewport,n=this._viewportToTiledImageRectangle(e.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var r=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(n=n.intersection(r)))return}for(var i=this._getLevelsInterval(),o=i.lowestLevel,a=i.highestLevel,s=null,u=!1,l=t.now(),c=a;c>=o;c--){var f=!1,h=e.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(c),!0).x*this._scaleSpring.current.value;if(c===o||!u&&h>=this.minPixelRatio)f=!0,u=!0;else if(!u)continue;var p=e.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(c),!1).x*this._scaleSpring.current.value,d=e.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,m=this.immediateRender?1:d,g=Math.min(1,(h-.5)/.5),y=m/Math.abs(m-p);if(s=this._updateLevel(u,f,c,g,y,n,l,s),this._providesCoverage(this.coverage,c))break}this._drawTiles(this.lastDrawn),s&&!s.context2D?(this._loadTile(s,l),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(e,n,r){var i,o,a,s;this.wrapHorizontal?(i=t.positiveModulo(n.x,1),o=t.positiveModulo(r.x,1)):(i=Math.max(0,n.x),o=Math.min(1,r.x));var u=1/this.source.aspectRatio;this.wrapVertical?(a=t.positiveModulo(n.y,u),s=t.positiveModulo(r.y,u)):(a=Math.max(0,n.y),s=Math.min(u,r.y));var l=this.source.getTileAtPoint(e,new t.Point(i,a)),c=this.source.getTileAtPoint(e,new t.Point(o,s)),f=this.source.getNumTiles(e);return this.wrapHorizontal&&(l.x+=f.x*Math.floor(n.x),c.x+=f.x*Math.floor(r.x)),this.wrapVertical&&(l.y+=f.y*Math.floor(n.y/u),c.y+=f.y*Math.floor(r.y/u)),{topLeft:l,bottomRight:c}},_updateLevel:function(t,e,n,r,i,o,a,s){var u=o.getBoundingBox().getTopLeft(),l=o.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:t,level:n,opacity:r,visibility:i,drawArea:o,topleft:u,bottomright:l,currenttime:a,best:s}),this._resetCoverage(this.coverage,n),this._resetCoverage(this.loadingCoverage,n);var c=this._getCornerTiles(n,u,l),f=c.topLeft,h=c.bottomRight,p=this.source.getNumTiles(n),d=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(h.x+=1,this.wrapHorizontal||(h.x=Math.min(h.x,p.x-1)));for(var m=f.x;m<=h.x;m++)for(var g=f.y;g<=h.y;g++){var y;if(this.getFlip()){var v=(p.x+m%p.x)%p.x;y=m+p.x-v-v-1}else y=m;null!==o.intersection(this.getTileBounds(n,y,g))&&(s=this._updateTile(e,t,y,g,n,r,i,d,p,a,s))}return s},_updateTile:function(t,e,n,r,i,o,a,s,u,l,c){var f=this._getTile(n,r,i,l,u,this._worldWidthCurrent,this._worldHeightCurrent),h=e;this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:f}),this._setCoverage(this.coverage,i,n,r,!1);var p=f.loaded||f.loading||this._isCovered(this.loadingCoverage,i,n,r);if(this._setCoverage(this.loadingCoverage,i,n,r,p),!f.exists)return c;if(t&&!h&&(this._isCovered(this.coverage,i,n,r)?this._setCoverage(this.coverage,i,n,r,!0):h=!0),!h)return c;if(this._positionTile(f,this.source.tileOverlap,this.viewport,s,a),!f.loaded)if(f.context2D)this._setTileLoaded(f);else{var d=this._tileCache.getImageRecord(f.cacheKey);d&&this._setTileLoaded(f,d.getData())}f.loaded?this._blendTile(f,n,r,i,o,l)&&(this._needsDraw=!0):f.loading?this._tilesLoading++:p||(c=this._compareTiles(c,f));return c},_getTile:function(e,n,r,i,o,a,s){var u,l,c,f,h,p,d,m,g,y,v=this.tilesMatrix,b=this.source;return v[r]||(v[r]={}),v[r][e]||(v[r][e]={}),v[r][e][n]&&!v[r][e][n].flipped===!this.flipped||(u=(o.x+e%o.x)%o.x,l=(o.y+n%o.y)%o.y,c=this.getTileBounds(r,e,n),f=b.getTileBounds(r,u,l,!0),h=b.tileExists(r,u,l),p=b.getTileUrl(r,u,l),d=b.getTilePostData(r,u,l),this.loadTilesWithAjax?(m=b.getTileAjaxHeaders(r,u,l),t.isPlainObject(this.ajaxHeaders)&&(m=t.extend({},this.ajaxHeaders,m))):m=null,g=b.getContext2D?b.getContext2D(r,u,l):void 0,y=new t.Tile(r,e,n,c,h,p,g,this.loadTilesWithAjax,m,f,d,b.getTileHashKey(r,u,l,p,m,d)),this.getFlip()?0===u&&(y.isRightMost=!0):u===o.x-1&&(y.isRightMost=!0),l===o.y-1&&(y.isBottomMost=!0),y.flipped=this.flipped,v[r][e][n]=y),(y=v[r][e][n]).lastTouchTime=i,y},_loadTile:function(t,e){var n=this;t.loading=!0,this._imageLoader.addJob({src:t.getUrl(),tile:t,source:this.source,postData:t.postData,loadWithAjax:t.loadWithAjax,ajaxHeaders:t.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(r,i,o){n._onTileLoad(t,e,r,i,o)},abort:function(){t.loading=!1}})},_onTileLoad:function(e,n,r,i,o){if(!r)return t.console.error("Tile %s failed to load: %s - error: %s",e,e.getUrl(),i),this.viewer.raiseEvent("tile-load-failed",{tile:e,tiledImage:this,time:n,message:i,tileRequest:o}),e.loading=!1,void(e.exists=!1);if(e.exists=!0,n<this.lastResetTime)return t.console.warn("Ignoring tile %s loaded before reset: %s",e,e.getUrl()),void(e.loading=!1);var a=this,s=function(){var t=a.source.getClosestLevel();a._setTileLoaded(e,r,t,o)};this._midDraw?window.setTimeout(s,1):s()},_setTileLoaded:function(e,n,r,i){var o=0,a=!1,s=this;function u(){return a&&t.console.error("Event 'tile-loaded' argument getCompletionCallback must be called synchronously. Its return value should be called asynchronously."),o++,l}function l(){0===--o&&(e.loading=!1,e.loaded=!0,e.hasTransparency=s.source.hasTransparency(e.context2D,e.getUrl(),e.ajaxHeaders,e.postData),e.context2D||s._tileCache.cacheTile({data:n,tile:e,cutoff:r,tiledImage:s}),s._needsDraw=!0)}var c=u();this.viewer.raiseEvent("tile-loaded",{tile:e,tiledImage:this,tileRequest:i,get image(){return t.console.error("[tile-loaded] event 'image' has been deprecated. Use 'data' property instead."),n},data:n,getCompletionCallback:u}),a=!0,c()},_positionTile:function(e,n,r,i,o){var a=e.bounds.getTopLeft();a.x*=this._scaleSpring.current.value,a.y*=this._scaleSpring.current.value,a.x+=this._xSpring.current.value,a.y+=this._ySpring.current.value;var s=e.bounds.getSize();s.x*=this._scaleSpring.current.value,s.y*=this._scaleSpring.current.value;var u=r.pixelFromPointNoRotate(a,!0),l=r.pixelFromPointNoRotate(a,!1),c=r.deltaPixelsFromPointsNoRotate(s,!0),f=r.deltaPixelsFromPointsNoRotate(s,!1),h=l.plus(f.divide(2)),p=i.squaredDistanceTo(h);n||(c=c.plus(new t.Point(1,1))),e.isRightMost&&this.wrapHorizontal&&(c.x+=.75),e.isBottomMost&&this.wrapVertical&&(c.y+=.75),e.position=u,e.size=c,e.squaredDistance=p,e.visibility=o},_blendTile:function(t,e,n,r,i,o){var a,s,u=1e3*this.blendTime;if(t.blendStart||(t.blendStart=o),a=o-t.blendStart,s=u?Math.min(1,a/u):1,this.alwaysBlend&&(s*=i),t.opacity=s,this.lastDrawn.push(t),1===s)this._setCoverage(this.coverage,r,e,n,!0),this._hasOpaqueTile=!0;else if(a<u)return!0;return!1},_compareTiles:function(t,e){return t?e.visibility>t.visibility||e.visibility===t.visibility&&e.squaredDistance<t.squaredDistance?e:t:e},_drawTiles:function(i){if(0!==this.opacity&&(0!==i.length||this.placeholderFillStyle)){var o,a,s,u=i[0];u&&(o=this.opacity<1||this.compositeOperation&&"source-over"!==this.compositeOperation||!this._isBottomItem()&&this.source.hasTransparency(u.context2D,u.getUrl(),u.ajaxHeaders,u.postData));var l,c=this.viewport.getZoom(!0),f=this.viewportToImageZoom(c);i.length>1&&f>this.smoothTileEdgesMinZoom&&!this.iOSDevice&&this.getRotation(!0)%360===0&&t.supportsCanvas&&this.viewer.useCanvas&&(o=!0,a=u.getScaleForEdgeSmoothing(),s=u.getTranslationForEdgeSmoothing(a,this._drawer.getCanvasSize(!1),this._drawer.getCanvasSize(!0))),o&&(a||(l=this.viewport.viewportToViewerElementRectangle(this.getClippedBounds(!0)).getIntegerBoundingBox(),this._drawer.viewer.viewport.getFlip()&&(this.viewport.getRotation(!0)%360===0&&this.getRotation(!0)%360===0||(l.x=this._drawer.viewer.container.clientWidth-(l.x+l.width))),l=l.times(t.pixelDensityRatio)),this._drawer._clear(!0,l)),a||(this.viewport.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:o}),this.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:o}),this.viewport.getRotation(!0)%360===0&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip());var h=!1;if(this._clip){this._drawer.saveContext(o);var p=this.imageToViewportRectangle(this._clip,!0);p=p.rotate(-this.getRotation(!0),this._getRotationPoint(!0));var d=this._drawer.viewportToDrawerRectangle(p);a&&(d=d.times(a)),s&&(d=d.translate(s)),this._drawer.setClip(d,o),h=!0}if(this._croppingPolygons){var m=this;this._drawer.saveContext(o);try{var g=this._croppingPolygons.map((function(t){return t.map((function(t){var e=m.imageToViewportCoordinates(t.x,t.y,!0).rotate(-m.getRotation(!0),m._getRotationPoint(!0)),n=m._drawer.viewportCoordToDrawerCoord(e);return a&&(n=n.times(a)),s&&(n=n.plus(s)),n}))}));this._drawer.clipWithPolygons(g,o)}catch(w){t.console.error(w)}h=!0}if(this.placeholderFillStyle&&!1===this._hasOpaqueTile){var y=this._drawer.viewportToDrawerRectangle(this.getBounds(!0));a&&(y=y.times(a)),s&&(y=y.translate(s));var v=null;v="function"===typeof this.placeholderFillStyle?this.placeholderFillStyle(this,this._drawer.context):this.placeholderFillStyle,this._drawer.drawRectangle(y,v,o)}var b=function(i){if("number"===typeof i)return r(i);if(!i||!t.Browser)return e;var o=i[t.Browser.vendor];n(o)&&(o=i["*"]);return r(o)}(this.subPixelRoundingForTransparency),_=!1;if(b===t.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)_=!0;else if(b===t.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){_=!(this.viewer&&this.viewer.isAnimating())}for(var A=i.length-1;A>=0;A--)u=i[A],this._drawer.drawTile(u,this._drawingHandler,o,a,s,_,this.source),u.beingDrawn=!0,this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:this,tile:u});h&&this._drawer.restoreContext(o),a||(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(o),this.viewport.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(o)),o&&(a&&(this.viewport.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:!1}),this.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:!1})),this._drawer.blendSketch({opacity:this.opacity,scale:a,translate:s,compositeOperation:this.compositeOperation,bounds:l}),a&&(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(!1),this.viewport.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(!1))),a||this.viewport.getRotation(!0)%360===0&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip(),this._drawDebugInfo(i)}},_drawDebugInfo:function(e){if(this.debugMode)for(var n=e.length-1;n>=0;n--){var r=e[n];try{this._drawer.drawDebugInfo(r,e.length,n,this)}catch(i){t.console.error(i)}}},_providesCoverage:function(t,e,n,r){var i,o,a,s;if(!t[e])return!1;if(void 0===n||void 0===r){for(a in i=t[e])if(Object.prototype.hasOwnProperty.call(i,a))for(s in o=i[a])if(Object.prototype.hasOwnProperty.call(o,s)&&!o[s])return!1;return!0}return void 0===t[e][n]||void 0===t[e][n][r]||!0===t[e][n][r]},_isCovered:function(t,e,n,r){return void 0===n||void 0===r?this._providesCoverage(t,e+1):this._providesCoverage(t,e+1,2*n,2*r)&&this._providesCoverage(t,e+1,2*n,2*r+1)&&this._providesCoverage(t,e+1,2*n+1,2*r)&&this._providesCoverage(t,e+1,2*n+1,2*r+1)},_setCoverage:function(e,n,r,i,o){e[n]?(e[n][r]||(e[n][r]={}),e[n][r][i]=o):t.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",n)},_resetCoverage:function(t,e){t[e]={}}});var e=t.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function n(e){return e!==t.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&e!==t.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&e!==t.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function r(t){return n(t)?e:t}}(u),function(t){var e=function(e){t.console.assert(e,"[TileCache.cacheTile] options is required"),t.console.assert(e.tile,"[TileCache.cacheTile] options.tile is required"),t.console.assert(e.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=e.tile,this.tiledImage=e.tiledImage},n=function(e){t.console.assert(e,"[ImageRecord] options is required"),t.console.assert(e.data,"[ImageRecord] options.data is required"),this._tiles=[],e.create.apply(null,[this,e.data,e.ownerTile]),this._destroyImplementation=e.destroy.bind(null,this),this.getImage=e.getImage.bind(null,this),this.getData=e.getData.bind(null,this),this.getRenderedContext=e.getRenderedContext.bind(null,this)};n.prototype={destroy:function(){this._destroyImplementation(),this._tiles=null},addTile:function(e){t.console.assert(e,"[ImageRecord.addTile] tile is required"),this._tiles.push(e)},removeTile:function(e){for(var n=0;n<this._tiles.length;n++)if(this._tiles[n]===e)return void this._tiles.splice(n,1);t.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",e)},getTileCount:function(){return this._tiles.length}},t.TileCache=function(e){e=e||{},this._maxImageCacheCount=e.maxImageCacheCount||t.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},t.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(r){t.console.assert(r,"[TileCache.cacheTile] options is required"),t.console.assert(r.tile,"[TileCache.cacheTile] options.tile is required"),t.console.assert(r.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),t.console.assert(r.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var i=r.cutoff||0,o=this._tilesLoaded.length,a=this._imagesLoaded[r.tile.cacheKey];if(a||(r.data||(t.console.error("[TileCache.cacheTile] options.image was renamed to options.data. '.image' attribute has been deprecated and will be removed in the future."),r.data=r.image),t.console.assert(r.data,"[TileCache.cacheTile] options.data is required to create an ImageRecord"),a=this._imagesLoaded[r.tile.cacheKey]=new n({data:r.data,ownerTile:r.tile,create:r.tiledImage.source.createTileCache,destroy:r.tiledImage.source.destroyTileCache,getImage:r.tiledImage.source.getTileCacheDataAsImage,getData:r.tiledImage.source.getTileCacheData,getRenderedContext:r.tiledImage.source.getTileCacheDataAsContext2D}),this._imagesLoadedCount++),a.addTile(r.tile),r.tile.cacheImageRecord=a,this._imagesLoadedCount>this._maxImageCacheCount){for(var s,u,l,c,f,h,p=null,d=-1,m=null,g=this._tilesLoaded.length-1;g>=0;g--)(s=(h=this._tilesLoaded[g]).tile).level<=i||s.beingDrawn||(p?(c=s.lastTouchTime,u=p.lastTouchTime,f=s.level,l=p.level,(c<u||c===u&&f>l)&&(p=s,d=g,m=h)):(p=s,d=g,m=h));p&&d>=0&&(this._unloadTile(m),o=d)}this._tilesLoaded[o]=new e({tile:r.tile,tiledImage:r.tiledImage})},clearTilesFor:function(e){var n;t.console.assert(e,"[TileCache.clearTilesFor] tiledImage is required");for(var r=0;r<this._tilesLoaded.length;++r)(n=this._tilesLoaded[r]).tiledImage===e&&(this._unloadTile(n),this._tilesLoaded.splice(r,1),r--)},getImageRecord:function(e){return t.console.assert(e,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[e]},_unloadTile:function(e){t.console.assert(e,"[TileCache._unloadTile] tileRecord is required");var n=e.tile,r=e.tiledImage;n.unload(),n.cacheImageRecord=null;var i=this._imagesLoaded[n.cacheKey];i.removeTile(n),i.getTileCount()||(i.destroy(),delete this._imagesLoaded[n.cacheKey],this._imagesLoadedCount--),r.viewer.raiseEvent("tile-unloaded",{tile:n,tiledImage:r})}}}(u),function(t){t.World=function(e){var n=this;t.console.assert(e.viewer,"[World] options.viewer is required"),t.EventSource.call(this),this.viewer=e.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(t){n._autoRefigureSizes?n._figureSizes():n._needsSizesFigured=!0},this._figureSizes()},t.extend(t.World.prototype,t.EventSource.prototype,{addItem:function(e,n){if(t.console.assert(e,"[World.addItem] item is required"),t.console.assert(e instanceof t.TiledImage,"[World.addItem] only TiledImages supported at this time"),void 0!==(n=n||{}).index){var r=Math.max(0,Math.min(this._items.length,n.index));this._items.splice(r,0,e)}else this._items.push(e);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,e.addHandler("bounds-change",this._delegatedFigureSizes),e.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:e})},getItemAt:function(e){return t.console.assert(void 0!==e,"[World.getItemAt] index is required"),this._items[e]},getIndexOfItem:function(e){return t.console.assert(e,"[World.getIndexOfItem] item is required"),t.indexOf(this._items,e)},getItemCount:function(){return this._items.length},setItemIndex:function(e,n){t.console.assert(e,"[World.setItemIndex] item is required"),t.console.assert(void 0!==n,"[World.setItemIndex] index is required");var r=this.getIndexOfItem(e);if(n>=this._items.length)throw new Error("Index bigger than number of layers.");n!==r&&-1!==r&&(this._items.splice(r,1),this._items.splice(n,0,e),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:e,previousIndex:r,newIndex:n}))},removeItem:function(e){t.console.assert(e,"[World.removeItem] item is required");var n=t.indexOf(this._items,e);-1!==n&&(e.removeHandler("bounds-change",this._delegatedFigureSizes),e.removeHandler("clip-change",this._delegatedFigureSizes),e.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(e))},removeAll:function(){var t,e;for(this.viewer._cancelPendingImages(),e=0;e<this._items.length;e++)(t=this._items[e]).removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy();var n=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,e=0;e<n.length;e++)t=n[e],this._raiseRemoveItem(t)},resetItems:function(){for(var t=0;t<this._items.length;t++)this._items[t].reset()},update:function(){for(var t=!1,e=0;e<this._items.length;e++)t=this._items[e].update()||t;return t},draw:function(){for(var t=0;t<this._items.length;t++)this._items[t].draw();this._needsDraw=!1},needsDraw:function(){for(var t=0;t<this._items.length;t++)if(this._items[t].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(t){this._autoRefigureSizes=t,t&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(e){var n,r=(e=e||{}).immediately||!1,i=e.layout||t.DEFAULT_SETTINGS.collectionLayout,o=e.rows||t.DEFAULT_SETTINGS.collectionRows,a=e.columns||t.DEFAULT_SETTINGS.collectionColumns,s=e.tileSize||t.DEFAULT_SETTINGS.collectionTileSize,u=s+(e.tileMargin||t.DEFAULT_SETTINGS.collectionTileMargin);n=!e.rows&&a?a:Math.ceil(this._items.length/o);var l,c,f,h,p,d=0,m=0;this.setAutoRefigureSizes(!1);for(var g=0;g<this._items.length;g++)g&&g%n===0&&("horizontal"===i?(m+=u,d=0):(d+=u,m=0)),h=(f=(c=(l=this._items[g]).getBounds()).width>c.height?s:s*(c.width/c.height))*(c.height/c.width),p=new t.Point(d+(s-f)/2,m+(s-h)/2),l.setPosition(p,r),l.setWidth(f,r),"horizontal"===i?d+=u:m+=u;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var e=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,r=this._contentFactor||0;if(this._items.length){var i=this._items[0],o=i.getBounds();this._contentFactor=i.getContentSize().x/o.width;for(var a=i.getClippedBounds().getBoundingBox(),s=a.x,u=a.y,l=a.x+a.width,c=a.y+a.height,f=1;f<this._items.length;f++)o=(i=this._items[f]).getBounds(),this._contentFactor=Math.max(this._contentFactor,i.getContentSize().x/o.width),a=i.getClippedBounds().getBoundingBox(),s=Math.min(s,a.x),u=Math.min(u,a.y),l=Math.max(l,a.x+a.width),c=Math.max(c,a.y+a.height);this._homeBounds=new t.Rect(s,u,l-s,c-u),this._contentSize=new t.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}else this._homeBounds=new t.Rect(0,0,1,1),this._contentSize=new t.Point(1,1),this._contentFactor=1;this._contentFactor===r&&this._homeBounds.equals(e)&&this._contentSize.equals(n)||this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(t){this.raiseEvent("remove-item",{item:t})}})}(u)},function(t,e,n){"use strict";n.r(e),n.d(e,"MapPointsRoutes",(function(){return p}));var r=n(0),i=n.n(r),o=n(14),a=n(7),s=n(17),u=n(18),l=n(377),c=n(160),f=n(604),h=n(1080),p=function(){var t=Object(s.useStore)(),e=t.searchResults.filter,n=t.user,r=t.parentContext.parent,a=t.siteMeta.hide_clustered_pins,p=e.toQuery,d=Object(u.hasFeature)("ugc"),m=Object(u.hasFeature)("projects"),g=Object(u.hasFeature)("trails"),y=Object(u.hasFeature)("routes"),v=Object(u.hasFeature)("collections"),b=Object(u.hasFeature)("overlays"),_=Object(u.hasFeature)("timelines");return i.a.createElement(i.a.Fragment,null,i.a.createElement(o.c,{basepath:"/map",primary:!1},!!r&&i.a.createElement(c.default,{path:"/",type:r.type,user:n,slug:r.slug,unclustered:r.isTrail||r.isRoute,orderedPosition:r.isTrail,markerPrefix:r.isTrail?"trailpin":null},i.a.createElement(i.a.Fragment,null,i.a.createElement(c.default,{path:"/records/:sub_slug",user:n,type:"record",highlighted:!0,level:1,orderedPosition:r.isTrail,markerPrefix:r.isTrail?"trailpin":null}),i.a.createElement(c.default,{path:"/collections/:sub_slug",type:"collection",user:n,highlighted:!0,level:1}),i.a.createElement(c.default,{path:"/timelines/:sub_slug",type:"collection",user:n,highlighted:!0,level:1}),i.a.createElement(c.default,{path:"/trails/:sub_slug",type:"trail",user:n,orderedPosition:!0,markerPrefix:"trailpin",unclustered:!0,level:1}),i.a.createElement(c.default,{path:"/routes/:sub_slug",type:"route",unclustered:!0,level:1}))),!r&&a&&i.a.createElement(c.default,{path:"/records/:sub_slug",type:"record",user:n,highlighted:!0,level:1}),!r&&!a&&i.a.createElement(l.default,{path:"/",default:!0},i.a.createElement(c.default,{path:"/records/:sub_slug",type:"record",user:n,highlighted:!0,level:1}),b&&i.a.createElement(c.default,{path:"/overlays/:sub_slug",type:"overlay",user:n,highlighted:!0,level:1})),d&&i.a.createElement(f.default,{path:"/contribute/user/:id"}),m&&i.a.createElement(c.default,{path:"/contribute/projects/:slug",type:"project",user:n}),d&&Object(u.userIsSignedIn)()&&i.a.createElement(f.default,{path:"/contribute",user:n},i.a.createElement(f.default,{path:"/profile",level:1,user:n})),v&&i.a.createElement(i.a.Fragment,null,i.a.createElement(l.default,{path:"/collections",type:"collection"}),i.a.createElement(c.default,{path:"/collections/:slug",type:"collection",user:n})),y&&i.a.createElement(i.a.Fragment,null,i.a.createElement(l.default,{path:"/routes",type:"route"}),i.a.createElement(c.default,{path:"/routes/:slug",type:"route",user:n,unclustered:!0})),_&&i.a.createElement(i.a.Fragment,null,i.a.createElement(l.default,{path:"/timelines",type:"timeline"}),i.a.createElement(c.default,{path:"/timelines/:slug",type:"timeline",user:n,unclustered:!0})),i.a.createElement(h.default,{path:"/search/results",user:n,query:e.query,term_ids:p.with_term_ids,types:p.type,start_date:p.start_date,end_date:p.end_date,centroid:p.centroid,distance:p.distance}),g&&i.a.createElement(i.a.Fragment,null,i.a.createElement(l.default,{path:"/trails",type:"trail"}),i.a.createElement(c.default,{path:"/trails/:slug",type:"trail",user:n,orderedPosition:!0,markerPrefix:"trailpin",unclustered:!0})),b&&i.a.createElement(i.a.Fragment,null,i.a.createElement(l.default,{path:"/overlays",type:"overlay"}))))};e.default=Object(a.a)(p)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(577),u=n.n(s);function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(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.")}()}function c(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"===typeof t)return h(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)?h(t,e):void 0}}function h(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}e.default=Object(o.a)((function(){var t=Object(a.useStore)().place,e=c(Object(r.useState)(""),2),n=e[0],o=e[1],s=c(Object(r.useState)([]),2),f=s[0],h=s[1],p=l(new Map(t.currentFeatureLayer.features.flatMap((function(t){var e;return(null===(e=t.embed_metadata)||void 0===e?void 0:e.flatMap((function(t){return null!==t&&void 0!==t&&t.userid&&null!==t&&void 0!==t&&t.username?[[t.userid,t]]:[]})))||[]}))).values());Object(r.useEffect)((function(){if(n.length>1){var t=p.filter((function(t){return"".concat(t.userid," ").concat(t.username).toLowerCase().includes(n.toLowerCase())}));h(t)}else h([])}),[n]);return i.a.createElement("div",{className:u.a.Search},i.a.createElement("input",{type:"text",placeholder:"Search for a user\u2026",value:n,onChange:function(t){return o(t.target.value)}}),f.length>0&&i.a.createElement("div",null,i.a.createElement("ul",null,f.map((function(e,n){return i.a.createElement("li",{key:n},i.a.createElement("button",{type:"button",onClick:function(){return n=e.userid,void t.currentFeatureLayer.showFeaturesForUser(n);var n}},e.username," (",e.userid,")"))})))))}))},function(t,e,n){t.exports={ColorInput:"ColorInput-module__ColorInput___1y8tZ"}},function(t,e,n){"use strict";n.r(e);var r=n(363),i=n(145),o=n(268),a=n(1153),s=n(213),u=n(382),l=n.n(u),c=n(396),f=n(107),h=n(663);function p(t){return function(t){if(Array.isArray(t))return d(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)return;if("string"===typeof t)return d(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 d(t,e)}(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.")}()}function d(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 m(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 g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=g({id:"layer-".concat(t.id),opacity:1,data:t.url,tileSize:256,maxRequests:20,pickable:!1,transparentColor:[255,255,255,0],minZoom:t.min_zoom,maxZoom:t.max_zoom,onTileError:function(t){},renderSubLayers:function(t){var e=t.tile.bbox,n=e.west,i=e.south,o=e.east,a=e.north;return[new r.a(t,{data:null,image:t.data,bounds:[n,i,o,a]})]}},e);return new i.a(n)},b=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={id:"layer-".concat(t.id),data:t.url,opacity:1,pickable:!0,filled:t.fill_polygons,stroked:!0,getLineWidth:t.line_width,lineWidthUnits:"meters",lineWidthMinPixels:1,getLineColor:t.color?Object(s.hexToRGB)(t.color):[0,0,0],getFillColor:t.color?[].concat(p(Object(s.hexToRGB)(t.color)),[t.polygon_opacity/100*255]):[0,0,0],getRadius:t.point_radius,pointRadiusMinPixels:2,pointRadiusUnits:"meters",minZoom:t.min_zoom,maxZoom:t.max_zoom,onHover:function(t){e.setCursorFunction(t.picked?"pointer":null)},onTileError:function(t){},onClick:function(t){e.setClickedFunction(t)}};return t.show_pattern&&(n=Object.assign(n,{fillPatternAtlas:l.a,fillPatternMapping:c,fillPatternMask:t.mask_pattern,getFillPattern:function(){return t.pattern_name},getFillPatternOffset:[0,0],getFillPatternScale:2500,extensions:[new a.a({pattern:!0})]})),new o.a(n)},_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.isEditingBounds)return!1;if((!t.bbox_sw||!t.bbox_ne)&&!t.isDrawingRectangle)return!1;var n=function(t){var e,n=null===t||void 0===t||null===(e=t.match(/-?\d+\.?\d*/g))||void 0===e?void 0:e.map(Number);return n?{lng:n[0],lat:n[1]}:{lng:0,lat:0}},r=n(t.bbox_sw),i=n(t.bbox_ne),o={type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[r.lng,r.lat],[i.lng,r.lat],[i.lng,i.lat],[r.lng,i.lat],[r.lng,r.lat]]]}}]};e.setCursorFunction(t.isDrawingRectangle?"crosshair":null);var a=new f.EditableGeoJsonLayer({id:"bounds-layer-".concat(t.id),data:o,mode:t.isDrawingRectangle?f.DrawRectangleMode:h.default,selectedFeatureIndexes:[0],getFillColor:[0,175,54,0],getLineColor:[0,175,54,200],getLineWidth:1,lineWidthUnits:"pixels",getTentativeLineWidth:1,getTentativeFillColor:[0,0,0,0],getTentativeLineColor:[0,175,54,200],getEditHandlePointColor:[0,175,54,255],editHandlePointStrokeWidth:3,getEditHandlePointRadius:function(t){return t.type,7},pickable:!0,onEdit:function(e){"addFeature"===e.editType&&(t.setIsDrawingRectangle(!1),t.clearMessage(),s(e.updatedData.features[1])),"scaling"!==e.editType&&"scaled"!==e.editType||s(e.updatedData.features[0])}}),s=function(e){var n=function(t){return"".concat(t[1].toFixed(5),", ").concat(t[0].toFixed(5))},r=e.geometry.coordinates[0].map((function(t){return t[0]})),i=e.geometry.coordinates[0].map((function(t){return t[1]})),o=Math.max.apply(Math,p(r)),a=Math.min.apply(Math,p(r)),s=Math.max.apply(Math,p(i)),u=Math.min.apply(Math,p(i));t.setBboxValue("bbox_sw",n([a,u])),t.setBboxValue("bbox_ne",n([o,s]))};return a};e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return t.slice().reverse().forEach((function(t){"raster"===t.type&&t.isVisible?n.push(v(t,e)):"vector"===t.type&&t.isVisible&&n.push(b(t,e))})),t.slice().reverse().forEach((function(t){var r=_(t,e);r&&n.push(r)})),n}},function(t,e,n){"use strict";n.r(e),n.d(e,"coordEach",(function(){return i})),n.d(e,"coordReduce",(function(){return o})),n.d(e,"propEach",(function(){return a})),n.d(e,"propReduce",(function(){return s})),n.d(e,"featureEach",(function(){return u})),n.d(e,"featureReduce",(function(){return l})),n.d(e,"coordAll",(function(){return c})),n.d(e,"geomEach",(function(){return f})),n.d(e,"geomReduce",(function(){return h})),n.d(e,"flattenEach",(function(){return p})),n.d(e,"flattenReduce",(function(){return d})),n.d(e,"segmentEach",(function(){return m})),n.d(e,"segmentReduce",(function(){return g})),n.d(e,"lineEach",(function(){return y})),n.d(e,"lineReduce",(function(){return v})),n.d(e,"findSegment",(function(){return b})),n.d(e,"findPoint",(function(){return _}));var r=n(60);function i(t,e,n){if(null!==t)for(var r,o,a,s,u,l,c,f,h=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,y=m?t.features.length:1,v=0;v<y;v++){u=(f=!!(c=m?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<u;b++){var _=0,A=0;if(null!==(s=f?c.geometries[b]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,v,_,A))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,v,_,A))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(o=0;o<l[r].length-h;o++){if(!1===e(l[r][o],p,v,_,A))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&A++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(A=0,o=0;o<l[r].length;o++){for(a=0;a<l[r][o].length-h;a++){if(!1===e(l[r][o][a],p,v,_,A))return!1;p++}A++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===i(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e,n,r){var o=n;return i(t,(function(t,r,i,a,s){o=0===r&&void 0===n?t:e(o,t,r,i,a,s)}),r),o}function a(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function s(t,e,n){var r=n;return a(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function u(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function l(t,e,n){var r=n;return u(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function c(t){var e=[];return i(t,(function(t){e.push(t)})),e}function f(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function h(t,e,n){var r=n;return f(t,(function(t,i,o,a,s){r=0===i&&void 0===n?t:e(r,t,i,o,a,s)})),r}function p(t,e){f(t,(function(t,n,i,o,a){var s,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Object(r.feature)(t,i,{bbox:o,id:a}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c={type:s,coordinates:t.coordinates[l]};if(!1===e(Object(r.feature)(c,i),n,l))return!1}}))}function d(t,e,n){var r=n;return p(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r}function m(t,e){p(t,(function(t,n,o){var a=0;if(t.geometry){var s=t.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var u,l=0,c=0,f=0;return!1!==i(t,(function(i,s,h,p,d){if(void 0===u||n>l||p>c||d>f)return u=i,l=n,c=p,f=d,void(a=0);var m=Object(r.lineString)([u,i],t.properties);if(!1===e(m,n,o,d,a))return!1;a++,u=i}))&&void 0}}}))}function g(t,e,n){var r=n,i=!1;return m(t,(function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0})),r}function y(t,e){if(!t)throw new Error("geojson is required");p(t,(function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===e(Object(r.lineString)(a[s],t.properties),n,i,s))return!1}}}))}function v(t,e,n){var r=n;return y(t,(function(t,i,o,a){r=0===i&&void 0===n?t:e(r,t,i,o,a)})),r}function b(t,e){if(e=e||{},!Object(r.isObject)(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,a=e.geometryIndex||0,s=e.segmentIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=l.length+s-1),Object(r.lineString)([l[s],l[s+1]],u,e);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s-1),Object(r.lineString)([l[a][s],l[a][s+1]],u,e);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s-1),Object(r.lineString)([l[o][s],l[o][s+1]],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s-1),Object(r.lineString)([l[o][a][s],l[o][a][s+1]],u,e)}throw new Error("geojson is invalid")}function _(t,e){if(e=e||{},!Object(r.isObject)(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,a=e.geometryIndex||0,s=e.coordIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return Object(r.point)(l,u,e);case"MultiPoint":return o<0&&(o=l.length+o),Object(r.point)(l[o],u,e);case"LineString":return s<0&&(s=l.length+s),Object(r.point)(l[s],u,e);case"Polygon":return a<0&&(a=l.length+a),s<0&&(s=l[a].length+s),Object(r.point)(l[a][s],u,e);case"MultiLineString":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),Object(r.point)(l[o][s],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),s<0&&(s=l[o][a].length-s),Object(r.point)(l[o][a][s],u,e)}throw new Error("geojson is invalid")}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(49),a=n(7),s=n(103),u=n(444);e.default=Object(a.a)((function(){var t=Object(s.useStore)(),e=t.activeFeature,n=t.setActiveFeature;if(e)return i.a.createElement(o.g,{latitude:e.coordinate[1],longitude:e.coordinate[0],closeButton:!0,dynamicPosition:!0,closeOnClick:!1,anchor:"bottom",captureScroll:!0,captureClick:!0,onClose:function(){n(null)}},i.a.createElement(u.default,{data:e.object.properties}))}))},function(t,e,n){t.exports={OverlayCreator:"OverlayCreator-module__OverlayCreator___5tCSE"}},function(t,e,n){"use strict";n.r(e);var r=n(2);function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=r.types.model("Stop",{id:r.types.identifier,name:r.types.maybeNull(r.types.string),lat:r.types.maybeNull(r.types.number),lng:r.types.maybeNull(r.types.number),order:r.types.maybeNull(r.types.number)}).views((function(t){return{get position(){return[t.lng,t.lat]}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.lonlat_js&&(e.lng=e.lonlat_js.coordinates[0],e.lat=e.lonlat_js.coordinates[1],delete e.lonlat_js),e}));e.default=a},function(t,e,n){t.exports={RouteCreator:"RouteCreator-module__RouteCreator___1E9nA"}},function(t,e,n){"use strict";n.r(e);var r=n(2);function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=r.types.model("Stop",{id:r.types.identifier,name:r.types.maybeNull(r.types.string),lat:r.types.maybeNull(r.types.number),lng:r.types.maybeNull(r.types.number),order:r.types.maybeNull(r.types.number)}).actions((function(t){return{afterCreate:function(){"create"===Object(r.getRoot)(t).mode&&(t.order=0)}}})).views((function(t){return{get position(){return[t.lng,t.lat]}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.lonlat_js&&(e.lng=e.lonlat_js.coordinates[0],e.lat=e.lonlat_js.coordinates[1],delete e.lonlat_js),e.order=e.position,e}));e.default=a},function(t,e,n){t.exports={TrailCreator:"TrailCreator-module__TrailCreator___1_XwI"}},function(t,e,n){"use strict";n.r(e);var r=n(142);function i(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")}function o(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 a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function u(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var f=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(f,t);var e,n,l,c=u(f);function f(){var t;a(this,f);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return(t=c.call.apply(c,[this].concat(n))).getScaleAction=function(e,n,o,a){if(!t._selectedEditHandle)return null;var s=i(t._getOppositeScaleHandle(t._selectedEditHandle)),u=Object(r.default)([Math.min(s[0],n[0]),Math.min(s[1],n[1]),Math.max(s[0],n[0]),Math.max(s[1],n[1])]);return{updatedData:t._getUpdatedData(a,{type:"FeatureCollection",features:[u]}),editType:o,editContext:{featureIndexes:a.selectedIndexes}}},t}return e=f,n&&o(e.prototype,n),l&&o(e,l),Object.defineProperty(e,"prototype",{writable:!1}),e}(n(1332).ScaleMode);e.default=f},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(114),o=r.types.model({id:r.types.number,title:r.types.string,content:r.types.maybeNull(r.types.string),url:r.types.maybeNull(r.types.string),image:r.types.maybeNull(i.default)});e.default=o},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchSiteMetaQuery",(function(){return i}));var r=n(21),i=function(){return r.default.request("\n    #graphql\n\n    query SiteMetaQuery {\n        results: site_metas {\n            contact_email\n            facebook\n            instagram\n            twitter\n            website\n            site_title\n            centroid\n            zoom\n            min_zoom\n            max_zoom\n            site_description\n            start_date\n            end_date\n            show_tray\n            show_points\n            display_hide_pins_option\n            disable_mobile_tray_auto_popup\n            tray_links\n            hide_clustered_pins\n            open_overlay_tools_automatically\n            autoloaded_overlays\n            initial_overlay_opacity\n            bbox_sw\n            bbox_ne\n            custom_legend\n            place_search_countries\n            allowed_content_types\n        }\n        tenant_logos: tenant_settings {\n            has_map_logo\n            has_site_logo\n            has_favicon\n            map_logo_url\n            site_logo_url\n            favicon_url\n        }\n    }\n")}},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/logo-humap-white-1a5d5b473ef7f37e52f0858ee91321a9.svg"},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(443),a=n(1136),s=n(398),u=n(1348),l=n.n(u),c=Object(s.deepMerge)(o.default,{global:{spacing:"12px",colors:{focus:{dark:"#444444",light:"#CCCCCC"}},font:{family:!1,size:!1,height:!1},breakpoints:{small:!1,medium:!1,large:!1,smallMobile:{value:480},mobile:{value:767},tablet:{value:1024},desktop:{value:1680},wide:{value:1e4}},input:{weight:400}},rangeInput:{track:{height:"2px"},thumb:{}}});e.default=function(t){var e=t.children;return i.a.createElement(a.a,{full:!0,theme:c},i.a.createElement("div",{className:l.a.Page},e))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1349),a=n.n(o);e.default=function(t){var e=t.children;return i.a.createElement("div",{className:a.a.SiteHeader},e)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1350),a=n.n(o);e.default=function(t){var e=t.children;return i.a.createElement("div",{className:a.a.SiteWrapper},e)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r);n(666),n(1152),n(336);e.default=function(){return i.a.createElement("p",null,"fixme")}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchSearchCardItemResultsQuery",(function(){return i})),n.d(e,"fetchSearchCardItemResultsQueryWithBounds",(function(){return o}));var r=n(21),i=function(t){return Array.isArray(t.with_term_ids)&&(t.with_term_ids="{".concat(t.with_term_ids.join(","),"}")),r.default.request((e=t.type,'\n    #graphql\n    query CardItemResults($limit: Int!, $offset: Int!, $type: [String!], $query: String, $with_term_ids: _int4 = "{}", $start_date: timestamptz, $end_date: timestamptz) {\n        '.concat(e.map((function(t){return function(t){return"\n    ".concat(t,'_total: card_item_results_aggregate(args: {query: $query, with_term_ids: $with_term_ids, start_date: $start_date, end_date: $end_date}, where: {\n        type: {\n            _in: "').concat(t,'"\n        }\n    }) {\n        aggregate {\n            count\n        }\n    }\n    ')}(t)})),"\n        total: card_item_results_aggregate(args: {query: $query, with_term_ids: $with_term_ids, start_date: $start_date, end_date: $end_date}, where: {\n            type: {\n                _in: $type\n            }\n        }) {\n            aggregate {\n                count\n            }\n        }\n        results: card_item_results(args: {query: $query, with_term_ids: $with_term_ids, start_date: $start_date, end_date: $end_date}, limit: $limit, offset: $offset, where: {\n            type: {\n                _in: $type\n            }\n        }) {\n            name, excerpt, slug, location: lonlat, date_from, date_to, type, image_url, hero_attachment_type\n        }\n    }\n")),t);var e},o=function(t){return Array.isArray(t.with_term_ids)&&(t.with_term_ids="\n            {".concat(t.with_term_ids.join(","),"}")),t.query||(t.orderby="name"),r.default.request((e=t.type,'\n    #graphql\n    query CardItemResults($limit: Int!, $offset: Int!, $type: [String!], $orderby: String, $query: String, $centroid: String!, $distance: numeric!, $with_term_ids: _int4 = "{}", $start_date: timestamptz, $end_date: timestamptz) {\n        '.concat(e.map((function(t){return function(t){return"\n    ".concat(t,'_total: card_item_results_aggregate(args: {centroid: $centroid, orderby: "distance", query: $query, with_term_ids: $with_term_ids, start_date: $start_date, end_date: $end_date}, where: {\n        distance: {\n            _lte: $distance\n        },\n        type: {\n            _in: "').concat(t,'"\n        }\n    }) {\n        aggregate {\n            count\n        }\n    }\n    ')}(t)})),"\n        total: card_item_results_aggregate(args: {centroid: $centroid, orderby: $orderby, query: $query, with_term_ids: $with_term_ids, start_date: $start_date, end_date: $end_date}, where: {\n            distance: {\n                _lte: $distance\n            },\n            type: {\n                _in: $type\n            }\n        }) {\n            aggregate {\n                count\n            }\n        }\n        results: card_item_results(args: {centroid: $centroid, orderby: $orderby, query: $query, with_term_ids: $with_term_ids, start_date: $start_date, end_date: $end_date}, limit: $limit, offset: $offset, where: {\n            distance: {\n                _lte: $distance\n            },\n            type: {\n                _in: $type\n            }\n        }) {\n            name, excerpt, slug, location: lonlat, date_from, date_to, type, image_url, hero_attachment_type\n        }\n    }\n")),t);var e}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=(n(532),n(305)),o=n(664);function a(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=r.types.model({title:r.types.string,sanitised_content:r.types.maybeNull(r.types.string),records_title:r.types.maybeNull(r.types.string),records_description:r.types.maybeNull(r.types.string),record_ids:r.types.array(r.types.number,[]),taxonomies_description:r.types.maybeNull(r.types.string),taxonomies_title:r.types.maybeNull(r.types.string),taxonomy_terms:r.types.array(i.default,[]),quick_starts_title:r.types.maybeNull(r.types.string),quick_starts_description:r.types.maybeNull(r.types.string),quick_starts:r.types.array(o.default,[])}).preProcessSnapshot((function(t){if(!t)return null;var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.record_ids=t.records.map((function(t){return t.record.id})),e.taxonomy_terms=t.taxonomy_terms.map((function(t){return t.taxonomy_term})),e.quick_starts=t.quick_starts.map((function(t){return t.quick_start})),e})).views((function(t){return{get hasTaxonomies(){return t.taxonomy_terms.length>0},get hasRecords(){return t.record_ids.length>0},get hasQuickStarts(){return t.quick_starts.length>0}}}));e.default=u},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(204),o=r.types.model("SiteMetaLogo",{type:r.types.string,url:r.types.string}),a=r.types.model("SiteMetaModel",{site_title:r.types.maybeNull(r.types.string),facebook:r.types.maybeNull(r.types.string),instagram:r.types.maybeNull(r.types.string),twitter:r.types.maybeNull(r.types.string),contact_email:r.types.maybeNull(r.types.string),website:r.types.maybeNull(r.types.string),centroid:r.types.maybeNull(i.default),zoom:r.types.maybeNull(r.types.number),min_zoom:r.types.maybeNull(r.types.number),max_zoom:r.types.maybeNull(r.types.number),initial_overlay_opacity:r.types.maybeNull(r.types.number),logos:r.types.array(o,[]),site_description:r.types.maybeNull(r.types.string),start_date:r.types.maybeNull(r.types.integer),end_date:r.types.maybeNull(r.types.integer),show_tray:r.types.maybeNull(r.types.boolean),show_points:r.types.maybeNull(r.types.boolean),display_hide_pins_option:r.types.maybeNull(r.types.boolean),disable_mobile_tray_auto_popup:r.types.maybeNull(r.types.boolean),tray_links:r.types.maybeNull(r.types.frozen([])),hide_clustered_pins:r.types.maybeNull(r.types.boolean),open_overlay_tools_automatically:r.types.maybeNull(r.types.boolean),autoloaded_overlays:r.types.optional(r.types.array(r.types.string),[]),bbox_sw:r.types.frozen(),bbox_ne:r.types.frozen(),custom_legend:r.types.maybeNull(r.types.frozen([])),place_search_countries:r.types.maybeNull(r.types.frozen([])),allowed_content_types:r.types.maybeNull(r.types.frozen([]))}).views((function(t){return{get mapLogo(){var e=t.logos.find((function(t){return"map"===t.type}));return e||(t.siteLogo?t.siteLogo:void 0)},get siteLogo(){return t.logos.find((function(t){return"site"===t.type}))},get faviconLogo(){var e=t.logos.find((function(t){return"favicon"===t.type}));return e||(t.mapLogo?t.mapLogo:t.siteLogo?t.siteLogo:void 0)},get title(){return t.site_title||""},get description(){return I18n.t("models.site_meta_model.description")},get author(){return"Humap"},get siteMetaAttributes(){return{title:t.title,description:t.description,author:t.author,lang:"en",meta:[]}}}})).preProcessSnapshot((function(t){if(t){if(t.tenant_logos){var e=t.tenant_logos[0];t.logos=[],e.has_map_logo&&e.map_logo_url&&t.logos.push({type:"map",url:e.map_logo_url}),e.has_site_logo&&e.site_logo_url&&t.logos.push({type:"site",url:e.site_logo_url}),e.has_favicon&&e.has_favicon&&t.logos.push({type:"favicon",url:e.favicon_url}),delete t.tenant_logos}return t}}));e.default=a},function(t,e,n){"use strict";n.r(e),n.d(e,"OverlayGroupModel",(function(){return c}));var r=n(2),i=n(114),o=n(1009),a=n(555),s=n(82);function u(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 l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=r.types.model("OverlayGroupModel",{id:r.types.number,name:r.types.string,slug:r.types.identifier,type:"overlay",sanitised_content:r.types.maybeNull(r.types.string),date_from:r.types.maybeNull(r.types.string),date_to:r.types.maybeNull(r.types.string),date_from_precision:r.types.maybeNull(r.types.string),date_to_precision:r.types.maybeNull(r.types.string),image:r.types.maybeNull(i.default),overlays:r.types.array(o.default,[]),parent_item_ids:r.types.array(r.types.number,[]),static_map_urls:r.types.frozen({}),key_mode:r.types.string}).volatile((function(t){return{enabled:!1,isPrefetched:!1,closed:!1}})).actions((function(t){return{toggle:function(){t.enabled=!t.enabled,Object(r.getParentOfType)(t,a.default).toggleOverlayGroupEnabled(t.slug)},prefetched:function(){t.isPrefetched=!0},toggleClosed:function(){t.closed=!t.closed}}})).views((function(t){return{get simplified(){return 1===t.overlays.length},get isEnabled(){return t.enabled},set isEnabled(e){t.enabled=e},get dateRange(){return t.date_from||t.date_to?t.date_from&&t.date_to?[t.formattedDateFrom,t.formattedDateTo]:t.date_from?[t.formattedDateFrom]:[]:null},get formattedDateFrom(){if(!t.date_from)return null;var e=s.DateTime.fromISO(t.date_from);switch(t.date_from_precision){case"day":return e.toLocaleString(s.DateTime.DATE_FULL);case"month":return e.toLocaleString({month:"long",year:"numeric"});case"year":return e.toLocaleString({year:"numeric"})}},get formattedDateTo(){if(!t.date_to)return null;var e=s.DateTime.fromISO(t.date_to);switch(t.date_to_precision){case"day":return e.toLocaleString(s.DateTime.DATE_FULL);case"month":return e.toLocaleString({month:"long",year:"numeric"});case"year":return e.toLocaleString({year:"numeric"})}}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.overlays&&(e.overlays=e.overlays.map((function(t){return t.hasOwnProperty("overlay")?t.overlay:t}))),e}));e.default=c},function(t,e,n){"use strict";n.r(e);var r=n(2);function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=r.types.model("Basemap",{id:r.types.identifierNumber,name:r.types.string,image_url:r.types.maybeNull(r.types.string)}).views((function(t){return{get stylePath(){return"/basemaps/".concat(t.id)}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.image_url||e.image&&(e.image_url=e.image.url),e})),s=r.types.model("BaseMapsCollection",{availableBasemaps:r.types.array(a,[]),currentBasemap:r.types.maybeNull(r.types.reference(a))}).actions((function(t){return{setBasemap:function(e){t.currentBasemap=e}}}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model({path:r.types.string});e.default=i},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchTrayViewQuery",(function(){return i}));var r=n(21),i=function(t){return r.default.request('\n    #graphql\n\n    query TrayViewQuery($type: String!) {\n        results: tray_views(where: {view_type: {_eq: $type}}) {\n            id\n            title\n            sanitised_content\n            taxonomies_description: highlighted_taxonomies_description\n            taxonomies_title: highlighted_taxonomies_title\n            records_title: highlighted_records_title\n            records_description: highlighted_records_description\n            quick_starts_title: highlighted_quick_starts_title\n            quick_starts_description: highlighted_quick_starts_description\n            records(where: {record: {state: {_eq: "published"}}}) {\n                record {\n                    id\n                }\n            }\n\n            taxonomy_terms(order_by: {taxonomy_term: {position: asc}}) {\n                taxonomy_term {\n                    name\n                    id\n                    has_duplicate_name\n                }\n            }\n\n            quick_starts {\n                quick_start {\n                    id\n                    title\n                    content\n                    url\n                    image {\n                        name\n                        url\n                    }\n                }\n            }\n\n        }\n    }\n',t)}},function(t,e,n){t.exports={spinnerColor:"var(--primary-panel-color)",LoadingSpinner:"LoadingSpinner-module__LoadingSpinner___3RnkX"}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return gt}));var r,i,o,a,s=n(3),u=n.n(s),l=n(1315),c=n.n(l),f=n(1316),h=n.n(f),p=n(0),d=n.n(p),m=n(259),g=n.n(m),y="bodyAttributes",v="htmlAttributes",b="titleAttributes",_={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},A=(Object.keys(_).map((function(t){return _[t]})),"charset"),w="cssText",x="href",E="http-equiv",O="innerHTML",S="itemprop",P="name",C="property",T="rel",k="src",I="target",L={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},j="defaultTitle",M="defer",R="encodeSpecialCharacters",N="onChangeClientState",D="titleTemplate",F=Object.keys(L).reduce((function(t,e){return t[L[e]]=e,t}),{}),B=[_.NOSCRIPT,_.SCRIPT,_.STYLE],z="data-react-helmet",U="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},G=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},V=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),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},H=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},W=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e},X=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===e?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},Y=function(t){var e=Q(t,_.TITLE),n=Q(t,D);if(n&&e)return n.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var r=Q(t,j);return e||r||void 0},Z=function(t){return Q(t,N)||function(){}},K=function(t,e){return e.filter((function(e){return"undefined"!==typeof e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return q({},t,e)}),{})},$=function(t,e){return e.filter((function(t){return"undefined"!==typeof t[_.BASE]})).map((function(t){return t[_.BASE]})).reverse().reduce((function(e,n){if(!e.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=r[i].toLowerCase();if(-1!==t.indexOf(o)&&n[o])return e.concat(n)}return e}),[])},J=function(t,e,n){var r={};return n.filter((function(e){return!!Array.isArray(e[t])||("undefined"!==typeof e[t]&&it("Helmet: "+t+' should be of type "Array". Instead found type "'+U(e[t])+'"'),!1)})).map((function(e){return e[t]})).reverse().reduce((function(t,n){var i={};n.filter((function(t){for(var n=void 0,o=Object.keys(t),a=0;a<o.length;a++){var s=o[a],u=s.toLowerCase();-1===e.indexOf(u)||n===T&&"canonical"===t[n].toLowerCase()||u===T&&"stylesheet"===t[u].toLowerCase()||(n=u),-1===e.indexOf(s)||s!==O&&s!==w&&s!==S||(n=s)}if(!n||!t[n])return!1;var l=t[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][l]&&(i[n][l]=!0,!0)})).reverse().forEach((function(e){return t.push(e)}));for(var o=Object.keys(i),a=0;a<o.length;a++){var s=o[a],u=g()({},r[s],i[s]);r[s]=u}return t}),[]).reverse()},Q=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.hasOwnProperty(e))return r[e]}return null},tt=(r=Date.now(),function(t){var e=Date.now();e-r>16?(r=e,t(e)):setTimeout((function(){tt(t)}),0)}),et=function(t){return clearTimeout(t)},nt="undefined"!==typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||tt:t.requestAnimationFrame||tt,rt="undefined"!==typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||et:t.cancelAnimationFrame||et,it=function(t){return console&&"function"===typeof console.warn&&console.warn(t)},ot=null,at=function(t,e){var n=t.baseTag,r=t.bodyAttributes,i=t.htmlAttributes,o=t.linkTags,a=t.metaTags,s=t.noscriptTags,u=t.onChangeClientState,l=t.scriptTags,c=t.styleTags,f=t.title,h=t.titleAttributes;lt(_.BODY,r),lt(_.HTML,i),ut(f,h);var p={baseTag:ct(_.BASE,n),linkTags:ct(_.LINK,o),metaTags:ct(_.META,a),noscriptTags:ct(_.NOSCRIPT,s),scriptTags:ct(_.SCRIPT,l),styleTags:ct(_.STYLE,c)},d={},m={};Object.keys(p).forEach((function(t){var e=p[t],n=e.newTags,r=e.oldTags;n.length&&(d[t]=n),r.length&&(m[t]=p[t].oldTags)})),e&&e(),u(t,d,m)},st=function(t){return Array.isArray(t)?t.join(""):t},ut=function(t,e){"undefined"!==typeof t&&document.title!==t&&(document.title=st(t)),lt(_.TITLE,e)},lt=function(t,e){var n=document.getElementsByTagName(t)[0];if(n){for(var r=n.getAttribute(z),i=r?r.split(","):[],o=[].concat(i),a=Object.keys(e),s=0;s<a.length;s++){var u=a[s],l=e[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),-1===i.indexOf(u)&&i.push(u);var c=o.indexOf(u);-1!==c&&o.splice(c,1)}for(var f=o.length-1;f>=0;f--)n.removeAttribute(o[f]);i.length===o.length?n.removeAttribute(z):n.getAttribute(z)!==a.join(",")&&n.setAttribute(z,a.join(","))}},ct=function(t,e){var n=document.head||document.querySelector(_.HEAD),r=n.querySelectorAll(t+"["+"data-react-helmet]"),i=Array.prototype.slice.call(r),o=[],a=void 0;return e&&e.length&&e.forEach((function(e){var n=document.createElement(t);for(var r in e)if(e.hasOwnProperty(r))if(r===O)n.innerHTML=e.innerHTML;else if(r===w)n.styleSheet?n.styleSheet.cssText=e.cssText:n.appendChild(document.createTextNode(e.cssText));else{var s="undefined"===typeof e[r]?"":e[r];n.setAttribute(r,s)}n.setAttribute(z,"true"),i.some((function(t,e){return a=e,n.isEqualNode(t)}))?i.splice(a,1):o.push(n)})),i.forEach((function(t){return t.parentNode.removeChild(t)})),o.forEach((function(t){return n.appendChild(t)})),{oldTags:i,newTags:o}},ft=function(t){return Object.keys(t).reduce((function(e,n){var r="undefined"!==typeof t[n]?n+'="'+t[n]+'"':""+n;return e?e+" "+r:r}),"")},ht=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[L[n]||n]=t[n],e}),e)},pt=function(t,e,n){switch(t){case _.TITLE:return{toComponent:function(){return t=e.title,n=e.titleAttributes,(r={key:t})[z]=!0,i=ht(n,r),[d.a.createElement(_.TITLE,i,t)];var t,n,r,i},toString:function(){return function(t,e,n,r){var i=ft(n),o=st(e);return i?"<"+t+' data-react-helmet="true" '+i+">"+X(o,r)+"</"+t+">":"<"+t+' data-react-helmet="true">'+X(o,r)+"</"+t+">"}(t,e.title,e.titleAttributes,n)}};case y:case v:return{toComponent:function(){return ht(e)},toString:function(){return ft(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,n){var r,i=((r={key:n})[z]=!0,r);return Object.keys(e).forEach((function(t){var n=L[t]||t;if(n===O||n===w){var r=e.innerHTML||e.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=e[t]})),d.a.createElement(t,i)}))}(t,e)},toString:function(){return function(t,e,n){return e.reduce((function(e,r){var i=Object.keys(r).filter((function(t){return!(t===O||t===w)})).reduce((function(t,e){var i="undefined"===typeof r[e]?e:e+'="'+X(r[e],n)+'"';return t?t+" "+i:i}),""),o=r.innerHTML||r.cssText||"",a=-1===B.indexOf(t);return e+"<"+t+' data-react-helmet="true" '+i+(a?"/>":">"+o+"</"+t+">")}),"")}(t,e,n)}}}},dt=function(t){var e=t.baseTag,n=t.bodyAttributes,r=t.encode,i=t.htmlAttributes,o=t.linkTags,a=t.metaTags,s=t.noscriptTags,u=t.scriptTags,l=t.styleTags,c=t.title,f=void 0===c?"":c,h=t.titleAttributes;return{base:pt(_.BASE,e,r),bodyAttributes:pt(y,n,r),htmlAttributes:pt(v,i,r),link:pt(_.LINK,o,r),meta:pt(_.META,a,r),noscript:pt(_.NOSCRIPT,s,r),script:pt(_.SCRIPT,u,r),style:pt(_.STYLE,l,r),title:pt(_.TITLE,{title:f,titleAttributes:h},r)}},mt=c()((function(t){return{baseTag:$([x,I],t),bodyAttributes:K(y,t),defer:Q(t,M),encode:Q(t,R),htmlAttributes:K(v,t),linkTags:J(_.LINK,[T,x],t),metaTags:J(_.META,[P,A,E,C,S],t),noscriptTags:J(_.NOSCRIPT,[O],t),onChangeClientState:Z(t),scriptTags:J(_.SCRIPT,[k,O],t),styleTags:J(_.STYLE,[w],t),title:Y(t),titleAttributes:K(b,t)}}),(function(t){ot&&rt(ot),t.defer?ot=nt((function(){at(t,(function(){ot=null}))})):(at(t),ot=null)}),dt)((function(){return null})),gt=(i=mt,a=o=function(t){function e(){return G(this,e),W(this,t.apply(this,arguments))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!h()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case _.SCRIPT:case _.NOSCRIPT:return{innerHTML:e};case _.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,n=t.child,r=t.arrayTypeChildren,i=t.newChildProps,o=t.nestedChildren;return q({},r,((e={})[n.type]=[].concat(r[n.type]||[],[q({},i,this.mapNestedChildrenToProps(n,o))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,n,r=t.child,i=t.newProps,o=t.newChildProps,a=t.nestedChildren;switch(r.type){case _.TITLE:return q({},i,((e={})[r.type]=a,e.titleAttributes=q({},o),e));case _.BODY:return q({},i,{bodyAttributes:q({},o)});case _.HTML:return q({},i,{htmlAttributes:q({},o)})}return q({},i,((n={})[r.type]=q({},o),n))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var n=q({},e);return Object.keys(t).forEach((function(e){var r;n=q({},n,((r={})[e]=t[e],r))})),n},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var n=this,r={};return d.a.Children.forEach(t,(function(t){if(t&&t.props){var i=t.props,o=i.children,a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[F[n]||n]=t[n],e}),e)}(H(i,["children"]));switch(n.warnOnInvalidChildren(t,o),t.type){case _.LINK:case _.META:case _.NOSCRIPT:case _.SCRIPT:case _.STYLE:r=n.flattenArrayTypeChildren({child:t,arrayTypeChildren:r,newChildProps:a,nestedChildren:o});break;default:e=n.mapObjectTypeChildren({child:t,newProps:e,newChildProps:a,nestedChildren:o})}}})),e=this.mapArrayTypeChildrenToProps(r,e)},e.prototype.render=function(){var t=this.props,e=t.children,n=H(t,["children"]),r=q({},n);return e&&(r=this.mapChildrenToProps(e,r)),d.a.createElement(i,r)},V(e,null,[{key:"canUseDOM",set:function(t){i.canUseDOM=t}}]),e}(d.a.Component),o.propTypes={base:u.a.object,bodyAttributes:u.a.object,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]),defaultTitle:u.a.string,defer:u.a.bool,encodeSpecialCharacters:u.a.bool,htmlAttributes:u.a.object,link:u.a.arrayOf(u.a.object),meta:u.a.arrayOf(u.a.object),noscript:u.a.arrayOf(u.a.object),onChangeClientState:u.a.func,script:u.a.arrayOf(u.a.object),style:u.a.arrayOf(u.a.object),title:u.a.string,titleAttributes:u.a.object,titleTemplate:u.a.string},o.defaultProps={defer:!0,encodeSpecialCharacters:!0},o.peek=i.peek,o.rewind=function(){var t=i.rewind();return t||(t=dt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},a);gt.renderStatic=gt.rewind}).call(this,n(36))},function(t,e,n){t.exports={BrowseIndex:"BrowseIndex-module__BrowseIndex___2Skoc",BrowseIndexTrayOverview:"BrowseIndex-module__BrowseIndexTrayOverview___276p6"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),i=n.n(r),o=n(381);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},a.apply(this,arguments)}var s=function(t){return function(e){return!e.contains(t)}},u=function(t){var e=t.hidden,n=void 0!==e&&e,u=t.restrictScroll,l=void 0!==u&&u,c=t.children,f=t.trapFocus,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,["hidden","restrictScroll","children","trapFocus"]),p=Object(r.useState)(""),d=p[0],m=p[1],g=Object(r.useRef)(null);return Object(r.useEffect)((function(){var t=setTimeout((function(){var t;!n&&f&&(t=g.current,Object(o.d)().filter(s(t)).forEach(o.i),l&&"hidden"!==d&&(m(document.body.style.overflow),document.body.style.overflow="hidden"))}),0);return function(){var e;e=g.current,Object(o.d)().filter(s(e)).forEach(o.h),l&&(document.body.style.overflow=d),clearTimeout(t)}}),[n,d,l,f]),i.a.createElement("div",a({ref:g,"aria-hidden":n},h),c)}},function(t,e,n){t.exports={LocationBar:"LocationBar-module__LocationBar___2ATk6",title:"LocationBar-module__title___3gUMt"}},function(t,e,n){t.exports={CTA:"CTA-module__CTA___1Dl8I",description:"CTA-module__description___2Mxl7"}},function(t,e,n){t.exports={highlightColor:"var(--color-on-white)"}},function(t,e,n){t.exports={LanguageSelector:"LanguageSelector-module__LanguageSelector___3g6_2",current:"LanguageSelector-module__current___1BaC-"}},function(t,e,n){"use strict";n.r(e),n.d(e,"capitalizeFirstLetter",(function(){return r}));var r=function(t){return"".concat(t.charAt(0).toUpperCase()).concat(t.slice(1))}},function(t,e,n){t.exports={OverlayActions:"OverlayActions-module__OverlayActions___25kbK",shareButtons:"OverlayActions-module__shareButtons___1BTcT",notice:"OverlayActions-module__notice___fYLV3"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(630),s=n(14),u=n(66),l=n.n(u);e.default=Object(o.a)((function(t){var e=t.link,n=t.overlay,r=t.overlayGroup,o=t.name;return i.a.createElement("li",null,i.a.createElement("div",{className:l.a.overlayListItem},"vector"===n.type&&i.a.createElement("span",{className:l.a.overlayColorKey,style:{backgroundColor:n.visualisation_settings.color}}),e&&i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:l.a.overlayTitle},i.a.createElement(s.a,{to:e},o)),i.a.createElement("span",{className:l.a.removeOverlay,onClick:r.toggle})),!e&&i.a.createElement("span",{className:l.a.overlayTitle},o),i.a.createElement(a.a,{disabled:n.disabled,min:0,max:1,step:.05,value:n.value,onChange:function(t){return n.setValue(parseFloat(t.target.value))}}),i.a.createElement("span",{className:l.a.overlayToolButtons},n.layerBounds&&i.a.createElement("span",{className:l.a.overlayToolLocate,onClick:n.focusInMap}),i.a.createElement("span",{className:"".concat(l.a.overlayToolShowHide," ").concat(n.disabled?"is-hidden":""),onClick:n.toggleEnabled}))))}))},function(t,e,n){t.exports={MediaList:"MediaList-module__MediaList___2KToI",video_embed:"MediaList-module__video_embed___1SWV0"}},function(t,e,n){t.exports={FormFieldTaxonomyNested:"FormFieldTaxonomyNested-module__FormFieldTaxonomyNested___3wP4V"}},function(t,e,n){t.exports={SelectedTermListItem:"SelectedTermListItem-module__SelectedTermListItem___2HfNp",theme0:"SelectedTermListItem-module__theme0___37OuH",theme1:"SelectedTermListItem-module__theme1___201d4",theme2:"SelectedTermListItem-module__theme2___2G1Dj",theme3:"SelectedTermListItem-module__theme3___39Y-5",theme5:"SelectedTermListItem-module__theme5___ezOOs"}},function(t,e,n){t.exports={ContributeProjectCollectionsList:"ContributeProjectCollectionsList-module__ContributeProjectCollectionsList___3KQkC"}},function(t,e,n){t.exports={ProjectActions:"ProjectActions-module__ProjectActions___2f6Uh",shareButtons:"ProjectActions-module__shareButtons___1U60g",notice:"ProjectActions-module__notice___1f88S"}},function(t,e,n){t.exports={UserProjects:"UserProjects-module__UserProjects____7rV7"}},function(t,e,n){t.exports={highlightColor:"var(--placemaker-highlight-color)"}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(378),o=n(220),a=n(45),s=["feature_layer_id","square_id"],u=["feature_layer_id","square_id"];function l(){l=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function c(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}var f=r.types.model("FeatureLayer",{id:r.types.identifierNumber,name:r.types.string,description:r.types.maybeNull(r.types.string),features:r.types.array(i.default,[]),nearbyFeatures:r.types.array(i.default,[]),selectedFeatures:r.types.array(r.types.reference(i.default),[]),annotation_field_data:r.types.array(i.FeatureLayerAnnotationField,[]),activeFeature:r.types.maybeNull(r.types.reference(i.default)),highlightedFeature:r.types.maybeNull(r.types.reference(i.default))}).volatile((function(t){return{opacity:.75,enabled:!0,hasRequiredFields:!1}})).actions((function(t){return{afterCreate:function(){t.hasRequiredFields=t.annotation_field_data.some((function(t){return t.required}))},setActiveFeature:function(e){t.activeFeature=e,t.activeFeature&&t.activeFeature.setupAnnotationData()},setHighlightedFeature:function(e){t.highlightedFeature=e},setOpacity:function(e){t.opacity=e},resetSelection:function(){var e=this;t.selectedFeatures.map((function(t){return e.toggleSelectedFeature(t.id)}))},checkAnnotationData:function(e){var n=t.selectedFeatures[0].annotation_data.toJSON(),i=t.selectedFeatures[1].annotation_data.toJSON();0===n.length&&0===i.length||n.length>0&&0===i.length?e("first"):0===n.length&&i.length>0?e("second"):Object(r.getRoot)(t).raiseConflict([t.selectedFeatures[0].id,t.selectedFeatures[1].id],e)},performUnionOperation:function(e){var n=Object(a.polygon)(t.selectedFeatures[0].geometry.coordinates),i=Object(a.polygon)(t.selectedFeatures[1].geometry.coordinates),u=Object(a.union)(n,i);if("MultiPolygon"!=u.geometry.type)if(e){var l="first"===e?0:1,f=t.selectedFeatures[l].annotation_data.toJSON();t.deleteSelectedFeatures();var h={type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:u.geometry.coordinates}},p=Object(r.getParent)(t,2);Object(o.createFeatureMutation)({geometry:h.geometry,properties:h.properties,square_id:p.currentGridSquare.id,feature_layer_id:p.currentFeatureLayer.id,annotation_data:f,embed_metadata:[Object(r.getRoot)(t).embedMetadata]||!1}).then((function(e){var n=e.insert,r=(n.feature_layer_id,n.square_id,c(n,s));t.addFeature(r)}))}else t.checkAnnotationData(t.performUnionOperation)},performSubtractOperation:function(){var e=Object(a.polygon)(t.selectedFeatures[0].geometry.coordinates),n=Object(a.polygon)(t.selectedFeatures[1].geometry.coordinates),i=Object(a.difference)(e,n);if(null===i){var s=t.selectedFeatures[0];t.deleteFeatures({ids:[s.id]}),t.toggleSelectedFeature(s.id),t.removeFeatureFromStore(s)}else if("Polygon"===i.geometry.type)t.selectedFeatures[0].setGeometry(i);else if("MultiPolygon"===i.geometry.type){var l=Object(a.flatten)(i),f=t.selectedFeatures[0],h=f.annotation_data;t.deleteFeatures({ids:[f.id]}),t.toggleSelectedFeature(f.id),t.removeFeatureFromStore(f),l.features.forEach((function(e){var n={type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:e.geometry.coordinates}},i=Object(r.getParent)(t,2);Object(o.createFeatureMutation)({geometry:n.geometry,properties:n.properties,square_id:i.currentGridSquare.id,feature_layer_id:i.currentFeatureLayer.id,annotation_data:h,embed_metadata:[Object(r.getRoot)(t).embedMetadata]||!1}).then((function(e){var n=e.insert,r=(n.feature_layer_id,n.square_id,c(n,u));t.addFeature(r),t.toggleSelectedFeature(r.id)}))}))}},deselectAll:function(){t.selectedFeatures.map((function(e){return t.toggleSelectedFeature(e.id)}))},toggleSelectedFeature:function(e){var n=t.selectedFeatures.find((function(t){return t.id===e}));n&&n.modified&&n.updateGeometry();var r=t.selectedFeatures.map((function(t){return t.id}));r.indexOf(e)>=0?r=r.filter((function(t){return t!==e})):r.push(e),t.selectedFeatures=r},addFeature:function(e){var n=t.features.slice();n.push(e),t.features=n},addFeatures:function(e){var n=t.features.slice();e.map((function(t){return n.push(t)})),t.features=n},setFeatures:function(e){t.features=e},setNearbyFeatures:function(e){t.nearbyFeatures=e},removeFeatureFromStore:function(t){Object(r.destroy)(t)},deleteSelectedFeatures:function(){var e=t.selectedFeatures.map((function(t){return t.id}));t.deleteFeatures({ids:e}),t.selectedFeatures.map((function(e){t.toggleSelectedFeature(e.id),t.removeFeatureFromStore(e)}))},deleteFeatures:Object(r.flow)(l().mark((function t(e){var n;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.ids,t.next=3,Object(o.destroyFeaturesMutation)({ids:n});case 3:t.sent;case 4:case"end":return t.stop()}}),t)}))),showFeaturesForUser:function(e){t.features.forEach((function(t){var n=t.embed_metadata.some((function(t){return(null===t||void 0===t?void 0:t.userid)===e}));t.setIsHighlightedForUser(!!n)}))}}})).views((function(t){return{get toGeoJSON(){return{type:"FeatureCollection",features:t.featuresWithoutSelected.map((function(t){return t.toJSON()}))}},get toCentrePointGeoJSON(){return{type:"FeatureCollection",features:t.features.filter((function(t){return t.needsAttention&&"Polygon"===t.geometry.type})).map((function(t){return t.toCentrePointGeoJSON}))}},get nearbyFeaturestoGeoJSON(){return{type:"FeatureCollection",features:t.nearbyFeatures.map((function(t){return t.toJSON()}))}},get featuresWithoutSelected(){return t.features.filter((function(e){return t.selectedFeatures.indexOf(e)<0}))},get selectedFeaturesCuttable(){return 2===t.selectedFeatures.length&&Object(a.intersect)(t.selectedFeatures[0].toGeoJSON,t.selectedFeatures[1].toGeoJSON)},get selectedFeaturesCombinable(){return 2===t.selectedFeatures.length&&Object(a.booleanIntersects)(t.selectedFeatures[0].toGeoJSON,t.selectedFeatures[1].toGeoJSON)}}}));e.default=f},function(t,e,n){t.exports={Home:"Home-module__Home___1sVXF",adminModeFlag:"Home-module__adminModeFlag___2rU5E"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(49),a=n(7);e.default=Object(a.a)((function(t){return i.a.createElement(o.g,{longitude:t.longitude,latitude:t.latitude,closeButton:!0,closeOnClick:!1,onClose:t.onClose,style:{zIndex:9999},captureScroll:!0,captureClick:!0,captureDrag:!0,captureDoubleClick:!0},t.children)}))},function(t,e,n){t.exports={spinnerColor:"var(--placemaker-highlight-color)",LoadingSpinner:"LoadingSpinner-module__LoadingSpinner___3p5zY"}},function(t,e,n){t.exports={FeatureAnnotationDataRow:"FeatureAnnotationDataRow-module__FeatureAnnotationDataRow___3lYE-",noData:"FeatureAnnotationDataRow-module__noData___51Fi0"}},function(t,e,n){t.exports={Toolbar:"Toolbar-module__Toolbar___3pGTj",primaryToolsWrap:"Toolbar-module__primaryToolsWrap___2nC6q"}},function(t,e,n){t.exports={LayersContainer:"ReferenceLayersContainer-module__LayersContainer___3CJ7H",layers:"ReferenceLayersContainer-module__layers___1A8KB"}},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=n(86).h,l=n(91).Plugin,c=n(256),f=n(1466),h=n(362),p=n(1483),d=n(1484),m=n(1490),g=n(257),y=n(645),v=n(644),b=n(1491),_=n(518),A=n(332).default||n(332),w=n(1492),x=n(52).default||n(52),E=n(941);function O(){var t={};return t.promise=new Promise((function(e,n){t.resolve=e,t.reject=n})),t}function S(){return u("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},u("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).setOptions=function(e){t.prototype.setOptions.call(a(r),e),r.i18nInit()},r.i18nInit=function(){r.translator=new c([r.defaultLocale,r.uppy.locale,r.opts.locale]),r.i18n=r.translator.translate.bind(r.translator),r.i18nArray=r.translator.translateArray.bind(r.translator),r.setPluginState()},r.removeTarget=function(t){var e=r.getPluginState().targets.filter((function(e){return e.id!==t.id}));r.setPluginState({targets:e})},r.addTarget=function(t){var e=t.id||t.constructor.name,n=t.title||e,i=t.type;if("acquirer"===i||"progressindicator"===i||"editor"===i){var o={id:e,name:n,type:i},a=r.getPluginState().targets.slice();return a.push(o),r.setPluginState({targets:a}),r.el}r.uppy.log("Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor","error")},r.hideAllPanels=function(){var t={activePickerPanel:!1,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1},e=r.getPluginState();e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||r.setPluginState(t)},r.showPanel=function(t){var e=r.getPluginState().targets.filter((function(e){return"acquirer"===e.type&&e.id===t}))[0];r.setPluginState({activePickerPanel:e,activeOverlayType:"PickerPanel"})},r.canEditFile=function(t){var e=r.getPluginState().targets;return r._getEditors(e).some((function(e){return r.uppy.getPlugin(e.id).canEditFile(t)}))},r.openFileEditor=function(t){var e=r.getPluginState().targets,n=r._getEditors(e);r.setPluginState({showFileEditor:!0,fileCardFor:t.id||null,activeOverlayType:"FileEditor"}),n.forEach((function(e){r.uppy.getPlugin(e.id).selectFile(t)}))},r.openModal=function(){var t=O(),e=t.promise,n=t.resolve;if(r.savedScrollPosition=window.pageYOffset,r.savedActiveElement=document.activeElement,r.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),r.opts.animateOpenClose&&r.getPluginState().isClosing){r.el.addEventListener("animationend",(function t(){r.setPluginState({isHidden:!1}),r.el.removeEventListener("animationend",t,!1),n()}),!1)}else r.setPluginState({isHidden:!1}),n();return r.opts.browserBackButtonClose&&r.updateBrowserHistory(),document.addEventListener("keydown",r.handleKeyDownInModal),r.uppy.emit("dashboard:modal-open"),e},r.closeModal=function(t){void 0===t&&(t={});var e=t.manualClose,n=void 0===e||e,i=r.getPluginState(),o=i.isHidden,a=i.isClosing;if(!o&&!a){var s=O(),u=s.promise,l=s.resolve;if(r.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),r.opts.animateOpenClose){r.setPluginState({isClosing:!0});r.el.addEventListener("animationend",(function t(){r.setPluginState({isHidden:!0,isClosing:!1}),r.superFocus.cancel(),r.savedActiveElement.focus(),r.el.removeEventListener("animationend",t,!1),l()}),!1)}else r.setPluginState({isHidden:!0}),r.superFocus.cancel(),r.savedActiveElement.focus(),l();return document.removeEventListener("keydown",r.handleKeyDownInModal),n&&r.opts.browserBackButtonClose&&history.state&&history.state[r.modalName]&&history.go(-1),r.uppy.emit("dashboard:modal-closed"),u}},r.isModalOpen=function(){return!r.getPluginState().isHidden||!1},r.requestCloseModal=function(){return r.opts.onRequestCloseModal?r.opts.onRequestCloseModal():r.closeModal()},r.setDarkModeCapability=function(t){var e=r.uppy.getState().capabilities;r.uppy.setState({capabilities:o({},e,{darkMode:t})})},r.handleSystemDarkModeChange=function(t){var e=t.matches;r.uppy.log("[Dashboard] Dark mode is "+(e?"on":"off")),r.setDarkModeCapability(e)},r.toggleFileCard=function(t,e){var n=r.uppy.getFile(e);t?r.uppy.emit("dashboard:file-edit-start",n):r.uppy.emit("dashboard:file-edit-complete",n),r.setPluginState({fileCardFor:t?e:null,activeOverlayType:t?"FileCard":null})},r.toggleAddFilesPanel=function(t){r.setPluginState({showAddFilesPanel:t,activeOverlayType:t?"AddFiles":null})},r.addFiles=function(t){var e=t.map((function(t){return{source:r.id,name:t.name,type:t.type,data:t,meta:{relativePath:t.relativePath||null}}}));try{r.uppy.addFiles(e)}catch(n){r.uppy.log(n)}},r.startListeningToResize=function(){r.resizeObserver=new A((function(t,e){var n=t[0].contentRect,i=n.width,o=n.height;r.uppy.log("[Dashboard] resized: "+i+" / "+o,"debug"),r.setPluginState({containerWidth:i,containerHeight:o,areInsidesReadyToBeVisible:!0})})),r.resizeObserver.observe(r.el.querySelector(".uppy-Dashboard-inner")),r.makeDashboardInsidesVisibleAnywayTimeout=setTimeout((function(){var t=r.getPluginState(),e=!r.opts.inline&&t.isHidden;t.areInsidesReadyToBeVisible||e||(r.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout","debug"),r.setPluginState({areInsidesReadyToBeVisible:!0}))}),1e3)},r.stopListeningToResize=function(){r.resizeObserver.disconnect(),clearTimeout(r.makeDashboardInsidesVisibleAnywayTimeout)},r.recordIfFocusedOnUppyRecently=function(t){r.el.contains(t.target)?r.ifFocusedOnUppyRecently=!0:(r.ifFocusedOnUppyRecently=!1,r.superFocus.cancel())},r.disableAllFocusableElements=function(t){var e=g(r.el.querySelectorAll(E));t?e.forEach((function(t){var e=t.getAttribute("tabindex");e&&(t.dataset.inertTabindex=e),t.setAttribute("tabindex","-1")})):e.forEach((function(t){"inertTabindex"in t.dataset?t.setAttribute("tabindex",t.dataset.inertTabindex):t.removeAttribute("tabindex")})),r.dashboardIsDisabled=t},r.updateBrowserHistory=function(){var t;history.state&&history.state[r.modalName]||history.pushState(o({},history.state,((t={})[r.modalName]=!0,t)),"");window.addEventListener("popstate",r.handlePopState,!1)},r.handlePopState=function(t){!r.isModalOpen()||t.state&&t.state[r.modalName]||r.closeModal({manualClose:!1}),!r.isModalOpen()&&t.state&&t.state[r.modalName]&&history.go(-1)},r.handleKeyDownInModal=function(t){27===t.keyCode&&r.requestCloseModal(t),9===t.keyCode&&b.forModal(t,r.getPluginState().activeOverlayType,r.el)},r.handleClickOutside=function(){r.opts.closeModalOnClickOutside&&r.requestCloseModal()},r.handlePaste=function(t){r.uppy.iteratePlugins((function(e){"acquirer"===e.type&&e.handleRootPaste&&e.handleRootPaste(t)}));var e=g(t.clipboardData.files);r.addFiles(e)},r.handleInputChange=function(t){t.preventDefault();var e=g(t.target.files);r.addFiles(e)},r.handleDragOver=function(t){t.preventDefault(),t.stopPropagation(),r.opts.disabled||(t.dataTransfer.dropEffect="copy",clearTimeout(r.removeDragOverClassTimeout),r.setPluginState({isDraggingOver:!0}))},r.handleDragLeave=function(t){t.preventDefault(),t.stopPropagation(),r.opts.disabled||(clearTimeout(r.removeDragOverClassTimeout),r.removeDragOverClassTimeout=setTimeout((function(){r.setPluginState({isDraggingOver:!1})}),50))},r.handleDrop=function(t,e){if(t.preventDefault(),t.stopPropagation(),!r.opts.disabled){clearTimeout(r.removeDragOverClassTimeout),r.setPluginState({isDraggingOver:!1}),r.uppy.iteratePlugins((function(e){"acquirer"===e.type&&e.handleRootDrop&&e.handleRootDrop(t)}));var n=!1;y(t.dataTransfer,{logDropError:function(t){r.uppy.log(t,"error"),n||(r.uppy.info(t.message,"error"),n=!0)}}).then((function(t){t.length>0&&(r.uppy.log("[Dashboard] Files were dropped"),r.addFiles(t))}))}},r.handleRequestThumbnail=function(t){r.opts.waitForThumbnailsBeforeUpload||r.uppy.emit("thumbnail:request",t)},r.handleCancelThumbnail=function(t){r.opts.waitForThumbnailsBeforeUpload||r.uppy.emit("thumbnail:cancel",t)},r.handleKeyDownInInline=function(t){9===t.keyCode&&b.forInline(t,r.getPluginState().activeOverlayType,r.el)},r.handlePasteOnBody=function(t){r.el.contains(document.activeElement)&&r.handlePaste(t)},r.handleComplete=function(t){var e=t.failed;r.opts.closeAfterFinish&&0===e.length&&r.requestCloseModal()},r._openFileEditorWhenFilesAdded=function(t){var e=t[0];r.canEditFile(e)&&r.openFileEditor(e)},r.initEvents=function(){if(r.opts.trigger&&!r.opts.inline){var t=m(r.opts.trigger);t?t.forEach((function(t){return t.addEventListener("click",r.openModal)})):r.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}r.startListeningToResize(),document.addEventListener("paste",r.handlePasteOnBody),r.uppy.on("plugin-remove",r.removeTarget),r.uppy.on("file-added",r.hideAllPanels),r.uppy.on("dashboard:modal-closed",r.hideAllPanels),r.uppy.on("file-editor:complete",r.hideAllPanels),r.uppy.on("complete",r.handleComplete),document.addEventListener("focus",r.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",r.recordIfFocusedOnUppyRecently,!0),r.opts.inline&&r.el.addEventListener("keydown",r.handleKeyDownInInline),r.opts.autoOpenFileEditor&&r.uppy.on("files-added",r._openFileEditorWhenFilesAdded)},r.removeEvents=function(){var t=m(r.opts.trigger);!r.opts.inline&&t&&t.forEach((function(t){return t.removeEventListener("click",r.openModal)})),r.stopListeningToResize(),document.removeEventListener("paste",r.handlePasteOnBody),window.removeEventListener("popstate",r.handlePopState,!1),r.uppy.off("plugin-remove",r.removeTarget),r.uppy.off("file-added",r.hideAllPanels),r.uppy.off("dashboard:modal-closed",r.hideAllPanels),r.uppy.off("complete",r.handleComplete),document.removeEventListener("focus",r.recordIfFocusedOnUppyRecently),document.removeEventListener("click",r.recordIfFocusedOnUppyRecently),r.opts.inline&&r.el.removeEventListener("keydown",r.handleKeyDownInInline),r.opts.autoOpenFileEditor&&r.uppy.off("files-added",r._openFileEditorWhenFilesAdded)},r.superFocusOnEachUpdate=function(){var t=r.el.contains(document.activeElement),e=document.activeElement===document.body||null===document.activeElement,n=r.uppy.getState().info.isHidden,i=!r.opts.inline;n&&(i||t||e&&r.ifFocusedOnUppyRecently)?r.superFocus(r.el,r.getPluginState().activeOverlayType):r.superFocus.cancel()},r.afterUpdate=function(){!r.opts.disabled||r.dashboardIsDisabled?(!r.opts.disabled&&r.dashboardIsDisabled&&r.disableAllFocusableElements(!1),r.superFocusOnEachUpdate()):r.disableAllFocusableElements(!0)},r.cancelUpload=function(t){r.uppy.removeFile(t)},r.saveFileCard=function(t,e){r.uppy.setFileMeta(e,t),r.toggleFileCard(!1,e)},r._attachRenderFunctionToTarget=function(t){var e=r.uppy.getPlugin(t.id);return o({},t,{icon:e.icon||r.opts.defaultPickerIcon,render:e.render})},r._isTargetSupported=function(t){var e=r.uppy.getPlugin(t.id);return"function"!==typeof e.isSupported||e.isSupported()},r._getAcquirers=x((function(t){return t.filter((function(t){return"acquirer"===t.type&&r._isTargetSupported(t)})).map(r._attachRenderFunctionToTarget)})),r._getProgressIndicators=x((function(t){return t.filter((function(t){return"progressindicator"===t.type})).map(r._attachRenderFunctionToTarget)})),r._getEditors=x((function(t){return t.filter((function(t){return"editor"===t.type})).map(r._attachRenderFunctionToTarget)})),r.render=function(t){var e,n=r.getPluginState(),i=t.files,o=t.capabilities,a=t.allowNewUpload,s=Object.keys(i).filter((function(t){return!i[t].progress.uploadStarted})),u=Object.keys(i).filter((function(t){return i[t].progress.uploadStarted})),l=Object.keys(i).filter((function(t){return i[t].isPaused})),c=Object.keys(i).filter((function(t){return i[t].progress.uploadComplete})),h=Object.keys(i).filter((function(t){return i[t].error})),p=Object.keys(i).filter((function(t){return!i[t].progress.uploadComplete&&i[t].progress.uploadStarted})),d=p.filter((function(t){return!i[t].isPaused})),m=Object.keys(i).filter((function(t){return i[t].progress.preprocess||i[t].progress.postprocess})),g=u.length>0,y=100===t.totalProgress&&c.length===Object.keys(i).length&&0===m.length,v=g&&h.length===u.length,b=0!==p.length&&l.length===p.length,_=r._getAcquirers(n.targets),A=r._getProgressIndicators(n.targets),w=r._getEditors(n.targets);return e="auto"===r.opts.theme?o.darkMode?"dark":"light":r.opts.theme,["files","folders","both"].indexOf(r.opts.fileManagerSelectionType)<0&&(r.opts.fileManagerSelectionType="files",console.error('Unsupported option for "fileManagerSelectionType". Using default of "'+r.opts.fileManagerSelectionType+'".')),f({state:t,isHidden:n.isHidden,files:i,newFiles:s,uploadStartedFiles:u,completeFiles:c,erroredFiles:h,inProgressFiles:p,inProgressNotPausedFiles:d,processingFiles:m,isUploadStarted:g,isAllComplete:y,isAllErrored:v,isAllPaused:b,totalFileCount:Object.keys(i).length,totalProgress:t.totalProgress,allowNewUpload:a,acquirers:_,theme:e,disabled:r.opts.disabled,direction:r.opts.direction,activePickerPanel:n.activePickerPanel,showFileEditor:n.showFileEditor,disableAllFocusableElements:r.disableAllFocusableElements,animateOpenClose:r.opts.animateOpenClose,isClosing:n.isClosing,getPlugin:r.uppy.getPlugin,progressindicators:A,editors:w,autoProceed:r.uppy.opts.autoProceed,id:r.id,closeModal:r.requestCloseModal,handleClickOutside:r.handleClickOutside,handleInputChange:r.handleInputChange,handlePaste:r.handlePaste,inline:r.opts.inline,showPanel:r.showPanel,hideAllPanels:r.hideAllPanels,log:r.uppy.log,i18n:r.i18n,i18nArray:r.i18nArray,removeFile:r.uppy.removeFile,uppy:r.uppy,info:r.uppy.info,note:r.opts.note,metaFields:n.metaFields,resumableUploads:o.resumableUploads||!1,individualCancellation:o.individualCancellation,isMobileDevice:o.isMobileDevice,pauseUpload:r.uppy.pauseResume,retryUpload:r.uppy.retryUpload,cancelUpload:r.cancelUpload,cancelAll:r.uppy.cancelAll,fileCardFor:n.fileCardFor,toggleFileCard:r.toggleFileCard,toggleAddFilesPanel:r.toggleAddFilesPanel,showAddFilesPanel:n.showAddFilesPanel,saveFileCard:r.saveFileCard,openFileEditor:r.openFileEditor,canEditFile:r.canEditFile,width:r.opts.width,height:r.opts.height,showLinkToFileUploadResult:r.opts.showLinkToFileUploadResult,fileManagerSelectionType:r.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:r.opts.proudlyDisplayPoweredByUppy,hideCancelButton:r.opts.hideCancelButton,hideRetryButton:r.opts.hideRetryButton,hidePauseResumeButton:r.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:r.opts.showRemoveButtonAfterComplete,containerWidth:n.containerWidth,containerHeight:n.containerHeight,areInsidesReadyToBeVisible:n.areInsidesReadyToBeVisible,isTargetDOMEl:r.isTargetDOMEl,parentElement:r.el,allowedFileTypes:r.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:r.uppy.opts.restrictions.maxNumberOfFiles,showSelectedFiles:r.opts.showSelectedFiles,handleRequestThumbnail:r.handleRequestThumbnail,handleCancelThumbnail:r.handleCancelThumbnail,isDraggingOver:n.isDraggingOver,handleDragOver:r.handleDragOver,handleDragLeave:r.handleDragLeave,handleDrop:r.handleDrop})},r.discoverProviderPlugins=function(){r.uppy.iteratePlugins((function(t){t&&!t.target&&t.opts&&t.opts.target===r.constructor&&r.addTarget(t)}))},r.install=function(){r.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:!1,showFileEditor:!1,metaFields:r.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});var t=r.opts,e=t.inline,n=t.closeAfterFinish;if(e&&n)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");r.uppy.opts.allowMultipleUploads&&n&&r.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploads` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");var i=r.opts.target;i&&r.mount(i,a(r)),(r.opts.plugins||[]).forEach((function(t){var e=r.uppy.getPlugin(t);e&&e.mount(a(r),e)})),r.opts.disableStatusBar||r.uppy.use(h,{id:r.id+":StatusBar",target:a(r),hideUploadButton:r.opts.hideUploadButton,hideRetryButton:r.opts.hideRetryButton,hidePauseResumeButton:r.opts.hidePauseResumeButton,hideCancelButton:r.opts.hideCancelButton,showProgressDetails:r.opts.showProgressDetails,hideAfterFinish:r.opts.hideProgressAfterFinish,locale:r.opts.locale,doneButtonHandler:r.opts.doneButtonHandler}),r.opts.disableInformer||r.uppy.use(p,{id:r.id+":Informer",target:a(r)}),r.opts.disableThumbnailGenerator||r.uppy.use(d,{id:r.id+":ThumbnailGenerator",thumbnailWidth:r.opts.thumbnailWidth,thumbnailType:r.opts.thumbnailType,waitForThumbnailsBeforeUpload:r.opts.waitForThumbnailsBeforeUpload,lazy:!r.opts.waitForThumbnailsBeforeUpload}),r.darkModeMediaQuery="undefined"!==typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;var o=!!r.darkModeMediaQuery&&r.darkModeMediaQuery.matches;r.uppy.log("[Dashboard] Dark mode is "+(o?"on":"off")),r.setDarkModeCapability(o),"auto"===r.opts.theme&&r.darkModeMediaQuery.addListener(r.handleSystemDarkModeChange),r.discoverProviderPlugins(),r.initEvents()},r.uninstall=function(){if(!r.opts.disableInformer){var t=r.uppy.getPlugin(r.id+":Informer");t&&r.uppy.removePlugin(t)}if(!r.opts.disableStatusBar){var e=r.uppy.getPlugin(r.id+":StatusBar");e&&r.uppy.removePlugin(e)}if(!r.opts.disableThumbnailGenerator){var n=r.uppy.getPlugin(r.id+":ThumbnailGenerator");n&&r.uppy.removePlugin(n)}(r.opts.plugins||[]).forEach((function(t){var e=r.uppy.getPlugin(t);e&&e.unmount()})),"auto"===r.opts.theme&&r.darkModeMediaQuery.removeListener(r.handleSystemDarkModeChange),r.unmount(),r.removeEvents()},r.id=r.opts.id||"Dashboard",r.title="Dashboard",r.type="orchestrator",r.modalName="uppy-Dashboard-"+_(),r.defaultLocale={strings:{closeModal:"Close Modal",importFrom:"Import from %{name}",addingMoreFiles:"Adding more files",addMoreFiles:"Add more files",dashboardWindowTitle:"File Uploader Window (Press escape to close)",dashboardTitle:"File Uploader",copyLinkToClipboardSuccess:"Link copied to clipboard",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",fileSource:"File source: %{name}",done:"Done",back:"Back",addMore:"Add more",removeFile:"Remove file",editFile:"Edit file",editing:"Editing %{file}",finishEditingFile:"Finish editing file",saveChanges:"Save changes",cancel:"Cancel",myDevice:"My Device",dropPasteFiles:"Drop files here, paste or %{browseFiles}",dropPasteFolders:"Drop files here, paste or %{browseFolders}",dropPasteBoth:"Drop files here, paste, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, paste, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, paste, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, paste, %{browseFiles}, %{browseFolders} or import from:",dropHint:"Drop your files here",browseFiles:"browse files",browseFolders:"browse folders",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy2:"%{backwardsCompat} %{uppy}",poweredBy:"Powered by"}};var i={target:"body",metaFields:[],trigger:"#uppy-select-files",inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:S,showLinkToFileUploadResult:!0,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,doneButtonHandler:function(){r.uppy.reset(),r.requestCloseModal()},note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,onRequestCloseModal:function(){return r.closeModal()},showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1};return r.opts=o({},i,n),r.i18nInit(),r.superFocus=w(),r.ifFocusedOnUppyRecently=!1,r.makeDashboardInsidesVisibleAnywayTimeout=null,r.removeDragOverClassTimeout=null,r}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n),r.prototype.onMount=function(){var t=this.el;v(t)||(t.dir="ltr")},r}(l),r.VERSION="1.18.0",i)},function(t,e,n){const{Plugin:r}=n(91),i=n(518),{Provider:o,Socket:a}=(n(1493),n(1494)),s=(n(1497),n(1498),n(1499)),u=n(1500),{DirectUpload:l}=n(1501);t.exports=class extends r{constructor(t,e){super(t,e),this.id=e.id||"ActiveStorageUpload",this.title=e.title||"ActiveStorageUpload",this.type="uploader";this.opts=Object.assign({},{limit:0,timeout:3e4,directUploadUrl:null},e),"number"===typeof this.opts.limit&&0!==this.opts.limit?this.limitUploads=u(this.opts.limit):this.limitUploads=t=>t,this.handleUpload=this.handleUpload.bind(this)}install(){this.uppy.addUploader(this.handleUpload)}uninstall(){this.uppy.removeUploader(this.handleUpload)}handleUpload(t){if(0===t.length)return this.uppy.log("[ActiveStorage] No files to upload!"),Promise.resolve();this.uppy.log("[ActiveStorage] Uploading...");const e=t.map((t=>this.uppy.getFile(t)));return this.uploadFiles(e).then((()=>null))}upload(t,e,n){return this.uppy.log(`uploading ${e} of ${n}`),new Promise(((e,n)=>{const r=this.createProgressTimeout(this.opts.timeout,(e=>{xhr.abort(),this.uppy.emit("upload-error",t,e),n(e)}));var o={directUploadWillStoreFileWithXHR:null,directUploadDidProgress:null};o.directUploadDidProgress=e=>{this.uppy.log(`[XHRUpload] ${s} progress: ${e.loaded} / ${e.total}`),r.progress(),e.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:e.loaded,bytesTotal:e.total})},o.directUploadWillStoreFileWithXHR=t=>{t.upload.addEventListener("progress",(t=>o.directUploadDidProgress(t)))};const a=new l(t.data,this.opts.directUploadUrl,o),s=i();a.create(((i,o)=>{if(this.uppy.log(`[XHRUpload] ${s} finished`),r.done(),i){const e={status:"error"};return this.uppy.setFileState(t.id,{response:e}),this.uppy.emit("upload-error",t,i),n(i)}{const n={status:"success",directUploadSignedId:o.signed_id};return this.uppy.setFileState(t.id,{response:n}),this.uppy.emit("upload-success",t,o),e(t)}})),this.uppy.on("file-removed",(e=>{e.id===t.id&&(r.done(),a.abort())})),this.uppy.on("upload-cancel",(e=>{e===t.id&&(r.done(),a.abort())})),this.uppy.on("cancel-all",(()=>{r.done(),a.abort()}))}))}uploadFiles(t){const e=t.map(((e,n)=>{const r=parseInt(n,10)+1,i=t.length;return e.error?()=>Promise.reject(new Error(e.error)):(this.uppy.emit("upload-started",e),this.upload.bind(this,e,r,i))})).map((t=>this.limitUploads(t)()));return s(e)}createProgressTimeout(t,e){const n=this.uppy,r=this;let i=!1;function o(){n.log("[XHRUpload] timed out");const i=new Error(r.i18n("timedOut",{seconds:Math.ceil(t/1e3)}));e(i)}let a=null;return{progress:function(){i||t>0&&(a&&clearTimeout(a),a=setTimeout(o,t))},done:function(){n.log("[XHRUpload] timer done"),a&&(clearTimeout(a),a=null),i=!0}}}}},function(t,e,n){t.exports=n.p+"media/images/tweak-waypoints-79e44f0afc404ba8a7f3688b74a8ecec.svg"},function(t,e,n){t.exports={FeatureDemo:"FeatureDemo-module__FeatureDemo___1Vyel",feature:"FeatureDemo-module__feature___1EPQ1",image:"FeatureDemo-module__image___3Muff",icon:"FeatureDemo-module__icon___3LUtu",textContent:"FeatureDemo-module__textContent___2mHti",description:"FeatureDemo-module__description___2dTar"}},function(t,e,n){"use strict";var r=n(1165),i=n(708);function o(t){i.call(this,t)}o.prototype=Object.create(i.prototype),o.prototype.constructor=o,o.prototype.sendRequest=r.browserSend,o.prototype.abortRequest=r.browserAbort,t.exports=function(t){return new o(t)}},function(t,e,n){"use strict";var r=n(709),i=n(1171),o=n(421);function a(t){if(!t||!t.accessToken)throw new Error("Cannot create a client without an access token");r(t.accessToken),this.accessToken=t.accessToken,this.origin=t.origin||o.API_ORIGIN}a.prototype.createRequest=function(t){return new i(this,t)},t.exports=a},function(t,e,n){"use strict";var r=n(1170),i={};function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t){if(i[t])return i[t];var e=t.split("."),n=e[0],a=e[1];if(!a)throw new Error("Invalid token");var s=function(t){try{return JSON.parse(r.decode(t))}catch(e){throw new Error("Invalid token")}}(a),u={usage:n,user:s.u};return o(s,"a")&&(u.authorization=s.a),o(s,"exp")&&(u.expires=1e3*s.exp),o(s,"iat")&&(u.created=1e3*s.iat),o(s,"scopes")&&(u.scopes=s.scopes),o(s,"client")&&(u.client=s.client),o(s,"ll")&&(u.lastLogin=s.ll),o(s,"iu")&&(u.impersonator=s.iu),i[t]=u,u}},function(module,exports){var topLevel="undefined"===typeof window?this:window;module.exports=function(className){var constructor;return constructor=topLevel[className],constructor||(constructor=eval(className)),constructor&&constructor.default&&(constructor=constructor.default),constructor}},function(t,e,n){"use strict";var r=n(489);t.exports=function t(e,n,i){var o;void 0===n&&(n=""),void 0===i&&(i=r);var a=new Map;function s(t,e){var n=a.get(e);n?n.push.apply(n,t):a.set(e,t)}if(i(e))o=null,s([n],e);else{var u=n?n+".":"";if("undefined"!==typeof FileList&&e instanceof FileList)o=Array.prototype.map.call(e,(function(t,e){return s([""+u+e],t),null}));else if(Array.isArray(e))o=e.map((function(e,n){var r=t(e,""+u+n,i);return r.files.forEach(s),r.clone}));else if(e&&e.constructor===Object)for(var l in o={},e){var c=t(e[l],""+u+l,i);c.files.forEach(s),o[l]=c.clone}else o=e}return{clone:o,files:a}}},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=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])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ClientError=void 0;var o=function(t){function e(n,r){var i=this,o=e.extractMessage(n)+": "+JSON.stringify({response:n,request:r});return i=t.call(this,o)||this,Object.setPrototypeOf(i,e.prototype),i.response=n,i.request=r,"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(i,e),i}return i(e,t),e.extractMessage=function(t){try{return t.errors[0].message}catch(e){return"GraphQL Error (Code: "+t.status+")"}},e}(Error);e.ClientError=o},function(t,e){var n={utf8:{stringToBytes:function(t){return n.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(n.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=n},function(t,e,n){"use strict";e.__esModule=!0,e.getHoverIndicatorStyle=e.selectedStyle=e.activeStyle=e.backgroundStyle=e.backgroundAndTextColors=e.backgroundIsDark=e.normalizeBackground=void 0;var r=n(4),i=n(423),o=function(t,e){var n=t;return t&&(e.dark&&t.dark&&"boolean"!==typeof t.dark?n=t.dark:!e.dark&&t.light&&"boolean"!==typeof t.light&&(n=t.light),n=function(t,e){return t&&Array.isArray(t)&&"function"===typeof t[0]?t[0]({theme:e}):t}(n,e)),n};e.normalizeBackground=o;e.backgroundIsDark=function(t,e){var n,r=o(t,e);if(r)if("object"===typeof r){var a=r.color,s=r.dark,u=r.opacity;if("boolean"===typeof s)n=s;else if(a&&(!u||"weak"!==u)){var l=(0,i.normalizeColor)(r.color,e);l&&(n=(0,i.colorIsDark)(l))}}else{var c=(0,i.normalizeColor)(r,e);c&&(n=(0,i.colorIsDark)(c))}return n};var a=function(t){var e=(0,i.colorIsDark)(t);if(void 0!==e)return e?"dark":"light"},s=function(t,e,n){if(!t)return[void 0,e];var r,s,u=n.global,l=o(t,n),c=e||u.colors.text;if("object"===typeof l){if(!1===l.dark?s=c.light||c:l.dark&&(s=c.dark||c),l.color){var f=(0,i.normalizeColor)(l.color,n,l.dark),h=!0===l.opacity?u.opacity.medium:u.opacity[l.opacity]||l.opacity;if(r=(0,i.getRGBA)(f,h)||f,!s&&(void 0===h||h>.3)){var p=a(r);s=(0,i.normalizeColor)(p&&c[p]||c,n)}}}else{r=(0,i.normalizeColor)(l,n);var d=a(r);d?s=(0,i.normalizeColor)(c[d]||c,n,"dark"===d):("transparent"!==r&&(r=void 0),c&&(s=(0,i.normalizeColor)(c,n)))}return!1===e&&(s=void 0),[r,s]};e.backgroundAndTextColors=s;var u=function(t,e,n){if(void 0!==t){var a=o(t,e);if("string"===typeof a&&0===a.lastIndexOf("url",0))return(0,r.css)(["background:"," no-repeat center center;background-size:cover;"],a);var u=s(a,n,e),l=u[0],c=u[1];if(a.image){var f="\n      "+(l?"background-color: "+l+";":"")+"\n      background-image: "+a.image+";\n      background-repeat: "+(a.repeat||"no-repeat")+";\n      background-position: "+(a.position||"center center")+";\n      background-size: "+(a.size||"cover")+";\n    ";return(0,r.css)([""," ",""],c?"color: "+c+";":"",a.opacity?"position: relative;\n        z-index: 0;\n        &:before {\n          content: '';\n          position: absolute;\n          top: 0;\n          right: 0;\n          left: 0;\n          bottom: 0;\n          z-index: -1;\n          "+f+"\n          opacity: "+(!0===a.opacity?e.global.opacity.medium:e.global.opacity[a.opacity]||a.opacity)+";\n        }":f)}return l?(0,r.css)(["background-color:",";",""],l,c?"color: "+c+";":""):"string"===typeof a?(0,r.css)(["background:",";"],(0,i.normalizeColor)(a,e)):void 0}};e.backgroundStyle=u;var l=(0,r.css)(["",""],(function(t){return u((0,i.normalizeColor)(t.theme.global.active.background,t.theme),t.theme,t.theme.global.active.color)}));e.activeStyle=l;var c=(0,r.css)(["",""],(function(t){return u((0,i.normalizeColor)(t.theme.global.selected.background,t.theme),t.theme,t.theme.global.selected.color)}));e.selectedStyle=c;e.getHoverIndicatorStyle=function(t,e){var n;return n=!0===t||"background"===t?e.global.hover.background:t,(0,r.css)(["",""],u(n,e,e.global.hover.color))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_STYLE=e.MAX_ARROWS=e.DEFAULT_ARROWS=e.ArrowStyles=void 0;var r={NONE:0,FORWARD:1,BACKWARD:2,BOTH:3};e.ArrowStyles=r;e.DEFAULT_ARROWS=1;e.MAX_ARROWS=3;var i={arrowColor:[0,0,0,1],arrowCount:1,arrowStyle:r.NONE,fillColor:[0,0,0,1],lineColor:[0,0,0,1],lineWidthMeters:5,outlineRadiusMeters:0,opacity:1,zLevel:0};e.DEFAULT_STYLE=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SELECTION_TYPE=void 0;var r=n(41),i=n(34),o=c(n(509)),a=c(n(142)),s=c(n(440)),u=c(n(331)),l=c(n(119));function c(t){return t&&t.__esModule?t:{default:t}}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 h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||d(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||d(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.")}()}function d(t,e){if(t){if("string"===typeof t)return m(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function m(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 g(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 y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=[0,255,0,255],b=[255,255,255,90],_=[20,20],A="DeckDrawerPick",w={NONE:null,RECTANGLE:"rectangle",POLYGON:"polygon"};e.SELECTION_TYPE=w;var x=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,"nebula",void 0),y(this,"usePolygon",void 0),y(this,"validPolygon",void 0),y(this,"landPoints",void 0),y(this,"mousePoints",void 0),this.nebula=e,this.usePolygon=!1,this.landPoints=[],this.mousePoints=[]}var e,n,c;return e=t,n=[{key:"_getLayerIds",value:function(){return this.nebula.deckgl.props.layers.filter((function(t){return t&&t.props&&t.props.nebulaLayer&&t.props.nebulaLayer.enableSelection})).map((function(t){return t.id}))}},{key:"_selectFromPickingInfos",value:function(t){var e=t.map((function(t){var e=t.layer,n=t.index;return t.object.original||e.props.nebulaLayer.deckCache.originals[n]}));this.nebula.props.onSelection(e)}},{key:"_getBoundingBox",value:function(){var t=this.mousePoints,e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]})),r=Math.min.apply(Math,p(e)),i=Math.min.apply(Math,p(n));return{x:r,y:i,width:Math.max.apply(Math,p(e))-r,height:Math.max.apply(Math,p(n))-i}}},{key:"_selectRectangleObjects",value:function(){if(2===this.landPoints.length){var t=h(this.mousePoints[0],2),e=t[0],n=t[1],r=h(this.mousePoints[1],2),i=r[0],o=r[1],a=this.nebula.deckgl.pickObjects({x:Math.min(e,i),y:Math.min(n,o),width:Math.abs(i-e),height:Math.abs(o-n),layerIds:this._getLayerIds()});this._selectFromPickingInfos(a)}}},{key:"_selectPolygonObjects",value:function(){var t=this.nebula.deckgl.pickObjects(function(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){y(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}({},this._getBoundingBox(),{layerIds:[A].concat(p(this._getLayerIds()))}));this._selectFromPickingInfos(t.filter((function(t){return t.layer.id!==A})))}},{key:"_getMousePosFromEvent",value:function(t){return[t.offsetX,t.offsetY]}},{key:"handleEvent",value:function(t,e,n){"mouseup"!==t.type&&t.stopPropagation(),this.usePolygon=n===w.POLYGON;var r=!1,i=!1,o=this.usePolygon,a=this.landPoints,s=this.mousePoints;if("mousedown"===t.type){if(o&&a.length)(this.landPoints.length<3||this.validPolygon)&&(a.push(e),s.push(this._getMousePosFromEvent(t)));else{this.landPoints=[e,e];var u=this._getMousePosFromEvent(t);this.mousePoints=[u,u]}r=!0}else"mousemove"===t.type&&a.length?(a[a.length-1]=e,s[s.length-1]=this._getMousePosFromEvent(t),r=!0):"mouseup"===t.type&&(o?a.length>4&&(0,l.default)(a[0],a[a.length-1])<.01&&this.validPolygon&&(this._selectPolygonObjects(),this.reset(),r=!0,i=!0):(this._selectRectangleObjects(),this.reset(),r=!0,i=!0));return{redraw:r,deactivate:i}}},{key:"reset",value:function(){this.landPoints=[],this.mousePoints=[]}},{key:"_makeStartPointHighlight",value:function(t){var e=(0,s.default)((0,i.point)(t),.0025);return(0,a.default)((0,o.default)(e)).geometry.coordinates}},{key:"render",value:function(){var t=this,e=[],n=[];if(this.usePolygon||2!==this.landPoints.length){if(this.usePolygon&&this.landPoints.length&&(e.push({polygon:this.landPoints,lineColor:v,fillColor:b}),this.landPoints.length>=3)){var o,a=(0,i.polygon)([[].concat(p(this.landPoints),[this.landPoints[0]])]),l=(0,s.default)((0,i.point)(this.landPoints[0]),10);try{o=(0,u.default)(l,a),n.push({polygon:o.geometry.coordinates,fillColor:[0,0,0,1]}),this.validPolygon=!0}catch(E){this.validPolygon=!1}}}else{var c=h(this.mousePoints,2),f=h(c[0],2),d=f[0],m=f[1],g=h(c[1],2),y=g[0],w=g[1],x=[[d,m],[d,w],[y,w],[y,m],[d,m]].map((function(e){return t.nebula.unprojectMousePosition(e)}));e.push({polygon:x,lineColor:v,fillColor:b})}return this.landPoints.length&&e.push({polygon:this._makeStartPointHighlight(this.landPoints[0]),lineColor:[0,0,0,0],fillColor:v}),e.push({polygon:[[0,0]]}),n.push({polygon:[[0,0]]}),[new r.PolygonLayer({id:"DeckDrawerView",data:e,fp64:!1,opacity:1,pickable:!1,lineWidthMinPixels:2,lineWidthMaxPixels:2,lineDashJustified:!0,getLineDashArray:function(t){return _},getLineColor:function(t){return t.lineColor||[0,0,0,255]},getFillColor:function(t){return t.fillColor||[0,0,0,255]},getPolygon:function(t){return t.polygon}}),new r.PolygonLayer({id:A,data:n,getLineColor:function(t){return t.lineColor||[0,0,0,255]},getFillColor:function(t){return t.fillColor||[0,0,0,255]},fp64:!1,opacity:1,stroked:!1,pickable:!0,getPolygon:function(t){return t.polygon}})]}}],n&&g(e.prototype,n),c&&g(e,c),t}();e.default=x},function(t,e,n){"use strict";function r(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 i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){function t(e,n){var r=n.data,o=n.groundPoint,a=n.nebula,s=n.metadata;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"canceled",void 0),i(this,"data",void 0),i(this,"metadata",void 0),i(this,"groundPoint",void 0),i(this,"nativeEvent",void 0),i(this,"nebula",void 0),this.nativeEvent=e,this.data=r,this.groundPoint=o,this.nebula=a,this.metadata=s}var e,n,o;return e=t,(n=[{key:"stopPropagation",value:function(){this.nativeEvent.stopPropagation(),this.canceled=!0}}])&&r(e.prototype,n),o&&r(e,o),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScaleMode=void 0;var r=g(n(509)),i=g(n(180)),o=g(n(89)),a=g(n(142)),s=n(34),u=g(n(345)),l=n(347),c=g(n(119)),f=g(n(981)),h=n(182),p=n(97),d=n(64),m=n(161);function g(t){return t&&t.__esModule?t:{default:t}}function y(t){return y="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},y(t)}function v(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return b(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(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.")}()}function b(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 _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(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 w(t,e){return!e||"object"!==y(e)&&"function"!==typeof e?x(t):e}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function E(){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}}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function S(t,e){return S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},S(t,e)}function P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var C=function(t){!function(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&&S(t,e)}(y,t);var e,n,c,d,g=(e=y,function(){var t,n=O(e);if(E()){var r=O(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return w(this,t)});function y(){var t;_(this,y);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return P(x(t=g.call.apply(g,[this].concat(n))),"_geometryBeingScaled",void 0),P(x(t),"_selectedEditHandle",void 0),P(x(t),"_cornerGuidePoints",void 0),P(x(t),"_cursor",void 0),P(x(t),"_isScaling",!1),P(x(t),"_isSinglePointGeometrySelected",(function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,h.getGeom)(e[0]).type})),P(x(t),"_getOppositeScaleHandle",(function(e){var n=e&&e.properties&&Array.isArray(e.properties.positionIndexes)&&e.properties.positionIndexes[0];if("number"!==typeof n)return null;var r=t._cornerGuidePoints.length,i=(n+r/2)%r;return t._cornerGuidePoints.find((function(t){return!!Array.isArray(t.properties.positionIndexes)&&t.properties.positionIndexes[0]===i}))})),P(x(t),"_getUpdatedData",(function(t,e){for(var n=new m.ImmutableFeatureCollection(t.data),r=t.selectedIndexes,i=0;i<r.length;i++){var o=r[i],a=e.features[i];n=n.replaceGeometry(o,a.geometry)}return n.getObject()})),P(x(t),"isEditHandleSelected",(function(){return Boolean(t._selectedEditHandle)})),P(x(t),"getScaleAction",(function(e,n,r,i){if(!t._selectedEditHandle)return null;var o=t._getOppositeScaleHandle(t._selectedEditHandle),a=(0,h.getCoord)(o),s=T(a,e,n),u=(0,f.default)(t._geometryBeingScaled,s,{origin:a});return{updatedData:t._getUpdatedData(i,u),editType:r,editContext:{featureIndexes:i.selectedIndexes}}})),P(x(t),"updateCursor",(function(e){if(t._selectedEditHandle){t._cursor&&e.onUpdateCursor(t._cursor);var n=t.getSelectedFeaturesAsFeatureCollection(e),r=(0,i.default)(n),a=(0,o.default)(r,t._selectedEditHandle),s=a<0?a+180:a;s>=0&&s<=90||s>=180&&s<=270?(t._cursor="nesw-resize",e.onUpdateCursor("nesw-resize")):(t._cursor="nwse-resize",e.onUpdateCursor("nwse-resize"))}else e.onUpdateCursor(null),t._cursor=null})),t}return n=y,(c=[{key:"handlePointerMove",value:function(t,e){if(!this._isScaling){var n=(0,p.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"scale"===n.properties.editHandleType?n:null,this.updateCursor(e)}}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isScaling=!0,this._geometryBeingScaled=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleDragging",value:function(t,e){if(this._isScaling){e.onUpdateCursor(this._cursor);var n=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaling",e);n&&e.onEdit(n),t.cancelPan()}}},{key:"handleStopDragging",value:function(t,e){if(this._isScaling){var n=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaled",e);n&&e.onEdit(n),e.onUpdateCursor(null),this._geometryBeingScaled=null,this._selectedEditHandle=null,this._cursor=null,this._isScaling=!1}}},{key:"getGuides",value:function(t){this._cornerGuidePoints=[];var e=this.getSelectedFeaturesAsFeatureCollection(t);if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};var n=(0,a.default)((0,r.default)(e));n.properties.mode="scale";var i=[];return(0,l.coordEach)(n,(function(t,e){if(e<4){var n=(0,s.point)(t,{guideType:"editHandle",editHandleType:"scale",positionIndexes:[e]});i.push(n)}})),this._cornerGuidePoints=i,(0,s.featureCollection)([(0,u.default)(n)].concat(v(this._cornerGuidePoints)))}}])&&A(n.prototype,c),d&&A(n,d),y}(d.GeoJsonEditMode);function T(t,e,n){var r=(0,c.default)(t,e);return(0,c.default)(t,n)/r}e.ScaleMode=C},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RotateMode=void 0;var r=g(n(509)),i=g(n(180)),o=g(n(89)),a=g(n(142)),s=g(n(119)),u=n(347),l=n(182),c=n(34),f=g(n(442)),h=g(n(345)),p=n(97),d=n(64),m=n(161);function g(t){return t&&t.__esModule?t:{default:t}}function y(t){return y="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},y(t)}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(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 _(t,e){return!e||"object"!==y(e)&&"function"!==typeof e?A(t):e}function A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(){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}}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function E(t,e){return E=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},E(t,e)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var S=function(t){!function(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&&E(t,e)}(P,t);var e,n,g,y,S=(e=P,function(){var t,n=x(e);if(w()){var r=x(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return _(this,t)});function P(){var t;v(this,P);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return O(A(t=S.call.apply(S,[this].concat(n))),"_selectedEditHandle",void 0),O(A(t),"_geometryBeingRotated",void 0),O(A(t),"_isRotating",!1),O(A(t),"_isSinglePointGeometrySelected",(function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,l.getGeom)(e[0]).type})),O(A(t),"getIsRotating",(function(){return t._isRotating})),t}return n=P,(g=[{key:"getGuides",value:function(t){var e=this._geometryBeingRotated||this.getSelectedFeaturesAsFeatureCollection(t);if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};if(this._isRotating)return(0,c.featureCollection)([(0,i.default)(e)]);var n=(0,a.default)((0,r.default)(e)),o=null,l=null,f=0;(0,u.coordEach)(n,(function(t){if(o){var e=(0,d.getIntermediatePosition)(t,o);(!l||e[1]>l[1])&&(l=e);var n=(0,s.default)(t,o);f=Math.max(f,n)}o=t}));var p=l&&[l[0],l[1]+f/1e3],m=(0,c.lineString)([l,p]),g=(0,c.point)(p,{guideType:"editHandle",editHandleType:"rotate"});return(0,c.featureCollection)([(0,h.default)(n),g,m])}},{key:"handleDragging",value:function(t,e){if(this._isRotating){var n=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotating",e);n&&e.onEdit(n),t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){if(!this._isRotating){var n=(0,p.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"rotate"===n.properties.editHandleType?n:null}this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isRotating=!0,this._geometryBeingRotated=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._isRotating){var n=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotated",e);n&&e.onEdit(n),this._geometryBeingRotated=null,this._selectedEditHandle=null,this._isRotating=!1}}},{key:"updateCursor",value:function(t){this._selectedEditHandle?t.onUpdateCursor("crosshair"):t.onUpdateCursor(null)}},{key:"getRotateAction",value:function(t,e,n,r){if(!this._geometryBeingRotated)return null;for(var a=(0,i.default)(this._geometryBeingRotated),s=function(t,e,n){var r=(0,o.default)(t,e);return(0,o.default)(t,n)-r}(a,t,e),u=(0,f.default)(this._geometryBeingRotated,s,{pivot:a}),l=new m.ImmutableFeatureCollection(r.data),c=r.selectedIndexes,h=0;h<c.length;h++){var p=c[h],d=u.features[h];l=l.replaceGeometry(p,d.geometry)}return{updatedData:l.getObject(),editType:n,editContext:{featureIndexes:c}}}}])&&b(n.prototype,g),y&&b(n,y),P}(d.GeoJsonEditMode);e.RotateMode=S},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))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.")}()}function o(t,e){if(t){if("string"===typeof t)return a(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(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 s(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 u(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?l(t):e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeMode=void 0;var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,r,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function d(t){var e,n,r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),e=p.call(this),n=l(e),i=void 0,(r="_modes")in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,e._modes=t,e}return n=d,r=[{key:"_coalesce",value:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=0;r<this._modes.length&&(e=t(this._modes[r]),!(n?n(e):e));r++);return e}},{key:"handleClick",value:function(t,e){this._coalesce((function(n){return n.handleClick(t,e)}))}},{key:"handlePointerMove",value:function(t,e){return this._coalesce((function(n){return n.handlePointerMove(t,e)}))}},{key:"handleStartDragging",value:function(t,e){return this._coalesce((function(n){return n.handleStartDragging(t,e)}))}},{key:"handleStopDragging",value:function(t,e){return this._coalesce((function(n){return n.handleStopDragging(t,e)}))}},{key:"handleDragging",value:function(t,e){return this._coalesce((function(n){return n.handleDragging(t,e)}))}},{key:"getGuides",value:function(t){var e,n=[],r=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=o(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(this._modes);try{for(r.s();!(e=r.n()).done;){var a=e.value;n.push.apply(n,i(a.getGuides(t).features))}}catch(s){r.e(s)}finally{r.f()}return{type:"FeatureCollection",features:n}}}],r&&s(n.prototype,r),a&&s(n,a),d}(n(64).GeoJsonEditMode);e.CompositeMode=p},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ThreeClickPolygonMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"handleClick",value:function(t,e){this.addClickSequence(t);var n=this.getClickSequence(),r=this.getTentativeGuide(e);if(n.length>2&&r&&"Polygon"===r.geometry.type){var i=this.getAddFeatureOrBooleanPolygonAction(r.geometry,e);this.resetClickSequence(),i&&e.onEdit(i)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var o=e.mapCoords;if(1===r.length)i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[0],o]}});else{var a=this.getThreeClickPolygon(r[0],r[1],o,n);a&&i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:a.geometry})}return i}},{key:"getThreeClickPolygon",value:function(t,e,n,r){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),a(l(p.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 2===r.length&&(e=this.getThreeClickPolygon(r[0],r[1],i[0],t.modeConfig)),e}}])&&o(n.prototype,r),f&&o(n,f),p}(n(64).GeoJsonEditMode);e.ThreeClickPolygonMode=f},function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if(Array.isArray(t)){var n=t.length;if(!e||e.length!==n)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n={};return function(i){for(var o in i)if(!r(i[o],n[o])){e=t(i),n=i;break}return e}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(25);function i(t){return i="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},i(t)}function o(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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return u(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function u(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 l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(){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}}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=["anyclick","pointermove","panstart","panmove","panend","keyup"],y=function(t){!function(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&&d(t,e)}(u,t);var e,n,r,i,o=(e=u,function(){var t,n=p(e);if(h()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)});function u(){return l(this,u),o.apply(this,arguments)}return n=u,(r=[{key:"onLayerClick",value:function(t){}},{key:"onStartDragging",value:function(t){}},{key:"onStopDragging",value:function(t){}},{key:"onDragging",value:function(t){}},{key:"onPointerMove",value:function(t){}},{key:"onLayerKeyUp",value:function(t){}},{key:"initializeState",value:function(){this.setState({_editableLayerState:{pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,eventHandler:this._forwardEventToCurrentLayer.bind(this)}}),this._addEventHandlers()}},{key:"finalizeState",value:function(){this._removeEventHandlers()}},{key:"_addEventHandlers",value:function(){var t,e=this.context.deck.eventManager,n=this.state._editableLayerState.eventHandler,r=s(g);try{for(r.s();!(t=r.n()).done;){var i=t.value;e.on(i,n,{priority:100})}}catch(o){r.e(o)}finally{r.f()}}},{key:"_removeEventHandlers",value:function(){var t,e=this.context.deck.eventManager,n=this.state._editableLayerState.eventHandler,r=s(g);try{for(r.s();!(t=r.n()).done;){var i=t.value;e.off(i,n)}}catch(o){r.e(o)}finally{r.f()}}},{key:"_forwardEventToCurrentLayer",value:function(t){var e=this.getCurrentLayer(),n=e["_on".concat(t.type)].bind(e);n?n(t):console.warn("no handler for mjolnir.js event ".concat(t.type))}},{key:"_onanyclick",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.getPicks(n);this.onLayerClick({mapCoords:r,screenCoords:n,picks:i,sourceEvent:e})}},{key:"_onkeyup",value:function(t){var e=t.srcEvent;this.onLayerKeyUp(e)}},{key:"_onpanstart",value:function(t){var e=this.getScreenCoords(t.srcEvent),n=this.getMapCoords(e),r=this.getPicks(e);this.setState({_editableLayerState:a({},this.state._editableLayerState,{pointerDownScreenCoords:e,pointerDownMapCoords:n,pointerDownPicks:r})}),this.onStartDragging({picks:r,screenCoords:e,mapCoords:n,pointerDownScreenCoords:e,pointerDownMapCoords:n,cancelPan:t.stopImmediatePropagation,sourceEvent:t.srcEvent})}},{key:"_onpanmove",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.state._editableLayerState,o=i.pointerDownPicks,a=i.pointerDownScreenCoords,s=i.pointerDownMapCoords,u=this.getPicks(n);this.onDragging({screenCoords:n,mapCoords:r,picks:u,pointerDownPicks:o,pointerDownScreenCoords:a,pointerDownMapCoords:s,sourceEvent:e,cancelPan:t.stopImmediatePropagation})}},{key:"_onpanend",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.state._editableLayerState,o=i.pointerDownPicks,s=i.pointerDownScreenCoords,u=i.pointerDownMapCoords,l=this.getPicks(n);this.onStopDragging({picks:l,screenCoords:n,mapCoords:r,pointerDownPicks:o,pointerDownScreenCoords:s,pointerDownMapCoords:u,sourceEvent:e}),this.setState({_editableLayerState:a({},this.state._editableLayerState,{pointerDownScreenCoords:null,pointerDownMapCoords:null,pointerDownPicks:null})})}},{key:"_onpointermove",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.state._editableLayerState,o=i.pointerDownPicks,a=i.pointerDownScreenCoords,s=i.pointerDownMapCoords,u=this.getPicks(n);this.onPointerMove({screenCoords:n,mapCoords:r,picks:u,pointerDownPicks:o,pointerDownScreenCoords:a,pointerDownMapCoords:s,sourceEvent:e})}},{key:"getPicks",value:function(t){return this.context.deck.pickMultipleObjects({x:t[0],y:t[1],layerIds:[this.props.id],radius:this.props.pickingRadius,depth:this.props.pickingDepth})}},{key:"getScreenCoords",value:function(t){return[t.clientX-this.context.gl.canvas.getBoundingClientRect().left,t.clientY-this.context.gl.canvas.getBoundingClientRect().top]}},{key:"getMapCoords",value:function(t){return this.context.viewport.unproject([t[0],t[1]])}}])&&c(n.prototype,r),i&&c(n,i),u}(r.CompositeLayer);e.default=y,m(y,"layerName","EditableLayer")},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(t))return e;return[255*t[0],255*t[1],255*t[2],255*t[3]]},e.recursivelyTraverseNestedArrays=function t(e,n,r){if(!Array.isArray(e[0]))return!0;for(var i=0;i<e.length;i++)if(t(e[i],[].concat(function(t){if(Array.isArray(t))return f(t)}(o=n)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(o)||c(o)||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.")}(),[i]),r)){r(e,n);break}var o;return!1},e.generatePointsParallelToLinePoints=function(t,e,n){var s={type:"LineString",coordinates:[t,e]},u=(0,a.point)(n),l=(0,o.default)(u,s),c=(0,i.default)(t,e),f=(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])<0?c-90:c-270,h=(0,r.default)(e,l,f),p=(0,r.default)(t,l,f);return[h.geometry.coordinates,p.geometry.coordinates]},e.distance2d=h,e.mix=p,e.nearestPointOnProjectedLine=function(t,e,n){var r=new s.default(n),i=t.geometry.coordinates.map((function(t){var e=l(t,3),n=e[0],i=e[1],o=e[2],a=void 0===o?0:o;return r.project([n,i,a])})),o=l(r.project(e.geometry.coordinates),2),a=o[0],u=o[1],c=1/0,f={};i.forEach((function(t,e){var n=l(t,2),r=n[0],o=n[1];if(0!==e){var s=l(i[e-1],2),h=s[0],p=s[1],d=p-o,m=r-h,g=h*o-r*p,y=d*d+m*m,v=Math.abs(d*a+m*u+g)/Math.sqrt(y);v<c&&(c=v,f={index:e,x0:(m*(m*a-d*u)-d*g)/y,y0:(d*(-m*a+d*u)-m*g)/y})}}));var d=f,m=d.index,g=d.x0,y=d.y0,v=l(i[m-1],3),b=v[0],_=v[1],A=v[2],w=void 0===A?0:A,x=l(i[m],3),E=x[0],O=x[1],S=x[2],P=void 0===S?0:S,C=h(b,_,E,O),T=h(b,_,g,y),k=p(w,P,T/C);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([g,y,k])},properties:{dist:c,index:m-1}}},e.insertBefore=function(t,e,n){var r=t.indexOf(e);if(r<0)return t;return t.slice(0,r)+n+t.slice(r)};var r=u(n(151)),i=u(n(89)),o=u(n(609)),a=n(34),s=u(n(441));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"===typeof t)return f(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}function f(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 h(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function p(t,e,n){return e*n+t*(1-n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(41),i=u(n(1268)),o=n(28),a=u(n(1269)),s=n(515);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="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},l(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e,n){return h="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function p(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(){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}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t){var e=t.source,n=t.code,r=void 0===n?"":n;return e.replace(/}[^{}]*$/,r.concat("\n}\n"))}var b=function(t){!function(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&&g(t,e)}(y,t);var e,n,r,u,l=(e=y,function(){var t,n=m(e);if(d()){var r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function y(){return c(this,y),l.apply(this,arguments)}return n=y,(r=[{key:"getShaders",value:function(){var t=h(m(y.prototype),"getShaders",this).call(this);return Object.assign({},t,{modules:t.modules.concat([a.default]),vs:v({source:t.vs,code:"  outline_setUV(gl_Position);\n  outline_setZLevel(instanceZLevel);\n"}),fs:v({source:t.fs,code:"  gl_FragColor = outline_filterColor(gl_FragColor);\n"})})}},{key:"initializeState",value:function(t){h(m(y.prototype),"initializeState",this).call(this,t),this.setState({outlineFramebuffer:new o.Framebuffer(t.gl),dummyTexture:new o.Texture2D(t.gl)}),this.state.attributeManager.addInstanced({instanceZLevel:{size:1,type:i.default.UNSIGNED_BYTE,accessor:"getZLevel"}})}},{key:"draw",value:function(t){t.moduleParameters,t.parameters;var e=t.uniforms,n=(t.context,this.props),r=n.jointRounded,o=n.capRounded,a=n.billboard,u=n.miterLimit,l=n.widthUnits,c=n.widthScale,f=n.widthMinPixels,h=n.widthMaxPixels;e=Object.assign({},e,{jointType:Number(r),capType:Number(o),billboard:a,widthUnits:s.UNIT[l],widthScale:c,miterLimit:u,widthMinPixels:f,widthMaxPixels:h});var p=this.state,d=p.outlineFramebuffer,m=p.dummyTexture;d.resize(),d.clear({color:!0,depth:!0}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!0,outlineShadowmap:m}),this.state.model.draw({uniforms:Object.assign({},e,{jointType:0,widthScale:1.3*this.props.widthScale}),parameters:{depthTest:!1,blendEquation:i.default.MAX},framebuffer:d}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!1,outlineShadowmap:d}),this.state.model.draw({uniforms:Object.assign({},e,{jointType:Number(r),capType:Number(o),widthScale:this.props.widthScale}),parameters:{depthTest:!1}})}}])&&f(n.prototype,r),u&&f(n,u),y}(r.PathLayer);e.default=b,y(b,"layerName","PathOutlineLayer"),y(b,"defaultProps",{getZLevel:function(){return 0}})},function(t,e,n){"use strict";n.r(e);var r=n(19);n.d(e,"Vector2",(function(){return r.g})),n.d(e,"Vector3",(function(){return r.h})),n.d(e,"Vector4",(function(){return r.i})),n.d(e,"Matrix3",(function(){return r.b})),n.d(e,"Matrix4",(function(){return r.c})),n.d(e,"Quaternion",(function(){return r.e})),n.d(e,"SphericalCoordinates",(function(){return r.f})),n.d(e,"Pose",(function(){return r.d})),n.d(e,"Euler",(function(){return r.a})),n.d(e,"_MathUtils",(function(){return r.k})),n.d(e,"assert",(function(){return r.p})),n.d(e,"config",(function(){return r.t})),n.d(e,"configure",(function(){return r.u})),n.d(e,"formatValue",(function(){return r.z})),n.d(e,"isArray",(function(){return r.A})),n.d(e,"clone",(function(){return r.s})),n.d(e,"equals",(function(){return r.x})),n.d(e,"exactEquals",(function(){return r.y})),n.d(e,"toRadians",(function(){return r.G})),n.d(e,"toDegrees",(function(){return r.F})),n.d(e,"radians",(function(){return r.C})),n.d(e,"degrees",(function(){return r.w})),n.d(e,"sin",(function(){return r.D})),n.d(e,"cos",(function(){return r.v})),n.d(e,"tan",(function(){return r.E})),n.d(e,"asin",(function(){return r.o})),n.d(e,"acos",(function(){return r.n})),n.d(e,"atan",(function(){return r.q})),n.d(e,"clamp",(function(){return r.r})),n.d(e,"lerp",(function(){return r.B})),n.d(e,"withEpsilon",(function(){return r.H})),n.d(e,"_SphericalCoordinates",(function(){return r.m})),n.d(e,"_Pose",(function(){return r.l})),n.d(e,"_Euler",(function(){return r.j}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PROJECTED_PIXEL_SIZE_MULTIPLIER=void 0;e.PROJECTED_PIXEL_SIZE_MULTIPLIER=2/3},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return g}));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,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function s(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}function u(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function l(t){return 180*(t%(2*Math.PI))/Math.PI}function c(t){return t%360*Math.PI/180}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function h(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")}function p(t,e,n){if(void 0===n&&(n={}),!0===n.final)return function(t,e){var n=p(e,t);return n=(n+180)%360}(t,e);var r=h(t),i=h(e),o=c(r[0]),a=c(i[0]),s=c(r[1]),u=c(i[1]),f=Math.sin(a-o)*Math.cos(u),d=Math.cos(s)*Math.sin(u)-Math.sin(s)*Math.cos(u)*Math.cos(a-o);return l(Math.atan2(f,d))}function d(t,e,n,r){void 0===r&&(r={});var i=h(t),o=c(i[0]),s=c(i[1]),f=c(n),p=u(e,r.units),d=Math.asin(Math.sin(s)*Math.cos(p)+Math.cos(s)*Math.sin(p)*Math.cos(f));return a([l(o+Math.atan2(Math.sin(f)*Math.sin(p)*Math.cos(s),Math.cos(p)-Math.sin(s)*Math.sin(d))),l(d)],r.properties)}var m=function(t,e,n){void 0===n&&(n={});var r=h(t),i=h(e),o=c(i[1]-r[1]),a=c(i[0]-r[0]),u=c(r[1]),l=c(i[1]),f=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(u)*Math.cos(l);return s(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)};function g(t,e,n){void 0===n&&(n={});for(var r,i=("Feature"===(r=t).type?r.geometry:r).coordinates,o=0,s=0;s<i.length&&!(e>=o&&s===i.length-1);s++){if(o>=e){var u=e-o;if(u){var l=p(i[s],i[s-1])-180;return d(i[s],u,l,n)}return a(i[s])}o+=m(i[s],i[s+1],n)}return a(i[i.length-1])}},function(t,e,n){"use strict";function r(){var t=document.querySelectorAll(".m-site-wrapper > *:not(.m-footer, .m-sponsors)");(t=Array.from(t)).forEach((function(t){!function(t,e){if(!("IntersectionObserver"in window))return void(e.cb?e.cb(t):t.classList.add("is-revealed"));new IntersectionObserver((function(n,r){n.forEach((function(n){n.isIntersecting&&(e.cb?e.cb(t):n.target.classList.add("is-revealed"),r.unobserve(n.target))}))}),e).observe(t)}(t,{rootMargin:"-100px"})}))}n.r(e),n.d(e,"setupRevealObserver",(function(){return r}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(666),a=n.n(o),s=n(18),u=n(1019),l=n.n(u),c=n(336);e.default=function(t){t.children;return Object(s.hasFeature)("quiet_humap_branding")?null:i.a.createElement("div",{className:l.a.HumapFooter},i.a.createElement(c.default,{target:"_blank",linkLocation:"humapFooter"},i.a.createElement("p",{dangerouslySetInnerHTML:{__html:I18n.t("made_with_humap")}}),i.a.createElement("img",{src:a.a,alt:"Logo"})))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(593),s=n.n(a),u=n(17),l=n(18),c=n(278),f=n(397),h=n(8),p=n.n(h),d=n(557),m=n(279),g=n(273);e.default=Object(o.a)((function(t){var e=t.collection;if(!e)return null;var n=Object(u.useStore)(),r=n.user,o=n.siteMeta,a=e.isPublished?"unpublished":"published",h=e.isPublished?p.a.t("unpublish"):p.a.t("publish"),y=Object(d.setActionButtonAvailability)(e,r),v=Object(l.hasFeature)("open_collections")&&"open"===e.contribution_status;return i.a.createElement("div",{className:s.a.CollectionActions},i.a.createElement("ul",null,y.editButtonAvailable&&i.a.createElement("li",null,i.a.createElement("a",{href:"/collections/".concat(e.slug,"/edit")},e.hasFinishedWizard?p.a.t("edit"):p.a.t("finish_creating"))),y.submitForModerationButtonAvailable&&i.a.createElement("li",null,i.a.createElement(m.default,{label:"Submit for approval"},(function(t,n){return i.a.createElement("div",null,i.a.createElement("h3",null,"Are you sure?"),i.a.createElement("p",null,"Once submitted you will no longer be able to make changes this ",p.a.t(e.type).toLowerCase(),"\u2026"),i.a.createElement(g.a,{label:"Cancel",onClick:function(){return n(!1)}}),i.a.createElement(g.a,{label:"Submit",primary:!0,onClick:function(){e.setState("awaiting_moderation",r),n(!1)}}))}))),y.publishButtonAvailable&&i.a.createElement("li",null,i.a.createElement("a",{onClick:function(){e.setState(a,r)}},h)),y.awaitingModerationNotice&&i.a.createElement("li",null,i.a.createElement("span",{className:s.a.notice},"This ",p.a.t(e.type).toLowerCase()," is awaiting approval.")),e.isPublished&&i.a.createElement(i.a.Fragment,null,Object(l.hasFeature)("favourites")&&r&&r.loggedIn&&i.a.createElement(f.default,{item:e,favourited_type:"collection"}),Object(l.hasFeature)("content_feedback")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/feedback/collection/".concat(e.slug)},p.a.t("give_feedback"))),v&&i.a.createElement("li",null,i.a.createElement("a",{href:"/collections/".concat(e.slug,"/contribute")},p.a.t("views.humap.collections.contribute.contribute_to_collection")))),o&&e.isPublished&&i.a.createElement("li",{className:s.a.shareButtons},i.a.createElement(c.default,{item:e,excerpt:e.excerpt,URL:"object"===typeof window&&window.location.href,site_title:o.site_title}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1536),a=n(610),s=n(210),u=n.n(s),l=n(54);function c(){c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function f(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function h(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return p(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 p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(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}e.default=function(t){var e=t.item,n=(t.props,Object(r.useRef)()),s=function(){return e.hasOwnProperty("heroAttachment")&&e.heroAttachment||e.hasOwnProperty("image")&&e.image},p=h(Object(r.useState)(s()?"bigImage":"fullMap"),2),d=p[0],m=p[1],g=h(Object(r.useState)(""),2),y=g[0],v=g[1],b=h(Object(r.useState)(),2),_=b[0],A=b[1],w=h(Object(r.useState)(!1),2),x=w[0],E=w[1],O=function(){var t,n=(t=c().mark((function t(){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(a.fetchEmbedSnippetQuery)({id:e.id,type:e.type,layout:d});case 2:n=t.sent,v(n.embedSnippet.html);case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,s,"next",t)}function s(t){f(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();Object(r.useEffect)((function(){if(n.current&&y){E(!1);var t=document.createRange().createContextualFragment(y);n.current.replaceChildren(t)}var e=function(t){"iframeLoaded"===t.data&&E(!0)};return window.addEventListener("message",e),function(){window.removeEventListener("message",e)}}),[n,y]),Object(r.useEffect)((function(){O()}),[d]);var S=[{label:I18n.t("embeds.display_modes.big_image"),value:"bigImage"},{label:I18n.t("embeds.display_modes.big_image_with_mini_map"),value:"bigImageWithMiniMap"},{label:I18n.t("embeds.display_modes.full_map"),value:"fullMap"}];return i.a.createElement("div",{className:u.a.EmbedSettings},i.a.createElement("div",{className:u.a.controls},i.a.createElement("h2",null,I18n.t("embeds.title",{item_type:e.type})),i.a.createElement("p",null,I18n.t("embeds.instructions")),s()&&i.a.createElement("div",{className:u.a.displayMode},i.a.createElement("span",{className:u.a.labelSubstitute},"Display style"),i.a.createElement(o.a,{name:"radio",options:S,value:d,onChange:function(t){return m(t.target.value)}})),i.a.createElement("div",{className:u.a.outputCode},i.a.createElement("code",null,y)),i.a.createElement("div",{className:u.a.copyControls},i.a.createElement("span",{className:u.a.copyResponse},_),i.a.createElement("button",{onClick:function(){navigator.clipboard&&window.isSecureContext?window.navigator.clipboard.writeText(y).then((function(){A(I18n.t("embeds.copied_to_clipboard"))})):A(I18n.t("embeds.clipboard_error"))}},I18n.t("embeds.copy_to_clipboard")))),i.a.createElement("div",{className:"".concat(u.a.demoEmbed," ").concat(x?u.a.loaded:u.a.loading)},i.a.createElement("div",{ref:n})),!x&&i.a.createElement("div",{className:u.a.spinner},i.a.createElement(l.default,null)))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(1024),u=n.n(s);e.default=Object(o.a)((function(){return i.a.createElement("div",{className:u.a.CollectionBoothCloseButton},i.a.createElement(a.a,{to:"/map/browse"},i.a.createElement("span",null,"Close")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(1027),s=n.n(a);e.default=function(t){var e=t.id,n=t.name;return i.a.createElement("li",{className:s.a.TermListItem},i.a.createElement(o.a,{to:"/map/search/results?taxonomy_term_ids=".concat(e),"term-id":e},n))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(17),s=n(451),u=n.n(s),l=n(62);e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.uiSettings,n=e.basemapsVisible,o=e.setBasemapsVisible,s=t.basemaps,c=s.availableBasemaps,f=s.currentBasemap,h=s.setBasemap,p=Object(r.useRef)(),d=function(t){p.current.contains(t.target)||o(!1)};return Object(r.useEffect)((function(){return n?document.addEventListener("click",d):document.removeEventListener("click",d),function(){document.removeEventListener("click",d)}}),[n]),i.a.createElement("div",{className:"".concat(u.a.BaseMapPicker),ref:p},i.a.createElement("button",{onClick:function(){o(!n)}},i.a.createElement("span",{className:u.a.icon}),i.a.createElement("span",{className:u.a.label},"Change map")),n&&i.a.createElement("ul",null,c.map((function(t){return i.a.createElement("li",{key:"basemap-".concat(t.id)},i.a.createElement("button",{className:f&&t.id===f.id?u.a.isCurrent:null,onClick:function(){var e;e=t.id,o(!1),h(e)}},i.a.createElement(l.default,{url:t.image_url,parameters:{w:60,h:60,fit:"crop"}}),i.a.createElement("span",null,t.name)))}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(223),a=n(7),s=n(17),u=n(594),l=n.n(u);e.default=Object(a.a)((function(){var t=Object(s.useStore)().uiSettings,e=t.trayVisible,n=t.setTrayVisible;return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"".concat(l.a.CloseTrayButton," ").concat(e?l.a.isOpen:l.a.isClosed)},i.a.createElement(o.a.Consumer,null,(function(t){return"smallMobile"===t||"small"===t||"mobile"===t||"tablet"===t?i.a.createElement(i.a.Fragment,null):i.a.createElement("button",{onClick:function(){return n(!e)}},i.a.createElement("span",null," ",I18n.t("components.global.close_tray")," "))}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(17),s=n(452),u=n.n(s),l=n(62);e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.uiSettings,n=e.customLegendVisible,o=e.setCustomLegendVisible,s=t.siteMeta.custom_legend,c=Object(r.useRef)(),f=function(t){c.current.contains(t.target)||o(!1)};return Object(r.useEffect)((function(){return n?document.addEventListener("click",f):document.removeEventListener("click",f),function(){document.removeEventListener("click",f)}}),[n]),i.a.createElement("div",{className:"".concat(u.a.CustomLegend),ref:c},i.a.createElement("button",{onClick:function(){o(!n)}},i.a.createElement("span",{className:u.a.icon}),i.a.createElement("span",{className:u.a.label},"Legend")),n&&i.a.createElement("ul",null,s.map((function(t,e){return i.a.createElement("li",{key:"basemap-".concat(e)},t.image_url&&i.a.createElement(l.default,{parameters:{w:60,h:60,fit:"clip"},url:t.image_url,sizes:{}}),!t.image_url&&i.a.createElement("div",{className:u.a.swatch,style:{backgroundColor:t.color}}),i.a.createElement("span",null,t.label))}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(71),a=n(109),s=n(685),u=n.n(s);e.default=function(){var t=[];availableLocales.forEach((function(e){t.push({label:e.toUpperCase(),value:e,name:availableLocaleNames[e]})}));return i.a.createElement("div",{className:u.a.LanguageSelector},t.map((function(t,e){return i.a.createElement("button",{className:I18n.locale==t.value?u.a.current:"",key:e,onClick:function(){return e=t.value,void fetch("/preferred_language",{method:"POST",headers:{"X-Csrf-Token":document.querySelector('meta[name="csrf-token"]').content,"Content-Type":"application/json"},body:JSON.stringify({preferred_language:e})}).then((function(t){window.location.reload()}));var e}},I18n.locale==t.value&&i.a.createElement(o.a,{icon:a.e}),t.name)})))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1031),a=n.n(o),s=n(62),u=(n(14),n(7)),l=n(17),c=function(t){var e=t.width,n=t.height,r=Object(l.useStore)().siteMeta;return r&&r.mapLogo?i.a.createElement("div",{className:a.a.Logo},i.a.createElement("a",{href:"/"},i.a.createElement(s.default,{parameters:{w:e,h:n,fit:"clip"},url:r.mapLogo.url,sizes:{}}))):null};c.defaultProps={logoName:"map"},e.default=Object(u.a)(c)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(436),a=n(1015),s=n.n(a),u=(n(200),n(1032)),l=n(14),c=n(455),f=n.n(c),h=n(49),p=n(7),d=n(17),m=n(418),g=n(565),y=n(1033),v=n(741),b=(n(250),n(262),n(1034)),_=n(1035),A=n(1036),w=n(1037),x=n(1042),E=n(742),O=n(18),S=n(336);function P(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 C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){T(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function T(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return I(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 I(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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}var L=document.querySelector("meta[name=default-map-style-url]").getAttribute("content");e.default=Object(p.a)((function(){var t,e,n=Object(d.useStore)(),a=n.mapViewport,c=n.activePin,p=n.setActivePin,P=n.setPopoverData,T=n.setIsHovering,I=n.getCursor,j=n.collection,M=n.setClicked,R=(n.siteMeta,n.basemaps),N=R.currentBasemap,D=R.availableBasemaps,F=n.pointsStack.sortedLayers,B=n.mapViewport,z=B.setMapViewport,U=B.setMapRef,G=B.setDeckRef,V=(B.setCenterPitchBearingAndZoom,n.uiSettings),q=V.trayVisible,H=V.markersVisible,W=V.mapInteractions,X=(V.setMarkersVisible,n.overlayGroups),Y=X.enabledOverlayGroups,Z=X.pickedOverlayFeature,K=X.setPickedOverlayFeature,$=n.parentContext.parent,J=n.searchResults.filter,Q=J.centroid,tt=J.distance,et=n.siteMeta,nt=et.bbox_sw,rt=et.bbox_ne,it=et.min_zoom,ot=et.max_zoom,at=k(Object(r.useState)(a),2),st=at[0],ut=at[1],lt=Object(u.default)((function(){z({viewState:st})}),500,{leading:!1,trailing:!0});Object(r.useEffect)(lt,[st]);var ct,ft=[],ht=[];(F.map((function(t,e){"mvt"===t.type?ht.push(Object(g.getMVTIconLayer)(t,a,T,M,p,P,W)):"pmt"===t.type&&ht.push(Object(y.getPMTIconLayer)(t,a,T,M,p,P,W))})),(Object(l.f)("/map/trails/:slug")||null!==$&&void 0!==$&&$.isTrail)&&null!==j&&void 0!==j&&null!==(t=j.metadata)&&void 0!==t&&t.trail_line&&ht.unshift(Object(b.default)(j.metadata.trail_line)),(Object(l.f)("/map/routes/:slug")||null!==$&&void 0!==$&&$.isRoute)&&null!==j&&void 0!==j&&null!==(e=j.metadata)&&void 0!==e&&e.route_line)&&ht.unshift(Object(_.default)(null===j||void 0===j||null===(ct=j.metadata)||void 0===ct?void 0:ct.route_line));Object(l.f)("/map/search/results")&&Q&&tt&&ht.unshift(Object(A.default)(Q.split(" ").map(Number),tt)),Y.slice(0).reverse().map((function(t){ft.push(Object(w.default)(t,{zoom:st.zoom,setPickedOverlayFeature:K,setIsHovering:T,mapViewport:a}))}));var pt=H?[].concat(ft,ht):ft,dt=L;Object(O.hasFeature)("custom_basemaps")&&(N?dt=N.stylePath:D.length>0&&(dt=D[0].stylePath));return i.a.createElement(o.a,{className:"".concat(f.a.Map," ").concat(q?f.a.isHalfWidth:f.a.isFullWidth)},i.a.createElement(m.a,{layers:pt,viewState:st,onViewStateChange:function(t){var e=t.viewState;ut(function(t){return C(C({},t),{},{longitude:rt&&nt?Math.min(rt.coordinates[1],Math.max(nt.coordinates[1],t.longitude)):t.longitude,latitude:rt&&nt?Math.min(rt.coordinates[0],Math.max(nt.coordinates[0],t.latitude)):t.latitude,minZoom:Math.max(it||0,1.55),maxZoom:ot||20})}(e))},controller:{dragPan:W,scrollZoom:W,doubleClickZoom:W},ContextProvider:h.k.Provider,getCursor:function(){return I},pickMultipleObjects:!0,ref:G},i.a.createElement(h.j,{reuseMaps:!0,ref:U,preventStyleDiffing:!0,mapStyle:dt}),c&&i.a.createElement("div",null,i.a.createElement(v.default,null)),Z&&i.a.createElement("div",null,i.a.createElement(x.default,null)),i.a.createElement("div",{className:f.a.logo},i.a.createElement(S.default,{target:"_blank",linkLocation:"map"},i.a.createElement("img",{src:s.a,alt:"logo"}))),i.a.createElement(E.default,{pinsHideable:Y.length>0})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(49),a=n(7),s=n(14),u=n(71),l=n(109),c=n(17),f=n(102),h=n(21),p=n(18),d=n(453),m=n(686),g=n(454),y=n.n(g),v=n(54),b=n(144);function _(){_=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function A(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function w(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 x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var E=function(t){var e=t.path,n=t.name,r=t.onClick;return i.a.createElement("li",null,i.a.createElement(s.a,{to:e,onClick:r},n))},O=function(t){var e=t.data,n=t.onClick;if(!e)return null;var r=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({image:{url:e.image_url}},e);return i.a.createElement("div",null,i.a.createElement(b.default,{path:Object(f.getPath)(e),item:r,onClick:n,noEnterAnimation:!0}))},S=function(t){var e=t.data,n=t.onClick,r=e.map((function(t){return i.a.createElement(E,{key:"".concat(t.type,"-").concat(t.id),path:Object(f.getPath)(t),name:t.name,onClick:n})}));return i.a.createElement("div",{className:"".concat(e.length>6?y.a.hasMany:"")},i.a.createElement("ul",null,r),i.a.createElement("div",{className:y.a.scrollIndicator},i.a.createElement(u.a,{icon:l.d})))},P=function(t){var e=Object(c.useStore)(),n=e.setActivePin,a=e.activePin,s=e.setPopoverData,u=e.popoverData,l=a&&("cluster"===a.properties.type||a.properties.clustered),f=function(){n(null),s(null)};if(Object(r.useEffect)((function(){if(a){var t=function(){var t,e=(t=_().mark((function t(){var e,n,r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=Object(h.buildHeaders)({"X-Hasura-User-Token":document.querySelector("meta[name=user-token]").content}),!l){t.next=15;break}if(r=a.properties.types.map((function(t,e){var n;switch(t){case"record":n="Record";break;case"overlay":n="Humap::Overlays::OverlayGroup";break;case"collection":case"trail":case"route":case"timeline":n="Humap::Collections::Collection";break;default:n="Humap::".concat(Object(m.capitalizeFirstLetter)(t),"s::").concat(Object(m.capitalizeFirstLetter)(t))}return"gid://app/".concat(n,"/").concat(a.properties.ids[e])})),!Object(p.userIsSignedIn)()){t.next=9;break}return t.next=6,Object(d.fetchPopoverSummaryQuery)({gids:r},e);case 6:n=t.sent,t.next=12;break;case 9:return t.next=11,Object(d.fetchPopoverSummaryQuery)({gids:r});case 11:n=t.sent;case 12:s(n.point_items),t.next=25;break;case 15:if(!Object(p.userIsSignedIn)()){t.next=21;break}return t.next=18,Object(d.fetchPopoverQuery)({id:a.properties.id,type:a.properties.type},e);case 18:n=t.sent,t.next=24;break;case 21:return t.next=23,Object(d.fetchPopoverQuery)({id:a.properties.id,type:a.properties.type});case 23:n=t.sent;case 24:s(n.point_items[0]);case 25:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,s,"next",t)}function s(t){A(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();u||t()}}),[a]),!a)return null;if(!u&&!l)return null;var g=a.geometry.coordinates;return i.a.createElement(o.g,{className:l?y.a.MapPopoverList:y.a.MapPopover,longitude:g[0],latitude:g[1],closeButton:t.closeButton,tipSize:22,closeOnClick:!0,anchor:"bottom",captureScroll:!0,captureClick:!0,onClose:f},!u&&i.a.createElement(v.default,null),!!u&&(l?i.a.createElement(S,{data:u,onClick:f}):i.a.createElement(O,{data:u,onClick:f})))};P.defaultProps={closeButton:!0},e.default=Object(a.a)(P)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(223),a=n(7),s=n(17),u=n(18),l=n(49),c=n(735),f=n(743),h=n(1043),p=n(737),d=n(187),m=n.n(d);e.default=Object(a.a)((function(t){var e=Object(s.useStore)(),n=e.uiSettings,r=n.markersVisible,a=n.setMarkersVisible,d=n.displayHidePinsOption,g=n.overlayToolsVisible,y=n.setOverlayToolsVisible,v=e.overlayGroups.enabledOverlayGroups,b=e.basemaps.availableBasemaps;e.user;return i.a.createElement("div",{className:"".concat(m.a.MapTools," ").concat(g?m.a.isHidden:"")},i.a.createElement(o.a.Consumer,null,(function(t){return("desktop"===t||"wide"===t)&&i.a.createElement("div",{className:m.a.zoomControl},i.a.createElement(l.f,{showCompass:!1}))})),i.a.createElement(o.a.Consumer,null,(function(t){return("smallMobile"===t||"small"===t||"mobile"===t||"tablet"===t)&&i.a.createElement("div",{className:m.a.geolocateControl},i.a.createElement(l.b,{trackUserLocation:!0,showUserHeading:!0}))})),Object(u.hasFeature)("custom_basemaps")&&b.length>1&&i.a.createElement(c.default,null),t.pinsHideable&&d&&i.a.createElement("div",{className:"".concat(m.a.hideUnrelatedPins,"  ").concat(r?m.a.pinsVisible:m.a.pinsHidden),onClick:function(){a(!r)}},i.a.createElement("span",{className:m.a.icon}),i.a.createElement("span",{className:m.a.label},r?I18n.t("components.global.hide_pins"):I18n.t("components.global.show_pins"))),Object(u.hasFeature)("search_for_a_place")&&(Object(u.hasFeature)("search_for_a_place_with_custom_data")?i.a.createElement(h.default,null):i.a.createElement(f.default,null)),Object(u.hasFeature)("custom_legend")&&i.a.createElement(p.default,null),i.a.createElement(o.a.Consumer,null,(function(t){return("smallMobile"===t||"small"===t||"mobile"===t||"tablet"===t)&&v.length>0&&i.a.createElement("div",{className:m.a.toggleOverlayTools,onClick:function(){return y(!g)}},i.a.createElement("span",{className:m.a.icon}),i.a.createElement("span",{className:m.a.label},I18n.t("overlay_tools")))})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(7),s=n(191),u=n.n(s),l=n(17),c=n(106),f=n.n(c);function h(){h=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function p(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function d(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return m(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 m(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(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}e.default=Object(a.a)((function(t){t.bounds;var e=Object(l.useStore)(),n=e.mapViewport,a=n.centroid,s=n.setCenter,c=n.fitBounds,m=e.uiSettings.setMapInteractions,g=e.siteMeta.place_search_countries,y=d(Object(r.useState)(!1),2),v=y[0],b=y[1],_=d(Object(r.useState)(!1),2),A=_[0],w=_[1],x=d(Object(r.useState)([]),2),E=x[0],O=x[1],S=d(Object(r.useState)(""),2),P=S[0],C=S[1],T=function(t){var e={access_token:"pk.eyJ1IjoiaHVtYXAtaG9zdGluZyIsImEiOiJja2MyNTRraGYxMmJnMzFtcnI1c3VrMm5uIn0.BN87tr4QlV7jPUrIyeIC6g",autocomplete:!0,language:I18n.locale,proximity:a.split(" "),limit:10,country:g?g.join():""},n=encodeURIComponent(t),r=new URLSearchParams(e).toString();return"".concat("https://api.mapbox.com/geocoding/v5/mapbox.places/").concat(n,".json?").concat(r)};Object(r.useEffect)((function(){if(""!==P){var t=function(){var t,e=(t=h().mark((function t(){var e,n,r;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new Request(T(P)),t.next=3,fetch(e);case 3:return n=t.sent,t.next=6,n.json();case 6:(r=t.sent)&&(O(r.features),w(!0));case 8:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,s,"next",t)}function s(t){p(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();t()}}),[P]);var k=Object(r.useRef)(),I=Object(r.useRef)(),L=function(t){k.current.contains(t.target)||R()},j=function(t){t.stopPropagation()},M=function(t){m(!0)},R=function(){b(!1),w(!1),C(""),null!==I&&void 0!==I&&I.current&&(I.current.value="")};return Object(r.useEffect)((function(){return v?(document.addEventListener("click",L),k.current.addEventListener("pointerdown",j)):(document.removeEventListener("click",L),k.current.removeEventListener("pointerdown",j)),function(){document.removeEventListener("click",L),k.current.removeEventListener("pointerdown",j)}}),[v]),i.a.createElement("div",{className:"".concat(f.a.PlaceSearch," ").concat(v?f.a.isOpen:f.a.isClosed),ref:k,onMouseEnter:function(t){m(!1)},onMouseLeave:M},i.a.createElement("div",{className:f.a.buttonInput,onClick:function(){b(!0),I.current.focus()}},i.a.createElement("span",{className:f.a.icon}),i.a.createElement("div",{className:f.a.searchField},i.a.createElement("span",{className:f.a.label},I18n.t("components.global.find_place")),i.a.createElement("input",{type:"text",placeholder:I18n.t("components.global.place_name"),ref:I,onKeyUp:function(t){t.persist(),u()((function(){C(t.target.value)}),400)()}}))),i.a.createElement(o.a,null,A&&i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}},i.a.createElement("div",{className:f.a.wrapper},i.a.createElement("ul",{className:f.a.results},0===E.length?i.a.createElement("li",{className:f.a.listHeader},"No results found"):i.a.createElement(i.a.Fragment,null,E.map((function(t,e){return i.a.createElement("li",{key:"place-".concat(e)},i.a.createElement("button",{onClick:function(){return function(t){if(M(),t.bbox){var e=t.bbox;c([[e[0],e[1]],[e[2],e[3]]])}else s({coordinates:t.center,zoom:16});R()}(t)}},t.place_name))}))))))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(7),s=n(17),u=n(18),l=n(413),c=n.n(l);e.default=Object(a.a)((function(){var t=Object(u.hasFeature)("i18n"),e=Object(r.useRef)(),n=Object(s.useStore)(),a=n.siteMeta.tray_links,l=n.uiSettings,f=l.overflowToolbarVisible,h=l.setOverflowToolbarVisible,p=function(t){e.current.contains(t.target)||h(!1)},d=function(){h(!1)};Object(r.useEffect)((function(){return f?document.addEventListener("click",p):document.removeEventListener("click",p),function(){document.removeEventListener("click",p)}}),[f]);var m=function(t){var e=t.isCurrent,n=t.isPartiallyCurrent;if(e||n)return{"data-current":"current"}};return i.a.createElement(i.a.Fragment,null,t&&i.a.createElement("div",{className:"".concat(c.a.OverflowToolbar," ").concat(f?c.a.isVisible:c.a.isHidden),ref:e},f&&i.a.createElement("ul",null,a.includes("language")&&i.a.createElement("li",null,i.a.createElement(o.a,{className:c.a.languageButton,getProps:m,to:"/map/language",onClick:d},i.a.createElement("span",null,i.a.createElement("span",null,I18n.t("language_selector.title"))))),a.includes("help")&&i.a.createElement("li",null,i.a.createElement(o.a,{className:c.a.helpButton,getProps:m,to:"/map/help",onClick:d},i.a.createElement("span",null,i.a.createElement("span",null,I18n.t("help"))))))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(17),s=n(77),u=n(1046),l=n.n(u),c=n(63),f=n(70),h=n(127),p=n(78);e.default=function(){var t=Object(a.useStore)(),e=t.adjustLayoutScroll,n=t.helpTrayView;return Object(s.useParentContext)({clear:!0}),Object(r.useEffect)((function(){e("top")})),n?i.a.createElement("div",{className:l.a.HelpIndex},i.a.createElement(p.default,{title:n.title,description:I18n.t("components.help.description"),appendSiteDescription:!0}),i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(c.default,null,i.a.createElement(f.default,null,i.a.createElement("h1",null,n.title)),i.a.createElement(h.default,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:n.sanitised_content}})))))):i.a.createElement(i.a.Fragment,null)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1048),a=n.n(o),s=n(747);e.default=function(t){var e=t.terms;return i.a.createElement("ul",{className:a.a.CategoryList},e.map((function(t){return i.a.createElement(s.default,Object.assign({key:"category-list-taxonomy-".concat(t.id)},t))})))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(1047),s=n.n(a);e.default=function(t){var e=t.name,n=t.id;return i.a.createElement("li",{className:s.a.CategoryListItem},i.a.createElement(o.a,{to:"/map/search/results?taxonomy_term_ids=".concat(n)},e))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(62),a=n(595),s=n.n(a);e.default=function(t){var e,n=t.title,r=t.content,a=t.image,u=t.url,l=u.match(/^\//);try{e=l?new URL(u,"".concat(window.location.protocol,"//").concat(window.location.host)):new URL(u)}catch(f){e="#"}var c=e.hostname===window.location.hostname;return i.a.createElement("div",{className:s.a.Quickstart},i.a.createElement("a",{href:e,target:c?"_self":"_blank"},i.a.createElement("div",{className:s.a.image},i.a.createElement(o.default,Object.assign({},a,{parameters:{w:300}}))),i.a.createElement("div",{className:s.a.textContent},i.a.createElement("h3",null,n),i.a.createElement("p",null,r))))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(17),s=n(1050),u=n.n(s),l=n(63),c=n(70),f=n(127),h=n(738),p=n(77);e.default=function(){var t=Object(a.useStore)(),e=t.adjustLayoutScroll,n=t.languageTrayView;return Object(p.useParentContext)({clear:!0}),Object(r.useEffect)((function(){e("top")})),n?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{className:u.a.LanguageIndex},i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(l.default,null,i.a.createElement(c.default,null,i.a.createElement("h1",null,I18n.t("language_selector.title"))),i.a.createElement(f.default,null,i.a.createElement("p",null,I18n.t("language_selector.intro")),i.a.createElement(h.default,null))))))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(188),a=n.n(o),s=n(62),u=i.a.forwardRef((function(t,e){return i.a.createElement("div",{className:a.a.MediaGalleryImage,ref:e,"data-attachment-index":t.index},i.a.createElement("div",{className:a.a.sidebar},i.a.createElement("div",{className:a.a.pane},i.a.createElement("div",{className:a.a.caption},t.name&&i.a.createElement("h5",null,t.name),t.description&&i.a.createElement("div",{className:a.a.description},i.a.createElement("p",null,t.description)),t.transcription&&i.a.createElement("div",{className:a.a.transcription},i.a.createElement("p",null,t.transcription))),t.license&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.license"),":")," ",t.license),t.rights_statement&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.rights_statement"),":"),"  ",t.rights_statement),t.credit&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.creator"),":")," ",t.credit),t.source_link&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.source_link"),":")," ",t.source_link),t.identifier&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.identifier"),":")," ",t.identifier))),i.a.createElement("div",{className:a.a.item},i.a.createElement(s.default,Object.assign({},t,{parameters:{fit:"clip"},options:{minWidth:370,maxWidth:1740},sizes:{"(min-width:1800px)":"1740px","(max-width: 399px)":"370px","(max-width: 599px)":"570px","(max-width: 767px)":"738px","(max-width:1024px)":"964px","(max-width:1199px)":"940px","(max-width:1399px)":"1140px","(max-width:1599px)":"1340px","(max-width:1799px)":"1540px"},"data-height":t.height,"data-width":t.width,includeSizeAttributes:!0,width:10*t.width,height:10*t.height}))))}));e.default=u},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(189),a=n.n(o),s=i.a.forwardRef((function(t,e){return i.a.createElement("div",{className:a.a.MediaGalleryVideoEmbed,ref:e,"data-attachment-index":t.index},i.a.createElement("div",{className:a.a.sidebar},i.a.createElement("div",{className:a.a.pane},i.a.createElement("div",{className:a.a.caption},t.name&&i.a.createElement("h5",null,t.name),t.description&&i.a.createElement("div",{className:a.a.description},i.a.createElement("p",null,t.description)),t.transcription&&i.a.createElement("div",{className:a.a.transcription},i.a.createElement("p",null,t.transcription))),t.license&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.license"),":")," ",t.license),t.rights_statement&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.rights_statement"),":"),"  ",t.rights_statement),t.credit&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.creator"),":")," ",t.credit),t.source_link&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.source_link"),":")," ",t.source_link),t.identifier&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.identifier"),":")," ",t.identifier))),i.a.createElement("div",{className:a.a.item,dangerouslySetInnerHTML:{__html:t.html}}))}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(190),a=n.n(o),s=i.a.forwardRef((function(t,e){return i.a.createElement("div",{className:a.a.MediaGalleryAudioEmbed,ref:e,"data-attachment-index":t.index},i.a.createElement("div",{className:a.a.sidebar},i.a.createElement("div",{className:a.a.pane},i.a.createElement("div",{className:a.a.caption},t.name&&i.a.createElement("h5",null,t.name),t.description&&i.a.createElement("div",{className:a.a.description},i.a.createElement("p",null,t.description)),t.transcription&&i.a.createElement("div",{className:a.a.transcription},i.a.createElement("p",null,t.transcription))),t.license&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.license"),":")," ",t.license),t.rights_statement&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.rights_statement"),":"),"  ",t.rights_statement),t.credit&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.creator"),":")," ",t.credit),t.source_link&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.source_link"),":")," ",t.source_link),t.identifier&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.identifier"),":")," ",t.identifier))),i.a.createElement("div",{className:a.a.item,dangerouslySetInnerHTML:{__html:t.html}}))}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1319),a=n(326),s=n.n(a),u=i.a.forwardRef((function(t,e){var n={showDropdown:!0,showThumbnails:!1,showToolbar:!0,deepLinking:!0,height:800,containerId:"iiif-attachment-".concat(t.id)};return i.a.createElement("div",{className:s.a.MediaGalleryIIIFEmbed,ref:e,"data-attachment-index":t.index},i.a.createElement("div",{className:s.a.sidebar},i.a.createElement("div",{className:s.a.pane},i.a.createElement("div",{className:s.a.caption},t.name&&i.a.createElement("h5",null,t.name),t.description&&i.a.createElement("div",{className:s.a.description},i.a.createElement("p",null,t.description))),t.credit&&i.a.createElement("div",{className:s.a.attribution},t.credit))),i.a.createElement("div",{className:s.a.item},i.a.createElement(o.OpenSeadragonViewer,{manifestUrl:t.manifest_url,options:n,openSeadragonOptions:{gestureSettingsMouse:{scrollToZoom:!1},navigatorPosition:"BOTTOM_RIGHT",navigatorSizeRatio:.1,ajaxWithCredentials:!1},toolBarOptions:{showZoom:!0,showFullScreen:!0,showDownload:!1,showPreviousNext:!1}})))}));e.default=u},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1320),a=n.n(o),s=n(133),u=n.n(s),l=n(630);function c(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(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 f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(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 h(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m=i.a.forwardRef((function(t,e){var n=p(p({},t.metadata),{},{imageUrl:t.url}),o=c(Object(r.useState)(n.imageOpacity),2),s=o[0],f=o[1],h=c(Object(r.useState)({heading:n.heading,pitch:n.pitch,zoom:n.zoom}),2),d=h[0],m=h[1],g=Object(r.useRef)(),y=Object(r.useRef)(),v=Object(r.useRef)(),b=Object(r.useRef)(),_=Object(r.useRef)(),A=document.querySelector("meta[name=streetview-api-key]").getAttribute("content"),w={heading:n.imageHeading,pitch:n.imagePitch,scale:n.imageScale,opacity:n.imageOpacity},x={width:n.imageCrop.width,height:n.imageCrop.height,top:n.imageCrop.top,left:n.imageCrop.left,bottom:n.imageCrop.bottom,right:n.imageCrop.right,topCss:n.imageCrop.topCss,bottomCss:n.imageCrop.bottomCss};Object(r.useEffect)((function(){S(v,x)}),[]),Object(r.useEffect)((function(){O(w,d)}));var E={zoomControl:!1,linksControl:!1,disableDefaultUI:!0,clickToGo:!1,position:{lat:n.lat,lng:n.lng},pov:{heading:n.heading,pitch:n.pitch,zoom:n.zoom}},O=function(t,e){var n=Math.pow(2,e.zoom)/2,r=P(e,t,n),i=100*t.scale*n;y.current.style.left=r.x+"%",y.current.style.top=r.y+"%",y.current.style.width=i+"%",y.current.style.opacity=s},S=function(t,e){t.current.style.marginLeft=e.left+"%",t.current.style.marginTop=e.topCss+"%",t.current.style.marginBottom=e.bottomCss+"%",t.current.style.marginRight=e.right+"%",t.current.style.width=e.width+"%",t.current.style.height=e.height+"%"},P=function(t,e,n){var r=90/n,i=90/n,o=e.heading-t.heading;o=C(o),o/=r;var a=t.pitch-e.pitch;return{x:100*(.5+o),y:100*(.5+(a/=i))}},C=function(t){for(;t>180;)t-=360;for(;t<-180;)t+=360;return t};return i.a.createElement("div",{className:u.a.MediaGalleryStreetViewOverlay,ref:e,"data-attachment-index":t.index},i.a.createElement("div",{className:u.a.sidebar},i.a.createElement("div",{className:u.a.pane},i.a.createElement("div",{className:u.a.caption},t.name&&i.a.createElement("h5",null,t.name),t.description&&i.a.createElement("div",{className:u.a.description},i.a.createElement("p",null,t.description)),t.transcription&&i.a.createElement("div",{className:u.a.transcription},i.a.createElement("p",null,t.transcription))),t.license&&i.a.createElement("div",{className:u.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.license"),":")," ",t.license),t.rights_statement&&i.a.createElement("div",{className:u.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.rights_statement"),":")," ",t.rights_statement),t.credit&&i.a.createElement("div",{className:u.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.creator"),":")," ",t.credit),t.source_link&&i.a.createElement("div",{className:u.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.source_link"),":")," ",t.source_link),t.identifier&&i.a.createElement("div",{className:u.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.identifier"),":")," ",t.identifier))),i.a.createElement("div",{className:u.a.item},i.a.createElement("div",{className:u.a.panFrame},i.a.createElement("div",{className:u.a.opacityControl},i.a.createElement(l.a,{min:0,max:1,step:.02,onChange:function(t){return f(parseFloat(t.target.value))},value:s})),i.a.createElement("div",{className:u.a.panoramaDiv,ref:g},i.a.createElement(a.a,{apiKey:A,streetViewPanoramaOptions:E,onPovChanged:m})),i.a.createElement("div",{className:u.a.imageDiv,ref:y},i.a.createElement("img",{src:"".concat(n.imageUrl,"?w=1600"),ref:v}))),i.a.createElement("div",{className:u.a.output,ref:b}),i.a.createElement("div",{className:u.a.convertedOutput,ref:_})))}));e.default=m},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(212),a=n.n(o),s=i.a.forwardRef((function(t,e){return i.a.createElement("div",{className:a.a.MediaGallerySketchfabEmbed,ref:e,"data-attachment-index":t.index},i.a.createElement("div",{className:a.a.sidebar},i.a.createElement("div",{className:a.a.pane},i.a.createElement("div",{className:a.a.caption},t.name&&i.a.createElement("h5",null,t.name),t.description&&i.a.createElement("div",{className:a.a.description},i.a.createElement("p",null,t.description))),t.license&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.license"),":")," ",t.license),t.rights_statement&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.rights_statement"),":"),"  ",t.rights_statement),t.credit&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.creator"),":")," ",t.credit),t.source_link&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.source_link"),":")," ",t.source_link),t.identifier&&i.a.createElement("div",{className:a.a.attribution},i.a.createElement("span",null,I18n.t("components.media_gallery.identifier"),":")," ",t.identifier))),i.a.createElement("div",{className:a.a.item,dangerouslySetInnerHTML:{__html:t.html}}))}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(687),s=n.n(a),u=n(17),l=n(18),c=n(397),f=n(278);e.default=Object(o.a)((function(t){var e=t.overlay,n=Object(u.useStore)().user,r=Object(u.useStore)().siteMeta;if(!e)return null;var o=n&&n.loggedIn;return i.a.createElement("div",{className:s.a.OverlayActions},i.a.createElement("ul",null,Object(l.hasFeature)("favourites")&&o&&i.a.createElement(i.a.Fragment,null,i.a.createElement(c.default,{item:e,favourited_type:"overlay"})),r&&i.a.createElement("li",{className:s.a.shareButtons},i.a.createElement(f.default,{item:e,excerpt:e.excerpt,URL:"object"===typeof window&&window.location.href,site_title:r.site_title}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(382),u=n.n(s),l=n(396),c=n(457),f=n.n(c);function h(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=Object(o.a)((function(t){var e,n=t.link,r=t.overlay,o=(t.overlayGroup,t.name),s=null!==(e=l[r.visualisation_settings.pattern_name])&&void 0!==e?e:{},c={backgroundColor:r.visualisation_settings.color};return"fill_patterns"===r.visualisation&&(c=p(p({},c),{},{backgroundImage:"url("+u.a+")",backgroundPosition:Math.ceil(s.x/-4+1)+"px "+Math.ceil(s.y/-4+1)+"px"})),i.a.createElement("li",{className:f.a.OverlayToolGridItem,onClick:r.layerBounds?r.focusInMap:void 0},"vector"===r.type&&i.a.createElement("span",{className:f.a.overlaySwatch,style:c}),n&&i.a.createElement("span",{className:f.a.overlayTitle},i.a.createElement(a.a,{to:n},o)),!n&&i.a.createElement("span",{className:f.a.overlayTitle},o))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(8),a=n.n(o),s=n(7),u=n(30),l=n(17),c=n(307),f=n(14),h=n(419),p=n(77),d=n(102),m=n(458),g=n.n(m),y=n(148),v=n(63),b=n(70),_=n(127),A=n(78),w=n(54),x=n(144),E=n(202);function O(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return S(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 S(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(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}e.default=Object(s.a)((function(){var t=Object(l.useStore)(),e=t.overlayGroups,n=t.overlayGroups.results,o=t.searchResults,s=t.cardItems,m=t.reloadCardItems,S=t.loading,P=t.adjustLayoutScroll,C=t.mapViewport,T=C.latitude,k=C.longitude,I=C.zoom,L=C.pitch,j=C.bearing,M=O(Object(r.useState)(!1),2),R=M[0],N=M[1],D=O(Object(r.useState)([]),2),F=D[0],B=D[1];if(Object(p.useParentContext)({clear:!0}),Object(r.useEffect)((function(){P("top")})),s.filter.setSearchParameter("type",["overlay"]),Object(r.useEffect)((function(){R?(m(),B(s.results)):B(e.results)}),[R]),Object(r.useEffect)((function(){R&&(m(),B(s.results))}),[T,k,I,L,j]),S.didFail)return i.a.createElement(v.default,null,i.a.createElement(E.default,{contentType:"overlays",viewType:"index"}));var z=F.map((function(t,e){return i.a.createElement(x.default,{key:"overlay-".concat(e),path:Object(d.getPath)(t),randomEnterDelay:!0,item:t})})),U=O(Object(c.default)(e,S),1)[0];return i.a.createElement("div",{className:g.a.OverlayIndex},i.a.createElement(A.default,{title:"Overlays",description:"Browse and apply overlays to your map.",appendSiteDescription:!0}),i.a.createElement(u.a,null,i.a.createElement(u.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(v.default,null,i.a.createElement(b.default,null,i.a.createElement("h1",null,a.a.t("overlays")),i.a.createElement("div",{className:g.a.toggleWrap},i.a.createElement("span",{className:g.a.extraLabel},a.a.t("components.overlays.index.check_box_span")),i.a.createElement(h.a,{toggle:!0,label:a.a.t("components.overlays.index.check_box_text"),onChange:function(t){return N(t.target.checked)},checked:R})),i.a.createElement(f.a,{className:g.a.SearchButton,to:"/map/search/",onClick:function(){o.filter.clearSearchTypes(),o.filter.toggleSearchType("overlay")}},i.a.createElement("span",null,a.a.t("components.overlays.search_overlays")))),i.a.createElement(_.default,null,i.a.createElement("p",null," ",a.a.t("components.overlays.index.article"))),0===n.length&&S.isLoading&&i.a.createElement(w.default,null),0===n.length&&!S.isLoading&&i.a.createElement("p",null,a.a.t("components.global.empty")),n.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement(y.default,null,z),S.isLoading&&i.a.createElement(w.default,null)),i.a.createElement("div",{style:{margin:0},ref:U})))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(419),a=n(1056),s=n.n(a);e.default=function(t){return i.a.createElement("div",{className:s.a.OverlayKeeper},i.a.createElement(o.a,{label:I18n.t("components.overlays.keeper.label"),checked:t.checked,onChange:t.overlayGroup.toggle}))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1057),a=n.n(o);e.default=function(t){var e=t.overlayLayers.map((function(t){return i.a.createElement("li",{key:"overlay-".concat(t.id)},i.a.createElement("h3",null,t.name))}));return i.a.createElement("div",{className:a.a.OverlayLayersList},i.a.createElement("h2",null,I18n.t("components.overlays.layers_list.title")),i.a.createElement("ul",null,e))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(30),s=n(17),u=n(88),l=n(223),c=n(66),f=n.n(c),h=n(1054);function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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 m=i.a.memo((function(t){return t.overlayGroups.map((function(t,e){return i.a.createElement(h.default,{overlayGroup:t,index:e,key:"overlaygroup-".concat(e)})}))}));e.default=Object(o.a)((function(){var t=Object(s.useStore)(),e=t.overlayGroups,n=e.enabledOverlayGroups,o=e.setSortOrder,c=t.uiSettings,h=c.overlayToolsVisible,d=c.setOverlayToolsVisible,g=c.trayVisible,y=t.siteMeta.open_overlay_tools_automatically,v=Object(r.useRef)();Object(r.useEffect)((function(){var t,e;v.current&&(t=v.current,e=t.clientHeight,t.scrollHeight>e?v.current.classList.add(f.a.isActive):v.current.classList.remove(f.a.isActive))}),[h,n]),Object(r.useEffect)((function(){n.length>0&&y&&window.innerWidth>1024&&d(!0)}),[n]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(u.a,{onDragEnd:function(t){if(t.destination&&t.destination.index!==t.source.index){var e,r,i,a,s,u=(e=n,r=t.source.index,i=t.destination.index,a=e.map((function(t){return t.slug})),s=p(a.splice(r,1),1)[0],a.splice(i,0,s),a);o(u)}}},i.a.createElement("div",{className:"".concat(f.a.OverlayTools," ").concat(h?f.a.isOpen:f.a.isClosed," ").concat(g?"":f.a.isCentered)},i.a.createElement(a.a,null,h&&n.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement(l.a.Consumer,null,(function(t){var e={initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},duration:.25};return/(desktop|wide|medium)/.test(t)||(e={initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},duration:.25}),i.a.createElement(a.b.div,{key:"tools",initial:e.initial,animate:e.animate,exit:e.exit,transition:{ease:"easeInOut",duration:e.duration}},i.a.createElement("div",{className:f.a.toolsWrapper},i.a.createElement("h2",null,I18n.t("overlay_tools")),i.a.createElement("button",{className:f.a.hideTools,onClick:function(){return d(!h)}},"Hide tools"),i.a.createElement("div",{className:f.a.scrollPane,ref:v},i.a.createElement(u.c,{droppableId:"overlayGroups"},(function(t,e){return i.a.createElement("div",Object.assign({ref:t.innerRef},t.droppableProps,{className:e.isDraggingOver?f.a.activeDropzone:f.a.inactiveDropzone}),i.a.createElement(m,{overlayGroups:n}),t.placeholder)})))))})))),i.a.createElement(l.a.Consumer,null,(function(t){return("desktop"===t||"wide"===t)&&n.length>0&&i.a.createElement("button",{className:f.a.toggleOverlayTools,onClick:function(){return d(!h)}},"Show overlay tools")})))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(17),s=n(77),u=n(8),l=n.n(u),c=n(596),f=n.n(c),h=n(194),p=n(193),d=n(280),m=n(63),g=n(54),y=n(70),v=n(127),b=n(759),_=n(62),A=n(760),w=n(756),x=n(78),E=n(283),O=n(202),S=function(t){var e=t.overlayGroup,n=t.children;return i.a.createElement(h.default,{title:l.a.t("overlay")},e.dateRange&&e.dateRange.length>0&&i.a.createElement("span",{className:f.a.date},e.dateRange.join(" - ")),n)};e.default=Object(o.a)((function(t){var e=Object(a.useStore)().overlayGroups,n=e.loading,o=e.fetchOverlayGroup,u=e.overlayGroup;if(Object(s.useParentContext)({currentItem:u}),Object(r.useEffect)((function(){o(t.overlayId)}),[t.overlayId]),n.isLoading)return i.a.createElement(m.default,null,i.a.createElement(g.default,null));if(n.didFail)return i.a.createElement(m.default,null,i.a.createElement(O.default,{contentType:"overlay",viewType:"item"}));if(!u)return i.a.createElement("p",null);return i.a.createElement("div",{className:f.a.OverlayView},i.a.createElement(x.default,{title:u.name,description:u.sanitised_content,image:u&&u.image?u.image.url:void 0}),i.a.createElement(m.default,null,i.a.createElement(E.default,null),i.a.createElement("div",{className:f.a.trayHeader},i.a.createElement(p.default,null,l.a.t("components.overlays.view.close")),i.a.createElement(y.default,null,i.a.createElement("h1",null,u.name)),i.a.createElement(S,{overlayGroup:u},i.a.createElement(b.default,{checked:u.enabled,overlayGroup:u}))),u.image&&i.a.createElement(d.default,null,i.a.createElement(_.default,Object.assign({},u.image,{parameters:{ar:"3:2"},options:{minWidth:400,maxWidth:1024},sizes:{"(min-width:1400px)":"840px","(max-width: 399px)":"400px","(max-width: 599px)":"600px","(max-width: 799px)":"800px","(max-width:1024px)":"1024px","(max-width:1199px)":"600px","(max-width:1399px)":"700px"}}))),i.a.createElement(v.default,{layoutType:"centred"},i.a.createElement("div",{dangerouslySetInnerHTML:{__html:u.sanitised_content}})),i.a.createElement(A.default,{overlayLayers:u.overlays}),i.a.createElement(w.default,{overlay:u})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(223),s=n(7),u=n(849),l=n.n(u),c=n(1306),f=n(17),h=n(1325);function p(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n\t\tquery NavigationQuery {\n\t\t\thumap {\n\t\t\t\tpages(where: {page_location: {_eq: "main"}}, order_by: {position: asc}) {\n\t\t\t\t\tslug\n\t\t\t\t\tname\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t']);return p=function(){return t},t}e.default=Object(s.a)((function(){var t=useStaticQuery(graphql(p())),e=Object(f.useStore)().uiSettings,n=e.mobileMenuVisible,r=e.setMobileMenuVisible,s=t.humap.pages,u=function(t){r(!n)};return i.a.createElement(i.a.Fragment,null,i.a.createElement(a.a.Consumer,null,(function(t){return"smallMobile"===t||"small"===t||"mobile"===t||"tablet"===t?i.a.createElement(i.a.Fragment,null,i.a.createElement(c.default,null),i.a.createElement("div",{className:"".concat(l.a.NavigationMobile," ").concat(n?l.a.isActive:"")},i.a.createElement("ul",null,i.a.createElement("li",null,i.a.createElement(o.a,{to:"/",onClick:u},I18n.t("home"))),s.map((function(t){return i.a.createElement(h.default,{onClick:u,key:JSON.stringify(t),page:t})}))),i.a.createElement("a",{className:l.a.highlightedLink,href:"/map"},I18n.t("components.pages.navigation.explore")))):i.a.createElement("div",{className:l.a.Navigation},i.a.createElement("ul",null,i.a.createElement("li",null,i.a.createElement(o.a,{to:"/"},I18n.t("home"))),s.map((function(t){return i.a.createElement(h.default,{page:t})}))),i.a.createElement("a",{className:l.a.highlightedLink,href:"/map"},I18n.t("components.pages.navigation.explore")))})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(557),s=n(17),u=n(18),l=n(278),c=n(397),f=n(597),h=n.n(f),p=n(8),d=n.n(p),m=n(279),g=n(273);e.default=Object(o.a)((function(t){var e=t.record;if(!e)return null;var n=Object(s.useStore)(),r=n.user,o=n.siteMeta,f=e.isPublished?"unpublished":"published",p=e.isPublished?d.a.t("unpublish"):d.a.t("publish"),y=Object(a.setActionButtonAvailability)(e,r);return i.a.createElement("div",{className:h.a.RecordActions},i.a.createElement("ul",null,y.editButtonAvailable&&i.a.createElement("li",null,i.a.createElement("a",{href:"/records/".concat(e.slug,"/edit")},e.hasFinishedWizard?d.a.t("edit"):d.a.t("finish_creating"))),y.submitForModerationButtonAvailable&&i.a.createElement("li",null,i.a.createElement(m.default,{label:"Submit for approval"},(function(t,n){return i.a.createElement("div",null,i.a.createElement("h3",null,"Are you sure?"),i.a.createElement("p",null,"Once submitted you will no longer be able to make changes this record\u2026"),i.a.createElement(g.a,{label:"Cancel",onClick:function(){return n(!1)}}),i.a.createElement(g.a,{label:"Submit",primary:!0,onClick:function(){e.setState("awaiting_moderation",r),n(!1)}}))}))),y.publishButtonAvailable&&i.a.createElement("li",null,i.a.createElement("a",{onClick:function(){return e.setState(f,r)}},p)),y.awaitingModerationNotice&&i.a.createElement("li",null,i.a.createElement("span",{className:h.a.notice},"This record is awaiting approval.")),e.isPublished&&i.a.createElement(i.a.Fragment,null,Object(u.hasFeature)("favourites")&&r&&r.loggedIn&&i.a.createElement(c.default,{item:e,favourited_type:"record"}),Object(u.hasFeature)("content_feedback")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/feedback/record/".concat(e.slug)},d.a.t("give_feedback")))),o&&e.isPublished&&i.a.createElement("li",{className:h.a.shareButtons},i.a.createElement(l.default,{item:e,excerpt:e.excerpt,URL:"object"===typeof window&&window.location.href,site_title:o.site_title}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(154),s=n(18),u=n(21),l=n(17),c=n(1060),f=n.n(c),h=n(102);function p(){p=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=d,s(v,"constructor",d),s(d,"constructor",h),h.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function d(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function m(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return g(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 g(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(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}e.default=function(t){var e=t.record,n=Object(l.useStore)().user,c=m(Object(r.useState)([]),2),g=c[0],y=c[1],v=!!Object(s.hasFeature)("projects")&&"project",b=!!Object(s.hasFeature)("collections")&&"collection",_=!!Object(s.hasFeature)("trails")&&"trail",A=!!Object(s.hasFeature)("routes")&&"route";return Object(r.useEffect)((function(){var t=!0,r=[v,b,_,A].filter((function(t){return t}));if(0!==r.length){var i=function(){var e,r=(e=p().mark((function e(r){var i,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(s.userIsSignedIn)()?Object(u.buildHeaders)({"X-Hasura-User-Token":n.userToken}):{},e.next=3,Object(a.fetchRecordAssociationsQuery)(r,i);case 3:o=e.sent,t&&y(o.record_associations);case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(t){d(o,r,i,a,s,"next",t)}function s(t){d(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return r.apply(this,arguments)}}();return i({slug:e.slug,types:r}),function(){return t=!1}}}),[v,b,_]),g&&0!==g.length?i.a.createElement("div",{className:f.a.RecordAssociations},i.a.createElement("h2",null,I18n.t("components.records.record_associations.title")),i.a.createElement("ul",null,g.map((function(t){return i.a.createElement("li",{key:"record-association-".concat(t.slug,"-").concat(t.type)},i.a.createElement(o.a,{to:Object(h.getPath)(t)},t.name," ",i.a.createElement("span",null,t.type)))})))):i.a.createElement(i.a.Fragment,null)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(1061),u=n.n(s);e.default=Object(o.a)((function(){return i.a.createElement("div",{className:u.a.RecordBoothCloseButton},i.a.createElement(a.a,{to:"/map/browse"},i.a.createElement("span",null,"Close")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(1063),u=n.n(s);e.default=Object(o.a)((function(t){var e=t.record;return e.linkable_keywords.length?i.a.createElement("div",{className:u.a.RecordKeywords},i.a.createElement("h2",null,I18n.t("keywords")),i.a.createElement("ul",null,e.linkable_keywords.map((function(t){return i.a.createElement("li",{key:t},i.a.createElement(a.a,{to:"/map/search/results?q=".concat(t)},t))})))):null}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(71),s=n(109),u=n(1064),l=n.n(u);e.default=Object(o.a)((function(t){var e=t.record;return e.links.length?i.a.createElement("div",{className:l.a.RecordLinks},i.a.createElement("h2",null,I18n.t("links")),i.a.createElement("ul",null,e.links.map((function(t){var e=t.url.match(/^\//);return i.a.createElement("li",{key:t.url},i.a.createElement("a",{href:t.url,target:e?"_self":"_blank",title:e?"":"Open external link in a new window"},t.name,!e&&i.a.createElement(a.a,{icon:s.h})))})))):null}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(154),a=n(54),s=n(313),u=n(148),l=n(1065),c=n.n(l);function f(){f=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function h(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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}e.default=function(t){var e=t.record,n=p(Object(r.useState)(!1),2),l=n[0],d=n[1],m=p(Object(r.useState)(null),2),g=m[0],y=m[1];if(Object(r.useEffect)((function(){var t=!0,n=function(){var e,n=(e=f().mark((function e(n){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,Object(o.fetchRelatedRecordsQuery)(n);case 3:r=e.sent,t&&(d(!1),y(r));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(t){h(o,r,i,a,s,"next",t)}function s(t){h(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}();return n({slug:e.slug,limit:3,type:["record","collection"]}),function(){t=!1}}),[e]),l||null===g)return i.a.createElement(a.default,null);var v=Object(s.buildCardItems)(g.related_records,!0);return i.a.createElement("div",{className:c.a.RecordRelatedRecords},v.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,I18n.t("components.records.related_records.title")),i.a.createElement(u.default,null,v)))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1066),a=n.n(o);e.default=function(t){var e=t.children;return i.a.createElement("div",{className:a.a.RecordTextContent},e)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(280),a=n(7),s=n(14),u=n(8),l=n.n(u),c=n(415),f=n.n(c),h=n(62),p=n(78),d=n(54);e.default=Object(a.a)((function(t){var e,n=t.record;if(!n.hero_attachment_type||!n.hero_attachment_id)return i.a.createElement(i.a.Fragment,null);if(n.hero_attachment_type&&n.hero_attachment_id&&!n.heroAttachment)return i.a.createElement("div",{className:f.a.TrayHeroPlaceholder},i.a.createElement(d.default,null));var r=function(){switch(n.hero_attachment_type){case"image":case"street_view_overlay":return n.heroAttachment;default:return n.heroAttachment.image}};return i.a.createElement(o.default,null,i.a.createElement(p.default,{image:null===(e=r())||void 0===e?void 0:e.url}),r()&&i.a.createElement(s.a,{to:"/map/records/".concat(n.slug,"/gallery/1")},i.a.createElement(h.default,Object.assign({},r(),{parameters:{ar:"3:2"},options:{minWidth:400,maxWidth:1024},sizes:{"(min-width:1400px)":"840px","(max-width: 399px)":"400px","(max-width: 599px)":"600px","(max-width: 799px)":"800px","(max-width:1024px)":"1024px","(max-width:1199px)":"600px","(max-width:1399px)":"700px"},loading:"eager"})),i.a.createElement("span",{className:f.a.galleryIndicator},function(){switch(n.hero_attachment_type){case"image":return n.allAttachments.length>1?l.a.t("components.records.tray_hero.image_in_gallery"):l.a.t("components.records.tray_hero.view_image");case"video_embed":return n.allAttachments.length>1?l.a.t("components.records.tray_hero.video_in_gallery"):l.a.t("components.records.tray_hero.play_video");case"audio_embed":return l.a.t("components.records.tray_hero.audio_in_gallery");case"street_view_overlay":return l.a.t("components.records.tray_hero.street_view_in_gallery");case"sketchfab_embed":return l.a.t("components.records.tray_hero.sketchfab_in_gallery");default:return l.a.t("components.records.tray_hero.image_in_gallery")}}()),"video_embed"===n.hero_attachment_type&&i.a.createElement("span",{className:f.a.videoIndicator}),"audio_embed"===n.hero_attachment_type&&i.a.createElement("span",{className:f.a.audioIndicator}),"street_view_overlay"===n.hero_attachment_type&&i.a.createElement("span",{className:f.a.streetViewIndicator})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(62),u=n(689),l=n.n(u),c=n(54);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 h(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){p(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 p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=Object(o.a)((function(t){var e=t.recordId,n=t.attachments;if(t.loading)return i.a.createElement(c.default,null);var r=n.map((function(t,n){var r;return t.hasOwnProperty("image")&&t.image.url?r=h({},t.image):t.hasOwnProperty("url")&&(r=h({},t)),i.a.createElement("li",{className:l.a[t.type],key:"attachment-".concat(t.type,"-").concat(t.id)},i.a.createElement(a.a,{to:"/map/records/".concat(e,"/gallery/").concat(n+1)},i.a.createElement(s.default,Object.assign({},r,{parameters:{ar:"3:2"},options:{minWidth:200,maxWidth:512}}))))}));return i.a.createElement("div",{className:l.a.MediaList},i.a.createElement("ul",null,r))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1068),a=n.n(o);function s(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return u(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 u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(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 l="commento-script",c=function(t){var e=t.id,n=t.cssOverride,o=t.autoInit,a=t.noFonts,u=t.hideDeleted,c=t.pageId;return Object(r.useEffect)((function(){if(window){var t=window.document;return t.getElementById("commento")&&function(t,e,n,r){var i=window.document.createElement("script");i.async=!0,i.src=t,i.id=e,Object.entries(r).forEach((function(t){var e=s(t,2),n=e[0],r=e[1];void 0!==r&&i.setAttribute("data-".concat(n),r.toString())})),n.appendChild(i)}("https://commento.humap.site/js/commento.js",l,t.body,{"css-override":n,"auto-init":o,"no-fonts":a,"hide-deleted":u,"page-id":c,"no-livereload":!0}),function(){return function(t,e){var n=window.document.getElementById(t);n&&e.removeChild(n)}(l,t.body)}}}),[e]),i.a.createElement("div",{key:e,id:"commento"})};e.default=function(t){var e=t.record;return i.a.createElement("div",{className:a.a.Comments},i.a.createElement("h2",null,"Comments"),i.a.createElement(c,{id:e.id,noFonts:!0}))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(419),s=n(1138),u=n(1335),l=n(459),c=n.n(l);function f(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(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 h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(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}e.default=Object(o.a)((function(t){var e=t.taxonomy,n=e.terms.map((function(t){return t.toOption})),o=f(Object(r.useState)(n),2),l=o[0],h=o[1],p=f(Object(r.useState)([]),2),d=p[0],m=p[1];return i.a.createElement("div",{className:c.a.FormFieldTaxonomyCheckboxes},i.a.createElement("div",null,e.terms.length>36?i.a.createElement(s.a,{label:e.name,name:"search",className:c.a.multipleSelectWrap},i.a.createElement(u.a,{multiple:!0,size:"medium",placeholder:"".concat(e.name),searchPlaceholder:"Search\u2026",value:d,labelKey:"name",options:l,onChange:function(t){var e=t.value;m(e)},closeOnChange:!1,onClose:function(){return h(l)},onSearch:function(t){var e=t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),r=new RegExp(e,"i");h(n.filter((function(t){return r.test(t.name)})))},children:function(t,n,r){return function(t,n,r){var o=e.terms.find((function(e){return e.id===t.id}));return i.a.createElement("div",{className:o.checked?"is-selected":"",style:c.a,onClick:o.toggle},i.a.createElement(a.a,{key:"term-".concat(o.id),label:o.name,value:o.id,checked:o.checked}))}(t)}})):i.a.createElement(s.a,{label:e.name,name:"search",className:c.a.checkBoxesWrap},e.orderedTerms.map((function(t){return i.a.createElement(a.a,{key:"term-".concat(t.id),label:t.name,value:t.id,checked:t.checked,onChange:t.toggle})})))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(690),s=n.n(a),u=n(776);e.default=Object(o.a)((function(t){var e=t.taxonomy;return i.a.createElement("div",{className:s.a.FormFieldTaxonomyNested},i.a.createElement("h2",null,e.name),i.a.createElement("div",{className:s.a.HierarchicalTermList},e.terms.map((function(t){return i.a.createElement(u.default,{key:"term-".concat(t.id),taxonomy:e,term:t})}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(419),a=n(71),s=n(109),u=n(7),l=n(375),c=n.n(l);function f(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(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 h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(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}e.default=Object(u.a)((function(t){var e=function(){return t.term.allChecked?c.a.AllChecked:t.term.partiallyChecked?c.a.PartiallyChecked:""},n=f(Object(r.useState)(!1),2),u=n[0],l=n[1],h=(Object(r.useMemo)((function(){return e()})),Object(r.useRef)()),p=function t(e){h.current&&!h.current.contains(e.target)&&(l(!1),document.removeEventListener("click",t))};return i.a.createElement("div",{className:"".concat(c.a.FormFieldTaxonomyNestedItem," ").concat(e())},i.a.createElement(o.a,{label:t.term.name,onChange:t.term.toggleAllSubTerms,checked:t.term.allChecked,indeterminate:t.term.partiallyChecked}),i.a.createElement("a",{onClick:function(){u||(l(!0),document.addEventListener("click",p))},className:c.a.refineButton},i.a.createElement(a.a,{icon:s.d})),u&&t.taxonomy.hasSubTerms&&i.a.createElement("div",{className:c.a.childTerms,ref:h},t.term.sub_terms.map((function(t){return i.a.createElement("div",{key:t.id,className:c.a.childTerm},i.a.createElement(o.a,{label:t.name,checked:t.isChecked,onChange:t.toggle}))}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1138),s=n(1335),u=n(598),l=n.n(u);e.default=Object(o.a)((function(t){var e=t.taxonomy,n=e.terms.find((function(t){return t.checked}))||null,r=n?n.name:null;return i.a.createElement("div",{className:l.a.FormFieldTaxonomyDropdown},i.a.createElement("div",{className:l.a.Something},i.a.createElement(a.a,{className:l.a.selectWrap,label:e.name,name:"search"},i.a.createElement(s.a,{id:"select",name:"select",placeholder:"Filter by ".concat(e.name.toLowerCase()),value:r,options:e.terms.map((function(t){return t.name})),onChange:function(t){return function(t){e.terms.forEach((function(t){return t.setChecked(!1)})),(e.terms.find((function(e){return e.name==t}))||null).setChecked(!0)}(t.option)}}))))}))},function(t,e,n){"use strict";n.r(e),n.d(e,"TrayMetadata",(function(){return u}));var r=n(0),i=n.n(r),o=n(18),a=n(416),s=n.n(a),u=function(t){var e=Object.keys(t.metadata).map((function(e,n){return i.a.createElement("span",{key:"metadata-".concat(n)},t.metadata[e]," ",e,function(t,e){if(!/s$/.test(t)&&(0===e||e>1))return"s"}(e,t.metadata[e]))}));return i.a.createElement("div",{className:s.a.Metadata},e)};u.defaultProps={contraction:""},e.default=function(t){var e=Object(o.hasFeature)("records"),n=Object(o.hasFeature)("collections"),r=Object(o.hasFeature)("trails"),a=Object(o.hasFeature)("overlays"),u=Object(o.hasFeature)("projects"),l=Object(o.hasFeature)("routes"),c=Object(o.hasFeature)("timelines"),f=function(t){return i.a.createElement("span",null,i.a.createElement("a",{className:"".concat(s.a.filterLink," ").concat(t.searchResults.filter.facet[0]===t.type&&s.a.isCurrent),onClick:function(){t.searchResults.filter.facet[0]===t.type?t.searchResults.filter.setSearchParameter("facet",[]):t.searchResults.filter.setSearchParameter("facet",[t.type])}},t.count," ",I18n.t(1===t.count?t.type:t.type+"s")))};return i.a.createElement("div",{className:"".concat(s.a.TypeFacets," ").concat(s.a.isSearch)},e&&t.recordCount>0&&i.a.createElement(f,Object.assign({count:t.recordCount,type:"record"},t)),n&&t.collectionCount>0&&i.a.createElement(f,Object.assign({count:t.collectionCount,type:"collection"},t)),l&&t.routeCount>0&&i.a.createElement(f,Object.assign({count:t.routeCount,type:"route"},t)),c&&t.timelineCount>0&&i.a.createElement(f,Object.assign({count:t.timelineCount,type:"timeline"},t)),r&&t.trailCount>0&&i.a.createElement(f,Object.assign({count:t.trailCount,type:"trail"},t)),a&&t.overlayCount>0&&i.a.createElement(f,Object.assign({count:t.overlayCount,type:"overlay"},t)),u&&t.projectCount>0&&i.a.createElement(f,Object.assign({count:t.projectCount,type:"project"},t)))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(8),a=n.n(o),s=n(7),u=n(17),l=n(1070),c=n.n(l);e.default=Object(s.a)((function(){var t=Object(u.useStore)().searchResults.resultOrder;return i.a.createElement("span",{className:c.a.CardOrder},a.a.t("components.search.search_results.order"),": ",a.a.t("components.search.search_results.".concat(t)))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1071),a=n.n(o),s=n(781);e.default=function(t){var e=t.terms;return e.length?i.a.createElement("ul",{className:a.a.SelectedTermList},e.map((function(t){var e=t.id,n=t.name,r=t.taxonomy,o=t.taxonomyIndex;return i.a.createElement(s.default,{key:"term-".concat(e),id:e,name:n,taxonomy:r,taxonomyIndex:o})}))):i.a.createElement(i.a.Fragment,null)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(691),a=n.n(o);e.default=function(t){var e=t.id,n=t.name,r=(t.taxonomy,t.taxonomyIndex);return i.a.createElement("li",{"term-id":e,className:"".concat(a.a.SelectedTermListItem," ").concat(a.a["theme"+r])},n)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(223),a=n(17),s=n(7),u=n(460),l=n.n(u),c=n(617),f=n(736),h=n(744);e.default=Object(s.a)((function(t){var e=t.children,n=Object(a.useStore)().uiSettings.trayVisible;return i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a.Consumer,null,(function(t){return"smallMobile"===t||"small"===t||"mobile"===t||"tablet"===t?i.a.createElement(i.a.Fragment,null,i.a.createElement(h.default,null),i.a.createElement(c.default,null),i.a.createElement("div",{className:"".concat(l.a.Tray)},e)):i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"".concat(l.a.Tray," ").concat(n?l.a.isOpen:l.a.isClosed)},i.a.createElement(f.default,null),i.a.createElement(c.default,null),e))})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1073),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:a.a.TrayIntro},t.children)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(171),a=n(7),s=n(14),u=n(692),l=n.n(u),c=n(17);function f(){f=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function h(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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}e.default=Object(a.a)((function(){var t=Object(c.useStore)().user,e=p(Object(r.useState)([]),2),n=e[0],a=e[1],u=t.memberships.map((function(t){return t.project.all_collection_ids.toJSON()})).flat();return Object(r.useEffect)((function(){var t=function(){var t,e=(t=f().mark((function t(){var e,n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.fetchCollectionSummaryQuery)({ids:u});case 2:return e=t.sent,t.next=5,e.collections;case 5:n=t.sent,a(n);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,s,"next",t)}function s(t){h(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();t()}),[]),n.length?i.a.createElement("div",{className:l.a.ContributeProjectCollectionsList},i.a.createElement("h2",null,I18n.t("components.user_generated_content.team_collection_list.title")),i.a.createElement("ul",null,n.map((function(t){return i.a.createElement("li",{className:l.a.project,key:"collection-".concat(t.slug)},i.a.createElement(s.a,{to:"/map/collections/".concat(t.slug)},i.a.createElement("h3",null,t.name)))})))):null}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(17),a=n(7),s=n(14),u=n(273),l=n(337),c=n(222),f=n.n(c),h=n(279),p=n(8),d=n.n(p),m=function(t){return i.a.createElement("li",{className:f.a.project},i.a.createElement(s.a,{to:"/map/contribute/projects/".concat(t.membership.project.slug)},i.a.createElement("h3",null,t.membership.project.name)),i.a.createElement("div",{className:f.a.actions},t.membership.project.hasPendingRequests&&i.a.createElement("button",null,"Requests ",i.a.createElement("span",{className:f.a.badge},t.membership.project.pendingRequests)),i.a.createElement("a",{href:"/projects/".concat(t.membership.project.id,"/edit/invites")},d.a.t("invite")),i.a.createElement("a",{href:"/projects/".concat(t.membership.project.id,"/edit")},t.membership.project.hasFinishedWizard?d.a.t("edit"):d.a.t("finish_creating")),i.a.createElement(h.default,{label:d.a.t("leave")},(function(e,n){return i.a.createElement("div",null,i.a.createElement("h3",null,d.a.t("components.user_generated_content.contribute_teams_list.confirmation")),i.a.createElement(u.a,{label:"Yes",primary:!0,onClick:function(){t.membership.cancel(),n(!1)}}),i.a.createElement(u.a,{label:"No",onClick:function(){return n(!1)}}))}))))},g=function(t){return i.a.createElement("li",{className:f.a.project},i.a.createElement(s.a,{to:"/map/contribute/projects/".concat(t.invitation.project.slug)},i.a.createElement("h3",null,t.invitation.project.name)),i.a.createElement("div",{className:f.a.actions},"invited"===t.invitation.state&&i.a.createElement("span",{className:f.a.badge},d.a.t("components.user_generated_content.contribute_teams_list.invite_received")),i.a.createElement("button",{onClick:function(){return(e=t.invitation).accept(),void Object(l.trackEvent)("joined_project",{project_id:e.project.id});var e}},d.a.t("accept")),i.a.createElement("button",{onClick:function(){return t.invitation.reject()}},d.a.t("reject"))))},y=function(t){return i.a.createElement("li",{className:f.a.project},i.a.createElement(s.a,{to:"/map/contribute/projects/".concat(t.request.project.slug)},i.a.createElement("h3",null,t.request.project.name)),i.a.createElement("div",{className:f.a.actions},i.a.createElement("span",{className:f.a.badge},d.a.t("components.user_generated_content.contribute_teams_list.membership_requested"))))};e.default=Object(a.a)((function(){var t=Object(o.useStore)().user,e=t.memberships.map((function(t){return i.a.createElement(m,{key:"user-project-".concat(t.id),membership:t})})),n=t.invitations.map((function(t){return i.a.createElement(g,{key:"user-project-".concat(t.id),invitation:t})})),r=t.requests.map((function(t){return i.a.createElement(y,{key:"user-project-".concat(t.id),request:t})}));return t?i.a.createElement("div",{className:f.a.ContributeProjectsList},(t.memberships.length>0||t.invitations.length>0||t.invitations.length>0)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,d.a.t("components.user_generated_content.contribute_teams_list.title")),i.a.createElement("ul",null,e,n,r))):i.a.createElement(i.a.Fragment,null,d.a.t("no_user"))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(17),s=n(77),u=n(18),l=n(1074),c=n.n(l),f=n(787),h=n(785),p=n(63),d=n(70),m=n(313),g=n(472),y=n(783),v=n(78),b=n(788),_=n(784);e.default=function(){var t=Object(a.useStore)(),e=t.user,n=t.adjustLayoutScroll;return Object(r.useEffect)((function(){n("top")}),[]),Object(s.useParentContext)({clear:!0}),i.a.createElement("div",{className:c.a.ContributeView},i.a.createElement(v.default,{title:"Contribute",description:"Your dashboard for creating and managing your content.",appendSiteDescription:!0}),i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(p.default,null,i.a.createElement(d.default,null,i.a.createElement("h1",null,I18n.t("components.user_generated_content.contribute_view.title")),i.a.createElement(g.default,null,i.a.createElement("a",{href:"/users/edit"},I18n.t("your_account")),i.a.createElement("a",{href:"/users/sign_out"},I18n.t("log_out")))),i.a.createElement(y.default,null,i.a.createElement("p",null,i.a.createElement("span",{dangerouslySetInnerHTML:{__html:I18n.t("components.user_generated_content.contribute_view.description")}}),"\xa0",Object(u.hasFeature)("projects")&&i.a.createElement("span",{dangerouslySetInnerHTML:{__html:I18n.t("components.user_generated_content.contribute_view.team_description")}}))),Object(u.hasFeature)("ugc")&&i.a.createElement(f.default,null),i.a.createElement(m.default,{userId:e.id,asAuthenticatedUser:!0}),i.a.createElement(h.default,null),i.a.createElement(_.default,{memberships:e.memberships}),i.a.createElement(b.default,null)))))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(18),a=n(1327),s=n.n(a),u=n(1133),l=n.n(u),c=n(1328),f=n.n(c),h=n(1134),p=n.n(h),d=n(328),m=n.n(d),g=n(17);e.default=function(t){var e=Object(g.useStore)().siteMeta.allowed_content_types;return i.a.createElement("div",{className:m.a.UserActionsList},i.a.createElement("h2",null,"Create"),i.a.createElement("ul",null,e.includes("record")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/records/new"},i.a.createElement("img",{src:s.a,alt:""}),i.a.createElement("div",{className:m.a.textContent},i.a.createElement("h3",null,I18n.t("components.user_generated_content.user_actions_list.record.title")),i.a.createElement("p",null,I18n.t("components.user_generated_content.user_actions_list.record.description"))))),Object(o.hasFeature)("collections")&&e.includes("collection")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/collections/new"},i.a.createElement("img",{src:l.a,alt:""}),i.a.createElement("div",{className:m.a.textContent},i.a.createElement("h3",null,I18n.t("components.user_generated_content.user_actions_list.collection.title")),i.a.createElement("p",null,I18n.t("components.user_generated_content.user_actions_list.collection.description"))))),Object(o.hasFeature)("trails")&&e.includes("trail")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/collections/new?type=trail"},i.a.createElement("img",{src:p.a,alt:""}),i.a.createElement("div",{className:m.a.textContent},i.a.createElement("h3",null,I18n.t("components.user_generated_content.user_actions_list.trail.title")),i.a.createElement("p",null,I18n.t("components.user_generated_content.user_actions_list.trail.description"))))),Object(o.hasFeature)("routes")&&e.includes("journey")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/collections/new?type=route"},i.a.createElement("img",{src:p.a,alt:""}),i.a.createElement("div",{className:m.a.textContent},i.a.createElement("h3",null,I18n.t("components.user_generated_content.user_actions_list.route.title")),i.a.createElement("p",null,I18n.t("components.user_generated_content.user_actions_list.route.description"))))),Object(o.hasFeature)("timelines")&&e.includes("timeline")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/collections/new?type=timeline"},i.a.createElement("img",{src:l.a,alt:""}),i.a.createElement("div",{className:m.a.textContent},i.a.createElement("h3",null,I18n.t("components.user_generated_content.user_actions_list.timeline.title")),i.a.createElement("p",null,I18n.t("components.user_generated_content.user_actions_list.timeline.description"))))),Object(o.hasFeature)("projects")&&i.a.createElement("li",null,i.a.createElement("a",{href:"/projects/new"},i.a.createElement("img",{src:f.a,alt:""}),i.a.createElement("div",{className:m.a.textContent},i.a.createElement("h3",null,I18n.t("components.user_generated_content.user_actions_list.team.title")),i.a.createElement("p",null,I18n.t("components.user_generated_content.user_actions_list.team.description")))))))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(17),a=n(7),s=n(14),u=n(18),l=n(8),c=n.n(l),f=n(601),h=n.n(f),p=n(404),d=n(21);function m(){m=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(d=y);var v=p.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function g(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function y(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return v(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 v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(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}e.default=Object(a.a)((function(){var t=y(Object(r.useState)([]),2),e=t[0],n=t[1],a=Object(o.useStore)().user;if(!a)return i.a.createElement(i.a.Fragment,null,c.a.t("no_user"));var l=a&&a.loggedIn;return Object(r.useEffect)((function(){a&&a.loggedIn;var t=function(){var t,e=(t=m().mark((function t(){var e,r,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object(d.buildHeaders)({"X-Hasura-User-Token":a.userToken}),t.next=3,Object(p.fetchFavouritesQuery)({user_id:a.id},e);case 3:return r=t.sent,t.next=6,r.favourites;case 6:i=t.sent,n(i);case 8:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){g(o,r,i,a,s,"next",t)}function s(t){g(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();t()}),[]),i.a.createElement("div",{className:h.a.FavouritesList},l&&Object(u.hasFeature)("favourites")&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,c.a.t("favourites.title")),e.length?i.a.createElement("ul",null,e.map((function(t){return i.a.createElement("li",{className:h.a.favourite,key:"favourite-".concat(t.slug)},i.a.createElement(s.a,{to:(e=t,n="project"==e.favourited_type?"/map/contribute":"/map","".concat(n,"/").concat(e.favourited_type,"s/").concat(e.slug))},i.a.createElement("h3",null,t.name)),i.a.createElement("div",{className:h.a.actions},i.a.createElement("h3",null,t.favourited_type.toUpperCase())));var e,n}))):i.a.createElement("p",null,c.a.t("favourites.no_favourites_message"))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1075),s=n.n(a),u=n(8),l=n.n(u);e.default=Object(o.a)((function(){return i.a.createElement("div",{className:s.a.CurrentUserActions},i.a.createElement("a",{href:"/users/edit"}," ",l.a.t("edit_profile")," "))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(17),s=n(278),u=n(693),l=n.n(u),c=n(8),f=n.n(c);e.default=Object(o.a)((function(t){var e=t.project,n=Object(a.useStore)(),r=n.user,o=n.siteMeta,u=!!r&&r.projects.find((function(t){return t.project.id===e.id})),c=e.isPublished?"unpublished":"published",h=e.isPublished?f.a.t("unpublish"):f.a.t("publish");return i.a.createElement("div",{className:l.a.ProjectActions},i.a.createElement("ul",null,r&&r.loggedIn&&u&&i.a.createElement(i.a.Fragment,null,e.hasFinishedWizard&&i.a.createElement("li",null,i.a.createElement("a",{onClick:function(){return e.setState(c)}},h)),i.a.createElement("li",null,i.a.createElement("a",{href:"/projects/".concat(e.slug,"/edit")},f.a.t(e.hasFinishedWizard?"edit":"finish_creating")))),o&&i.a.createElement("li",{className:l.a.shareButtons},i.a.createElement(s.default,{excerpt:e.excerpt,URL:"object"===typeof window&&window.location.href,site_title:o.site_title}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1076),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:a.a.ProjectMemberDirectory},t.children)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1078),s=n.n(a);e.default=Object(o.a)((function(t){var e=t.project,n=t.user,r=e.memberships.find((function(t){return t.membershipUser===n})),o=e.requests.find((function(t){return t.membershipUser===n})),a=e.invitations.find((function(t){return t.membershipUser===n})),u=!(r||o||a);if(window.project=e,window.user=n,!r)return i.a.createElement("div",{className:s.a.ProjectPreMemberActions},o&&i.a.createElement(i.a.Fragment,null,i.a.createElement("span",null,I18n.t("components.user_generated_content.project_pre_member_actions.pending")),i.a.createElement("button",{onClick:function(){return n.leaveProject(e.requests.find((function(t){return t.user.id===n.id})))}},I18n.t("components.user_generated_content.project_pre_member_actions.cancel"))),a&&i.a.createElement(i.a.Fragment,null,i.a.createElement("span",null,I18n.t("components.user_generated_content.project_pre_member_actions.invite")),i.a.createElement("button",{onClick:function(){return n.acceptInvitation(e.users.find((function(t){return t.user.id===n.id})))}}," ",I18n.t("components.user_generated_content.project_pre_member_actions.accept")," ")),u&&i.a.createElement(i.a.Fragment,null,i.a.createElement("span",null,I18n.t("components.user_generated_content.project_pre_member_actions.want_to_join")),i.a.createElement("button",{onClick:function(){return n.joinProject(e)}}," ",I18n.t("components.user_generated_content.project_pre_member_actions.request_to_join")," ")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(18),u=n(78),l=n(8),c=n.n(l),f=n(77),h=n(402),p=n(63),d=n(194),m=n(193),g=n(313),y=n(148),v=n(17),b=n(21),_=n(1077),A=n(280),w=n(70),x=n(127),E=n(791),O=n(792),S=n(252),P=n(790),C=n(277),T=n(602),k=n.n(T);function I(){I=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function L(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function j(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){L(o,r,i,a,s,"next",t)}function s(t){L(o,r,i,a,s,"throw",t)}a(void 0)}))}}function M(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return R(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 R(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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}e.default=Object(o.a)((function(t){var e=M(Object(r.useState)(null),2),n=e[0],o=e[1],l=Object(v.useStore)(),T=l.user,L=l.project,R=l.setProject,N=Object(s.hasFeature)("activity_logs");if(Object(f.useParentContext)({clear:!0}),Object(r.useEffect)((function(){var e=function(){var e=j(I().mark((function e(){var n,r;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Object(b.buildHeaders)({"X-Hasura-User-Token":document.querySelector("meta[name=user-token]").content}),!Object(s.userIsSignedIn)()){e.next=7;break}return e.next=4,Object(h.fetchProjectDetailsQuery)({slug:t.projectSlug},n);case 4:r=e.sent,e.next=10;break;case 7:return e.next=9,Object(h.fetchPublicProjectDetailsQuery)({slug:t.projectSlug});case 9:r=e.sent;case 10:R(r.project[0]);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),Object(r.useEffect)((function(){var t=function(){var t=j(I().mark((function t(){var e,n;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(L){t.next=2;break}return t.abrupt("return");case 2:return e=Object(b.buildHeaders)({"X-Hasura-User-Token":document.querySelector("meta[name=user-token]").content}),t.next=5,Object(h.fetchProjectCardItemsQuery)({slug:L.slug},e);case 5:n=t.sent,o(n.results);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[L]),!L||!n)return i.a.createElement(i.a.Fragment,null);var D=Object(g.buildCardItems)(n),F=n.map((function(t){return t.type})).reduce((function(t,e){return t[e]?t[e]++:t[e]=1,t}),{member:L.member_count}),B=L.invitations.filter((function(t){return t.user.id!==Object(s.currentUserId)()}));return i.a.createElement("div",{className:k.a.ProjectView},i.a.createElement(u.default,{title:L.name,description:L.sanitised_content,image:L&&L.image?L.image.url:void 0}),i.a.createElement(p.default,null,i.a.createElement("div",{className:k.a.trayHeader},i.a.createElement(m.default,null,c.a.t("components.user_generated_content.team_view.close_button")),i.a.createElement(w.default,null,i.a.createElement("h1",null,L.name)),i.a.createElement(d.default,{title:c.a.t("team")},i.a.createElement(C.default,{counts:F}))),L.image&&i.a.createElement(A.default,null,i.a.createElement("img",{src:L.image.url,alt:L.image.name})),L.sanitised_content&&i.a.createElement(x.default,{layoutType:"centred"},i.a.createElement("div",{dangerouslySetInnerHTML:{__html:L.sanitised_content}})),D&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,c.a.t("components.user_generated_content.team_view.subtitle")),i.a.createElement(y.default,null,D)),i.a.createElement(E.default,null,L&&L.memberships.length>0&&i.a.createElement("header",null,i.a.createElement("h2",null,c.a.t("components.user_generated_content.team_view.title")),i.a.createElement(_.default,{project:L,user:T})),L&&L.memberships.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement("ul",null,L.memberships.map((function(t){return i.a.createElement("li",{key:"project-user-".concat(t.id)},i.a.createElement(a.a,{to:"/map/contribute/user/".concat(t.user.id)},t.membershipUser.displayName),i.a.createElement("span",null,c.a.t("member")))})))),(L&&B.length>0||L.requests.length>0)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h3",null,c.a.t("components.user_generated_content.team_view.pending")),i.a.createElement("ul",null,L&&B.length>0&&B.map((function(t){return i.a.createElement("li",{key:"project-user-".concat(t.id)},i.a.createElement(a.a,{to:"/map/contribute/user/".concat(t.user.id)},t.membershipUser.displayName),i.a.createElement("span",null,c.a.t("invited")))})),L&&L.requests.length>0&&L.requests.map((function(t){return i.a.createElement("li",{key:"project-user-".concat(t.id)},i.a.createElement(a.a,{to:"/map/contribute/user/".concat(t.user.id)},t.membershipUser.displayName),i.a.createElement("span",null,c.a.t("components.user_generated_content.team_view.asked")),T.canGrantMembershipRequest(t,L)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:k.a.actions},i.a.createElement("a",{onClick:function(){return t.updateRequest(T,"accepted")}},c.a.t("approve")),i.a.createElement("a",{onClick:function(){return t.updateRequest(T,"rejected")}},c.a.t("deny")))))}))))),N&&i.a.createElement(S.default,{item:L,showActivityLog:!0,showFavourites:!1}),i.a.createElement(P.default,{project:L}),Object(s.userIsSignedIn)()&&i.a.createElement(O.default,{project:L,user:T})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(7),s=n(694),u=n.n(s);e.default=Object(a.a)((function(t){var e=t.user;return e?i.a.createElement("ul",{className:u.a.UserProjects},e.memberships.map((function(t){return i.a.createElement("li",{key:"project-membership-".concat(t.id)},i.a.createElement(o.a,{to:"/map/contribute/projects/".concat(t.project.slug)},i.a.createElement("div",{className:u.a.project},t.project.name)))}))):i.a.createElement(i.a.Fragment,null)}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(71),s=n(324),u=(n(62),n(272)),l=n.n(u),c=n(8);e.default=Object(o.a)((function(t){var e=t.profile;if(!e)return i.a.createElement(i.a.Fragment,null);var n=e.site_link||e.facebook||e.twitter||e.instagram||e.description;return i.a.createElement("div",{className:l.a.UserTenantProfile},i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:l.a.meta},i.a.createElement("div",{className:l.a.joinedDate}," ",i.a.createElement("strong",null," ",Object(c.t)("joined")," ")," ",e.getJoinedDate()," "),e.location&&i.a.createElement("div",{className:l.a.location}," ",i.a.createElement("strong",null," ",Object(c.t)("location")," ")," ",e.location," ")),n&&i.a.createElement("div",{className:l.a.aboutArea},i.a.createElement("div",{className:l.a.description},e.description&&i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.description}})),i.a.createElement("div",{className:l.a.links},e.site_link&&i.a.createElement("a",{className:l.a.website,href:e.site_link}," ",e.site_link," "),e.facebook&&i.a.createElement("a",{href:e.facebook,title:e.facebook}," ",i.a.createElement(a.a,{icon:s.a})," "),e.twitter&&i.a.createElement("a",{href:e.twitter,title:e.twitter}," ",i.a.createElement(a.a,{icon:s.d}),"  "),e.instagram&&i.a.createElement("a",{href:e.instagram,title:e.instagram}," ",i.a.createElement(a.a,{icon:s.c})," ")))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(17),s=n(174),u=n(18),l=n(8),c=n.n(l),f=n(77),h=n(313),p=n(63),d=n(194),m=n(193),g=n(794),y=n(70),v=n(78),b=n(795),_=n(789),A=n(1072),w=n(62),x=n(277),E=n(603),O=n.n(E);n(102);function S(){S=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function P(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function C(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){P(o,r,i,a,s,"next",t)}function s(t){P(o,r,i,a,s,"throw",t)}a(void 0)}))}}e.default=Object(o.a)((function(t){var e=Object(a.useStore)(),n=e.member,o=e.setMember,l=e.profile,E=e.setProfile,P=Object(u.hasFeature)("activity_logs");if(Object(f.useParentContext)({clear:!0}),Object(r.useEffect)((function(){var e=function(){var e=C(S().mark((function e(){var n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(s.fetchUserViewQuery)({id:t.userId});case 2:n=e.sent,o(n);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),Object(r.useEffect)((function(){if(!t.userId)return i.a.createElement(i.a.Fragment,null);var e=function(){var e=C(S().mark((function e(){var n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(s.fetchUserProfileQuery)({id:t.userId});case 2:n=e.sent,E(n.profile[0]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),!n)return null;var T=n.memberships.length>0,k=n.id==Object(u.currentUserId)(),I={};return n.aggregates.forEach((function(t){I[t.labelSingular]=t.count})),i.a.createElement("div",{className:O.a.UserView},i.a.createElement(v.default,{title:c.a.t("components.user_generated_content.current_user_view.content",{user_name:n.name}),description:c.a.t("components.user_generated_content.user_view.description"),appendSiteDescription:!0}),i.a.createElement(p.default,null,i.a.createElement("div",{className:O.a.trayHeader},i.a.createElement(m.default,null,c.a.t("components.user_generated_content.user_view.close_button")),i.a.createElement(y.default,null,l&&l.image&&l.image.url&&i.a.createElement(w.default,Object.assign({className:O.a.logoImage},l.image,{parameters:{w:60,h:60,fit:"crop"}})),i.a.createElement("h1",null,n.name)),i.a.createElement(d.default,{title:"Creator"},i.a.createElement(x.default,{counts:I}))),i.a.createElement(b.default,{profile:l}),i.a.createElement(h.default,{userId:t.userId,asAuthenticatedUser:!1}),T&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h2",null,c.a.t("components.user_generated_content.current_user_view.projects",{user_name:n.name})),i.a.createElement(g.default,{user:n})),P&&i.a.createElement(A.default,{user:n,profile:l}),k&&i.a.createElement(_.default,null)))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(398),a=n(1081),s=n.n(a),u=n(1136),l=n(223),c=n(436),f=n(798),h=Object(o.deepMerge)(f.default,{global:{spacing:"12px",colors:{focus:{dark:"#444444",light:"#CCCCCC"}},font:{family:!1,size:!1,height:!1},breakpoints:{small:{value:640},medium:!1,large:!1,smallMobile:{value:480},mobile:{value:767},tablet:{value:1024},desktop:{value:1680},wide:{value:1e4}},input:{weight:400}},rangeInput:{track:{height:"2px"},thumb:{}}});e.default=function(t){var e=t.children;return i.a.createElement(i.a.Fragment,null,i.a.createElement(u.a,{full:!0,theme:h},i.a.createElement(l.a.Consumer,null,(function(t){return i.a.createElement(c.a,{direction:"row",flex:!0,fill:!0,overflow:"auto",className:s.a.Layout,"data-responsivecontext":t},e)}))))}},function(t,e,n){"use strict";n.r(e);var r=n(695),i=n.n(r),o={name:"my theme",rounding:0,spacing:20,themeMode:"dark",global:{colors:{brand:{dark:i.a.highlightColor,light:i.a.highlightColor},background:{dark:"#111111",light:"#FFFFFF"},"background-back":{dark:"#111111",light:"#EEEEEE"},"background-front":{dark:"#222222",light:"#FFFFFF"},"background-contrast":{dark:"#FFFFFF11",light:"#11111111"},text:{dark:"#FBF7F7",light:"#262626"},"text-strong":{dark:"#FFFFFF",light:"#000000"},"text-weak":{dark:"#CCCCCC",light:"#444444"},"text-xweak":{dark:"#999999",light:"#666666"},border:{dark:"#444444",light:"#CCCCCC"},control:"brand","active-background":"background-contrast","active-text":"text-strong","selected-background":"brand","selected-text":"text-strong","status-critical":"#FF4040","status-warning":"#FFAA15","status-ok":"#00C781","status-unknown":"#CCCCCC","status-disabled":"#CCCCCC","graph-0":"brand","graph-1":"status-warning"},font:{family:"Helvetica",size:"15px",height:"20px",maxWidth:"300px"},active:{background:"active-background",color:"active-text"},hover:{background:"active-background",color:"active-text"},selected:{background:"selected-background",color:"selected-text"},borderSize:{xsmall:"1px",small:"2px",medium:"3px",large:"10px",xlarge:"20px"},breakpoints:{small:{value:640,borderSize:{xsmall:"1px",small:"2px",medium:"3px",large:"5px",xlarge:"10px"},edgeSize:{none:"0px",hair:"1px",xxsmall:"2px",xsmall:"3px",small:"5px",medium:"10px",large:"20px",xlarge:"40px"},size:{xxsmall:"20px",xsmall:"40px",small:"80px",medium:"160px",large:"320px",xlarge:"640px",full:"100%"}},medium:{value:1280},large:{}},edgeSize:{none:"0px",hair:"1px",xxsmall:"3px",xsmall:"5px",small:"10px",medium:"20px",large:"40px",xlarge:"80px",responsiveBreakpoint:"small"},input:{padding:"10px",weight:600},spacing:"20px",size:{xxsmall:"40px",xsmall:"80px",small:"160px",medium:"320px",large:"640px",xlarge:"960px",xxlarge:"1280px",full:"100%"},control:{border:{radius:"0px"}},drop:{border:{radius:"0px"}}},chart:{},diagram:{line:{}},meter:{},layer:{background:{dark:"#111111",light:"#FFFFFF"}},button:{border:{width:"2px",radius:"15px"},padding:{vertical:"3px",horizontal:"18px"}},calendar:{small:{fontSize:"11.666666666666666px",lineHeight:1.375,daySize:"22.86px"},medium:{fontSize:"15px",lineHeight:1.45,daySize:"45.71px"},large:{fontSize:"25px",lineHeight:1.11,daySize:"91.43px"}},checkBox:{size:"20px",toggle:{radius:"20px",size:"40px"},check:{radius:"0px"}},clock:{analog:{hour:{width:"7px",size:"20px"},minute:{width:"3px",size:"10px"},second:{width:"3px",size:"8px"},size:{small:"60px",medium:"80px",large:"120px",xlarge:"180px",huge:"240px"}},digital:{text:{xsmall:{size:"8.333333333333332px",height:1.5},small:{size:"11.666666666666666px",height:1.43},medium:{size:"15px",height:1.375},large:{size:"18.333333333333332px",height:1.167},xlarge:{size:"21.666666666666668px",height:1.1875},xxlarge:{size:"28.333333333333336px",height:1.125}}}},heading:{level:{1:{small:{size:"28px",height:"33px",maxWidth:"567px"},medium:{size:"42px",height:"47px",maxWidth:"833px"},large:{size:"68px",height:"73px",maxWidth:"1367px"},xlarge:{size:"95px",height:"100px",maxWidth:"1900px"}},2:{small:{size:"25px",height:"30px",maxWidth:"500px"},medium:{size:"35px",height:"40px",maxWidth:"700px"},large:{size:"45px",height:"50px",maxWidth:"900px"},xlarge:{size:"55px",height:"60px",maxWidth:"1100px"}},3:{small:{size:"22px",height:"27px",maxWidth:"433px"},medium:{size:"28px",height:"33px",maxWidth:"567px"},large:{size:"35px",height:"40px",maxWidth:"700px"},xlarge:{size:"42px",height:"47px",maxWidth:"833px"}},4:{small:{size:"18px",height:"23px",maxWidth:"367px"},medium:{size:"22px",height:"27px",maxWidth:"433px"},large:{size:"25px",height:"30px",maxWidth:"500px"},xlarge:{size:"28px",height:"33px",maxWidth:"567px"}},5:{small:{size:"13px",height:"18px",maxWidth:"267px"},medium:{size:"13px",height:"18px",maxWidth:"267px"},large:{size:"13px",height:"18px",maxWidth:"267px"},xlarge:{size:"13px",height:"18px",maxWidth:"267px"}},6:{small:{size:"12px",height:"17px",maxWidth:"233px"},medium:{size:"12px",height:"17px",maxWidth:"233px"},large:{size:"12px",height:"17px",maxWidth:"233px"},xlarge:{size:"12px",height:"17px",maxWidth:"233px"}}}},paragraph:{small:{size:"13px",height:"18px",maxWidth:"267px"},medium:{size:"15px",height:"20px",maxWidth:"300px"},large:{size:"18px",height:"23px",maxWidth:"367px"},xlarge:{size:"22px",height:"27px",maxWidth:"433px"},xxlarge:{size:"28px",height:"33px",maxWidth:"567px"}},radioButton:{size:"20px"},text:{xsmall:{size:"12px",height:"17px",maxWidth:"233px"},small:{size:"13px",height:"18px",maxWidth:"267px"},medium:{size:"15px",height:"20px",maxWidth:"300px"},large:{size:"18px",height:"23px",maxWidth:"367px"},xlarge:{size:"22px",height:"27px",maxWidth:"433px"},xxlarge:{size:"28px",height:"33px",maxWidth:"567px"}},formField:{border:{color:"#cacaca",error:{color:{dark:"white",light:"status-critical"}},position:"inner",side:"all",size:"small",style:"solid"},content:{pad:"small"},disabled:{background:{color:"status-disabled",opacity:"medium"}},error:{color:"status-critical",margin:{vertical:"xsmall",horizontal:"none"}},help:{color:"dark-3",margin:{start:"small",horizontal:"none",vertical:"small"}},info:{color:"text-xweak",margin:{vertical:"xsmall",horizontal:"small"}},label:{margin:{vertical:"xsmall",horizontal:"none"},weight:"bold"},margin:{bottom:"medium"},round:"100px"}};e.default=o},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(227),u=n(800),l=n(195),c=n(253),f=n(801),h=n(802),p=n(697),d=n.n(p);e.default=Object(o.a)((function(){var t=Object(a.useStore)(),e=t.place,n=t.isAdminMode;if(e)return i.a.createElement("div",{className:d.a.Home},i.a.createElement(s.default,null),i.a.createElement(l.default,null,i.a.createElement(c.default,null,n&&i.a.createElement("span",{className:d.a.adminModeFlag},"ADMIN MODE"),i.a.createElement("h1",null,I18n.t("placemaker.components.introduction.title")),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.intro_text}}),i.a.createElement(f.default,null)),i.a.createElement(u.default,null),i.a.createElement(h.default,null)))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(14),u=n(577),l=n.n(u);function c(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(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 f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(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}e.default=Object(o.a)((function(){var t=Object(s.g)(),e=Object(a.useStore)().place.grid,n=e.allEnabledSquares,o=e.setHighlightedSquares,u=e.setSearchResultsSquares,f=e.clearHighlightedSquares,h=c(Object(r.useState)(""),2),p=h[0],d=h[1],m=c(Object(r.useState)([]),2),g=m[0],y=m[1];Object(r.useEffect)((function(){if(p.length>2){var t=n.filter((function(t){return t.memorable_name.toLowerCase().includes(p.toLowerCase())}));y(t.map((function(t){return{name:t.memorable_name,id:t.id}}))),u(t.map((function(t){return t.id})))}else y([]),u([])}),[p]);return i.a.createElement("div",{className:l.a.Search},i.a.createElement("h2",null,"Search for a square"),i.a.createElement("input",{type:"text",placeholder:"Name of square\u2026",value:p,onChange:function(t){return d(t.target.value)}}),g.length>0&&i.a.createElement("div",null,i.a.createElement("ul",null,g.map((function(e,n){return i.a.createElement("li",{key:n},i.a.createElement("button",{type:"button",onClick:function(){return n=e.id,void t("/placemaker/squares/".concat(n));var n},onMouseEnter:function(){return t=e.id,void o([t]);var t},onMouseLeave:function(){f()}},e.name))})))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1089),s=n.n(a);e.default=Object(o.a)((function(){return i.a.createElement("div",{className:s.a.GridLegend},i.a.createElement("ul",null,i.a.createElement("li",null,I18n.t("placemaker.components.introduction.to_do")),i.a.createElement("li",null,I18n.t("placemaker.components.introduction.in_progress")),i.a.createElement("li",null,I18n.t("placemaker.components.introduction.ready_to_check")),i.a.createElement("li",null,I18n.t("placemaker.components.introduction.check_in_progress")),i.a.createElement("li",null,I18n.t("validated"))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(14),u=n(1090),l=n.n(u);e.default=Object(o.a)((function(){var t=Object(s.g)(),e=Object(a.useStore)().place,n=e.grid,r=n.allEnabledSquares,o=n.setHighlightedSquares,u=n.clearHighlightedSquares,c=e.bookmarks;if(0===c.length||0===r.length)return i.a.createElement(i.a.Fragment,null);return i.a.createElement("div",{className:l.a.BookmarksList},i.a.createElement("h2",null,"Your bookmarks"),i.a.createElement("div",null,i.a.createElement("ul",null,c.filter((function(t){return r.some((function(e){return e.id===t}))})).map((function(e,n){return i.a.createElement("li",{key:n},i.a.createElement("button",{type:"button",onClick:function(){t("/placemaker/squares/".concat(e))},onMouseEnter:function(){o([e])},onMouseLeave:function(){u()}},r.find((function(t){return t.id===e})).memorable_name))})))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(436),a=n(223),s=n(14),u=n(49),l=n(7),c=n(43),f=n(301),h=n(216),p=n(418),d=n(622),m=n(804),g=n(1092),y=n.n(g),v=n(1093),b=n(1094),_=n(1095),A=n(1096),w=n(1098),x=n(1099),E=n(1100),O=n(1101),S=n(1102),P=n(1103),C=n(1104),T=n(1105),k=n(1106),I=n(1107),L=(n(1281),n(1108)),j=n(1109),M=n(463),R=n.n(M),N=n(698),D=n(384),F=n(805),B=n(626),z=n(340),U=n(336),G=n(1117),V=["object","coordinate"];function q(t){return function(t){if(Array.isArray(t))return tt(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Q(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.")}()}function H(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 W(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 X(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?W(Object(n),!0).forEach((function(e){Y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z(){Z=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function K(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function $(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){K(o,r,i,a,s,"next",t)}function s(t){K(o,r,i,a,s,"throw",t)}a(void 0)}))}}function J(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||Q(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(t,e){if(t){if("string"===typeof t)return tt(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)?tt(t,e):void 0}}function tt(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}e.default=Object(l.a)((function(t){var e,n=Object(s.g)(),l=Object(s.e)(),g=Object(s.f)("/placemaker/all-features"),M=Object(s.f)("/placemaker/search-by-user"),W=Object(s.f)("/placemaker/search-by-user/:id"),Y=Object(s.f)("/placemaker/update-recency"),K=M||W,Q=Object(s.f)("/placemaker/edit-grid"),tt=Object(s.f)("/placemaker"),et=Object(s.f)("/placemaker/squares/:id"),nt=J(Object(r.useState)(null),2),rt=nt[0],it=nt[1],ot=Object(c.useStore)(),at=ot.place,st=ot.viewport,ut=ot.viewport.setMapRef,lt=ot.drawingMode,ct=ot.place.currentGridSquare,ft=ot.embedMetadata,ht=ot.mapRefIsSet,pt=ot.setUpdateRecencySquareInfo;if(!at)return i.a.createElement(D.default,null);Object(r.useEffect)((function(){function t(){return(t=$(Z().mark((function t(){var e;return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(v.fetchWholeGrid)({gridId:at.grid.id});case 3:e=t.sent,at.grid.addGridSquares(e.data),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error("Error fetching data:",t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[at.grid.id]),Object(r.useEffect)((function(){["/placemaker","/placemaker/","/placemaker/all-features","/placemaker/edit-grid","/placemaker/search-by-user","/placemaker/update-recency"].includes(l.pathname)&&st.fitBounds([at.bbox_sw,at.bbox_ne])}),[l.pathname,ht]);var dt=X(X({},st),{},{transitionDuration:1e3,transitionInterpolator:new u.d}),mt=[],gt=at.visibleFeatureLayers.map((function(t,e){return Object(O.buildFeaturesLayer)({place:at,featureLayer:t,drawingMode:lt,setSelectedFeatureCoordinates:it,index:e})})),yt=at.visibleFeatureLayers.map((function(t){if(t.hasRequiredFields)return Object(j.buildMetadataWarningIconsLayer)({featureLayer:t})})),vt=at.visibleFeatureLayers.map((function(t,e){return Object(w.buildNearbyFeaturesLayer)({place:at,featureLayer:t,drawingMode:lt,setSelectedFeatureCoordinates:it,index:e})}));lt.isInDrawingMode&&(gt.push(Object(x.buildDrawingNewFeatureLayer)({place:at,drawingMode:lt,embedMetadata:ft})),gt.push(Object(E.buildDrawingNewFeatureProtoPolygonLayer)({drawingMode:lt})),gt.push(Object(L.buildDrawingNewFeatureTerminatorsLayer)({drawingMode:lt}))),lt.isInMeasureMode&&gt.push(Object(P.buildMeasureLayer)({drawingMode:lt})),at.currentFeatureLayer&&at.currentFeatureLayer.selectedFeatures.length>0&&mt.push(Object(A.buildSelectedFeaturesLayer)({place:at,drawingMode:lt}));var bt={pickable:store.drawingMode.isInInspectionMode,onClick:function(t){return function(t){var e=t.object.properties,n=t.coordinate;H(t,V),at.referenceLayers.setActiveFeature(null),at.currentFeatureLayer.setActiveFeature(null),it(n);var r={fields:Object.keys(e).map((function(t,n){return{label:t,value:e[t]}})).filter((function(t){return t.value.length}))};at.referenceLayers.setActiveFeature(r)}(t)}},_t=tt?at.referenceLayers.gridViewReferenceLayers.map((function(t){return Object(d.default)(t,bt)})).filter((function(t){return t})).reverse():at.referenceLayers.visibleReferenceLayers.map((function(t){return Object(d.default)(t,bt)})).filter((function(t){return t})).reverse(),At=[].concat(q(vt),q(gt),mt,[],q(yt)),wt=[].concat(q(_t),q(At));tt&&(wt.push(Object(_.buildPickableGridLayer)({place:at,navigate:n})),wt.push(Object(k.buildPickableGridBookmarksLayer)({place:at})),wt.push(Object(I.buildPickableGridHighlightsLayer)({place:at}))),et&&ct&&wt.push(Object(b.buildCurrentGridSquareLayer)(at)),(g||K)&&wt.push(Object(S.buildSubtleGridLayer)({place:at})),Y&&wt.push(Object(T.buildUpdateRecencyGridLayer)({place:at,navigate:n,setUpdateRecencySquareInfo:pt})),Q&&wt.push(Object(C.buildEditableGridLayer)({place:at,navigate:n}));return i.a.createElement(o.a,{className:R.a.Map},i.a.createElement(a.a.Consumer,null,(function(t){return"smallMobile"===t||"mobile"===t?i.a.createElement(m.default,null):i.a.createElement(i.a.Fragment,null)})),i.a.createElement(G.default,null,i.a.createElement(p.a,{layers:[wt],initialViewState:dt,controller:{dragPan:!0,doubleClickZoom:!1},views:[new f.a({id:"basemap",repeat:!0,controller:{type:h.b,dragPan:!0,doubleClickZoom:!1}})],onViewStateChange:st.setMapViewport,ContextProvider:u.k.Provider,getCursor:function(t){return t.isDragging?"grabbing":lt.isInDrawingMode?"crosshair":t.isHovering?"pointer":"grab"},onClick:function(t){null===t.layer&&(at.currentFeatureLayer.resetSelection(),at.currentFeatureLayer.setActiveFeature(null))}},i.a.createElement(u.j,Object.assign({},dt,{ref:ut,mapStyle:"https://api.maptiler.com/maps/126e9ef0-efdb-467c-9dfd-6b004a484ab9/style.json?key=".concat("TC2voBv0sR7pmWS38FHi")})),at.currentFeatureLayer&&at.currentFeatureLayer.activeFeature&&i.a.createElement(N.default,{onClose:function(){at.currentFeatureLayer.activeFeature.resetAnnotationData(),at.currentFeatureLayer.setActiveFeature(null)},longitude:rt[0],latitude:rt[1]},i.a.createElement(B.default,null,i.a.createElement(F.default,{showForm:(null===at||void 0===at||null===(e=at.currentGridSquare)||void 0===e?void 0:e.isEditable)&&!lt.isInInspectionMode,feature:at.currentFeatureLayer.activeFeature}))),at.referenceLayers&&at.referenceLayers.hasActiveFeature&&i.a.createElement(N.default,{onClose:function(){at.referenceLayers.setActiveFeature(null),at.currentFeatureLayer.setActiveFeature(null)},longitude:rt[0],latitude:rt[1]},i.a.createElement(B.default,null,i.a.createElement(z.default,{fields:at.referenceLayers.activeFeature.fields}))),i.a.createElement("div",{className:R.a.logo},i.a.createElement(U.default,{linkLocation:"placemakerMap",target:"_blank"},i.a.createElement("img",{src:y.a,alt:"Logo"}))),i.a.createElement("div",{className:R.a.zoomControl},i.a.createElement(u.f,{onViewportChange:st.setMapViewport,showCompass:!1})),i.a.createElement("div",{className:R.a.scaleControl},i.a.createElement(u.h,null)))),t.children)}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1091),s=n.n(a);e.default=Object(o.a)((function(){return i.a.createElement("div",{className:s.a.MobileMessage},i.a.createElement("h1",null,I18n.t("placemaker.components.shared.mobile_message.title")))}))},function(t,e,n){"use strict";n.r(e),n.d(e,"FeaturePopover",(function(){return b}));var r=n(0),i=n.n(r),o=n(340),a=n(807),s=n(7),u=n(43),l=n(623),c=n(625),f=n(14),h=n(811),p=n(1115),d=n.n(p);function m(){m=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(d=y);var v=p.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function g(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function y(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return v(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 v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(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 b=function(t){var e=t.feature,n=t.showForm,s=Object(f.e)(),p=Object(f.g)(),v=Object(u.useStore)(),b=v.place,_=v.place.currentFeatureLayer,A=y(Object(r.useState)(!1),2),w=A[0],x=A[1];if(!b||!_)return i.a.createElement(i.a.Fragment,null);var E=s.pathname.includes("all-features")||s.pathname.includes("search-by-user"),O=function(){var t,n=(t=m().mark((function t(){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.updateAnnotationData();case 2:t.sent,_.setActiveFeature(null);case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){g(o,r,i,a,s,"next",t)}function s(t){g(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();return i.a.createElement("div",{className:d.a.FeaturePopover},i.a.createElement("header",null,i.a.createElement("h2",null,"Feature #",e.id),E&&i.a.createElement("span",null,"in ",i.a.createElement("strong",null,e.square_memorable_name))),n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(a.default,{fields:e.annotation_data||[]}),i.a.createElement(l.default,{feature:e}),i.a.createElement("footer",null,i.a.createElement("button",{onClick:function(){e.resetAnnotationData(),_.setActiveFeature(null)},title:I18n.t("cancel_without_saving")},I18n.t("cancel")),i.a.createElement("button",{onClick:function(){return x(!0)},title:I18n.t("get_share_link")},I18n.t("share")),i.a.createElement("button",{onClick:function(){return e.copyAnnotationData()},title:I18n.t("copy")},"Copy"),i.a.createElement("button",{onClick:function(){return e.pasteAnnotationData()},title:I18n.t("copy")},"Paste"),i.a.createElement("button",{onClick:O,disabled:!e.isValid,title:I18n.t(e.isValid?"save_data":"fix_to_save")},I18n.t("save"))),w&&i.a.createElement(c.default,{setIsShowingShareOptions:x})),!n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(o.default,{fields:e.annotation_data}),i.a.createElement(l.default,{feature:e}),i.a.createElement(h.default,{feature:e}),i.a.createElement("footer",null,E&&i.a.createElement("button",{onClick:function(){_.setActiveFeature(null),p("/placemaker/squares/".concat(e.square_id,"?feature_id=").concat(e.id))},title:I18n.t("edit_in_square")},I18n.t("edit")),i.a.createElement("button",{onClick:function(){return x(!0)},title:I18n.t("get_share_link")},I18n.t("share"))),w&&i.a.createElement(c.default,{setIsShowingShareOptions:x})))};e.default=Object(s.a)(b)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(700),s=n.n(a);e.default=Object(o.a)((function(t){var e=t.label,n=t.value,r=t.annotation_field,o=r?r.deserializeReadOnlyValueFor(n):n,a=r?r.field_name:e;return i.a.createElement("div",{className:s.a.FeatureAnnotationDataRow},i.a.createElement("h4",null,a),i.a.createElement("p",null,o||i.a.createElement("span",{className:s.a.noData},"No data")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(808),a=n(7),s=n(1112),u=n.n(s);e.default=Object(a.a)((function(t){var e=t.fields;return i.a.createElement("div",{className:u.a.FeatureAnnotationDataForm},e.map((function(t,e){return i.a.createElement(o.default,{key:"feature-data-row-".concat(e),field:t})})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(462),s=n.n(a),u=n(1111),l=n(809);e.default=Object(o.a)((function(t){var e=t.field,n=254;e.htmlInputProps.value&&(n=254-e.htmlInputProps.value.length);var r=e.isValid?"isValid":"hasError";return i.a.createElement("div",{className:"".concat(s.a.FeatureAnnotationDataFormRow," ").concat(s.a[r])},i.a.createElement("h4",null,e.annotation_field.field_name,!e.isValid&&i.a.createElement("span",{className:s.a.required},"Required")),function(t){switch(t.annotation_field.field_type){case"html":return i.a.createElement(u.default,{field:t});case"taxonomy":case"reference_layers_list":return i.a.createElement(l.default,{field:t})}}(e),"textarea"===e.annotation_field.html_tag&&i.a.createElement("p",{className:s.a.count},n,"/254"))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(379),s=n.n(a);function u(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(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 l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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}e.default=Object(o.a)((function(t){var e=t.field,n=e.value,o=e.annotation_field,a=e.annotation_field,l=a.nested,c=a.multi_choice,f=a.options,h=a.field_name,p=u(Object(r.useState)(!1),2),d=p[0],m=p[1],g=o.deserializeOverviewLabelFor(n),y=f.slice(),v=c,b=function t(n){var r=e.fieldValue.indexOf("".concat(n.id))>-1,a=n.options.length>0;if(v&&a){var s=n.options.map((function(t){return"".concat(t.id)}));r=r||e.fieldValue.filter((function(t){return s.indexOf(t)>-1})).length>0}return i.a.createElement("li",{key:"option-".concat(n.id)},i.a.createElement("label",{htmlFor:"option-choice-".concat(n.id)},n.name),(v||!v&&!a)&&i.a.createElement("input",{type:v?"checkbox":"radio",name:"field-".concat(o.id),id:"option-choice-".concat(n.id),value:n.id,onChange:e.onChange,checked:r}),a&&i.a.createElement("ul",null,n.options.map((function(e){return t(e)}))))};return i.a.createElement("div",{className:s.a.ListPicker},i.a.createElement("div",{className:s.a.valueDisplay,onClick:function(t){t.preventDefault(),m(!0)}},i.a.createElement("span",null,g),i.a.createElement("button",null,"Edit")),d&&i.a.createElement("div",{className:"".concat(s.a.listOptions," ").concat(l?s.a.nested:"")},i.a.createElement("header",null,i.a.createElement("h2",null,h),i.a.createElement("button",{className:s.a.clear,onClick:function(t){t.preventDefault(),e.onClear()}},"Clear"),i.a.createElement("button",{className:s.a.save,onClick:function(t){t.preventDefault(),m(!1)}},"Done")),i.a.createElement("ul",null,y.map((function(t){return b(t)})))))}))},function(t,e,n){"use strict";n.r(e);e.default=function(t){return window.top!==window.self&&(window.top.postMessage(t,"*"),!0)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(606),s=n.n(a),u=n(14);e.default=function(t){var e=t.feature,n=Object(u.g)(),r=Object(o.useStore)().isAdminMode,a=e.embed_metadata.filter((function(t){return null!==t&&void 0!==t}));return 0===a.length?i.a.createElement(i.a.Fragment,null):r?i.a.createElement("div",{className:s.a.FeatureUsers},i.a.createElement("h4",{className:s.a.admin},i.a.createElement("span",null,"Contributors")),a.map((function(t,e,r){return i.a.createElement(i.a.Fragment,{key:e},i.a.createElement("a",{onClick:function(){return e=t.userid,void n("/placemaker/search-by-user/".concat(e));var e}},t.username," (",t.userid,")"),e<r.length-1&&", ")})),0===e.embed_metadata.length&&i.a.createElement("span",null,"No data")):i.a.createElement("div",{className:s.a.FeatureUsers},i.a.createElement("h4",null,i.a.createElement("span",null,"Contributors")),a.map((function(t){return t.username})).join(", "),0===a.length&&i.a.createElement("span",null,"No data"))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(7),s=n(43),u=n(45),l=n(265),c=n(1127),f=n.n(c),h=n(341),p=n(333),d=n(334),m=n(384),g=n(817),y=n(818),v=n(819),b=n(820),_=n(195),A=n(821);function w(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return x(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 x(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(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 E(){E=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function O(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function S(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,s,"next",t)}function s(t){O(o,r,i,a,s,"throw",t)}a(void 0)}))}}e.default=Object(a.a)((function(t){var e=Object(s.useStore)(),n=e.mapRefSet,a=e.place,c=e.place,x=c.grid,O=c.currentGridSquare,P=c.enable_markers,C=c.enable_polygons,T=c.enable_lines,k=c.enable_trace,I=e.viewport,L=e.drawingMode,j=new URLSearchParams(window.location.search).get("feature_id");if(a.currentFeatureLayer.setHighlightedFeature(j),Object(r.useEffect)((function(){function e(){return(e=S(E().mark((function e(){var n,r;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a.setCurrentGridSquare(Number(t.id)),e.next=4,Object(l.fetchGridSquareFeatures)({grid_square_id:t.id});case 4:return n=e.sent,a.currentFeatureLayer.setFeatures(n.features),e.next=8,Object(l.fetchNearbyFeatures)({exclude_square_id:t.id,specified_feature_layer_id:a.currentFeatureLayer.id,bounding_box_geojson:Object(u.transformScale)(a.currentGridSquare.polygon,1.4)});case 8:r=e.sent,a.currentFeatureLayer.setNearbyFeatures(r.nearby_features),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.error("Error fetching data:",e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}return x&&0!==x.allGridSquares.length&&function(){e.apply(this,arguments)}(),function(){a.currentFeatureLayer.setNearbyFeatures([]),a.currentFeatureLayer.setFeatures([]),a.referenceLayers.setActiveFeature(null),a.currentFeatureLayer.setActiveFeature(null),a.setCurrentGridSquare(null),L.revertToViewMode()}}),[t.id,x.allGridSquares.length]),Object(r.useEffect)((function(){if(n&&O){var t=w(Object(u.bbox)(O.polygon),4),e=[[t[0],t[1]],[t[2],t[3]]];I.fitBounds(e)}}),[n,O]),!a.currentGridSquare)return i.a.createElement(m.default,null);var M=[{label:I18n.t("placemaker.components.grid.square.inspect_tools"),tools:[{label:I18n.t("placemaker.components.grid.square.inspect"),mode:"inspect"},{label:I18n.t("placemaker.components.grid.square.measure"),mode:"measure"}]},{label:I18n.t("placemaker.components.grid.square.create.tools"),tools:[P&&{label:I18n.t("placemaker.components.grid.square.create.markers"),mode:"marker"},C&&{label:I18n.t("placemaker.components.grid.square.create.polygon"),mode:"polygon"},k&&{label:I18n.t("placemaker.components.grid.square.trace.polygon"),mode:"trace"},T&&{label:I18n.t("placemaker.components.grid.square.create.lines"),mode:"line"}].filter(Boolean)},{label:I18n.t("placemaker.components.grid.square.snap.tools"),tools:[{label:I18n.t("placemaker.components.grid.square.snap.toggle_snap"),type:"toggle",property:"snapActive",mode:"magnet"}]},{label:I18n.t("placemaker.components.grid.square.edit.tools"),tools:[{label:I18n.t("placemaker.components.grid.square.edit.metadata"),mode:"edit-metadata"},{label:I18n.t("placemaker.components.grid.square.edit.shapes"),mode:"select"}]}],R=[{label:I18n.t("placemaker.components.grid.square.inspect_tools"),tools:[{label:I18n.t("placemaker.components.grid.square.inspect"),mode:"inspect"},{label:I18n.t("placemaker.components.grid.square.measure"),mode:"measure"}]}];return L.setEnabledTool({mode:"inspect"}),a&&a.currentFeatureLayer?i.a.createElement("div",{className:f.a.GridSquare},i.a.createElement(g.default,null),i.a.createElement(v.default,null),i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}},i.a.createElement(_.default,null,i.a.createElement(b.default,null),i.a.createElement(y.default,null),i.a.createElement(A.default,null),i.a.createElement(d.default,{layers:a.visibleFeatureLayers}),i.a.createElement(p.default,{layersCollection:a.referenceLayers})))),a.currentGridSquare&&a.currentGridSquare.isEditable&&i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}},i.a.createElement(h.default,{tools:M,actions:!0}))),a.currentGridSquare&&!a.currentGridSquare.isEditable&&i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}},i.a.createElement(h.default,{tools:R})))):i.a.createElement(i.a.Fragment,null)}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(814),a=n(815),s=n(7),u=n(1118),l=n.n(u);e.default=Object(s.a)((function(t){var e=t.toolGroup;return i.a.createElement("div",{className:l.a.ToolbarButtonGroup},e.tools&&e.tools.map((function(t,e){return"toggle"===t.type?i.a.createElement(a.default,{key:"toolbar-button-".concat(e),tool:t}):i.a.createElement(o.default,{key:"toolbar-button-".concat(e),tool:t})})))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(7),s=n(116),u=n.n(s);e.default=Object(a.a)((function(t){var e=t.tool,n=Object(o.useStore)().drawingMode,r=n.activeTool,a=n.setEnabledTool;return i.a.createElement("div",{className:"".concat(u.a.ToolbarButton," ").concat(u.a["icon--"+e.mode]," ").concat(r==e.mode?u.a.isCurrent:""),onClick:function(t){return function(t){t.preventDefault(),t.stopPropagation(),a(e)}(t)}},i.a.createElement("span",null,e.label))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(7),s=n(116),u=n.n(s);e.default=Object(a.a)((function(t){var e=t.tool,n=Object(o.useStore)().drawingMode;return i.a.createElement("div",{className:"".concat(u.a.ToolbarButton," ").concat(u.a.isToggle," ").concat(u.a["icon--"+e.mode]," ").concat(n[e.property]?u.a.isActive:""),onClick:function(t){return function(t){t.preventDefault(),t.stopPropagation(),n.toggleProperty(e.property)}(t)}},i.a.createElement("span",null,e.label))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1119),s=n.n(a);e.default=Object(o.a)((function(t){var e=t.children;return i.a.createElement("div",{className:s.a.ToolbarActions},e)}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(7),s=n(464),u=n.n(s),l=n(340);e.default=Object(a.a)((function(){var t=Object(o.useStore)(),e=t.place,n=t.annotationDataConflict,r=t.resolveConflict;if(!n)return i.a.createElement(i.a.Fragment,null);var a=e.currentFeatureLayer.features.find((function(t){return t.id===n.features[0]})),s=e.currentFeatureLayer.features.find((function(t){return t.id===n.features[1]}));return a&&s?i.a.createElement("div",{className:u.a.AnnotationConflict},i.a.createElement("header",null,i.a.createElement("h3",null,"Annotation data conflict"),i.a.createElement("p",null,"The shapes you are joining both have annotation data.",i.a.createElement("br",null),"Please pick which data to apply to the new combined shape.")),i.a.createElement("div",{className:u.a.features},i.a.createElement("div",{className:u.a.featureOne},i.a.createElement(l.default,{fields:a.annotation_data}),i.a.createElement("button",{onClick:function(){return r("first")}},"Use this data")),i.a.createElement("div",{className:u.a.featureTwo},i.a.createElement(l.default,{fields:s.annotation_data}),i.a.createElement("button",{onClick:function(){return r("second")}},"Use this data")))):i.a.createElement(i.a.Fragment,null)}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=(n(14),n(607)),u=n.n(s);e.default=Object(o.a)((function(){var t=Object(a.useStore)().cursorPosition;return i.a.createElement("div",{className:u.a.InfoPanel},i.a.createElement("div",{className:u.a.wrap},i.a.createElement("div",{className:u.a.stats},i.a.createElement("span",null,i.a.createElement("strong",null,"Lat:")," ",t&&t[1]),i.a.createElement("span",null,i.a.createElement("strong",null,"Lng:")," ",t&&t[0]))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(7),s=n(465),u=n.n(s);e.default=Object(a.a)((function(){var t=Object(o.useStore)(),e=t.place.currentGridSquare,n=t.showChangeSquareStateDialog,r=t.toggleChangeSquareStateDialog;if(!n)return i.a.createElement(i.a.Fragment,null);return i.a.createElement("div",{className:u.a.ChangeSquareStateDialog,onClick:r},i.a.createElement("div",{className:u.a.panel},i.a.createElement("header",null,i.a.createElement("h2",null,"Change grid square status to\u2026")),i.a.createElement("div",{className:u.a.states},["todo","in_progress","ready_to_check","check_in_progress","completed"].map((function(t,n){return i.a.createElement("div",{key:n,className:"".concat(t===e.state?u.a.isCurrent:"")},i.a.createElement("button",{onClick:function(n){return function(t){var n=t.event,r=t.state;n.stopPropagation(),e.updateState(r)}({event:n,state:t})}},i.a.createElement("h3",null,I18n.t("placemaker.components.grid.square_actions.".concat(t))),i.a.createElement("p",null,I18n.t("placemaker.components.grid.square_actions.".concat(t,"_description")))))})))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(14),u=n(329),l=n.n(u);e.default=Object(o.a)((function(){var t=Object(s.g)(),e=Object(a.useStore)(),n=e.place,r=e.toggleChangeSquareStateDialog,o=e.place,u=o.toggleSquareBookmarkStatus,c=o.isCurrentSquareBookmarked;if(!n)return i.a.createElement(i.a.Fragment,null);return i.a.createElement("div",{className:l.a.TitlePanel},i.a.createElement("header",null,i.a.createElement("h3",null,"This grid square"),i.a.createElement("button",{type:"button",className:"".concat(l.a.bookmarkButton," ").concat(c?l.a.isBookmarked:""),onClick:function(){return u(n.currentGridSquare.id)}}),i.a.createElement("button",{type:"button",className:l.a.closeButton,onClick:function(){n.currentFeatureLayer.resetSelection(),t("/placemaker")}})),i.a.createElement("div",{className:l.a.wrap},i.a.createElement("h4",null,n.currentGridSquare.memorable_name),i.a.createElement("div",{className:"".concat(l.a.squareState," ").concat(l.a[n.currentGridSquare.state]),onClick:r},I18n.t("placemaker.components.grid.square_actions.".concat(n.currentGridSquare.state)))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=(n(14),n(1126)),u=n.n(s);e.default=Object(o.a)((function(){var t=Object(a.useStore)().place;if(!t)return i.a.createElement(i.a.Fragment,null);var e=t.currentGridSquare.embed_metadata.filter((function(t){return null!==t&&void 0!==t}));return 0===e.length?i.a.createElement(i.a.Fragment,null):i.a.createElement("div",{className:u.a.ContributorsPanel},i.a.createElement("header",null,i.a.createElement("h3",null,"Contributors")),i.a.createElement("p",null,e.map((function(t){return t.username})).join(", ")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(7),s=n(43),u=n(265),l=n(1128),c=n.n(l),f=n(341),h=n(333),p=n(334),d=n(384),m=n(227),g=(n(653),n(195));function y(){y=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==e&&n.call(g,i)&&(d=g);var v=p.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function v(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){v(o,r,i,a,s,"next",t)}function s(t){v(o,r,i,a,s,"throw",t)}a(void 0)}))}}e.default=Object(a.a)((function(t){var e=Object(s.useStore)(),n=e.place,a=e.drawingMode.setEnabledTool;if(Object(r.useEffect)((function(){function t(){return(t=b(y().mark((function t(){var e;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(u.fetchAllFeatures)({feature_layer_id:n.currentFeatureLayer.id});case 3:e=t.sent,n.currentFeatureLayer.setFeatures(e.features),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error("Error fetching data:",t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}return function(){t.apply(this,arguments)}(),function(){n.currentFeatureLayer.setFeatures([])}}),[t.id]),!n.currentFeatureLayer.features)return i.a.createElement(d.default,null);var l=[{label:I18n.t("placemaker.components.grid.square.inspect_tools"),tools:[{label:I18n.t("placemaker.components.grid.square.inspect"),mode:"inspect"},{label:I18n.t("placemaker.components.grid.square.measure"),mode:"measure"}]}];if(a({mode:"inspect"}),!n||!n.currentFeatureLayer.features)return i.a.createElement(i.a.Fragment,null);var v={visible:{opacity:1,scale:1},hidden:{opacity:0,scale:1}};return i.a.createElement("div",{className:c.a.AllFeatures},i.a.createElement(m.default,null),i.a.createElement(o.a,{exitBeforeEnter:!0},i.a.createElement(o.b.div,{key:"modal",initial:"hidden",animate:"visible",exit:"hidden",variants:v,transition:{duration:.5}},i.a.createElement(g.default,null,i.a.createElement(p.default,{layers:n.visibleFeatureLayers}),i.a.createElement(h.default,{layersCollection:n.referenceLayers})))),i.a.createElement(o.a,{exitBeforeEnter:!0},i.a.createElement(o.b.div,{key:"modal",initial:"hidden",animate:"visible",exit:"hidden",variants:v,transition:{duration:.5}},i.a.createElement(f.default,{tools:l}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(1129),s=n.n(a),u=n(227),l=n(30),c=n(195),f=(n(334),n(333),n(253));e.default=Object(o.a)((function(){return i.a.createElement("div",{className:s.a.EditGrid},i.a.createElement(u.default,null),i.a.createElement(l.a,null,i.a.createElement(l.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}},i.a.createElement(c.default,null,i.a.createElement(f.default,null,i.a.createElement("h1",null,"Edit grid"),i.a.createElement("p",null,"You can exclude grid squares from the grid by clicking them here. Red squares are excluded - users will not be able to associate features with them."))))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(7),s=n(43),u=n(1131),l=n.n(u),c=n(227),f=n(195),h=n(253);e.default=Object(a.a)((function(t){var e=Object(s.useStore)(),n=e.place,r=e.updateRecencySquareInfo;return n&&n.currentFeatureLayer.features?i.a.createElement("div",{className:l.a.SearchByUser},i.a.createElement(c.default,null),i.a.createElement(o.a,null,i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}},i.a.createElement(f.default,null,i.a.createElement(h.default,null,i.a.createElement("h1",null,"Update recency"),i.a.createElement("p",null,"Squares which are 'In progress', 'Ready to validate', or 'Validation in progress' are considered 'stale' after 3 days (72 hours)."),i.a.createElement("p",null,"At this point, they will be displayed as grey, fading to black as they reach maximum staleness after 10 days (240 hours).")),r&&i.a.createElement(h.default,null,i.a.createElement("h1",null,"Last updated"),i.a.createElement("p",{dangerouslySetInnerHTML:{__html:r}})))))):i.a.createElement(i.a.Fragment,null)}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(17),a=n(7);function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){return t&&t.stopPropagation&&t.stopPropagation(),t&&t.preventDefault&&t.preventDefault(),!1}function l(t){return null==t?[]:Array.isArray(t)?t.slice():[t]}function c(t){return null!==t&&1===t.length?t[0]:t.slice()}function f(t){Object.keys(t).forEach((e=>{"undefined"!=typeof document&&document.addEventListener(e,t[e],!1)}))}function h(t,e){return p(function(t,e){let n=t;return n<=e.min&&(n=e.min),n>=e.max&&(n=e.max),n}(t,e),e)}function p(t,e){const n=(t-e.min)%e.step;let r=t-n;return 2*Math.abs(n)>=e.step&&(r+=n>0?e.step:-e.step),parseFloat(r.toFixed(5))}let d=function(t){function e(e){var n;(n=t.call(this,e)||this).onKeyUp=()=>{n.onEnd()},n.onMouseUp=()=>{n.onEnd(n.getMouseEventMap())},n.onTouchEnd=()=>{n.onEnd(n.getTouchEventMap())},n.onBlur=()=>{n.setState({index:-1},n.onEnd(n.getKeyDownEventMap()))},n.onMouseMove=t=>{n.setState({pending:!0});const e=n.getMousePosition(t),r=n.getDiffPosition(e[0]),i=n.getValueFromPosition(r);n.move(i)},n.onTouchMove=t=>{if(t.touches.length>1)return;n.setState({pending:!0});const e=n.getTouchPosition(t);if(void 0===n.isScrolling){const t=e[0]-n.startPosition[0],r=e[1]-n.startPosition[1];n.isScrolling=Math.abs(r)>Math.abs(t)}if(n.isScrolling)return void n.setState({index:-1});const r=n.getDiffPosition(e[0]),i=n.getValueFromPosition(r);n.move(i)},n.onKeyDown=t=>{if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey))switch(n.setState({pending:!0}),t.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":t.preventDefault(),n.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":t.preventDefault(),n.moveUpByStep();break;case"Home":t.preventDefault(),n.move(n.props.min);break;case"End":t.preventDefault(),n.move(n.props.max);break;case"PageDown":t.preventDefault(),n.moveDownByStep(n.props.pageFn(n.props.step));break;case"PageUp":t.preventDefault(),n.moveUpByStep(n.props.pageFn(n.props.step))}},n.onSliderMouseDown=t=>{if(!n.props.disabled&&2!==t.button){if(n.setState({pending:!0}),!n.props.snapDragDisabled){const e=n.getMousePosition(t);n.forceValueFromPosition(e[0],(t=>{n.start(t,e[0]),f(n.getMouseEventMap())}))}u(t)}},n.onSliderClick=t=>{if(!n.props.disabled&&n.props.onSliderClick&&!n.hasMoved){const e=n.getMousePosition(t),r=h(n.calcValue(n.calcOffsetFromPosition(e[0])),n.props);n.props.onSliderClick(r)}},n.createOnKeyDown=t=>e=>{n.props.disabled||(n.start(t),f(n.getKeyDownEventMap()),u(e))},n.createOnMouseDown=t=>e=>{if(n.props.disabled||2===e.button)return;n.setState({pending:!0});const r=n.getMousePosition(e);n.start(t,r[0]),f(n.getMouseEventMap()),u(e)},n.createOnTouchStart=t=>e=>{if(n.props.disabled||e.touches.length>1)return;n.setState({pending:!0});const r=n.getTouchPosition(e);n.startPosition=r,n.isScrolling=void 0,n.start(t,r[0]),f(n.getTouchEventMap()),function(t){t.stopPropagation&&t.stopPropagation()}(e)},n.handleResize=()=>{const t=window.setTimeout((()=>{n.pendingResizeTimeouts.shift(),n.resize()}),0);n.pendingResizeTimeouts.push(t)},n.renderThumb=(t,e)=>{const r=n.props.thumbClassName+" "+n.props.thumbClassName+"-"+e+" "+(n.state.index===e?n.props.thumbActiveClassName:""),i={ref:t=>{n["thumb"+e]=t},key:n.props.thumbClassName+"-"+e,className:r,style:t,onMouseDown:n.createOnMouseDown(e),onTouchStart:n.createOnTouchStart(e),onFocus:n.createOnKeyDown(e),tabIndex:0,role:"slider","aria-orientation":n.props.orientation,"aria-valuenow":n.state.value[e],"aria-valuemin":n.props.min,"aria-valuemax":n.props.max,"aria-label":Array.isArray(n.props.ariaLabel)?n.props.ariaLabel[e]:n.props.ariaLabel,"aria-labelledby":Array.isArray(n.props.ariaLabelledby)?n.props.ariaLabelledby[e]:n.props.ariaLabelledby},o={index:e,value:c(n.state.value),valueNow:n.state.value[e]};return n.props.ariaValuetext&&(i["aria-valuetext"]="string"==typeof n.props.ariaValuetext?n.props.ariaValuetext:n.props.ariaValuetext(o)),n.props.renderThumb(i,o)},n.renderTrack=(t,e,r)=>{const i={key:n.props.trackClassName+"-"+t,className:n.props.trackClassName+" "+n.props.trackClassName+"-"+t,style:n.buildTrackStyle(e,n.state.upperBound-r)},o={index:t,value:c(n.state.value)};return n.props.renderTrack(i,o)};let r=l(e.value);r.length||(r=l(e.defaultValue)),n.pendingResizeTimeouts=[];const o=[];for(let t=0;t<r.length;t+=1)r[t]=h(r[t],e),o.push(t);return n.resizeObserver=null,n.resizeElementRef=i.a.createRef(),n.state={index:-1,upperBound:0,sliderLength:0,value:r,zIndices:o},n}var n,r;r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,s(n,r);var o=e.prototype;return o.componentDidMount=function(){"undefined"!=typeof window&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},e.getDerivedStateFromProps=function(t,e){const n=l(t.value);return n.length?e.pending?null:{value:n.map((e=>h(e,t)))}:null},o.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},o.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},o.onEnd=function(t){t&&function(t){Object.keys(t).forEach((e=>{"undefined"!=typeof document&&document.removeEventListener(e,t[e],!1)}))}(t),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},o.getValue=function(){return c(this.state.value)},o.getClosestIndex=function(t){let e=Number.MAX_VALUE,n=-1;const{value:r}=this.state,i=r.length;for(let o=0;o<i;o+=1){const i=this.calcOffset(r[o]),a=Math.abs(t-i);a<e&&(e=a,n=o)}return n},o.getMousePosition=function(t){return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},o.getTouchPosition=function(t){const e=t.touches[0];return[e["page"+this.axisKey()],e["page"+this.orthogonalAxisKey()]]},o.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},o.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},o.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},o.getValueFromPosition=function(t){const e=t/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return h(this.state.startValue+e,this.props)},o.getDiffPosition=function(t){let e=t-this.state.startPosition;return this.props.invert&&(e*=-1),e},o.resize=function(){const{slider:t,thumb0:e}=this;if(!t||!e)return;const n=this.sizeKey(),r=t.getBoundingClientRect(),i=t[n],o=r[this.posMaxKey()],a=r[this.posMinKey()],s=e.getBoundingClientRect()[n.replace("client","").toLowerCase()],u=i-s,l=Math.abs(o-a);this.state.upperBound===u&&this.state.sliderLength===l&&this.state.thumbSize===s||this.setState({upperBound:u,sliderLength:l,thumbSize:s})},o.calcOffset=function(t){const e=this.props.max-this.props.min;return 0===e?0:(t-this.props.min)/e*this.state.upperBound},o.calcValue=function(t){return t/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},o.calcOffsetFromPosition=function(t){const{slider:e}=this,n=e.getBoundingClientRect(),r=n[this.posMaxKey()],i=n[this.posMinKey()];let o=t-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?r:i));return this.props.invert&&(o=this.state.sliderLength-o),o-=this.state.thumbSize/2,o},o.forceValueFromPosition=function(t,e){const n=this.calcOffsetFromPosition(t),r=this.getClosestIndex(n),i=h(this.calcValue(n),this.props),o=this.state.value.slice();o[r]=i;for(let a=0;a<o.length-1;a+=1)if(o[a+1]-o[a]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:o},(()=>{e(r),this.fireChangeEvent("onChange")}))},o.clearPendingResizeTimeouts=function(){do{const t=this.pendingResizeTimeouts.shift();clearTimeout(t)}while(this.pendingResizeTimeouts.length)},o.start=function(t,e){const n=this["thumb"+t];n&&n.focus();const{zIndices:r}=this.state;r.splice(r.indexOf(t),1),r.push(t),this.setState((n=>({startValue:n.value[t],startPosition:void 0!==e?e:n.startPosition,index:t,zIndices:r})))},o.moveUpByStep=function(t){void 0===t&&(t=this.props.step);const e=h(this.state.value[this.state.index]+t,this.props);this.move(Math.min(e,this.props.max))},o.moveDownByStep=function(t){void 0===t&&(t=this.props.step);const e=h(this.state.value[this.state.index]-t,this.props);this.move(Math.max(e,this.props.min))},o.move=function(t){const{index:e,value:n}=this.state,{length:r}=n,i=n[e];if(t===i)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:o,max:a,min:s,minDistance:u}=this.props;if(!o){if(e>0){const r=n[e-1];t<r+u&&(t=r+u)}if(e<r-1){const r=n[e+1];t>r-u&&(t=r-u)}}n[e]=t,o&&r>1&&(t>i?(this.pushSucceeding(n,u,e),function(t,e,n,r){for(let i=0;i<t;i+=1){const o=r-i*n;e[t-1-i]>o&&(e[t-1-i]=o)}}(r,n,u,a)):t<i&&(this.pushPreceding(n,u,e),function(t,e,n,r){for(let i=0;i<t;i+=1){const t=r+i*n;e[i]<t&&(e[i]=t)}}(r,n,u,s))),this.setState({value:n},this.fireChangeEvent.bind(this,"onChange"))},o.pushSucceeding=function(t,e,n){let r,i;for(r=n,i=t[r]+e;null!==t[r+1]&&i>t[r+1];r+=1,i=t[r]+e)t[r+1]=p(i,this.props)},o.pushPreceding=function(t,e,n){for(let r=n,i=t[r]-e;null!==t[r-1]&&i<t[r-1];r-=1,i=t[r]-e)t[r-1]=p(i,this.props)},o.axisKey=function(){return"vertical"===this.props.orientation?"Y":"X"},o.orthogonalAxisKey=function(){return"vertical"===this.props.orientation?"X":"Y"},o.posMinKey=function(){return"vertical"===this.props.orientation?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},o.posMaxKey=function(){return"vertical"===this.props.orientation?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},o.sizeKey=function(){return"vertical"===this.props.orientation?"clientHeight":"clientWidth"},o.fireChangeEvent=function(t){this.props[t]&&this.props[t](c(this.state.value),this.state.index)},o.buildThumbStyle=function(t,e){const n={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():"",zIndex:this.state.zIndices.indexOf(e)+1};return n[this.posMinKey()]=t+"px",n},o.buildTrackStyle=function(t,e){const n={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():""};return n[this.posMinKey()]=t,n[this.posMaxKey()]=e,n},o.buildMarkStyle=function(t){var e;return(e={position:"absolute"})[this.posMinKey()]=t,e},o.renderThumbs=function(t){const{length:e}=t,n=[];for(let i=0;i<e;i+=1)n[i]=this.buildThumbStyle(t[i],i);const r=[];for(let i=0;i<e;i+=1)r[i]=this.renderThumb(n[i],i);return r},o.renderTracks=function(t){const e=[],n=t.length-1;e.push(this.renderTrack(0,0,t[0]));for(let r=0;r<n;r+=1)e.push(this.renderTrack(r+1,t[r],t[r+1]));return e.push(this.renderTrack(n+1,t[n],this.state.upperBound)),e},o.renderMarks=function(){let{marks:t}=this.props;const e=this.props.max-this.props.min+1;return"boolean"==typeof t?t=Array.from({length:e}).map(((t,e)=>e)):"number"==typeof t&&(t=Array.from({length:e}).map(((t,e)=>e)).filter((e=>e%t==0))),t.map(parseFloat).sort(((t,e)=>t-e)).map((t=>{const e=this.calcOffset(t),n={key:t,className:this.props.markClassName,style:this.buildMarkStyle(e)};return this.props.renderMark(n)}))},o.render=function(){const t=[],{value:e}=this.state,n=e.length;for(let i=0;i<n;i+=1)t[i]=this.calcOffset(e[i],i);const r=this.props.withTracks?this.renderTracks(t):null,o=this.renderThumbs(t),a=this.props.marks?this.renderMarks():null;return i.a.createElement("div",{ref:t=>{this.slider=t,this.resizeElementRef.current=t},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},r,o,a)},e}(i.a.Component);d.displayName="ReactSlider",d.defaultProps={min:0,max:100,step:1,pageFn:t=>10*t,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:t=>i.a.createElement("div",t),renderTrack:t=>i.a.createElement("div",t),renderMark:t=>i.a.createElement("span",t)};var m=d,g=n(8),y=n(376),v=n.n(y),b=function(t,e){return i.a.createElement("div",Object.assign({className:v.a.thumb},t,{index:e.index}),0===e.index&&t["aria-valuemin"]===e.valueNow?i.a.createElement("div",{className:v.a.text}," ",Object(g.t)("components.search.year_slider.no_start")," "):1===e.index&&t["aria-valuemax"]===e.valueNow?i.a.createElement("div",{className:v.a.text}," ",Object(g.t)("components.search.year_slider.no_end")," "):i.a.createElement("div",{className:v.a.number}," ",e.valueNow," "))},_=function(t,e){return i.a.createElement("div",Object.assign({className:v.a.track},t,{index:e.index}))};e.default=Object(a.a)((function(t){var e=t.filterDates,n=t.setFilterDates,a=Object(o.useStore)(),s=a.siteMeta,u=a.searchResults.filter,l=u.start_date,c=u.end_date,f=s.start_date,h=s.end_date;Object(r.useEffect)((function(){n([l||f,c||h+1])}),[0===e.length]);return i.a.createElement("div",{className:v.a.YearSlider},i.a.createElement(m,{value:e.length?[e[0],e[1]-1]:[f,h],min:f,max:h,renderTrack:_,renderThumb:b,onAfterChange:function(t){t[1]++,n(t)}}))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(273),s=n(143);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},u.apply(this,arguments)}var l={invalid:"invalid",required:"required"},c={},f={},h={errors:{},infos:{}},p=function(t,e,n){var r={},i={};return t.forEach((function(t){var o=t[0],a=t[1];n||(r[o]=void 0,i[o]=void 0);var s=a(e[o],e);"object"===typeof s?"info"===s.status?i[o]=s.message:r[o]=s.message||s:"string"===typeof s&&(r[o]=s)})),[r,i]},d=Object(r.forwardRef)((function(t,e){var n=t.children,o=t.errors,a=void 0===o?h.errors:o,d=t.infos,m=void 0===d?h.infos:d,g=t.messages,y=void 0===g?l:g,v=t.onChange,b=t.onReset,_=t.onSubmit,A=t.onValidate,w=t.validate,x=void 0===w?"submit":w,E=t.value,O=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","errors","infos","messages","onChange","onReset","onSubmit","onValidate","validate","value"]),S=Object(r.useState)(E||c),P=S[0],C=S[1],T=Object(r.useMemo)((function(){return E||P}),[E,P]),k=Object(r.useState)(f),I=k[0],L=k[1],j=Object(r.useState)(h),M=j[0],R=j[1],N=Object(r.useState)(void 0),D=N[0],F=N[1];Object(r.useEffect)((function(){F(void 0),R({errors:a,infos:m})}),[a,m]);var B=Object(r.useRef)({});Object(r.useEffect)((function(){var t=setTimeout((function(){if(D){var t=p(Object.entries(B.current).filter((function(t){var e=t[0];return I[e]||e===D})),T),e=t[0],n=t[1];F(void 0),R((function(t){var r={errors:u({},t.errors,e),infos:u({},t.infos,n)};return A&&A(r),r}))}}),120);return function(){return clearTimeout(t)}}),[D,A,I,T]),Object(r.useEffect)((function(){F(void 0),R((function(t){var e=p(Object.entries(B.current).filter((function(e){var n=e[0];return t.errors[n]||t.infos[n]})),T),n=e[0],r=e[1];return{errors:u({},t.errors,n),infos:u({},t.infos,r)}}))}),[I,T]);return i.a.createElement("form",u({ref:e},O,{onReset:function(t){if(F(void 0),E||(C(c),v&&v(c,{touched:f})),L(f),R(h),b){t.persist();var e=t;e.value=c,b(e)}},onSubmit:function(t){t.preventDefault(),F(void 0);var e=p(Object.entries(B.current),T,!0),n=e[0],r=e[1];if(R((function(){var t={errors:n,infos:r};return A&&A(t),t})),0===Object.keys(n).length&&_){t.persist();var i=t;i.value=T,i.touched=I,_(i)}}}),i.a.createElement(s.a.Provider,{value:{useFormField:function(t){var e=t.error,n=t.info,i=t.name,o=t.required,a=t.validate,s=e||M.errors[i],u=n||M.infos[i];return Object(r.useEffect)((function(){var t=function(t,e,n){var r;return"function"===typeof t?r=t(e,n):t.regexp&&(t.regexp.test(e)||(r=t.message||y.invalid,t.status&&(r={message:r,status:t.status}))),r};if(a||o)return B.current[i]=function(e,n){var r;return!o||void 0!==e&&""!==e&&!1!==e?a&&(Array.isArray(a)?a.some((function(i){return!!(r=t(i,e,n))})):r=t(a,e,n)):r=y.required,r},function(){return delete B.current[i]}}),[s,i,o,a]),{error:s,info:u,inForm:!0,onBlur:"blur"===x?function(){return F(i)}:void 0}},useFormInput:function(t,e,n){var i=Object(r.useState)(n),o=i[0],a=i[1],s=t?T[t]:void 0;return Object(r.useEffect)((function(){t&&void 0!==e&&e!==s&&C((function(n){var r=u({},n);return r[t]=e,r}))}),[e,s,t]),[void 0!==e?e:E&&t&&void 0!==s?s:void 0===s&&t?n:o,function(e){if(t){var r=u({},I);r[t]=!0,I[t]||L(r);var i=u({},T);i[t]=e,C(i),v&&v(i,{touched:r})}void 0!==n&&a(e)}]}}},n))}));d.displayName="Form";var m=d,g=n(1138),y=n(1537),v=n(419),b=n(30),_=n(14),A=n(17),w=n(18),x=n(77),E=n(271),O=n.n(E),S=n(63),P=n(70),C=n(774),T=n(775),k=n(777),I=n(54),L=n(184),j=n.n(L),M=n(472),R=n(78),N=n(8),D=n.n(N),F=n(825),B=n(202);function z(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return U(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 U(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(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}e.default=Object(o.a)((function(){var t=Object(A.useStore)(),e=t.adjustLayoutScroll,n=t.loading,o=t.siteMeta,s=t.siteMeta.site_title,u=t.searchResults,l=t.searchResults.filter.taxonomies,c=t.contentTypes,f=Object(_.e)();Object(r.useEffect)((function(){var t;null!==(t=f.state)&&void 0!==t&&t.fromToolbar&&u.reset()}),[]),Object(x.useParentContext)({clear:!0});var h=Object(_.g)(),p=z(Object(r.useState)(""),2),d=p[0],E=p[1],L=z(Object(r.useState)([]),2),N=L[0],U=L[1],G=Object(w.hasFeature)("date_filtering");if(Object(r.useEffect)((function(){E(u.filter.query),e("top"),u.filter.clearFacet()}),[]),n.didFail)return i.a.createElement(S.default,null,i.a.createElement(B.default,{contentType:"search",viewType:"index"}));var V=l.results.filter((function(t){return t.show_on_form})).map((function(t){switch(t.searchType){case"single":return i.a.createElement(k.default,{taxonomy:t,key:"taxonomy-".concat(t.id)});case"multiple":return i.a.createElement(C.default,{taxonomy:t,key:"taxonomy-".concat(t.id)});case"nested":return i.a.createElement(T.default,{taxonomy:t,key:"taxonomy-".concat(t.id)});default:return i.a.createElement(i.a.Fragment,null)}})),q=function(){u.clear(),u.filter.setDateFiltering(N,[o.start_date,o.end_date]),u.filter.setSearchParameter("query",d),u.filter.setBoundedSearchBounds(),h("/map/search/results?".concat(H()))},H=function(){var t={q:u.filter.query,taxonomy_term_ids:u.filter.taxonomies.checkedIds,type:u.filter.type,start_date:u.filter.start_date,end_date:u.filter.end_date};return j.a.stringify(t,{arrayFormat:"comma",encode:!1})};return i.a.createElement("div",{className:O.a.SearchForm},i.a.createElement(R.default,{title:"Search",description:D.a.t("components.search.form.meta_description",{site_title:s}),appendSiteDescription:!0}),i.a.createElement(b.a,null,i.a.createElement(b.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},i.a.createElement(S.default,null,i.a.createElement("div",{className:"".concat(O.a.SearchFormWrap," ").concat(O.a.isForm)},i.a.createElement(P.default,null,i.a.createElement("h1",null,D.a.t("search")),(u.filter.taxonomies.hasCheckedIds||d.length>0||!u.filter.allTypesSelected||G&&!(N.includes(o.start_date)&&N.includes(o.end_date+1)))&&i.a.createElement(M.default,null,i.a.createElement(a.a,{onClick:function(){u.reset(),E(""),U([])},label:D.a.t("components.search.form.clear")}))),i.a.createElement(m,null,i.a.createElement("div",{className:O.a.primaryWrap},i.a.createElement(g.a,{label:D.a.t("components.search.form.search_label"),name:"search"},i.a.createElement(y.a,{name:"search",placeholder:D.a.t("components.search.form.search_placeholder"),value:d,onChange:function(t){return E(t.target.value)}})),i.a.createElement(a.a,{type:"submit",primary:!0,label:D.a.t("search"),onClick:q})),i.a.createElement(g.a,{className:O.a.checkBoxesWrap,label:D.a.t("components.search.form.type_label"),name:"search","data-rerender-type":u.filter.type},c.allSearchableContentTypes.map((function(t){return i.a.createElement(v.a,{key:"content-type-filter-".concat(t.name),checked:u.filter.enabledContentTypes.indexOf(t.name)>-1,onChange:function(){return u.filter.toggleSearchType(t.name)},label:D.a.t(t.label)})}))),G&&i.a.createElement(g.a,{className:O.a.YearSlider,label:D.a.t("components.search.form.date_range"),name:D.a.t("components.search.form.date_range")},i.a.createElement(F.default,{filterDates:N,setFilterDates:U})),l.loading.isLoading&&i.a.createElement(I.default,null),!l.loading.isLoading&&l.count>0&&i.a.createElement("div",null,V),i.a.createElement(g.a,{className:O.a.toggleWrap,label:D.a.t("components.search.form.area_label"),name:"search"},i.a.createElement("span",{className:O.a.extraLabel},D.a.t("components.search.form.area_extra_label")),i.a.createElement(v.a,{toggle:!0,label:D.a.t("components.search.form.area_checkbox"),onChange:u.filter.toggleBoundedSearch,checked:u.filter.boundedSearch})),i.a.createElement(a.a,{type:"submit",primary:!0,label:D.a.t("search"),onClick:q})))))))}))},function(t,e,n){"use strict";var r=n(1159),i=n(191),o=n(274),a=n(467).EventEmitter,s=n(1163),u=n(1164),l=n(1174),c=n(1182),f=n(1184),h=n(1185);function p(t){this._eventEmitter=new a,this.options=o({},this.options,t),this.inputString="",this.fresh=!0,this.lastSelected=null}p.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,minLength:2,reverseGeocode:!1,limit:5,origin:"https://api.mapbox.com",enableEventLogging:!0,marker:!0,mapboxgl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,getItemValue:function(t){return t.place_name},render:function(t){var e=t.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title">'+e[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address">'+e.splice(1,e.length).join(",")+"</div></div>"}},addTo:function(t){function e(t,e){if(!document.body.contains(e))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const n=t.onAdd();e.appendChild(n)}if(t._controlContainer)t.addControl(this);else if(t instanceof HTMLElement)e(this,t);else{if("string"!=typeof t)throw new Error("Error: addTo must be a mapbox-gl-js map, an html element, or a CSS selector query for a single html element");{const n=document.querySelectorAll(t);if(0===n.length)throw new Error("Element ",t,"not found.");if(n.length>1)throw new Error("Geocoder can only be added to a single html element");e(this,n[0])}}},onAdd:function(t){if(t&&"string"!=typeof t&&(this._map=t),this.setLanguage(),this.options.localGeocoderOnly||(this.geocoderService=l(u({accessToken:this.options.accessToken,origin:this.options.origin}))),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this.eventManager=new c(this.options),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this);var e=this.container=document.createElement("div");e.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var n=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",i(this._onKeyDown,200)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton),this._inputEl.addEventListener("keyup",function(t){this.eventManager.keyevent(t,this)}.bind(this));var o=document.createElement("div");o.classList.add("mapboxgl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button";var a=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');return this._clearEl.appendChild(a),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),o.appendChild(this._clearEl),o.appendChild(this._loadingEl),e.appendChild(n),e.appendChild(this._inputEl),e.appendChild(o),this._typeahead=new r(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this._handleMarker=this._handleMarker.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._mapboxgl=this.options.mapboxgl,!this._mapboxgl&&this.options.marker&&(console.error("No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl."),this.options.marker=!1)),e},createIcon:function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");if(n.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+t),n.setAttribute("viewBox","0 0 18 18"),n.setAttribute("xml:space","preserve"),n.setAttribute("width",18),n.setAttribute("height",18),"innerHTML"in n)n.innerHTML=e;else{var r=document.createElement("div");r.innerHTML="<svg>"+e.valueOf().toString()+"</svg>";var i=r.firstChild.firstChild;n.appendChild(i)}return n},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_onPaste:function(t){var e=(t.clipboardData||window.clipboardData).getData("text");e.length>=this.options.minLength&&this._geocode(e)},_onKeyDown:function(t){var e=27,n=9;if(t.keyCode===e&&this.options.clearAndBlurOnEsc)return this._clear(t),this._inputEl.blur();var r=t.target&&t.target.shadowRoot?t.target.shadowRoot.activeElement:t.target;if(!(r?r.value:""))return this.fresh=!0,t.keyCode!==n&&this.clear(t),this._clearEl.style.display="none";t.metaKey||-1!==[n,e,37,39,13,38,40].indexOf(t.keyCode)||r.value.length>=this.options.minLength&&this._geocode(r.value)},_showButton:function(){this._typeahead.selected&&(this._clearEl.style.display="block")},_hideButton:function(){this._typeahead.selected&&(this._clearEl.style.display="none")},_onBlur:function(t){this.options.clearOnBlur&&this._clearOnBlur(t),this.options.collapsed&&this._collapse()},_onChange:function(){var t=this._typeahead.selected;if(t&&JSON.stringify(t)!==this.lastSelected){var e;if(this._clearEl.style.display="none",this.options.flyTo)if(t.properties&&s[t.properties.short_code])e=o({},this.options.flyTo),this._map&&this._map.fitBounds(s[t.properties.short_code].bbox,e);else if(t.bbox){var n=t.bbox;e=o({},this.options.flyTo),this._map&&this._map.fitBounds([[n[0],n[1]],[n[2],n[3]]],e)}else{var r={zoom:this.options.zoom};(e=o({},r,this.options.flyTo)).center=t.center,this._map&&this._map.flyTo(e)}this.options.marker&&this._mapboxgl&&this._handleMarker(t),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(t),this._eventEmitter.emit("result",{result:t}),this.eventManager.select(t,this)}},_geocode:function(t){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:t}),this.inputString=t;var e,n=this,r=null,i=["bbox","limit","proximity","countries","types","language","reverseMode","mode"].reduce((function(t,e){return n.options[e]&&(["countries","types","language"].indexOf(e)>-1?t[e]=n.options[e].split(/[\s,]+/):t[e]=n.options[e],"proximity"===e&&n.options[e]&&"number"===typeof n.options[e].longitude&&"number"===typeof n.options[e].latitude&&(t[e]=[n.options[e].longitude,n.options[e].latitude])),t}),{});if(this.options.localGeocoderOnly)e=Promise.resolve();else if(this.options.reverseGeocode&&/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/.test(t)){var a=t.split(/[\s(,)?]+/).map((function(t){return parseFloat(t,10)})).reverse();!i.types||i.types[0],"proximity"in(i=o(i,{query:a,limit:1}))&&delete i.proximity,e=this.geocoderService.reverseGeocode(i).send()}else i=o(i,{query:t}),e=this.geocoderService.forwardGeocode(i).send();var s=[];this.options.localGeocoder&&((s=this.options.localGeocoder(t))||(s=[]));var u=[];return e.catch(function(t){r=t}.bind(this)).then(function(e){this._loadingEl.style.display="none";var n={};return e?"200"==e.statusCode&&((n=e.body).request=e.request,n.headers=e.headers):n={type:"FeatureCollection",features:[]},n.config=i,this.fresh&&(this.eventManager.start(this),this.fresh=!1),n.features=n.features?s.concat(n.features):s,this.options.externalGeocoder?(u=this.options.externalGeocoder(t,n.features)||[]).then((function(t){return n.features=n.features?t.concat(n.features):t,n}),(function(){return n})):n}.bind(this)).then(function(t){if(r)throw r;this.options.filter&&t.features.length&&(t.features=t.features.filter(this.options.filter)),t.features.length?(this._clearEl.style.display="block",this._eventEmitter.emit("results",t),this._typeahead.update(t.features)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",t))}.bind(this)).catch(function(t){this._loadingEl.style.display="none",s.length&&this.options.localGeocoder||u.length&&this.options.externalGeocoder?(this._clearEl.style.display="block",this._typeahead.update(s)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:s}),this._eventEmitter.emit("error",{error:t})}.bind(this)),e},_clear:function(t){t&&t.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(t){this._clear(t),this._inputEl.focus()},_clearOnBlur:function(t){t.relatedTarget&&this._clear(t)},_onQueryResult:function(t){var e=t.body;if(e.features.length){var n=e.features[0];this._typeahead.selected=n,this._inputEl.value=n.place_name,this._onChange()}},_updateProximity:function(){if(this._map)if(this._map.getZoom()>9){var t=this._map.getCenter().wrap();this.setProximity({longitude:t.lng,latitude:t.lat})}else this.setProximity(null)},_collapse:function(){this._inputEl.value||this._inputEl===document.activeElement||this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed")},query:function(t){return this._geocode(t).then(this._onQueryResult),this},_renderError:function(){this._renderMessage("<div class='mapbox-gl-geocoder--error'>There was an error reaching the server</div>")},_renderNoResults:function(){this._renderMessage("<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results'>No results found</div>")},_renderMessage:function(t){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(t)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var t=this.options.language.split(",")[0],e=h.language(t),n=f.placeholder[e];if(n)return n}return"Search"},setInput:function(t){return this._inputEl.value=t,this._typeahead.selected=null,this._typeahead.clear(),t.length>=this.options.minLength&&this._geocode(t),this},setProximity:function(t){return this.options.proximity=t,this},getProximity:function(){return this.options.proximity},setRenderFunction:function(t){return t&&"function"==typeof t&&(this._typeahead.render=t),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(t){var e=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=t||this.options.language||e,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(t){return this.options.zoom=t,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(t){return this.options.flyTo=t,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(t){return this.placeholder=t||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(t){return this.options.bbox=t,this},getCountries:function(){return this.options.countries},setCountries:function(t){return this.options.countries=t,this},getTypes:function(){return this.options.types},setTypes:function(t){return this.options.types=t,this},getMinLength:function(){return this.options.minLength},setMinLength:function(t){return this.options.minLength=t,this._typeahead&&(this._typeahead.minLength=t),this},getLimit:function(){return this.options.limit},setLimit:function(t){return this.options.limit=t,this._typeahead&&(this._typeahead.options.limit=t),this},getFilter:function(){return this.options.filter},setFilter:function(t){return this.options.filter=t,this},setOrigin:function(t){return this.options.origin=t,this.geocoderService=l(u({accessToken:this.options.accessToken,origin:this.options.origin})),this},getOrigin:function(){return this.options.origin},_handleMarker:function(t){if(this._map){this._removeMarker();var e=o({},{color:"#4668F2"},this.options.marker);return this.mapMarker=new this._mapboxgl.Marker(e),t.center?this.mapMarker.setLngLat(t.center).addTo(this._map):t.geometry&&t.geometry.type&&"Point"===t.geometry.type&&t.geometry.coordinates&&this.mapMarker.setLngLat(t.geometry.coordinates).addTo(this._map),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},on:function(t,e){return this._eventEmitter.on(t,e),this},off:function(t,e){return this._eventEmitter.removeListener(t,e),this.eventManager.remove(),this}},t.exports=p},function(t,e,n){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=39)}([function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){var r=n(22),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(76),o=n(77),a=n(78),s=n(79),u=n(80);r.prototype.clear=i,r.prototype.delete=o,r.prototype.get=a,r.prototype.has=s,r.prototype.set=u,t.exports=r},function(t,e,n){function r(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}var i=n(8);t.exports=r},function(t,e,n){function r(t){return null==t?void 0===t?u:s:l&&l in Object(t)?o(t):a(t)}var i=n(16),o=n(65),a=n(88),s="[object Null]",u="[object Undefined]",l=i?i.toStringTag:void 0;t.exports=r},function(t,e,n){function r(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}var i=n(74);t.exports=r},function(t,e,n){var r=n(11)(Object,"create");t.exports=r},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return i}));var i=function t(e){r(this,t),this.onCreate=function(){},this.onDestroy=function(){},this.onUpdate=function(){},this.overlay=e.overlay,this.img=e.img,this.options=e.options,this.requestUpdate=e.onUpdate}},function(t,e,n){function r(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var i=n(21);t.exports=r},function(t,e,n){function r(t,e){var n=o(t,e);return i(n)?n:void 0}var i=n(49),o=n(66);t.exports=r},function(t,e,n){function r(t){return null!=t&&o(t.length)&&!i(t)}var i=n(13),o=n(31);t.exports=r},function(t,e,n){function r(t){if(!o(t))return!1;var e=i(t);return e==s||e==u||e==a||e==l}var i=n(5),o=n(0),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",l="[object Proxy]";t.exports=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(11)(n(1),"Map");t.exports=r},function(t,e,n){var r=n(1).Symbol;t.exports=r},function(t,e){function n(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}t.exports=n},function(t,e,n){function r(t,e,n){(void 0===n||o(t[e],n))&&(void 0!==n||e in t)||i(t,e,n)}var i=n(10),o=n(8);t.exports=r},function(t,e,n){function r(t,e,n,f,h){t!==e&&a(e,(function(a,l){if(u(a))h||(h=new i),s(t,e,l,n,r,f,h);else{var p=f?f(c(t,l),a,l+"",t,e,h):void 0;void 0===p&&(p=a),o(t,l,p)}}),l)}var i=n(42),o=n(18),a=n(47),s=n(52),u=n(0),l=n(33),c=n(26);t.exports=r},function(t,e,n){function r(t,e){return a(o(t,e,i),t+"")}var i=n(27),o=n(90),a=n(91);t.exports=r},function(t,e,n){var r=n(11),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,n(109))},function(t,e,n){var r=n(89)(Object.getPrototypeOf,Object);t.exports=r},function(t,e){function n(t,e){var n=typeof t;return!!(e=null==e?r:e)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}var r=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e){function n(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}var r=Object.prototype;t.exports=n},function(t,e){function n(t,e){if("__proto__"!=e)return t[e]}t.exports=n},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){var r=n(48),i=n(2),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){(function(t){var r=n(1),i=n(103),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(e,n(14)(t))},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e,n){var r=n(50),i=n(55),o=n(87),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},function(t,e,n){function r(t){return a(t)?i(t,!0):o(t)}var i=n(44),o=n(51),a=n(12);t.exports=r},function(t,e,n){"use strict";e.a={modules:["DisplaySize","Toolbar","Resize"],overlayStyles:{position:"absolute",boxSizing:"border-box",border:"1px dashed #444"},handleStyles:{position:"absolute",height:"12px",width:"12px",backgroundColor:"white",border:"1px solid #777",boxSizing:"border-box",opacity:"0.80"},displayStyles:{position:"absolute",font:"12px/1.0 Arial, Helvetica, sans-serif",padding:"4px 8px",textAlign:"center",backgroundColor:"white",color:"#333",border:"1px solid #777",boxSizing:"border-box",opacity:"0.80",cursor:"default"},toolbarStyles:{position:"absolute",top:"-12px",right:"0",left:"0",height:"0",minWidth:"100px",font:"12px/1.0 Arial, Helvetica, sans-serif",textAlign:"center",color:"#333",boxSizing:"border-box",cursor:"default"},toolbarButtonStyles:{display:"inline-block",width:"24px",height:"24px",padding:"3px",background:"white",border:"1px solid #999",verticalAlign:"middle"},toolbarButtonSvgStyles:{fill:"#444",stroke:"#444",strokeWidth:"2"}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",(function(){return a}));var a=function(t){function e(){var t,n,o;r(this,e);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return n=o=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),o.onCreate=function(){o.display=document.createElement("div"),Object.assign(o.display.style,o.options.displayStyles),o.overlay.appendChild(o.display)},o.onDestroy=function(){},o.onUpdate=function(){if(o.display&&o.img){var t=o.getCurrentSize();if(o.display.innerHTML=t.join(" &times; "),t[0]>120&&t[1]>30)Object.assign(o.display.style,{right:"4px",bottom:"4px",left:"auto"});else if("right"==o.img.style.float){var e=o.display.getBoundingClientRect();Object.assign(o.display.style,{right:"auto",bottom:"-"+(e.height+4)+"px",left:"-"+(e.width+4)+"px"})}else{var n=o.display.getBoundingClientRect();Object.assign(o.display.style,{right:"-"+(n.width+4)+"px",bottom:"-"+(n.height+4)+"px",left:"auto"})}}},o.getCurrentSize=function(){return[o.img.width,Math.round(o.img.width/o.img.naturalWidth*o.img.naturalHeight)]},i(o,n)}return o(e,t),e}(n(9).a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",(function(){return a}));var a=function(t){function e(){var t,n,o;r(this,e);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return n=o=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),o.onCreate=function(){o.boxes=[],o.addBox("nwse-resize"),o.addBox("nesw-resize"),o.addBox("nwse-resize"),o.addBox("nesw-resize"),o.positionBoxes()},o.onDestroy=function(){o.setCursor("")},o.positionBoxes=function(){var t=-parseFloat(o.options.handleStyles.width)/2+"px",e=-parseFloat(o.options.handleStyles.height)/2+"px";[{left:t,top:e},{right:t,top:e},{right:t,bottom:e},{left:t,bottom:e}].forEach((function(t,e){Object.assign(o.boxes[e].style,t)}))},o.addBox=function(t){var e=document.createElement("div");Object.assign(e.style,o.options.handleStyles),e.style.cursor=t,e.style.width=o.options.handleStyles.width+"px",e.style.height=o.options.handleStyles.height+"px",e.addEventListener("touchstart",o.handleMousedown,!1),e.addEventListener("mousedown",o.handleMousedown,!1),e.addEventListener("touchstart",o.handleMousedown,!1),o.overlay.appendChild(e),o.boxes.push(e)},o.handleMousedown=function(t){o.dragBox=t.target,t.touches?o.dragStartX=t.touches[0].clientX:o.dragStartX=t.clientX,o.preDragWidth=o.img.width||o.img.naturalWidth,o.setCursor(o.dragBox.style.cursor),document.addEventListener("touchmove",o.handleDrag,!1),document.addEventListener("touchend",o.handleMouseup,!1),document.addEventListener("mousemove",o.handleDrag,!1),document.addEventListener("mouseup",o.handleMouseup,!1)},o.handleMouseup=function(){o.setCursor(""),document.removeEventListener("touchmove",o.handleDrag),document.removeEventListener("touchend",o.handleMouseup),document.removeEventListener("mousemove",o.handleDrag),document.removeEventListener("mouseup",o.handleMouseup)},o.handleDrag=function(t){if(o.img){var e=void 0;e=t.touches?t.touches[0].clientX-o.dragStartX:t.clientX-o.dragStartX,o.dragBox===o.boxes[0]||o.dragBox===o.boxes[3]?o.img.width=Math.round(o.preDragWidth-e):o.img.width=Math.round(o.preDragWidth+e),o.requestUpdate()}},o.setCursor=function(t){[document.body,o.img].forEach((function(e){e.style.cursor=t}))},i(o,n)}return o(e,t),e}(n(9).a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",(function(){return v}));var a=n(105),s=n.n(a),u=n(107),l=n.n(u),c=n(106),f=n.n(c),h=n(108),p=n.n(h),d=n(9),m=new s.a.Attributor.Style("float","float"),g=new s.a.Attributor.Style("margin","margin"),y=new s.a.Attributor.Style("display","display"),v=function(t){function e(){var t,n,o;r(this,e);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return n=o=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),o.onCreate=function(){o.toolbar=document.createElement("div"),Object.assign(o.toolbar.style,o.options.toolbarStyles),o.overlay.appendChild(o.toolbar),o._defineAlignments(),o._addToolbarButtons()},o.onDestroy=function(){},o.onUpdate=function(){},o._defineAlignments=function(){o.alignments=[{icon:l.a,apply:function(){y.add(o.img,"inline"),m.add(o.img,"left"),g.add(o.img,"0 1em 1em 0")},isApplied:function(){return"left"==m.value(o.img)}},{icon:f.a,apply:function(){y.add(o.img,"block"),m.remove(o.img),g.add(o.img,"auto")},isApplied:function(){return"auto"==g.value(o.img)}},{icon:p.a,apply:function(){y.add(o.img,"inline"),m.add(o.img,"right"),g.add(o.img,"0 0 1em 1em")},isApplied:function(){return"right"==m.value(o.img)}}]},o._addToolbarButtons=function(){var t=[];o.alignments.forEach((function(e,n){var r=document.createElement("span");t.push(r),r.innerHTML=e.icon,r.addEventListener("click",(function(){t.forEach((function(t){return t.style.filter=""})),e.isApplied()?(m.remove(o.img),g.remove(o.img),y.remove(o.img)):(o._selectButton(r),e.apply()),o.requestUpdate()})),Object.assign(r.style,o.options.toolbarButtonStyles),n>0&&(r.style.borderLeftWidth="0"),Object.assign(r.children[0].style,o.options.toolbarButtonSvgStyles),e.isApplied()&&o._selectButton(r),o.toolbar.appendChild(r)}))},o._selectButton=function(t){t.style.filter="invert(20%)"},i(o,n)}return o(e,t),e}(d.a)},function(t,e,n){var r=n(17),i=n(20),o=n(64),a=n(102),s=i((function(t){return t.push(void 0,o),r(a,void 0,t)}));t.exports=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=n(38),o=n.n(i),a=n(34),s=n(35),u=n(37),l=n(36),c={DisplaySize:s.a,Toolbar:u.a,Resize:l.a},f=function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.initializeModules=function(){n.removeModules(),n.modules=n.moduleClasses.map((function(t){return new(c[t]||t)(n)})),n.modules.forEach((function(t){t.onCreate()})),n.onUpdate()},this.onUpdate=function(){n.repositionElements(),n.modules.forEach((function(t){t.onUpdate()}))},this.removeModules=function(){n.modules.forEach((function(t){t.onDestroy()})),n.modules=[]},this.handleClick=function(t){if(t.target&&t.target.tagName&&"IMG"===t.target.tagName.toUpperCase()){if(n.img===t.target)return;n.img&&n.hide(),n.show(t.target)}else n.img&&n.hide()},this.show=function(t){n.img=t,n.showOverlay(),n.initializeModules()},this.showOverlay=function(){n.overlay&&n.hideOverlay(),n.setUserSelect("none"),document.addEventListener("keyup",n.checkImage,!0),n.quill.root.addEventListener("input",n.checkImage,!0),n.overlay=document.createElement("div"),Object.assign(n.overlay.style,n.options.overlayStyles),n.quill.root.parentNode.appendChild(n.overlay),n.repositionElements()},this.hideOverlay=function(){n.overlay&&(n.quill.root.parentNode.removeChild(n.overlay),n.overlay=void 0,document.removeEventListener("keyup",n.checkImage),n.quill.root.removeEventListener("input",n.checkImage),n.setUserSelect(""))},this.repositionElements=function(){if(n.overlay&&n.img){var t=n.quill.root.parentNode,e=n.img.getBoundingClientRect(),r=t.getBoundingClientRect();Object.assign(n.overlay.style,{left:e.left-r.left-1+t.scrollLeft+"px",top:e.top-r.top+t.scrollTop+"px",width:e.width+"px",height:e.height+"px"})}},this.hide=function(){n.hideOverlay(),n.removeModules(),n.img=void 0},this.setUserSelect=function(t){["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach((function(e){n.quill.root.style[e]=t,document.documentElement.style[e]=t}))},this.checkImage=function(t){n.img&&(46!=t.keyCode&&8!=t.keyCode||n.quill.find(n.img).deleteAt(0),n.hide())},this.quill=e;var s=!1;i.modules&&(s=i.modules.slice()),this.options=o()({},i,a.a),!1!==s&&(this.options.modules=s),document.execCommand("enableObjectResizing",!1,"false"),this.quill.root.addEventListener("click",this.handleClick,!1),this.quill.root.parentNode.style.position=this.quill.root.parentNode.style.position||"relative",this.moduleClasses=this.options.modules,this.modules=[]};e.default=f},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(67),o=n(68),a=n(69),s=n(70),u=n(71);r.prototype.clear=i,r.prototype.delete=o,r.prototype.get=a,r.prototype.has=s,r.prototype.set=u,t.exports=r},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(81),o=n(82),a=n(83),s=n(84),u=n(85);r.prototype.clear=i,r.prototype.delete=o,r.prototype.get=a,r.prototype.has=s,r.prototype.set=u,t.exports=r},function(t,e,n){function r(t){var e=this.__data__=new i(t);this.size=e.size}var i=n(3),o=n(93),a=n(94),s=n(95),u=n(96),l=n(97);r.prototype.clear=o,r.prototype.delete=a,r.prototype.get=s,r.prototype.has=u,r.prototype.set=l,t.exports=r},function(t,e,n){var r=n(1).Uint8Array;t.exports=r},function(t,e,n){function r(t,e){var n=a(t),r=!n&&o(t),f=!n&&!r&&s(t),h=!n&&!r&&!f&&l(t),p=n||r||f||h,d=p?i(t.length,String):[],m=d.length;for(var g in t)!e&&!c.call(t,g)||p&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||d.push(g);return d}var i=n(54),o=n(28),a=n(29),s=n(30),u=n(24),l=n(32),c=Object.prototype.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e,n){var r=t[e];a.call(t,e)&&o(r,n)&&(void 0!==n||e in t)||i(t,e,n)}var i=n(10),o=n(8),a=Object.prototype.hasOwnProperty;t.exports=r},function(t,e,n){var r=n(0),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e,n){var r=n(63)();t.exports=r},function(t,e,n){function r(t){return o(t)&&i(t)==a}var i=n(5),o=n(2),a="[object Arguments]";t.exports=r},function(t,e,n){function r(t){return!(!a(t)||o(t))&&(i(t)?d:l).test(s(t))}var i=n(13),o=n(75),a=n(0),s=n(98),u=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,d=RegExp("^"+h.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,e,n){function r(t){return a(t)&&o(t.length)&&!!s[i(t)]}var i=n(5),o=n(31),a=n(2),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=r},function(t,e,n){function r(t){if(!i(t))return a(t);var e=o(t),n=[];for(var r in t)("constructor"!=r||!e&&s.call(t,r))&&n.push(r);return n}var i=n(0),o=n(25),a=n(86),s=Object.prototype.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e,n,r,b,_,A){var w=y(t,n),x=y(e,n),E=A.get(x);if(E)i(t,n,E);else{var O=_?_(w,x,n+"",t,e,A):void 0,S=void 0===O;if(S){var P=c(x),C=!P&&h(x),T=!P&&!C&&g(x);O=x,P||C||T?c(w)?O=w:f(w)?O=s(w):C?(S=!1,O=o(x,!0)):T?(S=!1,O=a(x,!0)):O=[]:m(x)||l(x)?(O=w,l(w)?O=v(w):d(w)&&!p(w)||(O=u(x))):S=!1}S&&(A.set(x,O),b(O,x,r,_,A),A.delete(x)),i(t,n,O)}}var i=n(18),o=n(57),a=n(58),s=n(59),u=n(72),l=n(28),c=n(29),f=n(100),h=n(30),p=n(13),d=n(0),m=n(101),g=n(32),y=n(26),v=n(104);t.exports=r},function(t,e,n){var r=n(99),i=n(21),o=n(27),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e){function n(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}t.exports=n},function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},function(t,e,n){function r(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}var i=n(43);t.exports=r},function(t,e,n){(function(t){function r(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}var i=n(1),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?i.Buffer:void 0,u=s?s.allocUnsafe:void 0;t.exports=r}).call(e,n(14)(t))},function(t,e,n){function r(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var i=n(56);t.exports=r},function(t,e){function n(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}t.exports=n},function(t,e,n){function r(t,e,n,r){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var l=e[s],c=r?r(n[l],t[l],l,n,t):void 0;void 0===c&&(c=t[l]),a?o(n,l,c):i(n,l,c)}return n}var i=n(45),o=n(10);t.exports=r},function(t,e,n){var r=n(1)["__core-js_shared__"];t.exports=r},function(t,e,n){function r(t){return i((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e}))}var i=n(20),o=n(73);t.exports=r},function(t,e){function n(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}t.exports=n},function(t,e,n){function r(t,e,n,a,s,u){return o(t)&&o(e)&&(u.set(e,t),i(t,e,void 0,r,u),u.delete(e)),t}var i=n(19),o=n(0);t.exports=r},function(t,e,n){function r(t){var e=a.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[u]=n:delete t[u]),i}var i=n(16),o=Object.prototype,a=o.hasOwnProperty,s=o.toString,u=i?i.toStringTag:void 0;t.exports=r},function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},function(t,e,n){function r(){this.__data__=i?i(null):{},this.size=0}var i=n(7);t.exports=r},function(t,e){function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=n},function(t,e,n){function r(t){var e=this.__data__;if(i){var n=e[t];return n===o?void 0:n}return a.call(e,t)?e[t]:void 0}var i=n(7),o="__lodash_hash_undefined__",a=Object.prototype.hasOwnProperty;t.exports=r},function(t,e,n){function r(t){var e=this.__data__;return i?void 0!==e[t]:o.call(e,t)}var i=n(7),o=Object.prototype.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?o:e,this}var i=n(7),o="__lodash_hash_undefined__";t.exports=r},function(t,e,n){function r(t){return"function"!=typeof t.constructor||a(t)?{}:i(o(t))}var i=n(46),o=n(23),a=n(25);t.exports=r},function(t,e,n){function r(t,e,n){if(!s(n))return!1;var r=typeof e;return!!("number"==r?o(n)&&a(e,n.length):"string"==r&&e in n)&&i(n[e],t)}var i=n(8),o=n(12),a=n(24),s=n(0);t.exports=r},function(t,e){function n(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=n},function(t,e,n){function r(t){return!!o&&o in t}var i=n(61),o=function(){var t=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=r},function(t,e){function n(){this.__data__=[],this.size=0}t.exports=n},function(t,e,n){function r(t){var e=this.__data__,n=i(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}var i=n(4),o=Array.prototype.splice;t.exports=r},function(t,e,n){function r(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}var i=n(4);t.exports=r},function(t,e,n){function r(t){return i(this.__data__,t)>-1}var i=n(4);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var i=n(4);t.exports=r},function(t,e,n){function r(){this.size=0,this.__data__={hash:new i,map:new(a||o),string:new i}}var i=n(40),o=n(3),a=n(15);t.exports=r},function(t,e,n){function r(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}var i=n(6);t.exports=r},function(t,e,n){function r(t){return i(this,t).get(t)}var i=n(6);t.exports=r},function(t,e,n){function r(t){return i(this,t).has(t)}var i=n(6);t.exports=r},function(t,e,n){function r(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var i=n(6);t.exports=r},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){(function(t){var r=n(22),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(e,n(14)(t))},function(t,e){function n(t){return r.call(t)}var r=Object.prototype.toString;t.exports=n},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e,n){function r(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=o(r.length-e,0),u=Array(s);++a<s;)u[a]=r[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=r[a];return l[e]=n(u),i(t,this,l)}}var i=n(17),o=Math.max;t.exports=r},function(t,e,n){var r=n(53),i=n(92)(r);t.exports=i},function(t,e){function n(t){var e=0,n=0;return function(){var a=o(),s=i-(a-n);if(n=a,s>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var r=800,i=16,o=Date.now;t.exports=n},function(t,e,n){function r(){this.__data__=new i,this.size=0}var i=n(3);t.exports=r},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function r(t,e){var n=this.__data__;if(n instanceof i){var r=n.__data__;if(!o||r.length<s-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(r)}return n.set(t,e),this.size=n.size,this}var i=n(3),o=n(15),a=n(41),s=200;t.exports=r},function(t,e){function n(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var r=Function.prototype.toString;t.exports=n},function(t,e){function n(t){return function(){return t}}t.exports=n},function(t,e,n){function r(t){return o(t)&&i(t)}var i=n(12),o=n(2);t.exports=r},function(t,e,n){function r(t){if(!a(t)||i(t)!=s)return!1;var e=o(t);if(null===e)return!0;var n=f.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==h}var i=n(5),o=n(23),a=n(2),s="[object Object]",u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,h=c.call(Object);t.exports=r},function(t,e,n){var r=n(19),i=n(62)((function(t,e,n,i){r(t,e,n,i)}));t.exports=i},function(t,e){function n(){return!1}t.exports=n},function(t,e,n){function r(t){return i(t,o(t))}var i=n(60),o=n(33);t.exports=r},function(t,e,n){!function(e,n){t.exports=n()}("undefined"!=typeof self&&self,(function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=9)}([function(t,e,n){"use strict";function r(t,e){var n=o(t);if(null==n)throw new u("Unable to create "+t+" blot");var r=n;return new r(t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e),e)}function i(t,n){return void 0===n&&(n=!1),null==t?null:null!=t[e.DATA_KEY]?t[e.DATA_KEY].blot:n?i(t.parentNode,n):null}function o(t,e){var n;if(void 0===e&&(e=l.ANY),"string"==typeof t)n=p[t]||c[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=p.text;else if("number"==typeof t)t&l.LEVEL&l.BLOCK?n=p.block:t&l.LEVEL&l.INLINE&&(n=p.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=f[r[i]])break;n=n||h[t.tagName]}return null==n?null:e&l.LEVEL&n.scope&&e&l.TYPE&n.scope?n:null}function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length>1)return t.map((function(t){return a(t)}));var n=t[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new u("Invalid definition");if("abstract"===n.blotName)throw new u("Cannot register abstract class");return p[n.blotName||n.attrName]=n,"string"==typeof n.keyName?c[n.keyName]=n:(null!=n.className&&(f[n.className]=n),null!=n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(t){return t.toUpperCase()})):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach((function(t){null!=h[t]&&null!=n.className||(h[t]=n)})))),n}var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return s(e,t),e}(Error);e.ParchmentError=u;var l,c={},f={},h={},p={};e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(l=e.Scope||(e.Scope={})),e.create=r,e.find=i,e.query=o,e.register=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";function r(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(11),a=n(5),s=n(0),u=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=r(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof s.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var r=this.children.find(n),i=r[0],o=r[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,o]:i instanceof e?i.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,(function(n,r,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,o))),o-=a})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),i=r[0],o=r[1];if(i)i.insertAt(o,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),i=r[0],o=r[1],a=[[this,t]];return i instanceof e?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,i){t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,i=[],o=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(i.push.apply(i,t.addedNodes),o.push.apply(o,t.removedNodes))})),o.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),i.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var i=r(t);i.next==e&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,e||void 0))}))},e}(a.default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=n(6),a=n(2),s=n(0),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new o.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=s.query(t);n instanceof i.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var i=t.prototype.wrap.call(this,n,r);return i instanceof e&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},e}(a.default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=n(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=o.Scope.INLINE_BLOT,e}(i.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var o=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),o=this.split(t);this.parent.insertBefore(i,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(7),o=n(8),a=n(0),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(r(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(1).default);e.default=o},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(1).default);e.default=o},function(t,e,n){t.exports=n(10)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),a=n(12),s=n(13),u=n(14),l=n(15),c=n(16),f=n(1),h=n(7),p=n(8),d=n(6),m=n(0),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:l.default,Scroll:a.default,Block:u.default,Inline:s.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:p.default,Store:d.default}};e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(t<i||e&&t===i&&(null==n.next||0!==n.next.length()))return[n,t];t-=i}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var r,i=this.find(t),o=i[0],a=t-i[1],s=this.iterator(o);(r=s())&&a<t+e;){var u=r.length();t>a?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(0),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,a),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,i){this.update(),t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)e.push(a.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[o.DATA_KEY].mutations&&(t.domNode[o.DATA_KEY].mutations=[]),e&&s(t.parent))},u=function(t){null!=t.domNode[o.DATA_KEY]&&null!=t.domNode[o.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(u),t.optimize(n))},l=e,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach((function(t){var e=o.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(o.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=o.find(t,!1);s(e,!1),e instanceof i.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(u),a=(l=[].slice.call(this.observer.takeRecords())).slice();a.length>0;)e.push(a.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=o.find(t.target,!0);return null==e?null:null==e.domNode[o.DATA_KEY].mutations?(e.domNode[o.DATA_KEY].mutations=[t],e):(e.domNode[o.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[o.DATA_KEY]&&t.update(t.domNode[o.DATA_KEY].mutations||[],n)})),null!=this.domNode[o.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=o.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=s},function(t,e,n){"use strict";function r(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),a=n(0),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&r(i,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var r=o.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=o.query(n,o.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,i){null!=o.query(r,o.Scope.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=o.query(n,o.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e),a=o.create(n,r);i.parent.insertBefore(a,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=o.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(4).default);e.default=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),o=n(0),a=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=o.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=o.Scope.INLINE_BLOT,e}(i.default);e.default=a}])}))},function(t,e){t.exports='<svg viewbox="0 0 18 18">\n  <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>\n  <line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"></line>\n  <line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"></line>\n</svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18">\n  <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line>\n  <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line>\n  <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line>\n</svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18">\n  <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>\n  <line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"></line>\n  <line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"></line>\n</svg>'},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n}])},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Pe}));var r=Object.defineProperty,i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u=(t,e)=>{for(var n in e||(e={}))o.call(e,n)&&s(t,n,e[n]);if(i)for(var n of i(e))a.call(e,n)&&s(t,n,e[n]);return t};function l(t){return t.replace(/(?:[_-])([a-z0-9])/g,((t,e)=>e.toUpperCase()))}function c(t){return t.charAt(0).toUpperCase()+t.slice(1)}function f(t,e){const n=p(t);return Array.from(n.reduce(((t,n)=>(function(t,e){const n=t[e];return Array.isArray(n)?n:[]}(n,e).forEach((e=>t.add(e))),t)),new Set))}function h(t,e){return p(t).reduce(((t,n)=>(t.push(...function(t,e){const n=t[e];return n?Object.keys(n).map((t=>[t,n[t]])):[]}(n,e)),t)),[])}function p(t){const e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function d([t,e]){return function(t,e){const n=`${i=t,i.replace(/([A-Z])/g,((t,e)=>`-${e.toLowerCase()}`))}-value`,r=function(t){const e=function(t){const e=m(t.type);if(e){const n=g(t.default);if(e!==n)throw new Error(`Type "${e}" must match the type of the default value. Given default value: "${t.default}" as "${n}"`);return e}}(t),n=g(t),r=m(t),i=e||n||r;if(i)return i;throw new Error(`Unknown value type "${t}"`)}(e);var i;return{type:r,key:n,name:l(n),get defaultValue(){return function(t){const e=m(t);if(e)return y[e];const n=t.default;return void 0!==n?n:t}(e)},get hasCustomDefaultValue(){return void 0!==g(e)},reader:v[r],writer:b[r]||b.default}}(t,e)}function m(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function g(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(t)?"array":"[object Object]"===Object.prototype.toString.call(t)?"object":void 0}(()=>{function t(t){function e(){return Reflect.construct(t,arguments,new.target)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{(function(){const e=t((function(){this.a.call(this)}));e.prototype.a=function(){},new e})()}catch(e){return t=>class extends t{}}})();const y={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},v={array(t){const e=JSON.parse(t);if(!Array.isArray(e))throw new TypeError("Expected array");return e},boolean:t=>!("0"==t||"false"==t),number:t=>Number(t),object(t){const e=JSON.parse(t);if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError("Expected object");return e},string:t=>t},b={default:function(t){return`${t}`},array:_,object:_};function _(t){return JSON.stringify(t)}class A{constructor(t){this.context=t}static get shouldLoad(){return!0}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:n={},prefix:r=this.identifier,bubbles:i=!0,cancelable:o=!0}={}){const a=new CustomEvent(r?`${r}:${t}`:t,{detail:n,bubbles:i,cancelable:o});return e.dispatchEvent(a),a}}function w(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 x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function E(t){return(E="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 O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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},S.apply(this,arguments)}function P(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}A.blessings=[function(t){return f(t,"classes").reduce(((t,e)=>{return Object.assign(t,{[`${n=e}Class`]:{get(){const{classes:t}=this;if(t.has(n))return t.get(n);{const e=t.getAttributeName(n);throw new Error(`Missing attribute "${e}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${c(n)}Class`]:{get(){return this.classes.has(n)}}});var n}),{})},function(t){return f(t,"targets").reduce(((t,e)=>Object.assign(t,function(t){return{[`${t}Target`]:{get(){const e=this.targets.find(t);if(e)return e;throw new Error(`Missing target element "${t}" for "${this.identifier}" controller`)}},[`${t}Targets`]:{get(){return this.targets.findAll(t)}},[`has${c(t)}Target`]:{get(){return this.targets.has(t)}}}}(e))),{})},function(t){const e=h(t,"values"),n={valueDescriptorMap:{get(){return e.reduce(((t,e)=>{const n=d(e),r=this.data.getAttributeNameForKey(n.key);return Object.assign(t,{[r]:n})}),{})}}};return e.reduce(((t,e)=>Object.assign(t,function(t){const e=d(t),{key:n,name:r,reader:i,writer:o}=e;return{[r]:{get(){const t=this.data.get(n);return null!==t?i(t):e.defaultValue},set(t){void 0===t?this.data.delete(n):this.data.set(n,o(t))}},[`has${c(r)}`]:{get(){return this.data.has(n)||e.hasCustomDefaultValue}}}}(e))),n)}],A.targets=[],A.values={};function C(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var T=C(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),k=C(/Edge/i),I=C(/firefox/i),L=C(/safari/i)&&!C(/chrome/i)&&!C(/android/i),j=C(/iP(ad|od|hone)/i),M=C(/chrome/i)&&C(/android/i),R={capture:!1,passive:!1};function N(t,e,n){t.addEventListener(e,n,!T&&R)}function D(t,e,n){t.removeEventListener(e,n,!T&&R)}function F(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function B(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function z(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&F(t,e):F(t,e))||r&&t===n)return t;if(t===n)break}while(t=B(t))}return null}var U,G=/\s+/g;function V(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(G," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(G," ")}}function q(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function H(t,e){var n="";if("string"===typeof t)n=t;else do{var r=q(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function W(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function X(){var t=document.scrollingElement;return t||document.documentElement}function Y(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,s,u,l,c,f;if(t!==window&&t.parentNode&&t!==X()?(a=(o=t.getBoundingClientRect()).top,s=o.left,u=o.bottom,l=o.right,c=o.height,f=o.width):(a=0,s=0,u=window.innerHeight,l=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!T))do{if(i&&i.getBoundingClientRect&&("none"!==q(i,"transform")||n&&"static"!==q(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(q(i,"border-top-width")),s-=h.left+parseInt(q(i,"border-left-width")),u=a+o.height,l=s+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var p=H(i||t),d=p&&p.a,m=p&&p.d;p&&(u=(a/=m)+(c/=m),l=(s/=d)+(f/=d))}return{top:a,left:s,bottom:u,right:l,width:f,height:c}}}function Z(t,e,n){for(var r=tt(t,!0),i=Y(t)[e];r;){var o=Y(r)[n];if(!("top"===n||"left"===n?i>=o:i<=o))return r;if(r===X())break;r=tt(r,!1)}return!1}function K(t,e,n,r){for(var i=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==re.ghost&&(r||a[o]!==re.dragged)&&z(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function $(t,e){for(var n=t.lastElementChild;n&&(n===re.ghost||"none"===q(n,"display")||e&&!F(n,e));)n=n.previousElementSibling;return n||null}function J(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===re.clone||e&&!F(t,e)||n++;return n}function Q(t){var e=0,n=0,r=X();if(t)do{var i=H(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function tt(t,e){if(!t||!t.getBoundingClientRect)return X();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=q(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return X();if(r||e)return n;r=!0}}}while(n=n.parentNode);return X()}function et(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function nt(t,e){return function(){if(!U){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),U=setTimeout((function(){U=void 0}),e)}}}function rt(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function it(e){var n=window.Polymer,r=t||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}var ot="Sortable"+(new Date).getTime();function at(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==q(t,"display")&&t!==re.ghost){e.push({target:t,rect:Y(t)});var n=x({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=H(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=Y(n),u=n.prevFromRect,l=n.prevToRect,c=t.rect,f=H(n,!0);f&&(s.top-=f.f,s.left-=f.e),n.toRect=s,n.thisAnimationDuration&&et(u,s)&&!et(a,s)&&(c.top-s.top)/(c.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(e=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(c,u,l,r.options)),et(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=r.options.animation),r.animate(n,c,s,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"===typeof n&&n()}),o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){q(t,"transition",""),q(t,"transform","");var i=H(this.el),o=i&&i.a,a=i&&i.d,s=(e.left-n.left)/(o||1),u=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!u,q(t,"transform","translate3d("+s+"px,"+u+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),q(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),q(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){q(t,"transition",""),q(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}var st=[],ut={initializeByDefault:!0},lt={mount:function(t){for(var e in ut)ut.hasOwnProperty(e)&&!(e in t)&&(t[e]=ut[e]);st.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),st.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";st.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](x({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](x({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in st.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,S(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return st.forEach((function(r){"function"===typeof r.eventProperties&&S(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return st.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};var ct=["evt"],ft=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=P(n,ct);lt.pluginEvent.bind(re)(t,e,x({dragEl:pt,parentEl:dt,ghostEl:mt,rootEl:gt,nextEl:yt,lastDownEl:vt,cloneEl:bt,cloneHidden:_t,dragStarted:jt,putSortable:St,activeSortable:re.active,originalEvent:r,oldIndex:At,oldDraggableIndex:xt,newIndex:wt,newDraggableIndex:Et,hideGhostForTarget:Qt,unhideGhostForTarget:te,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(t){ht({sortable:e,name:t,originalEvent:r})}},i))};function ht(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,a=t.toEl,s=t.fromEl,u=t.oldIndex,l=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,d=t.extraEventProperties;if(e=e||n&&n[ot]){var m,g=e.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||T||k?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=a||n,m.from=s||n,m.item=i||n,m.clone=o,m.oldIndex=u,m.newIndex=l,m.oldDraggableIndex=c,m.newDraggableIndex=f,m.originalEvent=h,m.pullMode=p?p.lastPutMode:void 0;var v=x(x({},d),lt.getEventProperties(r,e));for(var b in v)m[b]=v[b];n&&n.dispatchEvent(m),g[y]&&g[y].call(e,m)}}(x({putSortable:St,cloneEl:bt,targetEl:pt,rootEl:gt,oldIndex:At,oldDraggableIndex:xt,newIndex:wt,newDraggableIndex:Et},t))}var pt,dt,mt,gt,yt,vt,bt,_t,At,wt,xt,Et,Ot,St,Pt,Ct,Tt,kt,It,Lt,jt,Mt,Rt,Nt,Dt,Ft=!1,Bt=!1,zt=[],Ut=!1,Gt=!1,Vt=[],qt=!1,Ht=[],Wt="undefined"!==typeof document,Xt=j,Yt=k||T?"cssFloat":"float",Zt=Wt&&!M&&!j&&"draggable"in document.createElement("div"),Kt=function(){if(Wt){if(T)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),$t=function(t,e){var n=q(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=K(t,0,e),o=K(t,1,e),a=i&&q(i),s=o&&q(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Y(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Y(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=r&&"none"===n[Yt]||o&&"none"===n[Yt]&&u+l>r)?"vertical":"horizontal"},Jt=function(t){function e(t,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var u=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===u||t.join&&t.indexOf(u)>-1}}var n={},r=t.group;r&&"object"==E(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Qt=function(){!Kt&&mt&&q(mt,"display","none")},te=function(){!Kt&&mt&&q(mt,"display","")};Wt&&document.addEventListener("click",(function(t){if(Bt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Bt=!1,!1}),!0);var ee=function(t){if(pt){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,o=t.clientY,zt.some((function(t){var e=t[ot].options.emptyInsertThreshold;if(e&&!$(t)){var n=Y(t),r=i>=n.left-e&&i<=n.right+e,s=o>=n.top-e&&o<=n.bottom+e;return r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[ot]._onDragOver(n)}}var i,o,a},ne=function(t){pt&&pt.parentNode[ot]._isOutsideThisEl(t.target)};function re(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=S({},e),t[ot]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return $t(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==re.supportPointer&&"PointerEvent"in window&&!L,emptyInsertThreshold:5};for(var r in lt.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Jt(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Zt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?N(t,"pointerdown",this._onTapStart):(N(t,"mousedown",this._onTapStart),N(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(N(t,"dragover",this),N(t,"dragenter",this)),zt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),S(this,at())}function ie(t,e,n,r,i,o,a,s){var u,l,c=t[ot],f=c.options.onMove;return!window.CustomEvent||T||k?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=r,u.related=i||e,u.relatedRect=o||Y(e),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),f&&(l=f.call(c,u,a)),l}function oe(t){t.draggable=!1}function ae(){qt=!1}function se(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function ue(t){return setTimeout(t,0)}function le(t){return clearTimeout(t)}re.prototype={constructor:re,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Mt=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,pt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=r.filter;if(function(t){Ht.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Ht.push(r)}}(n),!pt&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!L||!s||"SELECT"!==s.tagName.toUpperCase())&&(!(s=z(s,r.draggable,n,!1))||!s.animated)&&vt!==s){if(At=J(s),xt=J(s,r.draggable),"function"===typeof l){if(l.call(this,t,s,this))return ht({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),ft("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=z(u,r.trim(),n,!1))return ht({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),ft("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());r.handle&&!z(u,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!pt&&n.parentNode===o){var u=Y(n);if(gt=o,dt=(pt=n).parentNode,yt=pt.nextSibling,vt=n,Ot=a.group,re.dragged=pt,Pt={target:pt,clientX:(e||t).clientX,clientY:(e||t).clientY},It=Pt.clientX-u.left,Lt=Pt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,pt.style["will-change"]="all",r=function(){ft("delayEnded",i,{evt:t}),re.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!I&&i.nativeDraggable&&(pt.draggable=!0),i._triggerDragStart(t,e),ht({sortable:i,name:"choose",originalEvent:t}),V(pt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){W(pt,t.trim(),oe)})),N(s,"dragover",ee),N(s,"mousemove",ee),N(s,"touchmove",ee),N(s,"mouseup",i._onDrop),N(s,"touchend",i._onDrop),N(s,"touchcancel",i._onDrop),I&&this.nativeDraggable&&(this.options.touchStartThreshold=4,pt.draggable=!0),ft("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(k||T))r();else{if(re.eventCanceled)return void this._onDrop();N(s,"mouseup",i._disableDelayedDrag),N(s,"touchend",i._disableDelayedDrag),N(s,"touchcancel",i._disableDelayedDrag),N(s,"mousemove",i._delayedDragTouchMoveHandler),N(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&N(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){pt&&oe(pt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;D(t,"mouseup",this._disableDelayedDrag),D(t,"touchend",this._disableDelayedDrag),D(t,"touchcancel",this._disableDelayedDrag),D(t,"mousemove",this._delayedDragTouchMoveHandler),D(t,"touchmove",this._delayedDragTouchMoveHandler),D(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?N(document,"pointermove",this._onTouchMove):N(document,e?"touchmove":"mousemove",this._onTouchMove):(N(pt,"dragend",this),N(gt,"dragstart",this._onDragStart));try{document.selection?ue((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Ft=!1,gt&&pt){ft("dragStarted",this,{evt:e}),this.nativeDraggable&&N(document,"dragover",ne);var n=this.options;!t&&V(pt,n.dragClass,!1),V(pt,n.ghostClass,!0),re.active=this,t&&this._appendGhost(),ht({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ct){this._lastX=Ct.clientX,this._lastY=Ct.clientY,Qt();for(var t=document.elementFromPoint(Ct.clientX,Ct.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ct.clientX,Ct.clientY))!==e;)e=t;if(pt.parentNode[ot]._isOutsideThisEl(t),e)do{if(e[ot]){if(e[ot]._onDragOver({clientX:Ct.clientX,clientY:Ct.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);te()}},_onTouchMove:function(t){if(Pt){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=mt&&H(mt,!0),a=mt&&o&&o.a,s=mt&&o&&o.d,u=Xt&&Dt&&Q(Dt),l=(i.clientX-Pt.clientX+r.x)/(a||1)+(u?u[0]-Vt[0]:0)/(a||1),c=(i.clientY-Pt.clientY+r.y)/(s||1)+(u?u[1]-Vt[1]:0)/(s||1);if(!re.active&&!Ft){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(mt){o?(o.e+=l-(Tt||0),o.f+=c-(kt||0)):o={a:1,b:0,c:0,d:1,e:l,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");q(mt,"webkitTransform",f),q(mt,"mozTransform",f),q(mt,"msTransform",f),q(mt,"transform",f),Tt=l,kt=c,Ct=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!mt){var t=this.options.fallbackOnBody?document.body:gt,e=Y(pt,!0,Xt,!0,t),n=this.options;if(Xt){for(Dt=t;"static"===q(Dt,"position")&&"none"===q(Dt,"transform")&&Dt!==document;)Dt=Dt.parentNode;Dt!==document.body&&Dt!==document.documentElement?(Dt===document&&(Dt=X()),e.top+=Dt.scrollTop,e.left+=Dt.scrollLeft):Dt=X(),Vt=Q(Dt)}V(mt=pt.cloneNode(!0),n.ghostClass,!1),V(mt,n.fallbackClass,!0),V(mt,n.dragClass,!0),q(mt,"transition",""),q(mt,"transform",""),q(mt,"box-sizing","border-box"),q(mt,"margin",0),q(mt,"top",e.top),q(mt,"left",e.left),q(mt,"width",e.width),q(mt,"height",e.height),q(mt,"opacity","0.8"),q(mt,"position",Xt?"absolute":"fixed"),q(mt,"zIndex","100000"),q(mt,"pointerEvents","none"),re.ghost=mt,t.appendChild(mt),q(mt,"transform-origin",It/parseInt(mt.style.width)*100+"% "+Lt/parseInt(mt.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;ft("dragStart",this,{evt:t}),re.eventCanceled?this._onDrop():(ft("setupClone",this),re.eventCanceled||((bt=it(pt)).draggable=!1,bt.style["will-change"]="",this._hideClone(),V(bt,this.options.chosenClass,!1),re.clone=bt),n.cloneId=ue((function(){ft("clone",n),re.eventCanceled||(n.options.removeCloneOnHide||gt.insertBefore(bt,pt),n._hideClone(),ht({sortable:n,name:"clone"}))})),!e&&V(pt,i.dragClass,!0),e?(Bt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(D(document,"mouseup",n._onDrop),D(document,"touchend",n._onDrop),D(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,pt)),N(document,"drop",n),q(pt,"transform","translateZ(0)")),Ft=!0,n._dragStartId=ue(n._dragStarted.bind(n,e,t)),N(document,"selectstart",n),jt=!0,L&&q(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,a=t.target,s=this.options,u=s.group,l=re.active,c=Ot===u,f=s.sort,h=St||l,p=this,d=!1;if(!qt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=z(a,s.draggable,o,!0),k("dragOver"),re.eventCanceled)return d;if(pt.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return L(!1);if(Bt=!1,l&&!s.disabled&&(c?f||(r=dt!==gt):St===this||(this.lastPutMode=Ot.checkPull(this,l,pt,t))&&u.checkPut(this,l,pt,t))){if(i="vertical"===this._getDirection(t,a),e=Y(pt),k("dragOverValid"),re.eventCanceled)return d;if(r)return dt=gt,I(),this._hideClone(),k("revert"),re.eventCanceled||(yt?gt.insertBefore(pt,yt):gt.appendChild(pt)),L(!0);var m=$(o,s.draggable);if(!m||function(t,e,n){var r=Y($(n.el,n.options.draggable)),i=10;return e?t.clientX>r.right+i||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+i}(t,i,this)&&!m.animated){if(m===pt)return L(!1);if(m&&o===t.target&&(a=m),a&&(n=Y(a)),!1!==ie(gt,o,pt,e,a,n,t,!!a))return I(),o.appendChild(pt),dt=o,j(),L(!0)}else if(m&&function(t,e,n){var r=Y(K(n.el,0,n.options,!0)),i=10;return e?t.clientX<r.left-i||t.clientY<r.top&&t.clientX<r.right:t.clientY<r.top-i||t.clientY<r.bottom&&t.clientX<r.left}(t,i,this)){var g=K(o,0,s,!0);if(g===pt)return L(!1);if(n=Y(a=g),!1!==ie(gt,o,pt,e,a,n,t,!1))return I(),o.insertBefore(pt,g),dt=o,j(),L(!0)}else if(a.parentNode===o){n=Y(a);var y,v,b,_=pt.parentNode!==o,A=!function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,u=n?e.width:e.height;return r===a||i===s||r+o/2===a+u/2}(pt.animated&&pt.toRect||e,a.animated&&a.toRect||n,i),w=i?"top":"left",E=Z(a,"top","top")||Z(pt,"top","top"),O=E?E.scrollTop:void 0;if(Mt!==a&&(v=n[w],Ut=!1,Gt=!A&&s.invertSwap||_),y=function(t,e,n,r,i,o,a,s){var u=r?t.clientY:t.clientX,l=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,h=!1;if(!a)if(s&&Nt<l*i){if(!Ut&&(1===Rt?u>c+l*o/2:u<f-l*o/2)&&(Ut=!0),Ut)h=!0;else if(1===Rt?u<c+Nt:u>f-Nt)return-Rt}else if(u>c+l*(1-i)/2&&u<f-l*(1-i)/2)return function(t){return J(pt)<J(t)?1:-1}(e);if((h=h||a)&&(u<c+l*o/2||u>f-l*o/2))return u>c+l/2?1:-1;return 0}(t,a,n,i,A?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Gt,Mt===a),0!==y){var S=J(pt);do{S-=y,b=dt.children[S]}while(b&&("none"===q(b,"display")||b===mt))}if(0===y||b===a)return L(!1);Mt=a,Rt=y;var P=a.nextElementSibling,C=!1,T=ie(gt,o,pt,e,a,n,t,C=1===y);if(!1!==T)return 1!==T&&-1!==T||(C=1===T),qt=!0,setTimeout(ae,30),I(),C&&!P?o.appendChild(pt):a.parentNode.insertBefore(pt,C?P:a),E&&rt(E,0,O-E.scrollTop),dt=pt.parentNode,void 0===v||Gt||(Nt=Math.abs(v-Y(a)[w])),j(),L(!0)}if(o.contains(pt))return L(!1)}return!1}function k(s,u){ft(s,p,x({evt:t,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:h,target:a,completed:L,onMove:function(n,r){return ie(gt,o,pt,e,n,Y(n),t,r)},changed:j},u))}function I(){k("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function L(e){return k("dragOverCompleted",{insertion:e}),e&&(c?l._hideClone():l._showClone(p),p!==h&&(V(pt,St?St.options.ghostClass:l.options.ghostClass,!1),V(pt,s.ghostClass,!0)),St!==p&&p!==re.active?St=p:p===re.active&&St&&(St=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){k("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===pt&&!pt.animated||a===o&&!a.animated)&&(Mt=null),s.dragoverBubble||t.rootEl||a===document||(pt.parentNode[ot]._isOutsideThisEl(t.target),!e&&ee(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),d=!0}function j(){wt=J(pt),Et=J(pt,s.draggable),ht({sortable:p,name:"change",toEl:o,newIndex:wt,newDraggableIndex:Et,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){D(document,"mousemove",this._onTouchMove),D(document,"touchmove",this._onTouchMove),D(document,"pointermove",this._onTouchMove),D(document,"dragover",ee),D(document,"mousemove",ee),D(document,"touchmove",ee)},_offUpEvents:function(){var t=this.el.ownerDocument;D(t,"mouseup",this._onDrop),D(t,"touchend",this._onDrop),D(t,"pointerup",this._onDrop),D(t,"touchcancel",this._onDrop),D(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;wt=J(pt),Et=J(pt,n.draggable),ft("drop",this,{evt:t}),dt=pt&&pt.parentNode,wt=J(pt),Et=J(pt,n.draggable),re.eventCanceled||(Ft=!1,Gt=!1,Ut=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),le(this.cloneId),le(this._dragStartId),this.nativeDraggable&&(D(document,"drop",this),D(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),L&&q(document.body,"user-select",""),q(pt,"transform",""),t&&(jt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),mt&&mt.parentNode&&mt.parentNode.removeChild(mt),(gt===dt||St&&"clone"!==St.lastPutMode)&&bt&&bt.parentNode&&bt.parentNode.removeChild(bt),pt&&(this.nativeDraggable&&D(pt,"dragend",this),oe(pt),pt.style["will-change"]="",jt&&!Ft&&V(pt,St?St.options.ghostClass:this.options.ghostClass,!1),V(pt,this.options.chosenClass,!1),ht({sortable:this,name:"unchoose",toEl:dt,newIndex:null,newDraggableIndex:null,originalEvent:t}),gt!==dt?(wt>=0&&(ht({rootEl:dt,name:"add",toEl:dt,fromEl:gt,originalEvent:t}),ht({sortable:this,name:"remove",toEl:dt,originalEvent:t}),ht({rootEl:dt,name:"sort",toEl:dt,fromEl:gt,originalEvent:t}),ht({sortable:this,name:"sort",toEl:dt,originalEvent:t})),St&&St.save()):wt!==At&&wt>=0&&(ht({sortable:this,name:"update",toEl:dt,originalEvent:t}),ht({sortable:this,name:"sort",toEl:dt,originalEvent:t})),re.active&&(null!=wt&&-1!==wt||(wt=At,Et=xt),ht({sortable:this,name:"end",toEl:dt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){ft("nulling",this),gt=pt=dt=mt=yt=bt=vt=_t=Pt=Ct=jt=wt=Et=At=xt=Mt=Rt=St=Ot=re.dragged=re.ghost=re.clone=re.active=null,Ht.forEach((function(t){t.checked=!0})),Ht.length=Tt=kt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":pt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)z(t=n[r],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||se(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];z(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return z(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=lt.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Jt(n)},destroy:function(){ft("destroy",this);var t=this.el;t[ot]=null,D(t,"mousedown",this._onTapStart),D(t,"touchstart",this._onTapStart),D(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(D(t,"dragover",this),D(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),zt.splice(zt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_t){if(ft("hideClone",this),re.eventCanceled)return;q(bt,"display","none"),this.options.removeCloneOnHide&&bt.parentNode&&bt.parentNode.removeChild(bt),_t=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(_t){if(ft("showClone",this),re.eventCanceled)return;pt.parentNode!=gt||this.options.group.revertClone?yt?gt.insertBefore(bt,yt):gt.appendChild(bt):gt.insertBefore(bt,pt),this.options.group.revertClone&&this.animate(pt,bt),q(bt,"display",""),_t=!1}}else this._hideClone()}},Wt&&N(document,"touchmove",(function(t){(re.active||Ft)&&t.cancelable&&t.preventDefault()})),re.utils={on:N,off:D,css:q,find:W,is:function(t,e){return!!z(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:nt,closest:z,toggleClass:V,clone:it,index:J,nextTick:ue,cancelNextTick:le,detectDirection:$t,getChild:K},re.get=function(t){return t[ot]},re.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(re.utils=x(x({},re.utils),t.utils)),lt.mount(t)}))},re.create=function(t,e){return new re(t,e)},re.version="1.14.0";var ce,fe,he,pe,de,me,ge=[],ye=!1;function ve(){ge.forEach((function(t){clearInterval(t.pid)})),ge=[]}function be(){clearInterval(me)}var _e=nt((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,u=e.scrollSpeed,l=X(),c=!1;fe!==n&&(fe=n,ve(),ce=e.scroll,i=e.scrollFn,!0===ce&&(ce=tt(n,!0)));var f=0,h=ce;do{var p=h,d=Y(p),m=d.top,g=d.bottom,y=d.left,v=d.right,b=d.width,_=d.height,A=void 0,w=void 0,x=p.scrollWidth,E=p.scrollHeight,O=q(p),S=p.scrollLeft,P=p.scrollTop;p===l?(A=b<x&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),w=_<E&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(A=b<x&&("auto"===O.overflowX||"scroll"===O.overflowX),w=_<E&&("auto"===O.overflowY||"scroll"===O.overflowY));var C=A&&(Math.abs(v-o)<=s&&S+b<x)-(Math.abs(y-o)<=s&&!!S),T=w&&(Math.abs(g-a)<=s&&P+_<E)-(Math.abs(m-a)<=s&&!!P);if(!ge[f])for(var k=0;k<=f;k++)ge[k]||(ge[k]={});ge[f].vx==C&&ge[f].vy==T&&ge[f].el===p||(ge[f].el=p,ge[f].vx=C,ge[f].vy=T,clearInterval(ge[f].pid),0==C&&0==T||(c=!0,ge[f].pid=setInterval(function(){r&&0===this.layer&&re.active._onTouchMove(de);var e=ge[this.layer].vy?ge[this.layer].vy*u:0,n=ge[this.layer].vx?ge[this.layer].vx*u:0;"function"===typeof i&&"continue"!==i.call(re.dragged.parentNode[ot],n,e,t,de,ge[this.layer].el)||rt(ge[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==l&&(h=tt(h,!1)));ye=c}}),30),Ae=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var u=n||i;a();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(l.clientX,l.clientY);s(),u&&!u.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function we(){}function xe(){}we.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=K(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Ae},S(we,{pluginName:"revertOnSpill"}),xe.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Ae},S(xe,{pluginName:"removeOnSpill"}),re.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?N(document,"dragover",this._handleAutoScroll):this.options.supportPointer?N(document,"pointermove",this._handleFallbackAutoScroll):e.touches?N(document,"touchmove",this._handleFallbackAutoScroll):N(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?D(document,"dragover",this._handleAutoScroll):(D(document,"pointermove",this._handleFallbackAutoScroll),D(document,"touchmove",this._handleFallbackAutoScroll),D(document,"mousemove",this._handleFallbackAutoScroll)),be(),ve(),clearTimeout(U),U=void 0},nulling:function(){de=fe=ce=ye=me=he=pe=null,ge.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(de=t,e||this.options.forceAutoScrollFallback||k||T||L){_e(t,this.options,o,e);var a=tt(o,!0);!ye||me&&r===he&&i===pe||(me&&be(),me=setInterval((function(){var o=tt(document.elementFromPoint(r,i),!0);o!==a&&(a=o,ve()),_e(t,n.options,o,e)}),10),he=r,pe=i)}else{if(!this.options.bubbleScroll||tt(o,!0)===X())return void ve();_e(t,this.options,tt(o,!1),!1)}}},S(t,{pluginName:"scroll",initializeByDefault:!0})}),re.mount(xe,we);class Ee{constructor(t){this.response=t}get statusCode(){return this.response.status}get redirected(){return this.response.redirected}get ok(){return this.response.ok}get unauthenticated(){return 401===this.statusCode}get authenticationURL(){return this.response.headers.get("WWW-Authenticate")}get contentType(){return(this.response.headers.get("Content-Type")||"").replace(/;.*$/,"")}get headers(){return this.response.headers}get html(){return this.contentType.match(/^(application|text)\/(html|xhtml\+xml)$/)?this.text:Promise.reject(new Error(`Expected an HTML response but got "${this.contentType}" instead`))}get json(){return this.contentType.match(/^application\/json/)?this.responseJson||(this.responseJson=this.response.json()):Promise.reject(new Error(`Expected a JSON response but got "${this.contentType}" instead`))}get text(){return this.responseText||(this.responseText=this.response.text())}get isTurboStream(){return this.contentType.match(/^text\/vnd\.turbo-stream\.html/)}async renderTurboStream(){if(!this.isTurboStream)return Promise.reject(new Error(`Expected a Turbo Stream response but got "${this.contentType}" instead`));window.Turbo?window.Turbo.renderStreamMessage(await this.text):console.warn("You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js")}}function Oe(t){const e=document.head.querySelector(`meta[name="${t}"]`);return e&&e.content}class Se{constructor(t,e,n={}){this.method=t,this.options=n,this.originalUrl=e}async perform(){try{const t=class{static register(t){this.interceptor=t}static get(){return this.interceptor}static reset(){this.interceptor=void 0}}.get();t&&await t(this)}catch(e){console.error(e)}const t=new Ee(await window.fetch(this.url,this.fetchOptions));return t.unauthenticated&&t.authenticationURL?Promise.reject(window.location.href=t.authenticationURL):(t.ok&&t.isTurboStream&&t.renderTurboStream(),t)}addHeader(t,e){const n=this.additionalHeaders;n[t]=e,this.options.headers=n}get fetchOptions(){return{method:this.method.toUpperCase(),headers:this.headers,body:this.formattedBody,signal:this.signal,credentials:"same-origin",redirect:this.redirect}}get headers(){return function(t){const e={};for(const n in t){const r=t[n];void 0!==r&&(e[n]=r)}return e}(Object.assign({"X-Requested-With":"XMLHttpRequest","X-CSRF-Token":this.csrfToken,"Content-Type":this.contentType,Accept:this.accept},this.additionalHeaders))}get csrfToken(){return function(t){const e=document.cookie?document.cookie.split("; "):[],n=`${encodeURIComponent(t)}=`,r=e.find((t=>t.startsWith(n)));if(r){const t=r.split("=").slice(1).join("=");if(t)return decodeURIComponent(t)}}(Oe("csrf-param"))||Oe("csrf-token")}get contentType(){return this.options.contentType?this.options.contentType:null==this.body||this.body instanceof window.FormData?void 0:this.body instanceof window.File?this.body.type:"application/json"}get accept(){switch(this.responseKind){case"html":return"text/html, application/xhtml+xml";case"turbo-stream":return"text/vnd.turbo-stream.html, text/html, application/xhtml+xml";case"json":return"application/json";default:return"*/*"}}get body(){return this.options.body}get query(){const t=(this.originalUrl.split("?")[1]||"").split("#")[0],e=new URLSearchParams(t);let n=this.options.query;var r;n instanceof window.FormData?(r=n,n=[...r].reduce(((t,[e,n])=>t.concat("string"===typeof n?[[e,n]]:[])),[])):n=n instanceof window.URLSearchParams?n.entries():Object.entries(n||{}),function(t,e){for(const[n,r]of e)r instanceof window.File||(t.has(n)?(t.delete(n),t.set(n,r)):t.append(n,r))}(e,n);const i=e.toString();return i.length>0?`?${i}`:""}get url(){return this.originalUrl.split("?")[0]+this.query}get responseKind(){return this.options.responseKind||"html"}get signal(){return this.options.signal}get redirect(){return this.options.redirect||"follow"}get additionalHeaders(){return this.options.headers||{}}get formattedBody(){const t="[object String]"===Object.prototype.toString.call(this.body);return"application/json"===this.headers["Content-Type"]&&!t?JSON.stringify(this.body):this.body}}class Pe extends A{initialize(){this.end=this.end.bind(this)}connect(){this.sortable=new re(this.element,u(u({},this.defaultOptions),this.options))}disconnect(){this.sortable.destroy(),this.sortable=void 0}async end({item:t,newIndex:e}){if(!t.dataset.sortableUpdateUrl)return;const n=this.resourceNameValue?`${this.resourceNameValue}[${this.paramNameValue}]`:this.paramNameValue,r=new FormData;r.append(n,e+1),await async function(t,e){return new Se("patch",t,e).perform()}(t.dataset.sortableUpdateUrl,{body:r,responseKind:this.responseKindValue})}get options(){return{animation:this.animationValue||this.defaultOptions.animation||150,handle:this.handleValue||this.defaultOptions.handle||void 0,onEnd:this.end}}get defaultOptions(){return{}}}Pe.values={resourceName:String,paramName:{type:String,default:"position"},responseKind:{type:String,default:"html"},animation:Number,handle:String}}).call(this,n(155))},function(t,e,n){var r,i,o;i=[e,n(1214),n(428)],void 0===(o="function"===typeof(r=function(t,e,n){var r=e,i=n.Base64||n,o="2.3.2",a=/^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i,s=100,u=8192,l=.08,c={1:75,2:50,3:35,4:23,5:20},f={domain:null,useHTTPS:!0,includeLibraryParam:!0};return function(){function t(t){var e,n;for(e in this.settings={},f)n=f[e],this.settings[e]=n;for(e in t)n=t[e],this.settings[e]=n;if("string"!=typeof this.settings.domain)throw new Error("ImgixClient must be passed a valid string domain");if(null==a.exec(this.settings.domain))throw new Error('Domain must be passed in as fully-qualified domain name and should not include a protocol or any path element, i.e. "example.imgix.net".');this.settings.includeLibraryParam&&(this.settings.libraryParam="js-"+o),this.settings.urlPrefix=this.settings.useHTTPS?"https://":"http://"}function e(t){if(void 0!==t.widthTolerance){h(t.widthTolerance);var e=t.widthTolerance}else e=l;var r=void 0===t.minWidth?s:t.minWidth,i=void 0===t.maxWidth?u:t.maxWidth;return r==s&&i==u||n(r,i),[e,r,i]}function n(t,e){if(!Number.isInteger(t)||!Number.isInteger(e)||t<=0||e<=0||t>e)throw new Error("The min and max srcset widths can only be passed positive Number values")}function h(t){if("number"!=typeof t||t<=0)throw new Error("The srcset widthTolerance argument can only be passed a positive scalar number")}function p(t){if(!Array.isArray(t)||!t.length)throw new Error("The widths argument can only be passed a valid non-empty array of integers");if(!t.every((function(t){return Number.isInteger(t)&&t>0})))throw new Error("A custom widths argument can only contain positive integer values")}function d(t){if("boolean"!=typeof t)throw new Error("The disableVariableQuality argument can only be passed a Boolean value")}return t.prototype.buildURL=function(t,e){t=this._sanitizePath(t),null==e&&(e={});var n=this._buildParams(e);return this.settings.secureURLToken&&(n=this._signParams(t,n)),this.settings.urlPrefix+this.settings.domain+t+n},t.prototype._sanitizePath=function(t){return t=t.replace(/^\//,""),"/"+(t=/^https?:\/\//.test(t)?encodeURIComponent(t):encodeURI(t).replace(/[#?:]/g,encodeURIComponent))},t.prototype._buildParams=function(t){var e,n,r,o,a=[];for(e in this.settings.libraryParam&&a.push("ixlib="+this.settings.libraryParam),t)n=t[e],r=encodeURIComponent(e),o="64"===e.substr(-2)?i.encodeURI(n):encodeURIComponent(n),a.push(r+"="+o);return a[0]&&(a[0]="?"+a[0]),a.join("&")},t.prototype._signParams=function(t,e){var n=this.settings.secureURLToken+t+e,i=r(n);return e.length>0?e+"&s="+i:"?s="+i},t.prototype.buildSrcSet=function(t,e,n){var r=(e=e||{}).w,i=e.h,o=e.ar;return n=n||{},r||i&&o?this._buildDPRSrcSet(t,e,n):this._buildSrcSetPairs(t,e,n)},t.prototype._buildSrcSetPairs=function(t,r,i){var o,a,s,u=[],l=i.widths,c=e(i),f=c[0],d=c[1],m=c[2];l?(p(l),a=l):(n(d,m),h(f),a=this._generateTargetWidths(f,d,m));var g={};for(s in r)g[s]=r[s];for(var y=0;y<a.length;y++)o=a[y],g.w=o,u.push(this.buildURL(t,g)+" "+o+"w");return u.join(",\n")},t.prototype._buildDPRSrcSet=function(t,e,n){var r,i=[],o=[1,2,3,4,5],a=n.disableVariableQuality||!1,s={};for(r in e)s[r]=e[r];var u=s.q;a||d(a);for(var l=0;l<o.length;l++){var f=o[l];s.dpr=f,a||(s.q=u||c[f]),i.push(this.buildURL(t,s)+" "+f+"x")}return i.join(",\n")},t.prototype.targetWidthsCache={},t.prototype._generateTargetWidths=function(t,e,n){var r=[],i=t,o=i+"/"+(e=Math.floor(e))+"/"+(n=Math.floor(n));if(o in this.targetWidthsCache)return this.targetWidthsCache[o];for(var a=function(t){return 2*Math.round(t/2)},s=e;s<n;)r.push(a(s)),s*=1+2*i;return r.push(n),this.targetWidthsCache[o]=r,r},t.VERSION=o,t}()})?r.apply(e,i):r)||(t.exports=o)},function(t,e){t.exports=function(t,e,n,r){var i=n?n.call(r,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!==typeof t||!t||"object"!==typeof e||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),u=0;u<o.length;u++){var l=o[u];if(!s(l))return!1;var c=t[l],f=e[l];if(!1===(i=n?n.call(r,c,f,l):void 0)||void 0===i&&c!==f)return!1}return!0}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(361),i=n(1217);function o(e,n,a){return i()?(t.exports=o=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&r(o,n.prototype),o},t.exports.default=t.exports,t.exports.__esModule=!0),o.apply(null,arguments)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.FormPrevious=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.FormPrevious=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"FormPrevious"},t),i.default.createElement("polyline",{fill:"none",stroke:"#000",strokeWidth:"2",points:"9 6 15 12 9 18",transform:"matrix(-1 0 0 1 24 0)"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.FormNext=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.FormNext=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"FormNext"},t),i.default.createElement("polyline",{fill:"none",stroke:"#000",strokeWidth:"2",points:"9 6 15 12 9 18"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.Subtract=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Subtract=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Subtract"},t),i.default.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M2,12 L22,12"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.ClosedCaption=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.ClosedCaption=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"ClosedCaption"},t),i.default.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M1,12 C1,5 2.5,4 12,4 C21.5,4 23,5 23,12 C23,19 21.5,20 12,20 C2.5,20 1,19 1,12 Z M5.25,14 C5.25,15.5 6,16 7.75,16 C9.5,16 10.25,15.5 10.25,14 L9.97861679,14 C9.97861671,15.25 8.97905547,16 7.75,16 C6.52094453,16 5.52138329,15.25 5.52138321,14 L5.52138321,10 C5.5,8.75 6.5,8 7.75,8 C9,8 10,8.75 9.97861679,10 L10.25,10 C10.25,8.75 9.2286998,8 7.75,8 C6.2713002,8 5.25,8.75 5.25,10 L5.25,14 Z M13.25,14 C13.25,15.5 14,16 15.75,16 C17.5,16 18.25,15.5 18.25,14 L17.9786168,14 C17.9786167,15.25 16.9790555,16 15.75,16 C14.5209445,16 13.5213833,15.25 13.5213832,14 L13.5213832,10 C13.5,8.75 14.5,8 15.75,8 C17,8 18,8.75 17.9786168,10 L18.25,10 C18.25,8.75 17.2286998,8 15.75,8 C14.2713002,8 13.25,8.75 13.25,10 L13.25,14 Z"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.Actions=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Actions=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Actions"},t),i.default.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M12,17.5 C15.0375661,17.5 17.5,15.0375661 17.5,12 C17.5,8.96243388 15.0375661,6.5 12,6.5 C8.96243388,6.5 6.5,8.96243388 6.5,12 C6.5,15.0375661 8.96243388,17.5 12,17.5 Z M12,6.5 L12,1 M12,23 L12,17.5 M1,12 L6.5,12 M17.5,12 L23,12 M4.4375,4.4375 L8.5625,8.5625 M15.4375,15.4375 L19.5625,19.5625 M19.5625,4.4375 L15.4375,8.5625 M8.5625,15.4375 L4.4375,19.5625"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.Expand=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Expand=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Expand"},t),i.default.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M10,14 L2,22 M1,15 L1,23 L9,23 M22,2 L14,10 M15,1 L23,1 L23,9"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.Pause=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Pause=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Pause"},t),i.default.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M3,21 L9,21 L9,3 L3,3 L3,21 Z M15,21 L21,21 L21,3 L15,3 L15,21 Z"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.Play=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Play=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Play"},t),i.default.createElement("polygon",{fill:"none",stroke:"#000",strokeWidth:"2",points:"3 22 21 12 3 2"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.VolumeLow=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.VolumeLow=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"VolumeLow"},t),i.default.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M1,8 L1,16 L6.09901951,16 L12,21 L12,3 L6,8 L1,8 Z M15,16 L15,16 C17.209139,16 19,14.209139 19,12 C19,9.790861 17.209139,8 15,8"}))}},function(t,e,n){"use strict";e.__esModule=!0,e.Volume=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(118);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},a.apply(this,arguments)}e.Volume=function(t){return i.default.createElement(o.StyledIcon,a({viewBox:"0 0 24 24",a11yTitle:"Volume"},t),i.default.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M15,16 C17.209,16 19,14.209 19,12 C19,9.791 17.209,8 15,8 M15,20 C20,20 23,16.411 23,12 C23,7.589 19.411,4 15,4 M1,12 L1,8 L6,8 L12,3 L12,21 L6,16 L1,16 L1,12"}))}},function(t,e,n){t.exports=function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:a,create:s}=Object,{apply:u,construct:l}="undefined"!==typeof Reflect&&Reflect;u||(u=function(t,e,n){return t.apply(e,n)}),o||(o=function(t){return t}),a||(a=function(t){return t}),l||(l=function(t,e){return new t(...e)});const c=A(Array.prototype.forEach),f=A(Array.prototype.pop),h=A(Array.prototype.push),p=A(String.prototype.toLowerCase),d=A(String.prototype.toString),m=A(String.prototype.match),g=A(String.prototype.replace),y=A(String.prototype.indexOf),v=A(String.prototype.trim),b=A(RegExp.prototype.test),_=w(TypeError);function A(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function w(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return l(t,n)}}function x(t,r,i){var o;i=null!==(o=i)&&void 0!==o?o:p,e&&e(t,null);let a=r.length;for(;a--;){let e=r[a];if("string"===typeof e){const t=i(e);t!==e&&(n(r)||(r[a]=t),e=t)}t[e]=!0}return t}function E(e){const n=s(null);for(const[r,i]of t(e))n[r]=i;return n}function O(t,e){for(;null!==t;){const n=i(t,e);if(n){if(n.get)return A(n.get);if("function"===typeof n.value)return A(n.value)}t=r(t)}function n(t){return console.warn("fallback value for",t),null}return n}const S=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),P=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),L=o(["#text"]),j=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),R=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),N=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),U=a(/^aria-[\-\w]+$/),G=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H=a(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:D,ERB_EXPR:F,TMPLIT_EXPR:B,DATA_ATTR:z,ARIA_ATTR:U,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:q,DOCTYPE_NAME:H});const X=()=>"undefined"===typeof window?null:window,Y=function(t,e){if("object"!==typeof t||"function"!==typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(o){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const n=t=>Z(t);if(n.version="3.0.5",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;const r=e.document,i=r.currentScript;let{document:a}=e;const{DocumentFragment:s,HTMLTemplateElement:u,Node:l,Element:A,NodeFilter:w,NamedNodeMap:D=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:F,DOMParser:B,trustedTypes:z}=e,U=A.prototype,V=O(U,"cloneNode"),q=O(U,"nextSibling"),K=O(U,"childNodes"),$=O(U,"parentNode");if("function"===typeof u){const t=a.createElement("template");t.content&&t.content.ownerDocument&&(a=t.content.ownerDocument)}let J,Q="";const{implementation:tt,createNodeIterator:et,createDocumentFragment:nt,getElementsByTagName:rt}=a,{importNode:it}=r;let ot={};n.isSupported="function"===typeof t&&"function"===typeof $&&tt&&void 0!==tt.createHTMLDocument;const{MUSTACHE_EXPR:at,ERB_EXPR:st,TMPLIT_EXPR:ut,DATA_ATTR:lt,ARIA_ATTR:ct,IS_SCRIPT_OR_DATA:ft,ATTR_WHITESPACE:ht}=W;let{IS_ALLOWED_URI:pt}=W,dt=null;const mt=x({},[...S,...P,...C,...k,...L]);let gt=null;const yt=x({},[...j,...M,...R,...N]);let vt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bt=null,_t=null,At=!0,wt=!0,xt=!1,Et=!0,Ot=!1,St=!1,Pt=!1,Ct=!1,Tt=!1,kt=!1,It=!1,Lt=!0,jt=!1;const Mt="user-content-";let Rt=!0,Nt=!1,Dt={},Ft=null;const Bt=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let zt=null;const Ut=x({},["audio","video","img","source","image","track"]);let Gt=null;const Vt=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qt="http://www.w3.org/1998/Math/MathML",Ht="http://www.w3.org/2000/svg",Wt="http://www.w3.org/1999/xhtml";let Xt=Wt,Yt=!1,Zt=null;const Kt=x({},[qt,Ht,Wt],d);let $t;const Jt=["application/xhtml+xml","text/html"],Qt="text/html";let te,ee=null;const ne=a.createElement("form"),re=function(t){return t instanceof RegExp||t instanceof Function},ie=function(t){if(!ee||ee!==t){if(t&&"object"===typeof t||(t={}),t=E(t),$t=$t=-1===Jt.indexOf(t.PARSER_MEDIA_TYPE)?Qt:t.PARSER_MEDIA_TYPE,te="application/xhtml+xml"===$t?d:p,dt="ALLOWED_TAGS"in t?x({},t.ALLOWED_TAGS,te):mt,gt="ALLOWED_ATTR"in t?x({},t.ALLOWED_ATTR,te):yt,Zt="ALLOWED_NAMESPACES"in t?x({},t.ALLOWED_NAMESPACES,d):Kt,Gt="ADD_URI_SAFE_ATTR"in t?x(E(Vt),t.ADD_URI_SAFE_ATTR,te):Vt,zt="ADD_DATA_URI_TAGS"in t?x(E(Ut),t.ADD_DATA_URI_TAGS,te):Ut,Ft="FORBID_CONTENTS"in t?x({},t.FORBID_CONTENTS,te):Bt,bt="FORBID_TAGS"in t?x({},t.FORBID_TAGS,te):{},_t="FORBID_ATTR"in t?x({},t.FORBID_ATTR,te):{},Dt="USE_PROFILES"in t&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,wt=!1!==t.ALLOW_DATA_ATTR,xt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ot=t.SAFE_FOR_TEMPLATES||!1,St=t.WHOLE_DOCUMENT||!1,Tt=t.RETURN_DOM||!1,kt=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,Ct=t.FORCE_BODY||!1,Lt=!1!==t.SANITIZE_DOM,jt=t.SANITIZE_NAMED_PROPS||!1,Rt=!1!==t.KEEP_CONTENT,Nt=t.IN_PLACE||!1,pt=t.ALLOWED_URI_REGEXP||G,Xt=t.NAMESPACE||Wt,vt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&re(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&re(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ot&&(wt=!1),kt&&(Tt=!0),Dt&&(dt=x({},[...L]),gt=[],!0===Dt.html&&(x(dt,S),x(gt,j)),!0===Dt.svg&&(x(dt,P),x(gt,M),x(gt,N)),!0===Dt.svgFilters&&(x(dt,C),x(gt,M),x(gt,N)),!0===Dt.mathMl&&(x(dt,k),x(gt,R),x(gt,N))),t.ADD_TAGS&&(dt===mt&&(dt=E(dt)),x(dt,t.ADD_TAGS,te)),t.ADD_ATTR&&(gt===yt&&(gt=E(gt)),x(gt,t.ADD_ATTR,te)),t.ADD_URI_SAFE_ATTR&&x(Gt,t.ADD_URI_SAFE_ATTR,te),t.FORBID_CONTENTS&&(Ft===Bt&&(Ft=E(Ft)),x(Ft,t.FORBID_CONTENTS,te)),Rt&&(dt["#text"]=!0),St&&x(dt,["html","head","body"]),dt.table&&(x(dt,["tbody"]),delete bt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!==typeof t.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=t.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=Y(z,i)),null!==J&&"string"===typeof Q&&(Q=J.createHTML(""));o&&o(t),ee=t}},oe=x({},["mi","mo","mn","ms","mtext"]),ae=x({},["foreignobject","desc","title","annotation-xml"]),se=x({},["title","style","font","a","script"]),ue=x({},P);x(ue,C),x(ue,T);const le=x({},k);x(le,I);const ce=function(t){let e=$(t);e&&e.tagName||(e={namespaceURI:Xt,tagName:"template"});const n=p(t.tagName),r=p(e.tagName);return!!Zt[t.namespaceURI]&&(t.namespaceURI===Ht?e.namespaceURI===Wt?"svg"===n:e.namespaceURI===qt?"svg"===n&&("annotation-xml"===r||oe[r]):Boolean(ue[n]):t.namespaceURI===qt?e.namespaceURI===Wt?"math"===n:e.namespaceURI===Ht?"math"===n&&ae[r]:Boolean(le[n]):t.namespaceURI===Wt?!(e.namespaceURI===Ht&&!ae[r])&&!(e.namespaceURI===qt&&!oe[r])&&!le[n]&&(se[n]||!ue[n]):!("application/xhtml+xml"!==$t||!Zt[t.namespaceURI]))},fe=function(t){h(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},he=function(t,e){try{h(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(r){h(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!gt[t])if(Tt||kt)try{fe(e)}catch(r){}else try{e.setAttribute(t,"")}catch(r){}},pe=function(t){let e,n;if(Ct)t="<remove></remove>"+t;else{const e=m(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===$t&&Xt===Wt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=J?J.createHTML(t):t;if(Xt===Wt)try{e=(new B).parseFromString(r,$t)}catch(o){}if(!e||!e.documentElement){e=tt.createDocument(Xt,"template",null);try{e.documentElement.innerHTML=Yt?Q:r}catch(o){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(a.createTextNode(n),i.childNodes[0]||null),Xt===Wt?rt.call(e,St?"html":"body")[0]:St?e.documentElement:i},de=function(t){return et.call(t.ownerDocument||t,t,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null,!1)},me=function(t){return t instanceof F&&("string"!==typeof t.nodeName||"string"!==typeof t.textContent||"function"!==typeof t.removeChild||!(t.attributes instanceof D)||"function"!==typeof t.removeAttribute||"function"!==typeof t.setAttribute||"string"!==typeof t.namespaceURI||"function"!==typeof t.insertBefore||"function"!==typeof t.hasChildNodes)},ge=function(t){return"object"===typeof l?t instanceof l:t&&"object"===typeof t&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},ye=function(t,e,r){ot[t]&&c(ot[t],(t=>{t.call(n,e,r,ee)}))},ve=function(t){let e;if(ye("beforeSanitizeElements",t,null),me(t))return fe(t),!0;const r=te(t.nodeName);if(ye("uponSanitizeElement",t,{tagName:r,allowedTags:dt}),t.hasChildNodes()&&!ge(t.firstElementChild)&&(!ge(t.content)||!ge(t.content.firstElementChild))&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return fe(t),!0;if(!dt[r]||bt[r]){if(!bt[r]&&_e(r)){if(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,r))return!1;if(vt.tagNameCheck instanceof Function&&vt.tagNameCheck(r))return!1}if(Rt&&!Ft[r]){const e=$(t)||t.parentNode,n=K(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r)e.insertBefore(V(n[r],!0),q(t))}return fe(t),!0}return t instanceof A&&!ce(t)?(fe(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ot&&3===t.nodeType&&(e=t.textContent,e=g(e,at," "),e=g(e,st," "),e=g(e,ut," "),t.textContent!==e&&(h(n.removed,{element:t.cloneNode()}),t.textContent=e)),ye("afterSanitizeElements",t,null),!1):(fe(t),!0)},be=function(t,e,n){if(Lt&&("id"===e||"name"===e)&&(n in a||n in ne))return!1;if(wt&&!_t[e]&&b(lt,e));else if(At&&b(ct,e));else if(!gt[e]||_t[e]){if(!(_e(t)&&(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,t)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(t))&&(vt.attributeNameCheck instanceof RegExp&&b(vt.attributeNameCheck,e)||vt.attributeNameCheck instanceof Function&&vt.attributeNameCheck(e))||"is"===e&&vt.allowCustomizedBuiltInElements&&(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,n)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(n))))return!1}else if(Gt[e]);else if(b(pt,g(n,ht,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(n,"data:")||!zt[t])if(xt&&!b(ft,g(n,ht,"")));else if(n)return!1;return!0},_e=function(t){return t.indexOf("-")>0},Ae=function(t){let e,r,i,o;ye("beforeSanitizeAttributes",t,null);const{attributes:a}=t;if(!a)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:gt};for(o=a.length;o--;){e=a[o];const{name:l,namespaceURI:c}=e;if(r="value"===l?e.value:v(e.value),i=te(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ye("uponSanitizeAttribute",t,s),r=s.attrValue,s.forceKeepAttr)continue;if(he(l,t),!s.keepAttr)continue;if(!Et&&b(/\/>/i,r)){he(l,t);continue}Ot&&(r=g(r,at," "),r=g(r,st," "),r=g(r,ut," "));const h=te(t.nodeName);if(be(h,i,r)){if(!jt||"id"!==i&&"name"!==i||(he(l,t),r=Mt+r),J&&"object"===typeof z&&"function"===typeof z.getAttributeType)if(c);else switch(z.getAttributeType(h,i)){case"TrustedHTML":r=J.createHTML(r);break;case"TrustedScriptURL":r=J.createScriptURL(r)}try{c?t.setAttributeNS(c,l,r):t.setAttribute(l,r),f(n.removed)}catch(u){}}}ye("afterSanitizeAttributes",t,null)},we=function t(e){let n;const r=de(e);for(ye("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)ye("uponSanitizeShadowNode",n,null),ve(n)||(n.content instanceof s&&t(n.content),Ae(n));ye("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e,i,o,a,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Yt=!t,Yt&&(t="\x3c!--\x3e"),"string"!==typeof t&&!ge(t)){if("function"!==typeof t.toString)throw _("toString is not a function");if("string"!==typeof(t=t.toString()))throw _("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Pt||ie(u),n.removed=[],"string"===typeof t&&(Nt=!1),Nt){if(t.nodeName){const e=te(t.nodeName);if(!dt[e]||bt[e])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)e=pe("\x3c!----\x3e"),i=e.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?e=i:e.appendChild(i);else{if(!Tt&&!Ot&&!St&&-1===t.indexOf("<"))return J&&It?J.createHTML(t):t;if(e=pe(t),!e)return Tt?null:It?Q:""}e&&Ct&&fe(e.firstChild);const c=de(Nt?t:e);for(;o=c.nextNode();)ve(o)||(o.content instanceof s&&we(o.content),Ae(o));if(Nt)return t;if(Tt){if(kt)for(a=nt.call(e.ownerDocument);e.firstChild;)a.appendChild(e.firstChild);else a=e;return(gt.shadowroot||gt.shadowrootmode)&&(a=it.call(r,a,!0)),a}let f=St?e.outerHTML:e.innerHTML;return St&&dt["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&b(H,e.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+e.ownerDocument.doctype.name+">\n"+f),Ot&&(f=g(f,at," "),f=g(f,st," "),f=g(f,ut," ")),J&&It?J.createHTML(f):f},n.setConfig=function(t){ie(t),Pt=!0},n.clearConfig=function(){ee=null,Pt=!1},n.isValidAttribute=function(t,e,n){ee||ie({});const r=te(t),i=te(e);return be(r,i,n)},n.addHook=function(t,e){"function"===typeof e&&(ot[t]=ot[t]||[],h(ot[t],e))},n.removeHook=function(t){if(ot[t])return f(ot[t])},n.removeHooks=function(t){ot[t]&&(ot[t]=[])},n.removeAllHooks=function(){ot={}},n}return Z()}()},function(t,e,n){var r=n(1236),i=n(90),o=n(550),a=n(1238).default,s=o.featureEach,u=(o.coordEach,i.polygon,i.featureCollection);function l(t){var e=r(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:a(t),r.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:a(t),e.push(t)})):s(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:a(t),e.push(t)})),r.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:a(t),r.prototype.remove.call(this,t,e)},e.clear=function(){return r.prototype.clear.call(this)},e.search=function(t){var e=r.prototype.search.call(this,this.toBBox(t));return u(e)},e.collides=function(t){return r.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=r.prototype.all.call(this);return u(t)},e.toJSON=function(){return r.prototype.toJSON.call(this)},e.fromJSON=function(t){return r.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=a(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=a(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=l,t.exports.default=l},function(t,e,n){t.exports={HeroContent:"HeroContent-module__HeroContent___1GwJ4",textContent:"HeroContent-module__textContent___349w5"}},function(t,e,n){t.exports={hamburger:"Hamburger-module__hamburger___3nQHc",isActive:"Hamburger-module__isActive___3ndga",hamburgerBox:"Hamburger-module__hamburgerBox___2GO4Y",hamburgerInner:"Hamburger-module__hamburgerInner___3L1mb",Hamburger:"Hamburger-module__Hamburger___jhqe6"}},function(t,e,n){t.exports={Navigation:"Navigation-module__Navigation___1LqDm",highlightedLink:"Navigation-module__highlightedLink___eXiei",userFunctions:"Navigation-module__userFunctions___3xRvy",NavigationMobile:"Navigation-module__NavigationMobile___1SPKC",isActive:"Navigation-module__isActive___1XPHZ","has-mobile-menu-open":"Navigation-module__has-mobile-menu-open___115tj","sub-menu-action":"Navigation-module__sub-menu-action___1SpFw","sub-menu-action-close":"Navigation-module__sub-menu-action-close___3hnau","is-showing-children":"Navigation-module__is-showing-children___2ZqRD","sub-menu-action-open":"Navigation-module__sub-menu-action-open___2CaAi",actions:"Navigation-module__actions___Hm-NB","agent-platform-ios":"Navigation-module__agent-platform-ios___1Afhr",hamburger:"Navigation-module__hamburger___2pU8N"}},,,,,,,,,,,function(t,e,n){(function(r){var i,o;(function(){}).call(this),function(){null==window.Set&&(window.Set=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.values=[]},t.prototype.has=function(t){return-1!==this.values.indexOf(t)},t.prototype.add=function(t){return this.has(t)||this.values.push(t),this},t.prototype.delete=function(t){var e;return-1!==(e=this.values.indexOf(t))&&(this.values.splice(e,1),!0)},t.prototype.forEach=function(){var t;return(t=this.values).forEach.apply(t,arguments)},t}())}.call(this),function(e){function n(){}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(t,this)}function o(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void h((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void s(e.promise,o)}a(e.promise,r)}else(1===t._state?a:s)(e.promise,t._value)})))}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void c(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,u(t)}catch(a){s(t,a)}}function s(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&setTimeout((function(){t._handled||p(t._value)}),1);for(var e=0,n=t._deferreds.length;n>e;e++)o(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function c(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,s(e,t))}))}catch(i){if(n)return;n=!0,s(e,i)}}var f=setTimeout,h="function"==typeof r&&r||function(t){f(t,1)},p=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var r=new i(n);return o(this,new l(t,e,r)),r},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(t){r(o,t)}),n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)r(o,e[o])}))},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i((function(e){e(t)}))},i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){for(var r=0,i=t.length;i>r;r++)t[r].then(e,n)}))},i._setImmediateFn=function(t){h=t},i._setUnhandledRejectionFn=function(t){p=t},t.exports?t.exports=i:e.Promise||(e.Promise=i)}(this),function(){var t="object"==typeof window.customElements,e="function"==typeof document.registerElement;t||e||("undefined"==typeof WeakMap&&function(){var t=Object.defineProperty,e=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+e+++"__"};n.prototype={set:function(e,n){var r=e[this.name];return r&&r[0]===e?r[1]=n:t(e,this.name,{value:[e,n],writable:!0}),this},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},delete:function(t){var e=t[this.name];return!(!e||e[0]!==t)&&(e[0]=e[1]=void 0,!0)},has:function(t){var e=t[this.name];return!!e&&e[0]===t}},window.WeakMap=n}(),function(t){function e(t){y.push(t),g||(g=!0,c(n))}function n(){g=!1;var t=y;y=[],t.sort((function(t,e){return t.uid_-e.uid_}));var e=!1;t.forEach((function(t){var n=t.takeRecords();(function(t){t.nodes_.forEach((function(e){var n=f.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))})(t),n.length&&(t.callback_(n,t),e=!0)})),e&&n()}function r(t,e){for(var n=t;n;n=n.parentNode){var r=f.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}function i(t){this.callback_=t,this.nodes_=[],this.records_=[],this.uid_=++v}function o(t,e){this.type=t,this.target=e,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function a(t,e){return d=new o(t,e)}function s(t){return m||(m=function(t){var e=new o(t.type,t.target);return e.addedNodes=t.addedNodes.slice(),e.removedNodes=t.removedNodes.slice(),e.previousSibling=t.previousSibling,e.nextSibling=t.nextSibling,e.attributeName=t.attributeName,e.attributeNamespace=t.attributeNamespace,e.oldValue=t.oldValue,e}(d),m.oldValue=t,m)}function u(t,e){return t===e?t:m&&function(t){return t===m||t===d}(t)?m:null}function l(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}if(!t.JsMutationObserver){var c,f=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))c=setTimeout;else if(window.setImmediate)c=window.setImmediate;else{var h=[],p=String(Math.random());window.addEventListener("message",(function(t){if(t.data===p){var e=h;h=[],e.forEach((function(t){t()}))}})),c=function(t){h.push(t),window.postMessage(p,"*")}}var d,m,g=!1,y=[],v=0;i.prototype={observe:function(t,e){if(t=function(t){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(t)||t}(t),!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n=f.get(t);n||f.set(t,n=[]);for(var r,i=0;i<n.length;i++)if(n[i].observer===this){(r=n[i]).removeListeners(),r.options=e;break}r||(r=new l(this,t,e),n.push(r),this.nodes_.push(t)),r.addListeners()},disconnect:function(){this.nodes_.forEach((function(t){for(var e=f.get(t),n=0;n<e.length;n++){var r=e[n];if(r.observer===this){r.removeListeners(),e.splice(n,1);break}}}),this),this.records_=[]},takeRecords:function(){var t=this.records_;return this.records_=[],t}},l.prototype={enqueue:function(t){var n=this.observer.records_,r=n.length;if(n.length>0){var i=u(n[r-1],t);if(i)return void(n[r-1]=i)}else e(this.observer);n[r]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=f.get(t);e||f.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=f.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}}),this)},handleEvent:function(t){switch(t.stopImmediatePropagation(),t.type){case"DOMAttrModified":var e=t.attrName,n=t.relatedNode.namespaceURI,i=t.target;(u=new a("attributes",i)).attributeName=e,u.attributeNamespace=n;var o=t.attrChange===MutationEvent.ADDITION?null:t.prevValue;r(i,(function(t){return!t.attributes||t.attributeFilter&&t.attributeFilter.length&&-1===t.attributeFilter.indexOf(e)&&-1===t.attributeFilter.indexOf(n)?void 0:t.attributeOldValue?s(o):u}));break;case"DOMCharacterDataModified":var u=a("characterData",i=t.target);o=t.prevValue;r(i,(function(t){return t.characterData?t.characterDataOldValue?s(o):u:void 0}));break;case"DOMNodeRemoved":this.addTransientObserver(t.target);case"DOMNodeInserted":var l,c,f=t.target;"DOMNodeInserted"===t.type?(l=[f],c=[]):(l=[],c=[f]);var h=f.previousSibling,p=f.nextSibling;(u=a("childList",t.target.parentNode)).addedNodes=l,u.removedNodes=c,u.previousSibling=h,u.nextSibling=p,r(t.relatedNode,(function(t){return t.childList?u:void 0}))}d=m=void 0}},t.JsMutationObserver=i,t.MutationObserver||(t.MutationObserver=i,i._isPolyfilled=!0)}}(self),function(){"use strict";if(!window.performance||!window.performance.now){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return t?function(e){return t((function(){e(performance.now())}))}:function(t){return window.setTimeout(t,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)});var e=function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}();if(!e){var n=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,Boolean(e.bubbles),Boolean(e.cancelable),e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,Boolean(e.bubbles),Boolean(e.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.CustomElements=window.CustomElements||{flags:{}},function(t){var e=t.flags,n=[];t.addModule=function(t){n.push(t)},t.initializeModules=function(){n.forEach((function(e){e(t)}))},t.hasNative=Boolean(document.registerElement),t.isIE=/Trident/.test(navigator.userAgent),t.useNative=!e.register&&t.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule((function(t){function e(t,e){n(t,(function(t){return!!e(t)||void r(t,e)})),r(t,e)}function n(t,e,r){var i=t.firstElementChild;if(!i)for(i=t.firstChild;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.nextSibling;for(;i;)!0!==e(i,r)&&n(i,e,r),i=i.nextElementSibling;return null}function r(t,n){for(var r=t.shadowRoot;r;)e(r,n),r=r.olderShadowRoot}function i(t,e,n){if(t=window.wrap(t),!(n.indexOf(t)>=0)){n.push(t);for(var r,a=t.querySelectorAll("link[rel="+o+"]"),s=0,u=a.length;u>s&&(r=a[s]);s++)r.import&&i(r.import,e,n);e(t)}}var o=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";t.forDocumentTree=function(t,e){i(t,e,[])},t.forSubtree=e})),window.CustomElements.addModule((function(t){function e(t,e){return n(t,e)||r(t,e)}function n(e,n){return!!t.upgrade(e,n)||void(n&&a(e))}function r(t,e){d(t,(function(t){return!!n(t,e)||void 0}))}function i(t){v.push(t),y||(y=!0,setTimeout(o))}function o(){y=!1;for(var t,e=v,n=0,r=e.length;r>n&&(t=e[n]);n++)t();v=[]}function a(t){g?i((function(){s(t)})):s(t)}function s(t){t.__upgraded__&&!t.__attached&&(t.__attached=!0,t.attachedCallback&&t.attachedCallback())}function u(t){g?i((function(){l(t)})):l(t)}function l(t){t.__upgraded__&&t.__attached&&(t.__attached=!1,t.detachedCallback&&t.detachedCallback())}function c(t,n){if(p.dom){var r=n[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var i=r.addedNodes[0];i&&i!==document&&!i.host;)i=i.parentNode;var o=i&&(i.URL||i._URL||i.host&&i.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,o||"")}var a=function(t){for(var e=t,n=window.wrap(document);e;){if(e==n)return!0;e=e.parentNode||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host}}(t);n.forEach((function(t){"childList"===t.type&&(b(t.addedNodes,(function(t){t.localName&&e(t,a)})),b(t.removedNodes,(function(t){t.localName&&function(t){u(t),d(t,(function(t){u(t)}))}(t)})))})),p.dom&&console.groupEnd()}function f(t){if(!t.__observer){var e=new MutationObserver(c.bind(this,t));e.observe(t,{childList:!0,subtree:!0}),t.__observer=e}}function h(t){t=window.wrap(t),p.dom&&console.group("upgradeDocument: ",t.baseURI.split("/").pop()),e(t,t===window.wrap(document)),f(t),p.dom&&console.groupEnd()}var p=t.flags,d=t.forSubtree,m=t.forDocumentTree,g=window.MutationObserver._isPolyfilled&&p["throttle-attached"];t.hasPolyfillMutations=g,t.hasThrottledAttached=g;var y=!1,v=[],b=Array.prototype.forEach.call.bind(Array.prototype.forEach),_=Element.prototype.createShadowRoot;_&&(Element.prototype.createShadowRoot=function(){var t=_.call(this);return window.CustomElements.watchShadow(this),t}),t.watchShadow=function(t){if(t.shadowRoot&&!t.shadowRoot.__watched){p.dom&&console.log("watching shadow-root for: ",t.localName);for(var e=t.shadowRoot;e;)f(e),e=e.olderShadowRoot}},t.upgradeDocumentTree=function(t){m(t,h)},t.upgradeDocument=h,t.upgradeSubtree=r,t.upgradeAll=e,t.attached=a,t.takeRecords=function(t){for((t=window.wrap(t))||(t=window.wrap(document));t.parentNode;)t=t.parentNode;var e=t.__observer;e&&(c(t,e.takeRecords()),o())}})),window.CustomElements.addModule((function(t){function e(e,i,o){return r.upgrade&&console.group("upgrade:",e.localName),i.is&&e.setAttribute("is",i.is),n(e,i),e.__upgraded__=!0,function(t){t.createdCallback&&t.createdCallback()}(e),o&&t.attached(e),t.upgradeSubtree(e,o),r.upgrade&&console.groupEnd(),e}function n(t,e){Object.__proto__||function(t,e,n){for(var r={},i=e;i!==n&&i!==HTMLElement.prototype;){for(var o,a=Object.getOwnPropertyNames(i),s=0;o=a[s];s++)r[o]||(Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o)),r[o]=1);i=Object.getPrototypeOf(i)}}(t,e.prototype,e.native),t.__proto__=e.prototype}var r=t.flags;t.upgrade=function(n,r){if("template"===n.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(n),!n.__upgraded__&&n.nodeType===Node.ELEMENT_NODE){var i=n.getAttribute("is"),o=t.getRegisteredDefinition(n.localName)||t.getRegisteredDefinition(i);if(o&&(i&&o.tag==n.localName||!i&&!o.extends))return e(n,o,r)}},t.upgradeWithDefinition=e,t.implementPrototype=n})),window.CustomElements.addModule((function(t){function e(t){if(!t.setAttribute._polyfilled){var e=t.setAttribute;t.setAttribute=function(t,r){n.call(this,t,r,e)};var r=t.removeAttribute;t.removeAttribute=function(t){n.call(this,t,null,r)},t.setAttribute._polyfilled=!0}}function n(t,e,n){t=t.toLowerCase();var r=this.getAttribute(t);n.apply(this,arguments);var i=this.getAttribute(t);this.attributeChangedCallback&&i!==r&&this.attributeChangedCallback(t,r,i)}function r(t){var e=i(t);return e?r(e.extends).concat([e]):[]}function i(t){return t?m[t.toLowerCase()]:void 0}function o(t){return function(){return function(t){return f(y(t.tag),t)}(t)}}function a(t,e){t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase());var n,r=i(e||t);if(r){if(t==r.tag&&e==r.is)return new r.ctor;if(!e&&!r.is)return new r.ctor}return e?((n=a(t)).setAttribute("is",e),n):(n=y(t),t.indexOf("-")>=0&&h(n,HTMLElement),n)}function s(t,e){var n=t[e];t[e]=function(){var t=n.apply(this,arguments);return c(t),t}}var u,l=(t.isIE,t.upgradeDocumentTree),c=t.upgradeAll,f=t.upgradeWithDefinition,h=t.implementPrototype,p=t.useNative,d=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],m={},g="http://www.w3.org/1999/xhtml",y=document.createElement.bind(document),v=document.createElementNS.bind(document);u=Object.__proto__||p?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;for(var n=t;n;){if(n===e.prototype)return!0;n=n.__proto__}return!1},s(Node.prototype,"cloneNode"),s(document,"importNode"),document.registerElement=function(n,a){var s=a||{};if(!n)throw new Error("document.registerElement: first argument `name` must not be empty");if(n.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(n)+"'.");if(function(t){for(var e=0;e<d.length;e++)if(t===d[e])return!0}(n))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(n)+"'. The type name is invalid.");if(i(n))throw new Error("DuplicateDefinitionError: a type with name '"+String(n)+"' is already registered");return s.prototype||(s.prototype=Object.create(HTMLElement.prototype)),s.__name=n.toLowerCase(),s.extends&&(s.extends=s.extends.toLowerCase()),s.lifecycle=s.lifecycle||{},s.ancestry=r(s.extends),function(t){for(var e,n=t.extends,r=0;e=t.ancestry[r];r++)n=e.is&&e.tag;t.tag=n||t.__name,n&&(t.is=t.__name)}(s),function(t){if(!Object.__proto__){var e=HTMLElement.prototype;if(t.is){var n=document.createElement(t.tag);e=Object.getPrototypeOf(n)}for(var r,i=t.prototype,o=!1;i;)i==e&&(o=!0),(r=Object.getPrototypeOf(i))&&(i.__proto__=r),i=r;o||console.warn(t.tag+" prototype not found in prototype chain for "+t.is),t.native=e}}(s),e(s.prototype),function(t,e){m[t]=e}(s.__name,s),s.ctor=o(s),s.ctor.prototype=s.prototype,s.prototype.constructor=s.ctor,t.ready&&l(document),s.ctor},document.createElement=a,document.createElementNS=function(t,e,n){return t===g?a(e,n):v(t,e)},t.registry=m,t.instanceof=u,t.reservedTagList=d,t.getRegisteredDefinition=i,document.register=document.registerElement})),function(t){function e(){o(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(t){setTimeout(t,16)})((function(){setTimeout((function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}))}))}var n=t.useNative,r=t.initializeModules;if(t.isIE,n){var i=function(){};t.watchShadow=i,t.upgrade=i,t.upgradeAll=i,t.upgradeDocumentTree=i,t.upgradeSubtree=i,t.takeRecords=i,t.instanceof=function(t,e){return t instanceof e}}else r();var o=t.upgradeDocumentTree,a=t.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(t){return t}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(t){t.import&&a(wrap(t.import))}),"complete"===document.readyState||t.flags.eager)e();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,e)}else e()}(window.CustomElements))}.call(this),function(){}.call(this),function(){(function(){(function(){this.Trix={VERSION:"1.2.3",ZERO_WIDTH_SPACE:"\ufeff",NON_BREAKING_SPACE:"\xa0",OBJECT_REPLACEMENT_CHARACTER:"\ufffc",browser:{composesExistingText:/Android.*Chrome/.test(navigator.userAgent),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:function(){var t,e,n;if("undefined"==typeof InputEvent)return!1;for(t=0,e=(n=["data","getTargetRanges","inputType"]).length;e>t;t++)if(!(n[t]in InputEvent.prototype))return!1;return!0}()},config:{}}}).call(this)}).call(this);var r=this.Trix;(function(){(function(){r.BasicObject=function(){function t(){}var e,n,r;return t.proxyMethod=function(t){var r,i,o,a,s;return o=n(t),r=o.name,a=o.toMethod,s=o.toProperty,i=o.optional,this.prototype[r]=function(){var t,n;return t=null!=a?i?"function"==typeof this[a]?this[a]():void 0:this[a]():null!=s?this[s]:void 0,i?null!=(n=null!=t?t[r]:void 0)?e.call(n,t,arguments):void 0:(n=t[r],e.call(n,t,arguments))}},n=function(t){var e,n;if(!(n=t.match(r)))throw new Error("can't parse @proxyMethod expression: "+t);return e={name:n[4]},null!=n[2]?e.toMethod=n[1]:e.toProperty=n[1],null!=n[3]&&(e.optional=!0),e},e=Function.prototype.apply,r=/^(.+?)(\(\))?(\?)?\.(.+?)$/,t}()}).call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.Object=function(e){function n(){this.id=++i}var i;return t(n,e),i=0,n.fromJSONString=function(t){return this.fromJSON(JSON.parse(t))},n.prototype.hasSameConstructorAs=function(t){return this.constructor===(null!=t?t.constructor:void 0)},n.prototype.isEqualTo=function(t){return this===t},n.prototype.inspect=function(){var t,e,n;return t=function(){var t,r,i;for(e in i=[],r=null!=(t=this.contentsForInspection())?t:{})n=r[e],i.push(e+"="+n);return i}.call(this),"#<"+this.constructor.name+":"+this.id+(t.length?" "+t.join(", "):"")+">"},n.prototype.contentsForInspection=function(){},n.prototype.toJSONString=function(){return JSON.stringify(this)},n.prototype.toUTF16String=function(){return r.UTF16String.box(this)},n.prototype.getCacheKey=function(){return this.id.toString()},n}(r.BasicObject)}.call(this),function(){r.extend=function(t){var e,n;for(e in t)n=t[e],this[e]=n;return this}}.call(this),function(){r.extend({defer:function(t){return setTimeout(t,1)}})}.call(this),function(){var t,e;r.extend({normalizeSpaces:function(t){return t.replace(RegExp(""+r.ZERO_WIDTH_SPACE,"g"),"").replace(RegExp(""+r.NON_BREAKING_SPACE,"g")," ")},normalizeNewlines:function(t){return t.replace(/\r\n/g,"\n")},breakableWhitespacePattern:RegExp("[^\\S"+r.NON_BREAKING_SPACE+"]"),squishBreakableWhitespace:function(t){return t.replace(RegExp(""+r.breakableWhitespacePattern.source,"g")," ").replace(/\ {2,}/g," ")},escapeHTML:function(t){var e;return(e=document.createElement("div")).textContent=t,e.innerHTML},summarizeStringChange:function(t,n){var i,o,a,s;return t=r.UTF16String.box(t),(n=r.UTF16String.box(n)).length<t.length?(s=(o=e(t,n))[0],i=o[1]):(i=(a=e(n,t))[0],s=a[1]),{added:i,removed:s}}}),e=function(e,n){var i,o,a,s,u;return e.isEqualTo(n)?["",""]:(a=(s=(o=t(e,n)).utf16String.length)?(u=o.offset,i=e.codepoints.slice(0,u).concat(e.codepoints.slice(u+s)),t(n,r.UTF16String.fromCodepoints(i))):t(n,e),[o.utf16String.toString(),a.utf16String.toString()])},t=function(t,e){var n,r,i;for(n=0,r=t.length,i=e.length;r>n&&t.charAt(n).isEqualTo(e.charAt(n));)n++;for(;r>n+1&&t.charAt(r-1).isEqualTo(e.charAt(i-1));)r--,i--;return{utf16String:t.slice(n,r),offset:n}}}.call(this),function(){r.extend({copyObject:function(t){var e,n,r;for(e in null==t&&(t={}),n={},t)r=t[e],n[e]=r;return n},objectsAreEqual:function(t,e){var n;if(null==t&&(t={}),null==e&&(e={}),Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t)if(t[n]!==e[n])return!1;return!0}})}.call(this),function(){var t=[].slice;r.extend({arraysAreEqual:function(t,e){var n,r,i;if(null==t&&(t=[]),null==e&&(e=[]),t.length!==e.length)return!1;for(r=n=0,i=t.length;i>n;r=++n)if(t[r]!==e[r])return!1;return!0},arrayStartsWith:function(t,e){return null==t&&(t=[]),null==e&&(e=[]),r.arraysAreEqual(t.slice(0,e.length),e)},spliceArray:function(){var e,n,r;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],(r=n.slice(0)).splice.apply(r,e),r},summarizeArrayChange:function(t,e){var n,r,i,o,a,s,u,l,c,f,h;for(null==t&&(t=[]),null==e&&(e=[]),n=[],f=[],i=new Set,o=0,u=t.length;u>o;o++)h=t[o],i.add(h);for(r=new Set,a=0,l=e.length;l>a;a++)h=e[a],r.add(h),i.has(h)||n.push(h);for(s=0,c=t.length;c>s;s++)h=t[s],r.has(h)||f.push(h);return{added:n,removed:f}}})}.call(this),function(){var t,e,n,i;t=null,e=null,i=null,n=null,r.extend({getAllAttributeNames:function(){return null!=t?t:t=r.getTextAttributeNames().concat(r.getBlockAttributeNames())},getBlockConfig:function(t){return r.config.blockAttributes[t]},getBlockAttributeNames:function(){return null!=e?e:e=Object.keys(r.config.blockAttributes)},getTextConfig:function(t){return r.config.textAttributes[t]},getTextAttributeNames:function(){return null!=i?i:i=Object.keys(r.config.textAttributes)},getListAttributeNames:function(){var t,e;return null!=n?n:n=function(){var n,i;for(t in i=[],n=r.config.blockAttributes)null!=(e=n[t].listAttribute)&&i.push(e);return i}()}})}.call(this),function(){var t,e,n,i,o,a=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=document.documentElement,e=null!=(n=null!=(i=null!=(o=t.matchesSelector)?o:t.webkitMatchesSelector)?i:t.msMatchesSelector)?n:t.mozMatchesSelector,r.extend({handleEvent:function(e,n){var i,o,a,s,u,l,c,f,h,p,d;return u=(c=null!=n?n:{}).onElement,s=c.matchingSelector,d=c.withCallback,a=c.inPhase,l=c.preventDefault,h=c.times,i=null!=u?u:t,f=s,d,p="capturing"===a,o=function(t){var e;return null!=h&&0===--h&&o.destroy(),null!=(e=r.findClosestElementFromNode(t.target,{matchingSelector:f}))&&(null!=d&&d.call(e,t,e),l)?t.preventDefault():void 0},o.destroy=function(){return i.removeEventListener(e,o,p)},i.addEventListener(e,o,p),o},handleEventOnce:function(t,e){return null==e&&(e={}),e.times=1,r.handleEvent(t,e)},triggerEvent:function(e,n){var i,o,a,s,u,l,c;return l=(c=null!=n?n:{}).onElement,o=c.bubbles,a=c.cancelable,i=c.attributes,s=null!=l?l:t,o=!1!==o,a=!1!==a,(u=document.createEvent("Events")).initEvent(e,o,a),null!=i&&r.extend.call(u,i),s.dispatchEvent(u)},elementMatchesSelector:function(t,n){return 1===(null!=t?t.nodeType:void 0)?e.call(t,n):void 0},findClosestElementFromNode:function(t,e){var n,i,o;for(n=(i=null!=e?e:{}).matchingSelector,o=i.untilNode;null!=t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;if(null!=t){if(null==n)return t;if(t.closest&&null==o)return t.closest(n);for(;t&&t!==o;){if(r.elementMatchesSelector(t,n))return t;t=t.parentNode}}},findInnerElement:function(t){for(;null!=t?t.firstElementChild:void 0;)t=t.firstElementChild;return t},innerElementIsActive:function(t){return document.activeElement!==t&&r.elementContainsNode(t,document.activeElement)},elementContainsNode:function(t,e){if(t&&e)for(;e;){if(e===t)return!0;e=e.parentNode}},findNodeFromContainerAndOffset:function(t,e){var n;if(t)return t.nodeType===Node.TEXT_NODE?t:0===e?null!=(n=t.firstChild)?n:t:t.childNodes.item(e-1)},findElementFromContainerAndOffset:function(t,e){var n;return n=r.findNodeFromContainerAndOffset(t,e),r.findClosestElementFromNode(n)},findChildIndexOfNode:function(t){var e;if(null!=t?t.parentNode:void 0){for(e=0;t=t.previousSibling;)e++;return e}},removeNode:function(t){var e;return null!=t&&null!=(e=t.parentNode)?e.removeChild(t):void 0},walkTree:function(t,e){var n,r,i,o,a;return r=(i=null!=e?e:{}).onlyNodesOfType,o=i.usingFilter,n=i.expandEntityReferences,a=function(){switch(r){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}}(),document.createTreeWalker(t,a,null!=o?o:null,!0===n)},tagName:function(t){var e;return null!=t&&null!=(e=t.tagName)?e.toLowerCase():void 0},makeElement:function(t,e){var n,r,i,o,a,s,u,l,c,f;if(null==e&&(e={}),"object"==typeof t?t=(e=t).tagName:e={attributes:e},r=document.createElement(t),null!=e.editable&&(null==e.attributes&&(e.attributes={}),e.attributes.contenteditable=e.editable),e.attributes)for(o in s=e.attributes)f=s[o],r.setAttribute(o,f);if(e.style)for(o in u=e.style)f=u[o],r.style[o]=f;if(e.data)for(o in l=e.data)f=l[o],r.dataset[o]=f;if(e.className)for(i=0,a=(c=e.className.split(" ")).length;a>i;i++)n=c[i],r.classList.add(n);return e.textContent&&(r.textContent=e.textContent),r},getBlockTagNames:function(){var t,e;return null!=r.blockTagNames?r.blockTagNames:r.blockTagNames=function(){var n,i;for(t in i=[],n=r.config.blockAttributes)(e=n[t].tagName)&&i.push(e);return i}()},nodeIsBlockContainer:function(t){return r.nodeIsBlockStartComment(null!=t?t.firstChild:void 0)},nodeProbablyIsBlockContainer:function(t){var e,n;return e=r.tagName(t),a.call(r.getBlockTagNames(),e)>=0&&(n=r.tagName(t.firstChild),a.call(r.getBlockTagNames(),n)<0)},nodeIsBlockStart:function(t,e){return(null!=e?e:{strict:!0}).strict?r.nodeIsBlockStartComment(t):r.nodeIsBlockStartComment(t)||!r.nodeIsBlockStartComment(t.firstChild)&&r.nodeProbablyIsBlockContainer(t)},nodeIsBlockStartComment:function(t){return r.nodeIsCommentNode(t)&&"block"===(null!=t?t.data:void 0)},nodeIsCommentNode:function(t){return(null!=t?t.nodeType:void 0)===Node.COMMENT_NODE},nodeIsCursorTarget:function(t,e){var n;return n=(null!=e?e:{}).name,t?r.nodeIsTextNode(t)?t.data===r.ZERO_WIDTH_SPACE?!n||t.parentNode.dataset.trixCursorTarget===n:void 0:r.nodeIsCursorTarget(t.firstChild):void 0},nodeIsAttachmentElement:function(t){return r.elementMatchesSelector(t,r.AttachmentView.attachmentSelector)},nodeIsEmptyTextNode:function(t){return r.nodeIsTextNode(t)&&""===(null!=t?t.data:void 0)},nodeIsTextNode:function(t){return(null!=t?t.nodeType:void 0)===Node.TEXT_NODE}})}.call(this),function(){var t,e,n,i,o;t=r.copyObject,i=r.objectsAreEqual,r.extend({normalizeRange:n=function(t){var n;if(null!=t)return Array.isArray(t)||(t=[t,t]),[e(t[0]),e(null!=(n=t[1])?n:t[0])]},rangeIsCollapsed:function(t){var e,r,i;if(null!=t)return i=(r=n(t))[0],e=r[1],o(i,e)},rangesAreEqual:function(t,e){var r,i,a,s,u,l;if(null!=t&&null!=e)return i=(a=n(t))[0],r=a[1],l=(s=n(e))[0],u=s[1],o(i,l)&&o(r,u)}}),e=function(e){return"number"==typeof e?e:t(e)},o=function(t,e){return"number"==typeof t?t===e:i(t,e)}}.call(this),function(){var t,e,n,i,o,a,s;r.registerElement=function(t,e){var n,r;return null==e&&(e={}),t=t.toLowerCase(),e=s(e),(n=(r=a(e)).defaultCSS)&&(delete r.defaultCSS,i(n,t)),o(t,r)},i=function(t,e){return n(e).textContent=t.replace(/%t/g,e)},n=function(e){var n,r;return(n=document.createElement("style")).setAttribute("type","text/css"),n.setAttribute("data-tag-name",e.toLowerCase()),(r=t())&&n.setAttribute("nonce",r),document.head.insertBefore(n,document.head.firstChild),n},t=function(){var t;return(t=e("trix-csp-nonce")||e("csp-nonce"))?t.getAttribute("content"):void 0},e=function(t){return document.head.querySelector("meta[name="+t+"]")},a=function(t){var e,n,r;for(e in n={},t)r=t[e],n[e]="function"==typeof r?{value:r}:r;return n},s=function(){var t;return t=function(t){var e,n,r,i,o;for(e={},n=0,i=(o=["initialize","connect","disconnect"]).length;i>n;n++)e[r=o[n]]=t[r],delete t[r];return e},window.customElements?function(e){var n,r,i,o,a;return a=t(e),i=a.initialize,n=a.connect,r=a.disconnect,i&&(o=n,n=function(){return this.initialized||(this.initialized=!0,i.call(this)),null!=o?o.call(this):void 0}),n&&(e.connectedCallback=n),r&&(e.disconnectedCallback=r),e}:function(e){var n,r,i,o;return i=(o=t(e)).initialize,n=o.connect,r=o.disconnect,i&&(e.createdCallback=i),n&&(e.attachedCallback=n),r&&(e.detachedCallback=r),e}}(),o=window.customElements?function(t,e){var n;return n=function(){return"object"==typeof Reflect?Reflect.construct(HTMLElement,[],n):HTMLElement.apply(this)},Object.setPrototypeOf(n.prototype,HTMLElement.prototype),Object.setPrototypeOf(n,HTMLElement),Object.defineProperties(n.prototype,e),window.customElements.define(t,n),n}:function(t,e){var n,r;return r=Object.create(HTMLElement.prototype,e),n=document.registerElement(t,{prototype:r}),Object.defineProperty(r,"constructor",{value:n}),n}}.call(this),function(){var t,e;r.extend({getDOMSelection:function(){var t;return(t=window.getSelection()).rangeCount>0?t:void 0},getDOMRange:function(){var e,n;return(e=null!=(n=r.getDOMSelection())?n.getRangeAt(0):void 0)&&!t(e)?e:void 0},setDOMRange:function(t){var e;return(e=window.getSelection()).removeAllRanges(),e.addRange(t),r.selectionChangeObserver.update()}}),t=function(t){return e(t.startContainer)||e(t.endContainer)},e=function(t){return!Object.getPrototypeOf(t)}}.call(this),function(){var t;t={"application/x-trix-feature-detection":"test"},r.extend({dataTransferIsPlainText:function(t){var e,n,r;return r=t.getData("text/plain"),n=t.getData("text/html"),r&&n?(e=(new DOMParser).parseFromString(n,"text/html").body).textContent===r?!e.querySelector("*"):void 0:null!=r?r.length:void 0},dataTransferIsWritable:function(e){var n,r;if(null!=(null!=e?e.setData:void 0)){for(n in t)if(r=t[n],!function(){try{return e.setData(n,r),e.getData(n)===r}catch(t){}}())return;return!0}},keyEventIsKeyboardCommand:/Mac|^iP/.test(navigator.platform)?function(t){return t.metaKey}:function(t){return t.ctrlKey}})}.call(this),function(){}.call(this),function(){var t,e=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=r.arraysAreEqual,r.Hash=function(n){function i(t){null==t&&(t={}),this.values=a(t),i.__super__.constructor.apply(this,arguments)}var o,a,s,u,l;return e(i,n),i.fromCommonAttributesOfObjects=function(t){var e,n,r,i,a,s;if(null==t&&(t=[]),!t.length)return new this;for(r=(e=o(t[0])).getKeys(),n=0,i=(s=t.slice(1)).length;i>n;n++)a=s[n],r=e.getKeysCommonToHash(o(a)),e=e.slice(r);return e},i.box=function(t){return o(t)},i.prototype.add=function(t,e){return this.merge(u(t,e))},i.prototype.remove=function(t){return new r.Hash(a(this.values,t))},i.prototype.get=function(t){return this.values[t]},i.prototype.has=function(t){return t in this.values},i.prototype.merge=function(t){return new r.Hash(s(this.values,l(t)))},i.prototype.slice=function(t){var e,n,i,o;for(o={},e=0,i=t.length;i>e;e++)n=t[e],this.has(n)&&(o[n]=this.values[n]);return new r.Hash(o)},i.prototype.getKeys=function(){return Object.keys(this.values)},i.prototype.getKeysCommonToHash=function(t){var e,n,r,i,a;for(t=o(t),a=[],e=0,r=(i=this.getKeys()).length;r>e;e++)n=i[e],this.values[n]===t.values[n]&&a.push(n);return a},i.prototype.isEqualTo=function(e){return t(this.toArray(),o(e).toArray())},i.prototype.isEmpty=function(){return 0===this.getKeys().length},i.prototype.toArray=function(){var t,e,n;return(null!=this.array?this.array:this.array=function(){var r;for(t in e=[],r=this.values)n=r[t],e.push(t,n);return e}.call(this)).slice(0)},i.prototype.toObject=function(){return a(this.values)},i.prototype.toJSON=function(){return this.toObject()},i.prototype.contentsForInspection=function(){return{values:JSON.stringify(this.values)}},u=function(t,e){var n;return(n={})[t]=e,n},s=function(t,e){var n,r,i;for(n in r=a(t),e)i=e[n],r[n]=i;return r},a=function(t,e){var n,r,i,o,a;for(o={},n=0,i=(a=Object.keys(t).sort()).length;i>n;n++)(r=a[n])!==e&&(o[r]=t[r]);return o},o=function(t){return t instanceof r.Hash?t:new r.Hash(t)},l=function(t){return t instanceof r.Hash?t.values:t},i}(r.Object)}.call(this),function(){r.ObjectGroup=function(){function t(t,e){var n,r;this.objects=null!=t?t:[],r=e.depth,(n=e.asTree)&&(this.depth=r,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}return t.groupObjects=function(t,e){var n,r,i,o,a,s,u,l,c;for(null==t&&(t=[]),i=(c=null!=e?e:{}).depth,(n=c.asTree)&&null==i&&(i=0),l=[],a=0,s=t.length;s>a;a++){if(u=t[a],o){if(("function"==typeof u.canBeGrouped?u.canBeGrouped(i):void 0)&&("function"==typeof(r=o[o.length-1]).canBeGroupedWith?r.canBeGroupedWith(u,i):void 0)){o.push(u);continue}l.push(new this(o,{depth:i,asTree:n})),o=null}("function"==typeof u.canBeGrouped?u.canBeGrouped(i):void 0)?o=[u]:l.push(u)}return o&&l.push(new this(o,{depth:i,asTree:n})),l},t.prototype.getObjects=function(){return this.objects},t.prototype.getDepth=function(){return this.depth},t.prototype.getCacheKey=function(){var t,e,n,r,i;for(e=["objectGroup"],t=0,n=(i=this.getObjects()).length;n>t;t++)r=i[t],e.push(r.getCacheKey());return e.join("/")},t}()}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.ObjectMap=function(e){function n(t){var e,n,r,i,o;for(null==t&&(t=[]),this.objects={},r=0,i=t.length;i>r;r++)o=t[r],n=JSON.stringify(o),null==(e=this.objects)[n]&&(e[n]=o)}return t(n,e),n.prototype.find=function(t){var e;return e=JSON.stringify(t),this.objects[e]},n}(r.BasicObject)}.call(this),function(){r.ElementStore=function(){function t(t){this.reset(t)}var e;return t.prototype.add=function(t){var n;return n=e(t),this.elements[n]=t},t.prototype.remove=function(t){var n,r;return n=e(t),(r=this.elements[n])?(delete this.elements[n],r):void 0},t.prototype.reset=function(t){var e,n,r;for(null==t&&(t=[]),this.elements={},n=0,r=t.length;r>n;n++)e=t[n],this.add(e);return t},e=function(t){return t.dataset.trixStoreKey},t}()}.call(this),function(){}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.Operation=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.isPerforming=function(){return!0===this.performing},n.prototype.hasPerformed=function(){return!0===this.performed},n.prototype.hasSucceeded=function(){return this.performed&&this.succeeded},n.prototype.hasFailed=function(){return this.performed&&!this.succeeded},n.prototype.getPromise=function(){return null!=this.promise?this.promise:this.promise=new Promise(function(t){return function(e,n){return t.performing=!0,t.perform((function(r,i){return t.succeeded=r,t.performing=!1,t.performed=!0,t.succeeded?e(i):n(i)}))}}(this))},n.prototype.perform=function(t){return t(!1)},n.prototype.release=function(){var t;return null!=(t=this.promise)&&"function"==typeof t.cancel&&t.cancel(),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null},n.proxyMethod("getPromise().then"),n.proxyMethod("getPromise().catch"),n}(r.BasicObject)}.call(this),function(){var t,e,n,i,o,a={}.hasOwnProperty;r.UTF16String=function(t){function e(t,e){this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}return function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.box=function(t){return null==t&&(t=""),t instanceof this?t:this.fromUCS2String(null!=t?t.toString():void 0)},e.fromUCS2String=function(t){return new this(t,i(t))},e.fromCodepoints=function(t){return new this(o(t),t)},e.prototype.offsetToUCS2Offset=function(t){return o(this.codepoints.slice(0,Math.max(0,t))).length},e.prototype.offsetFromUCS2Offset=function(t){return i(this.ucs2String.slice(0,Math.max(0,t))).length},e.prototype.slice=function(){var t;return this.constructor.fromCodepoints((t=this.codepoints).slice.apply(t,arguments))},e.prototype.charAt=function(t){return this.slice(t,t+1)},e.prototype.isEqualTo=function(t){return this.constructor.box(t).ucs2String===this.ucs2String},e.prototype.toJSON=function(){return this.ucs2String},e.prototype.getCacheKey=function(){return this.ucs2String},e.prototype.toString=function(){return this.ucs2String},e}(r.BasicObject),t=1===("function"==typeof Array.from?Array.from("\ud83d\udc7c").length:void 0),e=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),n=" \ud83d\udc7c"===("function"==typeof String.fromCodePoint?String.fromCodePoint(32,128124):void 0),i=t&&e?function(t){return Array.from(t).map((function(t){return t.codePointAt(0)}))}:function(t){var e,n,r,i,o;for(i=[],e=0,r=t.length;r>e;)(o=t.charCodeAt(e++))>=55296&&56319>=o&&r>e&&(56320===(64512&(n=t.charCodeAt(e++)))?o=((1023&o)<<10)+(1023&n)+65536:e--),i.push(o);return i},o=n?function(t){return String.fromCodePoint.apply(String,t)}:function(t){var e,n,r;return e=function(){var e,i,o;for(o=[],e=0,i=t.length;i>e;e++)r=t[e],n="",r>65535&&(r-=65536,n+=String.fromCharCode(r>>>10&1023|55296),r=56320|1023&r),o.push(n+String.fromCharCode(r));return o}(),e.join("")}}.call(this),function(){}.call(this),function(){}.call(this),function(){r.config.lang={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"}}.call(this),function(){r.config.css={attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"}}.call(this),function(){var t;r.config.blockAttributes=t={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test:function(e){return r.tagName(e.parentNode)===t[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test:function(e){return r.tagName(e.parentNode)===t[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}}}.call(this),function(){var t,e;t=r.config.lang,e=[t.bytes,t.KB,t.MB,t.GB,t.TB,t.PB],r.config.fileSize={prefix:"IEC",precision:2,formatter:function(n){var r,i;switch(n){case 0:return"0 "+t.bytes;case 1:return"1 "+t.byte;default:return r=function(){switch(this.prefix){case"SI":return 1e3;case"IEC":return 1024}}.call(this),i=Math.floor(Math.log(n)/Math.log(r)),(n/Math.pow(r,i)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"")+" "+e[i]}}}}.call(this),function(){r.config.textAttributes={bold:{tagName:"strong",inheritable:!0,parser:function(t){var e;return"bold"===(e=window.getComputedStyle(t)).fontWeight||e.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:function(t){return"italic"===window.getComputedStyle(t).fontStyle}},href:{groupTagName:"a",parser:function(t){var e,n;return n="a:not("+r.AttachmentView.attachmentSelector+")",(e=r.findClosestElementFromNode(t,{matchingSelector:n}))?e.getAttribute("href"):void 0}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}}}.call(this),function(){var t,e,n;n=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],e="data-trix-serialized-attributes",t=new RegExp("\x3c!--block--\x3e","g"),r.extend({serializers:{"application/json":function(t){var e;if(t instanceof r.Document)e=t;else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");e=r.Document.fromHTML(t.innerHTML)}return e.toSerializableDocument().toJSONString()},"text/html":function(i){var o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_,A;if(i instanceof r.Document)u=r.DocumentView.render(i);else{if(!(i instanceof HTMLElement))throw new Error("unserializable object");u=i.cloneNode(!0)}for(l=0,p=(v=u.querySelectorAll("[data-trix-serialize=false]")).length;p>l;l++)s=v[l],r.removeNode(s);for(c=0,d=n.length;d>c;c++)for(o=n[c],f=0,m=(b=u.querySelectorAll("["+o+"]")).length;m>f;f++)(s=b[f]).removeAttribute(o);for(h=0,g=(_=u.querySelectorAll("[data-trix-serialized-attributes]")).length;g>h;h++){s=_[h];try{for(y in a=JSON.parse(s.getAttribute(e)),s.removeAttribute(e),a)A=a[y],s.setAttribute(y,A)}catch(w){}}return u.innerHTML.replace(t,"")}},deserializers:{"application/json":function(t){return r.Document.fromJSONString(t)},"text/html":function(t){return r.Document.fromHTML(t)}},serializeToContentType:function(t,e){var n;if(n=r.serializers[e])return n(t);throw new Error("unknown content type: "+e)},deserializeFromContentType:function(t,e){var n;if(n=r.deserializers[e])return n(t);throw new Error("unknown content type: "+e)}})}.call(this),function(){var t;t=r.config.lang,r.config.toolbar={getDefaultHTML:function(){return'<div class="trix-button-row">\n  <span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="'+t.bold+'" tabindex="-1">'+t.bold+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-italic" data-trix-attribute="italic" data-trix-key="i" title="'+t.italic+'" tabindex="-1">'+t.italic+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-strike" data-trix-attribute="strike" title="'+t.strike+'" tabindex="-1">'+t.strike+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-link" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="'+t.link+'" tabindex="-1">'+t.link+'</button>\n  </span>\n\n  <span class="trix-button-group trix-button-group--block-tools" data-trix-button-group="block-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-heading-1" data-trix-attribute="heading1" title="'+t.heading1+'" tabindex="-1">'+t.heading1+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-quote" data-trix-attribute="quote" title="'+t.quote+'" tabindex="-1">'+t.quote+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-code" data-trix-attribute="code" title="'+t.code+'" tabindex="-1">'+t.code+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-bullet-list" data-trix-attribute="bullet" title="'+t.bullets+'" tabindex="-1">'+t.bullets+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-number-list" data-trix-attribute="number" title="'+t.numbers+'" tabindex="-1">'+t.numbers+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-decrease-nesting-level" data-trix-action="decreaseNestingLevel" title="'+t.outdent+'" tabindex="-1">'+t.outdent+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-increase-nesting-level" data-trix-action="increaseNestingLevel" title="'+t.indent+'" tabindex="-1">'+t.indent+'</button>\n  </span>\n\n  <span class="trix-button-group trix-button-group--file-tools" data-trix-button-group="file-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-attach" data-trix-action="attachFiles" title="'+t.attachFiles+'" tabindex="-1">'+t.attachFiles+'</button>\n  </span>\n\n  <span class="trix-button-group-spacer"></span>\n\n  <span class="trix-button-group trix-button-group--history-tools" data-trix-button-group="history-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-undo" data-trix-action="undo" data-trix-key="z" title="'+t.undo+'" tabindex="-1">'+t.undo+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-redo" data-trix-action="redo" data-trix-key="shift+z" title="'+t.redo+'" tabindex="-1">'+t.redo+'</button>\n  </span>\n</div>\n\n<div class="trix-dialogs" data-trix-dialogs>\n  <div class="trix-dialog trix-dialog--link" data-trix-dialog="href" data-trix-dialog-attribute="href">\n    <div class="trix-dialog__link-fields">\n      <input type="url" name="href" class="trix-input trix-input--dialog" placeholder="'+t.urlPlaceholder+'" aria-label="'+t.url+'" required data-trix-input>\n      <div class="trix-button-group">\n        <input type="button" class="trix-button trix-button--dialog" value="'+t.link+'" data-trix-method="setAttribute">\n        <input type="button" class="trix-button trix-button--dialog" value="'+t.unlink+'" data-trix-method="removeAttribute">\n      </div>\n    </div>\n  </div>\n</div>'}}}.call(this),function(){r.config.undoInterval=5e3}.call(this),function(){r.config.attachments={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}}}.call(this),function(){r.config.keyNames={8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"}}.call(this),function(){r.config.input={level2Enabled:!0,getLevel:function(){return this.level2Enabled&&r.browser.supportsInputEvents?2:0},pickFiles:function(t){var e;return(e=r.makeElement("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId})).addEventListener("change",(function(){return t(e.files),r.removeNode(e)})),r.removeNode(document.getElementById(this.fileInputId)),document.body.appendChild(e),e.click()},fileInputId:"trix-file-input-"+Date.now().toString(16)}}.call(this),function(){}.call(this),function(){r.registerElement("trix-toolbar",{defaultCSS:"%t {\n  display: block;\n}\n\n%t {\n  white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n  display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n  display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n  background-color: #ffdddd;\n}",initialize:function(){return""===this.innerHTML?this.innerHTML=r.config.toolbar.getDefaultHTML():void 0}})}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};r.ObjectView=function(e){function i(t,e){this.object=t,this.options=null!=e?e:{},this.childViews=[],this.rootView=this}return t(i,e),i.prototype.getNodes=function(){var t,e,n,r,i;for(null==this.nodes&&(this.nodes=this.createNodes()),i=[],t=0,e=(r=this.nodes).length;e>t;t++)n=r[t],i.push(n.cloneNode(!0));return i},i.prototype.invalidate=function(){var t;return this.nodes=null,this.childViews=[],null!=(t=this.parentView)?t.invalidate():void 0},i.prototype.invalidateViewForObject=function(t){var e;return null!=(e=this.findViewForObject(t))?e.invalidate():void 0},i.prototype.findOrCreateCachedChildView=function(t,e){var n;return(n=this.getCachedViewForObject(e))?this.recordChildView(n):(n=this.createChildView.apply(this,arguments),this.cacheViewForObject(n,e)),n},i.prototype.createChildView=function(t,e,n){var i;return null==n&&(n={}),e instanceof r.ObjectGroup&&(n.viewClass=t,t=r.ObjectGroupView),i=new t(e,n),this.recordChildView(i)},i.prototype.recordChildView=function(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t},i.prototype.getAllChildViews=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.childViews).length;n>e;e++)t=r[e],i.push(t),i=i.concat(t.getAllChildViews());return i},i.prototype.findElement=function(){return this.findElementForObject(this.object)},i.prototype.findElementForObject=function(t){var e;return(e=null!=t?t.id:void 0)?this.rootView.element.querySelector("[data-trix-id='"+e+"']"):void 0},i.prototype.findViewForObject=function(t){var e,n,r,i;for(e=0,n=(r=this.getAllChildViews()).length;n>e;e++)if((i=r[e]).object===t)return i},i.prototype.getViewCache=function(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?null!=this.viewCache?this.viewCache:this.viewCache={}:void 0},i.prototype.isViewCachingEnabled=function(){return!1!==this.shouldCacheViews},i.prototype.enableViewCaching=function(){return this.shouldCacheViews=!0},i.prototype.disableViewCaching=function(){return this.shouldCacheViews=!1},i.prototype.getCachedViewForObject=function(t){var e;return null!=(e=this.getViewCache())?e[t.getCacheKey()]:void 0},i.prototype.cacheViewForObject=function(t,e){var n;return null!=(n=this.getViewCache())?n[e.getCacheKey()]=t:void 0},i.prototype.garbageCollectCachedViews=function(){var t,e,r,i,o,a;if(t=this.getViewCache()){for(e in a=this.getAllChildViews().concat(this),r=function(){var t,e,n;for(n=[],t=0,e=a.length;e>t;t++)o=a[t],n.push(o.object.getCacheKey());return n}(),i=[],t)n.call(r,e)<0&&i.push(delete t[e]);return i}},i}(r.BasicObject)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.ObjectGroupView=function(e){function n(){n.__super__.constructor.apply(this,arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}return t(n,e),n.prototype.getChildViews=function(){var t,e,n,r;if(!this.childViews.length)for(t=0,e=(r=this.objectGroup.getObjects()).length;e>t;t++)n=r[t],this.findOrCreateCachedChildView(this.viewClass,n,this.options);return this.childViews},n.prototype.createNodes=function(){var t,e,n,r,i,o,a,s;for(t=this.createContainerElement(),e=0,r=(a=this.getChildViews()).length;r>e;e++)for(n=0,i=(s=a[e].getNodes()).length;i>n;n++)o=s[n],t.appendChild(o);return[t]},n.prototype.createContainerElement=function(t){return null==t&&(t=this.objectGroup.getDepth()),this.getChildViews()[0].createContainerElement(t)},n}(r.ObjectView)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.Controller=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(r.BasicObject)}.call(this),function(){var t,e,n,i,o,a,s=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty,l=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=r.findClosestElementFromNode,n=r.nodeIsEmptyTextNode,e=r.nodeIsBlockStartComment,i=r.normalizeSpaces,o=r.summarizeStringChange,a=r.tagName,r.MutationObserver=function(r){function u(t){this.element=t,this.didMutate=function(t,e){return function(){return t.apply(e,arguments)}}(this.didMutate,this),this.observer=new window.MutationObserver(this.didMutate),this.start()}var c,f,h;return s(u,r),"["+(f="data-trix-mutable")+"]",h={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},u.prototype.start=function(){return this.reset(),this.observer.observe(this.element,h)},u.prototype.stop=function(){return this.observer.disconnect()},u.prototype.didMutate=function(t){var e,n;return(e=this.mutations).push.apply(e,this.findSignificantMutations(t)),this.mutations.length?(null!=(n=this.delegate)&&"function"==typeof n.elementDidMutate&&n.elementDidMutate(this.getMutationSummary()),this.reset()):void 0},u.prototype.reset=function(){return this.mutations=[]},u.prototype.findSignificantMutations=function(t){var e,n,r,i;for(i=[],e=0,n=t.length;n>e;e++)r=t[e],this.mutationIsSignificant(r)&&i.push(r);return i},u.prototype.mutationIsSignificant=function(t){var e,n,r,i;if(this.nodeIsMutable(t.target))return!1;for(e=0,n=(i=this.nodesModifiedByMutation(t)).length;n>e;e++)if(r=i[e],this.nodeIsSignificant(r))return!0;return!1},u.prototype.nodeIsSignificant=function(t){return t!==this.element&&!this.nodeIsMutable(t)&&!n(t)},u.prototype.nodeIsMutable=function(e){return t(e,{matchingSelector:"[data-trix-mutable]"})},u.prototype.nodesModifiedByMutation=function(t){var e;switch(e=[],t.type){case"attributes":t.attributeName!==f&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push.apply(e,t.addedNodes),e.push.apply(e,t.removedNodes)}return e},u.prototype.getMutationSummary=function(){return this.getTextMutationSummary()},u.prototype.getTextMutationSummary=function(){var t,e,n,r,i,o,a,s,u,c,f;for(n=(s=this.getTextChangesFromCharacterData()).additions,i=s.deletions,o=0,a=(u=(f=this.getTextChangesFromChildList()).additions).length;a>o;o++)e=u[o],l.call(n,e)<0&&n.push(e);return i.push.apply(i,f.deletions),c={},(t=n.join(""))&&(c.textAdded=t),(r=i.join(""))&&(c.textDeleted=r),c},u.prototype.getMutationsByType=function(t){var e,n,r,i,o;for(o=[],e=0,n=(i=this.mutations).length;n>e;e++)(r=i[e]).type===t&&o.push(r);return o},u.prototype.getTextChangesFromChildList=function(){var t,n,r,o,a,s,u,l,f,h;for(t=[],u=[],n=0,o=(s=this.getMutationsByType("childList")).length;o>n;n++)a=s[n],t.push.apply(t,a.addedNodes),u.push.apply(u,a.removedNodes);return 0===t.length&&1===u.length&&e(u[0])?(f=[],h=["\n"]):(f=c(t),h=c(u)),{additions:function(){var t,e,n;for(n=[],r=t=0,e=f.length;e>t;r=++t)(l=f[r])!==h[r]&&n.push(i(l));return n}(),deletions:function(){var t,e,n;for(n=[],r=t=0,e=h.length;e>t;r=++t)(l=h[r])!==f[r]&&n.push(i(l));return n}()}},u.prototype.getTextChangesFromCharacterData=function(){var t,e,n,r,a,s,u,l;return(e=this.getMutationsByType("characterData")).length&&(l=e[0],n=e[e.length-1],a=i(l.oldValue),r=i(n.target.data),t=(s=o(a,r)).added,u=s.removed),{additions:t?[t]:[],deletions:u?[u]:[]}},c=function(t){var e,n,r,i;for(null==t&&(t=[]),i=[],e=0,n=t.length;n>e;e++)switch(r=t[e],r.nodeType){case Node.TEXT_NODE:i.push(r.data);break;case Node.ELEMENT_NODE:"br"===a(r)?i.push("\n"):i.push.apply(i,c(r.childNodes))}return i},u}(r.BasicObject)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.FileVerificationOperation=function(e){function n(t){this.file=t}return t(n,e),n.prototype.perform=function(t){var e;return(e=new FileReader).onerror=function(){return t(!1)},e.onload=function(n){return function(){e.onerror=null;try{e.abort()}catch(r){}return t(!0,n.file)}}(this),e.readAsArrayBuffer(this.file)},n}(r.Operation)}.call(this),function(){var t,e,n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=r.handleEvent,e=r.innerElementIsActive,r.InputController=function(i){function o(e){var n;for(n in this.element=e,this.mutationObserver=new r.MutationObserver(this.element),this.mutationObserver.delegate=this,this.events)t(n,{onElement:this.element,withCallback:this.handlerFor(n)})}return n(o,i),o.prototype.events={},o.prototype.elementDidMutate=function(){},o.prototype.editorWillSyncDocumentView=function(){return this.mutationObserver.stop()},o.prototype.editorDidSyncDocumentView=function(){return this.mutationObserver.start()},o.prototype.requestRender=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestRender?t.inputControllerDidRequestRender():void 0},o.prototype.requestReparse=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestReparse&&t.inputControllerDidRequestReparse(),this.requestRender()},o.prototype.attachFiles=function(t){var e,n;return n=function(){var n,i,o;for(o=[],n=0,i=t.length;i>n;n++)e=t[n],o.push(new r.FileVerificationOperation(e));return o}(),Promise.all(n).then(function(t){return function(e){return t.handleInput((function(){var t,n;return null!=(t=this.delegate)&&t.inputControllerWillAttachFiles(),null!=(n=this.responder)&&n.insertFiles(e),this.requestRender()}))}}(this))},o.prototype.handlerFor=function(t){return function(n){return function(r){return r.defaultPrevented?void 0:n.handleInput((function(){return e(this.element)?void 0:(this.eventName=t,this.events[t].call(this,r))}))}}(this)},o.prototype.handleInput=function(t){var e,n;try{return null!=(e=this.delegate)&&e.inputControllerWillHandleInput(),t.call(this)}finally{null!=(n=this.delegate)&&n.inputControllerDidHandleInput()}},o}(r.BasicObject)}.call(this),function(){var t,e,n,i,o,a,s,u,l,c,f,h,p=function(t,e){function n(){this.constructor=t}for(var r in e)d.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty,m=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};l=r.makeElement,c=r.objectsAreEqual,r.tagName,e=r.browser,s=r.keyEventIsKeyboardCommand,i=r.dataTransferIsWritable,n=r.dataTransferIsPlainText,u=r.config.keyNames,r.Level0InputController=function(e){function a(){a.__super__.constructor.apply(this,arguments),this.resetInputSummary()}var d;return p(a,e),d=0,a.prototype.setInputSummary=function(t){var e,n;for(e in null==t&&(t={}),this.inputSummary.eventName=this.eventName,t)n=t[e],this.inputSummary[e]=n;return this.inputSummary},a.prototype.resetInputSummary=function(){return this.inputSummary={}},a.prototype.reset=function(){return this.resetInputSummary(),r.selectionChangeObserver.reset()},a.prototype.elementDidMutate=function(t){var e;return this.isComposing()?null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidAllowUnhandledInput?e.inputControllerDidAllowUnhandledInput():void 0:this.handleInput((function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()}))},a.prototype.mutationIsExpected=function(t){var e,n,r,i,o,a,s,u,l;return a=t.textAdded,s=t.textDeleted,!!this.inputSummary.preferDocument||(e=null!=a?a===this.inputSummary.textAdded:!this.inputSummary.textAdded,n=null!=s?this.inputSummary.didDelete:!this.inputSummary.didDelete,l="\n"===s&&!n,!!(((u=("\n"===a||" \n"===a)&&!e)&&!l||l&&!u)&&(i=this.getSelectedRange())&&(r=u?a.replace(/\n$/,"").length||-1:(null!=a?a.length:void 0)||1,null!=(o=this.responder)?o.positionIsBlockBreak(i[1]+r):void 0))||e&&n)},a.prototype.mutationIsSignificant=function(t){var e,n,r;return r=Object.keys(t).length>0,e=""===(null!=(n=this.compositionInput)?n.getEndData():void 0),r||!e},a.prototype.events={keydown:function(t){var e,n,i,o,a,l,c,f,h;if(this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0,o=u[t.keyCode]){for(n=this.keys,i=0,l=(f=["ctrl","alt","shift","meta"]).length;l>i;i++)t[(c=f[i])+"Key"]&&("ctrl"===c&&(c="control"),n=null!=n?n[c]:void 0);null!=(null!=n?n[o]:void 0)&&(this.setInputSummary({keyName:o}),r.selectionChangeObserver.reset(),n[o].call(this,t))}return s(t)&&(e=String.fromCharCode(t.keyCode).toLowerCase())&&(a=function(){var e,n,r,i;for(i=[],e=0,n=(r=["alt","shift"]).length;n>e;e++)t[(c=r[e])+"Key"]&&i.push(c);return i}(),a.push(e),null!=(h=this.delegate)?h.inputControllerDidReceiveKeyboardCommand(a):void 0)?t.preventDefault():void 0},keypress:function(t){var e,n,r;if(null==this.inputSummary.eventName&&!t.metaKey&&(!t.ctrlKey||t.altKey))return(r=h(t))?(null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString(r),this.setInputSummary({textAdded:r,didDelete:this.selectionIsExpanded()})):void 0},textInput:function(t){var e,n,r,i;return e=t.data,(i=this.inputSummary.textAdded)&&i!==e&&i.toUpperCase()===e?(n=this.getSelectedRange(),this.setSelectedRange([n[0],n[1]+i.length]),null!=(r=this.responder)&&r.insertString(e),this.setInputSummary({textAdded:e}),this.setSelectedRange(n)):void 0},dragenter:function(t){return t.preventDefault()},dragstart:function(t){var e;return t.target,this.serializeSelectionToDataTransfer(t.dataTransfer),this.draggedRange=this.getSelectedRange(),null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidStartDrag?e.inputControllerDidStartDrag():void 0},dragover:function(t){var e,n;return!this.draggedRange&&!this.canAcceptDataTransfer(t.dataTransfer)||(t.preventDefault(),e={x:t.clientX,y:t.clientY},c(e,this.draggingPoint))?void 0:(this.draggingPoint=e,null!=(n=this.delegate)&&"function"==typeof n.inputControllerDidReceiveDragOverPoint?n.inputControllerDidReceiveDragOverPoint(this.draggingPoint):void 0)},dragend:function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidCancelDrag&&t.inputControllerDidCancelDrag(),this.draggedRange=null,this.draggingPoint=null},drop:function(t){var e,n,i,o,a,s,u,l,c;return t.preventDefault(),i=null!=(a=t.dataTransfer)?a.files:void 0,o={x:t.clientX,y:t.clientY},null!=(s=this.responder)&&s.setLocationRangeFromPointRange(o),(null!=i?i.length:void 0)?this.attachFiles(i):this.draggedRange?(null!=(u=this.delegate)&&u.inputControllerWillMoveText(),null!=(l=this.responder)&&l.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()):(n=t.dataTransfer.getData("application/x-trix-document"))&&(e=r.Document.fromJSONString(n),null!=(c=this.responder)&&c.insertDocument(e),this.requestRender()),this.draggedRange=null,this.draggingPoint=null},cut:function(t){var e,n;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&(this.serializeSelectionToDataTransfer(t.clipboardData)&&t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillCutText(),this.deleteInDirection("backward"),t.defaultPrevented)?this.requestRender():void 0},copy:function(t){var e;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&this.serializeSelectionToDataTransfer(t.clipboardData)?t.preventDefault():void 0},paste:function(t){var e,i,a,s,u,l,c,h,p,g,y,v,b,_,A,w,x,E,O,S,P,C;return e=null!=(h=t.clipboardData)?h:t.testClipboardData,c={clipboard:e},null==e||f(t)?void this.getPastedHTMLUsingHiddenElement(function(t){return function(e){var n,r,i;return c.type="text/html",c.html=e,null!=(n=t.delegate)&&n.inputControllerWillPaste(c),null!=(r=t.responder)&&r.insertHTML(c.html),t.requestRender(),null!=(i=t.delegate)?i.inputControllerDidPaste(c):void 0}}(this)):((s=e.getData("URL"))?(c.type="URL",c.href=s,c.string=(l=e.getData("public.url-name"))?r.squishBreakableWhitespace(l).trim():s,null!=(p=this.delegate)&&p.inputControllerWillPaste(c),this.setInputSummary({textAdded:c.string,didDelete:this.selectionIsExpanded()}),null!=(A=this.responder)&&A.insertText(r.Text.textForStringWithAttributes(c.string,{href:c.href})),this.requestRender(),null!=(w=this.delegate)&&w.inputControllerDidPaste(c)):n(e)?(c.type="text/plain",c.string=e.getData("text/plain"),null!=(x=this.delegate)&&x.inputControllerWillPaste(c),this.setInputSummary({textAdded:c.string,didDelete:this.selectionIsExpanded()}),null!=(E=this.responder)&&E.insertString(c.string),this.requestRender(),null!=(O=this.delegate)&&O.inputControllerDidPaste(c)):(u=e.getData("text/html"))?(c.type="text/html",c.html=u,null!=(S=this.delegate)&&S.inputControllerWillPaste(c),null!=(P=this.responder)&&P.insertHTML(c.html),this.requestRender(),null!=(C=this.delegate)&&C.inputControllerDidPaste(c)):m.call(e.types,"Files")>=0&&(a=null!=(g=e.items)&&null!=(y=g[0])&&"function"==typeof y.getAsFile?y.getAsFile():void 0)&&(!a.name&&(i=o(a))&&(a.name="pasted-file-"+ ++d+"."+i),c.type="File",c.file=a,null!=(v=this.delegate)&&v.inputControllerWillAttachFiles(),null!=(b=this.responder)&&b.insertFile(c.file),this.requestRender(),null!=(_=this.delegate)&&_.inputControllerDidPaste(c)),t.preventDefault())},compositionstart:function(t){return this.getCompositionInput().start(t.data)},compositionupdate:function(t){return this.getCompositionInput().update(t.data)},compositionend:function(t){return this.getCompositionInput().end(t.data)},beforeinput:function(){return this.inputSummary.didInput=!0},input:function(t){return this.inputSummary.didInput=!0,t.stopPropagation()}},a.prototype.keys={backspace:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},delete:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},return:function(){var t,e;return this.setInputSummary({preferDocument:!0}),null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),null!=(e=this.responder)?e.insertLineBreak():void 0},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canIncreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.increaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},right:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},control:{d:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},h:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},o:function(t){var e,n;return t.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n",{updatePosition:!1}),this.requestRender()}},shift:{return:function(t){var e,n;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n"),this.requestRender(),t.preventDefault()},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canDecreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.decreaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("backward")):void 0},right:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("forward")):void 0}},alt:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}},meta:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}}},a.prototype.getCompositionInput=function(){return this.isComposing()?this.compositionInput:this.compositionInput=new t(this)},a.prototype.isComposing=function(){return null!=this.compositionInput&&!this.compositionInput.isEnded()},a.prototype.deleteInDirection=function(t,e){var n;return!1!==(null!=(n=this.responder)?n.deleteInDirection(t):void 0)?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0},a.prototype.serializeSelectionToDataTransfer=function(t){var e,n;if(i(t))return e=null!=(n=this.responder)?n.getSelectedDocument().toSerializableDocument():void 0,t.setData("application/x-trix-document",JSON.stringify(e)),t.setData("text/html",r.DocumentView.render(e).innerHTML),t.setData("text/plain",e.toString().replace(/\n$/,"")),!0},a.prototype.canAcceptDataTransfer=function(t){var e,n,r,i,o;for(o={},e=0,n=(i=null!=(r=null!=t?t.types:void 0)?r:[]).length;n>e;e++)o[i[e]]=!0;return o.Files||o["application/x-trix-document"]||o["text/html"]||o["text/plain"]},a.prototype.getPastedHTMLUsingHiddenElement=function(t){var e,n,i;return n=this.getSelectedRange(),i={position:"absolute",left:window.pageXOffset+"px",top:window.pageYOffset+"px",opacity:0},e=l({style:i,tagName:"div",editable:!0}),document.body.appendChild(e),e.focus(),requestAnimationFrame(function(i){return function(){var o;return o=e.innerHTML,r.removeNode(e),i.setSelectedRange(n),t(o)}}(this))},a.proxyMethod("responder?.getSelectedRange"),a.proxyMethod("responder?.setSelectedRange"),a.proxyMethod("responder?.expandSelectionInDirection"),a.proxyMethod("responder?.selectionIsInCursorTarget"),a.proxyMethod("responder?.selectionIsExpanded"),a}(r.InputController),o=function(t){var e,n;return null!=(e=t.type)&&null!=(n=e.match(/\/(\w+)$/))?n[1]:void 0},a=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),h=function(t){var e;return t.key&&a&&t.key.codePointAt(0)===t.keyCode?t.key:(null===t.which?e=t.keyCode:0!==t.which&&0!==t.charCode&&(e=t.charCode),null!=e&&"escape"!==u[e]?r.UTF16String.fromCodepoints([e]).toString():void 0)},f=function(t){var e,n,r,i,o,a,s,u,l;if(s=t.clipboardData){if(m.call(s.types,"text/html")>=0){for(r=0,a=(u=s.types).length;a>r;r++)if(l=u[r],e=/^CorePasteboardFlavorType/.test(l),n=/^dyn\./.test(l)&&s.getData(l),e||n)return!0;return!1}return i=m.call(s.types,"com.apple.webarchive")>=0,o=m.call(s.types,"com.apple.flat-rtfd")>=0,i||o}},t=function(t){function n(t){var e;this.inputController=t,e=this.inputController,this.responder=e.responder,this.delegate=e.delegate,this.inputSummary=e.inputSummary,this.data={}}return p(n,t),n.prototype.start=function(t){var e,n;return this.data.start=t,this.isSignificant()?("keypress"===this.inputSummary.eventName&&this.inputSummary.textAdded&&null!=(e=this.responder)&&e.deleteInDirection("left"),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=null!=(n=this.responder)?n.getSelectedRange():void 0):void 0},n.prototype.update=function(t){var e;return this.data.update=t,this.isSignificant()&&(e=this.selectPlaceholder())?(this.forgetPlaceholder(),this.range=e):void 0},n.prototype.end=function(t){var e,n,r,i;return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.setSelectedRange(this.range),null!=(r=this.responder)&&r.insertString(this.data.end),null!=(i=this.responder)?i.setSelectedRange(this.range[0]+this.data.end.length):void 0):null!=this.data.start||null!=this.data.update?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset()},n.prototype.getEndData=function(){return this.data.end},n.prototype.isEnded=function(){return null!=this.getEndData()},n.prototype.isSignificant=function(){return!e.composesExistingText||this.inputSummary.didInput},n.prototype.canApplyToDocument=function(){var t,e;return 0===(null!=(t=this.data.start)?t.length:void 0)&&(null!=(e=this.data.end)?e.length:void 0)>0&&null!=this.range},n.proxyMethod("inputController.setInputSummary"),n.proxyMethod("inputController.requestRender"),n.proxyMethod("inputController.requestReparse"),n.proxyMethod("responder?.selectionIsExpanded"),n.proxyMethod("responder?.insertPlaceholder"),n.proxyMethod("responder?.selectPlaceholder"),n.proxyMethod("responder?.forgetPlaceholder"),n}(r.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=r.dataTransferIsPlainText,e=r.keyEventIsKeyboardCommand,n=r.objectsAreEqual,r.Level2InputController=function(a){function u(){return this.render=i(this.render,this),u.__super__.constructor.apply(this,arguments)}var l,c,f,h,p,d;return o(u,a),u.prototype.elementDidMutate=function(){var t;return this.scheduledRender?this.composing&&null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidAllowUnhandledInput?t.inputControllerDidAllowUnhandledInput():void 0:this.reparse()},u.prototype.scheduleRender=function(){return null!=this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)},u.prototype.render=function(){var t;return cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||null!=(t=this.delegate)&&t.render(),"function"==typeof this.afterRender&&this.afterRender(),this.afterRender=null},u.prototype.reparse=function(){var t;return null!=(t=this.delegate)?t.reparse():void 0},u.prototype.events={keydown:function(t){var n,r,i,o;if(e(t)){if(n=c(t),null!=(o=this.delegate)?o.inputControllerDidReceiveKeyboardCommand(n):void 0)return t.preventDefault()}else if(i=t.key,t.altKey&&(i+="+Alt"),t.shiftKey&&(i+="+Shift"),r=this.keys[i])return this.withEvent(t,r)},paste:function(t){var e,n,i,o,a,s,u,l,c;return f(t)?(t.preventDefault(),this.attachFiles(t.clipboardData.files)):h(t)?(t.preventDefault(),n={type:"text/plain",string:t.clipboardData.getData("text/plain")},null!=(i=this.delegate)&&i.inputControllerWillPaste(n),null!=(o=this.responder)&&o.insertString(n.string),this.render(),null!=(a=this.delegate)?a.inputControllerDidPaste(n):void 0):(e=null!=(s=t.clipboardData)?s.getData("URL"):void 0)?(t.preventDefault(),n={type:"URL",href:e,string:e},null!=(u=this.delegate)&&u.inputControllerWillPaste(n),null!=(l=this.responder)&&l.insertText(r.Text.textForStringWithAttributes(n.string,{href:n.href})),this.render(),null!=(c=this.delegate)?c.inputControllerDidPaste(n):void 0):void 0},beforeinput:function(t){var e;return(e=this.inputTypes[t.inputType])?(this.withEvent(t,e),this.scheduleRender()):void 0},input:function(){return r.selectionChangeObserver.reset()},dragstart:function(t){var e,n;return(null!=(e=this.responder)?e.selectionContainsAttachments():void 0)?(t.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:null!=(n=this.responder)?n.getSelectedRange():void 0,point:p(t)}):void 0},dragenter:function(t){return l(t)?t.preventDefault():void 0},dragover:function(t){var e,r;return this.dragging&&(t.preventDefault(),e=p(t),!n(e,this.dragging.point))?(this.dragging.point=e,null!=(r=this.responder)?r.setLocationRangeFromPointRange(e):void 0):void 0},drop:function(t){var e,n,r,i;return this.dragging?(t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillMoveText(),null!=(r=this.responder)&&r.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender()):l(t)?(t.preventDefault(),e=p(t),null!=(i=this.responder)&&i.setLocationRangeFromPointRange(e),this.attachFiles(t.dataTransfer.files)):void 0},dragend:function(){var t;return this.dragging?(null!=(t=this.responder)&&t.setSelectedRange(this.dragging.range),this.dragging=null):void 0},compositionend:function(){return this.composing?(this.composing=!1,this.scheduleRender()):void 0}},u.prototype.keys={ArrowLeft:function(){var t,e;return(null!=(t=this.responder)?t.shouldManageMovingCursorInDirection("backward"):void 0)?(this.event.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},ArrowRight:function(){var t,e;return(null!=(t=this.responder)?t.shouldManageMovingCursorInDirection("forward"):void 0)?(this.event.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},Backspace:function(){var t,e,n;return(null!=(t=this.responder)?t.shouldManageDeletingInDirection("backward"):void 0)?(this.event.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.deleteInDirection("backward"),this.render()):void 0},Tab:function(){var t,e;return(null!=(t=this.responder)?t.canIncreaseNestingLevel():void 0)?(this.event.preventDefault(),null!=(e=this.responder)&&e.increaseNestingLevel(),this.render()):void 0},"Tab+Shift":function(){var t,e;return(null!=(t=this.responder)?t.canDecreaseNestingLevel():void 0)?(this.event.preventDefault(),null!=(e=this.responder)&&e.decreaseNestingLevel(),this.render()):void 0}},u.prototype.inputTypes={deleteByComposition:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut:function(){return this.deleteInDirection("backward")},deleteByDrag:function(){return this.event.preventDefault(),this.withTargetDOMRange((function(){var t;return this.deleteByDragRange=null!=(t=this.responder)?t.getSelectedRange():void 0}))},deleteCompositionText:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent:function(){return this.deleteInDirection("backward")},deleteContentBackward:function(){return this.deleteInDirection("backward")},deleteContentForward:function(){return this.deleteInDirection("forward")},deleteEntireSoftLine:function(){return this.deleteInDirection("forward")},deleteHardLineBackward:function(){return this.deleteInDirection("backward")},deleteHardLineForward:function(){return this.deleteInDirection("forward")},deleteSoftLineBackward:function(){return this.deleteInDirection("backward")},deleteSoftLineForward:function(){return this.deleteInDirection("forward")},deleteWordBackward:function(){return this.deleteInDirection("backward")},deleteWordForward:function(){return this.deleteInDirection("forward")},formatBackColor:function(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold:function(){return this.toggleAttributeIfSupported("bold")},formatFontColor:function(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName:function(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent:function(){var t;return(null!=(t=this.responder)?t.canIncreaseNestingLevel():void 0)?this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.increaseNestingLevel():void 0})):void 0},formatItalic:function(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter:function(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull:function(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft:function(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight:function(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent:function(){var t;return(null!=(t=this.responder)?t.canDecreaseNestingLevel():void 0)?this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.decreaseNestingLevel():void 0})):void 0},formatRemove:function(){return this.withTargetDOMRange((function(){var t,e,n,r;for(t in r=[],null!=(e=this.responder)?e.getCurrentAttributes():void 0)r.push(null!=(n=this.responder)?n.removeCurrentAttribute(t):void 0);return r}))},formatSetBlockTextDirection:function(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection:function(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough:function(){return this.toggleAttributeIfSupported("strike")},formatSubscript:function(){return this.toggleAttributeIfSupported("sub")},formatSuperscript:function(){return this.toggleAttributeIfSupported("sup")},formatUnderline:function(){return this.toggleAttributeIfSupported("underline")},historyRedo:function(){var t;return null!=(t=this.delegate)?t.inputControllerWillPerformRedo():void 0},historyUndo:function(){var t;return null!=(t=this.delegate)?t.inputControllerWillPerformUndo():void 0},insertCompositionText:function(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition:function(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop:function(){var t,e;return(t=this.deleteByDragRange)?(this.deleteByDragRange=null,null!=(e=this.delegate)&&e.inputControllerWillMoveText(),this.withTargetDOMRange((function(){var e;return null!=(e=this.responder)?e.moveTextFromRange(t):void 0}))):void 0},insertFromPaste:function(){var e,n,i,o,a,s,u,l,c,f;return e=this.event.dataTransfer,a={dataTransfer:e},(n=e.getData("URL"))?(a.type="URL",a.href=n,a.string=(o=e.getData("public.url-name"))?r.squishBreakableWhitespace(o).trim():n,null!=(s=this.delegate)&&s.inputControllerWillPaste(a),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertText(r.Text.textForStringWithAttributes(a.string,{href:a.href})):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(a):void 0}}(this)):t(e)?(a.type="text/plain",a.string=e.getData("text/plain"),null!=(u=this.delegate)&&u.inputControllerWillPaste(a),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertString(a.string):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(a):void 0}}(this)):(i=e.getData("text/html"))?(a.type="text/html",a.html=i,null!=(l=this.delegate)&&l.inputControllerWillPaste(a),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertHTML(a.html):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(a):void 0}}(this)):(null!=(c=e.files)?c.length:void 0)?(a.type="File",a.file=e.files[0],null!=(f=this.delegate)&&f.inputControllerWillPaste(a),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertFile(a.file):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(a):void 0}}(this)):void 0},insertFromYank:function(){return this.insertString(this.event.data)},insertLineBreak:function(){return this.insertString("\n")},insertLink:function(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList:function(){return this.toggleAttributeIfSupported("number")},insertParagraph:function(){var t;return null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertLineBreak():void 0}))},insertReplacementText:function(){return this.insertString(this.event.dataTransfer.getData("text/plain"),{updatePosition:!1})},insertText:function(){var t,e;return this.insertString(null!=(t=this.event.data)?t:null!=(e=this.event.dataTransfer)?e.getData("text/plain"):void 0)},insertTranspose:function(){return this.insertString(this.event.data)},insertUnorderedList:function(){return this.toggleAttributeIfSupported("bullet")}},u.prototype.insertString=function(t,e){var n;return null==t&&(t=""),null!=(n=this.delegate)&&n.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var n;return null!=(n=this.responder)?n.insertString(t,e):void 0}))},u.prototype.toggleAttributeIfSupported=function(t){var e;return s.call(r.getAllAttributeNames(),t)>=0?(null!=(e=this.delegate)&&e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var e;return null!=(e=this.responder)?e.toggleCurrentAttribute(t):void 0}))):void 0},u.prototype.activateAttributeIfSupported=function(t,e){var n;return s.call(r.getAllAttributeNames(),t)>=0?(null!=(n=this.delegate)&&n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var n;return null!=(n=this.responder)?n.setCurrentAttribute(t,e):void 0}))):void 0},u.prototype.deleteInDirection=function(t,e){var n,r,i;return(null!=e?e:{recordUndoEntry:!0}).recordUndoEntry&&null!=(i=this.delegate)&&i.inputControllerWillPerformTyping(),r=function(e){return function(){var n;return null!=(n=e.responder)?n.deleteInDirection(t):void 0}}(this),(n=this.getTargetDOMRange({minLength:2}))?this.withTargetDOMRange(n,r):r()},u.prototype.withTargetDOMRange=function(t,e){var n;return"function"==typeof t&&(e=t,t=this.getTargetDOMRange()),t?null!=(n=this.responder)?n.withTargetDOMRange(t,e.bind(this)):void 0:(r.selectionChangeObserver.reset(),e.call(this))},u.prototype.getTargetDOMRange=function(t){var e,n,r,i;return r=(null!=t?t:{minLength:0}).minLength,(i="function"==typeof(e=this.event).getTargetRanges?e.getTargetRanges():void 0)&&i.length&&(n=d(i[0]),0===r||n.toString().length>=r)?n:void 0},d=function(t){var e;return(e=document.createRange()).setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),e},u.prototype.withEvent=function(t,e){var n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n},l=function(t){var e,n;return s.call(null!=(e=null!=(n=t.dataTransfer)?n.types:void 0)?e:[],"Files")>=0},f=function(t){var e;return(e=t.clipboardData)?s.call(e.types,"Files")>=0&&1===e.types.length&&e.files.length>=1:void 0},h=function(t){var e;return(e=t.clipboardData)?s.call(e.types,"text/plain")>=0&&1===e.types.length:void 0},c=function(t){var e;return e=[],t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.push(t.key),e},p=function(t){return{x:t.clientX,y:t.clientY}},u}(r.InputController)}.call(this),function(){var t,e,n,i,o,a,s,u,l,c=function(t,e){return function(){return t.apply(e,arguments)}},f=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;e=r.defer,n=r.escapeHTML,i=r.handleEvent,s=r.makeElement,l=r.tagName,u=r.config,a=u.lang,t=u.css,o=u.keyNames,r.AttachmentEditorController=function(u){function h(t,e,n,r){this.attachmentPiece=t,this.element=e,this.container=n,this.options=null!=r?r:{},this.didBlurCaption=c(this.didBlurCaption,this),this.didChangeCaption=c(this.didChangeCaption,this),this.didInputCaption=c(this.didInputCaption,this),this.didKeyDownCaption=c(this.didKeyDownCaption,this),this.didClickActionButton=c(this.didClickActionButton,this),this.didClickToolbar=c(this.didClickToolbar,this),this.attachment=this.attachmentPiece.attachment,"a"===l(this.element)&&(this.element=this.element.firstChild),this.install()}var p;return f(h,u),p=function(t){return function(){var e;return(e=t.apply(this,arguments)).do(),null==this.undos&&(this.undos=[]),this.undos.push(e.undo)}},h.prototype.install=function(){return this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()?this.installCaptionEditor():void 0},h.prototype.uninstall=function(){var t,e;for(this.savePendingCaption();e=this.undos.pop();)e();return null!=(t=this.delegate)?t.didUninstallAttachmentEditor(this):void 0},h.prototype.savePendingCaption=function(){var t,e,n;return null!=this.pendingCaption?(t=this.pendingCaption,this.pendingCaption=null,t?null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestUpdatingAttributesForAttachment?e.attachmentEditorDidRequestUpdatingAttributesForAttachment({caption:t},this.attachment):void 0:null!=(n=this.delegate)&&"function"==typeof n.attachmentEditorDidRequestRemovingAttributeForAttachment?n.attachmentEditorDidRequestRemovingAttributeForAttachment("caption",this.attachment):void 0):void 0},h.prototype.makeElementMutable=p((function(){return{do:function(t){return function(){return t.element.dataset.trixMutable=!0}}(this),undo:function(t){return function(){return delete t.element.dataset.trixMutable}}(this)}})),h.prototype.addToolbar=p((function(){var e,o,u;return(e=s({tagName:"div",className:t.attachmentToolbar,data:{trixMutable:!0}})).innerHTML='<div class="trix-button-row">\n  <span class="trix-button-group trix-button-group--actions">\n    <button type="button" data-trix-action="remove" class="trix-button trix-button--remove" title="'+a.remove+'">'+a.remove+"</button>\n  </span>\n</div>",this.attachment.isPreviewable()&&(o=n(this.attachment.getFilename()),u=n(this.attachment.getFormattedFilesize()),e.innerHTML+='<div class="'+t.attachmentMetadataContainer+'">\n  <span class="'+t.attachmentMetadata+'">\n    <span class="'+t.attachmentName+'" title="'+o+'">'+o+'</span>\n    <span class="'+t.attachmentSize+'">'+u+"</span>\n  </span>\n</div>"),i("click",{onElement:e,withCallback:this.didClickToolbar}),i("click",{onElement:e,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),{do:function(t){return function(){return t.element.appendChild(e)}}(this),undo:function(){return r.removeNode(e)}}})),h.prototype.installCaptionEditor=p((function(){var n,o,u,l,c;return(l=s({tagName:"textarea",className:t.attachmentCaptionEditor,attributes:{placeholder:a.captionPlaceholder},data:{trixMutable:!0}})).value=this.attachmentPiece.getCaption(),(c=l.cloneNode()).classList.add("trix-autoresize-clone"),c.tabIndex=-1,n=function(){return c.value=l.value,l.style.height=c.scrollHeight+"px"},i("input",{onElement:l,withCallback:n}),i("input",{onElement:l,withCallback:this.didInputCaption}),i("keydown",{onElement:l,withCallback:this.didKeyDownCaption}),i("change",{onElement:l,withCallback:this.didChangeCaption}),i("blur",{onElement:l,withCallback:this.didBlurCaption}),u=this.element.querySelector("figcaption"),o=u.cloneNode(),{do:function(r){return function(){return u.style.display="none",o.appendChild(l),o.appendChild(c),o.classList.add(t.attachmentCaption+"--editing"),u.parentElement.insertBefore(o,u),n(),r.options.editCaption?e((function(){return l.focus()})):void 0}}(this),undo:function(){return r.removeNode(o),u.style.display=null}}})),h.prototype.didClickToolbar=function(t){return t.preventDefault(),t.stopPropagation()},h.prototype.didClickActionButton=function(t){var e;if("remove"===t.target.getAttribute("data-trix-action"))return null!=(e=this.delegate)?e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment):void 0},h.prototype.didKeyDownCaption=function(t){var e;return"return"===o[t.keyCode]?(t.preventDefault(),this.savePendingCaption(),null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestDeselectingAttachment?e.attachmentEditorDidRequestDeselectingAttachment(this.attachment):void 0):void 0},h.prototype.didInputCaption=function(t){return this.pendingCaption=t.target.value.replace(/\s/g," ").trim()},h.prototype.didChangeCaption=function(){return this.savePendingCaption()},h.prototype.didBlurCaption=function(){return this.savePendingCaption()},h}(r.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=r.makeElement,t=r.config.css,r.AttachmentView=function(o){function a(){a.__super__.constructor.apply(this,arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}var s;return i(a,o),a.attachmentSelector="[data-trix-attachment]",a.prototype.createContentNodes=function(){return[]},a.prototype.createNodes=function(){var e,r,i,o,a,u,l;if(e=o=n({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),(r=this.getHref())&&(o=n({tagName:"a",editable:!1,attributes:{href:r,tabindex:-1}}),e.appendChild(o)),this.attachment.hasContent())o.innerHTML=this.attachment.getContent();else for(i=0,a=(l=this.createContentNodes()).length;a>i;i++)u=l[i],o.appendChild(u);return o.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=n({tagName:"progress",attributes:{class:t.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[s("left"),e,s("right")]},a.prototype.createCaptionElement=function(){var e,r,i,o,a,s,u;return i=n({tagName:"figcaption",className:t.attachmentCaption}),(e=this.attachmentPiece.getCaption())?(i.classList.add(t.attachmentCaption+"--edited"),i.textContent=e):((r=this.getCaptionConfig()).name&&(o=this.attachment.getFilename()),r.size&&(s=this.attachment.getFormattedFilesize()),o&&(a=n({tagName:"span",className:t.attachmentName,textContent:o}),i.appendChild(a)),s&&(o&&i.appendChild(document.createTextNode(" ")),u=n({tagName:"span",className:t.attachmentSize,textContent:s}),i.appendChild(u))),i},a.prototype.getClassName=function(){var e,n;return n=[t.attachment,t.attachment+"--"+this.attachment.getType()],(e=this.attachment.getExtension())&&n.push(t.attachment+"--"+e),n.join(" ")},a.prototype.getData=function(){var t,e;return e={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},(t=this.attachmentPiece.attributes).isEmpty()||(e.trixAttributes=JSON.stringify(t)),this.attachment.isPending()&&(e.trixSerialize=!1),e},a.prototype.getHref=function(){return e(this.attachment.getContent(),"a")?void 0:this.attachment.getHref()},a.prototype.getCaptionConfig=function(){var t,e,n;return n=this.attachment.getType(),t=r.copyObject(null!=(e=r.config.attachments[n])?e.caption:void 0),"file"===n&&(t.name=!0),t},a.prototype.findProgressElement=function(){var t;return null!=(t=this.findElement())?t.querySelector("progress"):void 0},s=function(t){return n({tagName:"span",textContent:r.ZERO_WIDTH_SPACE,data:{trixCursorTarget:t,trixSerialize:!1}})},a.prototype.attachmentDidChangeUploadProgress=function(){var t,e;return e=this.attachment.getUploadProgress(),null!=(t=this.findProgressElement())?t.value=e:void 0},a}(r.ObjectView),e=function(t,e){var r;return(r=n("div")).innerHTML=null!=t?t:"",r.querySelector(e)}}.call(this),function(){var t,e=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=r.makeElement,r.PreviewableAttachmentView=function(n){function i(){i.__super__.constructor.apply(this,arguments),this.attachment.previewDelegate=this}return e(i,n),i.prototype.createContentNodes=function(){return this.image=t({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]},i.prototype.createCaptionElement=function(){var t;return(t=i.__super__.createCaptionElement.apply(this,arguments)).textContent||t.setAttribute("data-trix-placeholder",r.config.lang.captionPlaceholder),t},i.prototype.refresh=function(t){var e;return null==t&&(t=null!=(e=this.findElement())?e.querySelector("img"):void 0),t?this.updateAttributesForImage(t):void 0},i.prototype.updateAttributesForImage=function(t){var e,n,r,i,o,a;return o=this.attachment.getURL(),n=this.attachment.getPreviewURL(),t.src=n||o,n===o?t.removeAttribute("data-trix-serialized-attributes"):(r=JSON.stringify({src:o}),t.setAttribute("data-trix-serialized-attributes",r)),a=this.attachment.getWidth(),e=this.attachment.getHeight(),null!=a&&(t.width=a),null!=e&&(t.height=e),i=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/"),t.dataset.trixStoreKey=i},i.prototype.attachmentDidChangeAttributes=function(){return this.refresh(this.image),this.refresh()},i}(r.AttachmentView)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=r.makeElement,t=r.findInnerElement,e=r.getTextConfig,r.PieceView=function(o){function a(){var t;a.__super__.constructor.apply(this,arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),t=this.options,this.textConfig=t.textConfig,this.context=t.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}var s;return i(a,o),a.prototype.createNodes=function(){var e,n,r,i,o,a;if(a=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement()){for(r=t(e),n=0,i=a.length;i>n;n++)o=a[n],r.appendChild(o);a=[e]}return a},a.prototype.createAttachmentNodes=function(){var t;return t=this.attachment.isPreviewable()?r.PreviewableAttachmentView:r.AttachmentView,this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()},a.prototype.createStringNodes=function(){var t,e,r,i,o,a,s,u,l;if(null!=(s=this.textConfig)?s.plaintext:void 0)return[document.createTextNode(this.string)];for(a=[],r=e=0,i=(u=this.string.split("\n")).length;i>e;r=++e)l=u[r],r>0&&(t=n("br"),a.push(t)),l.length&&(o=document.createTextNode(this.preserveSpaces(l)),a.push(o));return a},a.prototype.createElement=function(){var t,r,i,o,a,s,u,l,c;for(o in l={},s=this.attributes)if(c=s[o],(t=e(o))&&(t.tagName&&(a=n(t.tagName),i?(i.appendChild(a),i=a):r=i=a),t.styleProperty&&(l[t.styleProperty]=c),t.style))for(o in u=t.style)c=u[o],l[o]=c;if(Object.keys(l).length)for(o in null==r&&(r=n("span")),l)c=l[o],r.style[o]=c;return r},a.prototype.createContainerElement=function(){var t,r,i,o,a;for(i in o=this.attributes)if(a=o[i],(r=e(i))&&r.groupTagName)return(t={})[i]=a,n(r.groupTagName,t)},s=r.NON_BREAKING_SPACE,a.prototype.preserveSpaces=function(t){return this.context.isLast&&(t=t.replace(/\ $/,s)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 "+s+" $2").replace(/\ {2}/g,s+" ").replace(/\ {2}/g," "+s),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,s)),t},a}(r.ObjectView)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.TextView=function(e){function n(){n.__super__.constructor.apply(this,arguments),this.text=this.object,this.textConfig=this.options.textConfig}var i;return t(n,e),n.prototype.createNodes=function(){var t,e,n,o,a,s,u,l,c,f;for(s=[],o=(l=r.ObjectGroup.groupObjects(this.getPieces())).length-1,n=e=0,a=l.length;a>e;n=++e)u=l[n],t={},0===n&&(t.isFirst=!0),n===o&&(t.isLast=!0),i(c)&&(t.followsWhitespace=!0),f=this.findOrCreateCachedChildView(r.PieceView,u,{textConfig:this.textConfig,context:t}),s.push.apply(s,f.getNodes()),c=u;return s},n.prototype.getPieces=function(){var t,e,n,r,i;for(i=[],t=0,e=(r=this.text.getPieces()).length;e>t;t++)(n=r[t]).hasAttribute("blockBreak")||i.push(n);return i},i=function(t){return/\s$/.test(null!=t?t.toString():void 0)},n}(r.ObjectView)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=r.makeElement,e=r.getBlockConfig,t=r.config.css,r.BlockView=function(o){function a(){a.__super__.constructor.apply(this,arguments),this.block=this.object,this.attributes=this.block.getAttributes()}return i(a,o),a.prototype.createNodes=function(){var t,i,o,a,s,u,l,c;if(s=[document.createComment("block")],this.block.isEmpty()?s.push(n("br")):(l=null!=(u=e(this.block.getLastAttribute()))?u.text:void 0,c=this.findOrCreateCachedChildView(r.TextView,this.block.text,{textConfig:l}),s.push.apply(s,c.getNodes()),this.shouldAddExtraNewlineElement()&&s.push(n("br"))),this.attributes.length)return s;for(t=n(r.config.blockAttributes.default.tagName),i=0,o=s.length;o>i;i++)a=s[i],t.appendChild(a);return[t]},a.prototype.createContainerElement=function(r){var i,o,a;return i=this.attributes[r],o={tagName:e(i).tagName},"attachmentGallery"===i&&(a=this.block.getBlockBreakPosition(),o.className=t.attachmentGallery+" "+t.attachmentGallery+"--"+a),n(o)},a.prototype.shouldAddExtraNewlineElement=function(){return/\n\n$/.test(this.block.toString())},a}(r.ObjectView)}.call(this),function(){var t,e,n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=r.defer,e=r.makeElement,r.DocumentView=function(i){function o(){o.__super__.constructor.apply(this,arguments),this.element=this.options.element,this.elementStore=new r.ElementStore,this.setDocument(this.object)}var a,s,u;return n(o,i),o.render=function(t){var n,r;return(r=new this(t,{element:n=e("div")})).render(),r.sync(),n},o.prototype.setDocument=function(t){return t.isEqualTo(this.document)?void 0:this.document=this.object=t},o.prototype.render=function(){var t,n,i,o,a,s,u;if(this.childViews=[],this.shadowElement=e("div"),!this.document.isEmpty()){for(s=[],t=0,n=(a=r.ObjectGroup.groupObjects(this.document.getBlocks(),{asTree:!0})).length;n>t;t++)o=a[t],u=this.findOrCreateCachedChildView(r.BlockView,o),s.push(function(){var t,e,n,r;for(r=[],t=0,e=(n=u.getNodes()).length;e>t;t++)i=n[t],r.push(this.shadowElement.appendChild(i));return r}.call(this));return s}},o.prototype.isSynced=function(){return a(this.shadowElement,this.element)},o.prototype.sync=function(){var t;for(t=this.createDocumentFragmentForSync();this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()},o.prototype.didSync=function(){return this.elementStore.reset(s(this.element)),t(function(t){return function(){return t.garbageCollectCachedViews()}}(this))},o.prototype.createDocumentFragmentForSync=function(){var t,e,n,r,i,o,a,u,l,c;for(e=document.createDocumentFragment(),n=0,i=(u=this.shadowElement.childNodes).length;i>n;n++)a=u[n],e.appendChild(a.cloneNode(!0));for(r=0,o=(l=s(e)).length;o>r;r++)t=l[r],(c=this.elementStore.remove(t))&&t.parentNode.replaceChild(c,t);return e},s=function(t){return t.querySelectorAll("[data-trix-store-key]")},a=function(t,e){return u(t.innerHTML)===u(e.innerHTML)},u=function(t){return t.replace(/&nbsp;/g," ")},o}(r.ObjectView)}.call(this),function(){var t,e,n,i,o,a=function(t,e){return function(){return t.apply(e,arguments)}},s=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;n=r.findClosestElementFromNode,i=r.handleEvent,o=r.innerElementIsActive,e=r.defer,t=r.AttachmentView.attachmentSelector,r.CompositionController=function(u){function l(e,n){this.element=e,this.composition=n,this.didClickAttachment=a(this.didClickAttachment,this),this.didBlur=a(this.didBlur,this),this.didFocus=a(this.didFocus,this),this.documentView=new r.DocumentView(this.composition.document,{element:this.element}),i("focus",{onElement:this.element,withCallback:this.didFocus}),i("blur",{onElement:this.element,withCallback:this.didBlur}),i("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),i("mousedown",{onElement:this.element,matchingSelector:t,withCallback:this.didClickAttachment}),i("click",{onElement:this.element,matchingSelector:"a"+t,preventDefault:!0})}return s(l,u),l.prototype.didFocus=function(){var t,e,n;return t=function(t){return function(){var e;return t.focused?void 0:(t.focused=!0,null!=(e=t.delegate)&&"function"==typeof e.compositionControllerDidFocus?e.compositionControllerDidFocus():void 0)}}(this),null!=(e=null!=(n=this.blurPromise)?n.then(t):void 0)?e:t()},l.prototype.didBlur=function(){return this.blurPromise=new Promise(function(t){return function(n){return e((function(){var e;return o(t.element)||(t.focused=null,null!=(e=t.delegate)&&"function"==typeof e.compositionControllerDidBlur&&e.compositionControllerDidBlur()),t.blurPromise=null,n()}))}}(this))},l.prototype.didClickAttachment=function(t,e){var r,i,o;return r=this.findAttachmentForElement(e),i=null!=n(t.target,{matchingSelector:"figcaption"}),null!=(o=this.delegate)&&"function"==typeof o.compositionControllerDidSelectAttachment?o.compositionControllerDidSelectAttachment(r,{editCaption:i}):void 0},l.prototype.getSerializableElement=function(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element},l.prototype.render=function(){var t,e,n;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&(null!=(t=this.delegate)&&"function"==typeof t.compositionControllerWillSyncDocumentView&&t.compositionControllerWillSyncDocumentView(),this.documentView.sync(),null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidSyncDocumentView&&e.compositionControllerDidSyncDocumentView()),null!=(n=this.delegate)&&"function"==typeof n.compositionControllerDidRender?n.compositionControllerDidRender():void 0},l.prototype.rerenderViewForObject=function(t){return this.invalidateViewForObject(t),this.render()},l.prototype.invalidateViewForObject=function(t){return this.documentView.invalidateViewForObject(t)},l.prototype.isViewCachingEnabled=function(){return this.documentView.isViewCachingEnabled()},l.prototype.enableViewCaching=function(){return this.documentView.enableViewCaching()},l.prototype.disableViewCaching=function(){return this.documentView.disableViewCaching()},l.prototype.refreshViewCache=function(){return this.documentView.garbageCollectCachedViews()},l.prototype.isEditingAttachment=function(){return null!=this.attachmentEditor},l.prototype.installAttachmentEditorForAttachment=function(t,e){var n,i,o;if((null!=(o=this.attachmentEditor)?o.attachment:void 0)!==t&&(i=this.documentView.findElementForObject(t)))return this.uninstallAttachmentEditor(),n=this.composition.document.getAttachmentPieceForAttachment(t),this.attachmentEditor=new r.AttachmentEditorController(n,i,this.element,e),this.attachmentEditor.delegate=this},l.prototype.uninstallAttachmentEditor=function(){var t;return null!=(t=this.attachmentEditor)?t.uninstall():void 0},l.prototype.didUninstallAttachmentEditor=function(){return this.attachmentEditor=null,this.render()},l.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.updateAttributesForAttachment(t,e)},l.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.removeAttributeForAttachment(t,e)},l.prototype.attachmentEditorDidRequestRemovalOfAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestRemovalOfAttachment?e.compositionControllerDidRequestRemovalOfAttachment(t):void 0},l.prototype.attachmentEditorDidRequestDeselectingAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestDeselectingAttachment?e.compositionControllerDidRequestDeselectingAttachment(t):void 0},l.prototype.canSyncDocumentView=function(){return!this.isEditingAttachment()},l.prototype.findAttachmentForElement=function(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))},l}(r.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;e=r.handleEvent,n=r.triggerEvent,t=r.findClosestElementFromNode,r.ToolbarController=function(r){function a(t){this.element=t,this.didKeyDownDialogInput=i(this.didKeyDownDialogInput,this),this.didClickDialogButton=i(this.didClickDialogButton,this),this.didClickAttributeButton=i(this.didClickAttributeButton,this),this.didClickActionButton=i(this.didClickActionButton,this),this.attributes={},this.actions={},this.resetDialogInputs(),e("mousedown",{onElement:this.element,matchingSelector:s,withCallback:this.didClickActionButton}),e("mousedown",{onElement:this.element,matchingSelector:u,withCallback:this.didClickAttributeButton}),e("click",{onElement:this.element,matchingSelector:g,preventDefault:!0}),e("click",{onElement:this.element,matchingSelector:l,withCallback:this.didClickDialogButton}),e("keydown",{onElement:this.element,matchingSelector:c,withCallback:this.didKeyDownDialogInput})}var s,u,l,c,f,h,p,d,m,g;return o(a,r),g=(u="[data-trix-attribute]")+", "+(s="[data-trix-action]"),(f="[data-trix-dialog]")+"[data-trix-active]",l=f+" [data-trix-method]",c=f+" [data-trix-input]",a.prototype.didClickActionButton=function(t,e){var n,r,i;return null!=(r=this.delegate)&&r.toolbarDidClickButton(),t.preventDefault(),n=h(e),this.getDialog(n)?this.toggleDialog(n):null!=(i=this.delegate)?i.toolbarDidInvokeAction(n):void 0},a.prototype.didClickAttributeButton=function(t,e){var n,r,i;return null!=(r=this.delegate)&&r.toolbarDidClickButton(),t.preventDefault(),n=p(e),this.getDialog(n)?this.toggleDialog(n):null!=(i=this.delegate)&&i.toolbarDidToggleAttribute(n),this.refreshAttributeButtons()},a.prototype.didClickDialogButton=function(e,n){var r;return r=t(n,{matchingSelector:f}),this[n.getAttribute("data-trix-method")].call(this,r)},a.prototype.didKeyDownDialogInput=function(t,e){var n,r;return 13===t.keyCode&&(t.preventDefault(),n=e.getAttribute("name"),r=this.getDialog(n),this.setAttribute(r)),27===t.keyCode?(t.preventDefault(),this.hideDialog()):void 0},a.prototype.updateActions=function(t){return this.actions=t,this.refreshActionButtons()},a.prototype.refreshActionButtons=function(){return this.eachActionButton(function(t){return function(e,n){return e.disabled=!1===t.actions[n]}}(this))},a.prototype.eachActionButton=function(t){var e,n,r,i,o;for(o=[],n=0,r=(i=this.element.querySelectorAll(s)).length;r>n;n++)e=i[n],o.push(t(e,h(e)));return o},a.prototype.updateAttributes=function(t){return this.attributes=t,this.refreshAttributeButtons()},a.prototype.refreshAttributeButtons=function(){return this.eachAttributeButton(function(t){return function(e,n){return e.disabled=!1===t.attributes[n],t.attributes[n]||t.dialogIsVisible(n)?(e.setAttribute("data-trix-active",""),e.classList.add("trix-active")):(e.removeAttribute("data-trix-active"),e.classList.remove("trix-active"))}}(this))},a.prototype.eachAttributeButton=function(t){var e,n,r,i,o;for(o=[],n=0,r=(i=this.element.querySelectorAll(u)).length;r>n;n++)e=i[n],o.push(t(e,p(e)));return o},a.prototype.applyKeyboardCommand=function(t){var e,r,i,o,a,s;for(o=JSON.stringify(t.sort()),i=0,a=(s=this.element.querySelectorAll("[data-trix-key]")).length;a>i;i++)if(r=(e=s[i]).getAttribute("data-trix-key").split("+"),JSON.stringify(r.sort())===o)return n("mousedown",{onElement:e}),!0;return!1},a.prototype.dialogIsVisible=function(t){var e;return(e=this.getDialog(t))?e.hasAttribute("data-trix-active"):void 0},a.prototype.toggleDialog=function(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)},a.prototype.showDialog=function(t){var e,n,r,i,o,a,s,u,l;for(this.hideDialog(),null!=(a=this.delegate)&&a.toolbarWillShowDialog(),(n=this.getDialog(t)).setAttribute("data-trix-active",""),n.classList.add("trix-active"),r=0,o=(s=n.querySelectorAll("input[disabled]")).length;o>r;r++)s[r].removeAttribute("disabled");return(e=p(n))&&(i=m(n,t))&&(i.value=null!=(u=this.attributes[e])?u:"",i.select()),null!=(l=this.delegate)?l.toolbarDidShowDialog(t):void 0},a.prototype.setAttribute=function(t){var e,n,r;return e=p(t),(n=m(t,e)).willValidate&&!n.checkValidity()?(n.setAttribute("data-trix-validate",""),n.classList.add("trix-validate"),n.focus()):(null!=(r=this.delegate)&&r.toolbarDidUpdateAttribute(e,n.value),this.hideDialog())},a.prototype.removeAttribute=function(t){var e,n;return e=p(t),null!=(n=this.delegate)&&n.toolbarDidRemoveAttribute(e),this.hideDialog()},a.prototype.hideDialog=function(){var t,e;return(t=this.element.querySelector("[data-trix-dialog][data-trix-active]"))?(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),null!=(e=this.delegate)?e.toolbarDidHideDialog(d(t)):void 0):void 0},a.prototype.resetDialogInputs=function(){var t,e,n,r,i;for(i=[],t=0,n=(r=this.element.querySelectorAll(c)).length;n>t;t++)(e=r[t]).setAttribute("disabled","disabled"),e.removeAttribute("data-trix-validate"),i.push(e.classList.remove("trix-validate"));return i},a.prototype.getDialog=function(t){return this.element.querySelector("[data-trix-dialog="+t+"]")},m=function(t,e){return null==e&&(e=p(t)),t.querySelector("[data-trix-input][name='"+e+"']")},h=function(t){return t.getAttribute("data-trix-action")},p=function(t){var e;return null!=(e=t.getAttribute("data-trix-attribute"))?e:t.getAttribute("data-trix-dialog-attribute")},d=function(t){return t.getAttribute("data-trix-dialog")},a}(r.BasicObject)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.ImagePreloadOperation=function(e){function n(t){this.url=t}return t(n,e),n.prototype.perform=function(t){var e;return(e=new Image).onload=function(n){return function(){return e.width=n.width=e.naturalWidth,e.height=n.height=e.naturalHeight,t(!0,e)}}(this),e.onerror=function(){return t(!1)},e.src=this.url},n}(r.Operation)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty;r.Attachment=function(n){function i(e){null==e&&(e={}),this.releaseFile=t(this.releaseFile,this),i.__super__.constructor.apply(this,arguments),this.attributes=r.Hash.box(e),this.didChangeAttributes()}return e(i,n),i.previewablePattern=/^image(\/(gif|png|jpe?g)|$)/,i.attachmentForFile=function(t){var e;return(e=new this(this.attributesForFile(t))).setFile(t),e},i.attributesForFile=function(t){return new r.Hash({filename:t.name,filesize:t.size,contentType:t.type})},i.fromJSON=function(t){return new this(t)},i.prototype.getAttribute=function(t){return this.attributes.get(t)},i.prototype.hasAttribute=function(t){return this.attributes.has(t)},i.prototype.getAttributes=function(){return this.attributes.toObject()},i.prototype.setAttributes=function(t){var e,n,r;return null==t&&(t={}),e=this.attributes.merge(t),this.attributes.isEqualTo(e)?void 0:(this.attributes=e,this.didChangeAttributes(),null!=(n=this.previewDelegate)&&"function"==typeof n.attachmentDidChangeAttributes&&n.attachmentDidChangeAttributes(this),null!=(r=this.delegate)&&"function"==typeof r.attachmentDidChangeAttributes?r.attachmentDidChangeAttributes(this):void 0)},i.prototype.didChangeAttributes=function(){return this.isPreviewable()?this.preloadURL():void 0},i.prototype.isPending=function(){return null!=this.file&&!(this.getURL()||this.getHref())},i.prototype.isPreviewable=function(){return this.attributes.has("previewable")?this.attributes.get("previewable"):this.constructor.previewablePattern.test(this.getContentType())},i.prototype.getType=function(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"},i.prototype.getURL=function(){return this.attributes.get("url")},i.prototype.getHref=function(){return this.attributes.get("href")},i.prototype.getFilename=function(){var t;return null!=(t=this.attributes.get("filename"))?t:""},i.prototype.getFilesize=function(){return this.attributes.get("filesize")},i.prototype.getFormattedFilesize=function(){var t;return"number"==typeof(t=this.attributes.get("filesize"))?r.config.fileSize.formatter(t):""},i.prototype.getExtension=function(){var t;return null!=(t=this.getFilename().match(/\.(\w+)$/))?t[1].toLowerCase():void 0},i.prototype.getContentType=function(){return this.attributes.get("contentType")},i.prototype.hasContent=function(){return this.attributes.has("content")},i.prototype.getContent=function(){return this.attributes.get("content")},i.prototype.getWidth=function(){return this.attributes.get("width")},i.prototype.getHeight=function(){return this.attributes.get("height")},i.prototype.getFile=function(){return this.file},i.prototype.setFile=function(t){return this.file=t,this.isPreviewable()?this.preloadFile():void 0},i.prototype.releaseFile=function(){return this.releasePreloadedFile(),this.file=null},i.prototype.getUploadProgress=function(){var t;return null!=(t=this.uploadProgress)?t:0},i.prototype.setUploadProgress=function(t){var e;return this.uploadProgress!==t?(this.uploadProgress=t,null!=(e=this.uploadProgressDelegate)&&"function"==typeof e.attachmentDidChangeUploadProgress?e.attachmentDidChangeUploadProgress(this):void 0):void 0},i.prototype.toJSON=function(){return this.getAttributes()},i.prototype.getCacheKey=function(){return[i.__super__.getCacheKey.apply(this,arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")},i.prototype.getPreviewURL=function(){return this.previewURL||this.preloadingURL},i.prototype.setPreviewURL=function(t){var e,n;return t!==this.getPreviewURL()?(this.previewURL=t,null!=(e=this.previewDelegate)&&"function"==typeof e.attachmentDidChangeAttributes&&e.attachmentDidChangeAttributes(this),null!=(n=this.delegate)&&"function"==typeof n.attachmentDidChangePreviewURL?n.attachmentDidChangePreviewURL(this):void 0):void 0},i.prototype.preloadURL=function(){return this.preload(this.getURL(),this.releaseFile)},i.prototype.preloadFile=function(){return this.file?(this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)):void 0},i.prototype.releasePreloadedFile=function(){return this.fileObjectURL?(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null):void 0},i.prototype.preload=function(t,e){return t&&t!==this.getPreviewURL()?(this.preloadingURL=t,new r.ImagePreloadOperation(t).then(function(n){return function(r){var i,o;return o=r.width,i=r.height,n.getWidth()&&n.getHeight()||n.setAttributes({width:o,height:i}),n.preloadingURL=null,n.setPreviewURL(t),"function"==typeof e?e():void 0}}(this)).catch(function(t){return function(){return t.preloadingURL=null,"function"==typeof e?e():void 0}}(this))):void 0},i}(r.Object)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.Piece=function(e){function n(t,e){null==e&&(e={}),n.__super__.constructor.apply(this,arguments),this.attributes=r.Hash.box(e)}return t(n,e),n.types={},n.registerType=function(t,e){return e.type=t,this.types[t]=e},n.fromJSON=function(t){var e;return(e=this.types[t.type])?e.fromJSON(t):void 0},n.prototype.copyWithAttributes=function(t){return new this.constructor(this.getValue(),t)},n.prototype.copyWithAdditionalAttributes=function(t){return this.copyWithAttributes(this.attributes.merge(t))},n.prototype.copyWithoutAttribute=function(t){return this.copyWithAttributes(this.attributes.remove(t))},n.prototype.copy=function(){return this.copyWithAttributes(this.attributes)},n.prototype.getAttribute=function(t){return this.attributes.get(t)},n.prototype.getAttributesHash=function(){return this.attributes},n.prototype.getAttributes=function(){return this.attributes.toObject()},n.prototype.getCommonAttributes=function(){var t,e,n;return(n=pieceList.getPieceAtIndex(0))?(t=n.attributes,e=t.getKeys(),pieceList.eachPiece((function(n){return e=t.getKeysCommonToHash(n.attributes),t=t.slice(e)})),t.toObject()):{}},n.prototype.hasAttribute=function(t){return this.attributes.has(t)},n.prototype.hasSameStringValueAsPiece=function(t){return null!=t&&this.toString()===t.toString()},n.prototype.hasSameAttributesAsPiece=function(t){return null!=t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))},n.prototype.isBlockBreak=function(){return!1},n.prototype.isEqualTo=function(t){return n.__super__.isEqualTo.apply(this,arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)},n.prototype.isEmpty=function(){return 0===this.length},n.prototype.isSerializable=function(){return!0},n.prototype.toJSON=function(){return{type:this.constructor.type,attributes:this.getAttributes()}},n.prototype.contentsForInspection=function(){return{type:this.constructor.type,attributes:this.attributes.inspect()}},n.prototype.canBeGrouped=function(){return this.hasAttribute("href")},n.prototype.canBeGroupedWith=function(t){return this.getAttribute("href")===t.getAttribute("href")},n.prototype.getLength=function(){return this.length},n.prototype.canBeConsolidatedWith=function(){return!1},n}(r.Object)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.Piece.registerType("attachment",r.AttachmentPiece=function(e){function n(t){this.attachment=t,n.__super__.constructor.apply(this,arguments),this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}return t(n,e),n.fromJSON=function(t){return new this(r.Attachment.fromJSON(t.attachment),t.attributes)},n.permittedAttributes=["caption","presentation"],n.prototype.ensureAttachmentExclusivelyHasAttribute=function(t){return this.hasAttribute(t)?(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice(t)),this.attributes=this.attributes.remove(t)):void 0},n.prototype.removeProhibitedAttributes=function(){var t;return(t=this.attributes.slice(this.constructor.permittedAttributes)).isEqualTo(this.attributes)?void 0:this.attributes=t},n.prototype.getValue=function(){return this.attachment},n.prototype.isSerializable=function(){return!this.attachment.isPending()},n.prototype.getCaption=function(){var t;return null!=(t=this.attributes.get("caption"))?t:""},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)&&this.attachment.id===(null!=t&&null!=(e=t.attachment)?e.id:void 0)},n.prototype.toString=function(){return r.OBJECT_REPLACEMENT_CHARACTER},n.prototype.toJSON=function(){var t;return(t=n.__super__.toJSON.apply(this,arguments)).attachment=this.attachment,t},n.prototype.getCacheKey=function(){return[n.__super__.getCacheKey.apply(this,arguments),this.attachment.getCacheKey()].join("/")},n.prototype.toConsole=function(){return JSON.stringify(this.toString())},n}(r.Piece))}.call(this),function(){var t,e=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=r.normalizeNewlines,r.Piece.registerType("string",r.StringPiece=function(n){function r(e){r.__super__.constructor.apply(this,arguments),this.string=t(e),this.length=this.string.length}return e(r,n),r.fromJSON=function(t){return new this(t.string,t.attributes)},r.prototype.getValue=function(){return this.string},r.prototype.toString=function(){return this.string.toString()},r.prototype.isBlockBreak=function(){return"\n"===this.toString()&&!0===this.getAttribute("blockBreak")},r.prototype.toJSON=function(){var t;return(t=r.__super__.toJSON.apply(this,arguments)).string=this.string,t},r.prototype.canBeConsolidatedWith=function(t){return null!=t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)},r.prototype.consolidateWith=function(t){return new this.constructor(this.toString()+t.toString(),this.attributes)},r.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]},r.prototype.toConsole=function(){var t;return(t=this.string).length>15&&(t=t.slice(0,14)+"\u2026"),JSON.stringify(t.toString())},r}(r.Piece))}.call(this),function(){var t,e=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,i=[].slice;t=r.spliceArray,r.SplittableList=function(n){function r(t){null==t&&(t=[]),r.__super__.constructor.apply(this,arguments),this.objects=t.slice(0),this.length=this.objects.length}var o,a,s;return e(r,n),r.box=function(t){return t instanceof this?t:new this(t)},r.prototype.indexOf=function(t){return this.objects.indexOf(t)},r.prototype.splice=function(){var e;return e=1<=arguments.length?i.call(arguments,0):[],new this.constructor(t.apply(null,[this.objects].concat(i.call(e))))},r.prototype.eachObject=function(t){var e,n,r,i,o,a;for(a=[],n=e=0,r=(o=this.objects).length;r>e;n=++e)i=o[n],a.push(t(i,n));return a},r.prototype.insertObjectAtIndex=function(t,e){return this.splice(e,0,t)},r.prototype.insertSplittableListAtIndex=function(t,e){return this.splice.apply(this,[e,0].concat(i.call(t.objects)))},r.prototype.insertSplittableListAtPosition=function(t,e){var n,r,i;return r=(i=this.splitObjectAtPosition(e))[0],n=i[1],new this.constructor(r).insertSplittableListAtIndex(t,n)},r.prototype.editObjectAtIndex=function(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)},r.prototype.replaceObjectAtIndex=function(t,e){return this.splice(e,1,t)},r.prototype.removeObjectAtIndex=function(t){return this.splice(t,1)},r.prototype.getObjectAtIndex=function(t){return this.objects[t]},r.prototype.getSplittableListInRange=function(t){var e,n,r,i;return n=(r=this.splitObjectsAtRange(t))[0],e=r[1],i=r[2],new this.constructor(n.slice(e,i+1))},r.prototype.selectSplittableList=function(t){var e,n;return n=function(){var n,r,i,o;for(o=[],n=0,r=(i=this.objects).length;r>n;n++)e=i[n],t(e)&&o.push(e);return o}.call(this),new this.constructor(n)},r.prototype.removeObjectsInRange=function(t){var e,n,r,i;return n=(r=this.splitObjectsAtRange(t))[0],e=r[1],i=r[2],new this.constructor(n).splice(e,i-e+1)},r.prototype.transformObjectsInRange=function(t,e){var n,r,i,o,a,s,u;return a=this.splitObjectsAtRange(t),o=a[0],r=a[1],s=a[2],u=function(){var t,a,u;for(u=[],n=t=0,a=o.length;a>t;n=++t)i=o[n],u.push(n>=r&&s>=n?e(i):i);return u}(),new this.constructor(u)},r.prototype.splitObjectsAtRange=function(t){var e,n,r,i,a;return n=(i=this.splitObjectAtPosition(s(t)))[0],e=i[1],r=i[2],[n=(a=new this.constructor(n).splitObjectAtPosition(o(t)+r))[0],e,a[1]-1]},r.prototype.getObjectAtPosition=function(t){var e,n;return e=(n=this.findIndexAndOffsetAtPosition(t)).index,n.offset,this.objects[e]},r.prototype.splitObjectAtPosition=function(t){var e,n,r,i,o,a,s,u,l;return e=(o=this.findIndexAndOffsetAtPosition(t)).index,i=o.offset,r=this.objects.slice(0),null!=e?0===i?(u=e,l=0):(n=(a=this.getObjectAtIndex(e).splitAtOffset(i))[0],s=a[1],r.splice(e,1,n,s),u=e+1,l=n.getLength()-i):(u=r.length,l=0),[r,u,l]},r.prototype.consolidate=function(){var t,e,n,r,i,o;for(r=[],i=this.objects[0],t=0,e=(o=this.objects.slice(1)).length;e>t;t++)n=o[t],("function"==typeof i.canBeConsolidatedWith?i.canBeConsolidatedWith(n):void 0)?i=i.consolidateWith(n):(r.push(i),i=n);return null!=i&&r.push(i),new this.constructor(r)},r.prototype.consolidateFromIndexToIndex=function(t,e){var n,r;return r=this.objects.slice(0).slice(t,e+1),n=new this.constructor(r).consolidate().toArray(),this.splice.apply(this,[t,r.length].concat(i.call(n)))},r.prototype.findIndexAndOffsetAtPosition=function(t){var e,n,r,i,o,a;for(e=0,r=n=0,i=(a=this.objects).length;i>n;r=++n){if(o=e+a[r].getLength(),t>=e&&o>t)return{index:r,offset:t-e};e=o}return{index:null,offset:null}},r.prototype.findPositionAtIndexAndOffset=function(t,e){var n,r,i,o,a,s;for(a=0,n=r=0,i=(s=this.objects).length;i>r;n=++r)if(o=s[n],t>n)a+=o.getLength();else if(n===t){a+=e;break}return a},r.prototype.getEndPosition=function(){var t,e;return null!=this.endPosition?this.endPosition:this.endPosition=function(){var n,r,i;for(e=0,n=0,r=(i=this.objects).length;r>n;n++)t=i[n],e+=t.getLength();return e}.call(this)},r.prototype.toString=function(){return this.objects.join("")},r.prototype.toArray=function(){return this.objects.slice(0)},r.prototype.toJSON=function(){return this.toArray()},r.prototype.isEqualTo=function(t){return r.__super__.isEqualTo.apply(this,arguments)||a(this.objects,null!=t?t.objects:void 0)},a=function(t,e){var n,r,i,o,a;if(null==e&&(e=[]),t.length!==e.length)return!1;for(a=!0,r=n=0,i=t.length;i>n;r=++n)o=t[r],a&&!o.isEqualTo(e[r])&&(a=!1);return a},r.prototype.contentsForInspection=function(){var t;return{objects:"["+function(){var e,n,r,i;for(i=[],e=0,n=(r=this.objects).length;n>e;e++)t=r[e],i.push(t.inspect());return i}.call(this).join(", ")+"]"}},s=function(t){return t[0]},o=function(t){return t[1]},r}(r.Object)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.Text=function(e){function n(t){var e;null==t&&(t=[]),n.__super__.constructor.apply(this,arguments),this.pieceList=new r.SplittableList(function(){var n,r,i;for(i=[],n=0,r=t.length;r>n;n++)(e=t[n]).isEmpty()||i.push(e);return i}())}return t(n,e),n.textForAttachmentWithAttributes=function(t,e){return new this([new r.AttachmentPiece(t,e)])},n.textForStringWithAttributes=function(t,e){return new this([new r.StringPiece(t,e)])},n.fromJSON=function(t){var e;return new this(function(){var n,i,o;for(o=[],n=0,i=t.length;i>n;n++)e=t[n],o.push(r.Piece.fromJSON(e));return o}())},n.prototype.copy=function(){return this.copyWithPieceList(this.pieceList)},n.prototype.copyWithPieceList=function(t){return new this.constructor(t.consolidate().toArray())},n.prototype.copyUsingObjectMap=function(t){var e,n;return n=function(){var n,r,i,o,a;for(a=[],n=0,r=(i=this.getPieces()).length;r>n;n++)e=i[n],a.push(null!=(o=t.find(e))?o:e);return a}.call(this),new this.constructor(n)},n.prototype.appendText=function(t){return this.insertTextAtPosition(t,this.getLength())},n.prototype.insertTextAtPosition=function(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))},n.prototype.removeTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))},n.prototype.replaceTextAtRange=function(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])},n.prototype.moveTextFromRangeToPosition=function(t,e){var n,r;if(!(t[0]<=e&&e<=t[1]))return n=(r=this.getTextAtRange(t)).getLength(),t[0]<e&&(e-=n),this.removeTextAtRange(t).insertTextAtPosition(r,e)},n.prototype.addAttributeAtRange=function(t,e,n){var r;return(r={})[t]=e,this.addAttributesAtRange(r,n)},n.prototype.addAttributesAtRange=function(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,(function(e){return e.copyWithAdditionalAttributes(t)})))},n.prototype.removeAttributeAtRange=function(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,(function(e){return e.copyWithoutAttribute(t)})))},n.prototype.setAttributesAtRange=function(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,(function(e){return e.copyWithAttributes(t)})))},n.prototype.getAttributesAtPosition=function(t){var e,n;return null!=(e=null!=(n=this.pieceList.getObjectAtPosition(t))?n.getAttributes():void 0)?e:{}},n.prototype.getCommonAttributes=function(){var t,e;return t=function(){var t,n,r,i;for(i=[],t=0,n=(r=this.pieceList.toArray()).length;n>t;t++)e=r[t],i.push(e.getAttributes());return i}.call(this),r.Hash.fromCommonAttributesOfObjects(t).toObject()},n.prototype.getCommonAttributesAtRange=function(t){var e;return null!=(e=this.getTextAtRange(t).getCommonAttributes())?e:{}},n.prototype.getExpandedRangeForAttributeAtOffset=function(t,e){var n,r,i;for(n=i=e,r=this.getLength();n>0&&this.getCommonAttributesAtRange([n-1,i])[t];)n--;for(;r>i&&this.getCommonAttributesAtRange([e,i+1])[t];)i++;return[n,i]},n.prototype.getTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))},n.prototype.getStringAtRange=function(t){return this.pieceList.getSplittableListInRange(t).toString()},n.prototype.getStringAtPosition=function(t){return this.getStringAtRange([t,t+1])},n.prototype.startsWithString=function(t){return this.getStringAtRange([0,t.length])===t},n.prototype.endsWithString=function(t){var e;return e=this.getLength(),this.getStringAtRange([e-t.length,e])===t},n.prototype.getAttachmentPieces=function(){var t,e,n,r,i;for(i=[],t=0,e=(r=this.pieceList.toArray()).length;e>t;t++)null!=(n=r[t]).attachment&&i.push(n);return i},n.prototype.getAttachments=function(){var t,e,n,r,i;for(i=[],t=0,e=(r=this.getAttachmentPieces()).length;e>t;t++)n=r[t],i.push(n.attachment);return i},n.prototype.getAttachmentAndPositionById=function(t){var e,n,r,i,o,a;for(i=0,e=0,n=(o=this.pieceList.toArray()).length;n>e;e++){if((null!=(a=(r=o[e]).attachment)?a.id:void 0)===t)return{attachment:r.attachment,position:i};i+=r.length}return{attachment:null,position:null}},n.prototype.getAttachmentById=function(t){var e,n;return e=(n=this.getAttachmentAndPositionById(t)).attachment,n.position,e},n.prototype.getRangeOfAttachment=function(t){var e,n;return t=(n=this.getAttachmentAndPositionById(t.id)).attachment,e=n.position,null!=t?[e,e+1]:void 0},n.prototype.updateAttributesForAttachment=function(t,e){var n;return(n=this.getRangeOfAttachment(e))?this.addAttributesAtRange(t,n):this},n.prototype.getLength=function(){return this.pieceList.getEndPosition()},n.prototype.isEmpty=function(){return 0===this.getLength()},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)||(null!=t&&null!=(e=t.pieceList)?e.isEqualTo(this.pieceList):void 0)},n.prototype.isBlockBreak=function(){return 1===this.getLength()&&this.pieceList.getObjectAtIndex(0).isBlockBreak()},n.prototype.eachPiece=function(t){return this.pieceList.eachObject(t)},n.prototype.getPieces=function(){return this.pieceList.toArray()},n.prototype.getPieceAtPosition=function(t){return this.pieceList.getObjectAtPosition(t)},n.prototype.contentsForInspection=function(){return{pieceList:this.pieceList.inspect()}},n.prototype.toSerializableText=function(){var t;return t=this.pieceList.selectSplittableList((function(t){return t.isSerializable()})),this.copyWithPieceList(t)},n.prototype.toString=function(){return this.pieceList.toString()},n.prototype.toJSON=function(){return this.pieceList.toJSON()},n.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,r,i;for(i=[],e=0,n=(r=this.pieceList.toArray()).length;n>e;e++)t=r[e],i.push(JSON.parse(t.toConsole()));return i}.call(this))},n}(r.Object)}.call(this),function(){var t,e,n,i,o=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},u=[].slice;t=r.arraysAreEqual,i=r.spliceArray,e=r.getBlockConfig,r.getBlockAttributeNames,n=r.getListAttributeNames,r.Block=function(a){function l(t,e){null==t&&(t=new r.Text),null==e&&(e=[]),l.__super__.constructor.apply(this,arguments),this.text=f(t),this.attributes=e}var c,f,h,p,d,m,g,y,v;return o(l,a),l.fromJSON=function(t){return new this(r.Text.fromJSON(t.text),t.attributes)},l.prototype.isEmpty=function(){return this.text.isBlockBreak()},l.prototype.isEqualTo=function(e){return l.__super__.isEqualTo.apply(this,arguments)||this.text.isEqualTo(null!=e?e.text:void 0)&&t(this.attributes,null!=e?e.attributes:void 0)},l.prototype.copyWithText=function(t){return new this.constructor(t,this.attributes)},l.prototype.copyWithoutText=function(){return this.copyWithText(null)},l.prototype.copyWithAttributes=function(t){return new this.constructor(this.text,t)},l.prototype.copyWithoutAttributes=function(){return this.copyWithAttributes(null)},l.prototype.copyUsingObjectMap=function(t){var e;return this.copyWithText((e=t.find(this.text))?e:this.text.copyUsingObjectMap(t))},l.prototype.addAttribute=function(t){var e;return e=this.attributes.concat(p(t)),this.copyWithAttributes(e)},l.prototype.removeAttribute=function(t){var n,r;return r=e(t).listAttribute,n=m(m(this.attributes,t),r),this.copyWithAttributes(n)},l.prototype.removeLastAttribute=function(){return this.removeAttribute(this.getLastAttribute())},l.prototype.getLastAttribute=function(){return d(this.attributes)},l.prototype.getAttributes=function(){return this.attributes.slice(0)},l.prototype.getAttributeLevel=function(){return this.attributes.length},l.prototype.getAttributeAtLevel=function(t){return this.attributes[t-1]},l.prototype.hasAttribute=function(t){return s.call(this.attributes,t)>=0},l.prototype.hasAttributes=function(){return this.getAttributeLevel()>0},l.prototype.getLastNestableAttribute=function(){return d(this.getNestableAttributes())},l.prototype.getNestableAttributes=function(){var t,n,r,i,o;for(o=[],n=0,r=(i=this.attributes).length;r>n;n++)t=i[n],e(t).nestable&&o.push(t);return o},l.prototype.getNestingLevel=function(){return this.getNestableAttributes().length},l.prototype.decreaseNestingLevel=function(){var t;return(t=this.getLastNestableAttribute())?this.removeAttribute(t):this},l.prototype.increaseNestingLevel=function(){var t,e,n;return(t=this.getLastNestableAttribute())?(n=this.attributes.lastIndexOf(t),e=i.apply(null,[this.attributes,n+1,0].concat(u.call(p(t)))),this.copyWithAttributes(e)):this},l.prototype.getListItemAttributes=function(){var t,n,r,i,o;for(o=[],n=0,r=(i=this.attributes).length;r>n;n++)t=i[n],e(t).listAttribute&&o.push(t);return o},l.prototype.isListItem=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.listAttribute:void 0},l.prototype.isTerminalBlock=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.terminal:void 0},l.prototype.breaksOnReturn=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.breakOnReturn:void 0},l.prototype.findLineBreakInDirectionFromPosition=function(t,e){var n,r;return r=this.toString(),-1!==(n=function(){switch(t){case"forward":return r.indexOf("\n",e);case"backward":return r.slice(0,e).lastIndexOf("\n")}}())?n:void 0},l.prototype.contentsForInspection=function(){return{text:this.text.inspect(),attributes:this.attributes}},l.prototype.toString=function(){return this.text.toString()},l.prototype.toJSON=function(){return{text:this.text,attributes:this.attributes}},l.prototype.getLength=function(){return this.text.getLength()},l.prototype.canBeConsolidatedWith=function(t){return!this.hasAttributes()&&!t.hasAttributes()},l.prototype.consolidateWith=function(t){var e,n;return e=r.Text.textForStringWithAttributes("\n"),n=this.getTextWithoutBlockBreak().appendText(e),this.copyWithText(n.appendText(t.text))},l.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]},l.prototype.getBlockBreakPosition=function(){return this.text.getLength()-1},l.prototype.getTextWithoutBlockBreak=function(){return g(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()},l.prototype.canBeGrouped=function(t){return this.attributes[t]},l.prototype.canBeGroupedWith=function(t,r){var i,o,a,u;return o=(a=t.getAttributes())[r],(i=this.attributes[r])===o&&!(!1===e(i).group&&(u=a[r+1],s.call(n(),u)<0))},f=function(t){return t=v(t),c(t)},v=function(t){var e,n,i,o,a,s;return o=!1,s=t.getPieces(),n=2<=s.length?u.call(s,0,e=s.length-1):(e=0,[]),null==(i=s[e++])?t:(n=function(){var t,e,r;for(r=[],t=0,e=n.length;e>t;t++)(a=n[t]).isBlockBreak()?(o=!0,r.push(y(a))):r.push(a);return r}(),o?new r.Text(u.call(n).concat([i])):t)},h=r.Text.textForStringWithAttributes("\n",{blockBreak:!0}),c=function(t){return g(t)?t:t.appendText(h)},g=function(t){var e;return 0!==(e=t.getLength())&&t.getTextAtRange([e-1,e]).isBlockBreak()},y=function(t){return t.copyWithoutAttribute("blockBreak")},p=function(t){var n;return null!=(n=e(t).listAttribute)?[n,t]:[t]},d=function(t){return t.slice(-1)[0]},m=function(t,e){var n;return-1===(n=t.lastIndexOf(e))?t:i(t,n,1)},l}(r.Object)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,a=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},s=[].slice;e=r.tagName,n=r.walkTree,t=r.nodeIsAttachmentElement,r.HTMLSanitizer=function(o){function u(t,e){var n;n=null!=e?e:{},this.allowedAttributes=n.allowedAttributes,this.forbiddenProtocols=n.forbiddenProtocols,null==this.allowedAttributes&&(this.allowedAttributes=l),null==this.forbiddenProtocols&&(this.forbiddenProtocols=c),this.body=f(t)}var l,c,f,h;return i(u,o),l="style href src width height class".split(" "),c="javascript:".split(" "),u.sanitize=function(t,e){var n;return(n=new this(t,e)).sanitize(),n},u.prototype.sanitize=function(){return this.sanitizeElements(),this.normalizeListElementNesting()},u.prototype.getHTML=function(){return this.body.innerHTML},u.prototype.getBody=function(){return this.body},u.prototype.sanitizeElements=function(){var t,e,i,o,a;for(a=n(this.body),o=[];a.nextNode();)switch(i=a.currentNode,i.nodeType){case Node.ELEMENT_NODE:h(i)?o.push(i):this.sanitizeElement(i);break;case Node.COMMENT_NODE:o.push(i)}for(t=0,e=o.length;e>t;t++)i=o[t],r.removeNode(i);return this.body},u.prototype.sanitizeElement=function(t){var e,n,r,i,o;for(t.hasAttribute("href")&&(i=t.protocol,a.call(this.forbiddenProtocols,i)>=0&&t.removeAttribute("href")),e=0,n=(o=s.call(t.attributes)).length;n>e;e++)r=o[e].name,a.call(this.allowedAttributes,r)>=0||0===r.indexOf("data-trix")||t.removeAttribute(r);return t},u.prototype.normalizeListElementNesting=function(){var t,n,r,i,o;for(t=0,n=(o=s.call(this.body.querySelectorAll("ul,ol"))).length;n>t;t++)(i=(r=o[t]).previousElementSibling)&&"li"===e(i)&&i.appendChild(r);return this.body},h=function(n){return(null!=n?n.nodeType:void 0)!==Node.ELEMENT_NODE||t(n)?void 0:"script"===e(n)||"false"===n.getAttribute("data-trix-serialize")},f=function(t){var e,n,r,i,o;for(null==t&&(t=""),t=t.replace(/<\/html[^>]*>[^]*$/i,"</html>"),(e=document.implementation.createHTMLDocument("")).documentElement.innerHTML=t,r=0,i=(o=e.head.querySelectorAll("style")).length;i>r;r++)n=o[r],e.body.appendChild(n);return e.body},u}(r.BasicObject)}.call(this),function(){var t,e,n,i,o,a,s,u,l,c,f,h=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty,d=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=r.arraysAreEqual,a=r.makeElement,c=r.tagName,o=r.getBlockTagNames,f=r.walkTree,i=r.findClosestElementFromNode,n=r.elementContainsNode,s=r.nodeIsAttachmentElement,u=r.normalizeSpaces,e=r.breakableWhitespacePattern,l=r.squishBreakableWhitespace,r.HTMLParser=function(p){function m(t,e){this.html=t,this.referenceElement=(null!=e?e:{}).referenceElement,this.blocks=[],this.blockElements=[],this.processedElements=[]}var g,y,v,b,_,A,w,x,E,O,S,P;return h(m,p),m.parse=function(t,e){var n;return(n=new this(t,e)).parse(),n},m.prototype.getDocument=function(){return r.Document.fromJSON(this.blocks)},m.prototype.parse=function(){var t,e;try{for(this.createHiddenContainer(),t=r.HTMLSanitizer.sanitize(this.html).getHTML(),this.containerElement.innerHTML=t,e=f(this.containerElement,{usingFilter:x});e.nextNode();)this.processNode(e.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}},m.prototype.createHiddenContainer=function(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=a({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))},m.prototype.removeHiddenContainer=function(){return r.removeNode(this.containerElement)},x=function(t){return"style"===c(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},m.prototype.processNode=function(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}},m.prototype.appendBlockForTextNode=function(e){var n,r,i;return(r=e.parentNode)===this.currentBlockElement||r!==this.containerElement&&!this.isBlockElement(r)?void 0:(n=this.getBlockAttributes(r),t(n,null!=(i=this.currentBlock)?i.attributes:void 0)?void 0:(this.currentBlock=this.appendBlockForAttributesWithElement(n,r),this.currentBlockElement=r))},m.prototype.appendBlockForElement=function(e){var r,i,o,a;if(o=this.isBlockElement(e),i=n(this.currentBlockElement,e),o&&!this.isBlockElement(e.firstChild)){if(!(this.isInsignificantTextNode(e.firstChild)&&this.isBlockElement(e.firstElementChild)||(r=this.getBlockAttributes(e),i&&t(r,this.currentBlock.attributes))))return this.currentBlock=this.appendBlockForAttributesWithElement(r,e),this.currentBlockElement=e}else if(this.currentBlockElement&&!i&&!o)return(a=this.findParentBlockElement(e))?this.appendBlockForElement(a):(this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null)},m.prototype.findParentBlockElement=function(t){var e;for(e=t.parentElement;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&d.call(this.blockElements,e)>=0)return e;e=e.parentElement}return null},m.prototype.processTextNode=function(t){var e,n;return n=t.data,y(t.parentNode)||(n=l(n),S(null!=(e=t.previousSibling)?e.textContent:void 0)&&(n=A(n))),this.appendStringWithAttributes(n,this.getTextAttributes(t.parentNode))},m.prototype.processElement=function(t){var e,n,r,i,o;if(s(t))return e=v(t),Object.keys(e).length&&(i=this.getTextAttributes(t),this.appendAttachmentWithAttributes(e,i),t.innerHTML=""),this.processedElements.push(t);switch(c(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes("\n",this.getTextAttributes(t)),this.processedElements.push(t);case"img":for(n in e={url:t.getAttribute("src"),contentType:"image"},r=_(t))o=r[n],e[n]=o;return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes("\n");break;case"td":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes(" | ")}},m.prototype.appendBlockForAttributesWithElement=function(t,e){var n;return this.blockElements.push(e),n=g(t),this.blocks.push(n),n},m.prototype.appendEmptyBlock=function(){return this.appendBlockForAttributesWithElement([],null)},m.prototype.appendStringWithAttributes=function(t,e){return this.appendPiece(O(t,e))},m.prototype.appendAttachmentWithAttributes=function(t,e){return this.appendPiece(E(t,e))},m.prototype.appendPiece=function(t){return 0===this.blocks.length&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)},m.prototype.appendStringToTextAtIndex=function(t,e){var n,r;return"string"===(null!=(n=(r=this.blocks[e].text)[r.length-1])?n.type:void 0)?n.string+=t:r.push(O(t))},m.prototype.prependStringToTextAtIndex=function(t,e){var n,r;return"string"===(null!=(n=(r=this.blocks[e].text)[0])?n.type:void 0)?n.string=t+n.string:r.unshift(O(t))},O=function(t,e){return null==e&&(e={}),"string",{string:t=u(t),attributes:e,type:"string"}},E=function(t,e){return null==e&&(e={}),"attachment",{attachment:t,attributes:e,type:"attachment"}},g=function(t){return null==t&&(t={}),{text:[],attributes:t}},m.prototype.getTextAttributes=function(t){var e,n,o,a,u,l,c,f,h,p,d,m,g;for(e in o={},p=r.config.textAttributes)if((u=p[e]).tagName&&i(t,{matchingSelector:u.tagName,untilNode:this.containerElement}))o[e]=!0;else if(u.parser){if(g=u.parser(t)){for(n=!1,l=0,h=(d=this.findBlockElementAncestors(t)).length;h>l;l++)if(a=d[l],u.parser(a)===g){n=!0;break}n||(o[e]=g)}}else u.styleProperty&&(g=t.style[u.styleProperty])&&(o[e]=g);if(s(t)&&(c=t.getAttribute("data-trix-attributes")))for(f in m=JSON.parse(c))g=m[f],o[f]=g;return o},m.prototype.getBlockAttributes=function(t){var e,n,i,o;for(n=[];t&&t!==this.containerElement;){for(e in o=r.config.blockAttributes)!1!==(i=o[e]).parse&&c(t)===i.tagName&&(("function"==typeof i.test?i.test(t):void 0)||!i.test)&&(n.push(e),i.listAttribute&&n.push(i.listAttribute));t=t.parentNode}return n.reverse()},m.prototype.findBlockElementAncestors=function(t){var e,n;for(e=[];t&&t!==this.containerElement;)n=c(t),d.call(o(),n)>=0&&e.push(t),t=t.parentNode;return e},v=function(t){return JSON.parse(t.getAttribute("data-trix-attachment"))},_=function(t){var e,n,r;return r=t.getAttribute("width"),n=t.getAttribute("height"),e={},r&&(e.width=parseInt(r,10)),n&&(e.height=parseInt(n,10)),e},m.prototype.isBlockElement=function(t){var e;if((null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE&&!s(t)&&!i(t,{matchingSelector:"td",untilNode:this.containerElement}))return e=c(t),d.call(o(),e)>=0||"block"===window.getComputedStyle(t).display},m.prototype.isInsignificantTextNode=function(t){var e,n,r;if((null!=t?t.nodeType:void 0)===Node.TEXT_NODE&&P(t.data)&&(n=t.parentNode,r=t.previousSibling,e=t.nextSibling,(!w(n.previousSibling)||this.isBlockElement(n.previousSibling))&&!y(n)))return!r||this.isBlockElement(r)||!e||this.isBlockElement(e)},m.prototype.isExtraBR=function(t){return"br"===c(t)&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t},y=function(t){var e;return"pre"===(e=window.getComputedStyle(t).whiteSpace)||"pre-wrap"===e||"pre-line"===e},w=function(t){return t&&!S(t.textContent)},m.prototype.translateBlockElementMarginsToNewlines=function(){var t,e,n,r,i,o,a;for(t=this.getMarginOfDefaultBlockElement(),a=[],n=e=0,r=(o=this.blocks).length;r>e;n=++e)o[n],(i=this.getMarginOfBlockElementAtIndex(n))&&(i.top>2*t.top&&this.prependStringToTextAtIndex("\n",n),a.push(i.bottom>2*t.bottom?this.appendStringToTextAtIndex("\n",n):void 0));return a},m.prototype.getMarginOfBlockElementAtIndex=function(t){var e,n;return!(e=this.blockElements[t])||!e.textContent||(n=c(e),d.call(o(),n)>=0||d.call(this.processedElements,e)>=0)?void 0:b(e)},m.prototype.getMarginOfDefaultBlockElement=function(){var t;return t=a(r.config.blockAttributes.default.tagName),this.containerElement.appendChild(t),b(t)},b=function(t){var e;return"block"===(e=window.getComputedStyle(t)).display?{top:parseInt(e.marginTop),bottom:parseInt(e.marginBottom)}:void 0},A=function(t){return t.replace(RegExp("^"+e.source+"+"),"")},P=function(t){return RegExp("^"+e.source+"*$").test(t)},S=function(t){return/\s$/.test(t)},m}(r.BasicObject)}.call(this),function(){var t,e,n,i,o=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty,s=[].slice,u=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=r.arraysAreEqual,n=r.normalizeRange,i=r.rangeIsCollapsed,e=r.getBlockConfig,r.Document=function(a){function l(t){null==t&&(t=[]),l.__super__.constructor.apply(this,arguments),0===t.length&&(t=[new r.Block]),this.blockList=r.SplittableList.box(t)}var c;return o(l,a),l.fromJSON=function(t){var e,n;return n=function(){var n,i,o;for(o=[],n=0,i=t.length;i>n;n++)e=t[n],o.push(r.Block.fromJSON(e));return o}(),new this(n)},l.fromHTML=function(t,e){return r.HTMLParser.parse(t,e).getDocument()},l.fromString=function(t,e){var n;return n=r.Text.textForStringWithAttributes(t,e),new this([new r.Block(n)])},l.prototype.isEmpty=function(){var t;return 1===this.blockList.length&&((t=this.getBlockAtIndex(0)).isEmpty()&&!t.hasAttributes())},l.prototype.copy=function(t){var e;return null==t&&(t={}),e=t.consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray(),new this.constructor(e)},l.prototype.copyUsingObjectsFromDocument=function(t){var e;return e=new r.ObjectMap(t.getObjects()),this.copyUsingObjectMap(e)},l.prototype.copyUsingObjectMap=function(t){var e,n,r;return n=function(){var n,i,o,a;for(a=[],n=0,i=(o=this.getBlocks()).length;i>n;n++)e=o[n],a.push((r=t.find(e))?r:e.copyUsingObjectMap(t));return a}.call(this),new this.constructor(n)},l.prototype.copyWithBaseBlockAttributes=function(t){var e,n,r;return null==t&&(t=[]),r=function(){var r,i,o,a;for(a=[],r=0,i=(o=this.getBlocks()).length;i>r;r++)n=o[r],e=t.concat(n.getAttributes()),a.push(n.copyWithAttributes(e));return a}.call(this),new this.constructor(r)},l.prototype.replaceBlock=function(t,e){var n;return-1===(n=this.blockList.indexOf(t))?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))},l.prototype.insertDocumentAtRange=function(t,e){var r,o,a,s,u,l,c;return o=t.blockList,u=(e=n(e))[0],a=(l=this.locationFromPosition(u)).index,s=l.offset,c=this,r=this.getBlockAtPosition(u),i(e)&&r.isEmpty()&&!r.hasAttributes()?c=new this.constructor(c.blockList.removeObjectAtIndex(a)):r.getBlockBreakPosition()===s&&u++,c=c.removeTextAtRange(e),new this.constructor(c.blockList.insertSplittableListAtPosition(o,u))},l.prototype.mergeDocumentAtRange=function(e,r){var i,o,a,s,u,l,c,f,h,p,d,m;return d=(r=n(r))[0],p=this.locationFromPosition(d),o=this.getBlockAtIndex(p.index).getAttributes(),i=e.getBaseBlockAttributes(),m=o.slice(-i.length),t(i,m)?(c=o.slice(0,-i.length),l=e.copyWithBaseBlockAttributes(c)):l=e.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(o),a=l.getBlockCount(),s=l.getBlockAtIndex(0),t(o,s.getAttributes())?(u=s.getTextWithoutBlockBreak(),h=this.insertTextAtRange(u,r),a>1&&(l=new this.constructor(l.getBlocks().slice(1)),f=d+u.getLength(),h=h.insertDocumentAtRange(l,f))):h=this.insertDocumentAtRange(l,r),h},l.prototype.insertTextAtRange=function(t,e){var r,i,o,a,s;return s=(e=n(e))[0],i=(a=this.locationFromPosition(s)).index,o=a.offset,r=this.removeTextAtRange(e),new this.constructor(r.blockList.editObjectAtIndex(i,(function(e){return e.copyWithText(e.text.insertTextAtPosition(t,o))})))},l.prototype.removeTextAtRange=function(t){var e,r,o,a,s,u,l,c,f,h,p,d,m,g,y,v,b,_;return c=(h=t=n(t))[0],v=h[1],i(t)?this:(u=(p=this.locationRangeFromRange(t))[0],g=p[1],s=u.index,l=u.offset,a=this.getBlockAtIndex(s),m=g.index,y=g.offset,d=this.getBlockAtIndex(m),v-c===1&&a.getBlockBreakPosition()===l&&d.getBlockBreakPosition()!==y&&"\n"===d.text.getStringAtPosition(y)?o=this.blockList.editObjectAtIndex(m,(function(t){return t.copyWithText(t.text.removeTextAtRange([y,y+1]))})):(f=a.text.getTextAtRange([0,l]),b=d.text.getTextAtRange([y,d.getLength()]),_=f.appendText(b),r=s!==m&&0===l&&a.getAttributeLevel()>=d.getAttributeLevel()?d.copyWithText(_):a.copyWithText(_),e=m+1-s,o=this.blockList.splice(s,e,r)),new this.constructor(o))},l.prototype.moveTextFromRangeToPosition=function(t,e){var r,i,o,a,u,l,c,f,h,p;return h=(l=t=n(t))[0],o=l[1],e>=h&&o>=e?this:(i=this.getDocumentAtRange(t),f=this.removeTextAtRange(t),(u=e>h)&&(e-=i.getLength()),a=(c=i.getBlocks())[0],0===(r=2<=c.length?s.call(c,1):[]).length?(p=a.getTextWithoutBlockBreak(),u&&(e+=1)):p=a.text,f=f.insertTextAtRange(p,e),0===r.length?f:(i=new this.constructor(r),e+=p.getLength(),f.insertDocumentAtRange(i,e)))},l.prototype.addAttributeAtRange=function(t,n,r){var i;return i=this.blockList,this.eachBlockAtRange(r,(function(r,o,a){return i=i.editObjectAtIndex(a,(function(){return e(t)?r.addAttribute(t,n):o[0]===o[1]?r:r.copyWithText(r.text.addAttributeAtRange(t,n,o))}))})),new this.constructor(i)},l.prototype.addAttribute=function(t,e){var n;return n=this.blockList,this.eachBlock((function(r,i){return n=n.editObjectAtIndex(i,(function(){return r.addAttribute(t,e)}))})),new this.constructor(n)},l.prototype.removeAttributeAtRange=function(t,n){var r;return r=this.blockList,this.eachBlockAtRange(n,(function(n,i,o){return e(t)?r=r.editObjectAtIndex(o,(function(){return n.removeAttribute(t)})):i[0]!==i[1]?r=r.editObjectAtIndex(o,(function(){return n.copyWithText(n.text.removeAttributeAtRange(t,i))})):void 0})),new this.constructor(r)},l.prototype.updateAttributesForAttachment=function(t,e){var n,r,i;return r=this.getRangeOfAttachment(e)[0],n=this.locationFromPosition(r).index,i=this.getTextAtIndex(n),new this.constructor(this.blockList.editObjectAtIndex(n,(function(n){return n.copyWithText(i.updateAttributesForAttachment(t,e))})))},l.prototype.removeAttributeForAttachment=function(t,e){var n;return n=this.getRangeOfAttachment(e),this.removeAttributeAtRange(t,n)},l.prototype.insertBlockBreakAtRange=function(t){var e,i,o,a;return a=(t=n(t))[0],o=this.locationFromPosition(a).offset,i=this.removeTextAtRange(t),0===o&&(e=[new r.Block]),new this.constructor(i.blockList.insertSplittableListAtPosition(new r.SplittableList(e),a))},l.prototype.applyBlockAttributeAtRange=function(t,n,r){var i,o,a,s;return o=(a=this.expandRangeToLineBreaksAndSplitBlocks(r)).document,r=a.range,(i=e(t)).listAttribute?(s=(o=o.removeLastListAttributeAtRange(r,{exceptAttributeName:t})).convertLineBreaksToBlockBreaksInRange(r),o=s.document,r=s.range):o=i.exclusive?o.removeBlockAttributesAtRange(r):i.terminal?o.removeLastTerminalAttributeAtRange(r):o.consolidateBlocksAtRange(r),o.addAttributeAtRange(t,n,r)},l.prototype.removeLastListAttributeAtRange=function(t,n){var r;return null==n&&(n={}),r=this.blockList,this.eachBlockAtRange(t,(function(t,i,o){var a;if((a=t.getLastAttribute())&&e(a).listAttribute&&a!==n.exceptAttributeName)return r=r.editObjectAtIndex(o,(function(){return t.removeAttribute(a)}))})),new this.constructor(r)},l.prototype.removeLastTerminalAttributeAtRange=function(t){var n;return n=this.blockList,this.eachBlockAtRange(t,(function(t,r,i){var o;if((o=t.getLastAttribute())&&e(o).terminal)return n=n.editObjectAtIndex(i,(function(){return t.removeAttribute(o)}))})),new this.constructor(n)},l.prototype.removeBlockAttributesAtRange=function(t){var e;return e=this.blockList,this.eachBlockAtRange(t,(function(t,n,r){return t.hasAttributes()?e=e.editObjectAtIndex(r,(function(){return t.copyWithoutAttributes()})):void 0})),new this.constructor(e)},l.prototype.expandRangeToLineBreaksAndSplitBlocks=function(t){var e,r,i,o,a,s,u,l,c;return c=(s=t=n(t))[0],o=s[1],l=this.locationFromPosition(c),i=this.locationFromPosition(o),u=(e=this).getBlockAtIndex(l.index),null!=(l.offset=u.findLineBreakInDirectionFromPosition("backward",l.offset))&&(a=e.positionFromLocation(l),e=e.insertBlockBreakAtRange([a,a+1]),i.index+=1,i.offset-=e.getBlockAtIndex(l.index).getLength(),l.index+=1),l.offset=0,0===i.offset&&i.index>l.index?(i.index-=1,i.offset=e.getBlockAtIndex(i.index).getBlockBreakPosition()):("\n"===(r=e.getBlockAtIndex(i.index)).text.getStringAtRange([i.offset-1,i.offset])?i.offset-=1:i.offset=r.findLineBreakInDirectionFromPosition("forward",i.offset),i.offset!==r.getBlockBreakPosition()&&(a=e.positionFromLocation(i),e=e.insertBlockBreakAtRange([a,a+1]))),c=e.positionFromLocation(l),o=e.positionFromLocation(i),{document:e,range:t=n([c,o])}},l.prototype.convertLineBreaksToBlockBreaksInRange=function(t){var e,r,i;return r=(t=n(t))[0],i=this.getStringAtRange(t).slice(0,-1),e=this,i.replace(/.*?\n/g,(function(t){return r+=t.length,e=e.insertBlockBreakAtRange([r-1,r])})),{document:e,range:t}},l.prototype.consolidateBlocksAtRange=function(t){var e,r,i,o,a;return a=(i=t=n(t))[0],r=i[1],o=this.locationFromPosition(a).index,e=this.locationFromPosition(r).index,new this.constructor(this.blockList.consolidateFromIndexToIndex(o,e))},l.prototype.getDocumentAtRange=function(t){var e;return t=n(t),e=this.blockList.getSplittableListInRange(t).toArray(),new this.constructor(e)},l.prototype.getStringAtRange=function(t){var e,r;return(r=t=n(t))[r.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)},l.prototype.getBlockAtIndex=function(t){return this.blockList.getObjectAtIndex(t)},l.prototype.getBlockAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getBlockAtIndex(e)},l.prototype.getTextAtIndex=function(t){var e;return null!=(e=this.getBlockAtIndex(t))?e.text:void 0},l.prototype.getTextAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getTextAtIndex(e)},l.prototype.getPieceAtPosition=function(t){var e,n,r;return e=(r=this.locationFromPosition(t)).index,n=r.offset,this.getTextAtIndex(e).getPieceAtPosition(n)},l.prototype.getCharacterAtPosition=function(t){var e,n,r;return e=(r=this.locationFromPosition(t)).index,n=r.offset,this.getTextAtIndex(e).getStringAtRange([n,n+1])},l.prototype.getLength=function(){return this.blockList.getEndPosition()},l.prototype.getBlocks=function(){return this.blockList.toArray()},l.prototype.getBlockCount=function(){return this.blockList.length},l.prototype.getEditCount=function(){return this.editCount},l.prototype.eachBlock=function(t){return this.blockList.eachObject(t)},l.prototype.eachBlockAtRange=function(t,e){var r,i,o,a,s,u,l,c,f,h,p,d;if(p=(u=t=n(t))[0],o=u[1],h=this.locationFromPosition(p),i=this.locationFromPosition(o),h.index===i.index)return r=this.getBlockAtIndex(h.index),d=[h.offset,i.offset],e(r,d,h.index);for(f=[],s=a=l=h.index,c=i.index;c>=l?c>=a:a>=c;s=c>=l?++a:--a)(r=this.getBlockAtIndex(s))?(d=function(){switch(s){case h.index:return[h.offset,r.text.getLength()];case i.index:return[0,i.offset];default:return[0,r.text.getLength()]}}(),f.push(e(r,d,s))):f.push(void 0);return f},l.prototype.getCommonAttributesAtRange=function(t){var e,o,a;return o=(t=n(t))[0],i(t)?this.getCommonAttributesAtPosition(o):(a=[],e=[],this.eachBlockAtRange(t,(function(t,n){return n[0]!==n[1]?(a.push(t.text.getCommonAttributesAtRange(n)),e.push(c(t))):void 0})),r.Hash.fromCommonAttributesOfObjects(a).merge(r.Hash.fromCommonAttributesOfObjects(e)).toObject())},l.prototype.getCommonAttributesAtPosition=function(t){var e,n,i,o,a,s,l,f,h,p;if(a=(h=this.locationFromPosition(t)).index,f=h.offset,!(i=this.getBlockAtIndex(a)))return{};for(l in o=c(i),e=i.text.getAttributesAtPosition(f),n=i.text.getAttributesAtPosition(f-1),s=function(){var t,e;for(l in e=[],t=r.config.textAttributes)(p=t[l]).inheritable&&e.push(l);return e}(),n)((p=n[l])===e[l]||u.call(s,l)>=0)&&(o[l]=p);return o},l.prototype.getRangeOfCommonAttributeAtPosition=function(t,e){var r,i,o,a,s,u,l,c;return o=(s=this.locationFromPosition(e)).index,a=s.offset,c=(u=this.getTextAtIndex(o).getExpandedRangeForAttributeAtOffset(t,a))[0],i=u[1],l=this.positionFromLocation({index:o,offset:c}),r=this.positionFromLocation({index:o,offset:i}),n([l,r])},l.prototype.getBaseBlockAttributes=function(){var t,e,n,r,i,o,a;for(t=this.getBlockAtIndex(0).getAttributes(),n=r=1,a=this.getBlockCount();a>=1?a>r:r>a;n=a>=1?++r:--r)e=this.getBlockAtIndex(n).getAttributes(),o=Math.min(t.length,e.length),t=function(){var n,r,a;for(a=[],i=n=0,r=o;(r>=0?r>n:n>r)&&e[i]===t[i];i=r>=0?++n:--n)a.push(e[i]);return a}();return t},c=function(t){var e,n;return n={},(e=t.getLastAttribute())&&(n[e]=!0),n},l.prototype.getAttachmentById=function(t){var e,n,r,i;for(n=0,r=(i=this.getAttachments()).length;r>n;n++)if((e=i[n]).id===t)return e},l.prototype.getAttachmentPieces=function(){var t;return t=[],this.blockList.eachObject((function(e){var n;return n=e.text,t=t.concat(n.getAttachmentPieces())})),t},l.prototype.getAttachments=function(){var t,e,n,r,i;for(i=[],t=0,e=(r=this.getAttachmentPieces()).length;e>t;t++)n=r[t],i.push(n.attachment);return i},l.prototype.getRangeOfAttachment=function(t){var e,r,i,o,a,s,u;for(o=0,r=e=0,i=(a=this.blockList.toArray()).length;i>e;r=++e){if(u=(s=a[r].text).getRangeOfAttachment(t))return n([o+u[0],o+u[1]]);o+=s.getLength()}},l.prototype.getLocationRangeOfAttachment=function(t){var e;return e=this.getRangeOfAttachment(t),this.locationRangeFromRange(e)},l.prototype.getAttachmentPieceForAttachment=function(t){var e,n,r,i;for(e=0,n=(i=this.getAttachmentPieces()).length;n>e;e++)if((r=i[e]).attachment===t)return r},l.prototype.findRangesForBlockAttribute=function(t){var e,n,r,i,o,a,s;for(o=0,a=[],n=0,r=(s=this.getBlocks()).length;r>n;n++)i=(e=s[n]).getLength(),e.hasAttribute(t)&&a.push([o,o+i]),o+=i;return a},l.prototype.findRangesForTextAttribute=function(t,e){var n,r,i,o,a,s,u,l,c,f;for(f=(null!=e?e:{}).withValue,s=0,u=[],l=[],o=function(e){return null!=f?e.getAttribute(t)===f:e.hasAttribute(t)},n=0,r=(c=this.getPieces()).length;r>n;n++)i=(a=c[n]).getLength(),o(a)&&(u[1]===s?u[1]=s+i:l.push(u=[s,s+i])),s+=i;return l},l.prototype.locationFromPosition=function(t){var e,n;return null!=(n=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t))).index?n:{index:(e=this.getBlocks()).length-1,offset:e[e.length-1].getLength()}},l.prototype.positionFromLocation=function(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)},l.prototype.locationRangeFromPosition=function(t){return n(this.locationFromPosition(t))},l.prototype.locationRangeFromRange=function(t){var e,r,i,o;if(t=n(t))return o=t[0],r=t[1],i=this.locationFromPosition(o),e=this.locationFromPosition(r),n([i,e])},l.prototype.rangeFromLocationRange=function(t){var e,r;return t=n(t),e=this.positionFromLocation(t[0]),i(t)||(r=this.positionFromLocation(t[1])),n([e,r])},l.prototype.isEqualTo=function(t){return this.blockList.isEqualTo(null!=t?t.blockList:void 0)},l.prototype.getTexts=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.getBlocks()).length;n>e;e++)t=r[e],i.push(t.text);return i},l.prototype.getPieces=function(){var t,e,n,r,i;for(n=[],t=0,e=(r=this.getTexts()).length;e>t;t++)i=r[t],n.push.apply(n,i.getPieces());return n},l.prototype.getObjects=function(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())},l.prototype.toSerializableDocument=function(){var t;return t=[],this.blockList.eachObject((function(e){return t.push(e.copyWithText(e.text.toSerializableText()))})),new this.constructor(t)},l.prototype.toString=function(){return this.blockList.toString()},l.prototype.toJSON=function(){return this.blockList.toJSON()},l.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,r,i;for(i=[],e=0,n=(r=this.blockList.toArray()).length;n>e;e++)t=r[e],i.push(JSON.parse(t.text.toConsole()));return i}.call(this))},l}(r.Object)}.call(this),function(){r.LineBreakInsertion=function(){function t(t){var e;this.composition=t,this.document=this.composition.document,e=this.composition.getSelectedRange(),this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}return t.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?0!==this.startLocation.offset:this.breaksOnReturn&&"\n"!==this.nextCharacter},t.prototype.shouldBreakFormattedBlock=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&"\n"===this.nextCharacter||"\n"===this.previousCharacter)},t.prototype.shouldDecreaseListLevel=function(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()},t.prototype.shouldPrependListItem=function(){return this.block.isListItem()&&0===this.startLocation.offset&&!this.block.isEmpty()},t.prototype.shouldRemoveLastBlockAttribute=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()},t}()}.call(this),function(){var t,e,n,i,o,a,s,u,l,c,f=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=r.normalizeRange,l=r.rangesAreEqual,u=r.rangeIsCollapsed,s=r.objectsAreEqual,t=r.arrayStartsWith,c=r.summarizeArrayChange,n=r.getAllAttributeNames,i=r.getBlockConfig,o=r.getTextConfig,e=r.extend,r.Composition=function(h){function p(){this.document=new r.Document,this.attachments=[],this.currentAttributes={},this.revision=0}return f(p,h),p.prototype.setDocument=function(t){var e;return t.isEqualTo(this.document)?void 0:(this.document=t,this.refreshAttachments(),this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeDocument?e.compositionDidChangeDocument(t):void 0)},p.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.getSelectedRange()}},p.prototype.loadSnapshot=function(t){var e,n,i,o;return e=t.document,o=t.selectedRange,null!=(n=this.delegate)&&"function"==typeof n.compositionWillLoadSnapshot&&n.compositionWillLoadSnapshot(),this.setDocument(null!=e?e:new r.Document),this.setSelection(null!=o?o:[0,0]),null!=(i=this.delegate)&&"function"==typeof i.compositionDidLoadSnapshot?i.compositionDidLoadSnapshot():void 0},p.prototype.insertText=function(t,e){var n,r,i,o;return o=(null!=e?e:{updatePosition:!0}).updatePosition,r=this.getSelectedRange(),this.setDocument(this.document.insertTextAtRange(t,r)),n=(i=r[0])+t.getLength(),o&&this.setSelection(n),this.notifyDelegateOfInsertionAtRange([i,n])},p.prototype.insertBlock=function(t){var e;return null==t&&(t=new r.Block),e=new r.Document([t]),this.insertDocument(e)},p.prototype.insertDocument=function(t){var e,n,i;return null==t&&(t=new r.Document),n=this.getSelectedRange(),this.setDocument(this.document.insertDocumentAtRange(t,n)),e=(i=n[0])+t.getLength(),this.setSelection(e),this.notifyDelegateOfInsertionAtRange([i,e])},p.prototype.insertString=function(t,e){var n,i;return n=this.getCurrentTextAttributes(),i=r.Text.textForStringWithAttributes(t,n),this.insertText(i,e)},p.prototype.insertBlockBreak=function(){var t,e,n;return e=this.getSelectedRange(),this.setDocument(this.document.insertBlockBreakAtRange(e)),t=(n=e[0])+1,this.setSelection(t),this.notifyDelegateOfInsertionAtRange([n,t])},p.prototype.insertLineBreak=function(){var t,e;return(e=new r.LineBreakInsertion(this)).shouldDecreaseListLevel()?(this.decreaseListLevel(),this.setSelection(e.startPosition)):e.shouldPrependListItem()?(t=new r.Document([e.block.copyWithoutText()]),this.insertDocument(t)):e.shouldInsertBlockBreak()?this.insertBlockBreak():e.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():e.shouldBreakFormattedBlock()?this.breakFormattedBlock(e):this.insertString("\n")},p.prototype.insertHTML=function(t){var e,n,i,o;return e=r.Document.fromHTML(t),i=this.getSelectedRange(),this.setDocument(this.document.mergeDocumentAtRange(e,i)),n=(o=i[0])+e.getLength()-1,this.setSelection(n),this.notifyDelegateOfInsertionAtRange([o,n])},p.prototype.replaceHTML=function(t){var e,n,i;return e=r.Document.fromHTML(t).copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),i=this.document.rangeFromLocationRange(n),this.setDocument(e),this.setSelection(i)},p.prototype.insertFile=function(t){return this.insertFiles([t])},p.prototype.insertFiles=function(t){var e,n,i,o,a,s;for(n=[],o=0,a=t.length;a>o;o++)i=t[o],(null!=(s=this.delegate)?s.compositionShouldAcceptFile(i):void 0)&&(e=r.Attachment.attachmentForFile(i),n.push(e));return this.insertAttachments(n)},p.prototype.insertAttachment=function(t){return this.insertAttachments([t])},p.prototype.insertAttachments=function(t){var e,n,i,o,a,s,u,l,c;for(l=new r.Text,o=0,a=t.length;a>o;o++)c=(e=t[o]).getType(),s=null!=(u=r.config.attachments[c])?u.presentation:void 0,i=this.getCurrentTextAttributes(),s&&(i.presentation=s),n=r.Text.textForAttachmentWithAttributes(e,i),l=l.appendText(n);return this.insertText(l)},p.prototype.shouldManageDeletingInDirection=function(t){var e;if(e=this.getLocationRange(),u(e)){if("backward"===t&&0===e[0].offset)return!0;if(this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1},p.prototype.deleteInDirection=function(t,e){var n,r,i,o,a,s,l,c;return o=(null!=e?e:{}).length,a=this.getLocationRange(),s=this.getSelectedRange(),(l=u(s))?i="backward"===t&&0===a[0].offset:c=a[0].index!==a[1].index,!(i&&this.canDecreaseBlockAttributeLevel()&&(r=this.getBlock(),r.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(s[0]),r.isEmpty()))&&(l&&(s=this.getExpandedRangeInDirection(t,{length:o}),"backward"===t&&(n=this.getAttachmentAtRange(s))),n?(this.editAttachment(n),!1):(this.setDocument(this.document.removeTextAtRange(s)),this.setSelection(s[0]),!i&&!c&&void 0))},p.prototype.moveTextFromRange=function(t){var e;return e=this.getSelectedRange()[0],this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)},p.prototype.removeAttachment=function(t){var e;return(e=this.document.getRangeOfAttachment(t))?(this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])):void 0},p.prototype.removeLastBlockAttribute=function(){var t,e,n,r;return r=(n=this.getSelectedRange())[0],e=n[1],t=this.document.getBlockAtPosition(e),this.removeCurrentAttribute(t.getLastAttribute()),this.setSelection(r)}," ",p.prototype.insertPlaceholder=function(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")},p.prototype.selectPlaceholder=function(){return null!=this.placeholderPosition?(this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+" ".length]),this.getSelectedRange()):void 0},p.prototype.forgetPlaceholder=function(){return this.placeholderPosition=null},p.prototype.hasCurrentAttribute=function(t){var e;return null!=(e=this.currentAttributes[t])&&!1!==e},p.prototype.toggleCurrentAttribute=function(t){var e;return(e=!this.currentAttributes[t])?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)},p.prototype.canSetCurrentAttribute=function(t){return i(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)},p.prototype.canSetCurrentTextAttribute=function(){var t,e,n,r;if(t=this.getSelectedDocument()){for(e=0,n=(r=t.getAttachments()).length;n>e;e++)if(!r[e].hasContent())return!1;return!0}},p.prototype.canSetCurrentBlockAttribute=function(){var t;if(t=this.getBlock())return!t.isTerminalBlock()},p.prototype.setCurrentAttribute=function(t,e){return i(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())},p.prototype.setTextAttribute=function(t,e){var n,i;if(n=this.getSelectedRange())return n[0]!==n[1]?this.setDocument(this.document.addAttributeAtRange(t,e,n)):"href"===t?(i=r.Text.textForStringWithAttributes(e,{href:e}),this.insertText(i)):void 0},p.prototype.setBlockAttribute=function(t,e){var n;if(n=this.getSelectedRange())return this.canSetCurrentAttribute(t)?(this.getBlock(),this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)):void 0},p.prototype.removeCurrentAttribute=function(t){return i(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())},p.prototype.removeTextAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},p.prototype.removeBlockAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},p.prototype.canDecreaseNestingLevel=function(){var t;return(null!=(t=this.getBlock())?t.getNestingLevel():void 0)>0},p.prototype.canIncreaseNestingLevel=function(){var e,n,r;if(e=this.getBlock())return null!=(r=i(e.getLastNestableAttribute()))&&r.listAttribute?(n=this.getPreviousBlock())?t(n.getListItemAttributes(),e.getListItemAttributes()):void 0:e.getNestingLevel()>0},p.prototype.decreaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))},p.prototype.increaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))},p.prototype.canDecreaseBlockAttributeLevel=function(){var t;return(null!=(t=this.getBlock())?t.getAttributeLevel():void 0)>0},p.prototype.decreaseBlockAttributeLevel=function(){var t,e;return(t=null!=(e=this.getBlock())?e.getLastAttribute():void 0)?this.removeCurrentAttribute(t):void 0},p.prototype.decreaseListLevel=function(){var t,e,n,r,i,o;for(o=this.getSelectedRange()[0],n=i=this.document.locationFromPosition(o).index,t=this.getBlock().getAttributeLevel();(e=this.document.getBlockAtIndex(n+1))&&e.isListItem()&&e.getAttributeLevel()>t;)n++;return o=this.document.positionFromLocation({index:i,offset:0}),r=this.document.positionFromLocation({index:n,offset:0}),this.setDocument(this.document.removeLastListAttributeAtRange([o,r]))},p.prototype.updateCurrentAttributes=function(){var t,e,r,i,o,a;if(a=this.getSelectedRange({ignoreLock:!0})){for(e=this.document.getCommonAttributesAtRange(a),r=0,i=(o=n()).length;i>r;r++)e[t=o[r]]||this.canSetCurrentAttribute(t)||(e[t]=!1);if(!s(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}},p.prototype.getCurrentAttributes=function(){return e.call({},this.currentAttributes)},p.prototype.getCurrentTextAttributes=function(){var t,e,n,r;for(e in t={},n=this.currentAttributes)!1!==(r=n[e])&&o(e)&&(t[e]=r);return t},p.prototype.freezeSelection=function(){return this.setCurrentAttribute("frozen",!0)},p.prototype.thawSelection=function(){return this.removeCurrentAttribute("frozen")},p.prototype.hasFrozenSelection=function(){return this.hasCurrentAttribute("frozen")},p.proxyMethod("getSelectionManager().getPointRange"),p.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),p.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),p.proxyMethod("getSelectionManager().locationIsCursorTarget"),p.proxyMethod("getSelectionManager().selectionIsExpanded"),p.proxyMethod("delegate?.getSelectionManager"),p.prototype.setSelection=function(t){var e,n;return e=this.document.locationRangeFromRange(t),null!=(n=this.delegate)?n.compositionDidRequestChangingSelectionToLocationRange(e):void 0},p.prototype.getSelectedRange=function(){var t;return(t=this.getLocationRange())?this.document.rangeFromLocationRange(t):void 0},p.prototype.setSelectedRange=function(t){var e;return e=this.document.locationRangeFromRange(t),this.getSelectionManager().setLocationRange(e)},p.prototype.getPosition=function(){var t;return(t=this.getLocationRange())?this.document.positionFromLocation(t[0]):void 0},p.prototype.getLocationRange=function(t){var e,n;return null!=(e=null!=(n=this.targetLocationRange)?n:this.getSelectionManager().getLocationRange(t))?e:a({index:0,offset:0})},p.prototype.withTargetLocationRange=function(t,e){var n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n},p.prototype.withTargetRange=function(t,e){var n;return n=this.document.locationRangeFromRange(t),this.withTargetLocationRange(n,e)},p.prototype.withTargetDOMRange=function(t,e){var n;return n=this.createLocationRangeFromDOMRange(t,{strict:!1}),this.withTargetLocationRange(n,e)},p.prototype.getExpandedRangeInDirection=function(t,e){var n,r,i,o;return r=(null!=e?e:{}).length,o=(i=this.getSelectedRange())[0],n=i[1],"backward"===t?r?o-=r:o=this.translateUTF16PositionFromOffset(o,-1):r?n+=r:n=this.translateUTF16PositionFromOffset(n,1),a([o,n])},p.prototype.shouldManageMovingCursorInDirection=function(t){var e;return!!this.editingAttachment||(e=this.getExpandedRangeInDirection(t),null!=this.getAttachmentAtRange(e))},p.prototype.moveCursorInDirection=function(t){var e,n,r,i;return this.editingAttachment?r=this.document.getRangeOfAttachment(this.editingAttachment):(i=this.getSelectedRange(),r=this.getExpandedRangeInDirection(t),n=!l(i,r)),this.setSelectedRange("backward"===t?r[0]:r[1]),n&&(e=this.getAttachmentAtRange(r))?this.editAttachment(e):void 0},p.prototype.expandSelectionInDirection=function(t,e){var n,r;return n=(null!=e?e:{}).length,r=this.getExpandedRangeInDirection(t,{length:n}),this.setSelectedRange(r)},p.prototype.expandSelectionForEditing=function(){return this.hasCurrentAttribute("href")?this.expandSelectionAroundCommonAttribute("href"):void 0},p.prototype.expandSelectionAroundCommonAttribute=function(t){var e,n;return e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e),this.setSelectedRange(n)},p.prototype.selectionContainsAttachments=function(){var t;return(null!=(t=this.getSelectedAttachments())?t.length:void 0)>0},p.prototype.selectionIsInCursorTarget=function(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())},p.prototype.positionIsCursorTarget=function(t){var e;return(e=this.document.locationFromPosition(t))?this.locationIsCursorTarget(e):void 0},p.prototype.positionIsBlockBreak=function(t){var e;return null!=(e=this.document.getPieceAtPosition(t))?e.isBlockBreak():void 0},p.prototype.getSelectedDocument=function(){var t;return(t=this.getSelectedRange())?this.document.getDocumentAtRange(t):void 0},p.prototype.getSelectedAttachments=function(){var t;return null!=(t=this.getSelectedDocument())?t.getAttachments():void 0},p.prototype.getAttachments=function(){return this.attachments.slice(0)},p.prototype.refreshAttachments=function(){var t,e,n,r,i,o,a,s,u,l,f,h;for(n=this.document.getAttachments(),t=(s=c(this.attachments,n)).added,f=s.removed,this.attachments=n,r=0,o=f.length;o>r;r++)(e=f[r]).delegate=null,null!=(u=this.delegate)&&"function"==typeof u.compositionDidRemoveAttachment&&u.compositionDidRemoveAttachment(e);for(h=[],i=0,a=t.length;a>i;i++)(e=t[i]).delegate=this,h.push(null!=(l=this.delegate)&&"function"==typeof l.compositionDidAddAttachment?l.compositionDidAddAttachment(e):void 0);return h},p.prototype.attachmentDidChangeAttributes=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidEditAttachment?e.compositionDidEditAttachment(t):void 0},p.prototype.attachmentDidChangePreviewURL=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeAttachmentPreviewURL?e.compositionDidChangeAttachmentPreviewURL(t):void 0},p.prototype.editAttachment=function(t,e){var n;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,null!=(n=this.delegate)&&"function"==typeof n.compositionDidStartEditingAttachment?n.compositionDidStartEditingAttachment(this.editingAttachment,e):void 0},p.prototype.stopEditingAttachment=function(){var t;if(this.editingAttachment)return null!=(t=this.delegate)&&"function"==typeof t.compositionDidStopEditingAttachment&&t.compositionDidStopEditingAttachment(this.editingAttachment),this.editingAttachment=null},p.prototype.updateAttributesForAttachment=function(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))},p.prototype.removeAttributeForAttachment=function(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))},p.prototype.breakFormattedBlock=function(t){var e,n,i,o,a;return n=t.document,e=t.block,a=[(o=t.startPosition)-1,o],e.getBlockBreakPosition()===t.startLocation.offset?(e.breaksOnReturn()&&"\n"===t.nextCharacter?o+=1:n=n.removeTextAtRange(a),a=[o,o]):"\n"===t.nextCharacter?"\n"===t.previousCharacter?a=[o-1,o+1]:(a=[o,o+1],o+=1):t.startLocation.offset-1!==0&&(o+=1),i=new r.Document([e.removeLastAttribute().copyWithoutText()]),this.setDocument(n.insertDocumentAtRange(i,a)),this.setSelection(o)},p.prototype.getPreviousBlock=function(){var t,e;return(e=this.getLocationRange())&&(t=e[0].index)>0?this.document.getBlockAtIndex(t-1):void 0},p.prototype.getBlock=function(){var t;return(t=this.getLocationRange())?this.document.getBlockAtIndex(t[0].index):void 0},p.prototype.getAttachmentAtRange=function(t){var e;return(e=this.document.getDocumentAtRange(t)).toString()===r.OBJECT_REPLACEMENT_CHARACTER+"\n"?e.getAttachments()[0]:void 0},p.prototype.notifyDelegateOfCurrentAttributesChange=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.compositionDidChangeCurrentAttributes?t.compositionDidChangeCurrentAttributes(this.currentAttributes):void 0},p.prototype.notifyDelegateOfInsertionAtRange=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionDidPerformInsertionAtRange?e.compositionDidPerformInsertionAtRange(t):void 0},p.prototype.translateUTF16PositionFromOffset=function(t,e){var n,r;return n=(r=this.document.toUTF16String()).offsetFromUCS2Offset(t),r.offsetToUCS2Offset(n+e)},p}(r.BasicObject)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.UndoManager=function(e){function n(t){this.composition=t,this.undoEntries=[],this.redoEntries=[]}var r;return t(n,e),n.prototype.recordUndoEntry=function(t,e){var n,i,o,a,s;return i=(a=null!=e?e:{}).context,n=a.consolidatable,o=this.undoEntries.slice(-1)[0],n&&r(o,t,i)?void 0:(s=this.createEntry({description:t,context:i}),this.undoEntries.push(s),this.redoEntries=[])},n.prototype.undo=function(){var t,e;return(e=this.undoEntries.pop())?(t=this.createEntry(e),this.redoEntries.push(t),this.composition.loadSnapshot(e.snapshot)):void 0},n.prototype.redo=function(){var t,e;return(t=this.redoEntries.pop())?(e=this.createEntry(t),this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)):void 0},n.prototype.canUndo=function(){return this.undoEntries.length>0},n.prototype.canRedo=function(){return this.redoEntries.length>0},n.prototype.createEntry=function(t){var e,n,r;return n=(r=null!=t?t:{}).description,e=r.context,{description:null!=n?n.toString():void 0,context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}},r=function(t,e,n){return(null!=t?t.description:void 0)===(null!=e?e.toString():void 0)&&(null!=t?t.context:void 0)===JSON.stringify(n)},n}(r.BasicObject)}.call(this),function(){var t;r.attachmentGalleryFilter=function(e){var n;return(n=new t(e)).perform(),n.getSnapshot()},t=function(){function t(t){this.document=t.document,this.selectedRange=t.selectedRange}var e;return e="attachmentGallery","presentation","gallery",t.prototype.perform=function(){return this.removeBlockAttribute(),this.applyBlockAttribute()},t.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.selectedRange}},t.prototype.removeBlockAttribute=function(){var t,n,r,i,o;for(o=[],t=0,n=(i=this.findRangesOfBlocks()).length;n>t;t++)r=i[t],o.push(this.document=this.document.removeAttributeAtRange(e,r));return o},t.prototype.applyBlockAttribute=function(){var t,n,r,i,o,a;for(r=0,a=[],t=0,n=(o=this.findRangesOfPieces()).length;n>t;t++)(i=o[t])[1]-i[0]>1&&(i[0]+=r,i[1]+=r,"\n"!==this.document.getCharacterAtPosition(i[1])&&(this.document=this.document.insertBlockBreakAtRange(i[1]),i[1]<this.selectedRange[1]&&this.moveSelectedRangeForward(),i[1]++,r++),0!==i[0]&&"\n"!==this.document.getCharacterAtPosition(i[0]-1)&&(this.document=this.document.insertBlockBreakAtRange(i[0]),i[0]<this.selectedRange[0]&&this.moveSelectedRangeForward(),i[0]++,r++),a.push(this.document=this.document.applyBlockAttributeAtRange(e,!0,i)));return a},t.prototype.findRangesOfBlocks=function(){return this.document.findRangesForBlockAttribute(e)},t.prototype.findRangesOfPieces=function(){return this.document.findRangesForTextAttribute("presentation",{withValue:"gallery"})},t.prototype.moveSelectedRangeForward=function(){return this.selectedRange[0]+=1,this.selectedRange[1]+=1},t}()}.call(this),function(){r.Editor=function(){function t(t,n,i){this.composition=t,this.selectionManager=n,this.element=i,this.insertFiles=function(t,e){return function(){return t.apply(e,arguments)}}(this.insertFiles,this),this.undoManager=new r.UndoManager(this.composition),this.filters=e.slice(0)}var e;return e=[r.attachmentGalleryFilter],t.prototype.loadDocument=function(t){return this.loadSnapshot({document:t,selectedRange:[0,0]})},t.prototype.loadHTML=function(t){return null==t&&(t=""),this.loadDocument(r.Document.fromHTML(t,{referenceElement:this.element}))},t.prototype.loadJSON=function(t){var e,n;return e=t.document,n=t.selectedRange,e=r.Document.fromJSON(e),this.loadSnapshot({document:e,selectedRange:n})},t.prototype.loadSnapshot=function(t){return this.undoManager=new r.UndoManager(this.composition),this.composition.loadSnapshot(t)},t.prototype.getDocument=function(){return this.composition.document},t.prototype.getSelectedDocument=function(){return this.composition.getSelectedDocument()},t.prototype.getSnapshot=function(){return this.composition.getSnapshot()},t.prototype.toJSON=function(){return this.getSnapshot()},t.prototype.deleteInDirection=function(t){return this.composition.deleteInDirection(t)},t.prototype.insertAttachment=function(t){return this.composition.insertAttachment(t)},t.prototype.insertAttachments=function(t){return this.composition.insertAttachments(t)},t.prototype.insertDocument=function(t){return this.composition.insertDocument(t)},t.prototype.insertFile=function(t){return this.composition.insertFile(t)},t.prototype.insertFiles=function(t){return this.composition.insertFiles(t)},t.prototype.insertHTML=function(t){return this.composition.insertHTML(t)},t.prototype.insertString=function(t){return this.composition.insertString(t)},t.prototype.insertText=function(t){return this.composition.insertText(t)},t.prototype.insertLineBreak=function(){return this.composition.insertLineBreak()},t.prototype.getSelectedRange=function(){return this.composition.getSelectedRange()},t.prototype.getPosition=function(){return this.composition.getPosition()},t.prototype.getClientRectAtPosition=function(t){var e;return e=this.getDocument().locationRangeFromRange([t,t+1]),this.selectionManager.getClientRectAtLocationRange(e)},t.prototype.expandSelectionInDirection=function(t){return this.composition.expandSelectionInDirection(t)},t.prototype.moveCursorInDirection=function(t){return this.composition.moveCursorInDirection(t)},t.prototype.setSelectedRange=function(t){return this.composition.setSelectedRange(t)},t.prototype.activateAttribute=function(t,e){return null==e&&(e=!0),this.composition.setCurrentAttribute(t,e)},t.prototype.attributeIsActive=function(t){return this.composition.hasCurrentAttribute(t)},t.prototype.canActivateAttribute=function(t){return this.composition.canSetCurrentAttribute(t)},t.prototype.deactivateAttribute=function(t){return this.composition.removeCurrentAttribute(t)},t.prototype.canDecreaseNestingLevel=function(){return this.composition.canDecreaseNestingLevel()},t.prototype.canIncreaseNestingLevel=function(){return this.composition.canIncreaseNestingLevel()},t.prototype.decreaseNestingLevel=function(){return this.canDecreaseNestingLevel()?this.composition.decreaseNestingLevel():void 0},t.prototype.increaseNestingLevel=function(){return this.canIncreaseNestingLevel()?this.composition.increaseNestingLevel():void 0},t.prototype.canRedo=function(){return this.undoManager.canRedo()},t.prototype.canUndo=function(){return this.undoManager.canUndo()},t.prototype.recordUndoEntry=function(t,e){var n,r,i;return r=(i=null!=e?e:{}).context,n=i.consolidatable,this.undoManager.recordUndoEntry(t,{context:r,consolidatable:n})},t.prototype.redo=function(){return this.canRedo()?this.undoManager.redo():void 0},t.prototype.undo=function(){return this.canUndo()?this.undoManager.undo():void 0},t}()}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.ManagedAttachment=function(e){function n(t,e){var n;this.attachmentManager=t,this.attachment=e,n=this.attachment,this.id=n.id,this.file=n.file}return t(n,e),n.prototype.remove=function(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)},n.proxyMethod("attachment.getAttribute"),n.proxyMethod("attachment.hasAttribute"),n.proxyMethod("attachment.setAttribute"),n.proxyMethod("attachment.getAttributes"),n.proxyMethod("attachment.setAttributes"),n.proxyMethod("attachment.isPending"),n.proxyMethod("attachment.isPreviewable"),n.proxyMethod("attachment.getURL"),n.proxyMethod("attachment.getHref"),n.proxyMethod("attachment.getFilename"),n.proxyMethod("attachment.getFilesize"),n.proxyMethod("attachment.getFormattedFilesize"),n.proxyMethod("attachment.getExtension"),n.proxyMethod("attachment.getContentType"),n.proxyMethod("attachment.getFile"),n.proxyMethod("attachment.setFile"),n.proxyMethod("attachment.releaseFile"),n.proxyMethod("attachment.getUploadProgress"),n.proxyMethod("attachment.setUploadProgress"),n}(r.BasicObject)}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;r.AttachmentManager=function(e){function n(t){var e,n,r;for(null==t&&(t=[]),this.managedAttachments={},n=0,r=t.length;r>n;n++)e=t[n],this.manageAttachment(e)}return t(n,e),n.prototype.getAttachments=function(){var t,e,n,r;for(e in r=[],n=this.managedAttachments)t=n[e],r.push(t);return r},n.prototype.manageAttachment=function(t){var e,n;return null!=(e=this.managedAttachments)[n=t.id]?e[n]:e[n]=new r.ManagedAttachment(this,t)},n.prototype.attachmentIsManaged=function(t){return t.id in this.managedAttachments},n.prototype.requestRemovalOfAttachment=function(t){var e;return this.attachmentIsManaged(t)&&null!=(e=this.delegate)&&"function"==typeof e.attachmentManagerDidRequestRemovalOfAttachment?e.attachmentManagerDidRequestRemovalOfAttachment(t):void 0},n.prototype.unmanageAttachment=function(t){var e;return e=this.managedAttachments[t.id],delete this.managedAttachments[t.id],e},n}(r.BasicObject)}.call(this),function(){var t,e,n,i,o,a,s,u,l,c,f;t=r.elementContainsNode,e=r.findChildIndexOfNode,o=r.nodeIsBlockStart,a=r.nodeIsBlockStartComment,i=r.nodeIsBlockContainer,s=r.nodeIsCursorTarget,u=r.nodeIsEmptyTextNode,l=r.nodeIsTextNode,n=r.nodeIsAttachmentElement,c=r.tagName,f=r.walkTree,r.LocationMapper=function(){function r(t){this.element=t}var h,p,d,m;return r.prototype.findLocationFromContainerAndOffset=function(n,r,i){var a,u,c,h,m,g,y;for(g=(null!=i?i:{strict:!0}).strict,u=0,c=!1,h={index:0,offset:0},(a=this.findAttachmentElementParentForNode(n))&&(n=a.parentNode,r=e(a)),y=f(this.element,{usingFilter:d});y.nextNode();){if((m=y.currentNode)===n&&l(n)){s(m)||(h.offset+=r);break}if(m.parentNode===n){if(u++===r)break}else if(!t(n,m)&&u>0)break;o(m,{strict:g})?(c&&h.index++,h.offset=0,c=!0):h.offset+=p(m)}return h},r.prototype.findContainerAndOffsetFromLocation=function(t){var n,r,a,u,c;if(0===t.index&&0===t.offset){for(n=this.element,u=0;n.firstChild;)if(n=n.firstChild,i(n)){u=1;break}return[n,u]}if(r=(c=this.findNodeAndOffsetFromLocation(t))[0],a=c[1],r){if(l(r))0===p(r)?(n=r.parentNode.parentNode,u=e(r.parentNode),s(r,{name:"right"})&&u++):(n=r,u=t.offset-a);else{if(n=r.parentNode,!o(r.previousSibling)&&!i(n))for(;r===n.lastChild&&(r=n,n=n.parentNode,!i(n)););u=e(r),0!==t.offset&&u++}return[n,u]}},r.prototype.findNodeAndOffsetFromLocation=function(t){var e,n,r,i,o,a,u,c;for(u=0,n=0,r=(c=this.getSignificantNodesForIndex(t.index)).length;r>n;n++){if(e=c[n],i=p(e),t.offset<=u+i)if(l(e)){if(o=e,a=u,t.offset===a&&s(o))break}else o||(o=e,a=u);if((u+=i)>t.offset)break}return[o,a]},r.prototype.findAttachmentElementParentForNode=function(t){for(;t&&t!==this.element;){if(n(t))return t;t=t.parentNode}},r.prototype.getSignificantNodesForIndex=function(t){var e,n,r,i,o;for(r=[],o=f(this.element,{usingFilter:h}),i=!1;o.nextNode();)if(n=o.currentNode,a(n)){if("undefined"!=typeof e&&null!==e?e++:e=0,e===t)i=!0;else if(i)break}else i&&r.push(n);return r},p=function(t){return t.nodeType===Node.TEXT_NODE?s(t)?0:t.textContent.length:"br"===c(t)||n(t)?1:0},h=function(t){return m(t)===NodeFilter.FILTER_ACCEPT?d(t):NodeFilter.FILTER_REJECT},m=function(t){return u(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},d=function(t){return n(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},r}()}.call(this),function(){var t,e,n=[].slice;t=r.getDOMRange,e=r.setDOMRange,r.PointMapper=function(){function r(){}return r.prototype.createDOMRangeFromPoint=function(n){var r,i,o,a,s,u,l,c;if(l=n.x,c=n.y,document.caretPositionFromPoint)return o=(s=document.caretPositionFromPoint(l,c)).offsetNode,i=s.offset,(r=document.createRange()).setStart(o,i),r;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(l,c);if(document.body.createTextRange){a=t();try{(u=document.body.createTextRange()).moveToPoint(l,c),u.select()}catch(f){}return r=t(),e(a),r}},r.prototype.getClientRectsForDOMRange=function(t){var e;return[(e=n.call(t.getClientRects()))[0],e[e.length-1]]},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=r.getDOMRange,r.SelectionChangeObserver=function(r){function i(){this.run=e(this.run,this),this.update=e(this.update,this),this.selectionManagers=[]}var a;return n(i,r),i.prototype.start=function(){return this.started?void 0:(this.started=!0,"onselectionchange"in document?document.addEventListener("selectionchange",this.update,!0):this.run())},i.prototype.stop=function(){return this.started?(this.started=!1,document.removeEventListener("selectionchange",this.update,!0)):void 0},i.prototype.registerSelectionManager=function(t){return o.call(this.selectionManagers,t)<0?(this.selectionManagers.push(t),this.start()):void 0},i.prototype.unregisterSelectionManager=function(t){var e;return this.selectionManagers=function(){var n,r,i,o;for(o=[],n=0,r=(i=this.selectionManagers).length;r>n;n++)(e=i[n])!==t&&o.push(e);return o}.call(this),0===this.selectionManagers.length?this.stop():void 0},i.prototype.notifySelectionManagersOfSelectionChange=function(){var t,e,n,r,i;for(r=[],t=0,e=(n=this.selectionManagers).length;e>t;t++)i=n[t],r.push(i.selectionDidChange());return r},i.prototype.update=function(){var e;return e=t(),a(e,this.domRange)?void 0:(this.domRange=e,this.notifySelectionManagersOfSelectionChange())},i.prototype.reset=function(){return this.domRange=null,this.update()},i.prototype.run=function(){return this.started?(this.update(),requestAnimationFrame(this.run)):void 0},a=function(t,e){return(null!=t?t.startContainer:void 0)===(null!=e?e.startContainer:void 0)&&(null!=t?t.startOffset:void 0)===(null!=e?e.startOffset:void 0)&&(null!=t?t.endContainer:void 0)===(null!=e?e.endContainer:void 0)&&(null!=t?t.endOffset:void 0)===(null!=e?e.endOffset:void 0)},i}(r.BasicObject),null==r.selectionChangeObserver&&(r.selectionChangeObserver=new r.SelectionChangeObserver)}.call(this),function(){var t,e,n,i,o,a,s,u,l,c,f=function(t,e){return function(){return t.apply(e,arguments)}},h=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;n=r.getDOMSelection,e=r.getDOMRange,c=r.setDOMRange,t=r.elementContainsNode,a=r.nodeIsCursorTarget,o=r.innerElementIsActive,i=r.handleEvent,s=r.normalizeRange,u=r.rangeIsCollapsed,l=r.rangesAreEqual,r.SelectionManager=function(p){function d(t){this.element=t,this.selectionDidChange=f(this.selectionDidChange,this),this.didMouseDown=f(this.didMouseDown,this),this.locationMapper=new r.LocationMapper(this.element),this.pointMapper=new r.PointMapper,this.lockCount=0,i("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}return h(d,p),d.prototype.getLocationRange=function(t){var n;return null==t&&(t={}),!1===t.strict?this.createLocationRangeFromDOMRange(e(),{strict:!1}):t.ignoreLock?this.currentLocationRange:null!=(n=this.lockedLocationRange)?n:this.currentLocationRange},d.prototype.setLocationRange=function(t){var e;if(!this.lockedLocationRange)return t=s(t),(e=this.createDOMRangeFromLocationRange(t))?(c(e),this.updateCurrentLocationRange(t)):void 0},d.prototype.setLocationRangeFromPointRange=function(t){var e,n;return t=s(t),n=this.getLocationAtPoint(t[0]),e=this.getLocationAtPoint(t[1]),this.setLocationRange([n,e])},d.prototype.getClientRectAtLocationRange=function(t){var e;return(e=this.createDOMRangeFromLocationRange(t))?this.getClientRectsForDOMRange(e)[1]:void 0},d.prototype.locationIsCursorTarget=function(t){var e,n;return e=(n=this.findNodeAndOffsetFromLocation(t))[0],n[1],a(e)},d.prototype.lock=function(){return 0===this.lockCount++?(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange()):void 0},d.prototype.unlock=function(){var t;return 0===--this.lockCount&&(t=this.lockedLocationRange,this.lockedLocationRange=null,null!=t)?this.setLocationRange(t):void 0},d.prototype.clearSelection=function(){var t;return null!=(t=n())?t.removeAllRanges():void 0},d.prototype.selectionIsCollapsed=function(){var t;return!0===(null!=(t=e())?t.collapsed:void 0)},d.prototype.selectionIsExpanded=function(){return!this.selectionIsCollapsed()},d.prototype.createLocationRangeFromDOMRange=function(t,e){var n,r;if(null!=t&&this.domRangeWithinElement(t)&&(r=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e)))return t.collapsed||(n=this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e)),s([r,n])},d.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),d.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),d.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),d.proxyMethod("pointMapper.createDOMRangeFromPoint"),d.proxyMethod("pointMapper.getClientRectsForDOMRange"),d.prototype.didMouseDown=function(){return this.pauseTemporarily()},d.prototype.pauseTemporarily=function(){var e,n,r,o;return this.paused=!0,n=function(e){return function(){var n,i;for(e.paused=!1,clearTimeout(o),n=0,i=r.length;i>n;n++)r[n].destroy();return t(document,e.element)?e.selectionDidChange():void 0}}(this),o=setTimeout(n,200),r=function(){var t,r,o,a;for(a=[],t=0,r=(o=["mousemove","keydown"]).length;r>t;t++)e=o[t],a.push(i(e,{onElement:document,withCallback:n}));return a}()},d.prototype.selectionDidChange=function(){return this.paused||o(this.element)?void 0:this.updateCurrentLocationRange()},d.prototype.updateCurrentLocationRange=function(t){var n;return(null!=t?t:t=this.createLocationRangeFromDOMRange(e()))&&!l(t,this.currentLocationRange)?(this.currentLocationRange=t,null!=(n=this.delegate)&&"function"==typeof n.locationRangeDidChange?n.locationRangeDidChange(this.currentLocationRange.slice(0)):void 0):void 0},d.prototype.createDOMRangeFromLocationRange=function(t){var e,n,r,i;return r=this.findContainerAndOffsetFromLocation(t[0]),n=u(t)?r:null!=(i=this.findContainerAndOffsetFromLocation(t[1]))?i:r,null!=r&&null!=n?((e=document.createRange()).setStart.apply(e,r),e.setEnd.apply(e,n),e):void 0},d.prototype.getLocationAtPoint=function(t){var e,n;return(e=this.createDOMRangeFromPoint(t))&&null!=(n=this.createLocationRangeFromDOMRange(e))?n[0]:void 0},d.prototype.domRangeWithinElement=function(e){return e.collapsed?t(this.element,e.startContainer):t(this.element,e.startContainer)&&t(this.element,e.endContainer)},d}(r.BasicObject)}.call(this),function(){var t,e,n,i,o=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty,s=[].slice;n=r.rangeIsCollapsed,i=r.rangesAreEqual,e=r.objectsAreEqual,t=r.getBlockConfig,r.EditorController=function(a){function u(t){var e,n;this.editorElement=t.editorElement,e=t.document,n=t.html,this.selectionManager=new r.SelectionManager(this.editorElement),this.selectionManager.delegate=this,this.composition=new r.Composition,this.composition.delegate=this,this.attachmentManager=new r.AttachmentManager(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=new(r["Level"+r.config.input.getLevel()+"InputController"])(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new r.CompositionController(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new r.ToolbarController(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new r.Editor(this.composition,this.selectionManager,this.editorElement),null!=e?this.editor.loadDocument(e):this.editor.loadHTML(n)}var l;return o(u,a),u.prototype.registerSelectionManager=function(){return r.selectionChangeObserver.registerSelectionManager(this.selectionManager)},u.prototype.unregisterSelectionManager=function(){return r.selectionChangeObserver.unregisterSelectionManager(this.selectionManager)},u.prototype.render=function(){return this.compositionController.render()},u.prototype.reparse=function(){return this.composition.replaceHTML(this.editorElement.innerHTML)},u.prototype.compositionDidChangeDocument=function(){return this.notifyEditorElement("document-change"),this.handlingInput?void 0:this.render()},u.prototype.compositionDidChangeCurrentAttributes=function(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})},u.prototype.compositionDidPerformInsertionAtRange=function(t){return this.pasting?this.pastedRange=t:void 0},u.prototype.compositionShouldAcceptFile=function(t){return this.notifyEditorElement("file-accept",{file:t})},u.prototype.compositionDidAddAttachment=function(t){var e;return e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-add",{attachment:e})},u.prototype.compositionDidEditAttachment=function(t){var e;return this.compositionController.rerenderViewForObject(t),e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")},u.prototype.compositionDidChangeAttachmentPreviewURL=function(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")},u.prototype.compositionDidRemoveAttachment=function(t){var e;return e=this.attachmentManager.unmanageAttachment(t),this.notifyEditorElement("attachment-remove",{attachment:e})},u.prototype.compositionDidStartEditingAttachment=function(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)},u.prototype.compositionDidStopEditingAttachment=function(){return this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null},u.prototype.compositionDidRequestChangingSelectionToLocationRange=function(t){return!this.loadingSnapshot||this.isFocused()?(this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()):void 0},u.prototype.compositionWillLoadSnapshot=function(){return this.loadingSnapshot=!0},u.prototype.compositionDidLoadSnapshot=function(){return this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1},u.prototype.getSelectionManager=function(){return this.selectionManager},u.proxyMethod("getSelectionManager().setLocationRange"),u.proxyMethod("getSelectionManager().getLocationRange"),u.prototype.attachmentManagerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},u.prototype.compositionControllerWillSyncDocumentView=function(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()},u.prototype.compositionControllerDidSyncDocumentView=function(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")},u.prototype.compositionControllerDidRender=function(){return null!=this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision},u.prototype.compositionControllerDidFocus=function(){return this.toolbarController.hideDialog(),this.notifyEditorElement("focus")},u.prototype.compositionControllerDidBlur=function(){return this.notifyEditorElement("blur")},u.prototype.compositionControllerDidSelectAttachment=function(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)},u.prototype.compositionControllerDidRequestDeselectingAttachment=function(t){var e,n;return e=null!=(n=this.attachmentLocationRange)?n:this.composition.document.getLocationRangeOfAttachment(t),this.selectionManager.setLocationRange(e[1])},u.prototype.compositionControllerWillUpdateAttachment=function(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})},u.prototype.compositionControllerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},u.prototype.inputControllerWillHandleInput=function(){return this.handlingInput=!0,this.requestedRender=!1},u.prototype.inputControllerDidRequestRender=function(){return this.requestedRender=!0},u.prototype.inputControllerDidHandleInput=function(){return this.handlingInput=!1,this.requestedRender?(this.requestedRender=!1,this.render()):void 0},u.prototype.inputControllerDidAllowUnhandledInput=function(){return this.notifyEditorElement("change")},u.prototype.inputControllerDidRequestReparse=function(){return this.reparse()},u.prototype.inputControllerWillPerformTyping=function(){return this.recordTypingUndoEntry()},u.prototype.inputControllerWillPerformFormatting=function(t){return this.recordFormattingUndoEntry(t)},u.prototype.inputControllerWillCutText=function(){return this.editor.recordUndoEntry("Cut")},u.prototype.inputControllerWillPaste=function(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})},u.prototype.inputControllerDidPaste=function(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})},u.prototype.inputControllerWillMoveText=function(){return this.editor.recordUndoEntry("Move")},u.prototype.inputControllerWillAttachFiles=function(){return this.editor.recordUndoEntry("Drop Files")},u.prototype.inputControllerWillPerformUndo=function(){return this.editor.undo()},u.prototype.inputControllerWillPerformRedo=function(){return this.editor.redo()},u.prototype.inputControllerDidReceiveKeyboardCommand=function(t){return this.toolbarController.applyKeyboardCommand(t)},u.prototype.inputControllerDidStartDrag=function(){return this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()},u.prototype.inputControllerDidReceiveDragOverPoint=function(t){return this.selectionManager.setLocationRangeFromPointRange(t)},u.prototype.inputControllerDidCancelDrag=function(){return this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null},u.prototype.locationRangeDidChange=function(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!i(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")},u.prototype.toolbarDidClickButton=function(){return this.getLocationRange()?void 0:this.setLocationRange({index:0,offset:0})},u.prototype.toolbarDidInvokeAction=function(t){return this.invokeAction(t)},u.prototype.toolbarDidToggleAttribute=function(t){return this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarDidUpdateAttribute=function(t,e){return this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarDidRemoveAttribute=function(t){return this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarWillShowDialog=function(){return this.composition.expandSelectionForEditing(),this.freezeSelection()},u.prototype.toolbarDidShowDialog=function(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})},u.prototype.toolbarDidHideDialog=function(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})},u.prototype.freezeSelection=function(){return this.selectionFrozen?void 0:(this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render())},u.prototype.thawSelection=function(){return this.selectionFrozen?(this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()):void 0},u.prototype.actions={undo:{test:function(){return this.editor.canUndo()},perform:function(){return this.editor.undo()}},redo:{test:function(){return this.editor.canRedo()},perform:function(){return this.editor.redo()}},link:{test:function(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:function(){return!0},perform:function(){return r.config.input.pickFiles(this.editor.insertFiles)}}},u.prototype.canInvokeAction=function(t){var e,n;return!!this.actionIsExternal(t)||!!(null!=(e=this.actions[t])&&null!=(n=e.test)?n.call(this):void 0)},u.prototype.invokeAction=function(t){var e,n;return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t}):null!=(e=this.actions[t])&&null!=(n=e.perform)?n.call(this):void 0},u.prototype.actionIsExternal=function(t){return/^x-./.test(t)},u.prototype.getCurrentActions=function(){var t,e;for(t in e={},this.actions)e[t]=this.canInvokeAction(t);return e},u.prototype.updateCurrentActions=function(){var t;return t=this.getCurrentActions(),e(t,this.currentActions)?void 0:(this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions}))},u.prototype.runEditorFilters=function(){var t,e,n,r,i,o,a,s;for(s=this.composition.getSnapshot(),n=0,r=(i=this.editor.filters).length;r>n;n++)e=i[n],t=s.document,a=s.selectedRange,null==(s=null!=(o=e.call(this.editor,s))?o:{}).document&&(s.document=t),null==s.selectedRange&&(s.selectedRange=a);return l(s,this.composition.getSnapshot())?void 0:this.composition.loadSnapshot(s)},l=function(t,e){return i(t.selectedRange,e.selectedRange)&&t.document.isEqualTo(e.document)},u.prototype.updateInputElement=function(){var t,e;return t=this.compositionController.getSerializableElement(),e=r.serializeToContentType(t,"text/html"),this.editorElement.setInputElementValue(e)},u.prototype.notifyEditorElement=function(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,e)},u.prototype.removeAttachment=function(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()},u.prototype.recordFormattingUndoEntry=function(e){var r,i;return r=t(e),i=this.selectionManager.getLocationRange(),r||!n(i)?this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0}):void 0},u.prototype.recordTypingUndoEntry=function(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})},u.prototype.getUndoContext=function(){var t;return t=1<=arguments.length?s.call(arguments,0):[],[this.getLocationContext(),this.getTimeContext()].concat(s.call(t))},u.prototype.getLocationContext=function(){var t;return t=this.selectionManager.getLocationRange(),n(t)?t[0].index:t},u.prototype.getTimeContext=function(){return r.config.undoInterval>0?Math.floor((new Date).getTime()/r.config.undoInterval):0},u.prototype.isFocused=function(){var t;return this.editorElement===(null!=(t=this.editorElement.ownerDocument)?t.activeElement:void 0)},u}(r.Controller)}.call(this),function(){var t,e,n,i,o,a,s,u,l,c,f,h,p,d;e=r.browser,o=r.makeElement,a=r.triggerEvent,n=r.handleEvent,i=r.handleEventOnce,t=r.AttachmentView.attachmentSelector,r.registerElement("trix-editor",(h=0,u=function(t){return!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t?t.focus():void 0},p=function(t){return t.hasAttribute("contenteditable")?void 0:(t.setAttribute("contenteditable",""),i("focus",{onElement:t,withCallback:function(){return l(t)}}))},s=function(t){return t.hasAttribute("role")?void 0:t.setAttribute("role","textbox")},l=function(t){return f(t),d(t)},f=function(t){return("function"==typeof document.queryCommandSupported?document.queryCommandSupported("enableObjectResizing"):void 0)?(document.execCommand("enableObjectResizing",!1,!1),n("mscontrolselect",{onElement:t,preventDefault:!0})):void 0},d=function(){var t;return!("function"==typeof document.queryCommandSupported?document.queryCommandSupported("DefaultParagraphSeparator"):void 0)||"div"!==(t=r.config.blockAttributes.default.tagName)&&"p"!==t?void 0:document.execCommand("DefaultParagraphSeparator",!1,t)},c=e.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"},{defaultCSS:"%t {\n  display: block;\n}\n\n%t:empty:not(:focus)::before {\n  content: attr(placeholder);\n  color: graytext;\n  cursor: text;\n}\n\n%t a[contenteditable=false] {\n  cursor: text;\n}\n\n%t img {\n  max-width: 100%;\n  height: auto;\n}\n\n%t "+t+" figcaption textarea {\n  resize: none;\n}\n\n%t "+t+" figcaption textarea.trix-autoresize-clone {\n  position: absolute;\n  left: -9999px;\n  max-height: 0px;\n}\n\n%t "+t+" figcaption[data-trix-placeholder]:empty::before {\n  content: attr(data-trix-placeholder);\n  color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n  display: "+c.display+" !important;\n  width: "+c.width+" !important;\n  padding: 0 !important;\n  margin: 0 !important;\n  border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n  vertical-align: top !important;\n  margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n  vertical-align: bottom !important;\n  margin-right: -1px !important;\n}",trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++h),this.trixId)}},toolbarElement:{get:function(){var t,e,n;return this.hasAttribute("toolbar")?null!=(e=this.ownerDocument)?e.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(n="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",n),t=o("trix-toolbar",{id:n}),this.parentNode.insertBefore(t,this),t):void 0}},inputElement:{get:function(){var t,e,n;return this.hasAttribute("input")?null!=(n=this.ownerDocument)?n.getElementById(this.getAttribute("input")):void 0:this.parentNode?(e="trix-input-"+this.trixId,this.setAttribute("input",e),t=o("input",{type:"hidden",id:e}),this.parentNode.insertBefore(t,this.nextElementSibling),t):void 0}},editor:{get:function(){var t;return null!=(t=this.editorController)?t.editor:void 0}},name:{get:function(){var t;return null!=(t=this.inputElement)?t.name:void 0}},value:{get:function(){var t;return null!=(t=this.inputElement)?t.value:void 0},set:function(t){var e;return this.defaultValue=t,null!=(e=this.editor)?e.loadHTML(this.defaultValue):void 0}},notify:function(t,e){return this.editorController?a("trix-"+t,{onElement:this,attributes:e}):void 0},setInputElementValue:function(t){var e;return null!=(e=this.inputElement)?e.value=t:void 0},initialize:function(){return p(this),s(this)},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(a("trix-before-initialize",{onElement:this}),this.editorController=new r.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(t){return function(){return a("trix-initialize",{onElement:t})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),u(this))},disconnect:function(){var t;return null!=(t=this.editorController)&&t.unregisterSelectionManager(),this.unregisterResetListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},resetBubbled:function(t){var e;return t.target!==(null!=(e=this.inputElement)?e.form:void 0)||t.defaultPrevented?void 0:this.reset()},reset:function(){return this.value=this.defaultValue}}))}.call(this),function(){}.call(this)}).call(this),t.exports?t.exports=r:void 0===(o="function"===typeof(i=r)?i.call(e,n,e,t):i)||(t.exports=o)}.call(this)}).call(this,n(330).setImmediate)},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return g})),n.d(e,"Autocomplete",(function(){return g}));var r=n(11);function i(t){return function(t){if(Array.isArray(t))return o(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)return;if("string"===typeof t)return o(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 o(t,e)}(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.")}()}function o(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 a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function s(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d(t);if(e){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var m="[role='option']:not([aria-disabled])",g=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(s,t);var e,n,r,o=h(s);function s(){var t;l(this,s);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=o.call.apply(o,[this].concat(n))).onKeydown=function(e){var n=t["on".concat(e.key,"Keydown")];n&&n(e)},t.onEscapeKeydown=function(e){t.resultsShown&&(t.hideAndRemoveOptions(),e.stopPropagation(),e.preventDefault())},t.onArrowDownKeydown=function(e){var n=t.sibling(!0);n&&t.select(n),e.preventDefault()},t.onArrowUpKeydown=function(e){var n=t.sibling(!1);n&&t.select(n),e.preventDefault()},t.onTabKeydown=function(e){var n=t.selectedOption;n&&t.commit(n)},t.onEnterKeydown=function(e){var n=t.selectedOption;n&&t.resultsShown&&(t.commit(n),t.hasSubmitOnEnterValue||e.preventDefault())},t.onInputBlur=function(){t.mouseDown||t.close()},t.onResultsClick=function(e){if(e.target instanceof Element){var n=e.target.closest(m);n&&t.commit(n)}},t.onResultsMouseDown=function(){t.mouseDown=!0,t.resultsTarget.addEventListener("mouseup",(function(){t.mouseDown=!1}),{once:!0})},t.onInputChange=function(){t.element.removeAttribute("value"),t.hasHiddenTarget&&(t.hiddenTarget.value="");var e=t.inputTarget.value.trim();e&&e.length>=t.minLengthValue?t.fetchResults(e):t.hideAndRemoveOptions()},t.fetchResults=function(){var e=u(a().mark((function e(n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.hasUrlValue){e.next=2;break}return e.abrupt("return");case 2:return r=t.buildURL(n),e.prev=3,t.element.dispatchEvent(new CustomEvent("loadstart")),e.next=7,t.doFetch(r);case 7:i=e.sent,t.replaceResults(i),t.element.dispatchEvent(new CustomEvent("load")),t.element.dispatchEvent(new CustomEvent("loadend")),e.next=18;break;case 13:throw e.prev=13,e.t0=e.catch(3),t.element.dispatchEvent(new CustomEvent("error")),t.element.dispatchEvent(new CustomEvent("loadend")),e.t0;case 18:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t){return e.apply(this,arguments)}}(),t.doFetch=function(){var e=u(a().mark((function e(n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(n,t.optionsForFetch());case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=s,(n=[{key:"connect",value:function(){this.close(),this.inputTarget.hasAttribute("autocomplete")||this.inputTarget.setAttribute("autocomplete","off"),this.inputTarget.setAttribute("spellcheck","false"),this.mouseDown=!1,this.onInputChange=y(this.onInputChange,this.delayValue),this.inputTarget.addEventListener("keydown",this.onKeydown),this.inputTarget.addEventListener("blur",this.onInputBlur),this.inputTarget.addEventListener("input",this.onInputChange),this.resultsTarget.addEventListener("mousedown",this.onResultsMouseDown),this.resultsTarget.addEventListener("click",this.onResultsClick),this.inputTarget.hasAttribute("autofocus")&&this.inputTarget.focus(),this.readyValue=!0}},{key:"disconnect",value:function(){this.hasInputTarget&&(this.inputTarget.removeEventListener("keydown",this.onKeydown),this.inputTarget.removeEventListener("blur",this.onInputBlur),this.inputTarget.removeEventListener("input",this.onInputChange)),this.hasResultsTarget&&(this.resultsTarget.removeEventListener("mousedown",this.onResultsMouseDown),this.resultsTarget.removeEventListener("click",this.onResultsClick))}},{key:"sibling",value:function(t){var e=this.options,n=this.selectedOption,r=e.indexOf(n),i=t?e[r+1]:e[r-1],o=t?e[0]:e[e.length-1];return i||o}},{key:"select",value:function(t){var e,n,r=this.selectedOption;r&&(r.removeAttribute("aria-selected"),(n=r.classList).remove.apply(n,i(this.selectedClassesOrDefault))),t.setAttribute("aria-selected","true"),(e=t.classList).add.apply(e,i(this.selectedClassesOrDefault)),this.inputTarget.setAttribute("aria-activedescendant",t.id),t.scrollIntoView({behavior:"smooth",block:"nearest"})}},{key:"commit",value:function(t){if("true"!==t.getAttribute("aria-disabled")){if(t instanceof HTMLAnchorElement)return t.click(),void this.close();var e=t.getAttribute("data-autocomplete-label")||t.textContent.trim(),n=t.getAttribute("data-autocomplete-value")||e;this.inputTarget.value=e,this.hasHiddenTarget?(this.hiddenTarget.value=n,this.hiddenTarget.dispatchEvent(new Event("input")),this.hiddenTarget.dispatchEvent(new Event("change"))):this.inputTarget.value=n,this.inputTarget.focus(),this.hideAndRemoveOptions(),this.element.dispatchEvent(new CustomEvent("autocomplete.change",{bubbles:!0,detail:{value:n,textValue:e,selected:t}}))}}},{key:"clear",value:function(){this.inputTarget.value="",this.hasHiddenTarget&&(this.hiddenTarget.value="")}},{key:"identifyOptions",value:function(){var t=this.resultsTarget.id||"stimulus-autocomplete";this.resultsTarget.querySelectorAll("".concat(m,":not([id])")).forEach((function(e){return e.id="".concat(t,"-option-").concat(s.uniqOptionId++)}))}},{key:"hideAndRemoveOptions",value:function(){this.close(),this.resultsTarget.innerHTML=null}},{key:"buildURL",value:function(t){var e=new URL(this.urlValue,window.location.href),n=new URLSearchParams(e.search.slice(1));return n.append("q",t),n.append("collection_type",this.collectionTypeValue),e.search=n.toString(),e.toString()}},{key:"replaceResults",value:function(t){this.resultsTarget.innerHTML=t,this.identifyOptions(),this.options?this.open():this.close()}},{key:"open",value:function(){this.resultsShown||(this.resultsShown=!0,this.element.setAttribute("aria-expanded","true"),this.element.dispatchEvent(new CustomEvent("toggle",{detail:{action:"open",inputTarget:this.inputTarget,resultsTarget:this.resultsTarget}})))}},{key:"close",value:function(){this.resultsShown&&(this.resultsShown=!1,this.inputTarget.removeAttribute("aria-activedescendant"),this.element.setAttribute("aria-expanded","false"),this.element.dispatchEvent(new CustomEvent("toggle",{detail:{action:"close",inputTarget:this.inputTarget,resultsTarget:this.resultsTarget}})))}},{key:"resultsShown",get:function(){return!this.resultsTarget.hidden},set:function(t){this.resultsTarget.hidden=!t}},{key:"options",get:function(){return Array.from(this.resultsTarget.querySelectorAll(m))}},{key:"selectedOption",get:function(){return this.resultsTarget.querySelector("[aria-selected='true']")}},{key:"selectedClassesOrDefault",get:function(){return this.hasSelectedClass?this.selectedClasses:["active"]}},{key:"optionsForFetch",value:function(){return{headers:{"X-Requested-With":"XMLHttpRequest"}}}}])&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(r.b);g.targets=["input","hidden","results"],g.classes=["selected"],g.values={ready:Boolean,submitOnEnter:Boolean,url:String,collectionType:String,minLength:Number,delay:{type:Number,default:300}},g.uniqOptionId=0;var y=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;return function(){clearTimeout(n),n=setTimeout(t,e)}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"initialize",value:function(){this.element.onkeypress=function(t){13==(t.charCode||t.keyCode||0)&&t.preventDefault()}}},{key:"delete",value:function(t){var e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name","_method"),e.setAttribute("value","delete"),t.currentTarget.form.appendChild(e)}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"cancel",value:function(t){this.element.classList.remove("showing-popup"),t.preventDefault()}},{key:"openPopup",value:function(t){this.element.classList.add("showing-popup"),t.preventDefault()}},{key:"pickOption",value:function(t){this.inputTarget.value=t.currentTarget.dataset.moduleName}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["popup","input","option","closeButton"],l.values={module:String}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){this.setDisabledStatesForChildren()}},{key:"setRelatedFeatures",value:function(t){var e=t.target;if(e.checked){for(var n=e.parentElement,r=[];n;)n.classList.contains("feature")&&r.push(n),n=n.parentElement;r.forEach((function(t){t.querySelector(":scope > .feature-row input[type=checkbox]").checked=!0}))}e.checked||e.closest(".feature").querySelectorAll('input[type="checkbox"]').forEach((function(t){t.closest(".is-admin-only")||(t.checked=!1)})),this.setDisabledStatesForChildren()}},{key:"setDisabledStatesForChildren",value:function(){this.element.querySelectorAll(".feature-children").forEach((function(t){t.parentElement.querySelector(":scope > .feature-row input:checked")?t.classList.remove("is-hidden"):t.classList.add("is-hidden")}))}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){setTimeout(this.removeFlash.bind(this),3e3)}},{key:"removeFlash",value:function(){this.element.remove()}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){this.hasSelected_modeTarget&&this.selection_mode()}},{key:"selection_mode",value:function(){var t=this,e=["records","collections","projects","overlays","trails","routes","timelines"];this.associated_contentTargets.forEach((function(n){e.includes(n.id)&&("manual"===t.selected_modeTarget.value&&n.id==="".concat(t.content_typeTarget.value,"s")?n.hidden=!1:n.hidden=!0)}));var n=this.element.querySelector("#pagemaker_content_module_item_count").closest(".form-group");"manual"===this.selected_modeTarget.value?n.style.display="none":n.style.display="block"}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["selected_mode","content_type","associated_content"]},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"toggle",value:function(t){this.pageTarget.hidden="page"!=t.target.value,this.linkTarget.hidden="link"!=t.target.value,"link"==t.target.value?(this.titleLabelTarget.innerHTML="Text for link",this.titleFieldTarget.setAttribute("required","")):(this.titleLabelTarget.innerHTML="Alternate text for link",this.titleFieldTarget.removeAttribute("required"))}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["link","page","titleLabel","titleField"]},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"add_association",value:function(t){t.preventDefault();var e=this.templateTarget.innerHTML.replace(/TEMPLATE_RECORD/g,(new Date).valueOf());this.add_itemTarget.insertAdjacentHTML("beforebegin",e),this.element.closest("form").submit()}},{key:"remove_association",value:function(t){t.preventDefault();var e=t.target.closest(".nested-fields");e.querySelector("input[name*='_destroy']").value=1,e.style.display="none",this.element.closest("form").submit()}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["add_item","template"]},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return _}));var r=n(11),i=n(214),o=n.n(i),a=(n(1199),n(217)),s=n(828),u=n.n(s);function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(){return h="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=p(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(this,arguments)}function p(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}function d(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function g(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=v(t);if(e){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return y(this,n)}}function y(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}o.a.register("modules/imageResize",u.a);var b=function(t){d(n,t);var e=g(n);function n(){return l(this,n),e.apply(this,arguments)}return f(n,null,[{key:"create",value:function(t){var e=h(v(n),"create",this).call(this,t);return e.setAttribute("href",this.sanitize(t)),e.removeAttribute("target"),e}}]),n}(o.a.import("formats/link"));o.a.register("formats/link",b);var _=function(t){d(n,t);var e=g(n);function n(){return l(this,n),e.apply(this,arguments)}return f(n,[{key:"connect",value:function(){this.quillInit()}},{key:"quillInit",value:function(){var t=this;this.containerTargets.forEach((function(e){var n=new o.a(e,t.quillOption),r=e.nextElementSibling;if("textarea"===r.type){if(""!==r.value){var i=n.clipboard.convert(r.value);n.setContents(i,"silent")}t.element.children[1].classList.add("shadow-sm","focus:ring-indigo-500","mt-1","block","w-full","focus:border-indigo-500","sm:text-sm","rounded-t-md","rounded-l-md","rounded-r-md","rounded-b-none"),t.element.children[2].classList.add("shadow-sm","focus:ring-indigo-500","mt-1","block","w-full","focus:border-indigo-500","sm:text-sm","rounded-md","rounded-t-none"),n.getModule("toolbar").addHandler("video",(function(){var t=prompt("Enter Video URL: ");t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/)||t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#\&\?]*).*/);if(e&&11===e[2].length)return"https://www.youtube.com/embed/"+e[2]+"?showinfo=0&modestbranding=1";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return null}(t);var e=n.getSelection();null!=t&&n.insertEmbed(e.index,"video",t)})),n.on("text-change",(function(){var t=n.root.innerHTML.replace(/<p><br><\/p>/g,"").trim();r.value=t}))}else console.warn('You have to put <textarea> after <div data-target="quill-editor.container">')}))}},{key:"quillOption",get:function(){return{modules:{toolbar:this.toolbarOption,imageResize:{displaySize:!0,displayStyles:{backgroundColor:"black",border:"none",color:"white"},modules:["Resize","DisplaySize","Toolbar"]},clipboard:{allowed:{tags:["a","img","p","b","strong","em","i","br","ul","ol","li","div","span"],attributes:["href","rel","target","class"]},matchVisual:!1}},placeholder:"Type something here...",readOnly:!1,theme:"snow"}}},{key:"toolbarOption",get:function(){var t=this.data.get("type"),e=function(t){var e=document.createElement("input");e.setAttribute("type","file"),e.click(),e.onchange=function(){var n=e.files[0];/^image\//.test(n.type)?function(t,e){(new FormData).append("blob",e),new a.DirectUpload(e,"/rails/active_storage/direct_uploads").create((function(e,n){e?console.log(e):function(t,e){var n=t.getSelection();t.insertEmbed(n.index,"image",e)}(t,"/rails/active_storage/blobs/".concat(n.signed_id,"/").concat(n.filename))}))}(t,n):alert("Only images allowed")}};return{container:"basic_wysiwyg"===t?[["bold","italic","underline"],["link"]]:[[{header:[1,2,3,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],["link","image","video"],["blockquote"]],handlers:{image:function(t){e(this.quill)}}}}}]),n}(r.b);_.targets=["container"]},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(11),i=n(214),o=n.n(i);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function l(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var h=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(c,t);var e,n,r,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"connect",value:function(){this.element.innerHTML=this.quillInnerHTML()}},{key:"quillInnerHTML",value:function(){if(""!==this.params){var t=document.createElement("div"),e=new o.a(t);return e.setContents(JSON.parse(this.params).ops),e.root.innerHTML}}},{key:"params",get:function(){return this.data.get("params")}}])&&s(e.prototype,n),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),c}(r.b)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"toggleMobileNavigation",value:function(t){this.mobileNavigationTarget.classList.toggle("is-active"),this.hamburgerTarget.classList.toggle("is-active")}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["desktopNavigation","mobileNavigation","hamburger"]},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){var t;r(this,l);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=u.call.apply(u,[this].concat(n))).iframeDocument="",t.lightCSS="\n        :root {\n          --text-color: #373737;\n          --site-background-color: #ffffff;\n        }\n      ",t.darkCSS="\n        :root {\n          --text-color: #ffffff;\n          --site-background-color: #272725;\n        }\n      ",t.styleElement="",t}return e=l,(n=[{key:"connect",value:function(){var t=this,e=document.querySelector(".form-fields--layout");this.checkboxes=e.querySelectorAll('input[type="checkbox"]'),this.checkboxes.forEach((function(e){e.addEventListener("change",t.updatePreview.bind(t))}));var n=document.getElementById("site-preview");n.addEventListener("load",(function(){t.iframeDocument=n.contentDocument,t.styleElement=t.iframeDocument.createElement("style"),t.iframeDocument.head.appendChild(t.styleElement)}))}},{key:"updatePreview",value:function(){var t=this,e={flush_fit:"flush",dark_mode:"dark",body_border:"border"};this.checkboxes.forEach((function(n){var r=t.transformCheckboxName(n.name);r="theme--"+(r=e[r]||r).replace(/_/g,"-"),n.checked?t.iframeDocument.body.classList.add(r):t.iframeDocument.body.classList.remove(r),"theme--dark"==r&&(t.styleElement.textContent=n.checked?t.darkCSS:t.lightCSS)}))}},{key:"transformCheckboxName",value:function(t){return t.replace(/^pagemaker_site_setting\[(.*)\]$/,"$1")}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b)},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return p}));var r=n(829),i=n(432);function o(){o=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function a(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var p=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(d,t);var e,n,r,f,h,p=c(d);function d(){return s(this,d),p.apply(this,arguments)}return e=d,n=[{key:"end",value:(f=o().mark((function t(e){var n,r,a,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.item,r=e.newIndex,n.dataset.sortableUpdateUrl){t.next=3;break}return t.abrupt("return");case 3:return a=this.resourceNameValue?"".concat(this.resourceNameValue,"[").concat(this.paramNameValue,"]"):this.paramNameValue,(s=new FormData).append(a,r),t.next=8,Object(i.a)(n.dataset.sortableUpdateUrl,{body:s,responseKind:this.responseKindValue});case 8:window.location.reload();case 9:case"end":return t.stop()}}),t,this)})),h=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=f.apply(t,e);function o(t){a(i,n,r,o,s,"next",t)}function s(t){a(i,n,r,o,s,"throw",t)}o(void 0)}))},function(t){return h.apply(this,arguments)})}],n&&u(e.prototype,n),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),d}(r.a)},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return d}));var r=n(11),i=n(302),o=n(432);function a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function s(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function f(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var d=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(m,t);var e,n,r,h,p,d=f(m);function m(){return u(this,m),d.apply(this,arguments)}return e=m,n=[{key:"connect",value:function(){var t=this;this.nestableTargets.forEach((function(e){new i.a(e,{group:"nestables",animation:200,fallbackOnBody:!0,swapThreshold:.65,onEnd:t.moveItem})}))}},{key:"moveItem",value:(h=a().mark((function t(e){var n,r,i,s,u;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.item,r=e.newIndex,i=n.dataset.sortableUpdateUrl){t.next=4;break}return t.abrupt("return");case 4:return(s=new FormData).append("pagemaker_page[position]",r),u=n.parentElement.parentElement.dataset.id||"",s.append("pagemaker_page[parent_id]",u),t.next=10,Object(o.a)(i,{body:s,responseKind:"turbo-stream"});case 10:case"end":return t.stop()}}),t)})),p=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=h.apply(t,e);function o(t){s(i,n,r,o,a,"next",t)}function a(t){s(i,n,r,o,a,"throw",t)}o(void 0)}))},function(t){return p.apply(this,arguments)})}],n&&l(e.prototype,n),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),m}(r.b);d.targets=["nestable"]},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return m}));var r=n(11),i=n(191),o=n.n(i);function a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function s(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d(t);if(e){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var m=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(d,t);var e,n,r,i,s,p=h(d);function d(){return l(this,d),p.apply(this,arguments)}return e=d,n=[{key:"connect",value:function(){this.validationUrl=this.element.dataset.slugValidationUrl,this.validateSlug=o()(this.validateSlug,500,{trailing:!0})}},{key:"autogenerateSlug",value:(s=u(a().mark((function t(){var e,n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.validationTarget.innerHTML="",(e=new URL(this.validationUrlValue)).searchParams.set("site_name",this.nameTarget.value),t.next=5,fetch(e);case 5:if(!(n=t.sent).ok){t.next=15;break}return t.next=9,n.json();case 9:r=t.sent,this.slugTarget.value=r.slug,this.autogeneratedSlug=r.slug,this.validateSlug(),t.next=16;break;case 15:this.slugTarget.value="";case 16:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"validateSlug",value:(i=u(a().mark((function t(){var e,n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.validationTarget.innerHTML="",(e=new URL(this.validationUrlValue)).searchParams.set("slug_candidate",this.slugTarget.value),t.next=5,fetch(e);case 5:if(!(n=t.sent).ok){t.next=11;break}return t.next=9,n.json();case 9:!1===t.sent.success?(this.validationTarget.innerHTML="This subdomain is taken",this.validationTarget.classList.add("is-error"),this.validationTarget.classList.remove("is-success")):(this.validationTarget.innerHTML="This subdomain is available!",this.validationTarget.classList.remove("is-error"),this.validationTarget.classList.add("is-success"));case 11:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})}],n&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),d}(r.b);m.targets=["name","slug","validation"],m.values={validationUrl:String}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){var t=this;this.noAccessTarget.addEventListener("change",(function(e){e.currentTarget.checked?t.disableRadios():t.enableRadios()}))}},{key:"disableRadios",value:function(){this.adminTarget.checked=!1,this.adminTarget.setAttribute("disabled",!0),this.contributorTarget.checked=!1,this.contributorTarget.setAttribute("disabled",!0)}},{key:"enableRadios",value:function(){this.adminTarget.removeAttribute("disabled"),this.contributorTarget.removeAttribute("disabled",!0),this.contributorTarget.checked=!0}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["noAccess","admin","contributor"]},function(t,e,n){"use strict";e.__esModule=!0;var r=n(0),i=(a(r),a(n(3))),o=a(n(878));a(n(879));function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function l(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var c=1073741823;function f(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}e.default=function(t,e){var n,a,h="__create-react-context-"+(0,o.default)()+"__",p=function(t){function n(){var e,r;s(this,n);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=r=u(this,t.call.apply(t,[this].concat(o))),r.emitter=f(r.props.value),u(r,e)}return l(n,t),n.prototype.getChildContext=function(){var t;return(t={})[h]=this.emitter,t},n.prototype.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n=this.props.value,r=t.value,i=void 0;((o=n)===(a=r)?0!==o||1/o===1/a:o!==o&&a!==a)?i=0:(i="function"===typeof e?e(n,r):c,0!==(i|=0)&&this.emitter.set(t.value,i))}var o,a},n.prototype.render=function(){return this.props.children},n}(r.Component);p.childContextTypes=((n={})[h]=i.default.object.isRequired,n);var d=function(e){function n(){var t,r;s(this,n);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r=u(this,e.call.apply(e,[this].concat(o))),r.state={value:r.getValue()},r.onUpdate=function(t,e){0!==((0|r.observedBits)&e)&&r.setState({value:r.getValue()})},u(r,t)}return l(n,e),n.prototype.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?c:e},n.prototype.componentDidMount=function(){this.context[h]&&this.context[h].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?c:t},n.prototype.componentWillUnmount=function(){this.context[h]&&this.context[h].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[h]?this.context[h].get():t},n.prototype.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return d.contextTypes=((a={})[h]=i.default.object,a),{Provider:p,Consumer:d}},t.exports=e.default},function(t,e,n){"use strict";(function(e){var n="__global_unique_id__";t.exports=function(){return e[n]=(e[n]||0)+1}}).call(this,n(36))},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,A=r?Symbol.for("react.scope"):60119;function w(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case a:case u:case s:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case y:case g:case l:return t;default:return e}}case o:return e}}}function x(t){return w(t)===h}e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=l,e.Element=i,e.ForwardRef=p,e.Fragment=a,e.Lazy=y,e.Memo=g,e.Portal=o,e.Profiler=u,e.StrictMode=s,e.Suspense=d,e.isAsyncMode=function(t){return x(t)||w(t)===f},e.isConcurrentMode=x,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===l},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return w(t)===p},e.isFragment=function(t){return w(t)===a},e.isLazy=function(t){return w(t)===y},e.isMemo=function(t){return w(t)===g},e.isPortal=function(t){return w(t)===o},e.isProfiler=function(t){return w(t)===u},e.isStrictMode=function(t){return w(t)===s},e.isSuspense=function(t){return w(t)===d},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===a||t===h||t===u||t===s||t===d||t===m||"object"===typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===g||t.$$typeof===l||t.$$typeof===c||t.$$typeof===p||t.$$typeof===b||t.$$typeof===_||t.$$typeof===A||t.$$typeof===v)},e.typeOf=w},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*m}},function(t,e){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){n(884),t.exports=n(120).Object.assign},function(t,e,n){var r=n(166);r(r.S+r.F,"Object",{assign:n(887)})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(498),i=n(502);t.exports=n(167)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";var r=n(167),i=n(294),o=n(896),a=n(389),s=n(508),u=n(503),l=Object.assign;t.exports=!l||n(293)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=r}))?function(t,e){for(var n=s(t),l=arguments.length,c=1,f=o.f,h=a.f;l>c;)for(var p,d=u(arguments[c++]),m=f?i(d).concat(f(d)):i(d),g=m.length,y=0;g>y;)p=m[y++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:l},function(t,e,n){var r=n(388),i=n(295),o=n(890)(!1),a=n(506)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,l=[];for(n in s)n!=a&&r(s,n)&&l.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(l,n)||l.push(n));return l}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(295),i=n(891),o=n(892);t.exports=function(t){return function(e,n,a){var s,u=r(e),l=i(u.length),c=o(a,l);if(t&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var r=n(505),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(505),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(120),i=n(291),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(894)?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){n(898);var r=n(120).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(166);r(r.S,"Object",{create:n(899)})},function(t,e,n){var r=n(292),i=n(900),o=n(507),a=n(506)("IE_PROTO"),s=function(){},u=function(){var t,e=n(500)("iframe"),r=o.length;for(e.style.display="none",n(901).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(498),i=n(292),o=n(294);t.exports=n(167)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(291).document;t.exports=r&&r.documentElement},function(t,e,n){t.exports=n(903)},function(t,e,n){n(904),t.exports=n(120).Object.setPrototypeOf},function(t,e,n){var r=n(166);r(r.S,"Object",{setPrototypeOf:n(905).set})},function(t,e,n){var r=n(233),i=n(292),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(497)(Function.call,n(906).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(389),i=n(502),o=n(295),a=n(501),s=n(388),u=n(499),l=Object.getOwnPropertyDescriptor;e.f=n(167)?l:function(t,e){if(t=o(t),e=a(e,!0),u)try{return l(t,e)}catch(n){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){n(908),t.exports=n(120).Object.values},function(t,e,n){var r=n(166),i=n(909)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(167),i=n(294),o=n(295),a=n(389).f;t.exports=function(t){return function(e){for(var n,s=o(e),u=i(s),l=u.length,c=0,f=[];l>c;)n=u[c++],r&&!a.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}}},function(t,e,n){n(911),t.exports=n(120).Object.keys},function(t,e,n){var r=n(508),i=n(294);n(912)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){var r=n(166),i=n(120),o=n(293);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){n(914),t.exports=n(120).Date.now},function(t,e,n){var r=n(166);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){n(916),t.exports=n(120).Number.isInteger},function(t,e,n){var r=n(166);r(r.S,"Number",{isInteger:n(917)})},function(t,e,n){var r=n(233),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(519),i="object"===typeof window?window:self,o=Object.keys(i).length,a=r(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+o.toString(36),4);t.exports=function(){return a}},function(t,e){var n,r="undefined"!==typeof window&&(window.crypto||window.msCrypto)||"undefined"!==typeof self&&self.crypto;if(r){var i=Math.pow(2,32)-1;n=function(){return Math.abs(r.getRandomValues(new Uint32Array(1))[0]/i)}}else n=Math.random;t.exports=n},function(t,e,n){var r=n(921),i=/[\/\+\.]/;t.exports=function(t,e){function n(e){var n=r(e,t,i);return n&&n.length>=2}return e?n(e.split(";")[0]):n}},function(t,e,n){"use strict";function r(t,e){this.text=t=t||"",this.hasWild=~t.indexOf("*"),this.separator=e,this.parts=t.split(e)}r.prototype.match=function(t){var e,n,r=!0,i=this.parts,o=i.length;if("string"==typeof t||t instanceof String)if(this.hasWild||this.text==t){for(n=(t||"").split(this.separator),e=0;r&&e<o;e++)"*"!==i[e]&&(r=e<n.length&&i[e]===n[e]);r=r&&n}else r=!1;else if("function"==typeof t.splice)for(r=[],e=t.length;e--;)this.match(t[e])&&(r[r.length]=t[e]);else if("object"==typeof t)for(var a in r={},t)this.match(a)&&(r[a]=t[a]);return r},t.exports=function(t,e,n){var i=new r(t,n||/[\/\.]/);return"undefined"!=typeof e?i.match(e):i}},function(t,e){function n(){return n=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},n.apply(this,arguments)}var r=function(){function t(){this.state={},this.callbacks=[]}var e=t.prototype;return e.getState=function(){return this.state},e.setState=function(t){var e=n({},this.state),r=n({},this.state,t);this.state=r,this._publish(e,r,t)},e.subscribe=function(t){var e=this;return this.callbacks.push(t),function(){e.callbacks.splice(e.callbacks.indexOf(t),1)}},e._publish=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks.forEach((function(t){t.apply(void 0,e)}))},t}();r.VERSION="1.2.6",t.exports=function(){return new r}},function(t,e,n){var r=n(520),i=n(924);t.exports=function(t){var e=t.name?r(t.name).extension:null;return e=e?e.toLowerCase():null,t.type?t.type:e&&i[e]?i[e]:"application/octet-stream"}},function(t,e){t.exports={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"}},function(t,e){function n(t){var e="";return t.replace(/[^A-Z0-9]/gi,(function(t){return e+="-"+function(t){return t.charCodeAt(0).toString(32)}(t),"/"}))+e}t.exports=function(t){var e="uppy";return"string"===typeof t.name&&(e+="-"+n(t.name.toLowerCase())),void 0!==t.type&&(e+="-"+t.type),t.meta&&"string"===typeof t.meta.relativePath&&(e+="-"+n(t.meta.relativePath.toLowerCase())),void 0!==t.data.size&&(e+="-"+t.data.size),void 0!==t.data.lastModified&&(e+="-"+t.data.lastModified),e}},function(t,e){t.exports=function(t){if(null==t&&(t="undefined"!==typeof navigator?navigator.userAgent:null),!t)return!0;var e=/Edge\/(\d+\.\d+)/.exec(t);if(!e)return!0;var n=e[1].split("."),r=n[0],i=n[1];return r=parseInt(r,10),i=parseInt(i,10),r<15||15===r&&i<15063||(r>18||18===r&&i>=18218)}},function(t,e,n){var r=n(928),i={debug:function(){},warn:function(){},error:function(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=console).error.apply(t,["[Uppy] ["+r()+"]"].concat(n))}},o={debug:function(){for(var t=console.debug||console.log,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];t.call.apply(t,[console,"[Uppy] ["+r()+"]"].concat(n))},warn:function(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=console).warn.apply(t,["[Uppy] ["+r()+"]"].concat(n))},error:function(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=console).error.apply(t,["[Uppy] ["+r()+"]"].concat(n))}};t.exports={justErrorsLogger:i,debugLogger:o}},function(t,e){function n(t){return 2!==t.length?0+t:t}t.exports=function(){var t=new Date;return n(t.getHours().toString())+":"+n(t.getMinutes().toString())+":"+n(t.getSeconds().toString())}},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}var i=n(86),o=n(930);t.exports=function(){function t(t,e){this.uppy=t,this.opts=e||{},this.update=this.update.bind(this),this.mount=this.mount.bind(this),this.install=this.install.bind(this),this.uninstall=this.uninstall.bind(this)}var e=t.prototype;return e.getPluginState=function(){return this.uppy.getState().plugins[this.id]||{}},e.setPluginState=function(t){var e,n=this.uppy.getState().plugins;this.uppy.setState({plugins:r({},n,(e={},e[this.id]=r({},n[this.id],t),e))})},e.setOptions=function(t){this.opts=r({},this.opts,t),this.setPluginState()},e.update=function(t){"undefined"!==typeof this.el&&this._updateUI&&this._updateUI(t)},e.afterUpdate=function(){},e.onMount=function(){},e.mount=function(e,n){var r,a,s,u,l=this,c=n.id,f=o(e);if(f)return this.isTargetDOMEl=!0,this.rerender=function(t){l.uppy.getPlugin(l.id)&&(l.el=i.render(l.render(t),f,l.el),l.afterUpdate())},this._updateUI=(r=this.rerender,a=null,s=null,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return s=e,a||(a=Promise.resolve().then((function(){return a=null,r.apply(void 0,s)}))),a}),this.uppy.log("Installing "+c+" to a DOM element '"+e+"'"),this.opts.replaceTargetContent&&(f.innerHTML=""),this.el=i.render(this.render(this.uppy.getState()),f),this.onMount(),this.el;if("object"===typeof e&&e instanceof t)u=e;else if("function"===typeof e){var h=e;this.uppy.iteratePlugins((function(t){if(t instanceof h)return u=t,!1}))}if(u)return this.uppy.log("Installing "+c+" to "+u.id),this.parent=u,this.el=u.addTarget(n),this.onMount(),this.el;this.uppy.log("Not installing "+c);var p="Invalid target option given to "+c+".";throw p+="function"===typeof e?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(p)},e.render=function(t){throw new Error("Extend the render method to add your plugin to a DOM element")},e.addTarget=function(t){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")},e.unmount=function(){this.isTargetDOMEl&&this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.install=function(){},e.uninstall=function(){this.unmount()},t}()},function(t,e,n){var r=n(642);t.exports=function(t,e){return void 0===e&&(e=document),"string"===typeof t?e.querySelector(t):r(t)?t:void 0}},function(t,e,n){var r=n(86).h;t.exports=function(t){var e={color:"#838999",icon:r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},r("g",{fill:"#A7AFB7",fillRule:"nonzero"},r("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),r("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!t)return e;var n=t.split("/")[0],i=t.split("/")[1];if("text"===n)return{color:"#5a5e69",icon:r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},r("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))};if("image"===n)return{color:"#686de0",icon:r("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},r("g",{fill:"#686DE0",fillRule:"evenodd"},r("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),r("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),r("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))};if("audio"===n)return{color:"#068dbb",icon:r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},r("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))};if("video"===n)return{color:"#19af67",icon:r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},r("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))};if("application"===n&&"pdf"===i)return{color:"#e25149",icon:r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},r("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))};return"application"===n&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(i)?{color:"#00C469",icon:r("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},r("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:e}},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}var i=n(235),o=n(236),a=n(522),s=n(439),u=n(933),l=n(86).h;t.exports=function(t){var e,n,i=t=t||{},s=i.newFiles,u=i.allowNewUpload,m=i.isUploadInProgress,y=i.isAllPaused,v=i.resumableUploads,b=i.error,x=i.hideUploadButton,E=i.hidePauseResumeButton,O=i.hideCancelButton,S=i.hideRetryButton,P=t.uploadState,C=t.totalProgress;if(P===a.STATE_PREPROCESSING||P===a.STATE_POSTPROCESSING){var T=function(t){var e=[];Object.keys(t).forEach((function(n){var r=t[n].progress;r.preprocess&&e.push(r.preprocess),r.postprocess&&e.push(r.postprocess)}));var n=e[0];return{mode:n.mode,message:n.message,value:e.filter((function(t){return"determinate"===t.mode})).reduce((function(t,e,n,r){return t+e.value/r.length}),0)}}(t.files);"determinate"===(e=T.mode)&&(C=100*T.value),n=g(T)}else P===a.STATE_COMPLETE?n=A(t):P===a.STATE_UPLOADING?(t.supportsUploadProgress||(e="indeterminate",C=null),n=_(t)):P===a.STATE_ERROR&&(C=void 0,n=w(t));var k="number"===typeof C?C:100,I=P===a.STATE_WAITING&&t.hideUploadButton||P===a.STATE_WAITING&&!t.newFiles>0||P===a.STATE_COMPLETE&&t.hideAfterFinish,L=!b&&s&&!m&&!y&&u&&!x,j=!O&&P!==a.STATE_WAITING&&P!==a.STATE_COMPLETE,M=v&&!E&&P===a.STATE_UPLOADING,R=b&&!S,N=t.doneButtonHandler&&P===a.STATE_COMPLETE,D="uppy-StatusBar-progress\n                           "+(e?"is-"+e:""),F=o({"uppy-Root":t.isTargetDOMEl},"uppy-StatusBar","is-"+P);return l("div",{className:F,"aria-hidden":I},l("div",{className:D,style:{width:k+"%"},role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":C}),n,l("div",{className:"uppy-StatusBar-actions"},L?l(c,r({},t,{uploadState:P})):null,R?l(f,t):null,M?l(p,t):null,j?l(h,t):null,N?l(d,t):null))};var c=function(t){var e=o("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":t.uploadState===a.STATE_WAITING});return l("button",{type:"button",className:e,"aria-label":t.i18n("uploadXFiles",{smart_count:t.newFiles}),onClick:t.startUpload,"data-uppy-super-focusable":!0},t.newFiles&&t.isUploadStarted?t.i18n("uploadXNewFiles",{smart_count:t.newFiles}):t.i18n("uploadXFiles",{smart_count:t.newFiles}))},f=function(t){return l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t.i18n("retryUpload"),onClick:t.retryAll,"data-uppy-super-focusable":!0},l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},l("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),t.i18n("retry"))},h=function(t){return l("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t.i18n("cancel"),"aria-label":t.i18n("cancel"),onClick:t.cancelAll,"data-uppy-super-focusable":!0},l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},l("g",{fill:"none",fillRule:"evenodd"},l("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),l("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))},p=function(t){var e=t.isAllPaused,n=t.i18n,r=n(e?"resume":"pause");return l("button",{title:r,"aria-label":r,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){return function(t){if(!t.isAllComplete)return t.resumableUploads?t.isAllPaused?t.resumeAll():t.pauseAll():t.cancelAll()}(t)},"data-uppy-super-focusable":!0},l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},l("g",{fill:"none",fillRule:"evenodd"},l("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),l("path",e?{fill:"#FFF",d:"M6 4.25L11.5 8 6 11.75z"}:{d:"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z",fill:"#FFF"}))))},d=function(t){var e=t.i18n;return l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:t.doneButtonHandler,"data-uppy-super-focusable":!0},e("done"))},m=function(){return l("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},l("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))},g=function(t){var e=Math.round(100*t.value);return l("div",{className:"uppy-StatusBar-content"},l(m,null),"determinate"===t.mode?e+"% \xb7 ":"",t.message)},y=function(t){return l("div",{className:"uppy-StatusBar-statusSecondary"},t.i18n("filesUploadedOfTotal",{complete:t.complete,smart_count:t.numUploads}))},v=function(t){var e=o("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return l("div",{className:"uppy-StatusBar-statusSecondary"},l("div",{className:"uppy-StatusBar-statusSecondaryHint"},t.i18n("xMoreFilesAdded",{smart_count:t.newFiles})),l("button",{type:"button",className:e,"aria-label":t.i18n("uploadXFiles",{smart_count:t.newFiles}),onClick:t.startUpload},t.i18n("upload")))},b=i((function(t){var e=t.numUploads>1;return l("div",{className:"uppy-StatusBar-statusSecondary"},e&&t.i18n("filesUploadedOfTotal",{complete:t.complete,smart_count:t.numUploads}),l("span",{className:"uppy-StatusBar-additionalInfo"},e&&" \xb7 ",t.i18n("dataUploadedOfTotal",{complete:s(t.totalUploadedSize),total:s(t.totalSize)})," \xb7 ",t.i18n("xTimeLeft",{time:u(t.totalETA)})))}),500,{leading:!0,trailing:!0}),_=function(t){if(!t.isUploadStarted||t.isAllComplete)return null;var e=t.isAllPaused?t.i18n("paused"):t.i18n("uploading"),n=t.newFiles&&t.isUploadStarted;return l("div",{className:"uppy-StatusBar-content","aria-label":e,title:e},t.isAllPaused?null:l(m,null),l("div",{className:"uppy-StatusBar-status"},l("div",{className:"uppy-StatusBar-statusPrimary"},t.supportsUploadProgress?e+": "+t.totalProgress+"%":e),t.isAllPaused||n||!t.showProgressDetails?null:t.supportsUploadProgress?l(b,t):l(y,t),n?l(v,t):null))},A=function(t){t.totalProgress;var e=t.i18n;return l("div",{className:"uppy-StatusBar-content",role:"status",title:e("complete")},l("div",{className:"uppy-StatusBar-status"},l("div",{className:"uppy-StatusBar-statusPrimary"},l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},l("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),e("complete"))))},w=function(t){var e=t.error,n=(t.retryAll,t.hideRetryButton,t.i18n);return l("div",{className:"uppy-StatusBar-content",role:"alert",title:n("uploadFailed")},l("div",{className:"uppy-StatusBar-status"},l("div",{className:"uppy-StatusBar-statusPrimary"},l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},l("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),n("uploadFailed"))),l("span",{className:"uppy-StatusBar-details","aria-label":e,"data-microtip-position":"top-right","data-microtip-size":"medium",role:"tooltip",onClick:function(){var t=n("uploadFailed")+" \n\n "+e;alert(t)}},"?"))}},function(t,e,n){var r=n(934);t.exports=function(t){var e=r(t),n=e.hours?e.hours+"h ":"",i=e.hours?("0"+e.minutes).substr(-2):e.minutes,o=i?i+"m":"",a=i?("0"+e.seconds).substr(-2):e.seconds;return""+n+o+(e.hours?"":i?" "+a+"s":a+"s")}},function(t,e){t.exports=function(t){return{hours:Math.floor(t/3600)%24,minutes:Math.floor(t/60)%60,seconds:Math.floor(t%60)}}},function(t,e){t.exports=function(t){if(!t.bytesUploaded)return 0;var e=new Date-t.uploadStarted;return t.bytesUploaded/(e/1e3)}},function(t,e){t.exports=function(t){return t.bytesTotal-t.bytesUploaded}},function(t,e,n){var r=n(257),i=n(938),o=n(939);t.exports=function(t,e){var n=[],a=[],s=function t(r){return new Promise((function(a){if(r.isFile)r.file((function(t){t.relativePath=i(r),n.push(t),a()}),(function(t){e(t),a()}));else if(r.isDirectory){var s=r.createReader();o(s,[],e,{onSuccess:function(e){var n=e.map((function(e){return t(e)}));Promise.all(n).then((function(){return a()}))}})}}))};return r(t.items).forEach((function(t){var e=t.webkitGetAsEntry();e&&a.push(s(e))})),Promise.all(a).then((function(){return n}))}},function(t,e){t.exports=function(t){return t.fullPath&&t.fullPath!=="/"+t.name?t.fullPath:null}},function(t,e){t.exports=function t(e,n,r,i){var o=i.onSuccess;e.readEntries((function(i){var a=[].concat(n,i);i.length?setTimeout((function(){t(e,a,r,{onSuccess:o})}),0):o(a)}),(function(t){r(t),o(n)}))}},function(t,e,n){var r=n(257);t.exports=function(t){var e=r(t.files);return Promise.resolve(e)}},function(t,e){t.exports=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])']},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModifyMode=void 0;var r,i=(r=n(427))&&r.__esModule?r:{default:r},o=n(60),a=n(157),s=n(112),u=n(258);function l(t){return l="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},l(t)}function c(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(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.")}()}function f(t,e){if(t){if("string"===typeof t)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(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 p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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 m(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function g(){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}}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}var b=function(t){!function(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&&v(t,e)}(h,t);var e,n,r,s,l=(e=h,function(){var t,n=y(e);if(g()){var r=y(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return m(this,t)});function h(){return p(this,h),l.apply(this,arguments)}return n=h,(r=[{key:"getGuides",value:function(t){var e,n=this,r=[],i=t.data,s=t.lastPointerMoveEvent,u=i.features,l=s&&s.picks,h=s&&s.mapCoords,p=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=f(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(t.selectedIndexes);try{for(p.s();!(e=p.n()).done;){var d=e.value;if(d<u.length){var m=u[d].geometry;r.push.apply(r,c((0,a.getEditHandlesForGeometry)(m,d)))}else console.warn("selectedFeatureIndexes out of range ".concat(d))}}catch(x){p.e(x)}finally{p.f()}if(l&&l.length&&h){var g=!(0,a.getPickedExistingEditHandle)(l)&&l.find((function(t){return!t.isGuide}));if(g&&!g.object.geometry.type.includes("Point")&&t.selectedIndexes.includes(g.index)){var y=null,v=[],b=(0,o.point)(h);if((0,a.recursivelyTraverseNestedArrays)(g.object.geometry.coordinates,[],(function(e,r){var i=(0,o.lineString)(e),a=n.nearestPointOnLine(i,b,t.modeConfig&&t.modeConfig.viewport);(!y||a.properties.dist<y.properties.dist)&&(y=a,v=r)})),y){var _=y,A=_.geometry.coordinates,w=_.properties.index;r.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:g.index,positionIndexes:[].concat(c(v),[w+1])},geometry:{type:"Point",coordinates:A}})}}}return{type:"FeatureCollection",features:r}}},{key:"nearestPointOnLine",value:function(t,e,n){if(t.geometry.coordinates.some((function(t){return t.length>2}))){if(n)return(0,a.nearestPointOnProjectedLine)(t,e,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,i.default)(t,e)}},{key:"handleClick",value:function(t,e){var n=(0,a.getPickedExistingEditHandle)(t.picks),r=(0,a.getPickedIntermediateEditHandle)(t.picks);if(n){var i,o=n.properties,s=o.featureIndex,l=o.positionIndexes;try{i=new u.ImmutableFeatureCollection(e.data).removePosition(s,l).getObject()}catch(d){}i&&e.onEdit({updatedData:i,editType:"removePosition",editContext:{featureIndexes:[s],positionIndexes:l,position:n.geometry.coordinates}})}else if(r){var c=r.properties,f=c.featureIndex,h=c.positionIndexes,p=new u.ImmutableFeatureCollection(e.data).addPosition(f,h,r.geometry.coordinates).getObject();p&&e.onEdit({updatedData:p,editType:"addPosition",editContext:{featureIndexes:[f],positionIndexes:h,position:r.geometry.coordinates}})}}},{key:"handleDragging",value:function(t,e){var n=(0,a.getPickedEditHandle)(t.pointerDownPicks);if(n){t.cancelPan();var r=n.properties,i=new u.ImmutableFeatureCollection(e.data).replacePosition(r.featureIndex,r.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:i,editType:"movePosition",editContext:{featureIndexes:[r.featureIndex],positionIndexes:r.positionIndexes,position:t.mapCoords}})}}},{key:"handlePointerMove",value:function(t,e){var n=this.getCursor(t);e.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,a.getPickedIntermediateEditHandle)(t.picks);if(n.length&&r){var i=r.properties,o=new u.ImmutableFeatureCollection(e.data).addPosition(i.featureIndex,i.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:o,editType:"addPosition",editContext:{featureIndexes:[i.featureIndex],positionIndexes:i.positionIndexes,position:t.mapCoords}})}}},{key:"handleStopDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,a.getPickedEditHandle)(t.picks);if(n.length&&r){var i=r.properties,o=new u.ImmutableFeatureCollection(e.data).replacePosition(i.featureIndex,i.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:o,editType:"finishMovePosition",editContext:{featureIndexes:[i.featureIndex],positionIndexes:i.positionIndexes,position:t.mapCoords}})}}},{key:"getCursor",value:function(t){var e=t&&t.picks||[];return(0,a.getPickedEditHandles)(e).length?"cell":null}}])&&d(n.prototype,r),s&&d(n,s),h}(s.GeoJsonEditMode);e.ModifyMode=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TranslateMode=void 0;var r=l(n(89)),i=l(n(237)),o=l(n(983)),a=n(60),s=n(112),u=n(258);function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(){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}}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function y(t,e){return y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},y(t,e)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=function(t){!function(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&&y(t,e)}(b,t);var e,n,s,l,c=(e=b,function(){var t,n=g(e);if(m()){var r=g(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function b(){var t;f(this,b);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return v(d(t=c.call.apply(c,[this].concat(n))),"_geometryBeforeTranslate",void 0),v(d(t),"_isTranslatable",void 0),t}return n=b,(s=[{key:"handleDragging",value:function(t,e){if(this._isTranslatable){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translating",e);n&&e.onEdit(n)}t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){this._isTranslatable=this.isSelectionPicked(t.pointerDownPicks||t.picks,e),this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._isTranslatable&&(this._geometryBeforeTranslate=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translated",e);n&&e.onEdit(n),this._geometryBeforeTranslate=null}}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("move"):t.onUpdateCursor(null)}},{key:"getTranslateAction",value:function(t,e,n,s){if(!this._geometryBeforeTranslate)return null;for(var l=(0,a.point)(t),c=(0,a.point)(e),f=(0,i.default)(l,c),h=(0,r.default)(l,c),p=(0,o.default)(this._geometryBeforeTranslate,f,h),d=new u.ImmutableFeatureCollection(s.data),m=s.selectedIndexes,g=0;g<m.length;g++){var y=m[g],v=p.features[g];d=d.replaceGeometry(y,v.geometry)}return{updatedData:d.getObject(),editType:n,editContext:{featureIndexes:m}}}}])&&h(n.prototype,s),l&&h(n,l),b}(s.GeoJsonEditMode);e.TranslateMode=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonMode=void 0;var r=n(157);function i(t){return i="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},i(t)}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return a(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(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.")}()}function a(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 s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e,n){return l="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},l(t,e,n||t)}function c(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(){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}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}var d=function(t){!function(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&&p(t,e)}(m,t);var e,n,i,a,d=(e=m,function(){var t,n=h(e);if(f()){var r=h(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return c(this,t)});function m(){return s(this,m),d.apply(this,arguments)}return n=m,(i=[{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length||2===r.length?e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(o(r),i)}}:r.length>2&&(e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(o(r),i,[r[0]])]}}),e}},{key:"getGuides",value:function(t){var e,n=this.getClickSequence(),r={type:"FeatureCollection",features:[]},i=this.createTentativeFeature(t);i&&r.features.push(i);var a=n.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=r.features).push.apply(e,o(a)),r}},{key:"handleClick",value:function(t,e){var n=t.picks,i=(0,r.getPickedEditHandle)(n),a=!1;i||(this.addClickSequence(t),a=!0);var s=this.getClickSequence();if(s.length>2&&i&&Array.isArray(i.properties.positionIndexes)&&(0===i.properties.positionIndexes[0]||i.properties.positionIndexes[0]===s.length-1)){var u={type:"Polygon",coordinates:[[].concat(o(s),[s[0]])]};this.resetClickSequence();var l=this.getAddFeatureOrBooleanPolygonAction(u,e);l&&e.onEdit(l)}else a&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var n=this.getClickSequence();if(n.length>2){var r={type:"Polygon",coordinates:[[].concat(o(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,e);i&&e.onEdit(i)}}}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),l(h(m.prototype),"handlePointerMove",this).call(this,t,e)}}])&&u(n.prototype,i),a&&u(n,a),m}(n(112).GeoJsonEditMode);e.DrawPolygonMode=d},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(103),s=n(535),u=n(536),l=n(537),c=n(658),f=n.n(c),h=n(541),p=n(542);e.default=Object(o.a)((function(t){var e=t.overlayGroup,n=t.layers,o=t.latitude,c=t.longitude,d=t.zoom,m=Object(a.useStore)(),g=m.isInitialised,y=m.initialise,v=m.showingAddLayerPanel,b=m.activeLayerForErrorCheck;return Object(r.useEffect)((function(){y(e,n)}),[]),g?i.a.createElement(a.OverlayCreatorStoreProvider,{value:a.overlayCreatorStore},i.a.createElement("div",{className:f.a.OverlayCreator},i.a.createElement(u.default,null),v&&i.a.createElement(l.default,null),b&&i.a.createElement(p.default,null),i.a.createElement(s.default,{latitude:o,longitude:c,zoom:d}),i.a.createElement(h.default,null))):i.a.createElement("div",null,"Loading...")}))},function(t,e,n){"use strict";var r=n(390),i=n(949),o=n(953),a=n(954);t.exports={RequestClient:r,Provider:i,SearchProvider:o,Socket:a}},function(t,e,n){"use strict";function r(t){var e="function"===typeof Map?new Map:void 0;return r=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return i(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)},r(t)}function i(t,e,n){return i=o()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&a(i,n.prototype),i},i.apply(null,arguments)}function o(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u=function(t){var e,n;function r(){var e;return(e=t.call(this,"Authorization required")||this).name="AuthError",e.isAuthError=!0,e}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n),r}(r(Error));t.exports=u},function(t,e,n){var r=n(526);t.exports=function(){return fetch.apply(void 0,arguments).catch((function(t){throw"AbortError"===t.name?t:new r(t)}))}},function(t,e,n){"use strict";function r(){return r=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},r.apply(this,arguments)}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(950),a=n(951),s=n(390),u=n(952);t.exports=function(t){var e,n;function s(e,n){var r;return(r=t.call(this,e,n)||this).provider=n.provider,r.id=r.provider,r.name=r.opts.name||r.id.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "),r.pluginId=r.opts.pluginId,r.tokenKey="companion-"+r.pluginId+"-auth-token",r.companionKeysParams=r.opts.companionKeysParams,r.preAuthToken=null,r}n=t,(e=s).prototype=Object.create(n.prototype),e.prototype.constructor=e,i(e,n);var l=s.prototype;return l.headers=function(){var e=this;return Promise.all([t.prototype.headers.call(this),this.getAuthToken()]).then((function(t){var n=t[0],i=t[1],o={};return i&&(o["uppy-auth-token"]=i),e.companionKeysParams&&(o["uppy-credentials-params"]=btoa(JSON.stringify({params:e.companionKeysParams}))),r({},n,o)}))},l.onReceiveResponse=function(e){e=t.prototype.onReceiveResponse.call(this,e);var n=this.uppy.getPlugin(this.pluginId),r=n.getPluginState().authenticated?401!==e.status:e.status<400;return n.setPluginState({authenticated:r}),e},l.setAuthToken=function(t){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,t)},l.getAuthToken=function(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)},l.authUrl=function(t){void 0===t&&(t={}),this.preAuthToken&&(t.uppyPreAuthToken=this.preAuthToken);var e=o(t);return e=e?"?"+e:e,this.hostname+"/"+this.id+"/connect"+e},l.fileUrl=function(t){return this.hostname+"/"+this.id+"/get/"+t},l.fetchPreAuthToken=function(){var t=this;return this.companionKeysParams?this.post(this.id+"/preauth/",{params:this.companionKeysParams}).then((function(e){t.preAuthToken=e.token})).catch((function(e){t.uppy.log("[CompanionClient] unable to fetch preAuthToken "+e,"warning")})):Promise.resolve()},l.list=function(t){return this.get(this.id+"/list/"+(t||""))},l.logout=function(){var t=this;return this.get(this.id+"/logout").then((function(e){return Promise.all([e,t.uppy.getPlugin(t.pluginId).storage.removeItem(t.tokenKey)])})).then((function(t){return t[0]}))},s.initPlugin=function(t,e,n){if(t.type="acquirer",t.files=[],n&&(t.opts=r({},n,e)),e.serverUrl||e.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(e.companionAllowedHosts){var i=e.companionAllowedHosts;if("string"!==typeof i&&!Array.isArray(i)&&!(i instanceof RegExp))throw new TypeError(t.id+': the option "companionAllowedHosts" must be one of string, Array, RegExp');t.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(e.companionUrl)?t.opts.companionAllowedHosts="https://"+e.companionUrl.replace(/^\/\//,""):t.opts.companionAllowedHosts=new a(e.companionUrl).origin;t.storage=t.opts.storage||u},s}(s)},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function t(e,r){var i=[];for(var o in e)if(n.call(e,o)){var a,s=e[o],u=encodeURIComponent(o);a="object"===typeof s?t(s,r?r+"["+u+"]":u):(r?r+"["+u+"]":u)+"="+encodeURIComponent(s),i.push(a)}return i.join("&")}},function(t,e,n){"use strict";(function(e){var r=n(524),i=n(525),o=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,a=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,s=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(t){return(t||"").toString().replace(s,"")}var l=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],c={hash:1,query:1};function f(t){var n,r=("undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{}).location||{},i={},a=typeof(t=t||r);if("blob:"===t.protocol)i=new p(unescape(t.pathname),{});else if("string"===a)for(n in i=new p(t,{}),c)delete i[n];else if("object"===a){for(n in t)n in c||(i[n]=t[n]);void 0===i.slashes&&(i.slashes=o.test(t.href))}return i}function h(t){t=u(t);var e=a.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!(e[2]&&e[2].length>=2),rest:e[2]&&1===e[2].length?"/"+e[3]:e[3]}}function p(t,e,n){if(t=u(t),!(this instanceof p))return new p(t,e,n);var o,a,s,c,d,m,g=l.slice(),y=typeof e,v=this,b=0;for("object"!==y&&"string"!==y&&(n=e,e=null),n&&"function"!==typeof n&&(n=i.parse),e=f(e),o=!(a=h(t||"")).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,a.slashes||(g[3]=[/(.*)/,"pathname"]);b<g.length;b++)"function"!==typeof(c=g[b])?(s=c[0],m=c[1],s!==s?v[m]=t:"string"===typeof s?~(d=t.indexOf(s))&&("number"===typeof c[2]?(v[m]=t.slice(0,d),t=t.slice(d+c[2])):(v[m]=t.slice(d),t=t.slice(0,d))):(d=s.exec(t))&&(v[m]=d[1],t=t.slice(0,d.index)),v[m]=v[m]||o&&c[3]&&e[m]||"",c[4]&&(v[m]=v[m].toLowerCase())):t=c(t);n&&(v.query=n(v.query)),o&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(v.pathname,e.pathname)),"/"!==v.pathname.charAt(0)&&v.hostname&&(v.pathname="/"+v.pathname),r(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(c=v.auth.split(":"),v.username=c[0]||"",v.password=c[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}p.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"===typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,/:\d+$/.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;default:o[t]=e}for(var s=0;s<l.length;s++){var u=l[s];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"===typeof t||(t=i.stringify);var e,n=this,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.slashes?"//":"");return n.username&&(o+=n.username,n.password&&(o+=":"+n.password),o+="@"),o+=n.host+n.pathname,(e="object"===typeof n.query?t(n.query):n.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(o+=n.hash),o}},p.extractProtocol=h,p.location=f,p.trimLeft=u,p.qs=i,t.exports=p}).call(this,n(36))},function(t,e,n){"use strict";t.exports.setItem=function(t,e){return new Promise((function(n){localStorage.setItem(t,e),n()}))},t.exports.getItem=function(t){return Promise.resolve(localStorage.getItem(t))},t.exports.removeItem=function(t){return new Promise((function(e){localStorage.removeItem(t),e()}))}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(390);t.exports=function(t){var e,n;function i(e,n){var r;return(r=t.call(this,e,n)||this).provider=n.provider,r.id=r.provider,r.name=r.opts.name||r.id.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "),r.pluginId=r.opts.pluginId,r}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var o=i.prototype;return o.fileUrl=function(t){return this.hostname+"/search/"+this.id+"/get/"+t},o.search=function(t,e){return e=e?"&"+e:"",this.get("search/"+this.id+"/list?q="+encodeURIComponent(t)+e)},i}(i)},function(t,e,n){var r=n(438);t.exports=function(){function t(t){this.opts=t,this._queued=[],this.isOpen=!1,this.emitter=r(),this._handleMessage=this._handleMessage.bind(this),this.close=this.close.bind(this),this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.once=this.once.bind(this),this.send=this.send.bind(this),t&&!1===t.autoOpen||this.open()}var e=t.prototype;return e.open=function(){var t=this;this.socket=new WebSocket(this.opts.target),this.socket.onopen=function(e){for(t.isOpen=!0;t._queued.length>0&&t.isOpen;){var n=t._queued[0];t.send(n.action,n.payload),t._queued=t._queued.slice(1)}},this.socket.onclose=function(e){t.isOpen=!1},this.socket.onmessage=this._handleMessage},e.close=function(){this.socket&&this.socket.close()},e.send=function(t,e){this.isOpen?this.socket.send(JSON.stringify({action:t,payload:e})):this._queued.push({action:t,payload:e})},e.on=function(t,e){this.emitter.on(t,e)},e.emit=function(t,e){this.emitter.emit(t,e)},e.once=function(t,e){this.emitter.once(t,e)},e._handleMessage=function(t){try{var e=JSON.parse(t.data);this.emit(e.action,e.payload)}catch(n){console.log(n)}},t}()},function(t,e,n){var r=n(235);t.exports=r((function(t,e,n){var r=e.progress,i=e.bytesUploaded,o=e.bytesTotal;r&&(t.uppy.log("Upload progress: "+r),t.uppy.emit("upload-progress",n,{uploader:t,bytesUploaded:i,bytesTotal:o}))}),300,{leading:!0,trailing:!0})},function(t,e){t.exports=function(t){var e=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(t)[1];return(/^http:\/\//i.test(t)?"ws":"wss")+"://"+e}},function(t,e){t.exports=function(t){var e=[],n=[];function r(t){e.push(t)}function i(t){n.push(t)}return Promise.all(t.map((function(t){return t.then(r,i)}))).then((function(){return{successful:e,failed:n}}))}},function(t,e){t.exports=function(){function t(t){this._events=[],this._emitter=t}var e=t.prototype;return e.on=function(t,e){return this._events.push([t,e]),this._emitter.on(t,e)},e.remove=function(){var t=this;this._events.forEach((function(e){var n=e[0],r=e[1];t._emitter.off(n,r)}))},t}()},function(t,e){t.exports=function(t){return!!t&&(0!==t.readyState&&4!==t.readyState||0===t.status)}},function(t,e,n){var r=n(521);function i(){return new Error("Cancelled")}t.exports=function(){function t(t){this.limit="number"!==typeof t||0===t?1/0:t,this.activeRequests=0,this.queuedHandlers=[]}var e=t.prototype;return e._call=function(t){var e=this;this.activeRequests+=1;var n,r=!1;try{n=t()}catch(i){throw this.activeRequests-=1,i}return{abort:function(){r||(r=!0,e.activeRequests-=1,n(),e._queueNext())},done:function(){r||(r=!0,e.activeRequests-=1,e._queueNext())}}},e._queueNext=function(){var t=this;Promise.resolve().then((function(){t._next()}))},e._next=function(){if(!(this.activeRequests>=this.limit)&&0!==this.queuedHandlers.length){var t=this.queuedHandlers.shift(),e=this._call(t.fn);t.abort=e.abort,t.done=e.done}},e._queue=function(t,e){var n=this;void 0===e&&(e={});var i={fn:t,priority:e.priority||0,abort:function(){n._dequeue(i)},done:function(){throw new Error("Cannot mark a queued request as done: this indicates a bug")}},o=r(this.queuedHandlers,(function(t){return i.priority>t.priority}));return-1===o?this.queuedHandlers.push(i):this.queuedHandlers.splice(o,0,i),i},e._dequeue=function(t){var e=this.queuedHandlers.indexOf(t);-1!==e&&this.queuedHandlers.splice(e,1)},e.run=function(t,e){return this.activeRequests<this.limit?this._call(t):this._queue(t,e)},e.wrapPromiseFunction=function(t,e){var n=this;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var s,u=new Promise((function(r,a){s=n.run((function(){var e,n;try{n=Promise.resolve(t.apply(void 0,o))}catch(u){n=Promise.reject(u)}return n.then((function(t){e?a(e):(s.done(),r(t))}),(function(t){e?a(e):(s.done(),a(t))})),function(){e=i()}}),e)}));return u.abort=function(){s.abort()},u}},t}()},function(t,e,n){var r=n(527);t.exports=function(t){return function(e,n){if("undefined"!==typeof window&&("undefined"!==typeof window.PhoneGap||"undefined"!==typeof window.Cordova||"undefined"!==typeof window.cordova)||"undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase())return r.defaultOptions.fingerprint(e,n);var i=["tus",t.id,n.endpoint].join("-");return Promise.resolve(i)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(266),s=n(660),u=n.n(s),l=n(543),c=n(544);e.default=Object(o.a)((function(t){var e=Object(a.useStore)(),n=e.setLines,o=e.setStops,s=e.stops;if(Object(r.useEffect)((function(){n(t.lines),o(t.stops)}),[]),s.length)return i.a.createElement(a.RouteCreatorStoreProvider,{value:a.routeCreatorStore},i.a.createElement("div",{className:u.a.RouteCreator},i.a.createElement(l.default,null),i.a.createElement(c.default,null)))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(267),s=n(662),u=n.n(s),l=n(545),c=n(546);e.default=Object(o.a)((function(t){var e=Object(a.useStore)(),n=e.isInitialised,o=e.initialise;return Object(r.useEffect)((function(){o({stops:t.stops,reorderPath:t.reorderPath,mode:t.mode,trailLine:t.trailLine,token:t.token})}),[]),!!n&&i.a.createElement(a.TrailCreatorStoreProvider,{value:a.trailCreatorStore},i.a.createElement("div",{className:u.a.TrailCreator},i.a.createElement(l.default,null),i.a.createElement(c.default,null)))}))},function(t,e,n){"use strict";n.r(e);var r=n(11),i=n(192),o=r.a.start();o.debug=!1,window.Stimulus=o;var a=n(965);o.load(Object(i.a)(a))},function(t,e,n){var r={"./add_remove_collection_items_controller.js":966,"./check_excel_ready_controller.js":967,"./content_feedback_controller.js":968,"./flash_messages_controller.js":969,"./modal_controller.js":970,"./sort_collection_items_controller.js":971,"./street_view_overlay_creator_controller.js":980,"./switch_to_my_content_controller.js":975,"./toggle_display_controller.js":976,"./upload_data_form_controller.js":977,"./users_controller.js":979};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=965},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(11),i=n(99),o=n.n(i);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function l(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var h=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(c,t);var e,n,r,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"removeItem",value:function(t){var e=t.target.dataset.removeItemPath;o.a.ajax({url:e,type:"DELETE",success:function(){t.target.dataset.removeCard?t.target.closest("div.recordCard").remove():(t.target.dataset.addedState=!1,t.target.checked=!1)},error:function(){t.target.checked=!0}})}},{key:"addItem",value:function(t){var e=t.target.dataset.addItemPath;o.a.ajax({url:e,type:"POST",success:function(){t.target.dataset.addedState=!0,t.target.checked=!0},error:function(){t.target.checked=!1}})}},{key:"toggleItem",value:function(t){switch(t.target.dataset.addedState){case!0:case"true":this.removeItem(t);break;case!1:case"false":this.addItem(t)}}}])&&s(e.prototype,n),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),c}(r.b)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){this.submitButton=document.querySelector(".footer input.primary"),this.spinner=document.createElement("div"),this.spinner.classList.add("spinner"),this.zipStateValid=!1,this.excelStateValid=!1,this.excelExistsValue?this.excelProcessedValue?this.excelStateValid=!0:(this.waitForExcelProcessingComplete(),this.disableButton()):this.disableButton(),this.zipExistsValue?this.zipProcessedValue||(this.waitForZipProcessingComplete(),this.disableButton()):this.zipStateValid=!0}},{key:"disableButton",value:function(){this.submitButton.disabled=!0,this.submitButton.classList.add("is-disabled")}},{key:"enableButton",value:function(){this.submitButton.disabled=!1,this.submitButton.classList.remove("is-disabled")}},{key:"showSpinner",value:function(){this.submitButton.parentNode.insertBefore(this.spinner,this.submitButton)}},{key:"hideSpinner",value:function(){this.spinner.remove()}},{key:"checkReadyToProceed",value:function(){this.excelStateValid&&this.zipStateValid&&this.enableButton(),this.excelInProgress||this.zipInProgress||this.hideSpinner()}},{key:"waitForExcelProcessingComplete",value:function(t){var e=this;this.excelInProgress=!0,this.showSpinner(),this.disableButton(),this.excelPollingInterval||(this.excelPollingInterval=setInterval((function(){e.checkExcelFile()}),1e3))}},{key:"waitForZipProcessingComplete",value:function(t){var e=this;this.zipInProgress=!0,this.zipStateValid=!1,this.showSpinner(),this.disableButton(),this.zipPollingInterval||(this.zipPollingInterval=setInterval((function(){e.checkZipFile()}),1e3))}},{key:"checkExcelFile",value:function(){var t=this;this.recordImportIdValue?fetch("/record_imports/".concat(this.recordImportIdValue,"/poll_excel_file"),{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((function(t){return t.json()})).then((function(e){e.excel_file_processed?(console.log("Excel file is processed."),clearInterval(t.excelPollingInterval),t.excelStateValid=!0,t.excelInProgress=!1,t.checkReadyToProceed()):console.log("Excel file is not processed.")})).catch((function(t){console.error("Error polling for excel file:",t)})):console.error("RecordImport ID not provided.")}},{key:"checkZipFile",value:function(){var t=this;this.recordImportIdValue?fetch("/record_imports/".concat(this.recordImportIdValue,"/poll_zip_file"),{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((function(t){return t.json()})).then((function(e){e.zip_file_processed?(console.log("Zip file is processed."),clearInterval(t.zipPollingInterval),t.zipStateValid=!0,t.zipInProgress=!1,t.checkReadyToProceed()):console.log("Zip file is not processed.")})).catch((function(t){console.error("Error polling for Zip file:",t)})):console.error("RecordImport ID not provided.")}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=[],l.values={recordImportId:Number,excelExists:Boolean,excelProcessed:Boolean,zipExists:Boolean,zipProcessed:Boolean}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"toggleSelection",value:function(t){switch(t.target.value){case"positive":this.enable(this.positiveOptionsTarget),this.disable(this.negativeOptionsTarget),this.disable(this.suggestBetterOptionsTarget);break;case"negative":this.disable(this.positiveOptionsTarget),this.enable(this.negativeOptionsTarget),this.disable(this.suggestBetterOptionsTarget);break;case"suggest_better":this.disable(this.positiveOptionsTarget),this.disable(this.negativeOptionsTarget),this.enable(this.suggestBetterOptionsTarget)}}},{key:"enable",value:function(t){var e;t.classList.remove("hidden"),null===(e=t.querySelector("select"))||void 0===e||e.removeAttribute("disabled")}},{key:"disable",value:function(t){var e;t.classList.add("hidden"),null===(e=t.querySelector("select"))||void 0===e||e.setAttribute("disabled",!0)}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["positiveOptions","negativeOptions","suggestBetterOptions"]},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){var t=this;setTimeout((function(){t.element.style.opacity=1}),500),setTimeout(this.fadeOutAndRemove.bind(this),3e3)}},{key:"fadeOutAndRemove",value:function(){var t=this;this.element.style.opacity=0,this.element.addEventListener("transitionend",(function(){t.element.remove()}))}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){var t;r(this,l);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(t=u.call.apply(u,[this].concat(n))).modalElement="",t.isOpen=!1,t.body=document.getElementsByTagName("body")[0],t}return e=l,(n=[{key:"connect",value:function(){this.modalContentHolderTarget.style.display="none",document.addEventListener("click",this.handleClick.bind(this));var t=document.createElement("button");t.classList.add("primary-close-button"),t.classList.add("close-button"),this.modalContentTarget.prepend(t),this.hasSecondaryCloseButtonTarget&&this.secondaryCloseButtonTarget.classList.add("close-button")}},{key:"handleClick",value:function(t){this.openButtonTarget.contains(t.target)?this.openModal(t):this.isOpen&&(t.target.classList.contains("appended-modal")||t.target.classList.contains("close-button"))&&this.closeModal()}},{key:"openModal",value:function(t){this.isOpen=!0;var e=this.modalContentTarget;this.modalContentTarget.remove();var n=document.createElement("div");n.className="appended-modal";var r=document.createElement("div");r.className="modal-inner",e.classList.add("modal-content"),r.appendChild(e),n.appendChild(r),this.modalElement=n;var i=this.element.closest(".is-fullscreen");i?i.appendChild(n):this.body.appendChild(n),this.body.style.overflow="hidden"}},{key:"closeModal",value:function(){var t=this.modalElement.querySelector(".modal-content");this.modalContentHolderTarget.append(t),this.isOpen=!1,this.modalElement.remove(),this.modalElement="",this.body.style.overflow="visible"}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["openButton","secondaryCloseButton","modalContentHolder","modalContent"]},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return p}));var r=n(11),i=n(302),o=n(99),a=n.n(o);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function c(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var p=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(f,t);var e,n,r,o=c(f);function f(){return s(this,f),o.apply(this,arguments)}return e=f,(n=[{key:"connect",value:function(){this.sortable=i.b.create(this.sortableItemsContainerTarget,{animation:250,onEnd:this.saveItemPosition.bind(this)})}},{key:"storePreviousSortOrder",value:function(t){t.currentTarget.setAttribute("data-previous",t.currentTarget.value)}},{key:"sortOrderChanged",value:function(t){var e=t.currentTarget.getAttribute("data-previous");"custom"!==e||!0===confirm("You will lose your manually created ordering if you do this!")?("custom"===t.currentTarget.value?(this.element.classList.add("allowSort"),this.sortable.option("disabled",!1)):(this.element.classList.remove("allowSort"),this.sortable.option("disabled",!0)),this.sortCards(t.currentTarget.value),this.rewritePositions()):t.currentTarget.value=e}},{key:"sortCards",value:function(t){var e=this;Array.from(this.sortableItemsContainerTarget.querySelectorAll(".recordCard")).sort((function(e,n){switch(t){case"name":return e.dataset.name.localeCompare(n.dataset.name);case"latest":return new Date(e.dataset.createdAt)-new Date(n.dataset.createdAt);case"date_to":return new Date(e.dataset.dateTo)-new Date(n.dataset.dateTo);case"date_from":return new Date(e.dataset.dateFrom)-new Date(n.dataset.dateFrom)}})).forEach((function(t){return e.sortableItemsContainerTarget.appendChild(t)}))}},{key:"onFinishDrag",value:function(t){window.theEvent=t,this.rewritePositions()}},{key:"saveItemPosition",value:function(t){window.theEvent=t;var e=new FormData;e.append("position",t.newIndex+1),a.a.ajax({url:t.item.dataset.reorderPath,type:"PATCH",data:e})}},{key:"rewritePositions",value:function(){this.sortableItemsContainerTarget.querySelectorAll(".recordCard").forEach((function(t,e){t.setAttribute("data-position",e+1)}))}}])&&u(e.prototype,n),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),f}(r.b);p.targets=["sortableItemsContainer"]},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var a=function(){return"function"===typeof Symbol},s=function(t){return a()&&Boolean(Symbol[t])},u=function(t){return s(t)?Symbol[t]:"@@"+t};a()&&!s("observable")&&(Symbol.observable=Symbol("observable"));var l=u("iterator"),c=u("observable"),f=u("species");function h(t,e){var n=t[e];if(null!=n){if("function"!==typeof n)throw new TypeError(n+" is not a function");return n}}function p(t){var e=t.constructor;return void 0!==e&&null===(e=e[f])&&(e=void 0),void 0!==e?e:x}function d(t){return t instanceof x}function m(t){m.log?m.log(t):setTimeout((function(){throw t}))}function g(t){Promise.resolve().then((function(){try{t()}catch(e){m(e)}}))}function y(t){var e=t._cleanup;if(void 0!==e&&(t._cleanup=void 0,e))try{if("function"===typeof e)e();else{var n=h(e,"unsubscribe");n&&n.call(e)}}catch(r){m(r)}}function v(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function b(t,e,n){t._state="running";var r=t._observer;try{var i=h(r,e);switch(e){case"next":i&&i.call(r,n);break;case"error":if(v(t),!i)throw n;i.call(r,n);break;case"complete":v(t),i&&i.call(r)}}catch(o){m(o)}"closed"===t._state?y(t):"running"===t._state&&(t._state="ready")}function _(t,e,n){if("closed"!==t._state){if("buffering"!==t._state)return"ready"!==t._state?(t._state="buffering",t._queue=[{type:e,value:n}],void g((function(){return function(t){var e=t._queue;if(e){t._queue=void 0,t._state="ready";for(var n=0;n<e.length&&(b(t,e[n].type,e[n].value),"closed"!==t._state);++n);}}(t)}))):void b(t,e,n);t._queue.push({type:e,value:n})}}var A=function(){function t(e,n){r(this,t),this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var i=new w(this);try{this._cleanup=n.call(void 0,i)}catch(o){i.error(o)}"initializing"===this._state&&(this._state="ready")}return o(t,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(v(this),y(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),t}(),w=function(){function t(e){r(this,t),this._subscription=e}return o(t,[{key:"next",value:function(t){_(this._subscription,"next",t)}},{key:"error",value:function(t){_(this._subscription,"error",t)}},{key:"complete",value:function(){_(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),t}(),x=function(){function t(e){if(r(this,t),!(this instanceof t))throw new TypeError("Observable cannot be called as a function");if("function"!==typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}return o(t,[{key:"subscribe",value:function(t){return"object"===typeof t&&null!==t||(t={next:t,error:arguments[1],complete:arguments[2]}),new A(t,this._subscriber)}},{key:"forEach",value:function(t){var e=this;return new Promise((function(n,r){if("function"===typeof t)var i=e.subscribe({next:function(e){try{t(e,o)}catch(n){r(n),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(t+" is not a function"));function o(){i.unsubscribe(),n()}}))}},{key:"map",value:function(t){var e=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");return new(p(this))((function(n){return e.subscribe({next:function(e){try{e=t(e)}catch(r){return n.error(r)}n.next(e)},error:function(t){n.error(t)},complete:function(){n.complete()}})}))}},{key:"filter",value:function(t){var e=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");return new(p(this))((function(n){return e.subscribe({next:function(e){try{if(!t(e))return}catch(r){return n.error(r)}n.next(e)},error:function(t){n.error(t)},complete:function(){n.complete()}})}))}},{key:"reduce",value:function(t){var e=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");var n=p(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n((function(n){return e.subscribe({next:function(e){var o=!i;if(i=!0,!o||r)try{a=t(a,e)}catch(s){return n.error(s)}else a=e},error:function(t){n.error(t)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))}},{key:"concat",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=p(this);return new i((function(e){var r,o=0;return function t(a){r=a.subscribe({next:function(t){e.next(t)},error:function(t){e.error(t)},complete:function(){o===n.length?(r=void 0,e.complete()):t(i.from(n[o++]))}})}(t),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(t){var e=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");var n=p(this);return new n((function(r){var i=[],o=e.subscribe({next:function(e){if(t)try{e=t(e)}catch(s){return r.error(s)}var o=n.from(e).subscribe({next:function(t){r.next(t)},error:function(t){r.error(t)},complete:function(){var t=i.indexOf(o);t>=0&&i.splice(t,1),a()}});i.push(o)},error:function(t){r.error(t)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(t){return t.unsubscribe()})),o.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(e){var n="function"===typeof this?this:t;if(null==e)throw new TypeError(e+" is not an object");var r=h(e,c);if(r){var i=r.call(e);if(Object(i)!==i)throw new TypeError(i+" is not an object");return d(i)&&i.constructor===n?i:new n((function(t){return i.subscribe(t)}))}if(s("iterator")&&(r=h(e,l)))return new n((function(t){g((function(){if(!t.closed){var n=!0,i=!1,o=void 0;try{for(var a,s=r.call(e)[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(t.next(u),t.closed)return}}catch(l){i=!0,o=l}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}t.complete()}}))}));if(Array.isArray(e))return new n((function(t){g((function(){if(!t.closed){for(var n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}}))}));throw new TypeError(e+" is not observable")}},{key:"of",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i="function"===typeof this?this:t;return new i((function(t){g((function(){if(!t.closed){for(var e=0;e<n.length;++e)if(t.next(n[e]),t.closed)return;t.complete()}}))}))}},{key:f,get:function(){return this}}]),t}();e.Observable=x,a()&&Object.defineProperty(x,Symbol("extensions"),{value:{symbol:c,hostReportError:m},configurable:!0})},function(t,e,n){"use strict";(function(t,e){var r,i=n(586);r="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof t?t:e;Object(i.a)(r)}).call(this,n(36),n(468)(t))},function(t,e,n){"use strict";(function(t){}).call(this,n(68))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"submitForm",value:function(t){t.currentTarget.closest("form").submit()}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){console.log("toggle display controller connected")}},{key:"show",value:function(){var t=this.toggleableTarget;t.classList.remove("toggleable--is-hidden"),t.classList.add("toggleable--is-shown")}},{key:"hide",value:function(){var t=this.toggleableTarget;t.classList.remove("toggleable--is-shown"),t.classList.add("toggleable--is-hidden")}},{key:"toggle",value:function(){this.toggleableTargets.forEach((function(t){t.classList.contains("toggleable--is-hidden")?(t.classList.remove("toggleable--is-hidden"),t.classList.add("toggleable--is-shown")):t.classList.contains("toggleable--is-shown")&&(t.classList.remove("toggleable--is-shown"),t.classList.add("toggleable--is-hidden"))}))}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["toggleable"]},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return v}));var r=n(11),i=n(91),o=n.n(i),a=n(400),s=n.n(a),u=n(362),l=n.n(u),c=n(401),f=n.n(c);n(647),n(978),n(523);function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(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){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function m(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=y(t);if(e){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var v=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(a,t);var e,n,r,i=m(a);function a(){return h(this,a),i.apply(this,arguments)}return e=a,(n=[{key:"connect",value:function(){var t=this,e=this.element.dataset.fileType,n=[];switch(e){case"excel":n.push(".xlsx");break;case"zip":n.push(".zip")}new o.a({id:"uppy-".concat(e),autoProceed:!0,restrictions:{allowedFileTypes:n},maxNumberOfFiles:1}).use(s.a,{target:this.element.querySelector(".uppyDragAndDrop"),height:180}).use(f.a,{endpoint:document.querySelector("meta[name=tus-url]").getAttribute("content"),storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!0,chunkSize:50*Math.pow(1024,2)}).use(l.a,{target:this.element.querySelector(".uppyDragAndDrop-statusBar"),hideAfterFinish:!1}).on("complete",(function(t){0===t.failed.length?(window.dispatchEvent(new CustomEvent("".concat(e,"-success"))),console.log("Upload successful")):console.warn("Upload failed")})).on("file-added",(function(e){t.element.querySelector(".activeUploadPane .filename").textContent=e.name})).on("restriction-failed",(function(e,n){t.element.querySelector(".activeUploadPane .filename").textContent="Not an allowed file type"})).on("upload",(function(n){t.element.querySelector(".activeUploadPane").classList.add("isActive"),t.element.querySelector(".uppyDragAndDrop").remove(),window.dispatchEvent(new CustomEvent("".concat(e,"-uploading")))})).setMeta({user_token:document.querySelector("meta[name=user-token]").getAttribute("content"),resource_gid:document.querySelector("meta[name=resource-gid]").getAttribute("content"),file_type:e})}}])&&p(e.prototype,n),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.b);v.targets=[]},function(t,e,n){},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.r(e),n.d(e,"default",(function(){return l}));var l=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(l,t);var e,n,s,u=a(l);function l(){return r(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"generateApiToken",value:function(t){var e=this;t.preventDefault();var n=this.data.get("id");Rails.ajax({type:"POST",url:"/users/".concat(n,"/generate_api_token"),data:"",success:function(t){e.tokenInputTarget.value=t.api_token},error:function(){alert("Oops, something went wrong.")}})}}])&&i(e.prototype,n),s&&i(e,s),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(11).b);l.targets=["tokenInput"]},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return B}));var r=n(11),i=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!==i--;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var a=o[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n};const o="__googleMapsScriptId";var a;!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(a||(a={}));class s{constructor({apiKey:t,authReferrerPolicy:e,channel:n,client:r,id:a=o,language:u,libraries:l=[],mapIds:c,nonce:f,region:h,retries:p=3,url:d="https://maps.googleapis.com/maps/api/js",version:m}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=n,this.client=r,this.id=a||o,this.language=u,this.libraries=l,this.mapIds=c,this.nonce=f,this.region=h,this.retries=p,this.url=d,this.version=m,s.instance){if(!i(this.options,s.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(s.instance.options)}`);return s.instance}s.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?a.FAILURE:this.done?a.SUCCESS:this.loading?a.LOADING:a.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+=`?callback=${this.CALLBACK}`,this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`&region=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){const t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((t,e)=>{this.loadCallback((n=>{n?e(n.error):t(window.google)}))}))}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){if(document.getElementById(this.id))return void this.callback();const t=this.createUrl(),e=document.createElement("script");e.id=this.id,e.type="text/javascript",e.src=t,e.onerror=this.loadErrorCallback.bind(this),e.defer=!0,e.async=!0,this.nonce&&(e.nonce=this.nonce),document.head.appendChild(e)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=t,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((t=>{t(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}n(615);var u=n(5);!function(t){function e(){var e=this||self;e.globalThis=e,delete t.prototype._T_}"object"!==typeof globalThis&&(this?e():(t.defineProperty(t.prototype,"_T_",{configurable:!0,get:e}),_T_))}(Object);var l=globalThis,c=l,f=c.console,h="Invariant Violation",p=Object.setPrototypeOf,d=void 0===p?function(t,e){return t.__proto__=e,t}:p,m=function(t){function e(n){void 0===n&&(n=h);var r=t.call(this,"number"===typeof n?h+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=h,d(r,e.prototype),r}return Object(u.b)(e,t),e}(Error);function g(t,e){if(!t)throw new m(e)}var y=["log","warn","error","silent"],v=y.indexOf("log");function b(t){return function(){if(y.indexOf(t)>=v)return f[t].apply(f,arguments)}}!function(t){t.log=b("log"),t.warn=b("warn"),t.error=b("error")}(g||(g={}));var _=c.process||{env:{}};if(!c.process)try{Object.defineProperty(l,"process",{value:_})}catch(z){}n(585);var A=Object.prototype.hasOwnProperty;function w(t){return null!==t&&"object"===typeof t}var x=function(t,e,n){return this.merge(t[n],e[n])};!function(){function t(t){void 0===t&&(t=x),this.reconciler=t,this.isObject=w,this.pastCopies=new Set}t.prototype.merge=function(t,e){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return w(e)&&w(t)?(Object.keys(e).forEach((function(i){if(A.call(t,i)){var o=t[i];if(e[i]!==o){var a=n.reconciler.apply(n,Object(u.d)([t,e,i],r));a!==o&&((t=n.shallowCopyForMerge(t))[i]=a)}}else(t=n.shallowCopyForMerge(t))[i]=e[i]})),t):e},t.prototype.shallowCopyForMerge=function(t){return w(t)&&!this.pastCopies.has(t)&&(t=Array.isArray(t)?t.slice(0):Object(u.a)({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t)),t}}();var E=n(395),O=n.n(E);n(973);O.a.prototype["@@observable"]=function(){return this};Object.prototype.toString;n(974);function S(t,e,n){var r=[];t.forEach((function(t){return t[e]&&r.push(t)})),r.forEach((function(t){return t[e](n)}))}function P(t){return t&&"function"===typeof t.then}!function(t){function e(e){Object.defineProperty(t,e,{value:O.a})}"function"===typeof Symbol&&Symbol.species&&e(Symbol.species),e("@@species")}(function(t){function e(e){var n=t.call(this,(function(t){return n.addObserver(t),function(){return n.removeObserver(t)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(t,e){n.resolve=t,n.reject=e})),n.handlers={next:function(t){null!==n.sub&&(n.latest=["next",t],S(n.observers,"next",t))},error:function(t){var e=n.sub;null!==e&&(e&&Promise.resolve().then((function(){return e.unsubscribe()})),n.sub=null,n.latest=["error",t],n.reject(t),S(n.observers,"error",t))},complete:function(){if(null!==n.sub){var t=n.sources.shift();t?P(t)?t.then((function(t){return n.sub=t.subscribe(n.handlers)})):n.sub=t.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),S(n.observers,"complete"))}}},n.cancel=function(t){n.reject(t),n.sources=[],n.handlers.complete()},n.promise.catch((function(t){})),"function"===typeof e&&(e=[new O.a(e)]),P(e)?e.then((function(t){return n.start(t)}),n.handlers.error):n.start(e),n}return Object(u.b)(e,t),e.prototype.start=function(t){void 0===this.sub&&(this.sources=Array.from(t),this.handlers.complete())},e.prototype.deliverLastMessage=function(t){if(this.latest){var e=this.latest[0],n=t[e];n&&n.call(t,this.latest[1]),null===this.sub&&"next"===e&&t.complete&&t.complete()}},e.prototype.addObserver=function(t){this.observers.has(t)||(this.deliverLastMessage(t),this.observers.add(t),++this.addCount)},e.prototype.removeObserver=function(t,e){this.observers.delete(t)&&--this.addCount<1&&!e&&this.handlers.error(new Error("Observable cancelled prematurely"))},e.prototype.cleanup=function(t){var e=this,n=!1,r=function(){n||(n=!0,e.observers.delete(i),t())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},e}(O.a));"function"===typeof WeakMap&&"object"===typeof navigator&&navigator.product;function C(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 T(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(){k=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function I(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function L(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){I(o,r,i,a,s,"next",t)}function s(t){I(o,r,i,a,s,"throw",t)}a(void 0)}))}}function j(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(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 R(t,e){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},R(t,e)}function N(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=F(t);if(e){var i=F(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return D(this,n)}}function D(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function F(t){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},F(t)}var B=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&R(t,e)}(u,t);var e,n,r,i,o,a=N(u);function u(){return j(this,u),a.apply(this,arguments)}return e=u,n=[{key:"connect",value:(o=L(k().mark((function t(){var e=this;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadGoogleMaps();case 2:this.baseLat=this.element.dataset.lat,this.baseLng=this.element.dataset.lng,this.streetViewService.getPanorama({location:new google.maps.LatLng(this.baseLat,this.baseLng),source:google.maps.StreetViewSource.OUTDOOR},(function(t,n){n===google.maps.StreetViewStatus.OK?(e.initialiseVars(),e.createMap(),e.createStreetView(),e.createImage(),e.bindEvents(),e.showForm()):e.showMessage()}));case 5:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"loadGoogleMaps",value:(i=L(k().mark((function t(){var e;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new s({apiKey:this.element.dataset.apiKey,version:"weekly",libraries:["geometry"]}),t.next=3,e.load();case 3:this.streetViewService=new google.maps.StreetViewService;case 4:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"bindEvents",value:function(){var t=this;this.fileTarget.addEventListener("change",(function(){t.addRefreshField(),t.element.closest("form").submit()}))}},{key:"toggleMoreAttributionFields",value:function(t){t.target.checked?(this.advancedFieldsTarget.classList.remove("toggleable--is-hidden"),this.advancedFieldsTarget.classList.add("toggleable--is-shown"),this.basicFieldsTarget.querySelector(".basic").classList.remove("toggleable--is-shown"),this.basicFieldsTarget.querySelector(".basic").classList.add("toggleable--is-hidden"),this.basicFieldsTarget.querySelector(".advanced").classList.remove("toggleable--is-hidden"),this.basicFieldsTarget.querySelector(".advanced").classList.add("toggleable--is-shown")):(this.advancedFieldsTarget.classList.remove("toggleable--is-shown"),this.advancedFieldsTarget.classList.add("toggleable--is-hidden"),this.basicFieldsTarget.querySelector(".basic").classList.remove("toggleable--is-hidden"),this.basicFieldsTarget.querySelector(".basic").classList.add("toggleable--is-shown"),this.basicFieldsTarget.querySelector(".advanced").classList.remove("toggleable--is-shown"),this.basicFieldsTarget.querySelector(".advanced").classList.add("toggleable--is-hidden"))}},{key:"addRefreshField",value:function(){var t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","next_step"),t.setAttribute("value","media"),this.element.appendChild(t);var e=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","streetview_image_added"),t.setAttribute("value","true"),this.element.appendChild(e)}},{key:"remove",value:function(t){if(t.preventDefault(),!confirm(t.currentTarget.dataset.prompt))return!1;this.removeTarget.removeAttribute("disabled"),this.removeTarget.setAttribute("value",!0),this.addRefreshField(),this.element.closest("form").submit()}},{key:"initialiseVars",value:function(){this.lat=Number(this.baseLat),this.lng=Number(this.baseLng),this.zoom=16,this.slat=this.lat,this.slng=this.lng,this.image=this.imageDivTarget.dataset.imageUrl,this.pt=new google.maps.LatLng(this.lat,this.lng),this.streetPosition=new google.maps.LatLng(this.slat,this.slng);try{this.existingMetadataJSON=JSON.parse(this.metadataCleanTarget.value)}catch(i){console.log(i)}var t,e,n,r;this.existingMetadataJSON?(this.sheading=this.existingMetadataJSON.heading,this.spitch=this.existingMetadataJSON.pitch,this.szoom=this.existingMetadataJSON.zoom,this.imageHeading=null!==(t=this.existingMetadataJSON.imageHeading)&&void 0!==t?t:0,this.imagePitch=null!==(e=this.existingMetadataJSON.imagePitch)&&void 0!==e?e:0,this.imageScale=null!==(n=this.existingMetadataJSON.imageScale)&&void 0!==n?n:.4,this.imageOpacity=null!==(r=this.existingMetadataJSON.imageOpacity)&&void 0!==r?r:1,this.imageCrop=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){T(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.existingMetadataJSON.imageCrop)):(this.sheading=0,this.spitch=0,this.szoom=1,this.imageHeading=0,this.imagePitch=0,this.imageScale=.4,this.imageOpacity=1,this.imageCrop={width:100,height:100,top:0,right:0,bottom:0,left:0,topCss:0,bottomCss:0}),this.imagePosition={heading:this.imageHeading,pitch:this.imagePitch,scale:this.imageScale,opacity:this.imageOpacity},this.imageSizeInputTarget.value=.4,this.opacityInputTarget.value=1}},{key:"showForm",value:function(){this.element.classList.remove("toggleable--is-hidden")}},{key:"showMessage",value:function(){document.querySelector(".noStreetViewMessage").classList.add("toggleable--is-shown"),document.querySelector(".noStreetViewMessage").classList.remove("toggleable--is-hidden")}},{key:"createMap",value:function(){var t={center:this.pt,zoom:this.zoom,mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:!1,mapTypeControl:!1,disableDefaultUI:!0};this.map=new google.maps.Map(this.mapDivTarget,t),this.mapMarker=new google.maps.Marker({position:this.streetPosition,map:this.map,title:"Hello World!"})}},{key:"createStreetView",value:function(){var t=this.panoramaDivTarget,e={zoomControl:!1,linksControl:!1,disableDefaultUI:!0,pov:{heading:this.sheading,pitch:this.spitch,zoom:this.szoom}};e.position=this.streetPosition,this.panorama=new google.maps.StreetViewPanorama(t,e),this.map.setStreetView(this.panorama),google.maps.event.addListener(this.panorama,"pov_changed",function(){this.updateImagePosition()}.bind(this)),google.maps.event.addListener(this.panorama,"zoom_changed",function(){this.updateImagePosition()}.bind(this)),google.maps.event.addListener(this.panorama,"position_changed",function(){this.streetPosition=this.panorama.getPosition(),this.map.setCenter(this.streetPosition),this.mapMarker.setPosition(this.streetPosition),this.updateImagePosition.bind(this)}.bind(this))}},{key:"createImage",value:function(){this.imageDivTarget.style.width=this.imageWidth+"px",this.imageDivTarget.style.height=this.imageHeight+"px",this.imageDivTarget.innerHTML="<img src='"+this.image+"' width='100%' height='100%' alt='' />",this.cropImage(),this.updateImagePosition()}},{key:"cropImage",value:function(t,e){var n=this.imageDivTarget.querySelector("img");n.style.marginLeft=this.imageCrop.left+"%",n.style.marginTop=this.imageCrop.topCss+"%",n.style.marginBottom=this.imageCrop.bottomCss+"%",n.style.marginRight=this.imageCrop.right+"%",n.style.width=this.imageCrop.width+"%",n.style.height=this.imageCrop.height+"%"}},{key:"updateImagePosition",value:function(){this.imagePosition={heading:this.imageHeading,pitch:this.imagePitch,scale:this.imageScale,opacity:this.imageOpacity},this.updateImage(this.imagePosition,this.panorama.getPov())}},{key:"updateImage",value:function(t,e){var n=Math.pow(2,e.zoom)/2,r=this.convertPointProjection(e,t,n),i=100*t.scale*n;this.imageDivTarget.style.left=r.x+"%",this.imageDivTarget.style.top=r.y+"%",this.imageDivTarget.style.width=i+"%",this.imageDivTarget.style.opacity=this.imageOpacity,this.updateInfo()}},{key:"convertPointProjection",value:function(t,e,n){var r=90/n,i=90/n,o=e.heading-t.heading;o=this.normalizeAngle(o),o/=r;var a=t.pitch-e.pitch;return{x:100*(.5+o),y:100*(.5+(a/=i))}}},{key:"updateInfo",value:function(){var t=this.panorama.getPov(),e={lat:this.streetPosition.lat(),lng:this.streetPosition.lng(),heading:t.heading,pitch:t.pitch,zoom:t.zoom,imageHeading:this.imageHeading,imagePitch:this.imagePitch,imageScale:this.imageScale,imageOpacity:this.imageOpacity,imageCrop:{width:100,height:100,top:0,right:0,bottom:0,left:0,topCss:0,bottomCss:0}};this.metadataTarget.value=JSON.stringify(e)}},{key:"moveImage",value:function(t){t.preventDefault(),this.imageHeading+=Number(t.target.dataset.moveX),this.imagePitch+=Number(t.target.dataset.moveY),this.updateImagePosition()}},{key:"resizeImage",value:function(){this.imageScale=this.imageSizeInputTarget.value,this.updateImagePosition()}},{key:"adjustOpacity",value:function(){this.imageOpacity=this.opacityInputTarget.value,this.updateImagePosition()}},{key:"recenterImage",value:function(t){t.preventDefault();var e=this.panorama.getPov();this.imageHeading=e.heading,this.imagePitch=e.pitch,this.updateImagePosition()}},{key:"normalizeAngle",value:function(t){for(;t>180;)t-=360;for(;t<-180;)t+=360;return t}}],n&&M(e.prototype,n),r&&M(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(r.b);B.targets=["output","mapDiv","imageDiv","panoramaDiv","imageSizeInput","opacityInput","metadata","metadataClean","file","message","remove","advancedFields","basicFields","showMore"]},function(t,e,n){"use strict";function r(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=i(t.properties),e.geometry=o(t.geometry),e}function i(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"===typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=i(r):e[n]=r})),e):e}function o(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return o(t)})),e):(e.coordinates=a(t.coordinates),e)}function a(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map((function(t){return a(t)}))}n.r(e);var s=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return r(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return r(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return o(t);default:throw new Error("unknown GeoJSON type")}},u=n(224),l=n(180),c=6371008.8,f={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*c,kilometers:6371.0088,kilometres:6371.0088,meters:c,metres:c,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:c/1852,radians:1,yards:5825721.287490856};function h(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function p(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!v(t[0])||!v(t[1]))throw new Error("coordinates must contain numbers");return h({type:"Point",coordinates:t},e,n)}function d(t,e){void 0===e&&(e="kilometers");var n=f[e];if(!n)throw new Error(e+" units is invalid");return t/n}function m(t){return 180*(t%(2*Math.PI))/Math.PI}function g(t){return t%360*Math.PI/180}function y(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return function(t,e){void 0===e&&(e="kilometers");var n=f[e];if(!n)throw new Error(e+" units is invalid");return t*n}(d(t,e),n)}function v(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function b(t){return!!t&&t.constructor===Object}function _(t,e,n){if(null!==t)for(var r,i,o,a,s,u,l,c,f=0,h=0,p=t.type,d="FeatureCollection"===p,m="Feature"===p,g=d?t.features.length:1,y=0;y<g;y++){s=(c=!!(l=d?t.features[y].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var v=0;v<s;v++){var b=0,A=0;if(null!==(a=c?l.geometries[v]:l)){u=a.coordinates;var w=a.type;switch(f=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,h,y,b,A))return!1;h++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],h,y,b,A))return!1;h++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===e(u[r][i],h,y,b,A))return!1;h++}"MultiLineString"===w&&b++,"Polygon"===w&&A++}"Polygon"===w&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(A=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-f;o++){if(!1===e(u[r][i][o],h,y,b,A))return!1;h++}A++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===_(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function A(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function w(t){var e=[1/0,1/0,-1/0,-1/0];return _(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}w.default=w;var x=w;function E(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")}function O(t,e){var n=g(t[1]),r=g(e[1]),i=g(e[0]-t[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(m(Math.atan2(i,o))+360)%360}var S=function(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?O(E(e),E(t)):O(E(t),E(e)))>180?-(360-r):r};var P=function(t,e,n){void 0===n&&(n={});var r=E(t),i=E(e);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var o=function(t,e,n){var r=n=void 0===n?c:Number(n),i=t[1]*Math.PI/180,o=e[1]*Math.PI/180,a=o-i,s=Math.abs(e[0]-t[0])*Math.PI/180;s>Math.PI&&(s-=2*Math.PI);var u=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?a/u:Math.cos(i);return Math.sqrt(a*a+l*l*s*s)*r}(r,i);return y(o,"meters",n.units)};var C=function(t,e,n,r){void 0===r&&(r={});var i=e<0,o=y(Math.abs(e),r.units,"meters");i&&(o=-Math.abs(o));var a=E(t),s=function(t,e,n,r){r=void 0===r?c:Number(r);var i=e/r,o=t[0]*Math.PI/180,a=g(t[1]),s=g(n),u=i*Math.cos(s),l=a+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var f=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(f)>1e-11?u/f:Math.cos(a),p=i*Math.sin(s)/h;return[(180*(o+p)/Math.PI+540)%360-180,180*l/Math.PI]}(a,o,n);return s[0]+=s[0]-a[0]>180?-360:a[0]-s[0]>180?360:0,p(s,r.properties)};function T(t,e,n){var r,i="Point"===("FeatureCollection"===(r=t).type?"FeatureCollection":"GeometryCollection"===r.type?"GeometryCollection":"Feature"===r.type&&null!==r.geometry?r.geometry.type:r.type);return n=function(t,e){void 0!==e&&null!==e||(e="centroid");if(Array.isArray(e)||"object"===typeof e)return E(e);var n=t.bbox?t.bbox:x(t),r=n[0],i=n[1],o=n[2],a=n[3];switch(e){case"sw":case"southwest":case"westsouth":case"bottomleft":return p([r,i]);case"se":case"southeast":case"eastsouth":case"bottomright":return p([o,i]);case"nw":case"northwest":case"westnorth":case"topleft":return p([r,a]);case"ne":case"northeast":case"eastnorth":case"topright":return p([o,a]);case"center":return Object(u.default)(t);case void 0:case null:case"centroid":return Object(l.default)(t);default:throw new Error("invalid origin")}}(t,n),1===e||i||_(t,(function(t){var r=P(n,t),i=S(n,t),o=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(C(n,r*e,i));t[0]=o[0],t[1]=o[1],3===t.length&&(t[2]*=e)})),t}e.default=function(t,e,n){if(!b(n=n||{}))throw new Error("options is invalid");var r=n.origin,i=n.mutate;if(!t)throw new Error("geojson required");if("number"!==typeof e||0===e)throw new Error("invalid factor");var o=Array.isArray(r)||"object"===typeof r;return!0!==i&&(t=s(t)),"FeatureCollection"!==t.type||o?T(t,e,r):(A(t,(function(n,i){t.features[i]=T(n,e,r)})),t)}},function(t,e,n){"use strict";function r(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=i(t.properties),e.geometry=o(t.geometry),e}function i(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"===typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=i(r):e[n]=r})),e):e}function o(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return o(t)})),e):(e.coordinates=a(t.coordinates),e)}function a(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map((function(t){return a(t)}))}n.r(e);var s=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return r(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return r(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return o(t);default:throw new Error("unknown GeoJSON type")}};function u(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function l(t){return!!t&&t.constructor===Object}function c(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function f(t){for(var e,n,r=c(t),i=0,o=1;o<r.length;)e=n||r[0],i+=((n=r[o])[0]-e[0])*(n[1]+e[1]),o++;return i>0}function h(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function p(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}function d(t,e){switch("Feature"===t.type?t.geometry.type:t.type){case"GeometryCollection":return p(t,(function(t){d(t,e)})),t;case"LineString":return m(c(t),e),t;case"Polygon":return g(c(t),e),t;case"MultiLineString":return c(t).forEach((function(t){m(t,e)})),t;case"MultiPolygon":return c(t).forEach((function(t){g(t,e)})),t;case"Point":case"MultiPoint":return t}}function m(t,e){f(t)===e&&t.reverse()}function g(t,e){f(t[0])!==e&&t[0].reverse();for(var n=1;n<t.length;n++)f(t[n])===e&&t[n].reverse()}e.default=function(t,e){if(!l(e=e||{}))throw new Error("options is invalid");var n=e.reverse||!1,r=e.mutate||!1;if(!t)throw new Error("<geojson> is required");if("boolean"!==typeof n)throw new Error("<reverse> must be a boolean");if("boolean"!==typeof r)throw new Error("<mutate> must be a boolean");!1===r&&(t=s(t));var i=[];switch(t.type){case"GeometryCollection":return p(t,(function(t){d(t,n)})),t;case"FeatureCollection":return h(t,(function(t){h(d(t,n),(function(t){i.push(t)}))})),u(i)}return d(t,n)}},function(t,e,n){"use strict";n.r(e);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:5825721.287490856};function o(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!c(t[0])||!c(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function s(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function u(t){return t%360*Math.PI/180}function l(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return function(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}(s(t,e),n)}function c(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function f(t){return!!t&&t.constructor===Object}function h(t,e,n){if(null!==t)for(var r,i,o,a,s,u,l,c,f=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,y=m?t.features.length:1,v=0;v<y;v++){s=(c=!!(l=m?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var b=0;b<s;b++){var _=0,A=0;if(null!==(a=c?l.geometries[b]:l)){u=a.coordinates;var w=a.type;switch(f=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,p,v,_,A))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],p,v,_,A))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===e(u[r][i],p,v,_,A))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&A++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(A=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-f;o++){if(!1===e(u[r][i][o],p,v,_,A))return!1;p++}A++}_++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===h(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function p(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=d(t.properties),e.geometry=m(t.geometry),e}function d(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"===typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=d(r):e[n]=r})),e):e}function m(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return m(t)})),e):(e.coordinates=g(t.coordinates),e)}function g(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map((function(t){return g(t)}))}var y=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return p(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return p(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return m(t);default:throw new Error("unknown GeoJSON type")}};var v=function(t,e,n,i){void 0===i&&(i={});var o=e<0,s=l(Math.abs(e),i.units,"meters");o&&(s=-Math.abs(s));var c=function(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")}(t),f=function(t,e,n,i){i=void 0===i?r:Number(i);var o=e/i,a=t[0]*Math.PI/180,s=u(t[1]),l=u(n),c=o*Math.cos(l),f=s+c;Math.abs(f)>Math.PI/2&&(f=f>0?Math.PI-f:-Math.PI-f);var h=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),p=Math.abs(h)>1e-11?c/h:Math.cos(s),d=o*Math.sin(l)/p;return[(180*(a+d)/Math.PI+540)%360-180,180*f/Math.PI]}(c,s,n);return f[0]+=f[0]-c[0]>180?-360:c[0]-f[0]>180?360:0,a(f,i.properties)};e.default=function(t,e,n,r){if(!f(r=r||{}))throw new Error("options is invalid");var i=r.units,o=r.zTranslation,a=r.mutate;if(!t)throw new Error("geojson is required");if(void 0===e||null===e||isNaN(e))throw new Error("distance is required");if(o&&"number"!==typeof o&&isNaN(o))throw new Error("zTranslation is not a number");if(o=void 0!==o?o:0,0===e&&0===o)return t;if(void 0===n||null===n||isNaN(n))throw new Error("direction is required");return e<0&&(e=-e,n+=180),!1!==a&&void 0!==a||(t=y(t)),h(t,(function(t){var r=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(v(t,e,n,{units:i}));t[0]=r[0],t[1]=r[1],o&&3===t.length&&(t[2]+=o)})),t}},function(t,e,n){"use strict";n.r(e);var r=n(281),i=n.n(r);function o(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var a=i[r];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function s(t,e,n){return void 0===n&&(n={}),o({type:"MultiPolygon",coordinates:t},e,n)}function u(t){return"Feature"===t.type?t.geometry:t}e.default=function(t,e,n){void 0===n&&(n={});var r=u(t),o=u(e),l=i.a.union(r.coordinates,o.coordinates);return 0===l.length?null:1===l.length?a(l[0],n.properties):s(l,n.properties)}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return l}));function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){void 0===n&&(n={});for(var i=0,o=t;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:t},e,n)}function o(t,e,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:t},e,n)}function a(t){return"Feature"===t.type?t.geometry:t}var s=n(281),u=n.n(s);function l(t,e,n){void 0===n&&(n={});var r=a(t),s=a(e),l=u.a.intersection(r.coordinates,s.coordinates);return 0===l.length?null:1===l.length?i(l[0],n.properties):o(l,n.properties)}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return o}));function r(t,e){var n,r,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===t.type,d="Feature"===t.type,m=p?t.features.length:1;for(n=0;n<m;n++){for(s=p?t.features[n].geometry:d?t.geometry:t,l=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,f=p?t.features[n].id:d?t.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,h,l,c,f))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,h,l,c,f))return!1;h++}}var i=6378137;function o(t){return function(t,e,n){var i=n;return r(t,(function(t,r,o,a,s){i=0===r&&void 0===n?t:e(i,t,r,o,a,s)})),i}(t,(function(t,e){return t+function(t){var e,n=0;switch(t.type){case"Polygon":return a(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)n+=a(t.coordinates[e]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(e)}),0)}function a(t){var e=0;if(t&&t.length>0){e+=Math.abs(s(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(s(t[n]))}return e}function s(t){var e,n,r,o,a,s,l=0,c=t.length;if(c>2){for(s=0;s<c;s++)s===c-2?(r=c-2,o=c-1,a=0):s===c-1?(r=c-1,o=0,a=1):(r=s,o=s+1,a=s+2),e=t[r],n=t[o],l+=(u(t[a][0])-u(e[0]))*Math.sin(u(n[1]));l=l*i*i/2}return l}function u(t){return t*Math.PI/180}},function(t,e,n){"use strict";n.r(e);var r=n(217);class i{constructor(t,e){this.attachment=t,this.element=e,this.directUpload=new r.DirectUpload(t.file,this.directUploadUrl,this)}start(){this.directUpload.create(this.directUploadDidComplete.bind(this))}directUploadWillStoreFileWithXHR(t){t.upload.addEventListener("progress",(t=>{const e=t.loaded/t.total*100;this.attachment.setUploadProgress(e)}))}directUploadDidComplete(t,e){if(t)throw new Error(`Direct upload failed: ${t}`);this.attachment.setAttributes({sgid:e.attachable_sgid,url:this.createBlobUrl(e.signed_id,e.filename)})}createBlobUrl(t,e){return this.blobUrlTemplate.replace(":signed_id",t).replace(":filename",encodeURIComponent(e))}get directUploadUrl(){return this.element.dataset.directUploadUrl}get blobUrlTemplate(){return this.element.dataset.blobUrlTemplate}}addEventListener("trix-attachment-add",(t=>{const{attachment:e,target:n}=t;if(e.file){new i(e,n).start()}}))},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return E}));var r=n(11),i=n(217),o=n(588);function a(t){return t&&t.__esModule?t.default:t}class s{on(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}emit(t,...e){this._callbacks=this._callbacks||{};let n=this._callbacks[t];if(n)for(let r of n)r.apply(this,e);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+t,{args:e})),this}makeEvent(t,e){let n={bubbles:!0,cancelable:!0,detail:e};if("function"===typeof window.CustomEvent)return new CustomEvent(t,n);var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r}off(t,e){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;let n=this._callbacks[t];if(!n)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(let r=0;r<n.length;r++){if(n[r]===e){n.splice(r,1);break}}return this}}var u={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(t,e,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:(t,e)=>e(),chunksUploaded:function(t,e){e()},binaryBody:!1,fallback(){let t;this.element.className=`${this.element.className} dz-browser-not-supported`;for(let n of this.element.getElementsByTagName("div"))if(/(^| )dz-message($| )/.test(n.className)){t=n,n.className="dz-message";break}t||(t=l.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t));let e=t.getElementsByTagName("span")[0];return e&&(null!=e.textContent?e.textContent=this.options.dictFallbackMessage:null!=e.innerText&&(e.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(t,e,n,r){let i={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==n?(e=i.srcWidth,n=i.srcHeight):null==e?e=n*o:null==n&&(n=e/o);let a=(e=Math.min(e,i.srcWidth))/(n=Math.min(n,i.srcHeight));if(i.srcWidth>e||i.srcHeight>n)if("crop"===r)o>a?(i.srcHeight=t.height,i.srcWidth=i.srcHeight*a):(i.srcWidth=t.width,i.srcHeight=i.srcWidth/a);else{if("contain"!==r)throw new Error(`Unknown resizeMethod '${r}'`);o>a?n=e/o:e=n*o}return i.srcX=(t.width-i.srcWidth)/2,i.srcY=(t.height-i.srcHeight)/2,i.trgWidth=e,i.trgHeight=n,i},transformFile(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:a('<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail=""></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size=""></span></div>\n    <div class="dz-filename"><span data-dz-name=""></span></div>\n  </div>\n  <div class="dz-progress">\n    <span class="dz-upload" data-dz-uploadprogress=""></span>\n  </div>\n  <div class="dz-error-message"><span data-dz-errormessage=""></span></div>\n  <div class="dz-success-mark">\n    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n      <path d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"></path>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n      <path d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"></path>\n    </svg>\n  </div>\n</div>\n'),drop(t){return this.element.classList.remove("dz-drag-hover")},dragstart(t){},dragend(t){return this.element.classList.remove("dz-drag-hover")},dragenter(t){return this.element.classList.add("dz-drag-hover")},dragover(t){return this.element.classList.add("dz-drag-hover")},dragleave(t){return this.element.classList.remove("dz-drag-hover")},paste(t){},reset(){return this.element.classList.remove("dz-started")},addedfile(t){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){for(var e of(t.previewElement=l.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),t.previewElement.querySelectorAll("[data-dz-name]")))e.textContent=t.name;for(e of t.previewElement.querySelectorAll("[data-dz-size]"))e.innerHTML=this.filesize(t.size);this.options.addRemoveLinks&&(t._removeLink=l.createElement(`<a class="dz-remove" href="javascript:undefined;" data-dz-remove>${this.options.dictRemoveFile}</a>`),t.previewElement.appendChild(t._removeLink));let n=e=>(e.preventDefault(),e.stopPropagation(),t.status===l.UPLOADING?l.confirm(this.options.dictCancelUploadConfirmation,(()=>this.removeFile(t))):this.options.dictRemoveFileConfirmation?l.confirm(this.options.dictRemoveFileConfirmation,(()=>this.removeFile(t))):this.removeFile(t));for(let e of t.previewElement.querySelectorAll("[data-dz-remove]"))e.addEventListener("click",n)}},removedfile(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");for(let n of t.previewElement.querySelectorAll("[data-dz-thumbnail]"))n.alt=t.name,n.src=e;return setTimeout((()=>t.previewElement.classList.add("dz-image-preview")),1)}},error(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"string"!==typeof e&&e.error&&(e=e.error);for(let n of t.previewElement.querySelectorAll("[data-dz-errormessage]"))n.textContent=e}},errormultiple(){},processing(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(t,e,n){if(t.previewElement)for(let r of t.previewElement.querySelectorAll("[data-dz-uploadprogress]"))"PROGRESS"===r.nodeName?r.value=e:r.style.width=`${e}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple(){},canceled(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple(){},complete(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};class l extends s{static initClass(){this.prototype.Emitter=s,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter((t=>t.accepted)).map((t=>t))}getRejectedFiles(){return this.files.filter((t=>!t.accepted)).map((t=>t))}getFilesWithStatus(t){return this.files.filter((e=>e.status===t)).map((t=>t))}getQueuedFiles(){return this.getFilesWithStatus(l.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(l.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(l.ADDED)}getActiveFiles(){return this.files.filter((t=>t.status===l.UPLOADING||t.status===l.QUEUED)).map((t=>t))}init(){if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(l.createElement(`<div class="dz-default dz-message"><button class="dz-button" type="button">${this.options.dictDefaultMessage}</button></div>`)),this.clickableElements.length){let t=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(null===this.options.maxFiles||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",null!==this.options.acceptedFiles&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),null!==this.options.capture&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",l.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",(()=>{let{files:e}=this.hiddenFileInput;if(e.length)for(let t of e)this.addFile(t);this.emit("addedfiles",e),t()}))};t()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(let e of this.events)this.on(e,this.options[e]);this.on("uploadprogress",(()=>this.updateTotalUploadProgress())),this.on("removedfile",(()=>this.updateTotalUploadProgress())),this.on("canceled",(t=>this.emit("complete",t))),this.on("complete",(t=>{if(0===this.getAddedFiles().length&&0===this.getUploadingFiles().length&&0===this.getQueuedFiles().length)return setTimeout((()=>this.emit("queuecomplete")),0)}));let t=function(t){if(function(t){if(t.dataTransfer.types)for(var e=0;e<t.dataTransfer.types.length;e++)if("Files"===t.dataTransfer.types[e])return!0;return!1}(t))return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:t=>this.emit("dragstart",t),dragenter:e=>(t(e),this.emit("dragenter",e)),dragover:e=>{let n;try{n=e.dataTransfer.effectAllowed}catch(r){}return e.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",t(e),this.emit("dragover",e)},dragleave:t=>this.emit("dragleave",t),drop:e=>(t(e),this.drop(e)),dragend:t=>this.emit("dragend",t)}}],this.clickableElements.forEach((t=>this.listeners.push({element:t,events:{click:e=>((t!==this.element||e.target===this.element||l.elementInside(e.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}}))),this.enable(),this.options.init.call(this)}destroy(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,l.instances.splice(l.instances.indexOf(this),1)}updateTotalUploadProgress(){let t,e=0,n=0;if(this.getActiveFiles().length){for(let t of this.getActiveFiles())e+=t.upload.bytesSent,n+=t.upload.total;t=100*e/n}else t=100;return this.emit("totaluploadprogress",t,n,e)}_getParamName(t){return"function"===typeof this.options.paramName?this.options.paramName(t):`${this.options.paramName}${this.options.uploadMultiple?`[${t}]`:""}`}_renameFile(t){return"function"!==typeof this.options.renameFile?t.name:this.options.renameFile(t)}getFallbackForm(){let t,e;if(t=this.getExistingFallback())return t;let n='<div class="dz-fallback">';this.options.dictFallbackText&&(n+=`<p>${this.options.dictFallbackText}</p>`),n+=`<input type="file" name="${this._getParamName(0)}" ${this.options.uploadMultiple?'multiple="multiple"':void 0} /><input type="submit" value="Upload!"></div>`;let r=l.createElement(n);return"FORM"!==this.element.tagName?(e=l.createElement(`<form action="${this.options.url}" enctype="multipart/form-data" method="${this.options.method}"></form>`),e.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:r}getExistingFallback(){let t=function(t){for(let e of t)if(/(^| )fallback($| )/.test(e.className))return e};for(let n of["div","form"]){var e;if(e=t(this.element.getElementsByTagName(n)))return e}}setupEventListeners(){return this.listeners.map((t=>(()=>{let e=[];for(let n in t.events){let r=t.events[n];e.push(t.element.addEventListener(n,r,!1))}return e})()))}removeEventListeners(){return this.listeners.map((t=>(()=>{let e=[];for(let n in t.events){let r=t.events[n];e.push(t.element.removeEventListener(n,r,!1))}return e})()))}disable(){return this.clickableElements.forEach((t=>t.classList.remove("dz-clickable"))),this.removeEventListeners(),this.disabled=!0,this.files.map((t=>this.cancelUpload(t)))}enable(){return delete this.disabled,this.clickableElements.forEach((t=>t.classList.add("dz-clickable"))),this.setupEventListeners()}filesize(t){let e=0,n="b";if(t>0){let r=["tb","gb","mb","kb","b"];for(let i=0;i<r.length;i++){let o=r[i];if(t>=Math.pow(this.options.filesizeBase,4-i)/10){e=t/Math.pow(this.options.filesizeBase,4-i),n=o;break}}e=Math.round(10*e)/10}return`<strong>${e}</strong> ${this.options.dictFileSizeUnits[n]}`}_updateMaxFilesReachedClass(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}drop(t){if(!t.dataTransfer)return;this.emit("drop",t);let e=[];for(let n=0;n<t.dataTransfer.files.length;n++)e[n]=t.dataTransfer.files[n];if(e.length){let{items:n}=t.dataTransfer;n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(e)}this.emit("addedfiles",e)}paste(t){if(null==(e=null!=t?t.clipboardData:void 0,n=t=>t.items,"undefined"!==typeof e&&null!==e?n(e):void 0))return;var e,n;this.emit("paste",t);let{items:r}=t.clipboardData;return r.length?this._addFilesFromItems(r):void 0}handleFiles(t){for(let e of t)this.addFile(e)}_addFilesFromItems(t){return(()=>{let e=[];for(let r of t){var n;null!=r.webkitGetAsEntry&&(n=r.webkitGetAsEntry())?n.isFile?e.push(this.addFile(r.getAsFile())):n.isDirectory?e.push(this._addFilesFromDirectory(n,n.name)):e.push(void 0):null!=r.getAsFile&&(null==r.kind||"file"===r.kind)?e.push(this.addFile(r.getAsFile())):e.push(void 0)}return e})()}_addFilesFromDirectory(t,e){let n=t.createReader(),r=t=>{return e=console,n="log",r=e=>e.log(t),"undefined"!==typeof e&&null!==e&&"function"===typeof e[n]?r(e,n):void 0;var e,n,r};var i=()=>n.readEntries((t=>{if(t.length>0){for(let n of t)n.isFile?n.file((t=>{if(!this.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath=`${e}/${t.name}`,this.addFile(t)})):n.isDirectory&&this._addFilesFromDirectory(n,`${e}/${n.name}`);i()}return null}),r);return i()}accept(t,e){this.options.maxFilesize&&t.size>1048576*this.options.maxFilesize?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):l.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)}addFile(t){t.upload={uuid:l.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=l.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(e=>{e?(t.accepted=!1,this._errorProcessing([t],e)):(t.accepted=!0,this.options.autoQueue&&this.enqueueFile(t)),this._updateMaxFilesReachedClass()}))}enqueueFiles(t){for(let e of t)this.enqueueFile(e);return null}enqueueFile(t){if(t.status!==l.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=l.QUEUED,this.options.autoProcessQueue)return setTimeout((()=>this.processQueue()),0)}_enqueueThumbnail(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1048576*this.options.maxThumbnailFilesize)return this._thumbnailQueue.push(t),setTimeout((()=>this._processThumbnailQueue()),0)}_processThumbnailQueue(){if(this._processingThumbnail||0===this._thumbnailQueue.length)return;this._processingThumbnail=!0;let t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(e=>(this.emit("thumbnail",t,e),this._processingThumbnail=!1,this._processThumbnailQueue())))}removeFile(t){if(t.status===l.UPLOADING&&this.cancelUpload(t),this.files=c(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}removeAllFiles(t){null==t&&(t=!1);for(let e of this.files.slice())(e.status!==l.UPLOADING||t)&&this.removeFile(e);return null}resizeImage(t,e,n,r,i){return this.createThumbnail(t,e,n,r,!0,((e,n)=>{if(null==n)return i(t);{let{resizeMimeType:e}=this.options;null==e&&(e=t.type);let r=n.toDataURL(e,this.options.resizeQuality);return"image/jpeg"!==e&&"image/jpg"!==e||(r=p.restore(t.dataURL,r)),i(l.dataURItoBlob(r))}}))}createThumbnail(t,e,n,r,i,o){let a=new FileReader;a.onload=()=>{t.dataURL=a.result,"image/svg+xml"!==t.type?this.createThumbnailFromUrl(t,e,n,r,i,o):null!=o&&o(a.result)},a.readAsDataURL(t)}displayExistingFile(t,e,n,r,i=!0){if(this.emit("addedfile",t),this.emit("complete",t),i){let i=e=>{this.emit("thumbnail",t,e),n&&n()};t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,i,r)}else this.emit("thumbnail",t,e),n&&n()}createThumbnailFromUrl(t,e,n,r,i,o,a){let s=document.createElement("img");return a&&(s.crossOrigin=a),i="from-image"!=getComputedStyle(document.body).imageOrientation&&i,s.onload=()=>{let a=t=>t(1);return"undefined"!==typeof EXIF&&null!==EXIF&&i&&(a=t=>EXIF.getData(s,(function(){return t(EXIF.getTag(this,"Orientation"))}))),a((i=>{t.width=s.width,t.height=s.height;let a=this.options.resize.call(this,t,e,n,r),u=document.createElement("canvas"),l=u.getContext("2d");switch(u.width=a.trgWidth,u.height=a.trgHeight,i>4&&(u.width=a.trgHeight,u.height=a.trgWidth),i){case 2:l.translate(u.width,0),l.scale(-1,1);break;case 3:l.translate(u.width,u.height),l.rotate(Math.PI);break;case 4:l.translate(0,u.height),l.scale(1,-1);break;case 5:l.rotate(.5*Math.PI),l.scale(1,-1);break;case 6:l.rotate(.5*Math.PI),l.translate(0,-u.width);break;case 7:l.rotate(.5*Math.PI),l.translate(u.height,-u.width),l.scale(-1,1);break;case 8:l.rotate(-.5*Math.PI),l.translate(-u.height,0)}h(l,s,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);let c=u.toDataURL("image/png");if(null!=o)return o(c,u)}))},null!=o&&(s.onerror=o),s.src=t.dataURL}processQueue(){let{parallelUploads:t}=this.options,e=this.getUploadingFiles().length,n=e;if(e>=t)return;let r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,t-e));for(;n<t;){if(!r.length)return;this.processFile(r.shift()),n++}}}processFile(t){return this.processFiles([t])}processFiles(t){for(let e of t)e.processing=!0,e.status=l.UPLOADING,this.emit("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}_getFilesWithXhr(t){return this.files.filter((e=>e.xhr===t)).map((t=>t))}cancelUpload(t){if(t.status===l.UPLOADING){let e=this._getFilesWithXhr(t.xhr);for(let t of e)t.status=l.CANCELED;"undefined"!==typeof t.xhr&&t.xhr.abort();for(let t of e)this.emit("canceled",t);this.options.uploadMultiple&&this.emit("canceledmultiple",e)}else t.status!==l.ADDED&&t.status!==l.QUEUED||(t.status=l.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(t,...e){return"function"===typeof t?t.apply(this,e):t}uploadFile(t){return this.uploadFiles([t])}uploadFiles(t){this._transformFiles(t,(e=>{if(this.options.chunking){let n=e[0];t[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||n.size>this.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(n.size/this.options.chunkSize)}if(t[0].upload.chunked){let n=t[0],r=e[0],i=0;n.upload.chunks=[];let o=()=>{let e=0;for(;void 0!==n.upload.chunks[e];)e++;if(e>=n.upload.totalChunkCount)return;i++;let o=e*this.options.chunkSize,a=Math.min(o+this.options.chunkSize,r.size),s={name:this._getParamName(0),data:r.webkitSlice?r.webkitSlice(o,a):r.slice(o,a),filename:n.upload.filename,chunkIndex:e};n.upload.chunks[e]={file:n,index:e,dataBlock:s,status:l.UPLOADING,progress:0,retries:0},this._uploadData(t,[s])};if(n.upload.finishedChunkUpload=(e,r)=>{let i=!0;e.status=l.SUCCESS,e.dataBlock=null,e.response=e.xhr.responseText,e.responseHeaders=e.xhr.getAllResponseHeaders(),e.xhr=null;for(let t=0;t<n.upload.totalChunkCount;t++){if(void 0===n.upload.chunks[t])return o();n.upload.chunks[t].status!==l.SUCCESS&&(i=!1)}i&&this.options.chunksUploaded(n,(()=>{this._finished(t,r,null)}))},this.options.parallelChunkUploads)for(let t=0;t<n.upload.totalChunkCount;t++)o();else o()}else{let n=[];for(let r=0;r<t.length;r++)n[r]={name:this._getParamName(r),data:e[r],filename:t[r].upload.filename};this._uploadData(t,n)}}))}_getChunk(t,e){for(let n=0;n<t.upload.totalChunkCount;n++)if(void 0!==t.upload.chunks[n]&&t.upload.chunks[n].xhr===e)return t.upload.chunks[n]}_uploadData(t,e){let n=new XMLHttpRequest;for(let o of t)o.xhr=n;t[0].upload.chunked&&(t[0].upload.chunks[e[0].chunkIndex].xhr=n);let r=this.resolveOption(this.options.method,t,e),i=this.resolveOption(this.options.url,t,e);n.open(r,i,!0),this.resolveOption(this.options.timeout,t)&&(n.timeout=this.resolveOption(this.options.timeout,t)),n.withCredentials=!!this.options.withCredentials,n.onload=e=>{this._finishedUploading(t,n,e)},n.ontimeout=()=>{this._handleUploadError(t,n,`Request timedout after ${this.options.timeout/1e3} seconds`)},n.onerror=()=>{this._handleUploadError(t,n)},(null!=n.upload?n.upload:n).onprogress=e=>this._updateFilesUploadProgress(t,n,e);let a=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(a["Content-Type"]=t[0].type),this.options.headers&&o(a,this.options.headers);for(let o in a){let t=a[o];t&&n.setRequestHeader(o,t)}if(this.options.binaryBody){for(let e of t)this.emit("sending",e,n);this.options.uploadMultiple&&this.emit("sendingmultiple",t,n),this.submitRequest(n,null,t)}else{let r=new FormData;if(this.options.params){let e=this.options.params;"function"===typeof e&&(e=e.call(this,t,n,t[0].upload.chunked?this._getChunk(t[0],n):null));for(let t in e){let n=e[t];if(Array.isArray(n))for(let e=0;e<n.length;e++)r.append(t,n[e]);else r.append(t,n)}}for(let e of t)this.emit("sending",e,n,r);this.options.uploadMultiple&&this.emit("sendingmultiple",t,n,r),this._addFormElementData(r);for(let t=0;t<e.length;t++){let n=e[t];r.append(n.name,n.data,n.filename)}this.submitRequest(n,r,t)}}_transformFiles(t,e){let n=[],r=0;for(let i=0;i<t.length;i++)this.options.transformFile.call(this,t[i],(o=>{n[i]=o,++r===t.length&&e(n)}))}_addFormElementData(t){if("FORM"===this.element.tagName)for(let e of this.element.querySelectorAll("input, textarea, select, button")){let n=e.getAttribute("name"),r=e.getAttribute("type");if(r&&(r=r.toLowerCase()),"undefined"!==typeof n&&null!==n)if("SELECT"===e.tagName&&e.hasAttribute("multiple"))for(let i of e.options)i.selected&&t.append(n,i.value);else(!r||"checkbox"!==r&&"radio"!==r||e.checked)&&t.append(n,e.value)}}_updateFilesUploadProgress(t,e,n){if(t[0].upload.chunked){let r=t[0],i=this._getChunk(r,e);n?(i.progress=100*n.loaded/n.total,i.total=n.total,i.bytesSent=n.loaded):(i.progress=100,i.bytesSent=i.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(let t=0;t<r.upload.totalChunkCount;t++)r.upload.chunks[t]&&"undefined"!==typeof r.upload.chunks[t].progress&&(r.upload.progress+=r.upload.chunks[t].progress,r.upload.total+=r.upload.chunks[t].total,r.upload.bytesSent+=r.upload.chunks[t].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount,this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent)}else for(let r of t)r.upload.total&&r.upload.bytesSent&&r.upload.bytesSent==r.upload.total||(n?(r.upload.progress=100*n.loaded/n.total,r.upload.total=n.total,r.upload.bytesSent=n.loaded):(r.upload.progress=100,r.upload.bytesSent=r.upload.total),this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent))}_finishedUploading(t,e,n){let r;if(t[0].status!==l.CANCELED&&4===e.readyState){if("arraybuffer"!==e.responseType&&"blob"!==e.responseType&&(r=e.responseText,e.getResponseHeader("content-type")&&~e.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(i){n=i,r="Invalid JSON response from server."}this._updateFilesUploadProgress(t,e),200<=e.status&&e.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],e),r):this._finished(t,r,n):this._handleUploadError(t,e,r)}}_handleUploadError(t,e,n){if(t[0].status!==l.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){let n=this._getChunk(t[0],e);if(n.retries++<this.options.retryChunksLimit)return void this._uploadData(t,[n.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(t,n||this.options.dictResponseError.replace("{{statusCode}}",e.status),e)}}submitRequest(t,e,n){if(1==t.readyState)if(this.options.binaryBody)if(n[0].upload.chunked){const e=this._getChunk(n[0],t);t.send(e.dataBlock.data)}else t.send(n[0]);else t.send(e);else console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.")}_finished(t,e,n){for(let r of t)r.status=l.SUCCESS,this.emit("success",r,e,n),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}_errorProcessing(t,e,n){for(let r of t)r.status=l.ERROR,this.emit("error",r,e,n),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}static uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){let e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}constructor(t,e){let n,r;if(super(),this.element=t,this.clickableElements=[],this.listeners=[],this.files=[],"string"===typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");l.instances.push(this),this.element.dropzone=this;let i=null!=(r=l.optionsForElement(this.element))?r:{};if(this.options=o(!0,{},u,i,null!=e?e:{}),this.options.previewTemplate=this.options.previewTemplate.replace(/\n*/g,""),this.options.forceFallback||!l.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(this.options.uploadMultiple&&this.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");if(this.options.binaryBody&&this.options.uploadMultiple)throw new Error("You cannot set both: binaryBody and uploadMultiple.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),null!=this.options.renameFilename&&(this.options.renameFile=t=>this.options.renameFilename.call(this,t.name,t)),"string"===typeof this.options.method&&(this.options.method=this.options.method.toUpperCase()),(n=this.getExistingFallback())&&n.parentNode&&n.parentNode.removeChild(n),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=l.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=l.getElements(this.options.clickable,"clickable")),this.init()}}l.initClass(),l.options={},l.optionsForElement=function(t){return t.getAttribute("id")?l.options[f(t.getAttribute("id"))]:void 0},l.instances=[],l.forElement=function(t){if("string"===typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},l.discover=function(){let t;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];let e=e=>(()=>{let n=[];for(let r of e)/(^| )dropzone($| )/.test(r.className)?n.push(t.push(r)):n.push(void 0);return n})();e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return(()=>{let e=[];for(let n of t)!1!==l.optionsForElement(n)?e.push(new l(n)):e.push(void 0);return e})()},l.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],l.isBrowserSupported=function(){let t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==l.blacklistedBrowsers&&(l.blockedBrowsers=l.blacklistedBrowsers);for(let e of l.blockedBrowsers)if(e.test(navigator.userAgent)){t=!1;continue}}else t=!1;else t=!1;return t},l.dataURItoBlob=function(t){let e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(e.length),i=new Uint8Array(r);for(let o=0,a=e.length,s=0<=a;s?o<=a:o>=a;s?o++:o--)i[o]=e.charCodeAt(o);return new Blob([r],{type:n})};const c=(t,e)=>t.filter((t=>t!==e)).map((t=>t)),f=t=>t.replace(/[\-_](\w)/g,(t=>t.charAt(1).toUpperCase()));l.createElement=function(t){let e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},l.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},l.getElement=function(t,e){let n;if("string"===typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error(`Invalid \`${e}\` option provided. Please provide a CSS selector or a plain HTML element.`);return n},l.getElements=function(t,e){let n,r;if(t instanceof Array){r=[];try{for(n of t)r.push(this.getElement(n,e))}catch(i){r=null}}else if("string"===typeof t)for(n of(r=[],document.querySelectorAll(t)))r.push(n);else null!=t.nodeType&&(r=[t]);if(null==r||!r.length)throw new Error(`Invalid \`${e}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return r},l.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},l.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");let n=t.type,r=n.replace(/\/.*$/,"");for(let i of e)if(i=i.trim(),"."===i.charAt(0)){if(-1!==t.name.toLowerCase().indexOf(i.toLowerCase(),t.name.length-i.length))return!0}else if(/\/\*$/.test(i)){if(r===i.replace(/\/.*$/,""))return!0}else if(n===i)return!0;return!1},"undefined"!==typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each((function(){return new l(this,t)}))}),l.ADDED="added",l.QUEUED="queued",l.ACCEPTED=l.QUEUED,l.UPLOADING="uploading",l.PROCESSING=l.UPLOADING,l.CANCELED="canceled",l.ERROR="error",l.SUCCESS="success";var h=function(t,e,n,r,i,o,a,s,u,l){let c=function(t){t.naturalWidth;let e=t.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=e;let r=n.getContext("2d");r.drawImage(t,0,0);let{data:i}=r.getImageData(1,0,1,e),o=0,a=e,s=e;for(;s>o;)0===i[4*(s-1)+3]?a=s:o=s,s=a+o>>1;let u=s/e;return 0===u?1:u}(e);return t.drawImage(e,n,r,i,o,a,s,u,l/c)};class p{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(t){let e,n,r,i,o,a="",s="",u="",l=0;for(;e=t[l++],n=t[l++],s=t[l++],r=e>>2,i=(3&e)<<4|n>>4,o=(15&n)<<2|s>>6,u=63&s,isNaN(n)?o=u=64:isNaN(s)&&(u=64),a=a+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(u),e=n=s="",r=i=o=u="",l<t.length;);return a}static restore(t,e){if(!t.match("data:image/jpeg;base64,"))return e;let n=this.decode64(t.replace("data:image/jpeg;base64,","")),r=this.slice2Segments(n),i=this.exifManipulation(e,r);return`data:image/jpeg;base64,${this.encode64(i)}`}static exifManipulation(t,e){let n=this.getExifArray(e),r=this.insertExif(t,n);return new Uint8Array(r)}static getExifArray(t){let e,n=0;for(;n<t.length;){if(e=t[n],255===e[0]&225===e[1])return e;n++}return[]}static insertExif(t,e){let n=t.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),s=o;return s=s.concat(e),s=s.concat(a),s}static slice2Segments(t){let e=0,n=[];for(;;){if(255===t[e]&218===t[e+1])break;if(255===t[e]&216===t[e+1])e+=2;else{let r=e+(256*t[e+2]+t[e+3])+2,i=t.slice(e,r);n.push(i),e=r}if(e>t.length)break}return n}static decode64(t){let e,n,r,i,o,a="",s="",u=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");r=this.KEY_STR.indexOf(t.charAt(u++)),i=this.KEY_STR.indexOf(t.charAt(u++)),o=this.KEY_STR.indexOf(t.charAt(u++)),s=this.KEY_STR.indexOf(t.charAt(u++)),e=r<<2|i>>4,n=(15&i)<<4|o>>2,a=(3&o)<<6|s,l.push(e),64!==o&&l.push(n),64!==s&&l.push(a),e=n=a="",r=i=o=s="",u<t.length;);return l}}p.initClass();var d=n(196),m=(n(1198),n(99)),g=n.n(m);function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(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 b(t,e,n){return e&&v(t.prototype,e),n&&v(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}function A(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=x(t);if(e){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}l.autoDiscover=!1;var E=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(n,t);var e=A(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"connect",value:function(){var t;this.dropZone=new l((t=this).element,{url:t.url,headers:t.headers,maxFiles:t.maxFiles,maxFilesize:t.maxFileSize,acceptedFiles:t.acceptedFiles,addRemoveLinks:t.addRemoveLinks,autoQueue:!1,init:function(){if(this.element.dataset.attachmentUrl){var t={name:this.element.dataset.attachmentFileName,type:this.element.dataset.attachmentContentType};this.options.addedfile.call(this,t),this.options.thumbnail.call(this,t,this.element.dataset.attachmentUrl),t.previewElement.classList.add("dz-success"),t.previewElement.classList.add("dz-complete")}}}),this.hideFileInput(),this.bindEvents()}},{key:"hideFileInput",value:function(){this.inputTarget.disabled=!0,this.inputTarget.style.display="none"}},{key:"bindEvents",value:function(){var t=this;this.dropZone.on("addedfile",(function(e){setTimeout((function(){e.accepted&&function(t,e){return new O(t,e)}(t,e).start()}),500)})),this.dropZone.on("removedfile",(function(e){var n=new FormData;n.append("id",t.element.dataset.id),n.append("association",t.element.dataset.association),n.append("field",t.element.dataset.field),g.a.ajax({url:Object(d.getMetaValue)("direct-upload-path"),type:"DELETE",data:n,complete:function(){t.inputTarget.removeAttribute("disabled")}})})),this.dropZone.on("canceled",(function(t){t.controller&&t.controller.xhr.abort()})),this.dropZone.on("processing",(function(e){t.submitButton.disabled=!0})),this.dropZone.on("queuecomplete",(function(e){t.submitButton.disabled=!1}))}},{key:"headers",get:function(){return{"X-CSRF-Token":Object(d.getMetaValue)("csrf-token")}}},{key:"url",get:function(){return this.inputTarget.getAttribute("data-direct-upload-url")}},{key:"maxFiles",get:function(){return this.data.get("maxFiles")||1}},{key:"maxFileSize",get:function(){return this.data.get("maxFileSize")||256}},{key:"acceptedFiles",get:function(){return this.data.get("acceptedFiles")}},{key:"addRemoveLinks",get:function(){return this.data.get("addRemoveLinks")||!0}},{key:"form",get:function(){return this.element.closest("form")}},{key:"submitButton",get:function(){return Object(d.findElement)(this.form,"input[type=submit], button[type=submit]")}}]),n}(r.b);E.targets=["input"];var O=function(){function t(e,n){y(this,t),this.directUpload=function(t,e,n){return new i.DirectUpload(t,e,n)}(n,e.url,this),this.source=e,this.file=n}return b(t,[{key:"start",value:function(){var t=this;this.file.controller=this,this.directUpload.create((function(e,n){if(e)Object(d.removeElement)(t.hiddenInput),t.emitDropzoneError(e);else{var r=new FormData;r.append("image",n.signed_id),r.append("id",t.source.element.dataset.id),r.append("association",t.source.element.dataset.association),r.append("field",t.source.element.dataset.field),g.a.ajax({url:Object(d.getMetaValue)("associate-attachment-path"),type:"POST",data:r,complete:function(){t.emitDropzoneSuccess()}}),t.source.inputTarget.setAttribute("disabled",!0)}}))}},{key:"createHiddenInput",value:function(){var t=document.createElement("input");return t.type="hidden",t.name=this.source.inputTarget.name,Object(d.insertAfter)(t,this.source.inputTarget),t}},{key:"directUploadWillStoreFileWithXHR",value:function(t){this.bindProgressEvent(t),this.emitDropzoneUploading()}},{key:"bindProgressEvent",value:function(t){var e=this;this.xhr=t,this.xhr.upload.addEventListener("progress",(function(t){return e.uploadRequestDidProgress(t)}))}},{key:"uploadRequestDidProgress",value:function(t){this.source.element;var e=t.loaded/t.total*100;Object(d.findElement)(this.file.previewTemplate,".dz-upload").style.width="".concat(e,"%")}},{key:"emitDropzoneUploading",value:function(){this.file.status=l.UPLOADING,this.source.dropZone.emit("processing",this.file)}},{key:"emitDropzoneError",value:function(t){this.file.status=l.ERROR,this.source.dropZone.emit("error",this.file,t),this.source.dropZone.emit("complete",this.file)}},{key:"emitDropzoneSuccess",value:function(){this.file.status=l.SUCCESS,this.source.dropZone.emit("success",this.file),this.source.dropZone.emit("complete",this.file)}}]),t}()},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=(n(1347),n(62),["width","height"]);function a(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}var s=function(t){t.width,t.height,a(t,o);return i.a.createElement("p",null,"fixme")};s.defaultProps={logoName:"site"},e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(782),s=n(740),u=n(614),l=n(618),c=n(254),f=n(826),h=n(473),p=n(758),d=n(762),m=n(745),g=n(621),y=n(450),v=n(255),b=n(761),_=n(215),A=n(652),w=n(786),x=n(796),E=n(793),O=n(17),S=n(18),P=n(619),C=n(337),T=n(8),k=n.n(T),I=n(749);e.default=function(t){var e=t.history,n=Object(O.useStore)().embedMetadata,T=Object(S.hasFeature)("ugc"),L=Object(S.hasFeature)("overlays"),j=Object(S.hasFeature)("collections"),M=Object(S.hasFeature)("projects"),R=Object(S.hasFeature)("trails"),N=(Object(S.hasFeature)("i18n"),Object(S.hasFeature)("routes")),D=Object(S.hasFeature)("timelines");return Object(r.useEffect)((function(){e.listen((function(t){t.location;"PUSH"===t.action&&Object(C.trackView)(n)})),Object(C.trackView)(n)}),[]),Object(r.useEffect)((function(){if("undefined"!==typeof window){var t=function t(e){9===e.keyCode&&(document.body.classList.add("user-is-tabbing"),window.removeEventListener("keydown",t))};return function(){window.removeEventListener("keydown",t)}}})),i.a.createElement(u.default,null,i.a.createElement(A.default,null),i.a.createElement(a.default,null,i.a.createElement(o.c,{basepath:"/map",style:{flex:"1 1 auto",minWidth:"0"}},i.a.createElement(l.default,{path:"/",default:!0}),i.a.createElement(c.default,{path:"/browse",title:k.a.t("pages.map.browse")}),i.a.createElement(h.default,{path:"/search/results"}),i.a.createElement(f.default,{path:"/search"}),L&&i.a.createElement(i.a.Fragment,null,i.a.createElement(p.default,{path:"/overlays"}),i.a.createElement(d.default,{path:"/overlays/:overlayId"})),i.a.createElement(m.default,{path:"/help"}),i.a.createElement(I.default,{path:"/language"}),i.a.createElement(g.default,{path:"/records/:recordId"},i.a.createElement(P.default,{path:"/gallery"}),i.a.createElement(P.default,{path:"/gallery/:number"})),j&&i.a.createElement(i.a.Fragment,null,i.a.createElement(c.default,{path:"/collections",filterByType:["collection"],title:k.a.t("collections")}),i.a.createElement(y.default,{path:"/collections/:slug"},i.a.createElement(v.default,{path:"/"}))),N&&i.a.createElement(i.a.Fragment,null,i.a.createElement(c.default,{path:"/routes",filterByType:["route"],title:k.a.t("routes")}),i.a.createElement(y.default,{path:"/routes/:slug"},i.a.createElement(v.default,{path:"/"}))),D&&i.a.createElement(i.a.Fragment,null,i.a.createElement(c.default,{path:"/timelines",filterByType:["timeline"],title:k.a.t("timelines")}),i.a.createElement(y.default,{path:"/timelines/:slug"},i.a.createElement(v.default,{path:"/"}))),T&&i.a.createElement(i.a.Fragment,null,i.a.createElement(x.default,{path:"/contribute/user/:userId"})),M&&i.a.createElement(i.a.Fragment,null,i.a.createElement(E.default,{path:"/contribute/projects/:projectSlug"})),T&&Object(S.userIsSignedIn)()&&i.a.createElement(i.a.Fragment,null,i.a.createElement(w.default,{path:"/contribute"})),R&&i.a.createElement(i.a.Fragment,null,i.a.createElement(c.default,{path:"/trails",filterByType:["trail"],title:k.a.t("trails")}),i.a.createElement(y.default,{path:"/trails/:slug"},i.a.createElement(v.default,{path:"/"}))))),i.a.createElement(o.c,{basepath:"/map",primary:!1},i.a.createElement(_.default,{path:"/trails"},i.a.createElement(c.BrowseIndexTrayOverview,{path:"/",type:"trails"})),i.a.createElement(_.default,{path:"/browse"},i.a.createElement(c.BrowseIndexTrayOverview,{path:"/",type:"browse"})),i.a.createElement(_.default,{path:"/collections"},i.a.createElement(c.BrowseIndexTrayOverview,{path:"/",type:"collections"})),i.a.createElement(_.default,{path:"/records/:recordId"},i.a.createElement(g.RecordViewTrayOverview,{path:"/"})),i.a.createElement(_.default,{path:"/collections/:slug"},i.a.createElement(v.CollectionViewTrayOverview,{path:"/"})),i.a.createElement(_.default,{path:"/trails/:slug"},i.a.createElement(v.CollectionViewTrayOverview,{path:"/"})),i.a.createElement(_.default,{path:"/routes/:slug"},i.a.createElement(v.CollectionViewTrayOverview,{path:"/"})),i.a.createElement(_.default,{path:"/timelines/:slug"},i.a.createElement(v.CollectionViewTrayOverview,{path:"/"})),i.a.createElement(_.default,{path:"/search/results"},i.a.createElement(h.SearchResultsTrayOverview,{path:"/"})),i.a.createElement(_.default,{path:"/",default:!0},i.a.createElement(l.IntroductionIndexTrayOverview,{path:"/"}))),i.a.createElement(b.default,null),i.a.createElement(s.default,null))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(797),s=n(799),u=n(803),l=n(812),c=n(822),f=n(823),h=n(627),p=(n(30),n(824));e.default=function(){return i.a.createElement(a.default,null,i.a.createElement(o.c,{basepath:"/placemaker"},i.a.createElement(u.default,{path:"/"},i.a.createElement(c.default,{path:"/all-features"}),i.a.createElement(s.default,{path:"/"}),i.a.createElement(l.default,{path:"/squares/:id"}),i.a.createElement(f.default,{path:"/edit-grid"}),i.a.createElement(h.default,{path:"search-by-user"}),i.a.createElement(h.default,{path:"search-by-user/:id"}),i.a.createElement(p.default,{path:"update-recency"}))))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(45),o=n(115);function a(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=r.types.model({width:"100%",height:"100%",zoom:12.25,maxZoom:20,longitude:0,latitude:0,transitionDuration:800,bearing:0,pitch:0}).volatile((function(t){return{mapRef:{},deckRef:{},centeredOverPoints:!1}})).actions((function(t){return{setMapRef:function(e){t.mapRef=e,Object(r.getRoot)(t).setMapRef(!0)},setDeckRef:function(e){t.deckRef=e},updateDeck:function(){if(t.deckRef){var e=t.deckRef.deck,n=s(s({},t.toJSON()),{},{width:e.props.viewState.width,height:e.props.viewState.height});e.setProps({viewState:n})}},setZoom:function(e){t.zoom=e},setPitchAndBearing:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.updateMapProps,o=void 0===i||i;t.pitch=e,t.bearing=n,o&&t.updateDeck()},setCenter:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.updateMapProps,i=void 0===r||r;t.longitude=e.coordinates[0],t.latitude=e.coordinates[1],e.zoom&&(t.zoom=e.zoom),i&&t.updateDeck()},setCenterPitchBearingAndZoom:function(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=o.updateMapProps,s=void 0===a||a;t.pitch=r,t.zoom=i,t.longitude=e.coordinates[0],t.latitude=e.coordinates[1],s&&t.updateDeck()},setCenteredOverPoints:function(e){t.centeredOverPoints=e},fitBounds:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.updateMapProps,u=void 0===a||a,l=new o.a(s(s({},t.toJSON()),{},{width:Math.ceil(window.innerWidth),height:Math.ceil(window.innerHeight)})).fitBounds(e,{padding:0}),c=s(s({},t.toJSON()),{},{latitude:l.latitude,longitude:l.longitude,zoom:l.zoom,scale:l.scale});Object(r.applySnapshot)(t,c),u&&t.updateDeck()},setMapViewport:function(e){var n=e.viewState;Object(r.applySnapshot)(t,n)}}})).views((function(t){return{get centroid(){return"".concat(t.longitude," ").concat(t.latitude)},get boundingBoxDistance(){var e=t.mapRef.getMap().getBounds();return Object(i.distance)([t.longitude,t.latitude],[e._ne.lng,e._ne.lat],{units:"metres"})},get mapDimensions(){return[t.mapRef.getMap().getContainer().offsetWidth,t.mapRef.getMap().getContainer().offsetHeight]},get atFullZoom(){return t.maxZoom-t.zoom<1}}})).preProcessSnapshot((function(t){var e=s({},t);return e.height="100%",e.width="100%",delete e.points,e})).postProcessSnapshot((function(t){var e=s({},t);return e.width="100%",e.height="100%",e}));e.default=l},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(114);function o(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=r.types.model("VideoEmbedModel",{id:r.types.maybeNull(r.types.integer),name:r.types.string,description:r.types.maybeNull(r.types.string),credit:r.types.maybeNull(r.types.string),url:r.types.maybeNull(r.types.string),rights_statement:r.types.maybeNull(r.types.string),source_link:r.types.maybeNull(r.types.string),identifier:r.types.maybeNull(r.types.string),transcription:r.types.maybeNull(r.types.string),license:r.types.maybeNull(r.types.string),html:r.types.maybeNull(r.types.string),image:r.types.maybeNull(i.default),type:"video_embed"}).preProcessSnapshot((function(t){if(t)return t.video_embed?t.video_embed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(114);function o(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=r.types.model("AudioEmbedModel",{id:r.types.maybeNull(r.types.integer),name:r.types.string,description:r.types.maybeNull(r.types.string),credit:r.types.maybeNull(r.types.string),url:r.types.maybeNull(r.types.string),rights_statement:r.types.maybeNull(r.types.string),source_link:r.types.maybeNull(r.types.string),identifier:r.types.maybeNull(r.types.string),transcription:r.types.maybeNull(r.types.string),license:r.types.maybeNull(r.types.string),html:r.types.maybeNull(r.types.string),image:r.types.maybeNull(i.default),type:"audio_embed"}).preProcessSnapshot((function(t){if(t)return t.audio_embed?t.audio_embed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(114);function o(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=r.types.model("IiifEmbedModel",{id:r.types.maybeNull(r.types.integer),name:r.types.string,manifest_url:r.types.string,type:"iiif_embed",image:r.types.maybeNull(i.default),description:r.types.maybeNull(r.types.string),credit:r.types.maybeNull(r.types.string)}).preProcessSnapshot((function(t){if(t)return t.iiif_embed?t.iiif_embed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(114);function o(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=r.types.model("SketchfabEmbedModel",{id:r.types.maybeNull(r.types.integer),name:r.types.string,description:r.types.maybeNull(r.types.string),credit:r.types.maybeNull(r.types.string),url:r.types.maybeNull(r.types.string),rights_statement:r.types.maybeNull(r.types.string),source_link:r.types.maybeNull(r.types.string),identifier:r.types.maybeNull(r.types.string),license:r.types.maybeNull(r.types.string),html:r.types.maybeNull(r.types.string),image:r.types.maybeNull(i.default),type:"sketchfab_embed"}).preProcessSnapshot((function(t){if(t)return t.sketchfab_embed?t.sketchfab_embed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model("RecordStreetViewOverlay",{id:r.types.number,name:r.types.maybeNull(r.types.string),metadata:r.types.frozen({}),credit:r.types.maybeNull(r.types.string),rights_statement:r.types.maybeNull(r.types.string),source_link:r.types.maybeNull(r.types.string),identifier:r.types.maybeNull(r.types.string),license:r.types.maybeNull(r.types.string),transcription:r.types.maybeNull(r.types.string),description:r.types.maybeNull(r.types.string),url:r.types.string,type:"street_view_overlay"});e.default=i},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model("LinkModel",{name:r.types.string,url:r.types.string});e.default=i},function(t,e,n){"use strict";n.r(e);var r=n(2),i=(n(532),n(114)),o=n(171),a=n(153),s=n(21),u=n(305),l=n(204),c=n(1e3),f=n(552),h=n(306),p=n(45),d=n(1313),m=n.n(d);function g(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 y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(){v=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var b=r.types.model({slug:r.types.string,limit:r.types.number,offset:r.types.number}).actions((function(t){return{setSearchParameter:function(e,n){t[e]=n}}})).views((function(t){return{get nextOffset(){return t.limit+t.offset}}})),_=a.default.named("CollectionItems").props({filter:r.types.maybeNull(b),results:r.types.array(h.default,[])}).actions((function(t){return{}})),A=r.types.model("CollectionModel",{id:r.types.number,tenant_id:r.types.number,name:r.types.string,slug:r.types.string,sanitised_content:r.types.maybeNull(r.types.string,""),excerpt:r.types.maybeNull(r.types.string,""),image:r.types.maybeNull(i.default),terms:r.types.array(u.default,[]),location:l.default,user_id:r.types.maybeNull(r.types.number),user:r.types.frozen({}),state:r.types.string,cta:r.types.maybeNull(f.default),metadata:r.types.frozen({}),type:r.types.string,parent_item_ids:r.types.array(r.types.number,[]),bounding_box:r.types.maybeNull(c.default),associated_overlay_group_slug:r.types.maybeNull(r.types.string),static_map_urls:r.types.frozen({}),created_at:r.types.maybeNull(r.types.string),contribution_status:r.types.string}).volatile((function(t){return{items:_.create({results:[],filter:{slug:t.slug,limit:s.PER_PAGE,offset:0}}),owner:""}})).actions((function(t){return{fetchItems:Object(r.flow)(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.items.clear(),e.next=3,t.items.fetch(o.fetchCollectionCardItemsQuery,t.items.filter.toJSON());case 3:case"end":return e.stop()}}),e)}))),fetchNextPage:Object(r.flow)(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.records.fetchNextPage();case 2:case"end":return e.stop()}}),e)}))),setState:Object(r.flow)(v().mark((function e(n,r){var i,a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(s.buildHeaders)({"X-Hasura-User-Token":r.userToken}),e.next=3,Object(o.mutateUpdateCollectionState)({id:t.id,state:n},i);case 3:a=e.sent,t.state=a.result.state;case 5:case"end":return e.stop()}}),e)})))}})).views((function(t){return{get centroid(){return t.location.centroid()},get isPublished(){return"published"===t.state},get isAwaitingModeration(){return"awaiting_moderation"===t.state},get hasFinishedWizard(){return"published"===t.state||"unpublished"===t.state||"complete"===t.state},get hasCTA(){return t.cta&&t.cta.hasContent},get path(){switch(t.type){case"collection":return"/map/collections/".concat(t.slug);case"trail":return"/map/trails/".concat(t.slug);case"route":return"/map/routes/".concat(t.slug);case"timeline":return"/map/timelines/".concat(t.slug)}},get isTrail(){return"trail"===t.type},get isCollection(){return"collection"===t.type},get isRoute(){return"route"===t.type},get isTimeline(){return"timeline"===t.type},get boundingViewport(){if(t.bounding_box){var e=Object(r.getRoot)(t),n=Object(p.bbox)(t.bounding_box),i=m.a.viewport(n,e.mapViewport.mapDimensions);return{coordinates:i.center,zoom:i.zoom-1.25}}},get formattedCreatedAt(){return DateTime.fromISO(t.created_at).toLocaleString(DateTime.DATE_FULL)}}})).preProcessSnapshot((function(t){var e,n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);(n.terms&&(n.terms=n.terms.map((function(t){return t.term}))),n.associated_overlay_group)&&(n.associated_overlay_group_slug=null===(e=n.associated_overlay_group)||void 0===e?void 0:e.slug,delete n.associated_overlay_group);return n.collection_cta_block&&n.collection_cta_block.cta_block?n.cta=n.collection_cta_block.cta_block:n.cta=null,n.collection_items&&delete n.collection_items,n}));e.default=A},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model("PolygonModel",{type:r.types.string,coordinates:r.types.maybeNull(r.types.frozen([]))}).views((function(t){return{get longitude(){return t.coordinates[0]},get latitude(){return t.coordinates[1]},get centroid(){return"".concat(t.coordinates[0]," ").concat(t.coordinates[1])}}}));e.default=i},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model({name:r.types.string,url:r.types.maybeNull(r.types.string)});e.default=i},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model({trayVisible:r.types.boolean,trayLocked:r.types.boolean,overlayToolsVisible:r.types.boolean,mediaGalleryVisible:r.types.boolean,mobileMenuVisible:r.types.boolean,markersVisible:r.types.boolean,overflowToolbarVisible:r.types.boolean,basemapsVisible:r.types.boolean,showingModal:r.types.maybeNull(r.types.enumeration("modal_name",["add_to_collection","add_to_project","report_record"])),displayHidePinsOption:r.types.boolean,mapInteractions:r.types.boolean,customLegendVisible:r.types.boolean}).actions((function(t){return{setTrayVisible:function(e){t.trayVisible=e},setOverlayToolsVisible:function(e){t.overlayToolsVisible=e},setMediaGalleryVisible:function(e){t.mediaGalleryVisible=e},setMobileMenuVisible:function(e){t.mobileMenuVisible=e},setMarkersVisible:function(e){t.markersVisible=e},setOverflowToolbarVisible:function(e){t.overflowToolbarVisible=e},setBasemapsVisible:function(e){t.basemapsVisible=e},setTrayLock:function(e){t.trayLocked=e},setModal:function(e){t.showingModal=e},setDisplayHidePinsOption:function(e){t.displayHidePinsOption=e},setMapInteractions:function(e){t.mapInteractions=e},setCustomLegendVisible:function(e){t.customLegendVisible=e}}}));e.default=i},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(445),o=n(553);function a(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=r.types.model("UserProjectMembershipModel",{id:r.types.number,state:r.types.string,user:r.types.reference(r.types.late((function(){return i.default})),{get:function(t,e){var n=getRoot(e);return/^\/member\//.test(Object(r.getPath)(e))?n.member&&n.member.id===t?n.member:null:n.user&&n.user.id===t?n.user:null},set:function(t){return t}}),project:o.default}).actions((function(t){return{reject:function(){t.user.rejectInvitation(t)},accept:function(){t.user.acceptInvitation(t)},cancel:function(){t.user.leaveProject(t)},setState:function(e){return t.state=e}}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.user=t.user.id,e}));e.default=u},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(114),o=n(82);function a(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=r.types.model("UserProfileModel",{id:r.types.maybeNull(r.types.number),description:r.types.maybeNull(r.types.string),image:r.types.maybeNull(i.default),site_link:r.types.maybeNull(r.types.string),facebook:r.types.maybeNull(r.types.string),twitter:r.types.maybeNull(r.types.string),instagram:r.types.maybeNull(r.types.string),location:r.types.maybeNull(r.types.string),joined_date:r.types.maybeNull(r.types.string)}).views((function(t){return{getJoinedDate:function(){return o.DateTime.fromISO(t.joined_date).toLocaleString(o.DateTime.DATE_FULL)}}})).preProcessSnapshot((function(t){if(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return e.description=e.plain_content,e.joined_date=e.user.created_at,e}}));e.default=u},function(t,e,n){"use strict";n.r(e),n.d(e,"SearchFilter",(function(){return d}));var r=n(2),i=n(139),o=n(554),a=n(1007),s=n(671),u=n(1008),l=n(306);function c(){c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}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 h(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){p(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 p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d=r.types.model({query:r.types.maybeNull(r.types.string),limit:r.types.number,offset:r.types.number,start_date:r.types.maybeNull(r.types.integer),end_date:r.types.maybeNull(r.types.integer),type:r.types.array(r.types.string,[]),facet:r.types.array(r.types.string,[]),whole_map:r.types.boolean,centroid:r.types.maybeNull(r.types.string),distance:r.types.maybeNull(r.types.number),taxonomies:a.default}).volatile((function(t){return{contentTypes:{},taxonomiesLoaded:!1,defaultSearchProperties:{query:"",offset:0,whole_map:!0,start_date:null,end_date:null,type:Object(r.getRoot)(t).contentTypes.contentTypeValues}}})).actions((function(t){return{reset:function(){t.taxonomies.uncheckTermIds(),Object(r.applySnapshot)(t,h(h({},t),t.defaultSearchProperties))},afterCreate:function(){t.fetchTaxonomies(),t.type=Object(r.getRoot)(t).contentTypes.contentTypeValues},setSearchParameter:function(e,n){t[e]=n},toggleSearchType:function(e){var n=t.type.slice();n.indexOf(e)>-1?n.splice(n.indexOf(e),1):n.push(e),t.type=n},typeIsEnabled:function(e){return t.type.indexOf(e)>-1},toggleBoundedSearch:function(){t.whole_map=!t.whole_map},setBoundedSearchBounds:function(){if(t.whole_map)t.centroid=null,t.distance=null;else{var e=Object(r.getRoot)(t);t.centroid=e.mapViewport.centroid,t.distance=e.mapViewport.boundingBoxDistance}},fetchTaxonomies:Object(r.flow)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.taxonomies.fetch(u.fetchTaxonomiesQuery);case 2:t.taxonomiesLoaded=!0;case 3:case"end":return e.stop()}}),e)}))),clearSearchTypes:function(){t.type=[]},clearFacet:function(){t.facet=[]},setDateFiltering:function(e,n){t.start_date=e[0]===n[0]?null:e[0],t.end_date=e[1]===n[1]+1?null:e[1]}}})).views((function(t){return{get taxonomiesAreLoaded(){return t.taxonomiesLoaded},get nextOffset(){return t.limit+t.offset},get enabledContentTypes(){return t.type},get toQuery(){Object(r.getRoot)(t);var e={limit:t.limit,offset:t.offset};return t.facet.length?e.type=t.facet.toJSON():e.type=t.type.toJSON(),t.query&&t.query.length>0&&(e.query=t.query),t.whole_map||(e.centroid=t.centroid,e.distance=t.distance),t.taxonomies.toQuery.taxonomy_term_ids&&t.taxonomies.toQuery.taxonomy_term_ids.length>0?e.with_term_ids=t.taxonomies.toQuery.taxonomy_term_ids:e.with_term_ids=null,t.start_date&&(e.start_date=new Date(t.start_date,0,1).toISOString()),t.end_date&&(e.end_date=new Date(t.end_date,0,1).toISOString()),h({},e)},get boundedSearch(){return t.whole_map},get allTypesSelected(){return t.type.length==Object(r.getRoot)(t).contentTypes.contentTypeValues.length}}})).postProcessSnapshot((function(t){return{}})),m=o.default.named("SearchResultsCollection").props({filter:d,taxonomies:r.types.array(r.types.number,[]),recordCount:r.types.maybeNull(r.types.number),collectionCount:r.types.maybeNull(r.types.number),trailCount:r.types.maybeNull(r.types.number),overlayCount:r.types.maybeNull(r.types.number),projectCount:r.types.maybeNull(r.types.number),routeCount:r.types.maybeNull(r.types.number),timelineCount:r.types.maybeNull(r.types.number),results:r.types.array(l.default,[])}).actions((function(t){return{reset:function(){t.results=[],t.filter.reset()},clear:function(){t.results=[],t.filter.offset=0},fetchResults:Object(r.flow)(c().mark((function e(){var n,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading.loading(),e.prev=1,n=t.filter.whole_map?s.fetchSearchCardItemResultsQuery:s.fetchSearchCardItemResultsQueryWithBounds,e.next=5,t.fetch(n,t.filter.toQuery);case 5:o=e.sent,t.recordCount=o.record_total?o.record_total.aggregate.count:0,t.collectionCount=o.collection_total?o.collection_total.aggregate.count:0,t.trailCount=o.trail_total?o.trail_total.aggregate.count:0,t.overlayCount=o.overlay_total?o.overlay_total.aggregate.count:0,t.projectCount=o.project_total?o.project_total.aggregate.count:0,t.routeCount=o.route_total?o.route_total.aggregate.count:0,t.timelineCount=o.timeline_total?o.timeline_total.aggregate.count:0,Object(r.getRoot)(t).adjustLayoutScroll("top"),t.loading.done(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),t.loading.setError(e.t0.toString(),i.LoadingStatesEnum.ERROR);case 21:case"end":return e.stop()}}),e,null,[[1,18]])})))}})).views((function(t){return{get resultOrder(){return t.filter.query?"relevance":"alphabetical"}}}));e.default=m},function(t,e,n){"use strict";n.r(e);var r=n(2),i=r.types.model({query:r.types.maybeNull(r.types.string,""),limit:r.types.number,offset:r.types.number,type:r.types.array(r.types.string,[])}).volatile((function(t){return{contentTypes:{}}})).actions((function(t){return{afterCreate:function(){var e=getRoot(t);t.contentTypes=e.contentTypes.allContentTypes},setSearchParameter:function(e,n){t[e]=n}}})).views((function(t){return{get nextOffset(){return t.limit+t.offset}}}));e.default=i},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(153),o=n(551);function a(t){return function(t){if(Array.isArray(t))return s(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)return;if("string"===typeof t)return s(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 s(t,e)}(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.")}()}function s(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 u=i.default.named("TaxonomiesCollection").props({results:r.types.array(o.default,[])}).actions((function(t){return{setCheckedTermIds:function(e){t.results.forEach((function(t){return t.setCheckedIds(e)}))},uncheckTermIds:function(){t.results.forEach((function(t){return t.uncheckAll()}))}}})).views((function(t){return{get toQuery(){var e=t.results.map((function(t){return t.toQuery})).filter((function(t){return t}));return[].concat.apply([],e).reduce((function(t,e){var n;return t.taxonomy_term_ids=(n=[]).concat.apply(n,a(t.taxonomy_term_ids||[]).concat([e.taxonomy_term_ids])),t}),{})},get checkedIds(){return[].concat.apply([],t.results.map((function(t){return t.checkedIds})))},get hasCheckedIds(){return t.checkedIds.length>0}}}));e.default=u},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchTaxonomiesQuery",(function(){return i}));var r=n(21),i=function(t){return r.default.request("\n    #graphql\n\n    query TaxonomiesQuery {\n        total: taxonomies_aggregate {\n            aggregate {\n                count\n            }\n        }\n        results: taxonomies {\n            id\n            name\n            slug\n            when_searching_display_as\n            show_on_form\n            terms: taxonomy_terms(where: {queryable_parent_id: {_is_null: true}}) {\n                id\n                name\n                has_duplicate_name\n                position\n                sub_terms: children {\n                    id\n                    name\n                    has_duplicate_name\n                    position\n                }\n            }\n        }\n    }\n",t)}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(204),o=r.types.model("OverlayModel",{id:r.types.number,name:r.types.string,url:r.types.string,type:r.types.string,min_zoom:r.types.maybeNull(r.types.number),max_zoom:r.types.maybeNull(r.types.number),bbox_sw:r.types.maybeNull(i.default),bbox_ne:r.types.maybeNull(i.default),centroid:r.types.maybeNull(i.default),visualisation_settings:r.types.frozen({}),visualisation:r.types.string}).volatile((function(t){return{value:Object(r.getRoot)(t).siteMeta.initial_overlay_opacity||.75,disabled:!1}})).actions((function(t){return{setValue:function(e){t.value=parseFloat(e)},focusInMap:function(){t.disabled=!1;var e=Object(r.getRoot)(t);t.layerBounds&&e.mapViewport.fitBounds(t.layerBounds.map((function(t){return t.toJSON()})))},toggleEnabled:function(){t.disabled=!t.disabled}}})).views((function(t){return{get layerBounds(){return t.bbox_sw&&t.bbox_ne?[t.bbox_sw.coordinates,t.bbox_ne.coordinates]:null},get layerOpacity(){return t.disabled?0:t.value},get pickable(){return!(t.disabled||0===t.value)}}}));e.default=o},function(t,e,n){"use strict";n.r(e);n(8);var r=n(2),i=n(18),o=r.types.model("ContentType",{name:r.types.string,label:r.types.string}),a=r.types.model("ContentTypesCollection",{defaultTypes:r.types.array(o,[])}).views((function(t){return{get allContentTypes(){var e=t.defaultTypes.toJSON().slice();Object(r.getRoot)(t);return Object(i.hasFeature)("overlays")&&e.push({name:"overlay",label:"overlays"}),Object(i.hasFeature)("trails")&&e.push({name:"trail",label:"trails"}),Object(i.hasFeature)("projects")&&e.push({name:"project",label:"projects"}),Object(i.hasFeature)("routes")&&e.push({name:"route",label:"routes"}),Object(i.hasFeature)("timelines")&&e.push({name:"timeline",label:"timelines"}),e},get allSearchableContentTypes(){return t.allContentTypes},get contentTypeValues(){return t.allContentTypes.map((function(t){return t.name}))}}}));e.default=a},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchCardItemResultsQuery",(function(){return o})),n.d(e,"fetchCardItemResultsQueryWithBounds",(function(){return a}));var r=n(21),i=function(t){return"\n    ".concat(t,'_total: card_item_results_aggregate(args: {query: $query}, where: {\n        type: {\n            _in: "').concat(t,'"\n        }\n    }) {\n        aggregate {\n            count\n        }\n    }\n    ')},o=function(t){return r.default.request((e=t.type||[],"\n#graphql\nquery CardItemResults($limit: Int!, $offset: Int!, $type: [String!], $query: String, $ids: [bigint!]) {\n    ".concat(e.map((function(t){return i(t)})),"\n    total: card_item_results_aggregate(args: {query: $query}, where: {\n        type: {\n            _in: $type\n        }\n    }) {\n        aggregate {\n            count\n        }\n    }\n    results: card_item_results(args: {query: $query}, limit: $limit, offset: $offset, where: {\n        type: {_in: $type},\n        id: {_in: $ids}\n    }) {\n        id, name, excerpt, slug, location: lonlat, date_from, date_to, type, excerpt, image_url, hero_attachment_type\n    }\n}\n")),t);var e};window.fetchCardItemResultsQuery=o;var a=function(t){return r.default.request((e=t.type||[],"\n    #graphql\n    query CardItemResults($limit: Int!, $offset: Int!, $query: String, $type: [String!], $centroid: String!, $distance: numeric!) {\n        ".concat(e.map((function(t){return i(t)})),'\n        total: card_item_results_aggregate(args: {centroid: $centroid, orderby: "distance", query: $query}, where: {\n            distance: {\n                _lte: $distance\n            },\n            type: {\n                _in: $type\n            }\n        }) {\n            aggregate {\n                count\n            }\n        }\n        results: card_item_results(args: {centroid: $centroid, orderby: "distance", query: $query}, limit: $limit, offset: $offset, where: {\n            distance: {\n                _lte: $distance\n            },\n            type: {\n                _in: $type\n            }\n        }) {\n            name, excerpt, slug, location: lonlat, date_from, date_to, type, excerpt, image_url, state, hero_attachment_type\n        }\n    }\n')),t);var e}},function(t,e,n){"use strict";n.r(e),n.d(e,"PointsStack",(function(){return l}));var r=n(2),i=n(1013);function o(t){return function(t){if(Array.isArray(t))return a(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)return;if("string"===typeof t)return a(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 a(t,e)}(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.")}()}function a(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 s(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 u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=r.types.model("PointsStack",{layers:r.types.map(i.PointLayerModel)}).actions((function(t){return{addLayer:function(e,n){t.layers.set(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:"mvt"},n))},removeLayer:function(e){t.layers.delete(e)}}})).views((function(t){return{get sortedLayers(){return o(t.layers.values()).sort((function(t,e){return t.level<e.level?-1:t.level>e.level?1:0}))}}}))},function(t,e,n){"use strict";n.r(e),n.d(e,"PointLayerModel",(function(){return i}));var r=n(2),i=(n(1205),r.types.model("PointLayerModel",{tileUrl:r.types.string,level:0,highlighted:!1,orderedPosition:!1,markerPrefix:r.types.maybeNull(r.types.string),type:r.types.enumeration("type",["mvt","pmt"])}))},function(t,e,n){"use strict";n.r(e),n.d(e,"ParentContext",(function(){return c}));var r=n(2),i=n(446),o=n(171),a=n(139),s=n(21),u=n(18);function l(){l=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}var c=r.types.model("ParentContext",{entries:r.types.array(i.ParentContextEntryModel,[]),pending:r.types.maybeNull(i.ParentContextEntryModel)}).volatile((function(t){return{loading:a.default.create({code:a.LoadingStatesEnum.PENDING})}})).views((function(t){return{get parent(){return t.entries.slice(-1)[0]},get parentIds(){return t.entries.map((function(t){return t.id}))},matchingParentIdsForItem:function(e){return e.parent_item_ids.filter((function(e){return t.parentIds.indexOf(e)>-1}))},containsAnyParentFor:function(e){return t.matchingParentIdsForItem(e).length>0},parentIndexFor:function(e){var n=t.matchingParentIdsForItem(e);return n.length>0?t.parentIds.indexOf(n[0]):null}}})).actions((function(t){return{pushEntry:Object(r.flow)(l().mark((function e(n){var r,a,c,f,h,p,d,m,g,y=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=y.length>1&&void 0!==y[1]?y[1]:{},c=a.pending,f=void 0!==c&&c,y.length>2?y[2]:void 0,t.loading.loading(),h=Object(s.buildHeaders)({"X-Hasura-User-Token":Object(u.currentUserToken)()}),e.next=6,Object(o.fetchParentContextItemQuery)({slug:n},h);case 6:p=e.sent,d=p.collection,m=p.total.aggregate.count,g=i.ParentContextEntryModel.create({id:d[0].id,name:d[0].name,slug:d[0].slug,type:d[0].type,count:m,items:d[0].items,associated_overlay_group_slug:null===(r=d[0].associated_overlay_group)||void 0===r?void 0:r.slug}),t.loading.done(),f?t.pending=g:t.entries.findIndex((function(t){return t.id===g.id}))<0&&t.entries.push(g);case 12:case"end":return e.stop()}}),e)}))),removeEntriesAfterParentOf:function(e){var n=t.parentIndexFor(e);null==n?t.clear():t.entries=t.entries.slice(0,n+1)},pushPending:function(e){t.pushEntry(e.slug,{pending:!0})},promotePending:function(){t.pushEntry(t.pending.slug),t.pending=null},clear:function(){t.entries=[],t.pending=null},removeLastEntry:function(){}}}))},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/logo-humap-map-blue-dce9a792537b6fcf686bd558aa3a5f2c.svg"},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/sprites/point-markers@1-c8a0cdb96090c5be34ebf60aa371761c.png"},function(t,e,n){"use strict";n.r(e),n.d(e,"useMapZooming",(function(){return a}));var r=n(0),i=n(17),o=n(2),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e.zoomToBounds,e.points,Object(i.useStore)()),a=n.mapViewport,s=n.parentContext.parent;Object(r.useEffect)((function(){if(a&&t&&t.location)if(a&&"CollectionModel"===Object(o.getType)(t).name&&t.boundingViewport)a.setCenter(t.boundingViewport);else if(s&&"trail"===s.type){var e=Math.max(17,a.zoom);a.setCenter({coordinates:t.location.coordinates,zoom:e})}else if(s&&"route"===s.type){var n=Math.max(6,a.zoom);a.setCenter({coordinates:t.location.coordinates,zoom:n})}else{var r=Math.min(16,a.zoom);a.setCenter({coordinates:t.location.coordinates,zoom:r})}}),[t])}},function(t,e,n){t.exports={RecordsList:"RecordsList-module__RecordsList___TNKn_"}},function(t,e,n){t.exports={HumapFooter:"HumapFooter-module__HumapFooter___r3HLB"}},function(t,e,n){t.exports={TrayContent:"TrayContent-module__TrayContent___3lFvb",Tray:"TrayContent-module__Tray___2_NZ3",trayContent:"TrayContent-module__trayContent___1FwIF"}},function(t,e,n){t.exports={TrayTitle:"TrayTitle-module__TrayTitle___6Zyci"}},function(t,e,n){t.exports={Counts:"Counts-module__Counts___1DQAz"}},function(t,e,n){t.exports={ModalWrapper:"ModalWrapper-module__ModalWrapper___3rWEE"}},function(t,e,n){t.exports={CollectionBoothCloseButton:"CollectionBoothCloseButton-module__CollectionBoothCloseButton___2llvt"}},function(t,e,n){t.exports={CollectionBoothIIIFLink:"CollectionBoothIIIFLink-module__CollectionBoothIIIFLink___27l1x"}},function(t,e,n){t.exports={CloseButton:"CloseButton-module__CloseButton___2r9Lk"}},function(t,e,n){t.exports={TermListItem:"TermListItem-module__TermListItem___zPWq7"}},function(t,e,n){t.exports={TermList:"TermList-module__TermList___3jdwj"}},function(t,e,n){t.exports={TrayHero:"TrayHero-module__TrayHero___WaWEj"}},function(t,e,n){t.exports={TrayArticle:"TrayArticle-module__TrayArticle___2iG2r"}},function(t,e,n){t.exports={Logo:"Logo-module__Logo___2cpZR"}},function(t,e,n){"use strict";n.r(e);var r=n(200),i=n(0);function o(){var t=Object(i.useRef)(!0);return Object(i.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}e.default=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{leading:!1,trailing:!0},a=Object(i.useRef)({callback:t,delay:e,opts:n}),s=o();return Object(i.useEffect)((function(){a.current={callback:t,delay:e,opts:n}})),Object(i.useCallback)(Object(r.debounce)((function(){var t;a.current.delay===e&&s()&&(t=a.current).callback.apply(t,arguments)}),e,n),[e,r.debounce])}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return y})),n.d(e,"getPMTIconLayer",(function(){return v}));var r=n(1318),i=n(146),o=n(250),a=n.n(o),s=n(262),u=n(318);function l(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 c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function d(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g(t);if(e){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var y=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(o,t);var e,n,r,i=d(o);function o(){return f(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"getPickingInfo",value:function(t){var e=t.info;return t.sourceLayer,t.mode,e}}])&&h(e.prototype,n),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.PMTLayer),v=function(t,e,n,r,o,f,h){return new y({id:"pmt-".concat(btoa(t.tileUrl)),data:t.tileUrl,pickable:h,onClick:function(t){var n=t.object;h&&(n.properties.clustered&&("string"===typeof n.properties.id&&(n.properties.ids=n.properties.id.split(",")),"string"===typeof n.properties.type&&(n.properties.types=n.properties.type.split(","))),f(null),n.properties.clustered&&n.properties.point_count>9&&!e.atFullZoom?e.setCenterPitchBearingAndZoom(n.geometry,!1,0,e.zoom+1):o(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},n)))},onHover:function(t){"undefined"===typeof t||!1===(null===t||void 0===t?void 0:t.picked)?n(!1):n(!0)},autoHighlight:!1,refinementStrategy:"no-overlap",renderSubLayers:function(n){var r=n.tile.dataInWGS84;return new i.a({id:"".concat(n.id,"-points"),data:r,getPosition:function(t){return t.geometry.coordinates},iconAtlas:a.a,iconMapping:s,getIcon:function(n){if(n.properties.clustered)return e.atFullZoom?"pin-".concat(Object(u.getRoundedCount)(n.properties.point_count)):"point-".concat(Object(u.getRoundedCount)(n.properties.point_count));var r=[];return r.push(t.markerPrefix||n.properties.type),t.orderedPosition&&r.push(Object(u.getNormalisedPosition)(n.properties.position)),t.highlighted&&r.push("highlighted"),r.join("-")},getPixelOffset:function(e){var n=[0,0];return"trailpin"===t.markerPrefix?n=[0,-19.5]:("cluster"===e.properties.type&&atFullZoom||"record"===e.properties.type||"overlay"===e.properties.type||"trail"===e.properties.type||"collection"===e.properties.type)&&(n=[0,-14]),n},getSize:function(t){return"record"===t.properties.type||"overlay"===t.properties.type||"trail"===t.properties.type?45:50},pickable:!0,autoHighlight:!0,highlightColor:[255,255,255,100],opacity:1})}})}},function(t,e,n){"use strict";n.r(e);var r=n(126);e.default=function(t){return new r.a({id:"geojson-trail-layer",data:t,pickable:!0,stroked:!0,filled:!0,extruded:!0,lineJointRounded:!0,lineWidthScale:1,lineWidthMinPixels:3,getFillColor:[0,0,0],getLineColor:function(t){return[0,175,54,200]},getRadius:10,getLineWidth:1,getElevation:30})}},function(t,e,n){"use strict";n.r(e);var r=n(126);e.default=function(t){return new r.a({id:"geojson-trail-layer",data:t,pickable:!0,stroked:!0,filled:!0,extruded:!0,lineJointRounded:!0,lineWidthScale:1,lineWidthMinPixels:3,getFillColor:[0,0,0],getLineColor:function(t){return[0,175,54,200]},getRadius:10,getLineWidth:1,getElevation:30})}},function(t,e,n){"use strict";n.r(e);var r=n(243);e.default=function(t,e){return new r.a({id:"geojson-search-radius-layer",data:[{radius:e,centroid:t}],pickable:!0,opacity:.8,stroked:!0,filled:!1,radiusUnits:"meters",lineWidthMinPixels:16,lineWidthMaxPixels:16,strokeWidth:100,getPosition:function(t){return t.centroid},getRadius:function(t){return t.radius},getLineColor:function(t){return[54,49,144,50]}})}},function(t,e,n){"use strict";n.r(e);n(0);var r=n(1038),i=n(1039),o=n(1040),a=n(1041);e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.overlays.reverse().map((function(t){if("raster"===t.type)return Object(r.default)(t,e);if("vector"===t.type)switch(t.visualisation){case"fill_patterns":return Object(o.default)(t,e);case"point_sizes":return Object(a.default)(t,e);default:return Object(i.default)(t,e)}}))}},function(t,e,n){"use strict";n.r(e);var r=n(363),i=n(145);function o(t){return function(t){if(Array.isArray(t))return a(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)return;if("string"===typeof t)return a(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 a(t,e)}(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.")}()}function a(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 s(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 u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u({id:"layer-".concat(t.id),opacity:t.layerOpacity,data:t.url,tileSize:256,maxRequests:20,pickable:!1,transparentColor:[255,255,255,0],minZoom:t.min_zoom,maxZoom:t.max_zoom,renderSubLayers:function(t){var e=t.tile.bbox,n=e.west,i=e.south,o=e.east,a=e.north;return[new r.a(t,{data:null,image:t.data,bounds:[n,i,o,a]})]}},e);return t.bbox_sw&&t.bbox_ne&&(n.extent=[].concat(o(t.bbox_sw.coordinates),o(t.bbox_ne.coordinates))),new i.a(n)}},function(t,e,n){"use strict";n.r(e);var r=n(213),i=n(268);function o(t){return function(t){if(Array.isArray(t))return a(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)return;if("string"===typeof t)return a(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 a(t,e)}(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.")}()}function a(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}e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={id:"layer-".concat(t.id),data:t.url,opacity:t.layerOpacity,pickable:t.pickable,filled:t.visualisation_settings.fill_polygons,stroked:!0,getLineWidth:t.visualisation_settings.line_width,lineWidthUnits:"meters",lineWidthMinPixels:1,pointRadiusMinPixels:2,getLineColor:Object(r.hexToRGB)(t.visualisation_settings.color),getFillColor:[].concat(o(Object(r.hexToRGB)(t.visualisation_settings.color)),[t.visualisation_settings.polygon_opacity/100*255]),getRadius:t.visualisation_settings.point_radius,pointRadiusUnits:"meters",minZoom:t.min_zoom,maxZoom:t.max_zoom,onHover:function(t){var n=t.picked;e.setIsHovering(n)},onTileError:function(t){},onClick:function(t){e.setPickedOverlayFeature(t)}};return t.bbox_sw&&t.bbox_ne&&(n.extent=[].concat(o(t.bbox_sw.coordinates),o(t.bbox_ne.coordinates))),new i.a(n)}},function(t,e,n){"use strict";n.r(e);var r=n(213),i=n(382),o=n.n(i),a=n(396),s=n(1153),u=n(268);function l(t){return function(t){if(Array.isArray(t))return c(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)return;if("string"===typeof t)return c(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 c(t,e)}(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.")}()}function c(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}e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={id:"layer-".concat(t.id),data:t.url,opacity:t.layerOpacity,pickable:t.pickable,filled:t.visualisation_settings.fill_polygons,stroked:!0,getLineWidth:t.visualisation_settings.line_width,lineWidthUnits:"meters",lineWidthMinPixels:1,getLineColor:Object(r.hexToRGB)(t.visualisation_settings.color),getFillColor:[].concat(l(Object(r.hexToRGB)(t.visualisation_settings.color)),[t.visualisation_settings.polygon_opacity/100*255]),getRadius:t.visualisation_settings.point_radius,radiusMinPixels:100,pointRadiusUnits:"meters",minZoom:t.min_zoom,maxZoom:t.max_zoom,onHover:function(t){var n=t.picked;e.setIsHovering(n)},onClick:function(t){e.setPickedOverlayFeature(t)},fillPatternAtlas:o.a,fillPatternMapping:a,fillPatternMask:t.visualisation_settings.mask_pattern,getFillPattern:function(){return t.visualisation_settings.pattern_name},getFillPatternOffset:[0,0],getFillPatternScale:2500,extensions:[new s.a({pattern:!0})]};return t.bbox_sw&&t.bbox_ne&&(n.extent=[].concat(l(t.bbox_sw.coordinates),l(t.bbox_ne.coordinates))),new u.a(n)}},function(t,e,n){"use strict";n.r(e);var r=n(213),i=n(1016),o=n.n(i),a=n(1145),s=n(565),u=n(146),l=n(261);function c(t){return function(t){if(Array.isArray(t))return f(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)return;if("string"===typeof t)return f(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 f(t,e)}(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.")}()}function f(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}e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){return e.mapViewport.mapRef.getMap().getZoom()},i={id:"layer-".concat(t.id),data:t.url,opacity:t.layerOpacity,minZoom:t.min_zoom,maxZoom:t.max_zoom,pickable:t.pickable,onClick:function(t){e.setPickedOverlayFeature(t)},onHover:function(t){"undefined"===typeof t.object?e.setIsHovering(!1):e.setIsHovering(!0)},renderSubLayers:function(e){var i=e.tile.dataInWGS84;return[new u.a({id:"".concat(e.id,"-point-size"),data:i,getPosition:function(t){return t.geometry.coordinates},iconAtlas:o.a,iconMapping:a,pickable:!0,getIcon:function(t){if("Point"===t.geometry.type)return"roundel"},getSize:function(e){if(e.properties&&e.properties[t.visualisation_settings.data_attribute]&&t.visualisation_settings.min_value&&t.visualisation_settings.max_value){var n=parseInt(e.properties[t.visualisation_settings.data_attribute]),r=t.visualisation_settings.min_value,i=(n-r)/(t.visualisation_settings.max_value-r),o=t.visualisation_settings.meters_at_min;return o+i*(t.visualisation_settings.meters_at_max-o)}return 0},sizeUnits:"meters",minSize:1e4,mask:!0,getColor:function(e){return[].concat(c(Object(r.hexToRGB)(t.visualisation_settings.color)),[t.visualisation_settings.polygon_opacity/100*255])},opacity:t.layerOpacity,refinementStrategy:"no-overlap"}),new l.a({id:"".concat(e.id,"-text"),data:i,getText:function(e){if(n()>=1.8)return"".concat(e.properties[t.visualisation_settings.data_attribute])},getPosition:function(t){return t.geometry.coordinates},getSize:function(t){return n()>=5?36:16},getTextAnchor:"middle",getColor:[255,255,255,255],opacity:t.layerOpacity,fontFamily:"Rubik"})]}};return t.bbox_sw&&t.bbox_ne&&(i.extent=[].concat(c(t.bbox_sw.coordinates),c(t.bbox_ne.coordinates))),new s.default(i)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(49),a=n(7),s=n(444),u=n(17);e.default=Object(a.a)((function(){var t=Object(u.useStore)().overlayGroups,e=t.pickedOverlayFeature,n=t.setPickedOverlayFeature;if(e)return i.a.createElement(o.g,{latitude:e.coordinate[1],longitude:e.coordinate[0],closeButton:!0,dynamicPosition:!0,closeOnClick:!1,anchor:"bottom",captureScroll:!0,captureClick:!0,onClose:function(){n(null)}},i.a.createElement(s.default,{data:e.object.properties}))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30),a=n(7),s=n(191),u=n.n(s),l=n(17),c=n(1044),f=n(106),h=n.n(f);function p(){p=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=d,s(v,"constructor",d),s(d,"constructor",h),h.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function d(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function m(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return g(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 g(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(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}e.default=Object(a.a)((function(){var t=Object(l.useStore)(),e=t.mapViewport.setCenter,n=t.uiSettings.setMapInteractions,a=m(Object(r.useState)(!1),2),s=a[0],f=a[1],g=m(Object(r.useState)(!1),2),y=g[0],v=g[1],b=m(Object(r.useState)([]),2),_=b[0],A=b[1],w=m(Object(r.useState)(""),2),x=w[0],E=w[1];Object(r.useEffect)((function(){if(""!==x){var t=function(){var t,e=(t=p().mark((function t(){var e;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(c.fetchCustomPlaceLookupQuery)({query:x});case 2:(e=t.sent)&&e.do_custom_place_lookup.results&&(A(e.do_custom_place_lookup.results),v(!0));case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){d(o,r,i,a,s,"next",t)}function s(t){d(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();t()}}),[x]);var O=Object(r.useRef)(),S=Object(r.useRef)(),P=function(t){O.current.contains(t.target)||k()},C=function(t){t.stopPropagation()},T=function(t){n(!0)},k=function(){T(),f(!1),v(!1),E(""),null!==S&&void 0!==S&&S.current&&(S.current.value="")},I=function(t){e({coordinates:t.lonLat,zoom:16}),k()};return Object(r.useEffect)((function(){return s?(document.addEventListener("click",P),O.current.addEventListener("pointerdown",C)):(document.removeEventListener("click",P),O.current.removeEventListener("pointerdown",C)),function(){document.removeEventListener("click",P),O.current.removeEventListener("pointerdown",C)}}),[s]),i.a.createElement("div",{className:"".concat(h.a.PlaceSearch," ").concat(s?h.a.isOpen:h.a.isClosed),ref:O,onMouseEnter:function(t){n(!1)},onMouseLeave:T},i.a.createElement("div",{className:h.a.buttonInput,onClick:function(){f(!0),S.current.focus()}},i.a.createElement("span",{className:h.a.icon}),i.a.createElement("div",{className:h.a.searchField},i.a.createElement("span",{className:h.a.label},I18n.t("components.global.find_place")),i.a.createElement("input",{type:"text",placeholder:I18n.t("components.global.place_name"),ref:S,onKeyUp:function(t){t.persist(),u()((function(){E(t.target.value)}),400)()}}))),i.a.createElement(o.a,null,y&&i.a.createElement(o.b.div,{key:"modal",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}},i.a.createElement("div",{className:h.a.wrapper},i.a.createElement("ul",{className:h.a.results},Array.isArray(_)?0===_.length?i.a.createElement("li",{className:h.a.listHeader},"No results found"):_.map((function(t,e){return i.a.createElement("li",{key:"place-".concat(e)},i.a.createElement("button",{onClick:function(){return I(t)}},t.name))})):0===Object.keys(_).length?i.a.createElement("li",{className:h.a.listHeader},"No results found"):Object.entries(_).map((function(t){var e=m(t,2),n=e[0],r=e[1];return i.a.createElement(i.a.Fragment,{key:n},i.a.createElement("li",{className:h.a.listHeader},n),r.map((function(t,e){return i.a.createElement("li",{key:"place-".concat(e)},i.a.createElement("button",{onClick:function(){return I(t)}},t.name))})))})))))))}))},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchCustomPlaceLookupQuery",(function(){return i}));var r=n(21),i=function(t,e){return r.default.request("\n    #graphql\n    query DoCustomPlaceLookup($query:String!) {\n        do_custom_place_lookup(query: $query) {\n            results\n        }\n    }\n",t,{headers:e})}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(679),a=n(14),s=n(78),u=n(17);e.default=function(){var t=Object(u.useStore)().siteMeta,e=void 0;return t&&t.mapLogo&&(e=t.mapLogo.url+"?pad-left=180&pad-right=180&pad-top=50&pad-bottom=50&bg=FFFFFF"),i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{htmlAttributes:{lang:t.siteMetaAttributes.lang}},i.a.createElement("meta",{property:"og:type",content:"article"}),i.a.createElement("meta",{name:"twitter:card",content:"summary"}),i.a.createElement("meta",{name:"twitter:site",content:t.siteMetaAttributes.twitter})),i.a.createElement(s.default,{title:t.siteMetaAttributes.title,url:Object(a.e)().href,image:e}))}},function(t,e,n){t.exports={HelpIndex:"HelpIndex-module__HelpIndex___33zxo"}},function(t,e,n){t.exports={CategoryListItem:"CategoryListItem-module__CategoryListItem___2S8cP"}},function(t,e,n){t.exports={CategoryList:"CategoryList-module__CategoryList___36rCz"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(54),a=n(306),s=n(144);function u(){u=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function l(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)}))}}function f(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(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 h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(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 p=function(t){var e=f(Object(r.useState)(!1),2),n=e[0],l=e[1];if(Object(r.useEffect)((function(){var e=!0;function n(){return(n=c(u().mark((function t(n){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetchCardItemResultsQuery(n);case 2:r=t.sent,e&&l(r.results);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return function(t){n.apply(this,arguments)}({offset:t.offset,limit:t.limit,type:t.content_type,ids:t.ids}),function(){return e=!1}}),[]),!1===n)return i.a.createElement(o.default,null);var h=n.map((function(t){return a.default.create(t)}));return i.a.createElement(i.a.Fragment,null,h.map((function(t,e){return i.a.createElement(s.default,{key:"card-item-record-".concat(e,"-").concat(t.slug),path:"/map/records/".concat(t.slug),item:t})})))};p.defaultProps={offset:0,limit:12,ids:null},e.default=p},function(t,e,n){t.exports={LanguageIndex:"LanguageIndex-module__LanguageIndex___2rZA4"}},function(t,e,n){t.exports={browserupgrade:"Layout-module__browserupgrade___23c2y","user-is-tabbing":"Layout-module__user-is-tabbing___RFjoU",hidden:"Layout-module__hidden___rVoLU","sr-only":"Layout-module__sr-only___1vegH",focusable:"Layout-module__focusable___2HBcj",invisible:"Layout-module__invisible___1Js7-",clearfix:"Layout-module__clearfix___3WJNm","toggleable--is-hidden":"Layout-module__toggleable--is-hidden___2NgiT","toggleable--is-shown":"Layout-module__toggleable--is-shown___3c-RU",Layout:"Layout-module__Layout___1A1_C"}},function(t,e,n){"use strict";var r=n(179),i=n.n(r);e.a=function(t,e){return i()(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=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},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(0),a=u(o),s=u(n(3));function u(t){return t&&t.__esModule?t:{default:t}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],f=function(t,e){e.style.fontSize=t.fontSize,e.style.fontFamily=t.fontFamily,e.style.fontWeight=t.fontWeight,e.style.fontStyle=t.fontStyle,e.style.letterSpacing=t.letterSpacing,e.style.textTransform=t.textTransform},h=!("undefined"===typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),p=function(){return h?"_"+Math.random().toString(36).substr(2,12):void 0},d=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.inputRef=function(t){n.input=t,"function"===typeof n.props.inputRef&&n.props.inputRef(t)},n.placeHolderSizerRef=function(t){n.placeHolderSizer=t},n.sizerRef=function(t){n.sizer=t},n.state={inputWidth:t.minWidth,inputId:t.id||p(),prevId:t.id},n}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.id;return n!==e.prevId?{inputId:n||p(),prevId:n}:null}}]),i(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(t,e){e.inputWidth!==this.state.inputWidth&&"function"===typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var t=this.input&&window.getComputedStyle(this.input);t&&(f(t,this.sizer),this.placeHolderSizer&&f(t,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&"undefined"!==typeof this.sizer.scrollWidth){var t=void 0;t=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(t+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(t=this.props.minWidth),t!==this.state.inputWidth&&this.setState({inputWidth:t})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var t=this.props.injectStyles;return h&&t?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var t=[this.props.defaultValue,this.props.value,""].reduce((function(t,e){return null!==t&&void 0!==t?t:e})),e=r({},this.props.style);e.display||(e.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(this.props,[]);return function(t){c.forEach((function(e){return delete t[e]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:e},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},t),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),e}(o.Component);d.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},d.defaultProps={minWidth:1,injectStyles:!0},e.default=d},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(88),s=n(1055);e.default=Object(o.a)((function(t){var e=t.overlayGroup,n=t.index;return i.a.createElement(a.b,{draggableId:"id-".concat(e.id),key:"id-".concat(e.id),index:n},(function(t){return i.a.createElement(s.default,{provided:t,overlayGroup:e})}))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(71),s=n(109),u=n(14),l=n(66),c=n.n(l),f=n(688),h=n(757),p=function(t){return i.a.createElement("div",t,i.a.createElement(a.a,{icon:s.i}))};e.default=Object(o.a)((function(t){var e=t.overlayGroup,n=t.provided;if(e.simplified){var r=e.overlays.map((function(t){return i.a.createElement(f.default,{key:"overlay-".concat(t.id),link:"/map/overlays/".concat(e.slug),name:e.name,overlay:t,overlayGroup:e})}));return i.a.createElement("div",{key:"id-".concat(e.id)},i.a.createElement("div",Object.assign({ref:n.innerRef},n.draggableProps),i.a.createElement("ul",{className:c.a.overlaysListSimple},i.a.createElement(p,n.dragHandleProps),r)))}var o=e.overlays.map((function(t){return i.a.createElement(f.default,{name:t.name,overlay:t,key:"overlay-tool-row-".concat(t.id)})})),a=e.overlays.map((function(t){return i.a.createElement(h.default,{name:t.name,overlay:t,key:"overlay-tool-gird-item-".concat(t.id)})}));return i.a.createElement("div",{key:"id-".concat(e.id)},i.a.createElement("div",Object.assign({ref:n.innerRef},n.draggableProps),i.a.createElement("ul",{className:c.a.overlaysListAdvanced},i.a.createElement("li",{className:"".concat(e.closed?c.a.isClosed:"")},i.a.createElement(p,n.dragHandleProps),i.a.createElement("div",{className:c.a.overlayListItem},i.a.createElement("span",{className:c.a.overlayTitle},i.a.createElement(u.a,{to:"/map/overlays/".concat(e.slug)},e.name)),i.a.createElement("span",{className:c.a.removeOverlay,onClick:e.toggle}),i.a.createElement("span",{className:c.a.dropdownIndicator,onClick:e.toggleClosed})),"list"===e.key_mode&&i.a.createElement("ul",{className:c.a.childOverlaysList},o),"grid"===e.key_mode&&i.a.createElement("ul",{className:c.a.childOverlaysGrid},a)))))}))},function(t,e,n){t.exports={OverlayKeeper:"OverlayKeeper-module__OverlayKeeper___2AZVL"}},function(t,e,n){t.exports={OverlayLayersList:"OverlayLayersList-module__OverlayLayersList___1ZUWW",description:"OverlayLayersList-module__description___1ZRlK"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1147),a=n.n(o),s=n(1303),u=(n(1144),n(1304));e.default=function(t){return i.a.createElement("div",{className:a.a.ContentAreaWithSidebar},i.a.createElement("div",{className:a.a.contentArea},i.a.createElement(s.default,{content:t.content})),i.a.createElement("div",{className:a.a.sidebar},i.a.createElement(i.a.Fragment,null,t.cta_blocks.map((function(t,e){return i.a.createElement(u.default,{key:"sidebar-cta-".concat(e),title:t.title,content:t.sanitised_content,button_text:t.button_text,url:t.url})})))))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1151),a=n.n(o),s=n(1144);e.default=function(t){return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:a.a.QuickStarts},i.a.createElement("div",{className:a.a.textContent},i.a.createElement("h2",null,I18n.t("components.pages.quick_starts.explore")),t.content&&i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.content}})),i.a.createElement("div",{className:a.a.quickStarts},i.a.createElement(i.a.Fragment,null,t.quick_starts.map((function(t){return i.a.createElement(s.default,{quick_start:t.quick_start,key:t.quick_start.url||Math.random()})}))))))}},function(t,e,n){t.exports={RecordAssociations:"RecordAssociations-module__RecordAssociations___1ytub"}},function(t,e,n){t.exports={RecordBoothCloseButton:"RecordBoothCloseButton-module__RecordBoothCloseButton___x59-y"}},function(t,e,n){t.exports={RecordBoothIIIFLink:"RecordBoothIIIFLink-module__RecordBoothIIIFLink___2DZWU"}},function(t,e,n){t.exports={RecordKeywords:"RecordKeywords-module__RecordKeywords___1t2dU"}},function(t,e,n){t.exports={RecordLinks:"RecordLinks-module__RecordLinks___30mjY"}},function(t,e,n){t.exports={RecordRelatedRecords:"RecordRelatedRecords-module__RecordRelatedRecords___1B7Zy"}},function(t,e,n){t.exports={RecordTextContent:"RecordTextContent-module__RecordTextContent___2RjTM"}},function(t,e,n){"use strict";function r(t){var e=t.match(/^(.*?),/);return(e?e[1]:"").replace(/[^\w\s]/g,"-").replace(/\s+/g,"-").toLowerCase()}n.r(e),n.d(e,"getNotebookCollectionSlug",(function(){return r}))},function(t,e,n){},function(t,e,n){t.exports={TrayTitleActions:"TrayTitleActions-module__TrayTitleActions___2Wfmb"}},function(t,e,n){t.exports={CardOrder:"CardOrder-module__CardOrder___22Ifg"}},function(t,e,n){t.exports={SelectedTermList:"SelectedTermList-module__SelectedTermList___1N2-K"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(252),a=n(559),s=n(367),u=n(54),l=n(560),c=n(117),f=n.n(c),h=n(14),p=n(62);n(82);function d(){d=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function m(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function g(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return y(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 y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(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}e.default=function(t){var e=t.user,n=t.profile,c=g(Object(r.useState)(!1),2),y=c[0],v=c[1],b=g(Object(r.useState)([]),2),_=b[0],A=b[1],w=g(Object(r.useState)(0),2),x=w[0],E=w[1],O=g(Object(r.useState)({}),2),S=(O[0],O[1]);if(Object(r.useEffect)((function(){var t=function(){var t,n=(t=d().mark((function t(){var n;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(a.fetchUserEventsQuery)({gid:Object(s.toGid)(e)});case 2:n=t.sent,E(n.views.aggregate.count),n.activity_logs.length>0&&(A(n.activity_logs),S(n.activity_logs[0].subject_meta)),v(!0);case 6:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){m(o,r,i,a,s,"next",t)}function s(t){m(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();t()}),[e]),!y)return i.a.createElement(u.default,null);if(!_.length)return i.a.createElement(i.a.Fragment,null);var P=_.map((function(t,e){return t.entries.map((function(e){return Object.assign({},e,{meta:t.subject_meta})}))})).flat().sort((function(t,e){return t.date<e.date?-1:t.date>e.date?1:0})).reverse().slice(0,5).map((function(t,e){return Object(o.ActivityLogEntry)({entry:t,key:"entry-".concat(e),subjectMeta:t.meta,html:Object(l.activityStringForUser)({entry:t,subjectMeta:t.meta})})}));return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:f.a.Colophon},i.a.createElement("div",{className:f.a.row},i.a.createElement("div",{className:f.a.counts},i.a.createElement("span",{className:f.a.views},x)),i.a.createElement("div",{className:f.a.profile},i.a.createElement("div",{className:f.a.textContent},i.a.createElement(h.a,{to:"/map/contribute/user/".concat(e.id)},e.name),i.a.createElement("span",{className:f.a.date}," joined on ",e.formattedCreatedAt," ")),n&&n.image&&n.image.url&&i.a.createElement(p.default,Object.assign({className:f.a.logoImage},n.image,{parameters:{w:60,h:60,fit:"crop"}}))))),i.a.createElement(o.ActivityLog,null,P))}},function(t,e,n){t.exports={TrayIntro:"TrayIntro-module__TrayIntro___3vBFA"}},function(t,e,n){t.exports={ContributeView:"ContributeView-module__ContributeView___1q-VD"}},function(t,e,n){t.exports={CurrentUserActions:"CurrentUserActions-module__CurrentUserActions___2BQhO",shareButtons:"CurrentUserActions-module__shareButtons___1rmhz",notice:"CurrentUserActions-module__notice___2z_gP"}},function(t,e,n){t.exports={ProjectMemberDirectory:"ProjectMemberDirectory-module__ProjectMemberDirectory___3FzMD"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(273),s=n(279),u=n(8),l=n.n(u);e.default=Object(o.a)((function(t){var e=t.project,n=t.user,r=e.memberships.find((function(t){return t.membershipUser===n}));return i.a.createElement("div",null,r&&i.a.createElement(s.default,{label:l.a.t("components.user_generated_content.team_membership.modal_label")},(function(t,r){return i.a.createElement("div",null,i.a.createElement("h3",null,l.a.t("components.user_generated_content.team_membership.title")),i.a.createElement(a.a,{label:l.a.t("yes"),primary:!0,onClick:function(){n.leaveProject(e.memberships.find((function(t){return t.user.id===n.id})),e),r(!1)}}),i.a.createElement(a.a,{label:l.a.t("no"),onClick:function(){return r(!1)}}))})))}))},function(t,e,n){t.exports={ProjectPreMemberActions:"ProjectPreMemberActions-module__ProjectPreMemberActions___rffxL"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(17),o=["type","path"];function a(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}e.default=function(t){var e=t.type,n=void 0===e?"all":e,s=t.path,u=(a(t,o),Object(i.useStore)()),l=u.pointsStack,c=l.addLayer,f=l.removeLayer,h=u.mapRefIsSet,p=(u.searchResults,document.querySelector("meta[name=tenant-slug]").content),d="https://".concat(["markers-production.humap.site",p,n].join("/"),".pmtiles");Object(r.useEffect)((function(){return c(s,{tileUrl:d,type:"pmt"}),function(){f(s)}}),[h])}},function(t,e,n){"use strict";n.r(e);var r=n(3),i=n.n(r),o=n(0),a=n.n(o),s=n(399),u=n(7),l=["highlighted","slug","sub_slug","types","query","user","term_ids","start_date","end_date","centroid","distance","level","path"];function c(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}var f=function(t){var e=t.highlighted,n=t.slug,r=t.sub_slug,i=t.types,o=t.query,u=t.user,f=t.term_ids,h=t.start_date,p=t.end_date,d=t.centroid,m=t.distance,g=t.level,y=void 0===g?0:g,v=t.path,b=c(t,l);return Object(s.default)({highlighted:e,path:v,slug:0===y?n:r,types:i,query:o,user:u,term_ids:f,start_date:h,end_date:p,centroid:d,distance:m,baseUrl:"".concat("https://vector-tiles.humap.site","/rpc/clustered_points")}),a.a.createElement(a.a.Fragment,null,b.children)};f.propTypes={user:i.a.object,query:i.a.string,term_ids:i.a.array,start_date:i.a.string,end_date:i.a.string,centroid:i.a.string,distance:i.a.number,types:i.a.array,level:i.a.number.isRequired},f.defaultProps={level:0},e.default=Object(u.a)(f)},function(t,e,n){t.exports={browserupgrade:"Layout-module__browserupgrade___3DVCI","user-is-tabbing":"Layout-module__user-is-tabbing___2Igcm",hidden:"Layout-module__hidden___2e7ic","sr-only":"Layout-module__sr-only___ikGBh",focusable:"Layout-module__focusable___1vQuK",invisible:"Layout-module__invisible___5aBP3",clearfix:"Layout-module__clearfix___2sVCs",Layout:"Layout-module__Layout___14Zaj"}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(200),o=n(115),a=n(45);function s(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 u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=r.types.model("ViewportModel",{width:window.innerWidth,height:window.innerHeight,zoom:10,maxZoom:20,longitude:0,latitude:0,transitionDuration:350,bearing:0,pitch:0}).volatile((function(t){return{mapRef:{}}})).actions((function(t){return{setMapRef:function(e){t.mapRef=e,Object(r.getRoot)(t).setMapRef(!0)},setZoom:function(e){t.zoom=e},setPitchAndBearing:function(e,n){t.pitch=e,t.bearing=n},setCenter:function(e){t.longitude=e.coordinates[0],t.latitude=e.coordinates[1],e.zoom&&(t.zoom=e.zoom)},setCenterPitchBearingAndZoom:function(e,n,r,i){t.pitch=r,t.zoom=i,t.longitude=e.coordinates[0],t.latitude=e.coordinates[1]},fitBounds:function(e){var n=Math.ceil(window.innerHeight/20),r=Math.ceil(window.innerWidth/20),i=new o.a(u({},t.toJSON())).fitBounds(e,{padding:{top:n,bottom:n,left:r,right:r}}),a=u(u({},t.toJSON()),{},{latitude:i.latitude,longitude:i.longitude,zoom:i.zoom,scale:i.scale});t.setMapViewport({viewState:a})},setMapViewport:Object(i.debounce)((function(e){var n=e.viewState;Object(r.applySnapshot)(t,n)}),250,{leading:!1,trailing:!0})}})).views((function(t){return{get centroid(){var e=t.mapRef.getMap().getCenter();return"".concat(e.lng," ").concat(e.lat)},get boundingBoxDistance(){var e=t.mapRef.getMap().getCenter(),n=t.mapRef.getMap().getBounds();return Object(a.distance)([e.lng,e.lat],[n._ne.lng,n._ne.lat],{units:"metres"})},get mapDimensions(){return[t.mapRef.getMap().getContainer().offsetWidth,t.mapRef.getMap().getContainer().offsetHeight]}}}));e.default=c},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(696),o=n(1085),a=n(575),s=n(1086),u=(n(576),["feature_layers","reference_layers","bbox_ne","bbox_sw","grid"]);function l(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 c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(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}var h=r.types.model("PlaceModel",{id:r.types.number,name:r.types.string,description:r.types.maybeNull(r.types.string),featureLayers:r.types.array(i.default,[]),currentFeatureLayer:r.types.maybeNull(r.types.reference(i.default)),referenceLayers:o.default,grid:r.types.maybeNull(s.default),currentGridSquare:r.types.maybeNull(r.types.reference(a.default)),bbox_sw:r.types.array(r.types.number,[]),bbox_ne:r.types.array(r.types.number,[]),grid_url:r.types.maybeNull(r.types.string),embedMetadata:r.types.frozen(),intro_text:r.types.maybeNull(r.types.string),embed_token:r.types.string,bookmarks:r.types.maybeNull(r.types.array(r.types.number)),enable_markers:r.types.optional(r.types.boolean,!0),enable_polygons:r.types.optional(r.types.boolean,!0),enable_trace:r.types.optional(r.types.boolean,!0),enable_lines:r.types.optional(r.types.boolean,!0)}).actions((function(t){return{afterCreate:function(){!t.currentFeatureLayer&&t.featureLayers.length>0&&t.setCurrentFeatureLayer(t.featureLayers[0]),t.getBookmarks()},setCurrentFeatureLayer:function(e){t.currentFeatureLayer=e},setFeatureLayers:function(e){t.featureLayers=e,!t.currentFeatureLayer&&t.featureLayers.length>0&&t.setCurrentFeatureLayer(t.featureLayers.reverse()[0])},setReferenceLayers:function(e){t.referenceLayers=e},addFeatureLayer:function(e){var n=t.featureLayers.slice();return n.push(e),t.featureLayers=n,t.featureLayers.reverse()[0]},setCurrentGridSquare:function(e){var n=t.grid.allGridSquares.find((function(t){return t.id===e}));t.currentGridSquare=n||null},toggleSquareBookmarkStatus:function(e){var n=t.bookmarks,r=n.indexOf(e);-1===r?n.push(e):n.splice(r,1),t.bookmarks=n,t.persistBookmarks()},getBookmarks:function(){var e=localStorage.getItem("bookmarks"),n=e?JSON.parse(e):[];n=n.map((function(t){return parseInt(t)})),t.bookmarks=n},persistBookmarks:function(){localStorage.setItem("bookmarks",JSON.stringify(t.bookmarks))}}})).views((function(t){return{get visibleFeatureLayers(){return t.featureLayers},get currentFeatureLayerId(){return t.currentFeatureLayer?t.currentFeatureLayer.id:null},get isCurrentSquareBookmarked(){return t.bookmarks.includes(t.currentGridSquare.id)},set currentFeatureLayerId(e){t.currentFeatureLayer="FeatureLayer-".concat(e)}}})).preProcessSnapshot((function(t){if(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t),n=e.feature_layers,r=e.reference_layers,i=e.bbox_ne,o=e.bbox_sw,a=e.grid,s=f(e,u);s.featureLayers=n.map((function(t){return t.feature_layer})),s.referenceLayers={layers:r.map((function(t){return t.reference_layer}))},s.bbox_ne=i.coordinates,s.bbox_sw=o.coordinates,null!==a&&void 0!==a&&a.tile_url&&(s.grid_url=a.tile_url);return["enable_markers","enable_polygons","enable_trace","enable_lines"].forEach((function(t){null===s[t]&&(s[t]=void 0)})),s.grid=a,s}}));e.default=h},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return i}));var r=n(45);function i(t,e){if(void 0===t.geometry||"Polygon"!==t.geometry.type)throw new Error('"polygonreduce" only accepts polygon type input');e=void 0===e||isNaN(e)||0===e?.1:Math.abs(e);for(var n,i=Object(r.area)(t),o=function(t){return{type:"Feature",properties:{},geometry:{type:"Point",coordinates:t.geometry.coordinates[0][0]}}},a=function(t){var e,n,i=void 0!==t.features?t.features[0]:t,o=0,a=-1;if("MultiPolygon"==i.geometry.type){for(var s=0;s<i.geometry.coordinates.length;s++)e=Object(r.polygon)(i.geometry.coordinates[s]),Object(r.area)(e)>o&&(o=Object(r.area)(e),a=s);i.geometry.coordinates=[i.geometry.coordinates[a][0]],i.geometry.type="Polygon"}return n=i.geometry.coordinates.reduce((function(t,e){return t+e.length}),0),n>250?Object(r.simplify)(i):i},s=t;i>1;){n=-1*e*Math.sqrt(i);try{if(!(t=Object(r.buffer)(t,n,{units:"meters"})))throw new Error("Buffer returned undefined")}catch(u){return o(s)}t=a(t),i=Object(r.area)(t)}try{return Object(r.centroid)(t)}catch(u){return console.log("Centroid calculation failed, returning the first point."),o(s)}}},function(t,e,n){"use strict";n.r(e);var r=n(2);function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=r.types.model("ReferenceLayerModel",{id:r.types.identifierNumber,name:r.types.string,description:r.types.maybeNull(r.types.string),url:r.types.string,layer_type:r.types.string,layer_color:r.types.string,show_on_grid:r.types.boolean,fill_polygons:r.types.boolean,min_zoom:r.types.number,max_zoom:r.types.number,custom_coloring:r.types.frozen({})}).volatile((function(t){return{opacity:.5,enabled:!1}})).actions((function(t){return{toggle:function(){t.enabled=!t.enabled},setOpacity:function(e){t.opacity=e}}})).views((function(t){return{}})).preProcessSnapshot((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);if("string"===typeof e.vector_styles)try{e.vector_styles=JSON.parse(e.vector_styles)}catch(n){e.vector_styles={}}return e})),s=r.types.model("ReferenceLayerCollectionModel",{layers:r.types.array(a,[]),activeFeature:r.types.maybeNull(r.types.frozen({}))}).actions((function(t){return{setSortOrder:function(e){t.sortOrder=e},setActiveFeature:function(e){t.activeFeature=e}}})).views((function(t){return{get sortedReferenceLayers(){return t.layers.sort((function(e,n){return t.sortOrder.indexOf(e.id)<t.sortOrder.indexOf(n.id)?-1:t.sortOrder.indexOf(e.id)>t.sortOrder.indexOf(n.id)?1:0}))},get visibleReferenceLayers(){return t.sortedReferenceLayers.filter((function(t){return t.enabled}))},get hasActiveFeature(){return t.activeFeature&&Object.keys(t.activeFeature).length>0},get gridViewReferenceLayers(){return t.sortedReferenceLayers.filter((function(t){return t.show_on_grid}))}}})).volatile((function(t){return{sortOrder:t.layers.map((function(t){return t.id}))}}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(575);function o(t){return function(t){if(Array.isArray(t))return a(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)return;if("string"===typeof t)return a(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 a(t,e)}(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.")}()}function a(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 s=r.types.model("GridModel",{id:r.types.number,tile_url:r.types.maybeNull(r.types.string),allGridSquares:r.types.array(i.default,[]),searchResultsSquares:r.types.array(r.types.number,[]),highlightedSquares:r.types.array(r.types.number,[])}).actions((function(t){return{addGridSquares:function(e){var n;(n=t.allGridSquares).push.apply(n,o(e))},getGridSquareById:function(e){return t.allGridSquares.find((function(t){return t.id===e}))},setSearchResultsSquares:function(e){t.searchResultsSquares=e,t.setHighlightedSquares(t.searchResultsSquares)},setHighlightedSquares:function(e){var n=new Set(t.highlightedSquares),r=new Set(e);t.allGridSquares.forEach((function(t){var e=n.has(t.id),i=r.has(t.id);e!==i&&t.setHighlighted(i)})),t.highlightedSquares.replace(e)},clearHighlightedSquares:function(){0===t.searchResultsSquares.length?t.setHighlightedSquares([]):t.setHighlightedSquares(t.searchResultsSquares)}}})).views((function(t){return{get allEnabledSquares(){return t.allGridSquares.filter((function(t){return t.enabled}))},get allSquaresGeoJSON(){return{type:"FeatureCollection",features:t.allGridSquares.map((function(t){return t.geoJSONWithProperties}))}},get enabledSquaresGeoJSON(){return{type:"FeatureCollection",features:t.allGridSquares.filter((function(t){return t.enabled&&t.state})).map((function(t){return t.geoJSONWithProperties}))}},get bookmarkedSquaresGeoJSON(){var e=Object(r.getRoot)(t).place.bookmarks;return{type:"FeatureCollection",features:t.allGridSquares.filter((function(t){return e.includes(t.id)})).map((function(t){return t.geoJSONWithProperties}))}},get highlightedSquaresGeoJSON(){return{type:"FeatureCollection",features:t.allGridSquares.filter((function(e){return t.highlightedSquares.includes(e.id)})).map((function(t){return t.geoJSONWithProperties}))}}}}));e.default=s},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(107),o=r.types.model("DrawingModeModel",{activeTool:r.types.maybeNull(r.types.enumeration(["view","measure","line","marker","polygon","trace","select","inspect","edit-metadata"])),snapActive:r.types.optional(r.types.boolean,!1),closeLinePoints:r.types.frozen({}),protoCurrentPosition:r.types.array(r.types.number,[]),protoPolygonPositions:r.types.array(r.types.array(r.types.number,[]))}).volatile((function(t){return{traceCount:0}})).actions((function(t){return{revertToViewMode:function(){t.activeTool="view",Object(r.getRoot)(t).place.currentFeatureLayer.resetSelection()},setEnabledTool:function(e){t.activeTool=e.mode,Object(r.getRoot)(t).place.currentFeatureLayer.deselectAll(),Object(r.getRoot)(t).place.currentFeatureLayer.setActiveFeature(null),t.clearProtoPolygonPositions()},toggleProperty:function(e){t[e]=!t[e]},setProtoCurrentPosition:function(e){t.protoCurrentPosition=e},addProtoPolygonPosition:function(e){t.protoPolygonPositions.push(e)},clearProtoPolygonPositions:function(){t.protoPolygonPositions=[]},setCloseLinePoints:function(e){t.closeLinePoints={type:"FeatureCollection",features:e}},incrementTraceCount:function(){t.traceCount++},resetTraceCount:function(){t.traceCount=0}}})).views((function(t){return{get isInDrawingMode(){return["line","marker","polygon","trace"].includes(t.activeTool)},get isInMetadataMode(){return"edit-metadata"===t.activeTool},get isInSelectionMode(){return"select"===t.activeTool},get isInInspectionMode(){return"inspect"===t.activeTool},get isInMeasureMode(){return"measure"===t.activeTool},get mode(){var e=null;switch(t.activeTool){case"measure":e=i.MeasureDistanceMode;break;case"line":e=i.DrawLineStringMode;break;case"marker":e=i.DrawPointMode;break;case"polygon":e=i.DrawPolygonMode;break;case"trace":e=i.DrawPolygonByDraggingMode;break;case"select":e=i.ModifyMode;break;default:e=i.ViewMode}return e},get protoPolygon(){var e=t.protoPolygonPositions.map((function(t){return t.slice()})),n=t.protoCurrentPosition.slice(),r=e.length>2,i=r?e.concat([n,e[0]]):e.concat([n]);return{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:r?"Polygon":"LineString",coordinates:r?[i]:i}}]}},get cleanProtoPolygon(){var e=t.protoPolygonPositions.map((function(t){return t.slice()}));return{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[e.concat([e[0]])]}}]}},get protoPolygonTerminators(){var e=t.protoPolygonPositions.map((function(t){return t.slice()})),n=t.protoCurrentPosition.slice();return e[0]?{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:e[0]}},{type:"Feature",geometry:{type:"Point",coordinates:n}}]}:{type:"FeatureCollection",features:[]}}}}));e.default=o},function(t,e,n){t.exports={SidebarTextContent:"SidebarTextContent-module__SidebarTextContent___35qrM"}},function(t,e,n){t.exports={GridLegend:"GridLegend-module__GridLegend___11AEH"}},function(t,e,n){t.exports={BookmarksList:"BookmarksList-module__BookmarksList___2yNx4"}},function(t,e,n){t.exports={MobileMessage:"MobileMessage-module__MobileMessage___2rSa-"}},function(t,e,n){t.exports=n.p+"media/components/placemaker/assets/images/logo-humap-map-blue-dce9a792537b6fcf686bd558aa3a5f2c.svg"},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchWholeGrid",(function(){return i}));var r=n(147),i=function(t){return r.default.request("\n    #graphql\n    query GridSquaresQuery($gridId: bigint!) {\n        data: placemaker_grid_squares(where: { grid_id: { _eq: $gridId } }) {\n            id\n            memorable_name\n            polygon\n            state: aasm_state\n            embed_metadata\n            enabled\n            completed_by\n            validated_by\n            updated_at\n        }\n    }\n",t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildCurrentGridSquareLayer",(function(){return i}));var r=n(126),i=function(t){return new r.a({id:"square",data:t.currentGridSquare.geoJSON,pickable:!1,stroked:!0,filled:!1,lineWidthMinPixels:2,getLineColor:[0,0,0,70]})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildPickableGridLayer",(function(){return l}));var r=n(126),i=n(83);function o(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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.")}()}function s(t,e){if(t){if("string"===typeof t)return u(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)?u(t,e):void 0}}function u(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 l=function(t){var e=t.place,n=t.navigate;return new r.a({id:"pickable-grid",data:e.grid.enabledSquaresGeoJSON,pickable:!0,stroked:!0,filled:!0,lineWidthUnits:"pixels",lineWidthMinPixels:1,autoHighlight:!0,highlightColor:[0,0,0,6],getLineWidth:function(t){return.2},getLineColor:function(t){switch(t.properties.state){case"todo":return[].concat(a(i.default.blue.line),[255]);case"in_progress":return[].concat(a(i.default.red.line),[255]);case"ready_to_check":return[].concat(a(i.default.yellow.line),[255]);case"check_in_progress":return[].concat(a(i.default.purple.line),[255]);default:return[].concat(a(i.default.green.line),[255])}},getFillColor:function(t){switch(t.properties.state){case"todo":return[].concat(a(i.default.blue.fill),[60]);case"in_progress":return[].concat(a(i.default.red.fill),[60]);case"ready_to_check":return[].concat(a(i.default.yellow.fill),[60]);case"check_in_progress":return[].concat(a(i.default.purple.fill),[60]);default:return[].concat(a(i.default.green.fill),[60])}},transitions:{getFillColor:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){var e=o(t,3);return[e[0],e[1],e[2],0]}},getLineColor:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){var e=o(t,3);return[e[0],e[1],e[2],0]}},getLineWidth:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){return[0]}}},onClick:function(t){n("/placemaker/squares/".concat(t.object.properties.id))}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildSelectedFeaturesLayer",(function(){return p}));var r=n(107),i=n(1097),o=n(45),a=n(1154),s=n(69);function u(t){return function(t){if(Array.isArray(t))return l(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)return;if("string"===typeof t)return l(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 l(t,e)}(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.")}()}function l(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 c(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 f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=function(t){var e=t.place,n=t.drawingMode,l=e.currentFeatureLayer.selectedFeatures.map((function(t){var e=t.toGeoJSON;return f(f({},e),{},{properties:f({},e.properties)})}));return e.currentFeatureLayer.selectedFeaturesCuttable&&(l[1].properties.isCutter=!0),new r.EditableGeoJsonLayer({id:"selected-geojson-layer",data:{type:"FeatureCollection",features:l},mode:n.mode,selectedFeatureIndexes:e.currentFeatureLayer.selectedFeatures.map((function(t,e){return e})),getLineWidth:1,lineWidthUnits:"pixels",lineJointRounded:!0,lineWidthMinPixels:1.5,getDashArray:function(t){return t.properties.isCutter?[5,4]:[1]},extensions:[new a.a({dash:!0})],getEditHandlePointRadius:function(t){return"existing"===t.properties.editHandleType?6:5},getEditHandlePointColor:function(t){return[].concat(u(s.default.red.line),[255])},getFillColor:function(t){return t.properties.isCutter?[].concat(u(s.default.purple.fill),[Math.floor(200*e.currentFeatureLayer.opacity)]):[].concat(u(s.default.red.fill),[Math.floor(200*e.currentFeatureLayer.opacity)])},getLineColor:function(t){return t.properties.isCutter?[].concat(u(s.default.purple.line),[Math.min(Math.floor(2*e.currentFeatureLayer.opacity*255),255)]):[].concat(u(s.default.red.line),[Math.min(Math.floor(2*e.currentFeatureLayer.opacity*255),255)])},autoHighlight:!0,highlightColor:[0,0,0,6],onEdit:function(t){var r=t.updatedData,o=t.editType,a=t.editContext;n.snapActive&&Object(i.doSnapping)(e,r,o,a),"addFeature"===o?e.currentFeatureLayer.addFeatures(r.features):a.featureIndexes&&a.featureIndexes.map((function(t){var n=e.currentFeatureLayer.selectedFeatures[t],i=r.features[t];n.setGeometry(i)}))},onClick:function(t){var n=t.index,r=t.coordinate,i=null;if(e.visibleFeatureLayers.forEach((function(t){t.featuresWithoutSelected.forEach((function(t){var e=t.geometry;e&&"Polygon"===e.type&&Object(o.booleanPointInPolygon)(Object(o.point)(r),e)&&(i=t.id)}))})),i)e.currentFeatureLayer.toggleSelectedFeature(i);else{var a=e.currentFeatureLayer.selectedFeatures[n];a&&e.currentFeatureLayer.toggleSelectedFeature(a.id)}}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"doSnapping",(function(){return a}));var r=n(45);function i(t){return function(t){if(Array.isArray(t))return o(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)return;if("string"===typeof t)return o(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 o(t,e)}(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.")}()}function o(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 a=function(t,e,n,o){if(["addPosition","movePosition","finishMovePosition"].includes(n)){var a=o.featureIndexes[0],s=o.positionIndexes[0],u=o.positionIndexes[1],l=t.currentFeatureLayer.selectedFeatures[a].geometry.type,c="Polygon"===l||"MultiPolygon"===l,f=o.position,h=null,p=Object(r.coordAll)(t.currentFeatureLayer.toGeoJSON),d={type:"FeatureCollection",features:t.currentFeatureLayer.selectedFeatures.map((function(t){return JSON.parse(JSON.stringify(t.toGeoJSON))}))},m=Object(r.coordAll)(t.currentFeatureLayer.nearbyFeaturestoGeoJSON);d.features[a].geometry.coordinates[s].splice(u,1),c&&0===u&&d.features[a].geometry.coordinates[s].pop();var g=Object(r.coordAll)(d);if([].concat(i(p),i(g),i(m)).forEach((function(t,e){Object(r.distance)(f,t)<.005&&(h=t)})),h){var y=e.features[a].geometry.coordinates[s];if(y[u]=h,c&&0===u)y[y.length-1]=h}}}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildNearbyFeaturesLayer",(function(){return l}));var r=n(126),i=n(69),o=["object","coordinate"];function a(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 s(t){return function(t){if(Array.isArray(t))return u(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)return;if("string"===typeof t)return u(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 u(t,e)}(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.")}()}function u(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 l=function(t){var e=t.place,n=t.featureLayer,u=t.drawingMode,l=t.setSelectedFeatureCoordinates,c=t.index;return new r.a({id:"nearby-".concat(c),data:n.nearbyFeaturestoGeoJSON,pickable:!0,stroked:!0,filled:!0,getElevation:0,getLineWidth:.2,lineWidthUnits:"meters",lineWidthMinPixels:1.5,getPointRadius:2,pointRadiusUnits:"meters",getFillColor:[].concat(s(i.default.black.fill),[Math.floor(16*n.opacity)]),getLineColor:[].concat(s(i.default.black.line),[Math.min(Math.floor(2*n.opacity*16),255)]),onClick:function(t){var n=t.object.id,r=t.coordinate;a(t,o);u.isInInspectionMode&&e&&null===e.currentFeatureLayer.activeFeature?(l(r),e.currentFeatureLayer.setActiveFeature(n)):e.currentFeatureLayer.setActiveFeature(null)}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildDrawingNewFeatureLayer",(function(){return m}));var r=n(107),i=n(220),o=n(69),a=n(461),s=["feature_layer_id","square_id"],u=["feature_layer_id","square_id"];function l(){l=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(v,"constructor",d),s(d,"constructor",p),p.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function c(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 f(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,s,"next",t)}function s(t){f(o,r,i,a,s,"throw",t)}a(void 0)}))}}function p(t){return function(t){if(Array.isArray(t))return d(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)return;if("string"===typeof t)return d(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 d(t,e)}(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.")}()}function d(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 m=function(t){var e=t.place,n=t.drawingMode,f=t.embedMetadata;t.viewport;return new r.EditableGeoJsonLayer({id:"geojson-layer",data:{type:"FeatureCollection",features:[]},mode:n.mode,modeConfig:{preventOverlappingLines:!0},selectedFeatureIndexes:[],getTentativeFillColor:[].concat(p(o.default.red.fill),[0]),getTentativeLineColor:[].concat(p(o.default.green.line),[0]),getEditHandlePointColor:[0,0,0,0],editHandlePointOutline:!1,onEdit:function(t){var r=t.editType,o=t.editContext;if("polygon"==n.activeTool){if("updateTentativeFeature"===r){var p,d=o.feature.geometry;"LineString"===d.type?p=d.coordinates[d.coordinates.length-1]:"Polygon"===d.type&&(p=d.coordinates[0][d.coordinates[0].length-2]),n.snapActive&&(p=Object(a.snap)(e,p,n)),n.setProtoCurrentPosition(p)}if("addTentativePosition"===r){var m=o.position;n.snapActive&&(m=Object(a.snap)(e,m,n)),n.addProtoPolygonPosition(m),n.setProtoCurrentPosition(m)}"addFeature"===r&&(n.cleanProtoPolygon.features.forEach(function(){var t=h(l().mark((function t(n){var r,o,a,u;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.geometry,t.next=3,Object(i.createFeatureMutation)({geometry:r,properties:{},square_id:e.currentGridSquare.id,feature_layer_id:e.currentFeatureLayer.id,annotation_data:[],embed_metadata:f?[f]:[]});case 3:o=t.sent,a=o.insert,a.feature_layer_id,a.square_id,u=c(a,s),e.currentFeatureLayer.addFeature(u);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),n.setProtoCurrentPosition([]),n.clearProtoPolygonPositions())}else if("trace"==n.activeTool){if("updateTentativeFeature"===r){var g="Polygon"===o.feature.geometry.type,y=g?o.feature.geometry.coordinates[0]:o.feature.geometry.coordinates,v=y.length,b=g?2:1;if(v>n.traceCount){var _=y[v-b];n.snapActive&&(_=Object(a.snap)(e,_,n)),n.addProtoPolygonPosition(_),n.incrementTraceCount()}var A=y[v-b];n.snapActive&&(A=Object(a.snap)(e,A,n)),n.setProtoCurrentPosition(A)}"addFeature"===r&&(n.protoPolygon.features.forEach(function(){var t=h(l().mark((function t(n){var r,o,a,s;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.geometry,t.next=3,Object(i.createFeatureMutation)({geometry:r,properties:{},square_id:e.currentGridSquare.id,feature_layer_id:e.currentFeatureLayer.id,annotation_data:[],embed_metadata:f?[f]:[]});case 3:o=t.sent,a=o.insert,a.feature_layer_id,a.square_id,s=c(a,u),e.currentFeatureLayer.addFeature(s);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),n.setProtoCurrentPosition([]),n.clearProtoPolygonPositions(),n.resetTraceCount())}}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildDrawingNewFeatureProtoPolygonLayer",(function(){return u}));var r=n(126),i=n(45),o=n(69);function a(t){return function(t){if(Array.isArray(t))return s(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)return;if("string"===typeof t)return s(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 s(t,e)}(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.")}()}function s(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 u=function(t){var e,n,s=t.drawingMode,u=!("trace"===s.activeTool||null===s||void 0===s||null===(e=s.protoPolygon)||void 0===e||null===(n=e.features)||void 0===n||!n[0])&&Object(i.kinks)(s.protoPolygon.features[0]).features.length>0;return new r.a({id:"protoPolygon",data:s.protoPolygon,pickable:!1,stroked:!0,filled:!0,getLineWidth:1,lineWidthUnits:"pixels",lineJointRounded:!0,lineWidthMinPixels:1.5,getFillColor:u?[0,0,0,0]:[].concat(a(o.default.red.fill),[165.75]),getLineColor:[].concat(a(o.default.red.line),[216.75])})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildFeaturesLayer",(function(){return l}));var r=n(126),i=n(69),o=["object","coordinate"];function a(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 s(t){return function(t){if(Array.isArray(t))return u(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)return;if("string"===typeof t)return u(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 u(t,e)}(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.")}()}function u(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 l=function(t){var e=t.place,n=t.featureLayer,u=t.drawingMode,l=t.setSelectedFeatureCoordinates,c=t.index;return new r.a({id:"features-".concat(c),data:n.toGeoJSON,pickable:!0,stroked:!0,filled:!0,getElevation:0,getLineWidth:1,lineWidthUnits:"pixels",lineJointRounded:!0,lineWidthMinPixels:1.5,getPointRadius:2,pointRadiusUnits:"meters",getFillColor:function(t){var r;return t.isHighlightedForUser?[].concat(s(i.default.red.fill),[Math.floor(255*n.opacity)]):t.id===(null===(r=e.currentFeatureLayer.highlightedFeature)||void 0===r?void 0:r.id)?[].concat(s(i.default.blue.fill),[Math.floor(255*n.opacity)]):[].concat(s(i.default.green.fill),[Math.floor(255*n.opacity)])},getLineColor:function(t){var r;return t.id===(null===(r=e.currentFeatureLayer.highlightedFeature)||void 0===r?void 0:r.id)?[].concat(s(i.default.blue.line),[Math.floor(255*n.opacity)]):[].concat(s(i.default.green.line),[Math.floor(255*n.opacity)])},updateTriggers:{getFillColor:[n.opacity],getLineColor:[n.opacity]},autoHighlight:!0,highlightColor:[0,0,0,6],onClick:function(t){var r=t.object.id,i=t.coordinate;a(t,o);u.isInSelectionMode?n.toggleSelectedFeature(r):u.isInMetadataMode||u.isInInspectionMode?(l(i),e.currentFeatureLayer.setActiveFeature(r)):e.currentFeatureLayer.setActiveFeature(null)}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildSubtleGridLayer",(function(){return s}));var r=n(126),i=n(69);function o(t){return function(t){if(Array.isArray(t))return a(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)return;if("string"===typeof t)return a(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 a(t,e)}(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.")}()}function a(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 s=function(t){var e=t.place;return new r.a({id:"subtle-grid",data:e.grid.enabledSquaresGeoJSON,pickable:!1,stroked:!0,filled:!1,getLineWidth:.2,lineWidthUnits:"meters",lineWidthMinPixels:1,getLineColor:[].concat(o(i.default.black.line),[20])})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildMeasureLayer",(function(){return i}));var r=n(107),i=function(t){var e=t.drawingMode;return new r.EditableGeoJsonLayer({id:"measure-layer",mode:e.mode})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildEditableGridLayer",(function(){return s}));var r=n(126),i=n(69);function o(t){return function(t){if(Array.isArray(t))return a(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)return;if("string"===typeof t)return a(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 a(t,e)}(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.")}()}function a(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 s=function(t){var e=t.place;return new r.a({id:"editable-grid",data:e.grid.allSquaresGeoJSON,pickable:!0,getLineWidth:.2,lineWidthUnits:"meters",lineWidthMinPixels:1,getLineColor:function(t){return t.properties.enabled?[].concat(o(i.default.green.line),[100]):[].concat(o(i.default.red.line),[100])},getFillColor:function(t){return t.properties.enabled?[].concat(o(i.default.green.fill),[100]):[].concat(o(i.default.red.fill),[100])},onClick:function(t){e.grid.getGridSquareById(t.object.properties.id).toggleEnabledState()}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildUpdateRecencyGridLayer",(function(){return l}));var r=n(126),i=n(83);function o(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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.")}()}function s(t,e){if(t){if("string"===typeof t)return u(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)?u(t,e):void 0}}function u(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 l=function(t){var e=t.place,n=t.navigate,s=t.setUpdateRecencySquareInfo;return new r.a({id:"update-recency-grid",data:e.grid.enabledSquaresGeoJSON,pickable:!0,stroked:!0,filled:!0,lineWidthUnits:"pixels",lineWidthMinPixels:1,autoHighlight:!0,highlightColor:[0,0,0,6],getLineWidth:.2,getLineColor:function(t){if(t.properties.highlighted)return[50,50,50,255];if(t.properties.staleness>0&&["in_progress","ready_to_check","check_in_progress"].includes(t.properties.state))return[].concat(a(i.default.black.line),[200*t.properties.staleness+55]);switch(t.properties.state){case"todo":return[].concat(a(i.default.blue.line),[255]);case"in_progress":return[].concat(a(i.default.red.line),[255]);case"ready_to_check":return[].concat(a(i.default.yellow.line),[255]);case"check_in_progress":return[].concat(a(i.default.purple.line),[255]);default:return[].concat(a(i.default.green.line),[255])}},getFillColor:function(t){if(t.properties.staleness>0&&["in_progress","ready_to_check","check_in_progress"].includes(t.properties.state))return[].concat(a(i.default.black.fill),[200*t.properties.staleness+55]);switch(t.properties.state){case"todo":return[].concat(a(i.default.blue.fill),[60]);case"in_progress":return[].concat(a(i.default.red.fill),[60]);case"ready_to_check":return[].concat(a(i.default.yellow.fill),[60]);case"check_in_progress":return[].concat(a(i.default.purple.fill),[60]);default:return[].concat(a(i.default.green.fill),[60])}},transitions:{getFillColor:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){var e=o(t,3);return[e[0],e[1],e[2],0]}},getLineColor:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){var e=o(t,3);return[e[0],e[1],e[2],0]}},getLineWidth:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){return[0]}}},onClick:function(t){n("/placemaker/squares/".concat(t.object.properties.id))},onHover:function(t){t.object&&!["todo","completed"].includes(t.object.properties.state)?s(t.object.properties.id):s()}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildPickableGridBookmarksLayer",(function(){return l}));var r=n(126),i=n(83);function o(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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.")}()}function s(t,e){if(t){if("string"===typeof t)return u(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)?u(t,e):void 0}}function u(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 l=function(t){var e=t.place;return new r.a({id:"pickable-grid-bookmarks",data:e.grid.bookmarkedSquaresGeoJSON,stroked:!0,filled:!1,lineWidthUnits:"pixels",lineWidthMinPixels:1,autoHighlight:!0,highlightColor:[0,0,0,6],getLineWidth:3,getLineColor:[].concat(a(i.default.blue.line),[255]),transitions:{getLineColor:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){var e=o(t,3);return[e[0],e[1],e[2],0]}},getLineWidth:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){return[0]}}}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildPickableGridHighlightsLayer",(function(){return l}));var r=n(126),i=n(83);function o(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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.")}()}function s(t,e){if(t){if("string"===typeof t)return u(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)?u(t,e):void 0}}function u(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 l=function(t){var e=t.place;return new r.a({id:"pickable-grid-higlights",data:e.grid.highlightedSquaresGeoJSON,stroked:!0,filled:!1,lineWidthUnits:"pixels",lineWidthMinPixels:1,autoHighlight:!0,highlightColor:[0,0,0,6],getLineWidth:3,getLineColor:[].concat(a(i.default.black.line),[255]),transitions:{getLineColor:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){var e=o(t,3);return[e[0],e[1],e[2],0]}},getLineWidth:{duration:200,easing:function(t){return-(Math.cos(Math.PI*t)-1)/2},enter:function(t){return[0]}}}})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildDrawingNewFeatureTerminatorsLayer",(function(){return s}));var r=n(126),i=n(69);function o(t){return function(t){if(Array.isArray(t))return a(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)return;if("string"===typeof t)return a(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 a(t,e)}(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.")}()}function a(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 s=function(t){var e=t.drawingMode;return new r.a({id:"protoPolygonTerminators",data:e.protoPolygonTerminators,pointType:"circle",pickable:!1,stroked:!0,getPointRadius:5,pointRadiusMinPixels:5,pointRadiusMaxPixels:5,getLineWidth:2,lineWidthUnits:"pixels",lineWidthScale:1,getFillColor:[].concat(o(i.default.red.line),[255]),getLineColor:[255,255,255,255]})}},function(t,e,n){"use strict";n.r(e),n.d(e,"buildMetadataWarningIconsLayer",(function(){return i}));var r=n(243),i=function(t){var e=t.featureLayer;return new r.a({id:"scatterplot-layer",data:e.toCentrePointGeoJSON.features,getPosition:function(t){return t.geometry.coordinates},getRadius:3,radiusMinPixels:3,radiusMaxPixels:3,getFillColor:[0,0,0],getLineColor:[255,255,255],lineWidthMinPixels:2,lineWidthMaxPixels:2,stroked:!0,pickable:!1})}},function(t,e,n){t.exports={FeatureAnnotationData:"FeatureAnnotationData-module__FeatureAnnotationData___x33Sv"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7);e.default=Object(o.a)((function(t){var e=t.field,n=e.annotation_field,r=e.htmlInputProps;switch(n.html_tag){case"input":return i.a.createElement("input",r);case"textarea":return i.a.createElement("textarea",Object.assign({},r,{maxLength:"254"}))}}))},function(t,e,n){t.exports={FeatureAnnotationDataForm:"FeatureAnnotationDataForm-module__FeatureAnnotationDataForm___4oBa8"}},function(t,e,n){t.exports={FeatureMetadataRow:"FeatureMetadataRow-module__FeatureMetadataRow___274Um"}},function(t,e,n){t.exports={FeatureMetadata:"FeatureMetadata-module__FeatureMetadata___1n44_"}},function(t,e,n){t.exports={FeaturePopover:"FeaturePopover-module__FeaturePopover___14Zei"}},function(t,e,n){t.exports={FeaturePopoverContainer:"FeaturePopoverContainer-module__FeaturePopoverContainer___2Z5pK"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(43),s=n(115);function u(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(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 l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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}e.default=Object(o.a)((function(t){var e=t.children,n=Object(a.useStore)(),o=n.setCursorPosition,l=n.viewport,c=u(Object(r.useState)(null),2),f=c[0],h=c[1];return Object(r.useEffect)((function(){var t=new s.a(l.toJSON());h(t)}),[l.toJSON()]),i.a.createElement("div",{onMouseMove:function(t){var e=t.clientX,n=t.clientY;if(f){var r=f.unproject([e,n]);o([r[0].toFixed(5),r[1].toFixed(5)])}}},e)}))},function(t,e,n){t.exports={ToolbarButtonGroup:"ToolbarButtonGroup-module__ToolbarButtonGroup___16me5"}},function(t,e,n){t.exports={ToolbarActions:"ToolbarActions-module__ToolbarActions___3t-qT"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(7),s=n(116),u=n.n(s);e.default=Object(a.a)((function(){var t=Object(o.useStore)().place,e=0===t.currentFeatureLayer.selectedFeatures.length;return i.a.createElement("div",{className:"".concat(u.a.ToolbarButton," ").concat(u.a["icon--delete"]," ").concat(e?u.a.disabled:""),onClick:function(n){return function(n){n.preventDefault(),n.stopPropagation(),e||t.currentFeatureLayer.deleteSelectedFeatures()}(n)}},i.a.createElement("span",null,I18n.t("delete")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(7),s=n(116),u=n.n(s);e.default=Object(a.a)((function(){var t=Object(o.useStore)().place,e=!t.currentFeatureLayer.selectedFeaturesCombinable;return i.a.createElement("div",{className:"".concat(u.a.ToolbarButton," ").concat(u.a["icon--combine"]," ").concat(e?u.a.disabled:""),onClick:function(n){return function(n){n.preventDefault(),n.stopPropagation(),e||t.currentFeatureLayer.performUnionOperation()}(n)}},i.a.createElement("span",null,I18n.t("placemaker.drawing.alter.combine")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(43),a=n(7),s=n(116),u=n.n(s);e.default=Object(a.a)((function(){var t=Object(o.useStore)().place,e=!t.currentFeatureLayer.selectedFeaturesCuttable;return i.a.createElement("div",{className:"".concat(u.a.ToolbarButton," ").concat(u.a["icon--cut-away"]," ").concat(e?u.a.disabled:""),onClick:function(n){return function(n){n.preventDefault(),n.stopPropagation(),e||t.currentFeatureLayer.performSubtractOperation()}(n)}},i.a.createElement("span",null,I18n.t("placemaker.drawing.alter.cut_away")))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(88),a=n(71),s=n(109),u=n(630),l=n(7),c=n(320),f=n.n(c),h=function(t){return i.a.createElement("div",Object.assign({},t,{className:f.a.handle}),i.a.createElement(a.a,{icon:s.i}))};e.default=Object(l.a)((function(t){var e=t.layer,n=t.index,r=function(t){var n=t.target.value;return e.setOpacity(parseFloat(n))};return i.a.createElement(o.b,{draggableId:"id-".concat(e.id),key:"id-".concat(e.id),index:n,"data-enabled":e.enabled,"data-opacity":e.opacity},(function(t){return i.a.createElement("div",Object.assign({className:f.a.LayerItem,ref:t.innerRef},t.draggableProps),i.a.createElement(h,t.dragHandleProps),i.a.createElement("span",{className:"".concat(f.a.visibilityToggle," ").concat(e.enabled?"":f.a.hiddenVisibilityToggle),onClick:e.toggle}),i.a.createElement("h5",null,e.name),i.a.createElement(u.a,{disabled:!e.enabled,min:0,max:1,step:.05,value:e.opacity,onChange:r}))}))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(88),a=n(71),s=n(109),u=n(630),l=n(7),c=n(320),f=n.n(c),h=function(t){return i.a.createElement("div",Object.assign({},t,{className:f.a.handle}),i.a.createElement(a.a,{icon:s.i}))};e.default=Object(l.a)((function(t){var e=t.layer,n=t.index,r=function(t){var n=t.target.value;return e.setOpacity(parseFloat(n))};return i.a.createElement(o.b,{draggableId:"id-".concat(e.id),key:"id-".concat(e.id),index:n,"data-layer-opacity":e.opacity},(function(t){return i.a.createElement("div",Object.assign({className:f.a.LayerItem,ref:t.innerRef},t.draggableProps),i.a.createElement(h,t.dragHandleProps),i.a.createElement("h5",null,e.name),i.a.createElement(u.a,{disabled:!1,min:0,max:1,step:.05,value:e.opacity,onChange:r}))}))}))},function(t,e,n){t.exports={FeatureLayersContainer:"FeatureLayersContainer-module__FeatureLayersContainer___1sFxb"}},function(t,e,n){t.exports={ContributorsPanel:"ContributorsPanel-module__ContributorsPanel___3bD3m"}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const r={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1};const i={name:"picking",vs:"uniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;\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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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}}},function(t,e,n){t.exports=n.p+"media/images/contribute-collection-3e82d8ce80c048ad999f870f4338fdf3.svg"},function(t,e,n){t.exports=n.p+"media/images/contribute-trail-122ec61796d62fe3b82c17226108e1b7.svg"},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var r=n(1),i=n(244);const o="undefined"!==typeof __VERSION__?__VERSION__:"untranspiled source";Object(i.a)();class a{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";Object(r.a)(this,"storage",void 0),Object(r.a)(this,"id",void 0),Object(r.a)(this,"config",void 0),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=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_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 s(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]: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,a=t.height*n,s=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),s]}let u;function l(t){return"string"===typeof t?u[t.toUpperCase()]||u.WHITE:t}function c(t,e){if(!t)throw new Error(e||"Assertion failed")}!function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(u||(u={}));var f=n(165);function h(){let t;var e,n;if(i.a&&"performance"in f.b)t=null===f.b||void 0===f.b||null===(e=f.b.performance)||void 0===e||null===(n=e.now)||void 0===n?void 0:n.call(e);else if("hrtime"in f.a){var r;const e=null===f.a||void 0===f.a||null===(r=f.a.hrtime)||void 0===r?void 0:r.call(f.a);t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const p={debug:i.a&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},d={enabled:!0,level:0};function m(){}const g={},y={once:!0};class v{constructor(){let{id:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};Object(r.a)(this,"id",void 0),Object(r.a)(this,"VERSION",o),Object(r.a)(this,"_startTs",h()),Object(r.a)(this,"_deltaTs",h()),Object(r.a)(this,"_storage",void 0),Object(r.a)(this,"userData",{}),Object(r.a)(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new a("__probe-".concat(this.id,"__"),d),this.timeStamp("".concat(this.id," started")),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["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)))}(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((h()-this._startTs).toPrecision(10))}getDelta(){return Number((h()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){c(t,e)}warn(t){return this._getLogFunction(0,t,p.warn,arguments,y)}error(t){return this._getLogFunction(0,t,p.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,p.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,p.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return this._getLogFunction(t,e,p.debug||p.info,arguments,y)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||m,n&&[n],{tag:A(e)}):m}image(t){let{logLevel:e,priority:n,image:r,message:o="",scale:a=1}=t;return this._shouldLog(e||n)?i.a?function(t){let{image:e,message:n="",scale:r=1}=t;if("string"===typeof e){const t=new Image;return t.onload=()=>{const e=s(t,n,r);console.log(...e)},t.src=e,m}const i=e.nodeName||"";if("img"===i.toLowerCase())return console.log(...s(e,n,r)),m;if("canvas"===i.toLowerCase()){const t=new Image;return t.onload=()=>console.log(...s(t,n,r)),t.src=e.toDataURL(),m}return m}({image:r,message:o,scale:a}):function(t){let{image:e,message:n="",scale:r=1}=t;return console.warn("removed"),m}({image:r,message:o,scale:a}):m}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||m)}group(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const r=_({logLevel:t,message:e,opts:n}),{collapsed:i}=n;return r.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||m)}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()>=b(t)}_getLogFunction(t,e,n,r,o){if(this._shouldLog(t)){o=_({logLevel:t,message:e,args:r,opts:o}),c(n=n||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=h();const a=o.tag||o.message;if(o.once){if(g[a])return m;g[a]=h()}return e=function(t,e,n){if("string"===typeof e){const s=n.time?function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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(s,"  ").concat(e):"".concat(t,": ").concat(e),r=e,o=n.color,a=n.background,i.a||"string"!==typeof r||(o&&(o=l(o),r="\x1b[".concat(o,"m").concat(r,"\x1b[39m")),a&&(o=l(a),r="\x1b[".concat(a+10,"m").concat(r,"\x1b[49m"))),e=r}var r,o,a;return e}(this.id,o.message,o),n.bind(console,e,...o.args)}return m}}function b(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 c(Number.isFinite(e)&&e>=0),e}function _(t){const{logLevel:e,message:n}=t;t.logLevel=b(e);const r=t.args?Array.from(t.args):[];for(;r.length&&r.shift()!==n;);switch(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;return c("string"===i||"object"===i),Object.assign(t,{args:r},t.opts)}function A(t){for(const e in t)for(const n in t[e])return n||"untitled";return"empty"}Object(r.a)(v,"VERSION",o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var r=n(0),i=n.n(r),o=n(4),a=n(3),s=n.n(a),u=n(284);o.ThemeContext.Extend=function(t){var e=t.children,n=t.value;return i.a.createElement(o.ThemeContext.Consumer,null,(function(t){return i.a.createElement(o.ThemeContext.Provider,{value:Object(u.b)(t,n)},e)}))},o.ThemeContext.Extend.propTypes={children:s.a.node.isRequired,value:s.a.shape({}).isRequired};var l=n(223),c=n(1595),f=n(1593),h=n(51),p=n(403),d=n(590),m=n(1594),g=n(32),y=Object(o.css)(["width:100vw;height:100vh;overflow:auto;"]),v=o.default.div.withConfig({displayName:"StyledGrommet",componentId:"sc-19lkkz7-0"})([""," "," "," "," ",""],(function(t){return!t.plain&&m.a}),(function(t){return t.full&&y}),(function(t){return t.theme.global.font.face}),(function(t){return t.theme.grommet.extend}),(function(t){return t.cssVars&&Object.keys(t.theme.global.colors).filter((function(e){return"string"===typeof t.theme.global.colors[e]})).map((function(e){return"--"+e+": "+t.theme.global.colors[e]+";"})).join("\n")}));function b(){return b=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},b.apply(this,arguments)}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(){var t=function(t,e){e||(e=t.slice(0));return t.raw=e,t}(["\n  body { margin: 0; }\n"]);return w=function(){return t},t}v.defaultProps={},Object.setPrototypeOf(v.defaultProps,g.a);var x=Object(o.createGlobalStyle)(w()),E=function(t){var e,n;function r(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A(_(e=t.call.apply(t,[this].concat(r))||this),"state",{}),A(_(e),"onResize",(function(){var t,n=e.state,r=n.theme,i=n.responsive;i||(t=e.deviceResponsive()),t||(t=Object(f.a)(window.innerWidth,r)),t!==i&&e.setState({responsive:t})})),e}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.getDerivedStateFromProps=function(t,e){var n=t.background,r=t.dir,i=t.theme,o=void 0===i?{}:i,a=t.themeMode,s=e.theme,l=e.themeProp,c=e.themeModeProp,f=Object(u.b)(d.a,o);if(!s||o!==l||a!==c){var m=f.global.colors.background;f.dark="dark"===(a||o.defaultMode);var g=Object(h.c)(n||m,f);return f.dark=Object(p.c)(g,f),f.baseBackground=n||m,r&&(f.dir=r),{theme:f,themeProp:o,themeModeProp:a}}return null};var a=r.prototype;return a.componentDidMount=function(){window.addEventListener("resize",this.onResize),this.onResize()},a.componentWillUnmount=function(){window.removeEventListener("resize",this.onResize)},a.deviceResponsive=function(){var t=this.props.userAgent,e=this.state.theme;if(t)return/(tablet|ipad|playbook|silk)|(android(?!.*mobile))/i.test(t)?Object(f.c)("tablet",e):/Mobile|iPhone|Android/.test(t)?Object(f.c)("phone",e):Object(f.c)("computer",e)},a.render=function(){var t=this.props,e=t.children,n=t.full,r=t.containerTarget,a=void 0===r?"object"===typeof document?document.body:void 0: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}(t,["children","full","containerTarget"]);delete s.theme;var u=this.state,f=u.theme,h=u.responsive||this.deviceResponsive()||f.global.deviceBreakpoints.tablet;return i.a.createElement(o.ThemeContext.Provider,{value:f},i.a.createElement(l.a.Provider,{value:h},i.a.createElement(c.a.Provider,{value:a},i.a.createElement(v,b({full:n},s),e),n&&i.a.createElement(x,null))))},r}(r.Component);A(E,"displayName","Grommet");var O=E},function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var r=n(0),i=n.n(r),o=n(128),a=n(381),s=n(4),u=n(32),l=n(681),c=n(1592),f=n(1654),h=n(403),p=n(1594),d=n(56),m=Object(s.css)(["left:-100%;right:100%;z-index:-1;position:fixed;"]),g=s.default.div.withConfig({displayName:"StyledLayer",componentId:"rmtehz-0"})([""," background:transparent;position:relative;z-index:",";pointer-events:none;outline:none;"," ",";"],p.a,(function(t){return t.theme.layer.zIndex}),(function(t){if("hidden"===t.position)return m;var e=[];if(t.targetBounds){var n=t.targetBounds,r=n.left,i=n.right,o=n.top,a=n.bottom;e.push("\n        position: fixed;\n        top: "+o+"px;\n        left: "+r+"px;\n        right: "+i+"px;\n        bottom: "+a+"px;\n      ")}else e.push("\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n");if(t.responsive&&t.theme.layer.responsiveBreakpoint){var s=t.theme.global.breakpoints[t.theme.layer.responsiveBreakpoint];e.push(Object(d.a)(s,"\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  min-height: 100vh;\n"))}return e}),(function(t){return t.theme.layer&&t.theme.layer.extend}));g.defaultProps={},Object.setPrototypeOf(g.defaultProps,u.a);var y=s.default.div.withConfig({displayName:"StyledLayer__StyledOverlay",componentId:"rmtehz-1"})(["position:absolute;"," top:0px;left:0px;right:0px;bottom:0px;"," pointer-events:all;"],(function(t){if(t.responsive&&t.theme.layer.responsiveBreakpoint){var e=t.theme.global.breakpoints[t.theme.layer.responsiveBreakpoint];return Object(d.a)(e,"position: relative;")}return""}),(function(t){return!t.plain&&t.theme.layer.overlay.background&&Object(h.d)(t.theme.layer.overlay.background,t.theme)})),v=function(t,e,n){var r=-1!==n.indexOf("top")||-1!==n.indexOf("bottom")?"vertical":"horizontal",i=t[n]||t[r]||t,o=e.global.edgeSize[i]||i;return!!e.global.edgeSize[i]||"string"===typeof i?Object(d.b)(o):0},b=function(t,e,n,r){return void 0===r&&(r=void 0),r?t[r]+v(e,n,r):{bottom:t.bottom+v(e,n,"bottom"),end:t.right+v(e,n,"end"),left:t.left+v(e,n,"left"),right:t.right+v(e,n,"right"),start:t.left+v(e,n,"start"),top:t.top+v(e,n,"top")}},_={center:{vertical:Object(s.keyframes)(["0%{transform:translateX(-50%) scale(0.8);}100%{transform:translateX(-50%) scale(1);}"]),horizontal:Object(s.keyframes)(["0%{transform:translateY(-50%) scale(0.8);}100%{transform:translateY(-50) scale(1);}"]),true:Object(s.keyframes)(["0%{transform:scale(0.8);}100%{transform:scale(1);}"]),false:Object(s.keyframes)(["0%{transform:translate(-50%,-50%) scale(0.8);}100%{transform:translate(-50%,-50%) scale(1);}"])},top:{vertical:Object(s.keyframes)(["0%{transform:translate(-50%,-100%);}100%{transform:translate(-50%,0);}"]),horizontal:Object(s.keyframes)(["0%{transform:translateY(-100%);}100%{transform:translateY(0);}"]),true:Object(s.keyframes)(["0%{transform:translateY(-100%);}100%{transform:translateY(0);}"]),false:Object(s.keyframes)(["0%{transform:translate(-50%,-100%);}100%{transform:translate(-50%,0);}"])},bottom:{vertical:Object(s.keyframes)(["0%{transform:translate(-50%,100%);}100%{transform:translate(-50%,0);}"]),horizontal:Object(s.keyframes)(["0%{transform:translateY(100%);}100%{transform:translateY(0);}"]),true:Object(s.keyframes)(["0%{transform:translateY(100%);}100%{transform:translateY(0);}"]),false:Object(s.keyframes)(["0%{transform:translate(-50%,100%);}100%{transform:translate(-50%,0);}"])},left:{vertical:Object(s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),horizontal:Object(s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"]),true:Object(s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),false:Object(s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"])},right:{vertical:Object(s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),horizontal:Object(s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"]),true:Object(s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),false:Object(s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"])},start:{vertical:Object(s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),horizontal:Object(s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"]),true:Object(s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),false:Object(s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"])},end:{vertical:Object(s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),horizontal:Object(s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"]),true:Object(s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),false:Object(s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"])}},A=function(t,e,n){var r,i=void 0!==t.animation?t.animation:t.animate;return void 0===i&&(i="slide"),"slide"===i||!0===i?r=_[e][n]:"fadeIn"===i&&(r=Object(s.keyframes)(["0%{opacity:0}100%{opacity:1}"])),r?Object(s.css)(["animation:"," ","s ease-in-out forwards;"],r,.2):""},w={center:{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;left:50%;transform:translateX(-50%);",""],t.top,t.bottom,(function(t){return A(t,"center","vertical")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;top:50%;transform:translateY(-50%);",""],t.left,t.right,(function(t){return A(t,"center","horizontal")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"center","true")}))},false:function(){return Object(s.css)(["top:50%;left:50%;transform:translate(-50%,-50%);",""],(function(t){return A(t,"center","false")}))}},top:{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;left:50%;transform:translate(-50%,0%);",""],t.top,t.bottom,(function(t){return A(t,"top","vertical")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;top:","px;transform:translateY(0);",""],t.left,t.right,t.top,(function(t){return A(t,"top","horizontal")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateY(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"top","true")}))},false:function(t){return Object(s.css)(["top:","px;left:50%;transform:translate(-50%,0);",""],t.top,(function(t){return A(t,"top","false")}))}},bottom:{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;left:50%;transform:translate(-50%,0);",""],t.top,t.bottom,(function(t){return A(t,"bottom","vertical")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;bottom:","px;transform:translateY(0);",""],t.left,t.top,t.bottom,(function(t){return A(t,"bottom","horizontal")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateY(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"bottom","true")}))},false:function(t){return Object(s.css)(["bottom:","px;left:50%;transform:translate(-50%,0);",""],t.bottom,(function(t){return A(t,"bottom","false")}))}},left:{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,(function(t){return A(t,"left","vertical")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;top:50%;transform:translate(0,-50%);",""],t.left,t.right,(function(t){return A(t,"left","horizontal")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"left","true")}))},false:function(t){return Object(s.css)(["left:","px;top:50%;transform:translate(0,-50%);",""],t.left,(function(t){return A(t,"left","false")}))}},right:{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.right,(function(t){return A(t,"right","vertical")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;top:50%;transform:translate(0,-50%);",""],t.left,t.right,(function(t){return A(t,"right","horizontal")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"right","true")}))},false:function(t){return Object(s.css)(["right:","px;top:50%;transform:translate(0,-50%);",""],t.right,(function(t){return A(t,"right","false")}))}},start:{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;inset-inline-start:","px;transform:translateX(0);",""],t.top,t.bottom,t.start,(function(t){return A(t,"start","vertical")}))},horizontal:function(t){return Object(s.css)(["inset-inline-start:","px;inset-inline-end:","px;top:50%;transform:translate(0,-50%);",""],t.start,t.end,(function(t){return A(t,"start","horizontal")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;inset-inline-start:","px;inset-inline-end:","px;transform:translateX(0);",""],t.top,t.bottom,t.start,t.end,(function(t){return A(t,"start","true")}))},false:function(t){return Object(s.css)(["inset-inline-start:","px;top:50%;transform:translate(0,-50%);",""],t.start,(function(t){return A(t,"start","false")}))}},end:{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;inset-inline-end:","px;transform:translateX(0);",""],t.top,t.bottom,t.end,(function(t){return A(t,"end","vertical")}))},horizontal:function(t){return Object(s.css)(["inset-inline-start:","px;inset-inline-end:","px;top:50%;transform:translate(0,-50%);",""],t.start,t.end,(function(t){return A(t,"end","horizontal")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;inset-inline-start:","px;inset-inline-end:","px;transform:translateX(0);",""],t.top,t.bottom,t.start,t.end,(function(t){return A(t,"end","true")}))},false:function(t){return Object(s.css)(["inset-inline-end:","px;top:50%;transform:translate(0,-50%);",""],t.end,(function(t){return A(t,"end","false")}))}},"top-right":{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;right:","px;transform:translateX(0);",";"],t.top,t.bottom,t.right,(function(t){return A(t,"top","true")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;top:0;transform:translateX(0);",";"],t.left,t.right,(function(t){return A(t,"top","true")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",";"],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"top","true")}))},false:function(t){return Object(s.css)(["top:","px;right:","px;transform:translateY(0);",";"],t.top,t.right,(function(t){return A(t,"top","true")}))}},"top-left":{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,(function(t){return A(t,"top","true")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;top:0;transform:translateX(0);",""],t.left,t.right,(function(t){return A(t,"top","true")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"top","true")}))},false:function(t){return Object(s.css)(["top:","px;left:","px;transform:translateY(0);",""],t.top,t.left,(function(t){return A(t,"top","true")}))}},"bottom-right":{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.right,(function(t){return A(t,"bottom","true")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;bottom:","px;transform:translateY(0);",""],t.left,t.right,t.bottom,(function(t){return A(t,"bottom","true")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"bottom","true")}))},false:function(t){return Object(s.css)(["bottom:","px;right:","px;transform:translateY(0);",""],t.bottom,t.right,(function(t){return A(t,"bottom","true")}))}},"bottom-left":{vertical:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,(function(t){return A(t,"bottom","true")}))},horizontal:function(t){return Object(s.css)(["left:","px;right:","px;bottom:","px;transform:translateY(0);",""],t.left,t.right,t.bottom,(function(t){return A(t,"bottom","true")}))},true:function(t){return Object(s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return A(t,"bottom","true")}))},false:function(t){return Object(s.css)(["bottom:","px;left:","px;transform:translateY(0);",""],t.bottom,t.left,(function(t){return A(t,"bottom","true")}))}}},x=Object(s.css)([""," max-height:",";max-width:",";",";",";"],(function(t){return t.modal||"hidden"!==t.position?Object(s.css)(["position:",";"],t.modal?"absolute":"fixed"):m}),(function(t){return"calc(100% - "+b(t.targetBounds,t.margin,t.theme,"top")+"px - "+b(t.targetBounds,t.margin,t.theme,"bottom")+"px)"}),(function(t){return"calc(100% - "+b(t.targetBounds,t.margin,t.theme,"left")+"px - "+b(t.targetBounds,t.margin,t.theme,"right")+"px)"}),(function(t){return t.plain||t.full&&"none"===t.margin?"border-radius: 0;":(e=t.theme.layer.border.radius,n=t.theme,r=t.position,i=t.margin,o=[],a=!0===e?"medium":e,u=n.global.edgeSize[a]||a,l=u.split(" ").length>1,"none"!==i||l||!0!==n.layer.border.intelligentRounding?o.push(Object(s.css)(["border-radius:",";"],u)):"bottom"===r?o.push(Object(s.css)(["border-radius:"," "," 0 0;"],u,u)):"bottom-left"===r?o.push(Object(s.css)(["border-radius:0 "," 0 0;"],u)):"bottom-right"===r?o.push(Object(s.css)(["border-radius:"," 0 0 0;"],u)):"end"===r?o.push(Object(s.css)(["border-start-start-radius:",";border-end-start-radius:",";"],u,u)):"left"===r?o.push(Object(s.css)(["border-radius:0 "," "," 0;"],u,u)):"right"===r?o.push(Object(s.css)(["border-radius:"," 0 0 ",";"],u,u)):"start"===r?o.push(Object(s.css)(["border-end-end-radius:",";border-start-end-radius:",";"],u,u)):"top"===r?o.push(Object(s.css)(["border-radius:0 0 "," ",";"],u,u)):"top-left"===r?o.push(Object(s.css)(["border-radius:0 0 "," 0;"],u)):"top-right"===r?o.push(Object(s.css)(["border-radius:0 0 0 ",";"],u)):o.push(Object(s.css)(["border-radius:",";"],u)),o);var e,n,r,i,o,a,u,l}),(function(t){return"hidden"!==t.position&&w[t.position][t.full](b(t.targetBounds,t.margin,t.theme),t.targetBounds)||""})),E=Object(s.css)(["position:relative;max-height:none;max-width:none;border-radius:0;top:0;bottom:0;left:0;right:0;transform:none;animation:none;height:100vh;width:100vw;"]),O=Object(s.css)(["box-shadow:",";"],(function(t){return t.theme.global.elevation[t.theme.dark?"dark":"light"][t.theme.layer.container.elevation]})),S=s.default.div.withConfig({displayName:"StyledLayer__StyledContainer",componentId:"rmtehz-2"})([""," display:flex;flex-direction:column;min-height:",";"," outline:none;pointer-events:all;z-index:",";"," "," ",";",";"],(function(t){return t.modal?"":p.a}),(function(t){return t.theme.global.size.xxsmall}),(function(t){return!t.plain&&(t.background||t.theme.layer.background)&&Object(h.d)(t.background||t.theme.layer.background,t.theme)}),(function(t){return t.theme.layer.container.zIndex}),(function(t){return t.theme.layer.container.elevation&&O}),x,(function(t){if(t.responsive&&t.theme.layer.responsiveBreakpoint){var e=t.theme.global.breakpoints[t.theme.layer.responsiveBreakpoint];if(e)return Object(d.a)(e,E)}return""}),(function(t){return t.theme.layer.container&&t.theme.layer.container.extend}));function P(){return P=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},P.apply(this,arguments)}S.defaultProps={},Object.setPrototypeOf(S.defaultProps,u.a);var C=s.default.a.withConfig({displayName:"LayerContainer__HiddenAnchor",componentId:"sc-1srj14c-0"})(["width:0;height:0;overflow:hidden;position:absolute;"]),T=[],k={left:0,right:0,top:0,bottom:0},I=Object(r.forwardRef)((function(t,e){var n=t.background,o=t.children,p=t.full,d=void 0!==p&&p,m=t.id,v=t.margin,b=void 0===v?"none":v,_=t.modal,A=void 0===_||_,w=t.onClickOutside,x=t.onEsc,E=t.plain,O=t.position,I=void 0===O?"center":O,L=t.responsive,j=void 0===L||L,M=t.target,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,["background","children","full","id","margin","modal","onClickOutside","onEsc","plain","position","responsive","target"]),N=Object(r.useContext)(s.ThemeContext)||u.a.theme,D=Object(r.useState)(k),F=D[0],B=D[1],z=Object(r.useRef)(),U=Object(r.useRef)(),G=Object(r.useRef)(),V=Object(r.useContext)(f.a)||T,q=Object(r.useMemo)((function(){return V.length}),[V]),H=Object(r.useMemo)((function(){return[].concat(V,[q])}),[V,q]);Object(r.useEffect)((function(){if("hidden"!==I){var t=G.current||U.current||e.current;t&&t.scrollIntoView&&t.scrollIntoView();for(var n=document.activeElement;n&&n!==U.current;)n=n.parentElement;A&&!n&&z.current&&z.current.focus()}}),[A,I,e]),Object(r.useEffect)((function(){if("hidden"!==I){var t=G.current||U.current||e.current;t&&t.scrollIntoView&&t.scrollIntoView()}}),[I,e]),Object(r.useEffect)((function(){var t=function(t){for(var e=null,n=t.target;null===e&&n!==document&&null!==n;){var r=n.getAttribute("data-g-portal-id");null!==r&&""!==r?e=parseInt(r,10):n=n.parentNode}null!==e&&-1===V.indexOf(e)||null===n||w(t)};if(w&&document.addEventListener("mousedown",t),M){var e=function(){var t=Object(a.c)(M).getBoundingClientRect();B({left:t.left,right:window.innerWidth-t.right,top:t.top,bottom:window.innerHeight-t.bottom})};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),w&&document.removeEventListener("mousedown",t)}}return B(k),function(){w&&document.removeEventListener("mousedown",t)}}),[M,w,V,q]);var W=i.a.createElement(S,P({ref:e||U,background:n,elevation:N.layer.container.elevation,id:m,full:d,margin:b,modal:A,targetBounds:A?k:F},R,{position:I,plain:E,responsive:j,dir:N.dir,"data-g-portal-id":q}),i.a.createElement(C,{ref:z,tabIndex:"-1","aria-hidden":"true"}),o);if(A&&(W=i.a.createElement(g,{ref:G,id:m,targetBounds:F,plain:E,position:I,responsive:j,tabIndex:"-1",dir:N.dir},i.a.createElement(y,{plain:E,responsive:j,onMouseDown:w}),W)),x&&(W=i.a.createElement(c.a,{onEsc:x?function(t){t.stopPropagation(),x(t)}:void 0,target:!1===A?"document":void 0},W)),N.layer.background){var X=Object(h.c)(N.layer.background,N);void 0!==X&&X!==N.dark&&(W=i.a.createElement(s.ThemeContext.Provider,{value:P({},N,{dark:X})},W))}return W=i.a.createElement(f.a.Provider,{value:H},W),A&&(W=i.a.createElement(l.a,{hidden:"hidden"===I,restrictScroll:!M||void 0,trapFocus:!0},W)),W})),L=n(1595);function j(){return j=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},j.apply(this,arguments)}var M=Object(r.forwardRef)((function(t,e){var n=t.animate,s=t.animation,u=t.targetChildPosition,l=Object(r.useState)(),c=l[0],f=l[1];Object(r.useEffect)((function(){return f(document.activeElement)}),[]);var h=Object(r.useState)(),p=h[0],d=h[1],m=Object(r.useContext)(L.a);return Object(r.useEffect)((function(){return d(Object(a.e)(m,u))}),[m,u]),Object(r.useEffect)((function(){return function(){if(c&&(c.focus?setTimeout((function(){return c.focus()}),0):c.parentNode&&c.parentNode.focus&&c.parentNode.focus()),p)if(!1!==(void 0!==s?s:n)){var t=p.cloneNode(!0);t.id="layerClone",m.appendChild(t);var e=t.querySelector('[class*="StyledLayer__StyledContainer"]');e&&e.style&&(e.style.animationDirection="reverse"),setTimeout((function(){var t=document.getElementById("layerClone");t&&(m.removeChild(t),p.remove())}),200)}else m.removeChild(p)}}),[n,s,m,p,c]),p?Object(o.createPortal)(i.a.createElement(I,j({ref:e},t)),p):null}));M.displayName="Layer";var R=M},function(t,e,n){"use strict";n.d(e,"a",(function(){return T}));var r=n(0),i=n.n(r),o=n(4),a=n(32),s=n(1594),u=n(56),l=n(436),c=n(419),f=n(143),h=Object(o.default)(l.a).withConfig({displayName:"StyledCheckBoxGroup",componentId:"sc-2nhc5d-0"})(["",""],(function(t){return t.theme.checkBoxGroup&&t.theme.checkBoxGroup.container&&t.theme.checkBoxGroup.container.extend}));function p(){return p=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},p.apply(this,arguments)}function d(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}h.defaultProps={},Object.setPrototypeOf(h.defaultProps,a.a);var m=Object(r.forwardRef)((function(t,e){var n=t.value,a=t.disabled,s=t.gap,u=t.labelKey,l=t.valueKey,m=t.onChange,g=t.options,y=t.name,v=d(t,["value","disabled","gap","labelKey","valueKey","onChange","options","name"]),b=Object(r.useContext)(f.a),_=Object(r.useContext)(o.ThemeContext)||defaultProps.theme,A=Object(r.useMemo)((function(){return g.map((function(t){return"string"===typeof t?{disabled:a,value:t,label:t}:t}))}),[g,a]),w=b.useFormInput(y,n,[]),x=w[0],E=w[1],O=function(t,e,n){var r=JSON.parse(JSON.stringify(x))||[],i=r.indexOf(e);if(i<0?r.push(e):r.splice(i,1),E(r),m){t.persist();var o=t;o.value=r,o.option=n,m(o)}};return i.a.createElement(h,p({ref:e},_.checkBoxGroup.container,{gap:s||(_.checkBoxGroup.container&&_.checkBoxGroup.container.gap?_.checkBoxGroup.container.gap:"small")},v),A.map((function(t){var e=t.value,n=u?t[u]:t.label,r=l?t[l]:e,o=x.indexOf(r)>=0,s=a||t.disabled,f=n+"-"+r;t.checked&&console.warn("'checked' prop of an individual CheckBox shouldn't be used in a CheckBoxGroup component. Use the CheckBoxGroup 'value' prop instead.");t.value;var h=p({},d(t,["value"]),{label:n,disabled:s});return i.a.createElement(c.a,p({key:f},h,{disabled:s,checked:o,label:n,onChange:function(t){return O(t,r,h)}}))})))}));m.displayName="CheckBoxGroup";var g=n(1536),y=n(1677),v=n(1537);function b(){return b=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},b.apply(this,arguments)}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}var A=["TextInput","Select","MaskedInput","TextArea","DateInput"],w=["CheckBox","CheckBoxGroup","RadioButtonGroup","RangeInput"],x=Object(o.default)(l.a).withConfig({displayName:"FormField__FormFieldBox",componentId:"m9hood-0"})([""," ",""],(function(t){return t.focus&&Object(s.f)({justBorder:!0})}),(function(t){return t.theme.formField&&t.theme.formField.extend})),E=Object(o.default)(l.a).withConfig({displayName:"FormField__FormFieldContentBox",componentId:"m9hood-1"})(["",""],(function(t){return t.focus&&Object(s.f)({justBorder:!0})})),O=Object(o.default)(l.a).withConfig({displayName:"FormField__StyledMessageContainer",componentId:"m9hood-2"})(["",""],(function(t){return t.messageType&&t.theme.formField[t.messageType].container&&t.theme.formField[t.messageType].container.extend})),S=function(t){t.error,t.info;var e,n,s,u=t.message,c=t.type,f=_(t,["error","info","message","type"]),h=Object(r.useContext)(o.ThemeContext)||a.a.theme;return u?(c&&(e=h.formField[c]&&h.formField[c].icon,n=h.formField[c]&&h.formField[c].container),s="string"===typeof u?i.a.createElement(y.a,f,u):i.a.createElement(l.a,f,u),e||n?i.a.createElement(O,b({direction:"row",messageType:c},n),e&&i.a.createElement(l.a,{flex:!1},e),s):s):null},P=function(t){var e,n=t.component,o=t.disabled,a=t.invalid,s=t.name,u=t.onChange,l=_(t,["component","disabled","invalid","name","onChange"]),c=Object(r.useContext)(f.a).useFormInput(s,l.value),h=c[0],p=c[1],d=n||v.a,m=!(e=d)||-1===A.indexOf(e.displayName)&&-1===w.indexOf(e.displayName)?{value:h,onChange:function(t){p(void 0!==t.value?t.value:t.target.value),u&&u(t)}}:{focusIndicator:!1,onChange:u,plain:!0};return i.a.createElement(d,b({name:s,disabled:o,"aria-invalid":a||void 0},l,m))},C=Object(r.forwardRef)((function(t,e){var n=t.children,s=t.className,h=t.component,p=t.contentProps,d=t.disabled,v=t.error,O=t.help,C=t.htmlFor,T=t.info,k=t.label,I=t.margin,L=t.name,j=t.onBlur,M=t.onFocus,R=t.pad,N=t.required,D=t.style,F=t.validate,B=_(t,["children","className","component","contentProps","disabled","error","help","htmlFor","info","label","margin","name","onBlur","onFocus","pad","required","style","validate"]),z=Object(r.useContext)(o.ThemeContext)||a.a.theme,U=Object(r.useContext)(f.a).useFormField({error:v,info:T,name:L,required:N,validate:F}),G=U.error,V=U.info,q=U.inForm,H=U.onBlur,W=Object(r.useState)(),X=W[0],Y=W[1],Z=z.formField,K=Z.border,$=h&&(h===c.a||h===m||h===g.a),J=K&&n&&r.Children.map(n,(function(t){return t&&t.type&&-1!==w.indexOf(t.type.displayName)&&($=!0),t&&t.type&&-1!==A.indexOf(t.type.displayName)&&void 0===t.props.plain&&void 0===t.props.focusIndicator?Object(r.cloneElement)(t,{plain:!0,focusIndicator:!1}):t}))||n,Q=B;q&&(J||(Q={}),J=J||i.a.createElement(P,b({component:h,disabled:d,invalid:!!G,name:L,label:h===c.a?k:void 0},B)));var tt,et=b({},Z.content);R||$||(et.pad=void 0),K&&"inner"===K.position&&(G&&Z.error?et.background=Z.error.background:d&&Z.disabled&&(et.background=Z.disabled.background)),K||(J=i.a.createElement(l.a,b({},et,p),J)),tt=d&&Z.disabled.border&&Z.disabled.border.color?Z.disabled.border.color:G&&K&&K.error.color?K.error.color||"status-critical":X&&Z.focus&&Z.focus.border&&Z.focus.border.color?Z.focus.border.color:K&&K.color||"border";var nt,rt,it=b({},Z.label);d&&(it.color=Z.disabled&&Z.disabled.label?Z.disabled.label.color:it.color);var ot,at=D;if(K){var st="inner"===K.position?{border:b({},K,{side:K.side||"bottom",color:tt}),round:Z.round,focus:X}:{};J=i.a.createElement(E,b({},et,st,p),J);var ut=I||Z.margin;(nt="outer"===K.position&&("all"===K.side||"horizontal"===K.side||!K.side)&&!(ut&&("string"===typeof ut&&"none"!==ut||ut.bottom&&"none"!==ut.bottom||ut.horizontal&&"none"!==ut.horizontal)))&&(rt={bottom:"-1px"},I?rt=I:K.size&&(rt={bottom:"-"+Object(u.b)(z.global.borderSize[K.size]||K.size)+"px"}),at=b({position:X?"relative":void 0,zIndex:X?10:void 0},D))}K&&"outer"===K.position&&(G&&Z.error&&Z.error.background?ot=Z.error.background:X&&Z.focus&&Z.focus.background&&Z.focus.background.color?ot=Z.focus.background.color:d&&Z.disabled&&Z.disabled.background&&(ot=Z.disabled.background));var lt=K&&"outer"===K.position?{border:b({},K,{color:tt}),round:Z.round,focus:X}:{};return i.a.createElement(x,b({ref:e,className:s,background:ot,margin:nt?rt:I||b({},Z.margin)},lt,{style:at,onFocus:function(t){Y(!0),M&&M(t)},onBlur:function(t){Y(!1),H&&H(t),j&&j(t)}},Q),k&&h!==c.a||O?i.a.createElement(i.a.Fragment,null,k&&h!==c.a&&i.a.createElement(y.a,b({as:"label",htmlFor:C},it),k),i.a.createElement(S,b({message:O},Z.help))):void 0,J,i.a.createElement(S,b({type:"error",message:G},Z.error)),i.a.createElement(S,b({type:"info",message:V},Z.info)))}));C.displayName="FormField";var T=C},,function(t,e,n){"use strict";n.r(e);var r=n(11),i=n(192),o=r.a.start();o.debug=!1,window.Stimulus=o;var a=n(1197);o.load(Object(i.a)(a))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(1211)),r(n(1212)),r(n(1213))},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.r(e),n.d(e,"CacheProvider",(function(){return k})),n.d(e,"ThemeContext",(function(){return T})),n.d(e,"withEmotionCache",(function(){return I})),n.d(e,"css",(function(){return N})),n.d(e,"ClassNames",(function(){return V})),n.d(e,"Global",(function(){return F})),n.d(e,"createElement",(function(){return D})),n.d(e,"jsx",(function(){return D})),n.d(e,"keyframes",(function(){return z}));var i=n(0);var o=function(){function t(t){this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var e=t.prototype;return e.insert=function(t){if(this.ctr%(this.isSpeedy?65e3:1)===0){var e,n=function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e}(this);e=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,e),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(r);try{var o=105===t.charCodeAt(1)&&64===t.charCodeAt(0);i.insertRule(t,o?0:i.cssRules.length)}catch(a){0}}else r.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),a=n(430),s=(n(393),"/*|*/");function u(t){t&&l.current.insert(t+"}")}var l={current:null},c=function(t,e,n,r,i,o,a,c,f,h){switch(t){case 1:switch(e.charCodeAt(0)){case 64:return l.current.insert(e+";"),"";case 108:if(98===e.charCodeAt(2))return""}break;case 2:if(0===c)return e+s;break;case 3:switch(c){case 102:case 112:return l.current.insert(n[0]+e),"";default:return e+(0===h?s:"")}case-2:e.split("/*|*/}").forEach(u)}},f=function(t){void 0===t&&(t={});var e,n=t.key||"css";void 0!==t.prefix&&(e={prefix:t.prefix});var r=new a.a(e);var i,s={};i=t.container||document.head;var u,f=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(f,(function(t){t.getAttribute("data-emotion-"+n).split(" ").forEach((function(t){s[t]=!0})),t.parentNode!==i&&i.appendChild(t)})),r.use(t.stylisPlugins)(c),u=function(t,e,n,i){var o=e.name;l.current=n,r(t,e.styles),i&&(h.inserted[o]=!0)};var h={key:n,sheet:new o({key:n,container:i,nonce:t.nonce,speedy:t.speedy}),nonce:t.nonce,inserted:s,registered:{},insert:u};return h};n(1209);function h(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]):r+=n+" "})),r}var p=function(t,e,n){var r=t.key+"-"+e.name;if(!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles),void 0===t.inserted[e.name]){var i=e;do{t.insert("."+r,i,t.sheet,!0);i=i.next}while(void 0!==i)}},d=n(475),m=n(338),g=n(364),y=/[A-Z]|^ms/g,v=/_EMO_([^_]+?)_([^]*?)_EMO_/g,b=function(t){return 45===t.charCodeAt(1)},_=function(t){return null!=t&&"boolean"!==typeof t},A=Object(g.a)((function(t){return b(t)?t:t.replace(y,"-$&").toLowerCase()})),w=function(t,e){switch(t){case"animation":case"animationName":if("string"===typeof e)return e.replace(v,(function(t,e,n){return E={name:e,styles:n,next:E},e}))}return 1===m.a[t]||b(t)||"number"!==typeof e||0===e?e:e+"px"};function x(t,e,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return E={name:n.name,styles:n.styles,next:E},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)E={name:i.name,styles:i.styles,next:E},i=i.next;return n.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=x(t,e,n[i],!1);else for(var o in n){var a=n[o];if("object"!==typeof a)null!=e&&void 0!==e[a]?r+=o+"{"+e[a]+"}":_(a)&&(r+=A(o)+":"+w(o,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=e&&void 0!==e[a[0]]){var s=x(t,e,a,!1);switch(o){case"animation":case"animationName":r+=A(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var u=0;u<a.length;u++)_(a[u])&&(r+=A(o)+":"+w(o,a[u])+";")}return r}(t,e,n);case"function":if(void 0!==t){var o=E,a=n(t);return E=o,x(t,e,a,r)}}if(null==e)return n;var s=e[n];return void 0===s||r?n:s}var E,O=/label:\s*([^\s;\n{]+)\s*;/g;var S=function(t,e,n){if(1===t.length&&"object"===typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,i="";E=void 0;var o=t[0];null==o||void 0===o.raw?(r=!1,i+=x(n,e,o,!1)):i+=o[0];for(var a=1;a<t.length;a++)i+=x(n,e,t[a],46===i.charCodeAt(i.length-1)),r&&(i+=o[a]);O.lastIndex=0;for(var s,u="";null!==(s=O.exec(i));)u+="-"+s[1];return{name:Object(d.a)(i)+u,styles:i,next:E}},P=Object.prototype.hasOwnProperty,C=Object(i.createContext)("undefined"!==typeof HTMLElement?f():null),T=Object(i.createContext)({}),k=C.Provider,I=function(t){var e=function(e,n){return Object(i.createElement)(C.Consumer,null,(function(r){return t(e,r,n)}))};return Object(i.forwardRef)(e)},L="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",j=function(t,e){var n={};for(var r in e)P.call(e,r)&&(n[r]=e[r]);return n[L]=t,n},M=function(t,e,n,r){var o=null===n?e.css:e.css(n);"string"===typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var a=e[L],s=[o],u="";"string"===typeof e.className?u=h(t.registered,s,e.className):null!=e.className&&(u=e.className+" ");var l=S(s);p(t,l,"string"===typeof a);u+=t.key+"-"+l.name;var c={};for(var f in e)P.call(e,f)&&"css"!==f&&f!==L&&(c[f]=e[f]);return c.ref=r,c.className=u,Object(i.createElement)(a,c)},R=I((function(t,e,n){return"function"===typeof t.css?Object(i.createElement)(T.Consumer,null,(function(r){return M(e,t,r,n)})):M(e,t,null,n)}));var N=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return S(e)},D=function(t,e){var n=arguments;if(null==e||!P.call(e,"css"))return i.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=R,o[1]=j(t,e);for(var a=2;a<r;a++)o[a]=n[a];return i.createElement.apply(null,o)},F=I((function(t,e){var n=t.styles;if("function"===typeof n)return Object(i.createElement)(T.Consumer,null,(function(t){var r=S([n(t)]);return Object(i.createElement)(B,{serialized:r,cache:e})}));var r=S([n]);return Object(i.createElement)(B,{serialized:r,cache:e})})),B=function(t){var e,n;function i(e,n,r){return t.call(this,e,n,r)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var a=i.prototype;return a.componentDidMount=function(){this.sheet=new o({key:this.props.cache.key+"-global",nonce:this.props.cache.sheet.nonce,container:this.props.cache.sheet.container});var t=document.querySelector("style[data-emotion-"+this.props.cache.key+'="'+this.props.serialized.name+'"]');null!==t&&this.sheet.tags.push(t),this.props.cache.sheet.tags.length&&(this.sheet.before=this.props.cache.sheet.tags[0]),this.insertStyles()},a.componentDidUpdate=function(t){t.serialized.name!==this.props.serialized.name&&this.insertStyles()},a.insertStyles=function(){if(void 0!==this.props.serialized.next&&p(this.props.cache,this.props.serialized.next,!0),this.sheet.tags.length){var t=this.sheet.tags[this.sheet.tags.length-1].nextElementSibling;this.sheet.before=t,this.sheet.flush()}this.props.cache.insert("",this.props.serialized,this.sheet,!1)},a.componentWillUnmount=function(){this.sheet.flush()},a.render=function(){return null},i}(i.Component),z=function(){var t=N.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},U=function t(e){for(var n=e.length,r=0,i="";r<n;r++){var o=e[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=t(o);else for(var s in a="",o)o[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=o}a&&(i&&(i+=" "),i+=a)}}return i};function G(t,e,n){var r=[],i=h(t,r,n);return r.length<2?n:i+e(r)}var V=I((function(t,e){return Object(i.createElement)(T.Consumer,null,(function(n){var r=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=S(n,e.registered);return p(e,i,!1),e.key+"-"+i.name},i={css:r,cx:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return G(e.registered,r,U(n))},theme:n},o=t.children(i);return!0,o}))}))},,function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(30);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},a.apply(this,arguments)}var s=new Map,u=new Map,l=0;function c(t){return Object.keys(t).sort().filter((function(e){return void 0!==t[e]})).map((function(e){return e+"_"+("root"===e?(n=t.root)?(u.has(n)||(l+=1,u.set(n,l.toString())),u.get(n)):"0":t[e]);var n})).toString()}function f(t,e,n){if(void 0===n&&(n={}),!t)return function(){};var r=function(t){var e=c(t),n=s.get(e);if(!n){var r,i=new Map,o=new IntersectionObserver((function(e){e.forEach((function(e){var n,o=e.isIntersecting&&r.some((function(t){return e.intersectionRatio>=t}));t.trackVisibility&&"undefined"===typeof e.isVisible&&(e.isVisible=o),null==(n=i.get(e.target))||n.forEach((function(t){t(o,e)}))}))}),t);r=o.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:o,elements:i},s.set(e,n)}return n}(n),i=r.id,o=r.observer,a=r.elements,u=a.get(t)||[];return a.has(t)||a.set(t,u),u.push(e),o.observe(t),function(){u.splice(u.indexOf(e),1),0===u.length&&(a.delete(t),o.unobserve(t)),0===a.size&&(o.disconnect(),s.delete(i))}}function h(t){return"function"!==typeof t.children}var p=function(t){var e,n;function i(e){var n;return(n=t.call(this,e)||this).node=null,n._unobserveCb=null,n.handleNode=function(t){n.node&&(n.unobserve(),t||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=t||null,n.observeNode()},n.handleChange=function(t,e){t&&n.props.triggerOnce&&n.unobserve(),h(n.props)||n.setState({inView:t,entry:e}),n.props.onChange&&n.props.onChange(t,e)},n.state={inView:!!e.initialInView,entry:void 0},n}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o=i.prototype;return o.componentDidUpdate=function(t){t.rootMargin===this.props.rootMargin&&t.root===this.props.root&&t.threshold===this.props.threshold&&t.skip===this.props.skip&&t.trackVisibility===this.props.trackVisibility&&t.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var t=this.props,e=t.threshold,n=t.root,r=t.rootMargin,i=t.trackVisibility,o=t.delay;this._unobserveCb=f(this.node,this.handleChange,{threshold:e,root:n,rootMargin:r,trackVisibility:i,delay:o})}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!h(this.props)){var t=this.state,e=t.inView,n=t.entry;return this.props.children({inView:e,entry:n,ref:this.handleNode})}var i=this.props,o=i.children,s=i.as,u=i.tag,l=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}(i,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return Object(r.createElement)(s||u||"div",a({ref:this.handleNode},l),o)},i}(r.Component);p.displayName="InView",p.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};var d=n(1146),m=n.n(d),g=n(62);function y(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return v(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 v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(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 b={visible:{opacity:1,y:0,transition:{duration:1}},hidden:{opacity:0,y:150}};e.default=function(t){var e=Object(o.c)(),n=function(t){var e=void 0===t?{}:t,n=e.threshold,i=e.delay,o=e.trackVisibility,a=e.rootMargin,s=e.root,u=e.triggerOnce,l=e.skip,c=e.initialInView,h=Object(r.useRef)(),p=Object(r.useState)({inView:!!c}),d=p[0],m=p[1],g=Object(r.useCallback)((function(t){void 0!==h.current&&(h.current(),h.current=void 0),l||t&&(h.current=f(t,(function(t,e){m({inView:t,entry:e}),e.isIntersecting&&u&&h.current&&(h.current(),h.current=void 0)}),{root:s,rootMargin:a,threshold:n,trackVisibility:o,delay:i}))}),[Array.isArray(n)?n.toString():n,s,a,u,l,o,i]);Object(r.useEffect)((function(){h.current||!d.entry||u||l||m({inView:!!c})}));var y=[g,d.inView,d.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}(),a=y(n,2),s=a[0],u=a[1];Object(r.useEffect)((function(){u&&e.start("visible")}),[e,u]);return i.a.createElement(o.b.div,{className:m.a.QuickStart,ref:s,animate:e,initial:"hidden",variants:b},i.a.createElement("a",{href:t.quick_start.url},i.a.createElement("div",{className:m.a.image},i.a.createElement(g.default,Object.assign({},t.quick_start.image,{sizes:{"(min-width:1520px)":"220px","(min-width:768px)":"25vw","(min-width:0px)":"100vw"}}))),i.a.createElement("div",{className:m.a.textContent},i.a.createElement("h3",null,t.quick_start.title),t.quick_start.content&&i.a.createElement("p",null,t.quick_start.content))))}},function(t){t.exports=JSON.parse('{"roundel":{"height":200,"pixelRatio":1,"width":200,"x":0,"y":0,"mask":true}}')},function(t,e,n){t.exports={QuickStart:"QuickStart-module__QuickStart___p9h-K",image:"QuickStart-module__image___3-a9G",textContent:"QuickStart-module__textContent___2wClU"}},function(t,e,n){t.exports={ContentAreaWithSidebar:"ContentAreaWithSidebar-module__ContentAreaWithSidebar___1ILRv",contentArea:"ContentAreaWithSidebar-module__contentArea___1Vgr7",sidebar:"ContentAreaWithSidebar-module__sidebar___3YQ_t"}},function(t,e,n){t.exports={Record:"Record-module__Record___qMqG4",type:"Record-module__type___1CVb4"}},function(t,e,n){t.exports={HighlightedContent:"HighlightedContent-module__HighlightedContent___1xj1r",textContent:"HighlightedContent-module__textContent___2QbGD",contentItems:"HighlightedContent-module__contentItems___1NVG_"}},function(t,e,n){t.exports={MainFooter:"MainFooter-module__MainFooter___1GvU-",contactDetails:"MainFooter-module__contactDetails___3AJIO",socialLinks:"MainFooter-module__socialLinks___IvX5C"}},function(t,e,n){t.exports={QuickStarts:"QuickStarts-module__QuickStarts___2AErK",textContent:"QuickStarts-module__textContent___1niG-",quickStarts:"QuickStarts-module__quickStarts___PpRx8"}},function(t,e,n){t.exports={TertiaryFooter:"TertiaryFooter-module__TertiaryFooter___8x4l-",navigation:"TertiaryFooter-module__navigation___1er8K",humapSignature:"TertiaryFooter-module__humapSignature___3nWlA"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1),i=n(641),o=n(173),a=n(55);const s={name:"fill-pattern",vs:"\n#ifdef NON_INSTANCED_MODEL\n  #define FILL_PATTERN_FRAME_ATTRIB fillPatternFrames\n  #define FILL_PATTERN_SCALE_ATTRIB fillPatternScales\n  #define FILL_PATTERN_OFFSET_ATTRIB fillPatternOffsets\n#else\n  #define FILL_PATTERN_FRAME_ATTRIB instanceFillPatternFrames\n  #define FILL_PATTERN_SCALE_ATTRIB instanceFillPatternScales\n  #define FILL_PATTERN_OFFSET_ATTRIB instanceFillPatternOffsets\n#endif\n\nattribute vec4 FILL_PATTERN_FRAME_ATTRIB;\nattribute float FILL_PATTERN_SCALE_ATTRIB;\nattribute vec2 FILL_PATTERN_OFFSET_ATTRIB;\n\nuniform bool fill_patternEnabled;\nuniform vec2 fill_patternTextureSize;\n\nvarying vec2 fill_uv;\nvarying vec4 fill_patternBounds;\nvarying vec4 fill_patternPlacement;\n",fs:"\nuniform bool fill_patternEnabled;\nuniform bool fill_patternMask;\nuniform sampler2D fill_patternTexture;\nuniform vec2 fill_uvCoordinateOrigin;\nuniform vec2 fill_uvCoordinateOrigin64Low;\n\nvarying vec4 fill_patternBounds;\nvarying vec4 fill_patternPlacement;\nvarying vec2 fill_uv;\n\nconst float FILL_UV_SCALE = 512.0 / 40000000.0;\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n    fill_uv = geometry.position.xy;\n  ","vs:DECKGL_FILTER_COLOR":"\n    if (fill_patternEnabled) {\n      fill_patternBounds = FILL_PATTERN_FRAME_ATTRIB / vec4(fill_patternTextureSize, fill_patternTextureSize);\n      fill_patternPlacement.xy = FILL_PATTERN_OFFSET_ATTRIB;\n      fill_patternPlacement.zw = FILL_PATTERN_SCALE_ATTRIB * FILL_PATTERN_FRAME_ATTRIB.zw;\n    }\n  ","fs:DECKGL_FILTER_COLOR":"\n    if (fill_patternEnabled) {\n      vec2 scale = FILL_UV_SCALE * fill_patternPlacement.zw;\n      vec2 patternUV = mod(mod(fill_uvCoordinateOrigin, scale) + fill_uvCoordinateOrigin64Low + fill_uv, scale) / scale;\n      patternUV = mod(fill_patternPlacement.xy + patternUV, 1.0);\n\n      vec2 texCoords = fill_patternBounds.xy + fill_patternBounds.zw * patternUV;\n\n      vec4 patternColor = texture2D(fill_patternTexture, texCoords);\n      color.a *= patternColor.a;\n      if (!fill_patternMask) {\n        color.rgb = patternColor.rgb;\n      }\n    }\n  "},dependencies:[n(170).a],getUniforms:function(t,e){if(!t)return{};if("fillPatternTexture"in t){const{fillPatternTexture:e}=t;return{fill_patternTexture:e,fill_patternTextureSize:[e.width,e.height]}}if("viewport"in t){const{fillPatternMask:n=!0,fillPatternEnabled:r=!0}=t,{project_uCommonOrigin:i}=e,o=[Object(a.b)(i[0]),Object(a.b)(i[1])];return{fill_uvCoordinateOrigin:i.slice(0,2),fill_uvCoordinateOrigin64Low:o,fill_patternMask:n,fill_patternEnabled:r}}return{}}},u={10241:9729,10240:9729,10242:33071,10243:33071};class l extends i.a{constructor({pattern:t=!1}={}){super({pattern:t})}isEnabled(t){return null!==t.getAttributeManager()&&!("pathTesselator"in t.state)}getShaders(t){return t.isEnabled(this)?{modules:[t.opts.pattern&&s].filter(Boolean)}:null}initializeState(t,e){if(!e.isEnabled(this))return;const n=this.getAttributeManager();e.opts.pattern&&n.add({fillPatternFrames:{size:4,accessor:"getFillPattern",transform:e.getPatternFrame.bind(this),shaderAttributes:{fillPatternFrames:{divisor:0},instanceFillPatternFrames:{divisor:1}}},fillPatternScales:{size:1,accessor:"getFillPatternScale",defaultValue:1,shaderAttributes:{fillPatternScales:{divisor:0},instanceFillPatternScales:{divisor:1}}},fillPatternOffsets:{size:2,accessor:"getFillPatternOffset",shaderAttributes:{fillPatternOffsets:{divisor:0},instanceFillPatternOffsets:{divisor:1}}}}),this.setState({emptyTexture:new o.a(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}updateState({props:t,oldProps:e},n){n.isEnabled(this)&&(t.fillPatternAtlas&&t.fillPatternAtlas!==e.fillPatternAtlas&&n.loadPatternAtlas.call(this),t.fillPatternMapping&&t.fillPatternMapping!==e.fillPatternMapping&&n.loadPatternMapping.call(this))}draw(t,e){if(!e.isEnabled(this))return;const{patternTexture:n}=this.state;this.setModuleParameters({fillPatternTexture:n||this.state.emptyTexture})}finalizeState(){const{patternTexture:t,emptyTexture:e}=this.state;null===t||void 0===t||t.delete(),null===e||void 0===e||e.delete()}async loadPatternAtlas(){var t;const{fillPatternAtlas:e,fetch:n}=this.props;null===(t=this.state.patternTexture)||void 0===t||t.delete(),this.setState({patternTexture:null});let r=e;"string"===typeof r&&(r=await n(r,{propName:"fillPatternAtlas",layer:this}));const i=r instanceof o.a?r:new o.a(this.context.gl,{data:r,parameters:u});this.setState({patternTexture:i})}async loadPatternMapping(){const{fillPatternMapping:t,fetch:e}=this.props;this.setState({patternMapping:null});let n=t;"string"===typeof n&&(n=await e(n,{propName:"fillPatternMapping",layer:this})),this.setState({patternMapping:n}),this.getAttributeManager().invalidate("getFillPattern"),this.setNeedsUpdate()}getPatternFrame(t){const{patternMapping:e}=this.state,n=e&&e[t];return n?[n.x,n.y,n.width,n.height]:[0,0,0,0]}}Object(r.a)(l,"defaultProps",{fillPatternEnabled:!0,fillPatternAtlas:null,fillPatternMapping:null,fillPatternMask:!0,getFillPattern:{type:"accessor",value:t=>t.pattern},getFillPatternScale:{type:"accessor",value:1},getFillPatternOffset:{type:"accessor",value:[0,0]}}),Object(r.a)(l,"extensionName","FillStyleExtension")},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1),i=n(641),o=n(349);const a={inject:{"vs:#decl":"\nattribute vec2 instanceDashArrays;\nattribute float instanceDashOffsets;\nvarying vec2 vDashArray;\nvarying float vDashOffset;\n","vs:#main-end":"\nvDashArray = instanceDashArrays;\nvDashOffset = instanceDashOffsets / width.x;\n","fs:#decl":"\nuniform float dashAlignMode;\nuniform float capType;\nuniform bool dashGapPickable;\nvarying vec2 vDashArray;\nvarying float vDashOffset;\n\nfloat round(float x) {\n  return floor(x + 0.5);\n}\n","fs:#main-start":"\n  float solidLength = vDashArray.x;\n  float gapLength = vDashArray.y;\n  float unitLength = solidLength + gapLength;\n\n  float offset;\n\n  if (unitLength > 0.0) {\n    if (dashAlignMode == 0.0) {\n      offset = vDashOffset;\n    } else {\n      unitLength = vPathLength / round(vPathLength / unitLength);\n      offset = solidLength / 2.0;\n    }\n\n    float unitOffset = mod(clamp(vPathPosition.y, 0.0, vPathLength) + offset, unitLength);\n\n    if (gapLength > 0.0 && unitOffset > solidLength) {\n      if (capType <= 0.5) {\n        if (!(dashGapPickable && picking_uActive)) {\n          discard;\n        }\n      } else {\n        // caps are rounded, test the distance to solid ends\n        float distToEnd = length(vec2(\n          min(unitOffset - solidLength, unitLength - unitOffset),\n          vPathPosition.x\n        ));\n        if (distToEnd > 1.0) {\n          if (!(dashGapPickable && picking_uActive)) {\n            discard;\n          }\n        }\n      }\n    }\n  }\n"}},s={inject:{"vs:#decl":"\nattribute float instanceOffsets;\n","vs:DECKGL_FILTER_SIZE":"\n  float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;\n  size *= offsetWidth;\n","vCornerOffset = offsetVec;":"\n  float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;\n  vec2 offsetCenter = -instanceOffsets * (isCap ? perp : miterVec * miterSize) * 2.0;\n  vCornerOffset = vCornerOffset * offsetWidth - offsetCenter;\n","fs:#main-start":"\n  float isInside;\n  isInside = step(-1.0, vPathPosition.x) * step(vPathPosition.x, 1.0);\n  if (isInside == 0.0) {\n    discard;\n  }\n"}};var u=n(23);class l extends i.a{constructor({dash:t=!1,offset:e=!1,highPrecisionDash:n=!1}={}){super({dash:t||n,offset:e,highPrecisionDash:n})}isEnabled(t){return"pathTesselator"in t.state}getShaders(t){if(!t.isEnabled(this))return null;let e={};return t.opts.dash&&(e=Object(o.a)(e,a)),t.opts.offset&&(e=Object(o.a)(e,s)),e}initializeState(t,e){const n=this.getAttributeManager();n&&e.isEnabled(this)&&(e.opts.dash&&n.addInstanced({instanceDashArrays:{size:2,accessor:"getDashArray"}}),e.opts.highPrecisionDash&&n.addInstanced({instanceDashOffsets:{size:1,accessor:"getPath",transform:e.getDashOffsets.bind(this)}}),e.opts.offset&&n.addInstanced({instanceOffsets:{size:1,accessor:"getOffset"}}))}updateState(t,e){if(!e.isEnabled(this))return;const n={};e.opts.dash&&(n.dashAlignMode=this.props.dashJustified?1:0,n.dashGapPickable=Boolean(this.props.dashGapPickable)),this.state.model.setUniforms(n)}getDashOffsets(t){const e=[0],n="XY"===this.props.positionFormat?2:3,r=Array.isArray(t[0]),i=r?t.length:t.length/n;let o,a;for(let s=0;s<i-1;s++)o=r?t[s]:t.slice(s*n,s*n+n),o=this.projectPosition(o),s>0&&(e[s]=e[s-1]+Object(u.e)(a,o)),a=o;return e}}Object(r.a)(l,"defaultProps",{getDashArray:{type:"accessor",value:[0,0]},getOffset:{type:"accessor",value:0},dashJustified:!1,dashGapPickable:!1}),Object(r.a)(l,"extensionName","PathStyleExtension")},,,,function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return _}));var r=n(0),i=n.n(r),o=n(49),a=n(628),s=n(470),u=n(191),l=n.n(u),c=["width","height"];function f(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 h(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(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 g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function y(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=b(t);if(e){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var _=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(h,t);var e,n,r,u=y(h);function h(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=u.call(this,t)).mapRef=i.a.createRef(),e.updateZoom=l()((function(t){document.getElementById("zoom-level").value=parseInt(t,10).toFixed(2)}),250),e.onMarkerDrag=function(t){e.updateLngLatFields(t.lngLat)},e.onMarkerDragEnd=function(t){e.setState({marker:{longitude:t.lngLat[0],latitude:t.lngLat[1]}}),e.updateLngLatFields(t.lngLat)},e.onMapClick=function(t){e.setState({marker:{longitude:t.lngLat[0],latitude:t.lngLat[1]}}),e.updateLngLatFields(t.lngLat)},e.handleViewportChange=function(t){e.setState({viewport:p(p({},e.state.viewport),t)}),e.props.match_zoom_input&&e.updateZoom(t.zoom)},e.updateViewport=function(t){t.width,t.height;var n=f(t,c);e.setState({viewport:p(p({},e.state.viewport),n)}),e.props.match_zoom_input&&e.updateZoom(t.zoom)},e.handleGeocoderResult=function(t){e.setState({marker:{longitude:t.result.center[0],latitude:t.result.center[1]}}),e.updateLngLatFields(t.result.center)},e.handleGeocoderViewportChange=function(t){return e.updateViewport(p(p({},t),{transitionDuration:1e3}))},e.handleOnResult=function(t){e.setState({searchResult:t.result.geometry})},e.getBaseMapURL=function(){return e.props.base_map?"/basemaps/".concat(e.props.base_map):e.props.default_base_map_style_url};var n=parseFloat(document.getElementById("latitude").value)||51.53,r=parseFloat(document.getElementById("longitude").value)||.1277,o=t.match_zoom_input?parseFloat(document.getElementById("zoom-level").value):14;return e.countries=e.props.countries?e.props.countries.join():"",e.state={viewport:{width:"100%",height:400,latitude:n,longitude:r,zoom:o,bearing:0,pitch:0},marker:{latitude:n,longitude:r},events:{},geojson:t.geojson?JSON.parse(t.geojson):null},e.geocoderContainerRef=i.a.createRef(),e}return e=h,(n=[{key:"updateLngLatFields",value:function(t){document.getElementById("longitude").value=t[0].toFixed(5),document.getElementById("latitude").value=t[1].toFixed(5)}},{key:"render",value:function(){var t=this.state,e=t.viewport,n=t.marker,r=t.searchResult,u=t.geojson;return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:this.geocoderContainerRef,className:"geocoder-container"}),i.a.createElement(o.l,Object.assign({},e,{mapStyle:this.getBaseMapURL(),onViewportChange:this.updateViewport,onClick:this.onMapClick,ref:this.mapRef}),u&&i.a.createElement(o.i,{type:"geojson",data:u},i.a.createElement(o.c,{id:"geojson",type:"line",paint:{"line-color":"#00af36","line-width":3}})),r&&i.a.createElement(o.i,{type:"geojson",data:r},i.a.createElement(o.c,{id:"search-result",type:"circle",paint:{"circle-color":"#ff0000","circle-opacity":.5,"circle-radius":10}})),i.a.createElement(a.a,{mapRef:this.mapRef,onViewportChange:this.handleGeocoderViewportChange,containerRef:this.geocoderContainerRef,mapboxApiAccessToken:"pk.eyJ1IjoiaHVtYXAtaG9zdGluZyIsImEiOiJja2MyNTRraGYxMmJnMzFtcnI1c3VrMm5uIn0.BN87tr4QlV7jPUrIyeIC6g",position:"top-left",marker:!1,trackProximity:!0,onResult:this.handleGeocoderResult,countries:this.countries}),i.a.createElement(o.e,{latitude:n.latitude,longitude:n.longitude,offsetTop:-32,offsetLeft:-15,anchor:"bottom",draggable:!0,onDragStart:this.onMarkerDragStart,onDragEnd:this.onMarkerDragEnd,onDrag:this.onMarkerDrag},i.a.createElement(s.default,{size:30})),i.a.createElement("div",{style:{position:"absolute",bottom:77,left:20}},i.a.createElement(o.f,{showCompass:!1,onViewportChange:this.updateViewport}))))}}])&&m(e.prototype,n),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),h}(i.a.Component)},function(t,e,n){"use strict";var r=n(1160);t.exports=r,"undefined"!==typeof window&&(window.Suggestions=r)},function(t,e,n){"use strict";var r=n(274),i=n(1161),o=n(1162),a=function(t,e,n){return n=n||{},this.options=r({minLength:2,limit:5,filter:!0,hideOnBlur:!0},n),this.el=t,this.data=e||[],this.list=new o(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",function(t){this.handleKeyUp(t.keyCode)}.bind(this),!1),this.el.addEventListener("keydown",function(t){this.handleKeyDown(t)}.bind(this)),this.el.addEventListener("focus",function(){this.handleFocus()}.bind(this)),this.el.addEventListener("blur",function(){this.handleBlur()}.bind(this)),this.el.addEventListener("paste",function(t){this.handlePaste(t)}.bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};a.prototype.handleKeyUp=function(t){40!==t&&38!==t&&27!==t&&13!==t&&9!==t&&this.handleInputChange(this.el.value)},a.prototype.handleKeyDown=function(t){switch(t.keyCode){case 13:case 9:this.list.isEmpty()||(this.list.isVisible()&&t.preventDefault(),this.value(this.list.items[this.list.active].original),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next()}},a.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},a.prototype.handlePaste=function(t){if(t.clipboardData)this.handleInputChange(t.clipboardData.getData("Text"));else{var e=this;setTimeout((function(){e.handleInputChange(t.target.value)}),100)}},a.prototype.handleInputChange=function(t){this.query=this.normalize(t),this.list.clear(),this.query.length<this.options.minLength?this.list.draw():this.getCandidates(function(t){for(var e=0;e<t.length&&(this.list.add(t[e]),e!==this.options.limit-1);e++);this.list.draw()}.bind(this))},a.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},a.prototype.update=function(t){this.data=t,this.handleKeyUp()},a.prototype.clear=function(){this.data=[],this.list.clear()},a.prototype.normalize=function(t){return t=t.toLowerCase()},a.prototype.match=function(t,e){return t.indexOf(e)>-1},a.prototype.value=function(t){if(this.selected=t,this.el.value=this.getItemValue(t),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")},a.prototype.getCandidates=function(t){var e={pre:"<strong>",post:"</strong>",extract:function(t){return this.getItemValue(t)}.bind(this)};t(this.options.filter?i.filter(this.query,this.data,e).map(function(t){return{original:t.original,string:this.render(t.original,t.string)}}.bind(this)):this.data.map(function(t){return{original:t,string:this.render(t)}}.bind(this)))},a.prototype.getItemValue=function(t){return t},a.prototype.render=function(t,e){if(e)return e;for(var n=t.original?this.getItemValue(t.original):this.getItemValue(t),r=this.normalize(n),i=r.lastIndexOf(this.query);i>-1;){var o=i+this.query.length;n=n.slice(0,i)+"<strong>"+n.slice(i,o)+"</strong>"+n.slice(o),i=r.slice(0,i).lastIndexOf(this.query)}return n},a.prototype.renderError=function(t){this.list.drawError(t)},t.exports=a},function(t,e,n){var r;r={},t.exports=r,r.simpleFilter=function(t,e){return e.filter((function(e){return r.test(t,e)}))},r.test=function(t,e){return null!==r.match(t,e)},r.match=function(t,e,n){n=n||{};var r,i=0,o=[],a=e.length,s=0,u=0,l=n.pre||"",c=n.post||"",f=n.caseSensitive&&e||e.toLowerCase();t=n.caseSensitive&&t||t.toLowerCase();for(var h=0;h<a;h++)r=e[h],f[h]===t[i]?(r=l+r+c,i+=1,u+=1+u):u=0,s+=u,o[o.length]=r;return i===t.length?(s=f===t?1/0:s,{rendered:o.join(""),score:s}):null},r.filter=function(t,e,n){return e&&0!==e.length?"string"!==typeof t?e:(n=n||{},e.reduce((function(e,i,o,a){var s=i;n.extract&&(s=n.extract(i));var u=r.match(t,s,n);return null!=u&&(e[e.length]={string:u.rendered,score:u.score,index:o,original:i}),e}),[]).sort((function(t,e){var n=e.score-t.score;return n||t.index-e.index}))):[]}},function(t,e,n){"use strict";var r=function(t){return this.component=t,this.items=[],this.active=0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,t.el.parentNode.insertBefore(this.wrapper,t.el.nextSibling),this};r.prototype.show=function(){this.element.style.display="block"},r.prototype.hide=function(){this.element.style.display="none"},r.prototype.add=function(t){this.items.push(t)},r.prototype.clear=function(){this.items=[],this.active=0},r.prototype.isEmpty=function(){return!this.items.length},r.prototype.isVisible=function(){return"block"===this.element.style.display},r.prototype.draw=function(){if(this.element.innerHTML="",0!==this.items.length){for(var t=0;t<this.items.length;t++)this.drawItem(this.items[t],this.active===t);this.show()}else this.hide()},r.prototype.drawItem=function(t,e){var n=document.createElement("li"),r=document.createElement("a");e&&(n.className+=" active"),r.innerHTML=t.string,n.appendChild(r),this.element.appendChild(n),n.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),n.addEventListener("mouseup",function(){this.handleMouseUp.call(this,t)}.bind(this))},r.prototype.handleMouseUp=function(t){this.selectingListItem=!1,this.component.value(t.original),this.clear(),this.draw()},r.prototype.move=function(t){this.active=t,this.draw()},r.prototype.previous=function(){this.move(0===this.active?this.items.length-1:this.active-1)},r.prototype.next=function(){this.move(this.active===this.items.length-1?0:this.active+1)},r.prototype.drawError=function(t){var e=document.createElement("li");e.innerHTML=t,this.element.appendChild(e),this.show()},t.exports=r},function(t,e){t.exports={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}}},function(t,e,n){"use strict";var r=n(707);t.exports=r},function(t,e,n){"use strict";var r=n(1166),i=n(1168),o=n(421),a=n(1169),s={};function u(t){var e=t.total,n=t.loaded;return{total:e,transferred:n,percent:100*n/e}}function l(t,e){return new Promise((function(n,r){e.onprogress=function(e){t.emitter.emit(o.EVENT_PROGRESS_DOWNLOAD,u(e))};var a=t.file;a&&(e.upload.onprogress=function(e){t.emitter.emit(o.EVENT_PROGRESS_UPLOAD,u(e))}),e.onerror=function(t){r(t)},e.onabort=function(){var e=new i({request:t,type:o.ERROR_REQUEST_ABORTED});r(e)},e.onload=function(){if(delete s[t.id],e.status<200||e.status>=400){var o=new i({request:t,body:e.response,statusCode:e.status});r(o)}else n(e)};var l=t.body;"string"===typeof l?e.send(l):l?e.send(JSON.stringify(l)):a?e.send(a):e.send(),s[t.id]=e})).then((function(e){return function(t,e){return new r(t,{body:e.response,headers:a(e.getAllResponseHeaders()),statusCode:e.status})}(t,e)}))}function c(t,e){var n=t.url(e),r=new window.XMLHttpRequest;return r.open(t.method,n),Object.keys(t.headers).forEach((function(e){r.setRequestHeader(e,t.headers[e])})),r}t.exports={browserAbort:function(t){var e=s[t.id];e&&(e.abort(),delete s[t.id])},sendRequestXhr:l,browserSend:function(t){return Promise.resolve().then((function(){var e=c(t,t.client.accessToken);return l(t,e)}))},createRequestXhr:c}},function(t,e,n){"use strict";var r=n(1167);function i(t,e){this.request=t,this.headers=e.headers,this.rawBody=e.body,this.statusCode=e.statusCode;try{this.body=JSON.parse(e.body||"{}")}catch(n){this.body=e.body}this.links=r(this.headers.link)}i.prototype.hasNextPage=function(){return!!this.links.next},i.prototype.nextPage=function(){return this.hasNextPage()?this.request._extend({path:this.links.next.url}):null},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return t?t.split(/,\s*</).reduce((function(t,e){var n=function(t){var e=t.match(/<?([^>]*)>(.*)/);if(!e)return null;var n=e[1],r=e[2].split(";"),i=null,o=r.reduce((function(t,e){var n=function(t){var e=t.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return e?{key:e[1],value:e[2]}:null}(e);return n?"rel"===n.key?(i||(i=n.value),t):(t[n.key]=n.value,t):t}),{});return i?{url:n,rel:i,params:o}:null}(e);return n?(n.rel.split(/\s+/).forEach((function(e){t[e]||(t[e]={url:n.url,params:n.params})})),t):t}),{}):{}}},function(t,e,n){"use strict";var r=n(421);t.exports=function(t){var e,n=t.type||r.ERROR_HTTP;if(t.body)try{e=JSON.parse(t.body)}catch(o){e=t.body}else e=null;var i=t.message||null;i||("string"===typeof e?i=e:e&&"string"===typeof e.message?i=e.message:n===r.ERROR_REQUEST_ABORTED&&(i="Request aborted")),this.message=i,this.type=n,this.statusCode=t.statusCode||null,this.request=t.request,this.body=e}},function(t,e,n){"use strict";t.exports=function(t){var e={};return t?(t.trim().split(/[\r|\n]+/).forEach((function(t){var n=function(t){var e=t.indexOf(":");return{name:t.substring(0,e).trim().toLowerCase(),value:t.substring(e+1).trim()}}(t);e[n.name]=n.value})),e):e}},function(t,e,n){(function(t,r){var i;!function(o){var a=e,s=(t&&t.exports,"object"==typeof r&&r);s.global!==s&&s.window;var u=function(t){this.message=t};(u.prototype=new Error).name="InvalidCharacterError";var l=function(t){throw new u(t)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=/[\t\n\f\r ]/g,h={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,r,i,o=t.length%3,a="",s=-1,u=t.length-o;++s<u;)e=t.charCodeAt(s)<<16,n=t.charCodeAt(++s)<<8,r=t.charCodeAt(++s),a+=c.charAt((i=e+n+r)>>18&63)+c.charAt(i>>12&63)+c.charAt(i>>6&63)+c.charAt(63&i);return 2==o?(e=t.charCodeAt(s)<<8,n=t.charCodeAt(++s),a+=c.charAt((i=e+n)>>10)+c.charAt(i>>4&63)+c.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(s),a+=c.charAt(i>>2)+c.charAt(i<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(f,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",a=-1;++a<e;)r=c.indexOf(t.charAt(a)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o},version:"0.1.0"};void 0===(i=function(){return h}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(484)(t),n(36))},function(t,e,n){"use strict";var r=n(709),i=n(274),o=n(1172),a=n(1173),s=n(421),u=1;function l(t,e){if(!t)throw new Error("MapiRequest requires a client");if(!e||!e.path||!e.method)throw new Error("MapiRequest requires an options object with path and method properties");var n={};e.body&&(n["content-type"]="application/json");var r=i(n,e.headers),a=Object.keys(r).reduce((function(t,e){return t[e.toLowerCase()]=r[e],t}),{});this.id=u++,this._options=e,this.emitter=new o,this.client=t,this.response=null,this.error=null,this.sent=!1,this.aborted=!1,this.path=e.path,this.method=e.method,this.origin=e.origin||t.origin,this.query=e.query||{},this.params=e.params||{},this.body=e.body||null,this.file=e.file||null,this.encoding=e.encoding||"utf8",this.sendFileAs=e.sendFileAs||null,this.headers=a}l.prototype.url=function(t){var e=a.prependOrigin(this.path,this.origin);e=a.appendQueryObject(e,this.query);var n=this.params,o=null==t?this.client.accessToken:t;if(o){e=a.appendQueryParam(e,"access_token",o);var s=r(o).user;n=i({ownerId:s},n)}return e=a.interpolateRouteParams(e,n),e},l.prototype.send=function(){var t=this;if(t.sent)throw new Error("This request has already been sent. Check the response and error properties. Create a new request with clone().");return t.sent=!0,t.client.sendRequest(t).then((function(e){return t.response=e,t.emitter.emit(s.EVENT_RESPONSE,e),e}),(function(e){throw t.error=e,t.emitter.emit(s.EVENT_ERROR,e),e}))},l.prototype.abort=function(){this._nextPageRequest&&(this._nextPageRequest.abort(),delete this._nextPageRequest),this.response||this.error||this.aborted||(this.aborted=!0,this.client.abortRequest(this))},l.prototype.eachPage=function(t){var e=this;function n(n){t(null,n,(function(){delete e._nextPageRequest;var t=n.nextPage();t&&(e._nextPageRequest=t,i(t))}))}function r(e){t(e,null,(function(){}))}function i(t){t.send().then(n,r)}i(this)},l.prototype.clone=function(){return this._extend()},l.prototype._extend=function(t){var e=i(this._options,t);return new l(this.client,e)},t.exports=l},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function u(t,e){0===--t._eventsCount?t._events=new o:delete t._events[e]}function l(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),l.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},l.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r<o;r++)a[r]=n[r].fn;return a},l.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},l.prototype.emit=function(t,e,n,r,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,o),!0;case 6:return c.fn.call(c.context,e,n,r,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,r);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},l.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},l.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},l.prototype.removeListener=function(t,e,n,r){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return u(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||u(this,o);else{for(var s=0,l=[],c=a.length;s<c;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&l.push(a[s]);l.length?this._events[o]=1===l.length?l[0]:l:u(this,o)}return this},l.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&u(this,e)):(this._events=new o,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=i,l.EventEmitter=l,t.exports=l},function(t,e,n){"use strict";function r(t){return Array.isArray(t)?t.map(encodeURIComponent).join(","):encodeURIComponent(String(t))}function i(t,e,n){if(!1===n||null===n)return t;var i=/\?/.test(t)?"&":"?",o=encodeURIComponent(e);return void 0!==n&&""!==n&&!0!==n&&(o+="="+r(n)),""+t+i+o}t.exports={appendQueryObject:function(t,e){if(!e)return t;var n=t;return Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(Array.isArray(r)&&(r=r.filter((function(t){return null!==t&&void 0!==t})).join(",")),n=i(n,t,r))})),n},appendQueryParam:i,prependOrigin:function(t,e){if(!e)return t;if("http"===t.slice(0,4))return t;var n="/"===t[0]?"":"/";return""+e.replace(/\/$/,"")+n+t},interpolateRouteParams:function(t,e){return e?t.replace(/\/:([a-zA-Z0-9]+)/g,(function(t,n){var i=e[n];if(void 0===i)throw new Error("Unspecified route parameter "+n);return"/"+r(i)})):t}}},function(t,e,n){"use strict";var r=n(274),i=n(1175),o=n(1178),a=n(1179),s=n(1181),u={},l=["country","region","postcode","district","place","locality","neighborhood","address","poi","poi.landmark"];u.forwardGeocode=function(t){i.assertShape({query:i.required(i.string),mode:i.oneOf("mapbox.places","mapbox.places-permanent"),countries:i.arrayOf(i.string),proximity:i.coordinates,types:i.arrayOf(i.oneOf(l)),autocomplete:i.boolean,bbox:i.arrayOf(i.number),limit:i.number,language:i.arrayOf(i.string),routing:i.boolean})(t),t.mode=t.mode||"mapbox.places";var e=a(r({country:t.countries},o(t,["proximity","types","autocomplete","bbox","limit","language","routing"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:o(t,["mode","query"]),query:e})},u.reverseGeocode=function(t){i.assertShape({query:i.required(i.coordinates),mode:i.oneOf("mapbox.places","mapbox.places-permanent"),countries:i.arrayOf(i.string),types:i.arrayOf(i.oneOf(l)),bbox:i.arrayOf(i.number),limit:i.number,language:i.arrayOf(i.string),reverseMode:i.oneOf("distance","score"),routing:i.boolean})(t),t.mode=t.mode||"mapbox.places";var e=a(r({country:t.countries},o(t,["country","types","bbox","limit","language","reverseMode","routing"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:o(t,["mode","query"]),query:e})},t.exports=s(u)},function(t,e,n){"use strict";(function(e){var r=n(274),i=n(1176);t.exports=r(i,{file:function(t){if("undefined"!==typeof window){if(t instanceof e.Blob||t instanceof e.ArrayBuffer)return;return"Blob or ArrayBuffer"}if("string"!==typeof t&&void 0===t.pipe)return"Filename or Readable stream"},date:function(t){var e="date";if("boolean"===typeof t)return e;try{var n=new Date(t);if(n.getTime&&isNaN(n.getTime()))return e}catch(r){return e}},coordinates:function(t){return i.tuple(i.number,i.number)(t)},assertShape:function(t,e){return i.assert(i.strictShape(t),e)}})}).call(this,n(36))},function(t,e,n){"use strict";var r=n(1177),i=n(274),o="value",a="\n  ",s={};function u(t){var e=Array.isArray(t);return function(n){var r,i=l(s.plainArray,n);if(i)return i;if(e&&n.length!==t.length)return"an array with "+t.length+" items";for(var o=0;o<n.length;o++)if(i=l((r=o,e?t[r]:t),n[o]))return[o].concat(i)}}function l(t,e){if(null!=e||t.hasOwnProperty("__required")){var n=t(e);return n?Array.isArray(n)?n:[n]:void 0}}function c(t,e){var n=t.length,r=t[n-1],a=t.slice(0,n-1);return 0===a.length&&(a=[o]),e=i(e,{path:a}),"function"===typeof r?r(e):h(e,function(t){return"must be "+function(t){if(/^an? /.test(t))return t;if(/^[aeiou]/i.test(t))return"an "+t;if(/^[a-z]/i.test(t))return"a "+t;return t}(t)+"."}(r))}function f(t){return t.length<2?t[0]:2===t.length?t.join(" or "):t.slice(0,-1).join(", ")+", or "+t.slice(-1)}function h(t,e){return(p(t.path)?"Item at position ":"")+(t.path.join(".")+" "+e)}function p(t){return"number"==typeof t[t.length-1]||"number"==typeof t[0]}s.assert=function(t,e){return e=e||{},function(n){var r=l(t,n);if(r){var i=c(r,e);throw e.apiName&&(i=e.apiName+": "+i),new Error(i)}}},s.shape=function(t){var e,n=(e=t,Object.keys(e||{}).map((function(t){return{key:t,value:e[t]}})));return function(t){var e,r=l(s.plainObject,t);if(r)return r;for(var i=[],u=0;u<n.length;u++)e=n[u].key,(r=l(n[u].value,t[e]))&&i.push([e].concat(r));return i.length<2?i[0]:function(t){i=i.map((function(e){return"- "+e[0]+": "+c(e,t).split("\n").join(a)}));var e=t.path.join(".");return"The following properties"+(e===o?"":" of "+e)+" have invalid values:"+a+i.join(a)}}},s.strictShape=function(t){var e=s.shape(t);return function(n){var r=e(n);if(r)return r;var i=Object.keys(n).reduce((function(e,n){return void 0===t[n]&&e.push(n),e}),[]);return 0!==i.length?function(){return"The following keys are invalid: "+i.join(", ")}:void 0}},s.arrayOf=function(t){return u(t)},s.tuple=function(){var t=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return u(t)},s.required=function(t){function e(e){return null==e?function(t){return h(t,p(t.path)?"cannot be undefined/null.":"is required.")}:t.apply(this,arguments)}return e.__required=!0,e},s.oneOfType=function(){var t=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return function(e){var n=t.map((function(t){return l(t,e)})).filter(Boolean);if(n.length===t.length)return n.every((function(t){return 1===t.length&&"string"===typeof t[0]}))?f(n.map((function(t){return t[0]}))):n.reduce((function(t,e){return e.length>t.length?e:t}))}},s.equal=function(t){return function(e){if(e!==t)return JSON.stringify(t)}},s.oneOf=function(){var t=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),e=t.map((function(t){return s.equal(t)}));return s.oneOfType.apply(this,e)},s.range=function(t){var e=t[0],n=t[1];return function(t){if(l(s.number,t)||t<e||t>n)return"number between "+e+" & "+n+" (inclusive)"}},s.any=function(){},s.boolean=function(t){if("boolean"!==typeof t)return"boolean"},s.number=function(t){if("number"!==typeof t)return"number"},s.plainArray=function(t){if(!Array.isArray(t))return"array"},s.plainObject=function(t){if(!r(t))return"object"},s.string=function(t){if("string"!==typeof t)return"string"},s.func=function(t){if("function"!==typeof t)return"function"},s.validate=l,s.processMessage=c,t.exports=s},function(t,e,n){"use strict";var r=Object.prototype.toString;t.exports=function(t){var e;return"[object Object]"===r.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},function(t,e,n){"use strict";t.exports=function(t,e){var n=function(t,n){return-1!==e.indexOf(t)&&void 0!==n};return"function"===typeof e&&(n=e),Object.keys(t).filter((function(e){return n(e,t[e])})).reduce((function(e,n){return e[n]=t[n],e}),{})}},function(t,e,n){"use strict";var r=n(1180);t.exports=function(t){return r(t,(function(t,e){return"boolean"===typeof e?JSON.stringify(e):e}))}},function(t,e,n){"use strict";t.exports=function(t,e){return Object.keys(t).reduce((function(n,r){return n[r]=e(r,t[r]),n}),{})}},function(t,e,n){"use strict";var r=n(708),i=n(707);t.exports=function(t){return function(e){var n;n=r.prototype.isPrototypeOf(e)?e:i(e);var o=Object.create(t);return o.client=n,o}}},function(t,e,n){"use strict";var r=n(1183);function i(t){this.origin=t.origin||"https://api.mapbox.com",this.endpoint="events/v2",this.access_token=t.accessToken,this.version="0.2.0",this.sessionID=this.generateSessionID(),this.userAgent=this.getUserAgent(),this.options=t,this.send=this.send.bind(this),this.countries=t.countries?t.countries.split(","):null,this.types=t.types?t.types.split(","):null,this.bbox=t.bbox?t.bbox:null,this.language=t.language?t.language.split(","):null,this.limit=t.limit?+t.limit:null,this.locale=navigator.language||null,this.enableEventLogging=this.shouldEnableLogging(t),this.eventQueue=new Array,this.flushInterval=t.flushInterval||1e3,this.maxQueueSize=t.maxQueueSize||100,this.timer=this.flushInterval?setTimeout(this.flush.bind(this),this.flushInterval):null,this.lastSentInput="",this.lastSentIndex=0}i.prototype={select:function(t,e){var n=this.getSelectedIndex(t,e),r=this.getEventPayload("search.select",e);if(r.resultIndex=n,r.resultPlaceName=t.place_name,r.resultId=t.id,(n!==this.lastSentIndex||r.queryString!==this.lastSentInput)&&-1!=n&&(this.lastSentIndex=n,this.lastSentInput=r.queryString,r.queryString))return this.push(r)},start:function(t){var e=this.getEventPayload("search.start",t);if(e.queryString)return this.push(e)},keyevent:function(t,e){if(t.key&&!t.metaKey&&-1===[9,27,37,39,13,38,40].indexOf(t.keyCode)){var n=this.getEventPayload("search.keystroke",e);if(n.lastAction=t.key,n.queryString)return this.push(n)}},send:function(t,e){if(!this.enableEventLogging)return e?e():void 0;var n=this.getRequestOptions(t);this.request(n,function(t){return t?this.handleError(t,e):e?e():void 0}.bind(this))},getRequestOptions:function(t){return Array.isArray(t)||(t=[t]),{method:"POST",host:this.origin,path:this.endpoint+"?access_token="+this.access_token,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}},getEventPayload:function(t,e){var n;n=e.options.proximity?[e.options.proximity.longitude,e.options.proximity.latitude]:null;var r=e._map?e._map.getZoom():void 0,i={event:t,created:+new Date,sessionIdentifier:this.sessionID,country:this.countries,userAgent:this.userAgent,language:this.language,bbox:this.bbox,types:this.types,endpoint:"mapbox.places",proximity:n,limit:e.options.limit,mapZoom:r,keyboardLocale:this.locale};return"search.select"===t?i.queryString=e.inputString:"search.select"!=t&&e._inputEl?i.queryString=e._inputEl.value:i.queryString=e.inputString,i},request:function(t,e){var n=new XMLHttpRequest;for(var r in n.onreadystatechange=function(){if(4==this.readyState)return 204==this.status?e(null):e(this.statusText)},n.open(t.method,t.host+"/"+t.path,!0),t.headers){var i=t.headers[r];n.setRequestHeader(r,i)}n.send(t.body)},handleError:function(t,e){if(e)return e(t)},generateSessionID:function(){return r()},getUserAgent:function(){return"mapbox-gl-geocoder."+this.version+"."+navigator.userAgent},getSelectedIndex:function(t,e){if(e._typeahead){var n=e._typeahead.data,r=t.id;return n.map((function(t){return t.id})).indexOf(r)}},shouldEnableLogging:function(t){return!1!==t.enableEventLogging&&((!t.origin||-1!=t.origin.indexOf("api.mapbox.com"))&&(!t.localGeocoder&&!t.filter))},flush:function(){this.eventQueue.length>0&&(this.send(this.eventQueue),this.eventQueue=new Array),this.timer&&clearTimeout(this.timer),this.flushInterval&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))},push:function(t,e){this.eventQueue.push(t),(this.eventQueue.length>=this.maxQueueSize||e)&&this.flush()},remove:function(){this.flush()}},t.exports=i},function(t,e,n){for(var r=self.crypto||self.msCrypto,i="-_",o=36;o--;)i+=o.toString(36);for(o=36;o---10;)i+=o.toString(36).toUpperCase();t.exports=function(t){var e="",n=r.getRandomValues(new Uint8Array(t||21));for(o=t||21;o--;)e+=i[63&n[o]];return e}},function(t,e,n){"use strict";t.exports={placeholder:{de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"\u05dc\u05d7\u05e4\u05e9",ja:"\u30b5\u30fc\u30c1",lv:"Mekl\u0113t",pt:"Procurar",sr:"\u041f\u0440\u0435\u0442\u0440\u0430\u0433\u0430",zh:"\u641c\u7d22",cs:"Vyhled\xe1v\xe1n\xed",hu:"Keres\xe9s",ka:"\u10eb\u10d8\u10d4\u10d1\u10d0",nb:"S\xf8ke",sk:"Vyh\u013ead\xe1vanie",th:"\u0e04\u0e49\u0e19\u0e2b\u0e32",fi:"Hae",is:"Leita",ko:"\uc218\uc0c9",pl:"Szukaj",sl:"Iskanje",fa:"\u062c\u0633\u062a\u062c\u0648"}}},function(t,e,n){var r,i;r=this,i=function(){var t=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function e(e){return e.match(t)||[]}function n(t){return{language:(t=e(t))[1]||"",extlang:t[2]||"",script:t[3]||"",region:t[4]||""}}function r(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!0})}function i(t,i,o){function a(n){return e(n)[t]||""}r(a,"pattern",i),r(n,o,a)}return i(1,/^[a-zA-Z]{2,3}$/,"language"),i(2,/^[a-zA-Z]{3}$/,"extlang"),i(3,/^[a-zA-Z]{4}$/,"script"),i(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),r(n,"split",(function(t){return e(t).filter((function(t,e){return t&&e}))})),n},t.exports?t.exports=i():r.subtag=i()},function(t,e,n){(function(e){var r=n(0),i=n(128),o=n(1187),a=n(1189),s=n(710),u=n(1195),l={CLASS_NAME_ATTR:"data-react-class",PROPS_ATTR:"data-react-props",RENDER_ATTR:"data-hydrate",CACHE_ID_ATTR:"data-react-cache-id",TURBOLINKS_PERMANENT_ATTR:"data-turbolinks-permanent",jQuery:"undefined"!==typeof window&&"undefined"!==typeof e&&e,components:{},findDOMNodes:function(t){var e,n,r=l.CLASS_NAME_ATTR;switch(typeof t){case"undefined":e="["+r+"]",n=document;break;case"object":e="["+r+"]",n=t;break;case"string":e=t+"["+r+"], "+t+" ["+r+"]",n=document}return l.jQuery?l.jQuery(e,n):n.querySelectorAll(e)},getConstructor:s,useContext:function(t){this.getConstructor=u(t)},serverRender:function(t,e,n){var i=this.getConstructor(e),a=r.createElement(i,n);return o[t](a)},mountComponents:function(t){for(var e=l,n=e.findDOMNodes(t),o=0;o<n.length;++o){var a=n[o],s=a.getAttribute(e.CLASS_NAME_ATTR),u=e.getConstructor(s),c=a.getAttribute(e.PROPS_ATTR),f=c&&JSON.parse(c),h=a.getAttribute(e.RENDER_ATTR),p=a.getAttribute(e.CACHE_ID_ATTR),d=a.hasAttribute(e.TURBOLINKS_PERMANENT_ATTR);if(!u){var m="Cannot find component: '"+s+"'";throw console&&console.log&&console.log("%c[react-rails] %c"+m+" for element","font-weight: bold","",a),new Error(m+". Make sure your component is available to render.")}var g=this.components[p];void 0===g&&(g=r.createElement(u,f),d&&(this.components[p]=g)),g=h&&"function"===typeof i.hydrate?i.hydrate(g,a):i.render(g,a)}},unmountComponents:function(t){for(var e=l.findDOMNodes(t),n=0;n<e.length;++n){var r=e[n];i.unmountComponentAtNode(r)}},detectEvents:function(){a(this)},handleMount:function(t){var e=void 0;t&&t.target&&(e=t.target),l.mountComponents(e)},handleUnmount:function(t){var e=void 0;t&&t.target&&(e=t.target),l.unmountComponents(e)}};"undefined"!==typeof window&&l.detectEvents(),self.ReactRailsUJS=l,t.exports=l}).call(this,n(155))},function(t,e,n){"use strict";t.exports=n(1188)},function(t,e,n){"use strict";var r=n(259),i=n(0);function o(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a="function"===typeof Symbol&&Symbol.for,s=a?Symbol.for("react.portal"):60106,u=a?Symbol.for("react.fragment"):60107,l=a?Symbol.for("react.strict_mode"):60108,c=a?Symbol.for("react.profiler"):60114,f=a?Symbol.for("react.provider"):60109,h=a?Symbol.for("react.context"):60110,p=a?Symbol.for("react.concurrent_mode"):60111,d=a?Symbol.for("react.forward_ref"):60112,m=a?Symbol.for("react.suspense"):60113,g=a?Symbol.for("react.suspense_list"):60120,y=a?Symbol.for("react.memo"):60115,v=a?Symbol.for("react.lazy"):60116,b=a?Symbol.for("react.block"):60121,_=a?Symbol.for("react.fundamental"):60117,A=a?Symbol.for("react.scope"):60119;function w(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case u:return"Fragment";case s:return"Portal";case c:return"Profiler";case l:return"StrictMode";case m:return"Suspense";case g:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case h:return"Context.Consumer";case f:return"Context.Provider";case d:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case y:return w(t.type);case b:return w(t.render);case v:if(t=1===t._status?t._result:null)return w(t)}return null}var x=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;x.hasOwnProperty("ReactCurrentDispatcher")||(x.ReactCurrentDispatcher={current:null}),x.hasOwnProperty("ReactCurrentBatchConfig")||(x.ReactCurrentBatchConfig={suspense:null});var E={};function O(t,e){for(var n=0|t._threadCount;n<=e;n++)t[n]=t._currentValue2,t._threadCount=n+1}for(var S=new Uint16Array(16),P=0;15>P;P++)S[P]=P+1;S[15]=0;var C=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,T=Object.prototype.hasOwnProperty,k={},I={};function L(t){return!!T.call(I,t)||!T.call(k,t)&&(C.test(t)?I[t]=!0:(k[t]=!0,!1))}function j(t,e,n,r,i,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){M[t]=new j(t,0,!1,t,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];M[e]=new j(e,1,!1,t[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){M[t]=new j(t,2,!1,t.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){M[t]=new j(t,2,!1,t,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){M[t]=new j(t,3,!1,t.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(t){M[t]=new j(t,3,!0,t,null,!1)})),["capture","download"].forEach((function(t){M[t]=new j(t,4,!1,t,null,!1)})),["cols","rows","size","span"].forEach((function(t){M[t]=new j(t,6,!1,t,null,!1)})),["rowSpan","start"].forEach((function(t){M[t]=new j(t,5,!1,t.toLowerCase(),null,!1)}));var R=/[\-:]([a-z])/g;function N(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(R,N);M[e]=new j(e,1,!1,t,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(R,N);M[e]=new j(e,1,!1,t,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(R,N);M[e]=new j(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(t){M[t]=new j(t,1,!1,t.toLowerCase(),null,!1)})),M.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(t){M[t]=new j(t,1,!1,t.toLowerCase(),null,!0)}));var D=/["'&<>]/;function F(t){if("boolean"===typeof t||"number"===typeof t)return""+t;t=""+t;var e=D.exec(t);if(e){var n,r="",i=0;for(n=e.index;n<t.length;n++){switch(t.charCodeAt(n)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 39:e="&#x27;";break;case 60:e="&lt;";break;case 62:e="&gt;";break;default:continue}i!==n&&(r+=t.substring(i,n)),i=n+1,r+=e}t=i!==n?r+t.substring(i,n):r}return t}function B(t,e){var n,r=M.hasOwnProperty(t)?M[t]:null;return(n="style"!==t)&&(n=null!==r?0===r.type:2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])),n||function(t,e,n,r){if(null===e||"undefined"===typeof e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(t,e,r,!1)?"":null!==r?(t=r.attributeName,3===(n=r.type)||4===n&&!0===e?t+'=""':(r.sanitizeURL&&(e=""+e),t+'="'+F(e)+'"')):L(t)?t+'="'+F(e)+'"':""}var z="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},U=null,G=null,V=null,q=!1,H=!1,W=null,X=0;function Y(){if(null===U)throw Error(o(321));return U}function Z(){if(0<X)throw Error(o(312));return{memoizedState:null,queue:null,next:null}}function K(){return null===V?null===G?(q=!1,G=V=Z()):(q=!0,V=G):null===V.next?(q=!1,V=V.next=Z()):(q=!0,V=V.next),V}function $(t,e,n,r){for(;H;)H=!1,X+=1,V=null,n=t(e,r);return G=U=null,X=0,V=W=null,n}function J(t,e){return"function"===typeof e?e(t):e}function Q(t,e,n){if(U=Y(),V=K(),q){var r=V.queue;if(e=r.dispatch,null!==W&&void 0!==(n=W.get(r))){W.delete(r),r=V.memoizedState;do{r=t(r,n.action),n=n.next}while(null!==n);return V.memoizedState=r,[r,e]}return[V.memoizedState,e]}return t=t===J?"function"===typeof e?e():e:void 0!==n?n(e):e,V.memoizedState=t,t=(t=V.queue={last:null,dispatch:null}).dispatch=tt.bind(null,U,t),[V.memoizedState,t]}function tt(t,e,n){if(!(25>X))throw Error(o(301));if(t===U)if(H=!0,t={action:n,next:null},null===W&&(W=new Map),void 0===(n=W.get(e)))W.set(e,t);else{for(e=n;null!==e.next;)e=e.next;e.next=t}}function et(){}var nt=0,rt={readContext:function(t){var e=nt;return O(t,e),t[e]},useContext:function(t){Y();var e=nt;return O(t,e),t[e]},useMemo:function(t,e){if(U=Y(),e=void 0===e?null:e,null!==(V=K())){var n=V.memoizedState;if(null!==n&&null!==e){t:{var r=n[1];if(null===r)r=!1;else{for(var i=0;i<r.length&&i<e.length;i++)if(!z(e[i],r[i])){r=!1;break t}r=!0}}if(r)return n[0]}}return t=t(),V.memoizedState=[t,e],t},useReducer:Q,useRef:function(t){U=Y();var e=(V=K()).memoizedState;return null===e?(t={current:t},V.memoizedState=t):e},useState:function(t){return Q(J,t)},useLayoutEffect:function(){},useCallback:function(t){return t},useImperativeHandle:et,useEffect:et,useDebugValue:et,useResponder:function(t,e){return{props:e,responder:t}},useDeferredValue:function(t){return Y(),t},useTransition:function(){return Y(),[function(t){t()},!1]}},it="http://www.w3.org/1999/xhtml";function ot(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var at={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},st=r({menuitem:!0},at),ut={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lt=["Webkit","ms","Moz","O"];Object.keys(ut).forEach((function(t){lt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ut[e]=ut[t]}))}));var ct=/([A-Z])/g,ft=/^ms-/,ht=i.Children.toArray,pt=x.ReactCurrentDispatcher,dt={listing:!0,pre:!0,textarea:!0},mt=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,gt={},yt={};var vt=Object.prototype.hasOwnProperty,bt={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function _t(t,e){if(void 0===t)throw Error(o(152,w(e)||"Component"))}function At(t,e,n){function a(i,a){var s=a.prototype&&a.prototype.isReactComponent,u=function(t,e,n,r){if(r&&"object"===typeof(r=t.contextType)&&null!==r)return O(r,n),r[n];if(t=t.contextTypes){for(var i in n={},t)n[i]=e[i];e=n}else e=E;return e}(a,e,n,s),l=[],c=!1,f={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===l)return null},enqueueReplaceState:function(t,e){c=!0,l=[e]},enqueueSetState:function(t,e){if(null===l)return null;l.push(e)}};if(s){if(s=new a(i.props,u,f),"function"===typeof a.getDerivedStateFromProps){var h=a.getDerivedStateFromProps.call(null,i.props,s.state);null!=h&&(s.state=r({},s.state,h))}}else if(U={},s=a(i.props,u,f),null==(s=$(a,i.props,s,u))||null==s.render)return void _t(t=s,a);if(s.props=i.props,s.context=u,s.updater=f,void 0===(f=s.state)&&(s.state=f=null),"function"===typeof s.UNSAFE_componentWillMount||"function"===typeof s.componentWillMount)if("function"===typeof s.componentWillMount&&"function"!==typeof a.getDerivedStateFromProps&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&"function"!==typeof a.getDerivedStateFromProps&&s.UNSAFE_componentWillMount(),l.length){f=l;var p=c;if(l=null,c=!1,p&&1===f.length)s.state=f[0];else{h=p?f[0]:s.state;var d=!0;for(p=p?1:0;p<f.length;p++){var m=f[p];null!=(m="function"===typeof m?m.call(s,h,i.props,u):m)&&(d?(d=!1,h=r({},h,m)):r(h,m))}s.state=h}}else l=null;if(_t(t=s.render(),a),"function"===typeof s.getChildContext&&"object"===typeof(i=a.childContextTypes)){var g=s.getChildContext();for(var y in g)if(!(y in i))throw Error(o(108,w(a)||"Unknown",y))}g&&(e=r({},e,g))}for(;i.isValidElement(t);){var s=t,u=s.type;if("function"!==typeof u)break;a(s,u)}return{child:t,context:e}}var wt=function(){function t(t,e){i.isValidElement(t)?t.type!==u?t=[t]:(t=t.props.children,t=i.isValidElement(t)?[t]:ht(t)):t=ht(t),t={type:null,domNamespace:it,children:t,childIndex:0,context:E,footer:""};var n=S[0];if(0===n){var r=S,a=2*(n=r.length);if(!(65536>=a))throw Error(o(304));var s=new Uint16Array(a);for(s.set(r),(S=s)[0]=n+1,r=n;r<a-1;r++)S[r]=r+1;S[a-1]=0}else S[0]=S[n];this.threadID=n,this.stack=[t],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=e,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}var e=t.prototype;return e.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var t=this.threadID;S[t]=S[0],S[0]=t}},e.pushProvider=function(t){var e=++this.contextIndex,n=t.type._context,r=this.threadID;O(n,r);var i=n[r];this.contextStack[e]=n,this.contextValueStack[e]=i,n[r]=t.props.value},e.popProvider=function(){var t=this.contextIndex,e=this.contextStack[t],n=this.contextValueStack[t];this.contextStack[t]=null,this.contextValueStack[t]=null,this.contextIndex--,e[this.threadID]=n},e.clearProviders=function(){for(var t=this.contextIndex;0<=t;t--)this.contextStack[t][this.threadID]=this.contextValueStack[t]},e.read=function(t){if(this.exhausted)return null;var e=nt;nt=this.threadID;var n=pt.current;pt.current=rt;try{for(var r=[""],i=!1;r[0].length<t;){if(0===this.stack.length){this.exhausted=!0;var a=this.threadID;S[a]=S[0],S[0]=a;break}var s=this.stack[this.stack.length-1];if(i||s.childIndex>=s.children.length){var u=s.footer;if(""!==u&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===s.type)this.currentSelectValue=null;else if(null!=s.type&&null!=s.type.type&&s.type.type.$$typeof===f)this.popProvider(s.type);else if(s.type===m){this.suspenseDepth--;var l=r.pop();if(i){i=!1;var c=s.fallbackFrame;if(!c)throw Error(o(303));this.stack.push(c),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=l}r[this.suspenseDepth]+=u}else{var h=s.children[s.childIndex++],p="";try{p+=this.render(h,s.context,s.domNamespace)}catch(d){if(null!=d&&"function"===typeof d.then)throw Error(o(294));throw d}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=p}}return r[0]}finally{pt.current=n,nt=e}},e.render=function(t,e,n){if("string"===typeof t||"number"===typeof t)return""===(n=""+t)?"":this.makeStaticMarkup?F(n):this.previousWasTextNode?"\x3c!-- --\x3e"+F(n):(this.previousWasTextNode=!0,F(n));if(t=(e=At(t,e,this.threadID)).child,e=e.context,null===t||!1===t)return"";if(!i.isValidElement(t)){if(null!=t&&null!=t.$$typeof){if((n=t.$$typeof)===s)throw Error(o(257));throw Error(o(258,n.toString()))}return t=ht(t),this.stack.push({type:null,domNamespace:n,children:t,childIndex:0,context:e,footer:""}),""}var a=t.type;if("string"===typeof a)return this.renderDOM(t,e,n);switch(a){case l:case p:case c:case g:case u:return t=ht(t.props.children),this.stack.push({type:null,domNamespace:n,children:t,childIndex:0,context:e,footer:""}),"";case m:throw Error(o(294))}if("object"===typeof a&&null!==a)switch(a.$$typeof){case d:U={};var b=a.render(t.props,t.ref);return b=$(a.render,t.props,b,t.ref),b=ht(b),this.stack.push({type:null,domNamespace:n,children:b,childIndex:0,context:e,footer:""}),"";case y:return t=[i.createElement(a.type,r({ref:t.ref},t.props))],this.stack.push({type:null,domNamespace:n,children:t,childIndex:0,context:e,footer:""}),"";case f:return n={type:t,domNamespace:n,children:a=ht(t.props.children),childIndex:0,context:e,footer:""},this.pushProvider(t),this.stack.push(n),"";case h:a=t.type,b=t.props;var w=this.threadID;return O(a,w),a=ht(b.children(a[w])),this.stack.push({type:t,domNamespace:n,children:a,childIndex:0,context:e,footer:""}),"";case _:throw Error(o(338));case v:switch(function(t){if(-1===t._status){t._status=0;var e=t._ctor;e=e(),t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}}(a=t.type),a._status){case 1:return t=[i.createElement(a._result,r({ref:t.ref},t.props))],this.stack.push({type:null,domNamespace:n,children:t,childIndex:0,context:e,footer:""}),"";case 2:throw a._result;default:throw Error(o(295))}case A:throw Error(o(343))}throw Error(o(130,null==a?a:typeof a,""))},e.renderDOM=function(t,e,n){var a=t.type.toLowerCase();if(n===it&&ot(a),!gt.hasOwnProperty(a)){if(!mt.test(a))throw Error(o(65,a));gt[a]=!0}var s=t.props;if("input"===a)s=r({type:void 0},s,{defaultChecked:void 0,defaultValue:void 0,value:null!=s.value?s.value:s.defaultValue,checked:null!=s.checked?s.checked:s.defaultChecked});else if("textarea"===a){var u=s.value;if(null==u){u=s.defaultValue;var l=s.children;if(null!=l){if(null!=u)throw Error(o(92));if(Array.isArray(l)){if(!(1>=l.length))throw Error(o(93));l=l[0]}u=""+l}null==u&&(u="")}s=r({},s,{value:void 0,children:""+u})}else if("select"===a)this.currentSelectValue=null!=s.value?s.value:s.defaultValue,s=r({},s,{value:void 0});else if("option"===a){l=this.currentSelectValue;var c=function(t){if(void 0===t||null===t)return t;var e="";return i.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(s.children);if(null!=l){var f=null!=s.value?s.value+"":c;if(u=!1,Array.isArray(l)){for(var h=0;h<l.length;h++)if(""+l[h]===f){u=!0;break}}else u=""+l===f;s=r({selected:void 0,children:void 0},s,{selected:u,children:c})}}if(u=s){if(st[a]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(o(137,a,""));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(o(60));if("object"!==typeof u.dangerouslySetInnerHTML||!("__html"in u.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=u.style&&"object"!==typeof u.style)throw Error(o(62,""))}for(_ in u=s,l=this.makeStaticMarkup,c=1===this.stack.length,f="<"+t.type,u)if(vt.call(u,_)){var p=u[_];if(null!=p){if("style"===_){h=void 0;var d="",m="";for(h in p)if(p.hasOwnProperty(h)){var g=0===h.indexOf("--"),y=p[h];if(null!=y){if(g)var v=h;else if(v=h,yt.hasOwnProperty(v))v=yt[v];else{var b=v.replace(ct,"-$1").toLowerCase().replace(ft,"-ms-");v=yt[v]=b}d+=m+v+":",m=h,d+=g=null==y||"boolean"===typeof y||""===y?"":g||"number"!==typeof y||0===y||ut.hasOwnProperty(m)&&ut[m]?(""+y).trim():y+"px",m=";"}}p=d||null}h=null;t:if(g=a,y=u,-1===g.indexOf("-"))g="string"===typeof y.is;else switch(g){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":g=!1;break t;default:g=!0}g?bt.hasOwnProperty(_)||(h=L(h=_)&&null!=p?h+'="'+F(p)+'"':""):h=B(_,p),h&&(f+=" "+h)}}l||c&&(f+=' data-reactroot=""');var _=f;u="",at.hasOwnProperty(a)?_+="/>":(_+=">",u="</"+t.type+">");t:{if(null!=(l=s.dangerouslySetInnerHTML)){if(null!=l.__html){l=l.__html;break t}}else if("string"===typeof(l=s.children)||"number"===typeof l){l=F(l);break t}l=null}return null!=l?(s=[],dt.hasOwnProperty(a)&&"\n"===l.charAt(0)&&(_+="\n"),_+=l):s=ht(s.children),t=t.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ot(t):"http://www.w3.org/2000/svg"===n&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:a,children:s,childIndex:0,context:e,footer:u}),this.previousWasTextNode=!1,_},t}(),xt={renderToString:function(t){t=new wt(t,!1);try{return t.read(1/0)}finally{t.destroy()}},renderToStaticMarkup:function(t){t=new wt(t,!0);try{return t.read(1/0)}finally{t.destroy()}},renderToNodeStream:function(){throw Error(o(207))},renderToStaticNodeStream:function(){throw Error(o(208))},version:"16.13.1"};t.exports=xt.default||xt},function(t,e,n){(function(e){var r=n(1190),i=n(1191),o=n(1192),a=n(1193),s=n(1194);t.exports=function(t){t.handleEvent&&("undefined"!==typeof Turbolinks&&"undefined"!==typeof Turbolinks.EVENTS&&s.teardown(t),o.teardown(t),a.teardown(t),i.teardown(t),r.teardown(t)),"addEventListener"in window?(t.handleEvent=function(t,e){document.addEventListener(t,e)},t.removeEvent=function(t,e){document.removeEventListener(t,e)}):(t.handleEvent=function(t,e){window.attachEvent(t,e)},t.removeEvent=function(t,e){window.detachEvent(t,e)}),"undefined"!==typeof Turbolinks&&Turbolinks.supported?"undefined"!==typeof Turbolinks.EVENTS?s.setup(t):"undefined"!==typeof Turbolinks.controller?o.setup(t):a.setup(t):"undefined"!==typeof e&&"function"===typeof e.pjax?i.setup(t):r.setup(t)}}).call(this,n(155))},function(t,e){t.exports={setup:function(t){"addEventListener"in window?t.handleEvent("DOMContentLoaded",t.handleMount):t.handleEvent("onload",t.handleMount)},teardown:function(t){t.removeEvent("DOMContentLoaded",t.handleMount),t.removeEvent("onload",t.handleMount)}}},function(t,e){t.exports={setup:function(t){t.handleEvent("ready",t.handleMount),t.handleEvent("pjax:end",t.handleMount),t.handleEvent("pjax:beforeReplace",t.handleUnmount)},teardown:function(t){t.removeEvent("ready",t.handleMount),t.removeEvent("pjax:end",t.handleMount),t.removeEvent("pjax:beforeReplace",t.handleUnmount)}}},function(t,e){t.exports={setup:function(t){t.handleEvent("turbolinks:load",t.handleMount),t.handleEvent("turbolinks:before-render",t.handleUnmount)},teardown:function(t){t.removeEvent("turbolinks:load",t.handleMount),t.removeEvent("turbolinks:before-render",t.handleUnmount)}}},function(t,e){t.exports={setup:function(t){Turbolinks.pagesCached(0),t.handleEvent("page:change",t.handleMount),t.handleEvent("page:receive",t.handleUnmount)},teardown:function(t){t.removeEvent("page:change",t.handleMount),t.removeEvent("page:receive",t.handleUnmount)}}},function(t,e){t.exports={setup:function(t){t.handleEvent(Turbolinks.EVENTS.CHANGE,t.handleMount),t.handleEvent(Turbolinks.EVENTS.BEFORE_UNLOAD,t.handleUnmount)},teardown:function(t){t.removeEvent(Turbolinks.EVENTS.CHANGE,t.handleMount),t.removeEvent(Turbolinks.EVENTS.BEFORE_UNLOAD,t.handleUnmount)}}},function(t,e,n){var r=n(710),i=n(1196);t.exports=function(t){var e=i(t);return function(t){var n;try{n=e(t)}catch(i){try{n=r(t)}catch(o){console.error(i),console.error(o)}}return n}}},function(t,e){t.exports=function(t){return function(e){var n=e.split("."),r=n.shift(),i=n,o=t("./"+r);return i.forEach((function(t){o=o[t]})),o.__esModule&&(o=o.default),o}}},function(t,e,n){var r={"./autocomplete_controller.js":861,"./content_modules_controller.js":862,"./dropzone_controller.js":988,"./easy_module_picker_controller.js":863,"./feature_list_controller.js":864,"./flash_controller.js":865,"./map_content_grid_controller.js":866,"./menu_items_controller.js":867,"./nested_form_controller.js":868,"./quill_editor_controller.js":869,"./quill_viewer_controller.js":870,"./responsive_navigation_controller.js":871,"./site_preview_controller.js":872,"./sortable_controller.js":873,"./sortable_tree_controller.js":874,"./tenant_slug_controller.js":875,"./tenant_user_permissions_controller.js":876};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=1197},function(t,e,n){},function(t,e,n){var r;window,t.exports=(r=n(214),function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){t.exports=function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:a,create:s}=Object,{apply:u,construct:l}="undefined"!=typeof Reflect&&Reflect;u||(u=function(t,e,n){return t.apply(e,n)}),o||(o=function(t){return t}),a||(a=function(t){return t}),l||(l=function(t,e){return new t(...e)});const c=w(Array.prototype.forEach),f=w(Array.prototype.pop),h=w(Array.prototype.push),p=w(String.prototype.toLowerCase),d=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),v=w(String.prototype.trim),b=w(RegExp.prototype.test),_=(A=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(A,e)});var A;function w(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function x(t,r,i){var o;i=null!==(o=i)&&void 0!==o?o:p,e&&e(t,null);let a=r.length;for(;a--;){let e=r[a];if("string"==typeof e){const t=i(e);t!==e&&(n(r)||(r[a]=t),e=t)}t[e]=!0}return t}function E(e){const n=s(null);for(const[r,i]of t(e))n[r]=i;return n}function O(t,e){for(;null!==t;){const n=i(t,e);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}t=r(t)}return function(t){return console.warn("fallback value for",t),null}}const S=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),P=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),L=o(["#text"]),j=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),R=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),N=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),U=a(/^aria-[\-\w]+$/),G=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H=a(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:D,ERB_EXPR:F,TMPLIT_EXPR:B,DATA_ATTR:z,ARIA_ATTR:U,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:q,DOCTYPE_NAME:H});const X=()=>"undefined"==typeof window?null:window,Y=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;e&&e.hasAttribute("data-tt-policy-suffix")&&(n=e.getAttribute("data-tt-policy-suffix"));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const r=t=>e(t);if(r.version="3.0.5",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;const i=n.document,a=i.currentScript;let{document:s}=n;const{DocumentFragment:u,HTMLTemplateElement:l,Node:A,Element:w,NodeFilter:D,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:z,trustedTypes:U}=n,V=w.prototype,q=O(V,"cloneNode"),Z=O(V,"nextSibling"),K=O(V,"childNodes"),$=O(V,"parentNode");if("function"==typeof l){const t=s.createElement("template");t.content&&t.content.ownerDocument&&(s=t.content.ownerDocument)}let J,Q="";const{implementation:tt,createNodeIterator:et,createDocumentFragment:nt,getElementsByTagName:rt}=s,{importNode:it}=i;let ot={};r.isSupported="function"==typeof t&&"function"==typeof $&&tt&&void 0!==tt.createHTMLDocument;const{MUSTACHE_EXPR:at,ERB_EXPR:st,TMPLIT_EXPR:ut,DATA_ATTR:lt,ARIA_ATTR:ct,IS_SCRIPT_OR_DATA:ft,ATTR_WHITESPACE:ht}=W;let{IS_ALLOWED_URI:pt}=W,dt=null;const mt=x({},[...S,...P,...C,...k,...L]);let gt=null;const yt=x({},[...j,...M,...R,...N]);let vt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bt=null,_t=null,At=!0,wt=!0,xt=!1,Et=!0,Ot=!1,St=!1,Pt=!1,Ct=!1,Tt=!1,kt=!1,It=!1,Lt=!0,jt=!1;const Mt="user-content-";let Rt=!0,Nt=!1,Dt={},Ft=null;const Bt=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let zt=null;const Ut=x({},["audio","video","img","source","image","track"]);let Gt=null;const Vt=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qt="http://www.w3.org/1998/Math/MathML",Ht="http://www.w3.org/2000/svg",Wt="http://www.w3.org/1999/xhtml";let Xt=Wt,Yt=!1,Zt=null;const Kt=x({},[qt,Ht,Wt],d);let $t;const Jt=["application/xhtml+xml","text/html"],Qt="text/html";let te,ee=null;const ne=s.createElement("form"),re=function(t){return t instanceof RegExp||t instanceof Function},ie=function(t){if(!ee||ee!==t){if(t&&"object"==typeof t||(t={}),t=E(t),$t=$t=-1===Jt.indexOf(t.PARSER_MEDIA_TYPE)?Qt:t.PARSER_MEDIA_TYPE,te="application/xhtml+xml"===$t?d:p,dt="ALLOWED_TAGS"in t?x({},t.ALLOWED_TAGS,te):mt,gt="ALLOWED_ATTR"in t?x({},t.ALLOWED_ATTR,te):yt,Zt="ALLOWED_NAMESPACES"in t?x({},t.ALLOWED_NAMESPACES,d):Kt,Gt="ADD_URI_SAFE_ATTR"in t?x(E(Vt),t.ADD_URI_SAFE_ATTR,te):Vt,zt="ADD_DATA_URI_TAGS"in t?x(E(Ut),t.ADD_DATA_URI_TAGS,te):Ut,Ft="FORBID_CONTENTS"in t?x({},t.FORBID_CONTENTS,te):Bt,bt="FORBID_TAGS"in t?x({},t.FORBID_TAGS,te):{},_t="FORBID_ATTR"in t?x({},t.FORBID_ATTR,te):{},Dt="USE_PROFILES"in t&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,wt=!1!==t.ALLOW_DATA_ATTR,xt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ot=t.SAFE_FOR_TEMPLATES||!1,St=t.WHOLE_DOCUMENT||!1,Tt=t.RETURN_DOM||!1,kt=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,Ct=t.FORCE_BODY||!1,Lt=!1!==t.SANITIZE_DOM,jt=t.SANITIZE_NAMED_PROPS||!1,Rt=!1!==t.KEEP_CONTENT,Nt=t.IN_PLACE||!1,pt=t.ALLOWED_URI_REGEXP||G,Xt=t.NAMESPACE||Wt,vt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&re(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&re(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ot&&(wt=!1),kt&&(Tt=!0),Dt&&(dt=x({},[...L]),gt=[],!0===Dt.html&&(x(dt,S),x(gt,j)),!0===Dt.svg&&(x(dt,P),x(gt,M),x(gt,N)),!0===Dt.svgFilters&&(x(dt,C),x(gt,M),x(gt,N)),!0===Dt.mathMl&&(x(dt,k),x(gt,R),x(gt,N))),t.ADD_TAGS&&(dt===mt&&(dt=E(dt)),x(dt,t.ADD_TAGS,te)),t.ADD_ATTR&&(gt===yt&&(gt=E(gt)),x(gt,t.ADD_ATTR,te)),t.ADD_URI_SAFE_ATTR&&x(Gt,t.ADD_URI_SAFE_ATTR,te),t.FORBID_CONTENTS&&(Ft===Bt&&(Ft=E(Ft)),x(Ft,t.FORBID_CONTENTS,te)),Rt&&(dt["#text"]=!0),St&&x(dt,["html","head","body"]),dt.table&&(x(dt,["tbody"]),delete bt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=t.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=Y(U,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));o&&o(t),ee=t}},oe=x({},["mi","mo","mn","ms","mtext"]),ae=x({},["foreignobject","desc","title","annotation-xml"]),se=x({},["title","style","font","a","script"]),ue=x({},P);x(ue,C),x(ue,T);const le=x({},k);x(le,I);const ce=function(t){let e=$(t);e&&e.tagName||(e={namespaceURI:Xt,tagName:"template"});const n=p(t.tagName),r=p(e.tagName);return!!Zt[t.namespaceURI]&&(t.namespaceURI===Ht?e.namespaceURI===Wt?"svg"===n:e.namespaceURI===qt?"svg"===n&&("annotation-xml"===r||oe[r]):Boolean(ue[n]):t.namespaceURI===qt?e.namespaceURI===Wt?"math"===n:e.namespaceURI===Ht?"math"===n&&ae[r]:Boolean(le[n]):t.namespaceURI===Wt?!(e.namespaceURI===Ht&&!ae[r])&&!(e.namespaceURI===qt&&!oe[r])&&!le[n]&&(se[n]||!ue[n]):!("application/xhtml+xml"!==$t||!Zt[t.namespaceURI]))},fe=function(t){h(r.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},he=function(t,e){try{h(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){h(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!gt[t])if(Tt||kt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pe=function(t){let e,n;if(Ct)t="<remove></remove>"+t;else{const e=m(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===$t&&Xt===Wt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=J?J.createHTML(t):t;if(Xt===Wt)try{e=(new z).parseFromString(r,$t)}catch(t){}if(!e||!e.documentElement){e=tt.createDocument(Xt,"template",null);try{e.documentElement.innerHTML=Yt?Q:r}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),Xt===Wt?rt.call(e,St?"html":"body")[0]:St?e.documentElement:i},de=function(t){return et.call(t.ownerDocument||t,t,D.SHOW_ELEMENT|D.SHOW_COMMENT|D.SHOW_TEXT,null,!1)},me=function(t){return t instanceof B&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof F)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ge=function(t){return"object"==typeof A?t instanceof A:t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ye=function(t,e,n){ot[t]&&c(ot[t],(t=>{t.call(r,e,n,ee)}))},ve=function(t){let e;if(ye("beforeSanitizeElements",t,null),me(t))return fe(t),!0;const n=te(t.nodeName);if(ye("uponSanitizeElement",t,{tagName:n,allowedTags:dt}),t.hasChildNodes()&&!ge(t.firstElementChild)&&(!ge(t.content)||!ge(t.content.firstElementChild))&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return fe(t),!0;if(!dt[n]||bt[n]){if(!bt[n]&&_e(n)){if(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,n))return!1;if(vt.tagNameCheck instanceof Function&&vt.tagNameCheck(n))return!1}if(Rt&&!Ft[n]){const e=$(t)||t.parentNode,n=K(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r)e.insertBefore(q(n[r],!0),Z(t))}return fe(t),!0}return t instanceof w&&!ce(t)?(fe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ot&&3===t.nodeType&&(e=t.textContent,e=g(e,at," "),e=g(e,st," "),e=g(e,ut," "),t.textContent!==e&&(h(r.removed,{element:t.cloneNode()}),t.textContent=e)),ye("afterSanitizeElements",t,null),!1):(fe(t),!0)},be=function(t,e,n){if(Lt&&("id"===e||"name"===e)&&(n in s||n in ne))return!1;if(wt&&!_t[e]&&b(lt,e));else if(At&&b(ct,e));else if(!gt[e]||_t[e]){if(!(_e(t)&&(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,t)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(t))&&(vt.attributeNameCheck instanceof RegExp&&b(vt.attributeNameCheck,e)||vt.attributeNameCheck instanceof Function&&vt.attributeNameCheck(e))||"is"===e&&vt.allowCustomizedBuiltInElements&&(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,n)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(n))))return!1}else if(Gt[e]);else if(b(pt,g(n,ht,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(n,"data:")||!zt[t])if(xt&&!b(ft,g(n,ht,"")));else if(n)return!1;return!0},_e=function(t){return t.indexOf("-")>0},Ae=function(t){let e,n,i,o;ye("beforeSanitizeAttributes",t,null);const{attributes:a}=t;if(!a)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:gt};for(o=a.length;o--;){e=a[o];const{name:u,namespaceURI:l}=e;if(n="value"===u?e.value:v(e.value),i=te(u),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,ye("uponSanitizeAttribute",t,s),n=s.attrValue,s.forceKeepAttr)continue;if(he(u,t),!s.keepAttr)continue;if(!Et&&b(/\/>/i,n)){he(u,t);continue}Ot&&(n=g(n,at," "),n=g(n,st," "),n=g(n,ut," "));const c=te(t.nodeName);if(be(c,i,n)){if(!jt||"id"!==i&&"name"!==i||(he(u,t),n=Mt+n),J&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(l);else switch(U.getAttributeType(c,i)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{l?t.setAttributeNS(l,u,n):t.setAttribute(u,n),f(r.removed)}catch(t){}}}ye("afterSanitizeAttributes",t,null)},we=function t(e){let n;const r=de(e);for(ye("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)ye("uponSanitizeShadowNode",n,null),ve(n)||(n.content instanceof u&&t(n.content),Ae(n));ye("afterSanitizeShadowDOM",e,null)};return r.sanitize=function(t){let e,n,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Yt=!t,Yt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ge(t)){if("function"!=typeof t.toString)throw _("toString is not a function");if("string"!=typeof(t=t.toString()))throw _("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Pt||ie(s),r.removed=[],"string"==typeof t&&(Nt=!1),Nt){if(t.nodeName){const e=te(t.nodeName);if(!dt[e]||bt[e])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof A)e=pe("\x3c!----\x3e"),n=e.ownerDocument.importNode(t,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?e=n:e.appendChild(n);else{if(!Tt&&!Ot&&!St&&-1===t.indexOf("<"))return J&&It?J.createHTML(t):t;if(e=pe(t),!e)return Tt?null:It?Q:""}e&&Ct&&fe(e.firstChild);const l=de(Nt?t:e);for(;o=l.nextNode();)ve(o)||(o.content instanceof u&&we(o.content),Ae(o));if(Nt)return t;if(Tt){if(kt)for(a=nt.call(e.ownerDocument);e.firstChild;)a.appendChild(e.firstChild);else a=e;return(gt.shadowroot||gt.shadowrootmode)&&(a=it.call(i,a,!0)),a}let c=St?e.outerHTML:e.innerHTML;return St&&dt["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&b(H,e.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+e.ownerDocument.doctype.name+">\n"+c),Ot&&(c=g(c,at," "),c=g(c,st," "),c=g(c,ut," ")),J&&It?J.createHTML(c):c},r.setConfig=function(t){ie(t),Pt=!0},r.clearConfig=function(){ee=null,Pt=!1},r.isValidAttribute=function(t,e,n){ee||ie({});const r=te(t),i=te(e);return be(r,i,n)},r.addHook=function(t,e){"function"==typeof e&&(ot[t]=ot[t]||[],h(ot[t],e))},r.removeHook=function(t){if(ot[t])return f(ot[t])},r.removeHooks=function(t){ot[t]&&(ot[t]=[])},r.removeAllHooks=function(){ot={}},r}()}()},function(t,e){t.exports=r},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(0),a=n.n(o);function s(t){return(s="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 u(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 l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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}function f(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 h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=m(t);if(e){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=i.a.import("modules/clipboard"),y=i.a.import("delta"),v=function(t){!function(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&&h(t,e)}(s,t);var e,n,r,o=p(s);function s(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=o.call(this,t,e)).allowed=e.allowed,n.keepSelection=e.keepSelection,n.substituteBlockElements=e.substituteBlockElements,n.magicPasteLinks=e.magicPasteLinks,n.hooks=e.hooks,n}return e=s,(n=[{key:"onPaste",value:function(t){var e=this;t.preventDefault();var n,r,o,s,u,l=this.quill.getSelection();t.clipboardData&&t.clipboardData.getData||!window.clipboardData||!window.clipboardData.getData?(n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("text/html"),o=null===(s=t.clipboardData)||void 0===s||null===(u=s.items)||void 0===u?void 0:u[0]):n=window.clipboardData.getData("Text");var c=(new y).retain(l.index).delete(l.length),f=this.getDOMPurifyOptions(),h=!1,p=n;if(!r&&f.ALLOWED_TAGS.includes("a")&&this.isURL(n)&&l.length>0&&this.magicPasteLinks)p=this.quill.getText(l.index,l.length),c=c.insert(p,{link:n});else if(!r&&f.ALLOWED_TAGS.includes("img")&&o&&"file"===o.kind&&o.type.match(/^image\//i)){var d=o.getAsFile(),m=new FileReader;m.onload=function(t){e.quill.insertEmbed(l.index,"image",t.target.result),e.keepSelection||e.quill.setSelection(l.index+1)},m.readAsDataURL(d)}else{var g,v,b,_,A,w,x,E,O;r||(h=!0,r=p),"function"==typeof(null===(g=this.hooks)||void 0===g?void 0:g.beforeSanitizeElements)&&a.a.addHook("beforeSanitizeElements",this.hooks.beforeSanitizeElements),"function"==typeof(null===(v=this.hooks)||void 0===v?void 0:v.uponSanitizeElement)&&a.a.addHook("uponSanitizeElement",this.hooks.uponSanitizeElement),"function"==typeof(null===(b=this.hooks)||void 0===b?void 0:b.afterSanitizeElements)&&a.a.addHook("afterSanitizeElements",this.hooks.afterSanitizeElements),"function"==typeof(null===(_=this.hooks)||void 0===_?void 0:_.beforeSanitizeAttributes)&&a.a.addHook("beforeSanitizeAttributes",this.hooks.beforeSanitizeAttributes),"function"==typeof(null===(A=this.hooks)||void 0===A?void 0:A.uponSanitizeAttribute)&&a.a.addHook("uponSanitizeAttribute",this.hooks.uponSanitizeAttribute),"function"==typeof(null===(w=this.hooks)||void 0===w?void 0:w.afterSanitizeAttributes)&&a.a.addHook("afterSanitizeAttributes",this.hooks.afterSanitizeAttributes),"function"==typeof(null===(x=this.hooks)||void 0===x?void 0:x.beforeSanitizeShadowDOM)&&a.a.addHook("beforeSanitizeShadowDOM",this.hooks.beforeSanitizeShadowDOM),"function"==typeof(null===(E=this.hooks)||void 0===E?void 0:E.uponSanitizeShadowNode)&&a.a.addHook("uponSanitizeShadowNode",this.hooks.uponSanitizeShadowNode),"function"==typeof(null===(O=this.hooks)||void 0===O?void 0:O.afterSanitizeShadowDOM)&&a.a.addHook("afterSanitizeShadowDOM",this.hooks.afterSanitizeShadowDOM),h?(p=a.a.sanitize(r,f),c=c.insert(p)):(p=!1!==this.substituteBlockElements?(r=this.substitute(r,f)).innerHTML:a.a.sanitize(r,f),c=c.concat(this.convert(p)))}this.quill.updateContents(c,i.a.sources.USER),h||(c=this.convert(p)),this.keepSelection?this.quill.setSelection(l.index,c.length(),i.a.sources.SILENT):this.quill.setSelection(l.index+c.length(),i.a.sources.SILENT),this.quill.scrollIntoView(),a.a.removeAllHooks()}},{key:"getDOMPurifyOptions",value:function(){var t,e,n={};if(null!==(t=this.allowed)&&void 0!==t&&t.tags&&(n.ALLOWED_TAGS=this.allowed.tags),null!==(e=this.allowed)&&void 0!==e&&e.attributes&&(n.ALLOWED_ATTR=this.allowed.attributes),void 0===n.ALLOWED_TAGS||void 0===n.ALLOWED_ATTR){var r,i=!1;void 0===n.ALLOWED_TAGS&&(i=!0,n.ALLOWED_TAGS=["p","br","span"]);var o=!1;void 0===n.ALLOWED_ATTR&&(o=!0,n.ALLOWED_ATTR=["class"]);var a=this.quill.getModule("toolbar");null==a||null===(r=a.controls)||void 0===r||r.forEach((function(t){switch(t[0]){case"bold":i&&(n.ALLOWED_TAGS.push("b"),n.ALLOWED_TAGS.push("strong"));break;case"italic":i&&(n.ALLOWED_TAGS.push("i"),n.ALLOWED_TAGS.push("em"));break;case"underline":i&&n.ALLOWED_TAGS.push("u");break;case"strike":i&&n.ALLOWED_TAGS.push("s");break;case"color":case"background":o&&n.ALLOWED_ATTR.push("style");break;case"script":i&&("super"===t[1].value?n.ALLOWED_TAGS.push("sup"):"sub"===t[1].value&&n.ALLOWED_TAGS.push("sub"));break;case"header":if(i){var e=function(t){"1"===t?n.ALLOWED_TAGS.push("h1"):"2"===t?n.ALLOWED_TAGS.push("h2"):"3"===t?n.ALLOWED_TAGS.push("h3"):"4"===t?n.ALLOWED_TAGS.push("h4"):"5"===t?n.ALLOWED_TAGS.push("h5"):"6"===t&&n.ALLOWED_TAGS.push("h6")};t[1].value?e(t[1].value):t[1].options&&t[1].options.length&&[].forEach.call(t[1].options,(function(t){t.value&&e(t.value)}))}break;case"code-block":i&&n.ALLOWED_TAGS.push("pre"),o&&n.ALLOWED_ATTR.push("spellcheck");break;case"list":i&&("ordered"===t[1].value?n.ALLOWED_TAGS.push("ol"):"bullet"===t[1].value&&n.ALLOWED_TAGS.push("ul"),n.ALLOWED_TAGS.push("li"));break;case"link":i&&n.ALLOWED_TAGS.push("a"),o&&(n.ALLOWED_ATTR.push("href"),n.ALLOWED_ATTR.push("target"),n.ALLOWED_ATTR.push("rel"));break;case"image":i&&n.ALLOWED_TAGS.push("img"),o&&(n.ALLOWED_ATTR.push("src"),n.ALLOWED_ATTR.push("title"),n.ALLOWED_ATTR.push("alt"));break;case"video":i&&n.ALLOWED_TAGS.push("iframe"),o&&(n.ALLOWED_ATTR.push("frameborder"),n.ALLOWED_ATTR.push("allowfullscreen"),n.ALLOWED_ATTR.push("src"));break;case"blockquote":i&&n.ALLOWED_TAGS.push(t[0])}}))}return n}},{key:"substitute",value:function(t,e){var n,r=["h1","h2","h3","h4","h5","h6"],i=["p","div","section","article","fieldset","address","aside","blockquote","canvas","dl","figcaption","figure","footer","form","header","main","nav","noscript","ol","pre","table","tfoot","ul","video"],o=["li","dt","dd","hr"];a.a.addHook("uponSanitizeElement",(function(t,a,s){for(var u=0;!n&&u<3;)e.ALLOWED_TAGS.includes(i[u])&&(n=i[u]),++u;if(n&&t.tagName&&!e.ALLOWED_TAGS.includes(t.tagName.toLowerCase())){var l=t.tagName.toLowerCase();r.includes(l)?t.innerHTML="<".concat(n,"><b>").concat(t.innerHTML,"</b></").concat(n,">"):i.includes(l)?t.innerHTML="<".concat(n,">").concat(t.innerHTML,"</").concat(n,">"):o.includes(l)&&(t.innerHTML="".concat(t.innerHTML,"<br>"))}})),t=a.a.sanitize(t,l(l({},e),{RETURN_DOM:!0,WHOLE_DOCUMENT:!1})),a.a.removeAllHooks();var s,u=function(t){var e=document.createElement(t.tagName.toLowerCase()),n=t.attributes;return n.length&&Array.from(n).forEach((function(t){return e.setAttribute(t.nodeName,t.value)})),e},c=0,f=document.createElement("body");return function t(e,n){for(n(e,c),e=c<=1?e.firstChild:void 0;e;)++c,t(e,n),e=e.nextSibling;--c}(t,(function(t,e){if(1===e)if(t.tagName&&i.includes(t.tagName.toLowerCase())){s&&(s=void 0);var r=u(t);r.innerHTML=t.innerHTML,f.appendChild(r)}else if(void 0===s&&(s=document.createElement(n),f.appendChild(s)),t.tagName){var o=u(t);t.innerHTML&&(o.innerHTML=t.innerHTML),s.appendChild(o)}else{var a=document.createTextNode(t.textContent);s.appendChild(a)}})),f}},{key:"isURL",value:function(t){return!!/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:(?![\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])*)?$/i.test(t)}}])&&f(e.prototype,n),r&&f(e,r),s}(g);i.a.register("modules/clipboard",v,!0),e.default=v}]))},,function(t,e){var n="undefined"!==typeof self?self:this,r=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,a="ArrayBuffer"in t;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function c(t){return"string"!==typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function m(t){var e=new FileReader,n=d(e);return e.readAsArrayBuffer(t),n}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"===typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=g(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var t,e,n,r=p(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=d(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=l(t),e=c(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},h.prototype.delete=function(t){delete this.map[l(t)]},h.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},h.prototype.set=function(t,e){this.map[l(t)]=c(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),f(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),f(t)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t,e){var n,r,i=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),v.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function A(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},A.error=function(){var t=new A(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];A.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new A(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(E){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function x(t,n){return new Promise((function(r,o){var a=new b(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new A(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send("undefined"===typeof a._bodyInit?null:a._bodyInit)}))}x.polyfill=!0,t.fetch||(t.fetch=x,t.Headers=h,t.Request=b,t.Response=A),e.Headers=h,e.Request=b,e.Response=A,e.fetch=x,Object.defineProperty(e,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1203),o=r(n(1204)),a=function(t){return i.isExtractableFile(t)||null!==t&&"object"===typeof t&&"function"===typeof t.pipe};e.default=function(t,e){var n=i.extractFiles({query:t,variables:e},"",a),r=n.clone,s=n.files;if(0===s.size)return JSON.stringify(r);var u=new("undefined"===typeof FormData?o.default:FormData);u.append("operations",JSON.stringify(r));var l={},c=0;return s.forEach((function(t){l[++c]=t})),u.append("map",JSON.stringify(l)),c=0,s.forEach((function(t,e){u.append(""+ ++c,e)})),u}},function(t,e,n){"use strict";n.r(e);var r=n(488);n.d(e,"ReactNativeFile",(function(){return r}));var i=n(711);n.d(e,"extractFiles",(function(){return i}));var o=n(489);n.d(e,"isExtractableFile",(function(){return o}))},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData},function(t,e,n){"use strict";n.r(e);var r=n(2),i=function(t){try{return Function("'use strict'; return (".concat(t,");"))()}catch(e){throw new Error("".concat(t," is not a valid function"))}},o=r.types.custom({name:"functionType",fromSnapshot:function(t){return i(t)},toSnapshot:function(t){return t.toString()},getValidationMessage:function(t){try{return i(t),""}catch(e){return'value "'.concat(t,'" is Not a valid function ').concat(e)}},isTargetType:function(t){return"function"===typeof t}});e.default=o},function(t,e,n){"use strict";e.decode=e.parse=n(1207),e.encode=e.stringify=n(1208)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!==typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"===typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var f,h,p,d,m=t[c].replace(s,"%20"),g=m.indexOf(n);g>=0?(f=m.substr(0,g),h=m.substr(g+1)):(f=m,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),r(a,p)?i(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?o(a(t),(function(a){var s=encodeURIComponent(r(a))+n;return i(t[a])?o(t[a],(function(t){return s+encodeURIComponent(r(t))})).join(e):s+encodeURIComponent(r(t[a]))})).join(e):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var a=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){var r=n(1210);t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,n(e,r)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={loading:!0,color:"#000000",css:""};function i(t){return Object.assign({},r,{size:t})}function o(t,e){return Object.assign({},r,{height:t,width:e})}e.sizeDefaults=i,e.sizeMarginDefaults=function(t){return Object.assign({},i(t),{margin:2})},e.heightWidthDefaults=o,e.heightWidthRadiusDefaults=function(t,e,n){return void 0===n&&(n=2),Object.assign({},o(t,e),{radius:n,margin:2})}},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.maroon="#800000",t.red="#FF0000",t.orange="#FFA500",t.yellow="#FFFF00",t.olive="#808000",t.green="#008000",t.purple="#800080",t.fuchsia="#FF00FF",t.lime="#00FF00",t.teal="#008080",t.aqua="#00FFFF",t.blue="#0000FF",t.navy="#000080",t.black="#000000",t.gray="#808080",t.silver="#C0C0C0",t.white="#FFFFFF"}(r||(r={})),e.calculateRgba=function(t,e){if(Object.keys(r).includes(t)&&(t=r[t]),"#"===t[0]&&(t=t.slice(1)),3===t.length){var n="";t.split("").forEach((function(t){n+=t,n+=t})),t=n}return"rgba("+t.match(/.{2}/g).map((function(t){return parseInt(t,16)})).join(", ")+", "+e+")"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function i(t){if("number"===typeof t)return{value:t,unit:"px"};var e,n=t.match(/^[0-9.]*/).toString();e=n.includes(".")?parseFloat(n):parseInt(n,10);var i=t.match(/[^0-9]*$/).toString();return r[i]?{value:e,unit:i}:(console.warn("React Spinners: "+t+" is not a valid css value. Defaulting to "+e+"px."),{value:e,unit:"px"})}e.parseLengthAndUnit=i,e.cssValue=function(t){var e=i(t);return""+e.value+e.unit}},function(t,e,n){var r,i,o,a,s;r=n(1215),i=n(713).utf8,o=n(1216),a=n(713).bin,(s=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?a.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var n=r.bytesToWords(t),u=8*t.length,l=1732584193,c=-271733879,f=-1732584194,h=271733878,p=0;p<n.length;p++)n[p]=16711935&(n[p]<<8|n[p]>>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[u>>>5]|=128<<u%32,n[14+(u+64>>>9<<4)]=u;var d=s._ff,m=s._gg,g=s._hh,y=s._ii;for(p=0;p<n.length;p+=16){var v=l,b=c,_=f,A=h;l=d(l,c,f,h,n[p+0],7,-680876936),h=d(h,l,c,f,n[p+1],12,-389564586),f=d(f,h,l,c,n[p+2],17,606105819),c=d(c,f,h,l,n[p+3],22,-1044525330),l=d(l,c,f,h,n[p+4],7,-176418897),h=d(h,l,c,f,n[p+5],12,1200080426),f=d(f,h,l,c,n[p+6],17,-1473231341),c=d(c,f,h,l,n[p+7],22,-45705983),l=d(l,c,f,h,n[p+8],7,1770035416),h=d(h,l,c,f,n[p+9],12,-1958414417),f=d(f,h,l,c,n[p+10],17,-42063),c=d(c,f,h,l,n[p+11],22,-1990404162),l=d(l,c,f,h,n[p+12],7,1804603682),h=d(h,l,c,f,n[p+13],12,-40341101),f=d(f,h,l,c,n[p+14],17,-1502002290),l=m(l,c=d(c,f,h,l,n[p+15],22,1236535329),f,h,n[p+1],5,-165796510),h=m(h,l,c,f,n[p+6],9,-1069501632),f=m(f,h,l,c,n[p+11],14,643717713),c=m(c,f,h,l,n[p+0],20,-373897302),l=m(l,c,f,h,n[p+5],5,-701558691),h=m(h,l,c,f,n[p+10],9,38016083),f=m(f,h,l,c,n[p+15],14,-660478335),c=m(c,f,h,l,n[p+4],20,-405537848),l=m(l,c,f,h,n[p+9],5,568446438),h=m(h,l,c,f,n[p+14],9,-1019803690),f=m(f,h,l,c,n[p+3],14,-187363961),c=m(c,f,h,l,n[p+8],20,1163531501),l=m(l,c,f,h,n[p+13],5,-1444681467),h=m(h,l,c,f,n[p+2],9,-51403784),f=m(f,h,l,c,n[p+7],14,1735328473),l=g(l,c=m(c,f,h,l,n[p+12],20,-1926607734),f,h,n[p+5],4,-378558),h=g(h,l,c,f,n[p+8],11,-2022574463),f=g(f,h,l,c,n[p+11],16,1839030562),c=g(c,f,h,l,n[p+14],23,-35309556),l=g(l,c,f,h,n[p+1],4,-1530992060),h=g(h,l,c,f,n[p+4],11,1272893353),f=g(f,h,l,c,n[p+7],16,-155497632),c=g(c,f,h,l,n[p+10],23,-1094730640),l=g(l,c,f,h,n[p+13],4,681279174),h=g(h,l,c,f,n[p+0],11,-358537222),f=g(f,h,l,c,n[p+3],16,-722521979),c=g(c,f,h,l,n[p+6],23,76029189),l=g(l,c,f,h,n[p+9],4,-640364487),h=g(h,l,c,f,n[p+12],11,-421815835),f=g(f,h,l,c,n[p+15],16,530742520),l=y(l,c=g(c,f,h,l,n[p+2],23,-995338651),f,h,n[p+0],6,-198630844),h=y(h,l,c,f,n[p+7],10,1126891415),f=y(f,h,l,c,n[p+14],15,-1416354905),c=y(c,f,h,l,n[p+5],21,-57434055),l=y(l,c,f,h,n[p+12],6,1700485571),h=y(h,l,c,f,n[p+3],10,-1894986606),f=y(f,h,l,c,n[p+10],15,-1051523),c=y(c,f,h,l,n[p+1],21,-2054922799),l=y(l,c,f,h,n[p+8],6,1873313359),h=y(h,l,c,f,n[p+15],10,-30611744),f=y(f,h,l,c,n[p+6],15,-1560198380),c=y(c,f,h,l,n[p+13],21,1309151649),l=y(l,c,f,h,n[p+4],6,-145523070),h=y(h,l,c,f,n[p+11],10,-1120210379),f=y(f,h,l,c,n[p+2],15,718787259),c=y(c,f,h,l,n[p+9],21,-343485551),l=l+v>>>0,c=c+b>>>0,f=f+_>>>0,h=h+A>>>0}return r.endian([l,c,f,h])})._ff=function(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._gg=function(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._hh=function(t,e,n,r,i,o,a){var s=t+(e^n^r)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._ii=function(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._blocksize=16,s._digestsize=16,t.exports=function(t,e){if(void 0===t||null===t)throw new Error("Illegal argument "+t);var n=r.wordsToBytes(s(t,e));return e&&e.asBytes?n:e&&e.asString?a.bytesToString(n):r.bytesToHex(n)}},function(t,e){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?e.push(n.charAt(i>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&e.push((n.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|n.indexOf(t.charAt(r))>>>6-2*i);return e}},t.exports=r},function(t,e){function n(t){return!!t.constructor&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"===typeof t.readFloatLE&&"function"===typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e){t.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.extendDefaultTheme=e.defaultProps=void 0;var r=n(1219),i=n(1220),o={theme:i.base};e.defaultProps=o;e.extendDefaultTheme=function(t){o.theme=(0,r.deepMerge)(i.base,t)}},function(t,e,n){"use strict";function r(){return r=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},r.apply(this,arguments)}function i(t){return t&&"object"===typeof t&&!Array.isArray(t)}function o(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a<e;a++)n[a-1]=arguments[a];if(!n.length)return t;var s=r({},t);return n.forEach((function(t){i(t)&&Object.keys(t).forEach((function(e){i(t[e])?s[e]?s[e]=o(s[e],t[e]):s[e]=r({},t[e]):s[e]=t[e]}))})),s}e.__esModule=!0,e.isObject=i,e.deepMerge=o,e.default=void 0;var a={deepMerge:o,isObject:i};e.default=a},function(t,e,n){"use strict";e.__esModule=!0,e.base=void 0;var r=n(548);e.base=r.base},function(t,e,n){"use strict";e.__esModule=!0,e.borderStyle=e.responsiveBorderStyle=void 0;var r=n(4),i=n(423),o=n(496),a=function(t,e){var n=(0,i.normalizeColor)(t.color||"border",e),r=t.size||"xsmall",o=t.style||"solid",a="string"===typeof t?t:t.side||"all",s=e.box.responsiveBreakpoint&&e.global.breakpoints[e.box.responsiveBreakpoint];s.borderSize||(s.borderSize=e.global.borderSize);var u=s&&(s.borderSize[r]||r)&&o+" "+(s.borderSize[r]||r)+" "+n;if(u){if("top"===a||"bottom"===a||"left"===a||"right"===a)return"border-"+a+": "+u+";";if("end"===a||"start"===a)return"border-inline-"+a+": "+u+";";if("vertical"===a)return"\n      border-left: "+u+";\n      border-right: "+u+";\n    ";if("horizontal"===a)return"\n      border-top: "+u+";\n      border-bottom: "+u+";\n    ";if("between"!==a)return"border: "+u+";"}};e.responsiveBorderStyle=a;e.borderStyle=function(t,e,n){var s=[],u=(0,i.normalizeColor)(t.color||"border",n),l=t.size||"xsmall",c=t.style||"solid",f="string"===typeof t?t:t.side||"all",h=c+" "+(n.global.borderSize[l]||l)+" "+u,p=e&&a(t,n),d=p&&n.box.responsiveBreakpoint&&n.global.breakpoints[n.box.responsiveBreakpoint];return"top"===f||"bottom"===f||"left"===f||"right"===f?(s.push("border-"+f+": "+h+";"),p&&s.push((0,o.breakpointStyle)(d,p))):"end"===f||"start"===f?(s.push((0,r.css)(["border-inline-",":",";"],f,h)),p&&s.push((0,o.breakpointStyle)(d,p))):"vertical"===f?(s.push((0,r.css)(["border-left:",";border-right:",";"],h,h)),p&&s.push((0,o.breakpointStyle)(d,p))):"horizontal"===f?(s.push((0,r.css)(["border-top:",";border-bottom:",";"],h,h)),p&&s.push((0,o.breakpointStyle)(d,p))):"between"===f||(s.push((0,r.css)(["border:",";"],h)),p&&s.push((0,o.breakpointStyle)(d,p))),s}},function(t,e,n){"use strict";e.__esModule=!0,e.isNodeBeforeScroll=e.isNodeAfterScroll=e.findVisibleParent=e.makeNodeUnfocusable=e.makeNodeFocusable=e.setFocusWithoutScroll=e.getNewContainer=e.getBodyChildElements=e.getFirstFocusableDescendant=e.containsFocus=e.findScrollParents=e.findScrollParent=void 0;e.findScrollParent=function(t,e){var n;if(t){for(var r=t.parentNode;!n&&r&&r.getBoundingClientRect;){var i=r.getBoundingClientRect();e?i.width&&r.scrollWidth>i.width+10&&(n=r):i.height&&r.scrollHeight>i.height+10&&(n=r),r=r.parentNode}n?"body"===n.tagName.toLowerCase()&&(n=document):n=document}return n};var r=["html","body"];e.findScrollParents=function(t,e){var n=[];if(t){for(var i=t.parentNode;i&&i.getBoundingClientRect;){var o=i.getBoundingClientRect();e?o.width&&i.scrollWidth>o.width+10&&n.push(i):o.height&&i.scrollHeight>o.height+10&&n.push(i),i=i.parentNode}0===n.length?n.push(document):r.includes(n[0].tagName.toLowerCase())&&(n.length=0,n.push(document))}return n};e.containsFocus=function(t){for(var e=document.activeElement;e&&e!==t;)e=e.parentElement;return!!e};e.getFirstFocusableDescendant=function(t){for(var e=t.getElementsByTagName("*"),n=0;n<e.length;n+=1){var r=e[n],i=r.tagName.toLowerCase();if("input"===i||"select"===i)return r}};e.getBodyChildElements=function(){var t=/^(script|link)$/i,e=[];return[].forEach.call(document.body.children,(function(n){t.test(n.tagName)||e.push(n)})),e};e.getNewContainer=function(t,e){void 0===t&&(t=document.body);var n=document.createElement("div");return"first"===e?t.prepend(n):t.appendChild(n),n};e.setFocusWithoutScroll=function(t){var e=window.scrollX,n=window.scrollY;t.focus(),window.scrollTo(e,n)};var i="tabindex",o="data-g-tabindex";e.makeNodeFocusable=function(t){if(!t.hasAttribute("aria-live")){t.setAttribute("aria-hidden",!1);var e=t.getElementsByTagName("*");Array.prototype.filter.call(e||[],(function(t){return t.hasAttribute(o)})).forEach((function(t){var e=t.getAttribute(o);e>=0?t.setAttribute(i,t.getAttribute(o)):"none"===e&&t.removeAttribute(i),t.removeAttribute(o)}))}};var a=/(a|area|input|select|textarea|button|iframe)$/;e.makeNodeUnfocusable=function(t){if(!t.hasAttribute("aria-live")){t.setAttribute("aria-hidden",!0);var e=t.getElementsByTagName("*");Array.prototype.filter.call(e||[],(function(t){return null!==t.getAttribute(i)})).forEach((function(t){t.setAttribute(o,t.getAttribute(i)),t.setAttribute(i,-1)})),Array.prototype.filter.call(e||[],(function(t){return t.tagName.toLowerCase().match(a)&&t.focus&&null===t.getAttribute(o)})).forEach((function(t){t.setAttribute(o,"none"),t.setAttribute(i,-1)}))}};e.findVisibleParent=function t(e){if(e)return e.offsetParent?e:t(e.parentElement)||e};e.isNodeAfterScroll=function(t,e){var n=t.getBoundingClientRect().bottom,r=e.getBoundingClientRect?e.getBoundingClientRect():{height:0,top:0},i=r.height;return n>=r.top+i};e.isNodeBeforeScroll=function(t,e){return t.getBoundingClientRect().top<=(e.getBoundingClientRect?e.getBoundingClientRect():{top:0}).top}},function(t,e,n){"use strict";e.__esModule=!0,e.translateEndAngle=e.arcCommands=e.polarToCartesian=e.baseUnit=void 0;var r=10;e.baseUnit=24;var i=function(t,e,n,r){var i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}};e.polarToCartesian=i;e.arcCommands=function(t,e,n,o,a){var s=a;a-o>=360&&(s=o+359.99);var u=i(t,e,n,s),l=i(t,e,n,o),c=s-o<=180?"0":"1";return["M",u.x.toFixed(r),u.y.toFixed(r),"A",n.toFixed(r),n.toFixed(r),0,c,0,l.x.toFixed(r),l.y.toFixed(r)].join(" ")};e.translateEndAngle=function(t,e,n){return Math.min(360,Math.max(0,t+e*n))}},function(t,e,n){"use strict";e.__esModule=!0,e.textAlignStyle=e.kindPartStyles=e.plainInputStyle=e.sizeStyle=e.disabledStyle=e.genericStyles=e.overflowStyle=e.inputStyle=e.getInputPadBySide=e.unfocusStyle=e.focusStyle=e.fillStyle=e.edgeStyle=e.controlBorderStyle=e.baseStyle=void 0;var r=n(4),i=n(714),o=n(423),a=n(496),s=(0,r.css)(["font-family:",";font-size:",";line-height:",";font-weight:",";"," box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;"],(function(t){return t.theme.global.font.family}),(function(t){return t.theme.global.font.size}),(function(t){return t.theme.global.font.height}),(function(t){return t.theme.global.font.weight}),(function(t){return!t.plain&&(0,i.backgroundStyle)(t.theme.baseBackground,t.theme)}));e.baseStyle=s;var u=(0,r.css)(["border:"," solid ",";border-radius:",";"],(function(t){return t.theme.global.control.border.width}),(function(t){return(0,o.normalizeColor)(t.theme.global.control.border.color||"border",t.theme)}),(function(t){return t.theme.global.control.border.radius}));e.controlBorderStyle=u;var l=function(t,e,n,i,o){var s=i&&o.global.breakpoints[i];if("string"===typeof e)return(0,r.css)(["",":",";",";"],t,o.global.edgeSize[e]||e,n&&s?(0,a.breakpointStyle)(s,"\n        "+t+": "+(s.edgeSize[e]||e)+";\n      "):"");var u=[],l=e.horizontal,c=e.vertical,f=e.top,h=e.bottom,p=e.left,d=e.right,m=l&&c&&l===c;if(m||f&&h&&p&&d&&f===h===p===d){var g=m?l:f;return(0,r.css)(["",":",";",";"],t,o.global.edgeSize[g]||g,n&&s?(0,a.breakpointStyle)(s,"\n        "+t+": "+(s.edgeSize[g]||g)+";\n      "):"")}return l&&u.push((0,r.css)(["","-left:",";","-right:",";",";"],t,o.global.edgeSize[l]||l,t,o.global.edgeSize[l]||l,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-left: "+(s.edgeSize[l]||l)+";\n          "+t+"-right: "+(s.edgeSize[l]||l)+";\n        "):"")),c&&u.push((0,r.css)(["","-top:",";","-bottom:",";",";"],t,o.global.edgeSize[c]||c,t,o.global.edgeSize[c]||c,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-top: "+(s.edgeSize[c]||c)+";\n          "+t+"-bottom: "+(s.edgeSize[c]||c)+";\n        "):"")),f&&u.push((0,r.css)(["","-top:",";",";"],t,o.global.edgeSize[f]||f,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-top: "+(s.edgeSize[f]||f)+";\n        "):"")),h&&u.push((0,r.css)(["","-bottom:",";",";"],t,o.global.edgeSize[h]||h,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-bottom: "+(s.edgeSize[h]||h)+";\n        "):"")),p&&u.push((0,r.css)(["","-left:",";",";"],t,o.global.edgeSize[p]||p,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-left: "+(s.edgeSize[p]||p)+";\n        "):"")),d&&u.push((0,r.css)(["","-right:",";",";"],t,o.global.edgeSize[d]||d,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-right: "+(s.edgeSize[d]||d)+";\n        "):"")),e.start&&u.push((0,r.css)(["","-inline-start:",";",";"],t,o.global.edgeSize[e.start]||e.start,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-inline-start: "+(s.edgeSize[e.start]||e.start)+";\n        "):"")),e.end&&u.push((0,r.css)(["","-inline-end:",";",";"],t,o.global.edgeSize[e.end]||e.end,n&&s?(0,a.breakpointStyle)(s,"\n          "+t+"-inline-end: "+(s.edgeSize[e.end]||e.end)+";\n        "):"")),u};e.edgeStyle=l;e.fillStyle=function(t){return"horizontal"===t?"width: 100%;":"vertical"===t?"height: 100%;":t?"\n      width: 100%;\n      height: 100%;\n    ":void 0};var c=function(t,e){var n=void 0===e?{}:e,r=n.forceOutline,i=n.justBorder,a=t.theme.global.focus;if(!a||r&&!a.outline){var s=(0,o.normalizeColor)("focus",t.theme);return s?"outline: 2px solid "+s+";":""}if(a.outline&&(!a.border||!i)){if("object"===typeof a.outline){var u=(0,o.normalizeColor)(a.outline.color||"focus",t.theme);return"\n        outline-offset: 0px;\n        outline: "+(a.outline.size||"2px")+" solid "+u+";\n      "}return"outline: "+a.outline+";"}if(a.shadow&&(!a.border||!i)){if("object"===typeof a.shadow){var l=(0,o.normalizeColor)(a.border&&a.border.color||a.shadow.color||"focus",t.theme),c=a.shadow.size||"2px";return"\n        outline: none;\n        box-shadow: 0 0 "+c+" "+c+" "+l+";\n      "}return"\n      outline: none;\n      box-shadow: "+a.shadow+";\n    "}return a.border?"\n      outline: none;\n      border-color: "+(0,o.normalizeColor)(a.border.color||"focus",t.theme)+";\n    ":""},f=function(t,e){var n=void 0===e?{}:e,r=n.forceOutline,i=n.justBorder,a=t.theme.global.focus;return!a||r&&!a.outline?(0,o.normalizeColor)("focus",t.theme)?"outline: none;":"":!a.outline||a.border&&i?!a.shadow||a.border&&i?a.border?"\n      outline: none;\n      border-color: none;\n    ":"":"object"===typeof a.shadow?"\n        outline: none;\n        box-shadow: none;\n      ":"\n      outline: none;\n      box-shadow: none;\n    ":"object"===typeof a.outline?"\n        outline-offset: 0px;\n        outline: none;\n      ":"outline: none;"},h=function(t){var e=void 0===t?{}:t,n=e.forceOutline,i=e.justBorder,o=e.skipSvgChildren;return(0,r.css)([""," "," ",""],(function(t){return!o&&"\n  > circle,\n  > ellipse,\n  > line,\n  > path,\n  > polygon,\n  > polyline,\n  > rect {\n    "+c(t)+"\n  }"}),(function(t){return c(t,{forceOutline:n,justBorder:i})}),!n&&"\n  ::-moz-focus-inner {\n    border: 0;\n  }\n  ")};e.focusStyle=h;e.unfocusStyle=function(t){var e=void 0===t?{}:t,n=e.forceOutline,i=e.justBorder,o=e.skipSvgChildren;return(0,r.css)([""," "," ",""],(function(t){return!o&&"\n  > circle,\n  > ellipse,\n  > line,\n  > path,\n  > polygon,\n  > polyline,\n  > rect {\n    "+f(t)+"\n  }"}),(function(t){return f(t,{forceOutline:n,justBorder:i})}),!n&&"\n  ::-moz-focus-inner {\n    border: 0;\n  }\n  ")};var p=function(t,e){return(0,a.parseMetricToNum)((t.theme.global.edgeSize[e]||e)+"px")+(0,a.parseMetricToNum)(t.theme.global.control.border.width+"px")+"px"};e.getInputPadBySide=function(t,e){var n;if("object"!==typeof t.theme.global.input.padding)return p(t,t.theme.global.input.padding);n="left"===e||"right"===e?"horizontal":"top"===e||"bottom"===e?"vertical":void 0;var r=t.theme.global.input.padding[e]||t.theme.global.input.padding[n];return p(t,r)};var d=(0,r.css)(["color:",";"],(function(t){return(0,o.normalizeColor)(t.theme.global.colors.placeholder,t.theme)})),m=(0,r.css)(["&::-webkit-input-placeholder{",";}&::-moz-placeholder{",";}&:-ms-input-placeholder{",";}"],d,d,d),g=(0,r.css)(["box-sizing:border-box;"," font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;"," "," "," margin:0;"," ",";"," ","::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}",""],(function(t){return"font-size: "+(t.theme.global.input.font.size?t.theme.text[t.theme.global.input.font.size].size||t.theme.global.input.font.size:"inherit")+";"}),(function(t){return t.theme.global.input.font.height&&"line-height: "+t.theme.global.input.font.height+";"}),(function(t){return t.theme.global.input.padding&&"object"!==typeof t.theme.global.input.padding?"padding: "+((0,a.parseMetricToNum)(t.theme.global.edgeSize[t.theme.global.input.padding]||t.theme.global.input.padding)-(0,a.parseMetricToNum)(t.theme.global.control.border.width))+"px;":l("padding",t.theme.global.input.padding,t.responsive,t.theme.box.responsiveBreakpoint,t.theme)}),(function(t){return(t.theme.global.input.weight||t.theme.global.input.font.weight)&&(0,r.css)(["font-weight:",";"],t.theme.global.input.weight||t.theme.global.input.font.weight)}),(function(t){return t.size&&function(t){var e=t.theme.text[t.size];return(0,r.css)(["font-size:",";line-height:",";"],e.size,e.height)}(t)}),(function(t){return t.focus&&!t.plain&&h()}),u,m,(function(t){return t.theme.global.input.extend}));e.inputStyle=g;e.overflowStyle=function(t){return"string"===typeof t?(0,r.css)(["overflow:",";"],t):(0,r.css)([""," ",";"],t.horizontal&&"overflow-x: "+t.horizontal+";",t.vertical&&"overflow-y: "+t.vertical+";")};var y={center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},v=(0,r.css)([""," "," ",""],(function(t){return t.alignSelf&&"align-self: "+y[t.alignSelf]+";"}),(function(t){return t.gridArea&&"grid-area: "+t.gridArea+";"}),(function(t){return t.margin&&t.theme.global&&l("margin",t.margin,t.responsive,t.theme.global.edgeSize.responsiveBreakpoint,t.theme)}));e.genericStyles=v;e.disabledStyle=function(t){return(0,r.css)(["opacity:",";cursor:default;"],(function(e){return t||e.theme.global.control.disabled.opacity}))};e.sizeStyle=function(t,e,n){return(0,r.css)(["",":",";"],t,n.global.size[e]||e)};var b=(0,r.css)(["outline:none;border:none;"]);e.plainInputStyle=b;e.kindPartStyles=function(t,e,n){var a=[];if(t.padding||t.pad){var s=t.padding||t.pad;s.vertical||s.horizontal?a.push("padding: "+(e.global.edgeSize[s.vertical]||s.vertical||0)+" "+(e.global.edgeSize[s.horizontal]||s.horizontal||0)+";"):a.push("padding: "+(e.global.edgeSize[s]||s||0)+";")}if(t.background?a.push((0,i.backgroundStyle)(n||t.background,e,t.color||(!Object.prototype.hasOwnProperty.call(t,"color")||void 0!==t.color)&&void 0)):t.color&&a.push("color: "+(0,o.normalizeColor)(t.color,e)+";"),t.border?(t.border.width&&a.push((0,r.css)(["border-style:solid;border-width:",";"],t.border.width)),t.border.color&&a.push((0,r.css)(["border-color:",";"],(0,o.normalizeColor)(!t.background&&n||t.border.color||"border",e))),t.border.radius&&a.push((0,r.css)(["border-radius:",";"],t.border.radius))):!1===t.border&&a.push("border: none;"),!n||t.border||t.background||a.push("color: "+(0,o.normalizeColor)(n,e)+";"),t.font&&(t.font.size&&a.push("font-size: "+(e.text[t.font.size].size||t.font.size)+";"),t.font.height&&a.push("line-height: "+t.font.height+";"),t.font.weight&&a.push("font-weight: "+t.font.weight+";")),t.opacity){var u=!0===t.opacity?e.global.opacity.medium:e.global.opacity[t.opacity]||t.opacity;a.push("opacity: "+u+";")}return t.extend&&a.push(t.extend),a};var _={center:"center",end:"right",start:"left"},A=(0,r.css)(["text-align:",";"],(function(t){return _[t.textAlign]}));e.textAlignStyle=A},function(t,e,n){"use strict";function r(){return r=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},r.apply(this,arguments)}e.__esModule=!0,e.removeUndefined=e.deepMerge=e.deepFreeze=e.isObject=void 0;var i=function(t){return t&&"object"===typeof t&&!Array.isArray(t)};e.isObject=i;e.deepFreeze=function(t){return Object.keys(t).forEach((function(e){return e&&i(t[e])&&Object.freeze(t[e])})),Object.freeze(t)};e.deepMerge=function t(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];if(!o.length)return e;var s=r({},e);return o.forEach((function(e){i(e)&&Object.keys(e).forEach((function(n){i(e[n])?s[n]?s[n]=t(s[n],e[n]):s[n]=r({},e[n]):s[n]=e[n]}))})),s};e.removeUndefined=function(t){var e={};return Object.keys(t).forEach((function(n){void 0!==t[n]&&(e[n]=t[n])})),e}},function(t,e,n){"use strict";var r;e.__esModule=!0,e.PortalContext=void 0;var i=((r=n(0))&&r.__esModule?r:{default:r}).default.createContext(void 0);e.PortalContext=i},function(t,e,n){"use strict";e.__esModule=!0,e.useForwardedRef=void 0;var r=n(0);e.useForwardedRef=function(t){var e=(0,r.useRef)(null);return(0,r.useEffect)((function(){t&&("function"===typeof t?t(e.current):t.current=e.current)})),e}},function(t,e,n){"use strict";e.__esModule=!0,e.getBreakpointStyle=e.getDeviceBreakpoint=e.getBreakpoint=void 0;e.getBreakpoint=function(t,e){var n,r=Object.keys(e.global.breakpoints).sort((function(t,n){var r=e.global.breakpoints[t],i=e.global.breakpoints[n];return r?i?r.value?i.value?r.value-i.value:-1:1:-1:1})),i=r[r.length-1];return r.some((function(r){var i=e.global.breakpoints[r];return!(!i||i.value&&!(i.value>=t))&&(n=r,!0)})),n||i};e.getDeviceBreakpoint=function(t,e){return e.global.deviceBreakpoints[t]};e.getBreakpointStyle=function(t,e){var n=e&&t.global.breakpoints[e]||{};return n.edgeSize||(n.edgeSize=t.global.edgeSize),n.borderSize||(n.borderSize=t.global.borderSize),n.size||(n.size=t.global.size),n}},function(t,e){t.exports=function(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},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r);n(71),n(324),n(1150);e.default=function(t){t.children;return i.a.createElement("p",null,"fixme")}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r);n(62),n(1326);e.default=function(){return i.a.createElement("p",null,"fixme")}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,t),o(this,"geoJson",void 0),o(this,"style",void 0),o(this,"original",void 0),o(this,"metadata",void 0),this.geoJson=e,this.style=n,this.original=i,this.metadata=a}var e,n,a;return e=t,(n=[{key:"getCoords",value:function(){return this.geoJson.geometry.coordinates}}])&&i(e.prototype,n),a&&i(e,a),t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(510),i=s(n(343)),o=n(426),a=s(n(516));function s(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function l(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 c(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?f(t):e}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(){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}}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}var m=function(t){!function(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&&d(t,e)}(m,t);var e,n,i,s,u=(e=m,function(){var t,n=p(e);if(h()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return c(this,t)});function m(t){var e,n,r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),e=u.call(this,t),n=f(e),i=void 0,(r="deckCache")in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,e.deckCache=new a.default(t.getData,(function(e){return t.toNebulaFeature(e)})),e.enablePicking=!0,e}return n=m,(i=[{key:"render",value:function(t){t.nebula;var e=[0,0,0,255],n=this.deckCache,i=n.objects,a=n.updateTrigger;return new r.JunctionScatterplotLayer({id:"junctions-".concat(this.id),data:i,opacity:1,fp64:!1,pickable:!0,getPosition:function(t){return t.geoJson.geometry.coordinates},getFillColor:function(t){return(0,o.toDeckColor)(t.style.fillColor)||e},getStrokeColor:function(t){return(0,o.toDeckColor)(t.style.outlineColor)||(0,o.toDeckColor)(t.style.fillColor)||e},getRadius:function(t){return t.style.pointRadiusMeters+t.style.outlineRadiusMeters||1},getInnerRadius:function(t){return t.style.pointRadiusMeters||.5},parameters:{depthTest:!1,blend:!1},updateTriggers:{all:a},nebulaLayer:this})}}])&&l(n.prototype,i),s&&l(n,s),m}(i.default);e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_ARROWS=e.DEFAULT_ARROWS=e.ArrowStyles=void 0;e.ArrowStyles={NONE:0,FORWARD:1,BACKWARD:2,BOTH:3};e.DEFAULT_ARROWS=1;e.MAX_ARROWS=3},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeCircleMode=void 0;var r=f(n(427)),i=n(34),o=f(n(346)),a=f(n(119)),s=f(n(224)),u=n(97),l=n(64),c=n(161);function f(t){return t&&t.__esModule?t:{default:t}}function h(t){return h="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},h(t)}function p(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return d(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(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.")}()}function d(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 m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(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 y(t,e){return!e||"object"!==h(e)&&"function"!==typeof e?v(t):e}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(){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}}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}function w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var x=function(t){!function(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&&A(t,e)}(d,t);var e,n,l,f,h=(e=d,function(){var t,n=_(e);if(b()){var r=_(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return y(this,t)});function d(){var t;m(this,d);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return w(v(t=h.call.apply(h,[this].concat(n))),"_selectedEditHandle",void 0),w(v(t),"_isResizing",!1),t}return n=d,(l=[{key:"getGuides",value:function(t){var e=this,n=[],r=t.selectedIndexes,o=t.lastPointerMoveEvent,a=o&&o.picks,s=o&&o.mapCoords;if(a&&a.length&&s&&1===r.length&&!this._isResizing){var l=a.find((function(t){return!t.isGuide}));if(l&&l.object.properties.shape&&l.object.properties.shape.includes("Circle")&&t.selectedIndexes.includes(l.index)){var c=null,f=[],h=(0,i.point)(s);if((0,u.recursivelyTraverseNestedArrays)(l.object.geometry.coordinates,[],(function(n,r){var o=(0,i.lineString)(n),a=e.getNearestPoint(o,h,t.modeConfig&&t.modeConfig.viewport);(!c||a.properties.dist<c.properties.dist)&&(c=a,f=r)})),c){var d=c,m=d.geometry.coordinates,g=d.properties.index;n.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:l.index,positionIndexes:[].concat(p(f),[g+1])},geometry:{type:"Point",coordinates:m}})}}}return{type:"FeatureCollection",features:n}}},{key:"getNearestPoint",value:function(t,e,n){if(t.geometry.coordinates.some((function(t){return t.length>2}))){if(n)return(0,u.nearestPointOnProjectedLine)(t,e,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,r.default)(t,e)}},{key:"handleDragging",value:function(t,e){var n=(0,u.getPickedEditHandle)(t.pointerDownPicks);if(n){t.cancelPan();var r=n.properties,i=this.getSelectedFeature(e),l=(0,s.default)(i).geometry.coordinates,f=Object.entries(i.geometry.coordinates[0]).length-1,h=Math.max((0,a.default)(l,t.mapCoords),.001),p={}.steps,d={steps:void 0===p?f:p},m=(0,o.default)(l,h,d).geometry,g=new c.ImmutableFeatureCollection(e.data).replaceGeometry(r.featureIndex,m).getObject();e.onEdit({updatedData:g,editType:"unionGeometry",editContext:{featureIndexes:[r.featureIndex]}})}}},{key:"handlePointerMove",value:function(t,e){if(!this._isResizing){var n=(0,u.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"intermediate"===n.properties.editHandleType?n:null}var r=this.getCursor(t);e.onUpdateCursor(r)}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isResizing=!0)}},{key:"handleStopDragging",value:function(t,e){this._isResizing&&(this._selectedEditHandle=null,this._isResizing=!1)}},{key:"getCursor",value:function(t){var e=t&&t.picks||[];return(0,u.getPickedEditHandles)(e).length?"cell":null}}])&&g(n.prototype,l),f&&g(n,f),d}(l.GeoJsonEditMode);e.ResizeCircleMode=x},function(t,e,n){"use strict";t.exports=i,t.exports.default=i;var r=n(1237);function i(t,e){if(!(this instanceof i))return new i(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,a=e;a<n;a++)o=t.children[a],u(i,t.leaf?r(o):o);return i}function u(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,n,i,o){for(var a,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=i||(a=e+Math.ceil((n-e)/i/2)*i,r(t,a,e,n,o),s.push(e,a,a,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!d(t,e))return n;for(var i,o,a,s,u=[];e;){for(i=0,o=e.children.length;i<o;i++)a=e.children[i],d(t,s=e.leaf?r(a):a)&&(e.leaf?n.push(a):p(t,s)?this._all(a,n):u.push(a));e=u.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!d(t,e))return!1;for(var r,i,o,a,s=[];e;){for(r=0,i=e.children.length;r<i;r++)if(o=e.children[r],d(t,a=e.leaf?n(o):o)){if(e.leaf||p(t,a))return!0;s.push(o)}e=s.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;for(var n,r,i,a,s=this.data,u=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),a=!0),s.leaf&&-1!==(i=o(t,s.children,e)))return s.children.splice(i,1),l.push(s),this._condense(l),this;a||s.leaf||!p(s,u)?r?(n++,s=r.children[n],a=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:c,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,r){var i,o=n-e+1,s=this._maxEntries;if(o<=s)return a(i=m(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),(i=m([])).leaf=!1,i.height=r;var u,l,c,f,h=Math.ceil(o/s),p=h*Math.ceil(Math.sqrt(s));for(g(t,e,n,p,this.compareMinX),u=e;u<=n;u+=p)for(g(t,u,c=Math.min(u+p-1,n),h,this.compareMinY),l=u;l<=c;l+=h)f=Math.min(l+h-1,c),i.children.push(this._build(t,l,f,r-1));return a(i,this.toBBox),i},_chooseSubtree:function(t,e,n,r){for(var i,o,a,s,u,l,c,h,p,d;r.push(e),!e.leaf&&r.length-1!==n;){for(c=h=1/0,i=0,o=e.children.length;i<o;i++)u=f(a=e.children[i]),p=t,d=a,(l=(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-u)<h?(h=l,c=u<c?u:c,s=a):l===h&&u<c&&(c=u,s=a);e=s||e.children[0]}return e},_insert:function(t,e,n){var r=this.toBBox,i=n?t:r(t),o=[],a=this._chooseSubtree(i,this.data,e,o);for(a.children.push(t),u(a,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=m(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,a,u,l,c,h,p,d,m,g,y,v;for(l=c=1/0,r=e;r<=n-e;r++)i=s(t,0,r,this.toBBox),o=s(t,r,n,this.toBBox),p=i,d=o,m=void 0,g=void 0,y=void 0,v=void 0,m=Math.max(p.minX,d.minX),g=Math.max(p.minY,d.minY),y=Math.min(p.maxX,d.maxX),v=Math.min(p.maxY,d.maxY),a=Math.max(0,y-m)*Math.max(0,v-g),u=f(i)+f(o),a<l?(l=a,h=r,c=u<c?u:c):a===l&&u<c&&(c=u,h=r);return h},_chooseSplitAxis:function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},_allDistMargin:function(t,e,n,r){t.children.sort(r);var i,o,a=this.toBBox,l=s(t,0,e,a),c=s(t,n-e,n,a),f=h(l)+h(c);for(i=e;i<n-e;i++)o=t.children[i],u(l,t.leaf?a(o):o),f+=h(l);for(i=n-e-1;i>=e;i--)o=t.children[i],u(c,t.leaf?a(o):o),f+=h(c);return f},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)u(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():a(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e,n){t.exports=function(){"use strict";function t(t,n,i,o,a){e(t,n,i||0,o||t.length-1,a||r)}function e(t,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-u*c/s+f)),Math.min(o,Math.floor(r+(s-u)*c/s+f)),a)}var h=t[r],p=i,d=o;for(n(t,i,r),a(t[o],h)>0&&n(t,i,o);p<d;){for(n(t,p,d),p++,d--;a(t[p],h)<0;)p++;for(;a(t[d],h)>0;)d--}0===a(t[i],h)?n(t,i,d):n(t,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}function n(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function r(t,e){return t<e?-1:t>e?1:0}return t}()},function(t,e,n){"use strict";n.r(e);var r=n(550);function i(t){var e=[1/0,1/0,-1/0,-1/0];return Object(r.coordEach)(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}i.default=i,e.default=i},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DuplicateMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"handleStartDragging",value:function(t,e){a(l(p.prototype),"handleStartDragging",this).call(this,t,e),this._geometryBeforeTranslate&&e.onEdit(this.getAddManyFeaturesAction(this._geometryBeforeTranslate,e.data))}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("copy"):t.onUpdateCursor(null)}}])&&o(n.prototype,r),f&&o(n,f),p}(n(513).TranslateMode);e.DuplicateMode=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendLineStringMode=void 0;var r=n(64),i=n(161);function o(t){return o="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},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var h=function(t){!function(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&&f(t,e)}(p,t);var e,n,r,o,h=(e=p,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function p(){return a(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"getSingleSelectedLineString",value:function(t){var e=this.getSelectedGeometry(t);return e&&"LineString"===e.type?e:null}},{key:"handleClick",value:function(t,e){var n=e.selectedIndexes,r=this.getSingleSelectedLineString(e);if(r){var o=[r.coordinates.length],a=e.modeConfig;a&&a.drawAtFront&&(o=[0]);var s=n[0],u=new i.ImmutableFeatureCollection(e.data).addPosition(s,o,t.mapCoords).getObject();e.onEdit({updatedData:u,editType:"addPosition",editContext:{featureIndexes:[s],positionIndexes:o,position:t.mapCoords}})}else console.warn("ExtendLineStringMode only supported for single LineString selection")}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},n=this.getSingleSelectedLineString(t);if(!n)return e;var r=t.lastPointerMoveEvent&&t.lastPointerMoveEvent.mapCoords,i=null,o=t.modeConfig;return i=o&&o.drawAtFront?n.coordinates[0]:n.coordinates[n.coordinates.length-1],e.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[i,r]}}),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&s(n.prototype,r),o&&s(n,o),p}(r.GeoJsonEditMode);e.ExtendLineStringMode=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPolygonMode=void 0;var r=g(n(1242)),i=g(n(331)),o=g(n(440)),a=g(n(260)),s=n(34),u=g(n(89)),l=g(n(119)),c=g(n(151)),f=g(n(345)),h=g(n(427)),p=n(97),d=n(64),m=n(161);function g(t){return t&&t.__esModule?t:{default:t}}function y(t){return y="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},y(t)}function v(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||_(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.")}()}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||_(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){if(t){if("string"===typeof t)return A(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function A(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 w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(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 E(t,e){return!e||"object"!==y(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function O(){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}}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function P(t,e){return P=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},P(t,e)}var C=function(t){!function(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&&P(t,e)}(_,t);var e,n,d,g,y=(e=_,function(){var t,n=S(e);if(O()){var r=S(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return E(this,t)});function _(){return w(this,_),y.apply(this,arguments)}return n=_,(d=[{key:"calculateMapCoords",value:function(t,e,n){var r=n.modeConfig;if(!r||!r.lock90Degree||!t.length)return e;if(1===t.length){var i=t[0],o=this.getSelectedGeometry(n),a=(0,f.default)(o),d="FeatureCollection"===a.type?a.features:[a],m=Number.MAX_SAFE_INTEGER,g=null;if(d.forEach((function(t){var e=(0,h.default)(t,i),n=(0,l.default)(e,i);m>n&&(m=n,g=e)})),g){var y=(0,u.default)(i,g),v=(0,l.default)(i,e,{units:"meters"});return(0,c.default)(i,v,y,{units:"meters"}).geometry.coordinates}return e}var _=t[t.length-1],A=b((0,p.generatePointsParallelToLinePoints)(t[t.length-2],_,e),1)[0];return(0,h.default)((0,s.lineString)([_,A]),e).geometry.coordinates}},{key:"getGuides",value:function(t){var e=this.getClickSequence(),n={type:"FeatureCollection",features:[]};if(0===e.length||!t.lastPointerMoveEvent)return n;var r=t.lastPointerMoveEvent.mapCoords;return n.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(v(e),[this.calculateMapCoords(e,r,t)])}}),n}},{key:"handleClick",value:function(t,e){var n=this.getTentativeGuide(e),i=this.getSelectedGeometry(e);if(i){var o=this.getClickSequence();n&&"LineString"===n.geometry.type?o.push(n.geometry.coordinates[n.geometry.coordinates.length-1]):this.addClickSequence(t);var s={type:"Point",coordinates:o[o.length-1]},u=(0,r.default)(s,i);if(o.length>1&&n&&!u){if(this.resetClickSequence(),0===(0,a.default)(n,i).features.length)return;var l=this.splitPolygon(n,e);l&&e.onEdit(l)}}else console.warn("A polygon must be selected for splitting")}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"splitPolygon",value:function(t,e){var n=this.getSelectedGeometry(e),r=e.selectedIndexes[0],a=e.modeConfig||{},s=a.gap,u=void 0===s?.1:s,l=a.units,c=void 0===l?"centimeters":l;0===u&&(u=.1,c="centimeters");var f=(0,o.default)(t,u,{units:c}),h=(0,i.default)(n,f);if(!h)return console.warn("Canceling edit. Split Polygon erased"),null;var p=h.geometry,d=p.type,g=p.coordinates,y=[];return y="Polygon"===d?g.map((function(t){return[t]})):g.reduce((function(t,e){return e.forEach((function(e){t.push([e])})),t}),[]),{updatedData:new m.ImmutableFeatureCollection(e.data).replaceGeometry(r,{type:"MultiPolygon",coordinates:y}).getObject(),editType:"split",editContext:{featureIndexes:[r]}}}}])&&x(n.prototype,d),g&&x(n,g),_}(d.GeoJsonEditMode);e.SplitPolygonMode=C},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return i}));var r=n(182);function i(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=Object(r.getCoord)(t),a=Object(r.getGeom)(e),s=a.type,u=e.bbox,l=a.coordinates;if(u&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(i,u))return!1;"Polygon"===s&&(l=[l]);for(var c=!1,f=0;f<l.length&&!c;f++)if(o(i,l[f][0],n.ignoreBoundary)){for(var h=!1,p=1;p<l[f].length&&!h;)o(i,l[f][p],!n.ignoreBoundary)&&(h=!0),p++;h||(c=!0)}return c}function o(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],u=e[o][0],l=e[o][1];if(t[1]*(a-u)+s*(u-t[0])+l*(t[0]-a)===0&&(a-t[0])*(u-t[0])<=0&&(s-t[1])*(l-t[1])<=0)return!n;s>t[1]!==l>t[1]&&t[0]<(u-a)*(t[1]-s)/(l-s)+a&&(r=!r)}return r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtrudeMode=void 0;var r,i=(r=n(89))&&r.__esModule?r:{default:r},o=n(97),a=n(512),s=n(161);function u(t){return u="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},u(t)}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(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.")}()}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"===typeof t)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(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 p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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 m(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?g(t):e}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(){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}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=function(t){!function(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&&b(t,e)}(f,t);var e,n,r,a,u=(e=f,function(){var t,n=v(e);if(y()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return m(this,t)});function f(){var t;p(this,f);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _(g(t=u.call.apply(u,[this].concat(n))),"isPointAdded",!1),t}return n=f,(r=[{key:"handleDragging",value:function(t,e){var n=(0,o.getPickedEditHandle)(t.pointerDownPicks);if(n){var r=n.properties.featureIndex,i=n.properties.positionIndexes,a=this.coordinatesSize(i,r,e.data);i=this.isPointAdded?this.nextPositionIndexes(i,a):i;var u=this.getPointForPositionIndexes(this.prevPositionIndexes(i,a),r,e.data),l=this.getPointForPositionIndexes(i,r,e.data);if(u&&l){var f=c((0,o.generatePointsParallelToLinePoints)(u,l,t.mapCoords),2),h=f[0],p=f[1],d=new s.ImmutableFeatureCollection(e.data).replacePosition(r,this.prevPositionIndexes(i,a),p).replacePosition(r,i,h).getObject();e.onEdit({updatedData:d,editType:"extruding",editContext:{featureIndexes:[r],positionIndexes:this.nextPositionIndexes(i,a),position:h}}),t.cancelPan()}}}},{key:"handleStartDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,o.getPickedIntermediateEditHandle)(t.picks);if(n.length&&r){var i=r.properties,a=i.positionIndexes,u=i.featureIndex,l=this.coordinatesSize(a,u,e.data),c=this.getPointForPositionIndexes(this.prevPositionIndexes(a,l),u,e.data),f=this.getPointForPositionIndexes(a,u,e.data);if(c&&f){var h=new s.ImmutableFeatureCollection(e.data);this.isOrthogonal(a,u,l,e.data)||(h=h.addPosition(u,a,f)),this.isOrthogonal(this.prevPositionIndexes(a,l),u,l,e.data)||(h=h.addPosition(u,a,c),this.isPointAdded=!0),e.onEdit({updatedData:h.getObject(),editType:"startExtruding",editContext:{featureIndexes:[u],positionIndexes:a,position:c}})}}}},{key:"handleStopDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,o.getPickedEditHandle)(t.pointerDownPicks);if(n.length&&r){var i=r.properties.featureIndex,a=r.properties.positionIndexes,u=this.coordinatesSize(a,i,e.data);a=this.isPointAdded?this.nextPositionIndexes(a,u):a;var l=this.getPointForPositionIndexes(this.prevPositionIndexes(a,u),i,e.data),f=this.getPointForPositionIndexes(a,i,e.data);if(l&&f){var h=c((0,o.generatePointsParallelToLinePoints)(l,f,t.mapCoords),2),p=h[0],d=h[1],m=new s.ImmutableFeatureCollection(e.data).replacePosition(i,this.prevPositionIndexes(a,u),d).replacePosition(i,a,p).getObject();e.onEdit({updatedData:m,editType:"extruded",editContext:{featureIndexes:[i],positionIndexes:a,position:p}})}}this.isPointAdded=!1}},{key:"coordinatesSize",value:function(t,e,n){var r=n.features,i=0;if(Array.isArray(t)){var o=r[e].geometry.coordinates;if(3===t.length){var a=c(t,2),s=a[0],u=a[1];o.length&&o[s].length&&(i=o[s][u].length)}else{var l=c(t,1)[0];o.length&&o[l].length&&(i=o[l].length)}}return i}},{key:"getBearing",value:function(t,e){var n=(0,i.default)(t,e);return n<0?Math.floor(360+n):Math.floor(n)}},{key:"isOrthogonal",value:function(t,e,n,r){if(!Array.isArray(t))return!1;t[t.length-1]===n-1&&(t[t.length-1]=0);var i=this.getPointForPositionIndexes(this.prevPositionIndexes(t,n),e,r),o=this.getPointForPositionIndexes(this.nextPositionIndexes(t,n),e,r),a=this.getPointForPositionIndexes(t,e,r),s=this.getBearing(a,i),u=this.getBearing(a,o);return[89,90,91,269,270,271].includes(Math.abs(s-u))}},{key:"nextPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var n=l(t);return n.length&&(n[n.length-1]=n[n.length-1]===e-1?0:n[n.length-1]+1),n}},{key:"prevPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var n=l(t);return n.length&&(n[n.length-1]=0===n[n.length-1]?e-2:n[n.length-1]-1),n}},{key:"getPointForPositionIndexes",value:function(t,e,n){var r,i=n.features;if(Array.isArray(t)){var o=i[e].geometry.coordinates;if(3===t.length){var a=c(t,3),s=a[0],u=a[1],l=a[2];o.length&&o[s].length&&(r=o[s][u][l])}else{var f=c(t,2),h=f[0],p=f[1];o.length&&o[h].length&&(r=o[h][p])}}return r}}])&&d(n.prototype,r),a&&d(n,a),f}(a.ModifyMode);e.ExtrudeMode=A},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElevationMode=void 0;var r=n(97);function i(t){return i="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},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 s(t,e,n){return s="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},s(t,e,n||t)}function u(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){var e=t.pointerDownScreenCoords,n=t.screenCoords;return 10*(e[1]-n[1])}var p=function(t){!function(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&&f(t,e)}(m,t);var e,n,i,p,d=(e=m,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function m(){return o(this,m),d.apply(this,arguments)}return n=m,p=[{key:"calculateElevationChangeWithViewport",value:function(t,e){var n=e.pointerDownScreenCoords,r=e.screenCoords;return 156543.03392*Math.cos(t.latitude*Math.PI/180)/Math.pow(2,t.zoom)*(n[1]-r[1])/2}}],(i=[{key:"makeElevatedEvent",value:function(t,e,n){var r=n.modeConfig||{},i=r.minElevation,o=void 0===i?0:i,a=r.maxElevation,s=void 0===a?2e4:a,u=r.calculateElevationChange,l=void 0===u?h:u;if(!t.pointerDownScreenCoords)return t;var c=3===e.length?e[2]:0;return c+=l({pointerDownScreenCoords:t.pointerDownScreenCoords,screenCoords:t.screenCoords}),c=Math.min(c,s),c=Math.max(c,o),Object.assign({},t,{mapCoords:[e[0],e[1],c]})}},{key:"handlePointerMove",value:function(t,e){var n=(0,r.getPickedEditHandle)(t.pointerDownPicks),i=n?n.geometry.coordinates:t.mapCoords;s(c(m.prototype),"handlePointerMove",this).call(this,this.makeElevatedEvent(t,i,e),e)}},{key:"handleStopDragging",value:function(t,e){var n=(0,r.getPickedEditHandle)(t.picks),i=n?n.geometry.coordinates:t.mapCoords;s(c(m.prototype),"handleStopDragging",this).call(this,this.makeElevatedEvent(t,i,e),e)}},{key:"getCursor",value:function(t){var e=s(c(m.prototype),"getCursor",this).call(this,t);return"cell"===e&&(e="ns-resize"),e}}])&&a(n.prototype,i),p&&a(n,p),m}(n(512).ModifyMode);e.ElevationMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransformMode=void 0;var r=n(34),i=n(513),o=n(718),a=n(719);function s(t){return s="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},s(t)}function u(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 l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(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 f(t,e,n){return f="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},f(t,e,n||t)}function h(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t){!function(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&&m(t,e)}(v,t);var e,n,s,g,y=(e=v,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function v(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),y.call(this,[new i.TranslateMode,new o.ScaleMode,new a.RotateMode])}return n=v,s=[{key:"handlePointerMove",value:function(t,e){var n=null;f(d(v.prototype),"handlePointerMove",this).call(this,t,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{onUpdateCursor:function(t){n=t||n}})),e.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(t,e){var n=null,r=null,a=[];this._modes.forEach((function(t){t instanceof i.TranslateMode?r=t:(t instanceof o.ScaleMode&&(n=t),a.push(t))})),n instanceof o.ScaleMode&&!n.isEditHandleSelected()&&a.push(r),a.filter(Boolean).forEach((function(n){return n.handleStartDragging(t,e)}))}},{key:"getGuides",value:function(t){var e=f(d(v.prototype),"getGuides",this).call(this,t),n=(this._modes||[]).find((function(t){return t instanceof a.RotateMode}));if(n instanceof a.RotateMode){var i=e.features.filter((function(t){var e=t.properties||{},r=e.editHandleType,i=[e.mode];return n.getIsRotating()&&i.push(r),!i.includes("scale")}));e=(0,r.featureCollection)(i)}return e}}],s&&c(n.prototype,s),g&&c(n,g),v}(n(720).CompositeMode);e.TransformMode=g},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPointMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"createTentativeFeature",value:function(t){var e=t.lastPointerMoveEvent;return{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Point",coordinates:(e?[e.mapCoords]:[])[0]}}}},{key:"handleClick",value:function(t,e){var n={type:"Point",coordinates:t.mapCoords};e.onEdit(this.getAddFeatureAction(n,e.data))}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),a(l(p.prototype),"handlePointerMove",this).call(this,t,e)}}])&&o(n.prototype,r),f&&o(n,f),p}(n(64).GeoJsonEditMode);e.DrawPointMode=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawLineStringMode=void 0;var r=n(97);function i(t){return i="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},i(t)}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return a(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(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.")}()}function a(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 s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,i,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)});function d(){return s(this,d),p.apply(this,arguments)}return n=d,(i=[{key:"handleClick",value:function(t,e){var n=t.picks,i=(0,r.getPickedEditHandle)(n),a=!1;i||(this.addClickSequence(t),a=!0);var s=this.getClickSequence();if(s.length>1&&i&&Array.isArray(i.properties.positionIndexes)&&i.properties.positionIndexes[0]===s.length-1){var u={type:"LineString",coordinates:o(s)};this.resetClickSequence();var l=this.getAddFeatureAction(u,e.data);l&&e.onEdit(l)}else a&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var n=this.getClickSequence();if(n.length>1){var r={type:"LineString",coordinates:o(n)};this.resetClickSequence();var i=this.getAddFeatureAction(r,e.data);i&&e.onEdit(i)}}}},{key:"getGuides",value:function(t){var e,n,r=t.lastPointerMoveEvent,i=this.getClickSequence(),a=r?[r.mapCoords]:[],s={type:"FeatureCollection",features:[]};i.length>0&&(n={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(o(i),a)}}),n&&s.features.push(n);var u=i.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=s.features).push.apply(e,o(u)),s}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&u(n.prototype,i),a&&u(n,a),d}(n(64).GeoJsonEditMode);e.DrawLineStringMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleMode=void 0;var r,i=(r=n(142))&&r.__esModule?r:{default:r};function o(t){return o="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},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var h=function(t){!function(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&&f(t,e)}(p,t);var e,n,r,o,h=(e=p,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function p(){return a(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"getTwoClickPolygon",value:function(t,e,n){var r=(0,i.default)([t[0],t[1],e[0],e[1]]);return r.properties=r.properties||{},r.properties.shape="Rectangle",r}}])&&s(n.prototype,r),o&&s(n,o),p}(n(234).TwoClickPolygonMode);e.DrawRectangleMode=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawSquareMode=void 0;var r=s(n(142)),i=s(n(119)),o=s(n(728)),a=n(34);function s(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(){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}}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}var m=function(t){!function(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&&d(t,e)}(g,t);var e,n,s,u,m=(e=g,function(){var t,n=p(e);if(h()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)});function g(){return l(this,g),m.apply(this,arguments)}return n=g,(s=[{key:"getTwoClickPolygon",value:function(t,e,n){var s=[e[0],t[1]],u=[t[0],e[1]],l=(0,i.default)((0,a.point)(s),(0,a.point)(t)),c=(0,i.default)((0,a.point)(u),(0,a.point)(t)),f=l<=c?l:c,h=l<=c?s:u,p=(0,a.lineString)([h,e]),d=(0,o.default)(p,f).geometry.coordinates,m=(0,r.default)([t[0],t[1],d[0],d[1]]);return m.properties=m.properties||{},m.properties.shape="Square",m}}])&&c(n.prototype,s),u&&c(n,u),g}(n(234).TwoClickPolygonMode);e.DrawSquareMode=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleFromCenterMode=void 0;var r,i=(r=n(142))&&r.__esModule?r:{default:r};function o(t){return o="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},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var h=function(t){!function(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&&f(t,e)}(p,t);var e,n,r,o,h=(e=p,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function p(){return a(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"getTwoClickPolygon",value:function(t,e,n){var r=t[0]>e[0]?t[0]+Math.abs(t[0]-e[0]):t[0]-Math.abs(t[0]-e[0]),o=t[1]>e[1]?t[1]+Math.abs(t[1]-e[1]):t[1]-Math.abs(t[1]-e[1]),a=(0,i.default)([r,o,e[0],e[1]]);return a.properties=a.properties||{},a.properties.shape="Rectangle",a}}])&&s(n.prototype,r),o&&s(n,o),p}(n(234).TwoClickPolygonMode);e.DrawRectangleFromCenterMode=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawSquareFromCenterMode=void 0;var r=s(n(142)),i=s(n(119)),o=s(n(728)),a=n(34);function s(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(){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}}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}var m=function(t){!function(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&&d(t,e)}(g,t);var e,n,s,u,m=(e=g,function(){var t,n=p(e);if(h()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)});function g(){return l(this,g),m.apply(this,arguments)}return n=g,(s=[{key:"getTwoClickPolygon",value:function(t,e,n){var s=[e[0],t[1]],u=[t[0],e[1]],l=(0,i.default)((0,a.point)(s),(0,a.point)(t)),c=(0,i.default)((0,a.point)(u),(0,a.point)(t)),f=l<=c?l:c,h=l<=c?s:u,p=(0,a.lineString)([h,e]),d=(0,o.default)(p,f).geometry.coordinates,m=t[0]>d[0]?t[0]+Math.abs(t[0]-d[0]):t[0]-Math.abs(t[0]-d[0]),g=t[1]>d[1]?t[1]+Math.abs(t[1]-d[1]):t[1]-Math.abs(t[1]-d[1]),y=(0,r.default)([m,g,d[0],d[1]]);return y.properties=y.properties||{},y.properties.shape="Square",y}}])&&c(n.prototype,s),u&&c(n,u),g}(n(234).TwoClickPolygonMode);e.DrawSquareFromCenterMode=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleByDiameterMode=void 0;var r=a(n(346)),i=a(n(119)),o=n(64);function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(){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}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}var d=function(t){!function(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&&p(t,e)}(m,t);var e,n,a,s,d=(e=m,function(){var t,n=h(e);if(f()){var r=h(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return c(this,t)});function m(){return u(this,m),d.apply(this,arguments)}return n=m,(a=[{key:"getTwoClickPolygon",value:function(t,e,n){var a=(n||{}).steps,s=void 0===a?64:a,u={steps:s};s<4&&(console.warn("Minimum steps to draw a circle is 4 "),u.steps=4);var l=(0,o.getIntermediatePosition)(t,e),c=Math.max((0,i.default)(t,l),.001),f=(0,r.default)(l,c,u);return f.properties=f.properties||{},f.properties.shape="Circle",f}}])&&l(n.prototype,a),s&&l(n,s),m}(n(234).TwoClickPolygonMode);e.DrawCircleByDiameterMode=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleFromCenterMode=void 0;var r=o(n(346)),i=o(n(119));function o(t){return t&&t.__esModule?t:{default:t}}function a(t){return a="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},a(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,o,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)});function d(){return s(this,d),p.apply(this,arguments)}return n=d,(o=[{key:"getTwoClickPolygon",value:function(t,e,n){var o=(n||{}).steps,a=void 0===o?64:o,s={steps:a};a<4&&(console.warn("Minimum steps to draw a circle is 4 "),s.steps=4);var u=Math.max((0,i.default)(t,e),.001),l=(0,r.default)(t,u,s);return l.properties=l.properties||{},l.properties.shape="Circle",l}}])&&u(n.prototype,o),a&&u(n,a),d}(n(234).TwoClickPolygonMode);e.DrawCircleFromCenterMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseByBoundingBoxMode=void 0;var r=u(n(142)),i=u(n(119)),o=u(n(469)),a=n(34),s=n(64);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="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},l(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t){!function(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&&m(t,e)}(y,t);var e,n,u,l,g=(e=y,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function y(){return c(this,y),g.apply(this,arguments)}return n=y,(u=[{key:"getTwoClickPolygon",value:function(t,e,n){var u=Math.min(t[0],e[0]),l=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),f=Math.max(t[1],e[1]),h=(0,r.default)([u,l,c,f]).geometry.coordinates[0],p=(0,s.getIntermediatePosition)(t,e),d=Math.max((0,i.default)((0,a.point)(h[0]),(0,a.point)(h[1])),.001),m=Math.max((0,i.default)((0,a.point)(h[0]),(0,a.point)(h[3])),.001);return(0,o.default)(p,d,m)}}])&&f(n.prototype,u),l&&f(n,l),y}(n(234).TwoClickPolygonMode);e.DrawEllipseByBoundingBoxMode=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseUsingThreePointsMode=void 0;var r=u(n(119)),i=u(n(469)),o=u(n(89)),a=n(34),s=n(64);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="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},l(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t){!function(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&&m(t,e)}(y,t);var e,n,u,l,g=(e=y,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function y(){return c(this,y),g.apply(this,arguments)}return n=y,(u=[{key:"getThreeClickPolygon",value:function(t,e,n,u){var l=(0,s.getIntermediatePosition)(t,e),c=Math.max((0,r.default)(l,(0,a.point)(n)),.001),f=Math.max((0,r.default)(t,e),.001)/2,h={angle:(0,o.default)(t,e)};return(0,i.default)(l,c,f,h)}}])&&f(n.prototype,u),l&&f(n,l),y}(n(721).ThreeClickPolygonMode);e.DrawEllipseUsingThreePointsMode=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleUsingThreePointsMode=void 0;var r=n(97);function i(t){return i="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},i(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return a(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,i,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)});function d(){return s(this,d),p.apply(this,arguments)}return n=d,(i=[{key:"getThreeClickPolygon",value:function(t,e,n,i){var a=o((0,r.generatePointsParallelToLinePoints)(t,e,n),2);return{type:"Feature",properties:{shape:"Rectangle"},geometry:{type:"Polygon",coordinates:[[t,e,a[0],a[1],t]]}}}}])&&u(n.prototype,i),a&&u(n,a),d}(n(721).ThreeClickPolygonMode);e.DrawRectangleUsingThreePointsMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Draw90DegreePolygonMode=void 0;var r=l(n(151)),i=l(n(89)),o=l(n(260)),a=l(n(119)),s=n(34),u=n(97);function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function f(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||p(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.")}()}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){if(t){if("string"===typeof t)return d(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(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 m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(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 y(t,e,n){return y="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},y(t,e,n||t)}function v(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function b(){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}}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}var w=function(t){!function(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&&A(t,e)}(d,t);var e,n,l,c,p=(e=d,function(){var t,n=_(e);if(b()){var r=_(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return v(this,t)});function d(){return m(this,d),p.apply(this,arguments)}return n=d,(l=[{key:"createTentativeFeature",value:function(t){var e,n=this.getClickSequence(),r=t.lastPointerMoveEvent.mapCoords;if(1===n.length)e=r;else{var i=n[n.length-2],o=n[n.length-1];e=h((0,u.generatePointsParallelToLinePoints)(i,o,r),1)[0]}return n.length<3?{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(f(n),[e])}}:{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(f(n),[e,n[0]])]}}}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]};if(0===this.getClickSequence().length||!t.lastPointerMoveEvent)return e;var n=this.createTentativeFeature(t);return e.features.push(n),e.features=e.features.concat((0,u.getEditHandlesForGeometry)(n.geometry,-1)),e.features=e.features.slice(0,-1),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),y(_(d.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"handleClick",value:function(t,e){var n=t.picks,r=this.getTentativeGuide(e);this.addClickSequence(t);var i=this.getClickSequence();if(r){if(3===i.length&&"LineString"===r.geometry.type){var o=r.geometry;i[i.length-1]=o.coordinates[o.coordinates.length-1]}else if(i.length>3&&"Polygon"===r.geometry.type){var a=r.geometry;i[i.length-1]=a.coordinates[0][a.coordinates[0].length-2];var s=(0,u.getPickedEditHandle)(n);if(s&&Array.isArray(s.properties.positionIndexes)&&(0===s.properties.positionIndexes[1]||s.properties.positionIndexes[1]===a.coordinates[0].length-3)){var l={type:"Polygon",coordinates:this.finalizedCoordinates(f(a.coordinates[0]))};this.resetClickSequence();var c=this.getAddFeatureOrBooleanPolygonAction(l,e);c&&e.onEdit(c)}}var h={screenCoords:[-1,-1],mapCoords:t.mapCoords,picks:[],pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,cancelPan:function(){},sourceEvent:null};this.handlePointerMove(h,e)}}},{key:"finalizedCoordinates",value:function(t){var e=[[].concat(f(t.slice(0,-2)),[t[0]])],n=this.getIntermediatePoint(f(t));if(n)e=[[].concat(f(t.slice(0,-2)),[n,t[0]])];else{var r=f(t);r.splice(-3,1),(n=this.getIntermediatePoint(f(r)))&&(e=[[].concat(f(t.slice(0,-3)),[n,t[0]])])}return e}},{key:"getIntermediatePoint",value:function(t){var e;if(t.length>4){var n=f(t),u=n[0],l=n[1],c=(0,i.default)(u,l),h=t[t.length-3],p=t[t.length-4],d=(0,i.default)(h,p),m={first:[],second:[]};[1,2,3].forEach((function(t){var e=c+90*t;m.first.push(e>180?e-360:e);var n=d+90*t;m.second.push(n>180?n-360:n)}));var g=(0,a.default)((0,s.point)(u),(0,s.point)(h));[0,1,2].forEach((function(t){var n=(0,s.lineString)([u,(0,r.default)(u,g,m.first[t]).geometry.coordinates]);[0,1,2].forEach((function(t){var i=(0,s.lineString)([h,(0,r.default)(h,g,m.second[t]).geometry.coordinates]),a=(0,o.default)(n,i);a&&a.features.length&&(e=a.features[0].geometry.coordinates)}))}))}return e}}])&&g(n.prototype,l),c&&g(n,c),d}(n(64).GeoJsonEditMode);e.Draw90DegreePolygonMode=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonByDraggingMode=void 0;var r,i=(r=n(235))&&r.__esModule?r:{default:r},o=n(97);function a(t){return a="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},a(t)}function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return u(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(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.")}()}function u(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 l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?h(t):e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=function(t){!function(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&&m(t,e)}(y,t);var e,n,r,a,u=(e=y,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)});function y(){var t;l(this,y);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return g(h(t=u.call.apply(u,[this].concat(n))),"handleDraggingThrottled",null),t}return n=y,(r=[{key:"handleClick",value:function(t,e){}},{key:"handleStartDragging",value:function(t,e){t.cancelPan(),e.modeConfig&&e.modeConfig.throttleMs?this.handleDraggingThrottled=(0,i.default)(this.handleDraggingAux,e.modeConfig.throttleMs):this.handleDraggingThrottled=this.handleDraggingAux}},{key:"handleStopDragging",value:function(t,e){this.addClickSequence(t);var n=this.getClickSequence();if(this.handleDraggingThrottled&&this.handleDraggingThrottled.cancel&&this.handleDraggingThrottled.cancel(),n.length>2){var r={type:"Polygon",coordinates:[[].concat(s(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,e);i&&e.onEdit(i)}}},{key:"handleDraggingAux",value:function(t,e){var n=t.picks;(0,o.getPickedEditHandle)(n)||this.addClickSequence(t)}},{key:"handleDragging",value:function(t,e){this.handleDraggingThrottled&&this.handleDraggingThrottled(t,e)}}])&&c(n.prototype,r),a&&c(n,a),y}(n(514).DrawPolygonMode);e.DrawPolygonByDraggingMode=y},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(){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}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ViewMode=void 0;var l=function(t){!function(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&&u(t,e)}(r,t);var e,n=(e=r,function(){var t,n=s(e);if(a()){var r=s(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return o(this,t)});function r(){return i(this,r),n.apply(this,arguments)}return r}(n(64).GeoJsonEditMode);e.ViewMode=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureDistanceMode=void 0;var r=a(n(119)),i=a(n(1300)),o=n(97);function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return l(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(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.")}()}function l(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 c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(){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}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=function(t){!function(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&&g(t,e)}(v,t);var e,n,a,s,l=(e=v,function(){var t,n=m(e);if(d()){var r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function v(){var t;c(this,v);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return y(p(t=l.call.apply(l,[this].concat(n))),"_isMeasuringSessionFinished",!1),y(p(t),"_currentTooltips",[]),y(p(t),"_currentDistance",0),y(p(t),"_calculateDistanceForTooltip",(function(t){var e=t.positionA,n=t.positionB,i=t.modeConfig||{},o=i.turfOptions,a=i.measurementCallback,s=(0,r.default)(e,n,o);return a&&a(s),s})),t}return n=v,(a=[{key:"_formatTooltip",value:function(t,e){var n=e||{},r=n.formatTooltip,i=n.turfOptions,o=i&&i.units||"kilometers";return r?r(t):"".concat(parseFloat(t).toFixed(2)," ").concat(o)}},{key:"handleClick",value:function(t,e){var n=e.modeConfig,r=e.data,a=e.onEdit,s=(n||{}).centerTooltipsOnLine,u=void 0!==s&&s;this._isMeasuringSessionFinished&&(this._isMeasuringSessionFinished=!1,this.resetClickSequence(),this._currentTooltips=[],this._currentDistance=0);var l=t.picks,c=(0,o.getPickedEditHandle)(l),f=!1;c||(this.addClickSequence(t),f=!0);var h=this.getClickSequence();if(h.length>1&&c&&Array.isArray(c.properties.positionIndexes)&&c.properties.positionIndexes[0]===h.length-1)this._isMeasuringSessionFinished=!0;else if(f){if(h.length>1){this._currentDistance+=this._calculateDistanceForTooltip({positionA:h[h.length-2],positionB:h[h.length-1],modeConfig:n});var p=u?(0,i.default)(h[h.length-2],h[h.length-1]).geometry.coordinates:t.mapCoords;this._currentTooltips.push({position:p,text:this._formatTooltip(this._currentDistance,n)})}a({updatedData:r,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}}},{key:"handleKeyUp",value:function(t,e){if(!this._isMeasuringSessionFinished){t.stopPropagation();var n=t.key,r=this.getClickSequence().length;switch(n){case"Escape":this._isMeasuringSessionFinished=!0,1===r&&(this.resetClickSequence(),this._currentTooltips=[]),e.onUpdateCursor("cell");break;case"Enter":this.handleClick(e.lastPointerMoveEvent,e),this._isMeasuringSessionFinished=!0}}}},{key:"getGuides",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n&&!this._isMeasuringSessionFinished?[n.mapCoords]:[],o={type:"FeatureCollection",features:[]};r.length>0&&o.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(u(r),i)}});var a=r.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=o.features).push.apply(e,u(a)),o}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"getTooltips",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=(n||{}).centerTooltipsOnLine,o=void 0!==r&&r,a=this.getClickSequence();if(a.length>0&&e&&!this._isMeasuringSessionFinished){var s=this._calculateDistanceForTooltip({positionA:a[a.length-1],positionB:e.mapCoords,modeConfig:t.modeConfig}),l=o?(0,i.default)(a[a.length-1],e.mapCoords).geometry.coordinates:e.mapCoords;return[].concat(u(this._currentTooltips),[{position:l,text:this._formatTooltip(this._currentDistance+s,n)}])}return this._currentTooltips}}])&&f(n.prototype,a),s&&f(n,s),v}(n(64).GeoJsonEditMode);e.MeasureDistanceMode=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAreaMode=void 0;var r=a(n(986)),i=a(n(180)),o=n(514);function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function u(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 l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e,n){return h="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function p(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(){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}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var y=[],v=function(t){!function(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&&g(t,e)}(v,t);var e,n,o,a,s=(e=v,function(){var t,n=m(e);if(d()){var r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function v(){return c(this,v),s.apply(this,arguments)}return n=v,o=[{key:"handleClick",value:function(t,e){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{onEdit:function(){}});h(m(v.prototype),"handleClick",this).call(this,t,n)}},{key:"getTooltips",value:function(t){var e=this.getTentativeGuide(t);if(e&&"Polygon"===e.geometry.type){var n,o=t.modeConfig||{},a=o.formatTooltip,s=o.measurementCallback,u=(0,i.default)(e),l=(0,r.default)(e);return n=a?a(l):"".concat(parseFloat(l).toFixed(2)," ").concat("sq. m"),s&&s(l),[{position:u.geometry.coordinates,text:n}]}return y}}],o&&f(n.prototype,o),a&&f(n,a),v}(o.DrawPolygonMode);e.MeasureAreaMode=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAngleMode=void 0;var r=s(n(89)),i=s(n(224)),o=s(n(722)),a=n(64);function s(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function l(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return c(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(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.")}()}function c(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 f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(){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}}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function y(t,e){return y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},y(t,e)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=[],_=function(t){!function(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&&y(t,e)}(c,t);var e,n,a,s,u=(e=c,function(){var t,n=g(e);if(m()){var r=g(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function c(){var t;f(this,c);for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v(d(t=u.call.apply(u,[this].concat(n))),"_getTooltips",(0,o.default)((function(t){var e=t.modeConfig,n=t.vertex,o=t.point1,a=t.point2,s=b;if(n&&o&&a){var u,l=e||{},c=l.formatTooltip,f=l.measurementCallback,h=(0,r.default)(n,o),p=(0,r.default)(n,a),d=Math.abs(h-p);d>180&&(d=360-d),u=c?c(d):"".concat(parseFloat(d).toFixed(2)," ").concat("deg"),f&&f(d),s=[{position:(0,i.default)({type:"FeatureCollection",features:[o,a].map((function(t){return{type:"Feature",geometry:{type:"Point",coordinates:t}}}))}).geometry.coordinates,text:u}]}return s}))),t}return n=c,(a=[{key:"handleClick",value:function(t,e){this.getClickSequence().length>=3&&this.resetClickSequence(),this.addClickSequence(t)}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"getPoints",value:function(t){var e=this.getClickSequence(),n=l(e);return e.length<3&&t.lastPointerMoveEvent&&n.push(t.lastPointerMoveEvent.mapCoords),n}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},n=e.features,r=this.getPoints(t);return r.length>2?n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0],r[2]]}}):r.length>1&&n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0]]}}),e}},{key:"getTooltips",value:function(t){var e=this.getPoints(t);return this._getTooltips({modeConfig:t.modeConfig,vertex:e[0],point1:e[1],point2:e[2]})}}])&&h(n.prototype,a),s&&h(n,s),c}(a.GeoJsonEditMode);e.MeasureAngleMode=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnappableMode=void 0;var r=n(97);function i(t){return i="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},i(t)}function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(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.")}()}function a(t,e){if(t){if("string"===typeof t)return s(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(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 u(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 l(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 c(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?f(t):e}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(){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}}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=function(t){!function(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&&d(t,e)}(y,t);var e,n,i,s,g=(e=y,function(){var t,n=p(e);if(h()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return c(this,t)});function y(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),m(f(e=g.call(this)),"_handler",void 0),e._handler=t,e}return n=y,i=[{key:"_getSnappedMouseEvent",value:function(t,e,n){return Object.assign(t,{mapCoords:n.geometry.coordinates,pointerDownMapCoords:e&&e.geometry.coordinates})}},{key:"_getPickedSnapTarget",value:function(t){return(0,r.getPickedEditHandles)(t).find((function(t){return"snap-target"===t.properties.editHandleType}))}},{key:"_getPickedSnapSource",value:function(t){return(0,r.getPickedSnapSourceEditHandle)(t)}},{key:"_getUpdatedSnapSourceHandle",value:function(t,e){var n=t.properties,r=n.featureIndex,i=n.positionIndexes;if(!Array.isArray(i))return t;var o=e.features[r];return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{geometry:{type:"Point",coordinates:i.reduce((function(t,e){return t[e]}),o.geometry.coordinates)}})}},{key:"_getSnapTargets",value:function(t){var e=(t.modeConfig||{}).additionalSnapTargets;return e=e||[],[].concat(o(t.data.features),o(e))}},{key:"_getSnapTargetHandles",value:function(t){for(var e=[],n=this._getSnapTargets(t),i=0;i<n.length;i++)if(!t.selectedIndexes.includes(i)){var a=n[i].geometry;e.push.apply(e,o((0,r.getEditHandlesForGeometry)(a,i,"snap-target")))}return e}},{key:"getGuides",value:function(t){var e=t.modeConfig,n=t.lastPointerMoveEvent,i=(e||{}).enableSnapping,s={type:"FeatureCollection",features:o(this._handler.getGuides(t).features)};if(!i)return s;var u,l=n&&this._getPickedSnapSource(n.pointerDownPicks);if(l)return(u=s.features).push.apply(u,o(this._getSnapTargetHandles(t)).concat([this._getUpdatedSnapSourceHandle(l,t.data)])),s;var c,f=t.data.features,h=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=a(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(t.selectedIndexes);try{for(h.s();!(c=h.n()).done;){var p=c.value;if(p<f.length){var d,m=f[p].geometry;(d=s.features).push.apply(d,o((0,r.getEditHandlesForGeometry)(m,p,"snap-source")))}}}catch(g){h.e(g)}finally{h.f()}return s}},{key:"_getSnapAwareEvent",value:function(t,e){var n=this._getPickedSnapSource(e.lastPointerMoveEvent.pointerDownPicks),r=this._getPickedSnapTarget(t.picks);return n&&r?this._getSnappedMouseEvent(t,n,r):t}},{key:"handleStartDragging",value:function(t,e){this._handler.handleStartDragging(t,e)}},{key:"handleStopDragging",value:function(t,e){this._handler.handleStopDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handleDragging",value:function(t,e){this._handler.handleDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handlePointerMove",value:function(t,e){this._handler.handlePointerMove(this._getSnapAwareEvent(t,e),e)}}],i&&l(n.prototype,i),s&&l(n,s),y}(n(64).GeoJsonEditMode);e.SnappableMode=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(41),i=n(724);function o(t){return o="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},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e,n){return u="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},u(t,e,n||t)}function l(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function p(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 d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=d({},r.PathLayer.defaultProps,{pickingLineWidthExtraPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER}}),y=function(t){!function(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&&h(t,e)}(m,t);var e,n,r,o,p=(e=m,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)});function m(){return a(this,m),p.apply(this,arguments)}return n=m,(r=[{key:"getShaders",value:function(){var t,e=u(f(m.prototype),"getShaders",this).call(this);return e.vs=(0,i.insertBefore)(e.vs,"vec3 width;","\n       if(picking_uActive){\n        widthPixels.xy += pickingLineWidthExtraPixels;\n       }\n      "),d({},e,{inject:d({},e.inject||{},{"vs:#decl":((null===(t=e.inject)||void 0===t?void 0:t["vs:#decl"])||"").concat("uniform float pickingLineWidthExtraPixels;")})})}},{key:"draw",value:function(t){u(f(m.prototype),"draw",this).call(this,d({},t,{uniforms:d({},t.uniforms,{pickingLineWidthExtraPixels:this.props.pickingLineWidthExtraPixels})}))}}])&&s(n.prototype,r),o&&s(n,o),m}(r.PathLayer);e.default=y,y.defaultProps=g,y.layerName="EditablePathLayer"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(275),i=n(424),o=n(96),a=n(515),s=l(n(511)),u=l(n(723));function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function f(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return h(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,e)}(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.")}()}function h(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 p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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 m(t,e,n){return m="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},m(t,e,n||t)}function g(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(){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}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function _(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 A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){w(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var x=i.ViewMode,E={type:"FeatureCollection",features:[]},O=A({mode:x},s.default.defaultProps,{data:[],selectedIndexes:[],filled:!1,stroked:!0,lineWidthScale:a.PROJECTED_PIXEL_SIZE_MULTIPLIER,lineWidthMinPixels:1,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineWidthUnits:"pixels",getHexagons:function(t){return t.hexIds},getEditedCluster:function(t,e){return e?A({},e,{hexIds:t}):{hexIds:t}},resolution:9}),S=function(t){!function(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&&b(t,e)}(l,t);var e,n,i,a,u=(e=l,function(){var t,n=v(e);if(y()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return g(this,t)});function l(){return p(this,l),u.apply(this,arguments)}return n=l,(i=[{key:"initializeState",value:function(){m(v(l.prototype),"initializeState",this).call(this),this.setState({tentativeHexagonIDs:[]})}},{key:"getDerivedHexagonIDs",value:function(t){return(0,o.polyfill)(t,this.props.resolution,!0)}},{key:"getDerivedHexagonID",value:function(t){return(0,o.geoToH3)(t[1],t[0],this.props.resolution)}},{key:"renderLayers",value:function(){var t=this;return[new s.default(this.getSubLayerProps({id:"editable-geojson",mode:this.props.mode,data:E,selectedFeatureIndexes:[],onEdit:function(e){var n=e.editType,r=e.editContext;switch(n){case"updateTentativeFeature":if("Polygon"===r.feature.geometry.type){var i=r.feature.geometry.coordinates,o=t.getDerivedHexagonIDs(i);t.setState({tentativeHexagonIDs:o})}else if("Point"===r.feature.geometry.type){var a=r.feature.geometry.coordinates,s=t.getDerivedHexagonID(a);t.setState({tentativeHexagonIDs:[s]})}break;case"addFeature":var u=f(t.props.data),l=t.props.modeConfig;if(l&&l.booleanOperation)if(1!==t.props.selectedIndexes.length)console.warn("booleanOperation only supported for single cluster selection");else{var c,h=new Set(t.getSelectedHexIDs()),p=new Set(t.state.tentativeHexagonIDs);switch(l.booleanOperation){case"union":default:c=f(new Set([].concat(f(h),f(p))));break;case"intersection":c=f(h).filter((function(t){return p.has(t)}));break;case"difference":c=f(h).filter((function(t){return!p.has(t)}))}var d=t.props.selectedIndexes[0],m=t.props.data[d];u[d]=t.props.getEditedCluster(c,m)}else u.push(t.props.getEditedCluster(t.state.tentativeHexagonIDs,null));t.setState({tentativeHexagonIDs:[]}),t.props.onEdit({updatedData:u})}}})),new r.H3ClusterLayer(this.getSubLayerProps({id:"hexagons",data:this.props.data,getHexagons:this.props.getHexagons})),new r.H3ClusterLayer(this.getSubLayerProps({id:"tentative-hexagons",data:[{hexIds:this.state.tentativeHexagonIDs}],getHexagons:function(t){return t.hexIds}}))]}},{key:"getSelectedHexIDs",value:function(){var t=this,e=[];return this.props.selectedIndexes.forEach((function(n){var r=t.props.data[n],i=t.props.getHexagons(r);e=e.concat(i)})),e}},{key:"getCursor",value:function(t){var e=t.isDragging,n=(this.state||{}).cursor;return n||(n=e?"grabbing":"grab"),n}}])&&d(n.prototype,i),a&&d(n,a),l}(u.default);e.default=S,w(S,"layerName","EditableH3ClusterLayer"),w(S,"defaultProps",O)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SELECTION_TYPE=void 0;var r,i=n(25),o=n(41),a=n(34),s=f(n(440)),u=f(n(331)),l=n(424),c=f(n(511));function f(t){return t&&t.__esModule?t:{default:t}}function h(t){return h="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},h(t)}function p(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 d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||y(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.")}()}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"===typeof t)return v(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}function v(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 b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(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 A(t,e){return!e||"object"!==h(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function w(){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}}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function E(t,e){return E=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},E(t,e)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var S={NONE:null,RECTANGLE:"rectangle",POLYGON:"polygon"};e.SELECTION_TYPE=S;var P=(O(r={},S.RECTANGLE,l.DrawRectangleMode),O(r,S.POLYGON,l.DrawPolygonMode),r),C=O({},S.RECTANGLE,{dragToDraw:!0}),T={selectionType:S.RECTANGLE,layerIds:[],onSelect:function(){}},k={type:"FeatureCollection",features:[]},I="selection-blocker",L=["lineWidthScale","lineWidthMinPixels","lineWidthMaxPixels","lineWidthUnits","lineJointRounded","lineCapRounded","lineMiterLimit","pointRadiusScale","pointRadiusMinPixels","pointRadiusMaxPixels","lineDashJustified","getLineColor","getFillColor","getRadius","getLineWidth","getLineDashArray","getTentativeLineDashArray","getTentativeLineColor","getTentativeFillColor","getTentativeLineWidth"],j=function(t){!function(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&&E(t,e)}(h,t);var e,n,r,i,f=(e=h,function(){var t,n=x(e);if(w()){var r=x(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return A(this,t)});function h(){return b(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"_selectRectangleObjects",value:function(t){var e=this.props,n=e.layerIds,r=e.onSelect,i=g(this.context.viewport.project(t[0][0]),2),o=i[0],a=i[1],s=g(this.context.viewport.project(t[0][2]),2),u=s[0],l=s[1];r({pickingInfos:this.context.deck.pickObjects({x:Math.min(o,u),y:Math.min(a,l),width:Math.abs(u-o),height:Math.abs(l-a),layerIds:n})})}},{key:"_selectPolygonObjects",value:function(t){var e,n=this,r=this.props,i=r.layerIds,o=r.onSelect,l=t[0].map((function(t){return n.context.viewport.project(t)})),c=l.map((function(t){return t[0]})),f=l.map((function(t){return t[1]})),h=Math.min.apply(Math,m(c)),p=Math.min.apply(Math,m(f)),d=Math.max.apply(Math,m(c)),g=Math.max.apply(Math,m(f)),y=(0,a.polygon)(t),v=(0,s.default)(y,50);try{e=(0,u.default)(v,y)}catch(_){return void console.log("turfDifference() error",_)}this.setState({pendingPolygonSelection:{bigPolygon:e}});var b="".concat(this.props.id,"-").concat(I);setTimeout((function(){var t=n.context.deck.pickObjects({x:h,y:p,width:d-h,height:g-p,layerIds:[b].concat(m(i))});o({pickingInfos:t.filter((function(t){return t.layer.id!==n.props.id}))})}),250)}},{key:"renderLayers",value:function(){var t=this,e=this.state.pendingPolygonSelection,n=P[this.props.selectionType]||l.ViewMode,r=C[this.props.selectionType],i={};L.forEach((function(e){void 0!==t.props[e]&&(i[e]=t.props[e])}));var a=[new c.default(this.getSubLayerProps(d({id:"selection-geojson",pickable:!0,mode:n,modeConfig:r,selectedFeatureIndexes:[],data:k,onEdit:function(e){var n=e.updatedData;if("addFeature"===e.editType){var r=n.features[0].geometry.coordinates;t.props.selectionType===S.RECTANGLE?t._selectRectangleObjects(r):t.props.selectionType===S.POLYGON&&t._selectPolygonObjects(r)}}},i)))];if(e){var s=e.bigPolygon;a.push(new o.PolygonLayer(this.getSubLayerProps({id:I,pickable:!0,stroked:!1,opacity:1,data:[s],getLineColor:function(t){return[0,0,0,1]},getFillColor:function(t){return[0,0,0,1]},getPolygon:function(t){return t.geometry.coordinates}})))}return a}},{key:"shouldUpdateState",value:function(t){var e=t.changeFlags,n=e.stateChanged,r=e.propsOrDataChanged;return n||r}}])&&_(n.prototype,r),i&&_(n,i),h}(i.CompositeLayer);e.default=j,O(j,"layerName","SelectionLayer"),O(j,"defaultProps",T)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(25),i=n(41);function o(t){return o="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},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=function(t){!function(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&&f(t,e)}(p,t);var e,n,r,o,h=(e=p,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function p(){return a(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"renderLayers",value:function(){return[new i.ScatterplotLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-ScatterplotLayer"),data:this.props.data})),new i.LineLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-LineLayer"),data:this.props.data,pickable:!1,getSourcePosition:function(t){var e=t.position;return[e[0],e[1],0]},getTargetPosition:function(t){var e=t.position;return[e[0],e[1],e[2]||0]},getColor:[150,150,150,200],getStrokeWidth:3}))]}}])&&s(n.prototype,r),o&&s(n,o),p}(r.CompositeLayer);e.default=p,h(p,"layerName","ElevatedEditHandleLayer"),h(p,"defaultProps",{})},function(t,e,n){"use strict";n.r(e),e.default={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={outlineEnabled:!1,outlineRenderShadowmap:!1,outlineShadowmap:null};var i={name:"outline",vs:"attribute float instanceZLevel;\nvarying float outline_vzLevel;\nvarying vec4 outline_vPosition;\n\n// Set the z level for the outline shadowmap rendering\nvoid outline_setZLevel(float zLevel) {\n  outline_vzLevel = zLevel;\n}\n\n// Store an adjusted position for texture2DProj\nvoid outline_setUV(vec4 position) {\n  // mat4(\n  //   0.5, 0.0, 0.0, 0.0,\n  //   0.0, 0.5, 0.0, 0.0,\n  //   0.0, 0.0, 0.5, 0.0,\n  //   0.5, 0.5, 0.5, 1.0\n  // ) * position;\n  outline_vPosition = vec4(position.xyz * 0.5 + position.w * 0.5, position.w);\n}\n",fs:"uniform bool outline_uEnabled;\nuniform bool outline_uRenderOutlines;\nuniform sampler2D outline_uShadowmap;\n\nvarying float outline_vzLevel;\n// varying vec2 outline_vUV;\nvarying vec4 outline_vPosition;\n\nconst float OUTLINE_Z_LEVEL_ERROR = 0.01;\n\n// Return a darker color in shadowmap\nvec4 outline_filterShadowColor(vec4 color) {\n  return vec4(outline_vzLevel / 255., outline_vzLevel / 255., outline_vzLevel / 255., 1.);\n}\n\n// Return a darker color if in shadowmap\nvec4 outline_filterDarkenColor(vec4 color) {\n  if (outline_uEnabled) {\n    float maxZLevel;\n    if (outline_vPosition.q > 0.0) {\n      maxZLevel = texture2DProj(outline_uShadowmap, outline_vPosition).r * 255.;\n    } else {\n      discard;\n    }\n    if (maxZLevel < outline_vzLevel + OUTLINE_Z_LEVEL_ERROR) {\n      vec4(color.rgb * 0.5, color.a);\n    } else {\n      discard;\n    }\n  }\n  return color;\n}\n\n// if enabled and rendering outlines - Render depth to shadowmap\n// if enabled and rendering colors - Return a darker color if in shadowmap\n// if disabled, just return color\nvec4 outline_filterColor(vec4 color) {\n  if (outline_uEnabled) {\n    return outline_uRenderOutlines ?\n      outline_filterShadowColor(color) :\n      outline_filterDarkenColor(color);\n  }\n  return color;\n}\n",getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,e=t.outlineEnabled,n=t.outlineRenderShadowmap,i=t.outlineShadowmap,o={};return void 0!==e&&(o.outline_uEnabled=e),void 0!==n&&(o.outline_uRenderOutlines=n),void 0!==i&&(o.outline_uShadowmap=i),o}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(25),i=n(41),o=n(344),a=c(n(725)),s=c(n(1271)),u=c(n(1272)),l=n(1273);function c(t){return t&&t.__esModule?t:{default:t}}function f(t){return f="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},f(t)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return p(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(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 d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(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 g(t,e){return!e||"object"!==f(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(){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}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=o.SimpleMeshLayer,w={mesh:new s.default({headSize:.2,tailWidth:.05})},x=Object.assign({},a.default.defaultProps,{MarkerLayer:A,markerLayerProps:w,sizeScale:100,fp64:!1,highlightIndex:-1,highlightPoint:null,getPath:function(t){return t.path},getColor:function(t){return t.color},getMarkerColor:function(t){return[0,0,0,255]},getDirection:function(t){return t.direction},getMarkerPercentages:function(t,e){return e.lineLength>.1?[.25,.5,.75]:[.5]}}),E=function(t){!function(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&&b(t,e)}(p,t);var e,n,o,c,f=(e=p,function(){var t,n=v(e);if(y()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return g(this,t)});function p(){return d(this,p),f.apply(this,arguments)}return n=p,(o=[{key:"initializeState",value:function(){this.state={markers:[],mesh:new s.default({headSize:.2,tailWidth:.05}),closestPoint:null}}},{key:"projectFlat",value:function(t,e,n,i){if(n===r.COORDINATE_SYSTEM.METER_OFFSETS){var o=h(e.metersToLngLatDelta(t),2),a=o[0],s=o[1],u=h(i,2),l=u[0],c=u[1];return e.projectFlat([l+a,s+c])}if(n===r.COORDINATE_SYSTEM.LNGLAT_OFFSETS){var f=h(t,2),p=f[0],d=f[1],m=h(i,2),g=m[0],y=m[1];return e.projectFlat([g+p,d+y])}return e.projectFlat(t)}},{key:"updateState",value:function(t){var e=this,n=t.props,r=t.oldProps,i=t.changeFlags;if(i.dataChanged||i.updateTriggersChanged){var o=this.props,a=o.data,s=o.getPath,l=o.getDirection,c=o.getMarkerColor,f=o.getMarkerPercentages,h=o.coordinateSystem,p=o.coordinateOrigin,d=this.context.viewport;this.state.markers=(0,u.default)({data:a,getPath:s,getDirection:l,getColor:c,getMarkerPercentages:f,projectFlat:function(t){return e.projectFlat(t,d,h,p)}}),this._recalculateClosestPoint()}i.propsChanged&&n.point!==r.point&&this._recalculateClosestPoint()}},{key:"_recalculateClosestPoint",value:function(){var t=this.props,e=t.highlightPoint,n=t.highlightIndex;if(e&&n>=0){var r=this.props.data[n],i=this.props.getPath(r),o=(0,l.getClosestPointOnPolyline)({points:i,p:e}).point;this.state.closestPoints=[{position:o}]}else this.state.closestPoints=[]}},{key:"getPickingInfo",value:function(t){var e=t.info;return Object.assign(e,{object:e.object&&e.object.path||e.object})}},{key:"renderLayers",value:function(){return[new a.default(this.props,this.getSubLayerProps({id:"paths",data:this.props.data})),new this.props.MarkerLayer(this.getSubLayerProps(Object.assign({},this.props.markerLayerProps,{id:"markers",data:this.state.markers,getOrientation:function(t){return[0,-t.angle,0]},getColor:function(t){return t.color},sizeScale:this.props.sizeScale,fp64:this.props.fp64,pickable:!1,parameters:{blend:!1,depthTest:!1}}))),this.state.closestPoints&&new i.ScatterplotLayer({id:"".concat(this.props.id,"-highlight"),data:this.state.closestPoints,fp64:this.props.fp64})]}}])&&m(n.prototype,o),c&&m(n,c),p}(r.CompositeLayer);e.default=E,_(E,"layerName","PathMarkerLayer"),_(E,"defaultProps",x)},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(){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}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){!function(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&&u(t,e)}(r,t);var e,n=(e=r,function(){var t,n=s(e);if(a()){var r=s(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return o(this,t)});function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,r),n.call(this,Object.assign({},t,{attributes:c(t)}))}return r}(n(28).Geometry);function c(t){for(var e=t.length,n=void 0===e?1:e,r=t.headSize,i=void 0===r?.2:r,o=t.tailWidth,a=void 0===o?.05:o,s=t.tailStart,u=void 0===s?.05:s,l=[.5,1,0,.5-i/2,1-i,0,.5+i/2,1-i,0,.5-a/2,u,0,.5+a/2,1-i,0,.5+a/2,u,0,.5-a/2,u,0,.5-a/2,1-i,0,.5+a/2,1-i,0],c=new Array(l.length),f=0;f<l.length/3;f++){var h=3*f;c[h+0]=(l[h+0]-.5)*n,c[h+1]=(l[h+1]-.5)*n,c[h+2]=0}return{positions:new Float32Array(c),normals:new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1]),texCoords:new Float32Array(l)}}e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n=t.data,o=t.getPath,c=void 0===o?function(t){return t.path}:o,f=t.getDirection,h=void 0===f?function(t){return t.direction}:f,p=t.getColor,d=void 0===p?function(t){return s}:p,m=t.getMarkerPercentages,g=void 0===m?function(t,e){return[.5]}:m,y=t.projectFlat,v=[],b=i(n);try{for(b.s();!(e=b.n()).done;){var _,A=e.value,w=c(A),x=h(A)||u,E=d(A),O=w.map((function(t){return new r.Vector2(t)})),S=O.slice(0).reverse(),P=a(O),C=i(g(A,{lineLength:P}));try{for(C.s();!(_=C.n()).done;){var T=_.value;if(x.forward){var k=l({path:O,percentage:T,lineLength:P,color:E,object:A,projectFlat:y});v.push(k)}if(x.backward){var I=l({path:S,percentage:T,lineLength:P,color:E,object:A,projectFlat:y});v.push(I)}}}catch(L){C.e(L)}finally{C.f()}}}catch(L){b.e(L)}finally{b.f()}return v};var r=n(726);function i(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return o(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function o(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 a(t){for(var e=0,n=0;n<t.length-1;n++)e+=t[n].distance(t[n+1]);return e}var s=[0,0,0,255],u={forward:!0,backward:!1};function l(t){var e=t.path,n=t.percentage,i=t.lineLength,o=t.color,a=t.object,s=t.projectFlat,u=i*n,l=0,c=0,f=0;for(f=0;f<e.length-1&&!((l+=e[f].distance(e[f+1]))>u);f++)c=l;f===e.length-1&&(f-=1);var h=u-c,p=e[f+1].clone().subtract(e[f]).normalize().clone().multiply(new r.Vector2(h,h)).add(e[f]),d=180*new r.Vector2(s(e[f+1])).subtract(s(e[f])).verticalAngle()/Math.PI;return{position:[p.x,p.y,0],angle:d,color:o,object:a}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getClosestPointOnLine=i,e.getClosestPointOnPolyline=function(t){var e=t.p,n=t.points;e=new r.Vector3(e);for(var o=null,a=1/0,s=-1,u=0;u<n.length-1;++u){var l=n[u],c=n[u+1],f=i({p:e,p1:l,p2:c}),h=e.distanceSquared(f);h<a&&(a=h,o=f,s=u)}return{point:o,index:s,p1:n[s],p2:n[s+1],distanceSquared:a,distance:Math.sqrt(a)}};var r=n(726);function i(t){var e=t.p,n=t.p1,i=t.p2,o=t.clampToLine,a=void 0===o||o,s=new r.Vector3(i).subtract(n),u=new r.Vector3(e).subtract(n),l=s.dot(u);return a&&(l=(0,r.clamp)(l,0,1)),s.lerp(l)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(25),i=n(41);function o(t){return o="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},o(t)}function a(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(){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}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m=function(t){!function(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&&p(t,e)}(d,t);var e,n,r,o,a=(e=d,function(){var t,n=h(e);if(f()){var r=h(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return c(this,t)});function d(){return u(this,d),a.apply(this,arguments)}return n=d,(r=[{key:"renderLayers",value:function(){var t=this.props,e=t.id,n=t.getFillColor,r=t.getStrokeColor,o=t.getInnerRadius,a=t.updateTriggers;return[new i.ScatterplotLayer(s({},this.props,{id:"".concat(e,"-full"),data:this.props.data,getLineColor:r,updateTriggers:s({},a,{getStrokeColor:a.getStrokeColor})})),new i.ScatterplotLayer(s({},this.props,{id:"".concat(e,"-inner"),data:this.props.data,getFillColor:n,getRadius:o,pickable:!1,updateTriggers:s({},a,{getFillColor:a.getFillColor,getRadius:a.getInnerRadius})}))]}}])&&l(n.prototype,r),o&&l(n,o),d}(r.CompositeLayer);e.default=m,d(m,"layerName","JunctionScatterplotLayer"),d(m,"defaultProps",s({},i.ScatterplotLayer.defaultProps,{getFillColor:function(t){return[0,0,0,255]},getStrokeColor:function(t){return[255,255,255,255]},getInnerRadius:function(t){return 1}}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(41),i=u(n(343)),o=n(426),a=n(727),s=u(n(516));function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="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},l(t)}function c(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 f(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?h(t):e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t){!function(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&&m(t,e)}(g,t);var e,n,i,u,l=(e=g,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)});function g(t){var e,n,r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),e=l.call(this,t),n=h(e),i=void 0,(r="deckCache")in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,e.deckCache=new s.default(t.getData,(function(e){return t.toNebulaFeature(e)})),e}return n=g,(i=[{key:"render",value:function(t){var e=t.nebula,n=[0,0,0,255],i=this.deckCache,s=i.objects,u=i.updateTrigger,l=e.props.viewport.zoom;return new r.TextLayer({id:"texts-".concat(this.id),data:s,opacity:1,fp64:!1,pickable:!1,getText:function(t){return t.style.text},getPosition:function(t){return t.geoJson.geometry.coordinates},getColor:function(t){return(0,o.toDeckColor)(t.style.fillColor)||n},sizeScale:1/Math.pow(2,20-l),getSize:a.PROJECTED_PIXEL_SIZE_MULTIPLIER,updateTriggers:{all:u},nebulaLayer:this})}}])&&c(n.prototype,i),u&&c(n,u),g}(i.default);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=n(510),o=c(n(1277)),a=n(715),s=c(n(343)),u=n(426),l=c(n(516));function c(t){return t&&t.__esModule?t:{default:t}}function f(t){return f="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},f(t)}function h(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 p(t,e){return!e||"object"!==f(e)&&"function"!==typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(){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}}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function y(t,e){return y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},y(t,e)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=(v(r={},a.ArrowStyles.NONE,{forward:!1,backward:!1}),v(r,a.ArrowStyles.FORWARD,{forward:!0,backward:!1}),v(r,a.ArrowStyles.BACKWARD,{forward:!1,backward:!0}),v(r,a.ArrowStyles.BOTH,{forward:!0,backward:!0}),r),_=function(t){!function(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&&y(t,e)}(f,t);var e,n,r,s,c=(e=f,function(){var t,n=g(e);if(m()){var r=g(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function f(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),v(d(e=c.call(this,t)),"deckCache",void 0),v(d(e),"noBlend",void 0),v(d(e),"highlightColor",void 0),v(d(e),"arrowSize",void 0),v(d(e),"jointRounded",void 0),v(d(e),"capRounded",void 0),v(d(e),"dashed",void 0),v(d(e),"markerLayerProps",void 0),e.deckCache=new l.default(t.getData,(function(e){return t.toNebulaFeature(e)})),e.enableSelection=!0;var n=t.enablePicking,r=void 0===n||n,i=t.noBlend,o=void 0!==i&&i,a=t.jointRounded,s=void 0===a||a,u=t.capRounded,h=void 0===u||u,p=t.dashed,m=void 0!==p&&p,g=t.markerLayerProps,y=void 0===g?null:g;return Object.assign(d(e),{enablePicking:r,noBlend:o,jointRounded:s,capRounded:h,dashed:m,markerLayerProps:y}),e}return n=f,(r=[{key:"getMouseOverSegment",value:function(){return null}},{key:"_calcMarkerPercentages",value:function(t){var e=t.style.arrowPercentages;return e||((t.style.arrowStyle||a.DEFAULT_STYLE.arrowStyle)===a.ArrowStyles.NONE?[]:[[.5],[.33,.66],[.25,.5,.75]][Math.min(t.style.arrowCount||a.DEFAULT_STYLE.arrowCount,a.MAX_ARROWS)-1])}},{key:"_getHighlightedObjectIndex",value:function(t){var e=t.nebula.deckglMouseOverInfo;if(e){var n=e.originalLayer,r=e.index;if(n===this)return r}return-1}},{key:"render",value:function(t){var e=t.nebula,n=[0,0,0,255],r=this.deckCache,a=r.objects,s=r.updateTrigger;return new i.PathMarkerLayer({id:"segments-".concat(this.id),data:a,opacity:1,fp64:!1,jointRounded:this.jointRounded,capRounded:this.capRounded,pickable:!0,sizeScale:this.arrowSize||6,parameters:{depthTest:!1,blend:!this.noBlend,blendEquation:o.default.MAX},getPath:function(t){return t.geoJson.geometry.coordinates},getColor:function(t){return(0,u.toDeckColor)(t.style.lineColor,n)},getWidth:function(t){return t.style.lineWidthMeters||1},getZLevel:function(t){return 255*t.style.zLevel},getDirection:function(t){return b[t.style.arrowStyle]},getMarkerColor:function(t){return(0,u.toDeckColor)(t.style.arrowColor,n)},getMarkerPercentages:this._calcMarkerPercentages,updateTriggers:{all:s},highlightedObjectIndex:this._getHighlightedObjectIndex({nebula:e}),highlightColor:(0,u.toDeckColor)(this.highlightColor),dashJustified:this.dashed,getDashArray:this.dashed?function(t){return t.style.dashArray}:null,markerLayerProps:this.markerLayerProps||i.PathMarkerLayer.defaultProps.markerLayerProps,nebulaLayer:this})}}])&&h(n.prototype,r),s&&h(n,s),f}(s.default);e.default=_},function(t,e,n){"use strict";n.r(e),e.default={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(467),i=l(n(1279)),o=n(25),a=l(n(716)),s=l(n(717)),u=l(n(343));function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return f(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(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.")}()}function f(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 h(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 p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,"props",void 0),p(this,"deckgl",void 0),p(this,"mainContainer",void 0),p(this,"deckglMouseOverInfo",void 0),p(this,"_deckDrawer",void 0),p(this,"_mouseWasDown",void 0),p(this,"wmViewport",void 0),p(this,"queryObjectEvents",new r.EventEmitter),p(this,"forceUpdate",void 0),p(this,"inited",void 0),p(this,"_onMouseEvent",(function(t){if(e._isNebulaEvent(t)){"mousedown"===t.type&&(e._mouseWasDown=!0);var n=e.mainContainer?e.mainContainer.getBoundingClientRect():{},r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,s=new Proxy(t,{get:function(t,e){if("offsetX"===e)return t.pageX-a;if("offsetY"===e)return t.pageY-i;if("type"===e)return t.type.replace("pointer","mouse");var n=t[e];return"function"===typeof n?n.bind(t):n}});e._handleDeckGLEvent(s)}}))}var e,n,l;return e=t,(n=[{key:"init",value:function(t){var e=this;this.props=t,this.wmViewport=new o.WebMercatorViewport(this.props.viewport),["click","mousemove","mouseup","mousedown"].forEach((function(t){return i.default.addEventListener(t,e._onMouseEvent,!0)}))}},{key:"detach",value:function(){var t=this;["click","mousemove","mouseup","mousedown"].forEach((function(e){return i.default.removeEventListener(e,t._onMouseEvent,!0)}))}},{key:"updateProps",value:function(t){this.props=t;var e=this.props.viewport;this.wmViewport=new o.WebMercatorViewport(e)}},{key:"log",value:function(t){var e=this.props.logger;e&&e.info&&e.info("Nebula: "+t)}},{key:"updateAllDeckObjects",value:function(){this.getAllLayers().forEach((function(t){t&&t.deckCache&&t.deckCache.updateAllDeckObjects()})),this.forceUpdate()}},{key:"updateDeckObjectsByIds",value:function(t){this.getAllLayers().forEach((function(e){e&&e.deckCache&&e.deckCache.updateDeckObjectsByIds(t)})),this.forceUpdate()}},{key:"rerenderLayers",value:function(){this.updateAllDeckObjects()}},{key:"_isNebulaEvent",value:function(t){var e=t.buttons,n=t.target,r=t.type,i=this.props.viewport;if(this._mouseWasDown&&"mouseup"===r)return this._mouseWasDown=!1,!0;if("mousemove"===r&&e>0)return!0;if(!n.getBoundingClientRect)return!1;var o=n.getBoundingClientRect();return Math.round(o.width)===Math.round(i.width)&&Math.round(o.height)===Math.round(i.height)}},{key:"getMouseGroundPosition",value:function(t){return this.wmViewport.unproject([t.offsetX,t.offsetY])}},{key:"unprojectMousePosition",value:function(t){return this.wmViewport.unproject(t)}},{key:"_handleDeckGLEvent",value:function(t){var e=this.deckgl,n=this.props,r=n.onMapMouseEvent,o=n.selectionType,u=n.eventFilter,l=!0,c="auto";if(t&&e&&o){this._deckDrawer||(this._deckDrawer=new a.default(this));var f=this.getMouseGroundPosition(t);if(u&&!u(f,t))return;this._deckDrawer.handleEvent(t,f,o).redraw&&this.forceUpdate()}else{if(t&&e&&(!t.buttons||"mousemove"!==t.type)){var h=e.props.layers.filter((function(t){return t&&t.props&&t.props.nebulaLayer&&t.props.nebulaLayer.enablePicking})).map((function(t){return t.id})),p=e.pickObject({x:t.offsetX,y:t.offsetY,radius:5,layerIds:h});if(this.queryObjectEvents.emit("pick",{event:t,pickingInfo:p}),p){l=!1;var d=p.index,m=p.lngLat;if(u&&!u(m,t))return;var g=p.layer,y=p.object;g&&g.props&&g.props.nebulaLayer&&g.props.nebulaLayer.eventHandler&&g.props.nebulaLayer.eventHandler(t,p);var v=y.original||g.props.nebulaLayer&&g.props.nebulaLayer.deckCache&&g.props.nebulaLayer.deckCache.originals[d];if(v){this.deckglMouseOverInfo={originalLayer:g.props.nebulaLayer,index:d};var b=new s.default(t,{data:v,metadata:y.metadata,groundPoint:m,nebula:this});g.props.nebulaLayer.emit(t.type,b),this.forceUpdate()}c="pointer"}}if(i.default.documentElement&&(i.default.documentElement.style.cursor=c),l){this.deckglMouseOverInfo=null;var _=this.getMouseGroundPosition(t);if(u&&!u(_,t))return;var A=new s.default(t,{groundPoint:_,nebula:this});this.getAllLayers().filter((function(t){return t&&t.usesMapEvents})).forEach((function(t){return t.emit("mapMouseEvent",A)})),this.getAllLayers().filter((function(t){return t&&t.props&&t.props.nebulaLayer&&t.props.nebulaLayer.mapMouseEvent})).forEach((function(t){return t.props.nebulaLayer.mapMouseEvent(A,t)})),r&&r(t,_)}}}},{key:"getExtraDeckLayers",value:function(){var t=[];return this._deckDrawer&&t.push.apply(t,c(this._deckDrawer.render())),t}},{key:"renderDeckLayers",value:function(){var t=this;return this.getAllLayers().map((function(e){return e instanceof u.default?e.render({nebula:t}):e})).filter(Boolean)}},{key:"getAllLayers",value:function(){var t=[];return this.props.layers.filter(Boolean).forEach((function(e){t.push(e),e instanceof u.default&&t.push.apply(t,c(e.helperLayers))})),t.filter(Boolean)}},{key:"getRenderedLayers",value:function(){return[].concat(c(this.renderDeckLayers()),c(this.getExtraDeckLayers()))}},{key:"updateAndGetRenderedLayers",value:function(t,e,n){return this.inited?(this.updateProps({layers:t,viewport:e}),this.forceUpdate=function(){return n.forceUpdate()}):(this.inited=!0,this.init({layers:t,viewport:e}),this.forceUpdate=function(){return n.forceUpdate()},this.updateAllDeckObjects()),this.getRenderedLayers()}},{key:"setDeck",value:function(t){t&&(this.deckgl=t)}},{key:"setMainContainer",value:function(t){t&&(this.mainContainer=t)}}])&&h(e.prototype,n),l&&h(e,l),t}();e.default=d},function(t,e,n){(function(e){var r,i="undefined"!==typeof e?e:"undefined"!==typeof window?window:{},o=n(1280);"undefined"!==typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),t.exports=r}).call(this,n(36))},function(t,e){},function(t,e,n){"use strict";n.r(e),n.d(e,"buildCloseLinePointsLayer",(function(){return i}));var r=n(126),i=(n(69),function(t){var e=t.drawingMode;return new r.a({id:"geojson-layer",data:e.closeLinePoints,pointType:"circle",getPointRadius:100,getFillColor:[0,0,255],pointRadiusMinPixels:2,pointRadiusMaxPixels:2,pickable:!1})})},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(88),a=n(91),s=n.n(a),u=n(322),l=n(704),c=n.n(l);n(1288),n(1289),n(523);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 h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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 m=function(t){var e=t.media.length-1,n=new s.a(function(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){h(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}({restrictions:{numberOfFiles:4},autoProceed:!0},t.options));return n.use(c.a,{directUploadUrl:"/direct_uploads"}),n.on("complete",(function(t){t.successful.forEach((function(t){!function(t,e){var n=p(t.response.service_name.split(/_/),2),r=(n[0],n[1]),i=document.querySelector("form[data-form-element-name]"),o="".concat(i.dataset.formElementName,"[attached_").concat(r,"_attributes][").concat(e,"]"),a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name","".concat(o,"[file]")),a.setAttribute("data-pending-upload",!0),a.setAttribute("value",t.response.signed_id);var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name","".concat(o,"[name]")),s.setAttribute("value",t.name),i.appendChild(a),i.appendChild(s)}(t,e+=1)})),document.querySelector("form[data-step] input[name=save]").click(),n.reset()})),i.a.createElement(g,Object.assign({},t,{uppy:n}))};m.defaultProps={options:{}};var g=function(t){var e=p(Object(r.useState)(t.media),2),n=e[0],o=e[1],a=n.map((function(t){return"".concat(t.type,":").concat(t.id)}));return i.a.createElement("div",{className:"Media"},a.map((function(e,n){return i.a.createElement("input",{key:"media-item-".concat(n),type:"hidden",name:"".concat(t.param_key,"[media_sort_order][]"),value:e,readOnly:!0})})),i.a.createElement(u.a,{uppy:t.uppy,note:"",locale:t.locale}),i.a.createElement("br",null),i.a.createElement(u.b,{uppy:t.uppy,hideUploadButton:!0,hideAfterFinish:!1,showProgressDetails:!0}),i.a.createElement(b,{media:n,param_key:t.param_key,onUpdatedSort:function(t){if(t.destination&&t.destination.index!==t.source.index){var e=function(t,e,n){var r=Array.from(t),i=p(r.splice(e,1),1)[0];return r.splice(n,0,i),r}(n,t.source.index,t.destination.index);o(e)}}}))},y=function(t){var e=p(Object(r.useState)(!1),2),n=e[0],a=e[1],s=p(Object(r.useState)(!1),2),u=s[0],l=s[1],c=p(Object(r.useState)(t.name),2),f=c[0],h=(c[1],p(Object(r.useState)(t.description),2)),d=h[0],m=h[1],g=p(Object(r.useState)(t.credit),2),y=g[0],v=g[1],b=function(t){return a(!n),t.preventDefault(),!1},_=function(t){return l(!u),t.preventDefault(),!1};return i.a.createElement(o.b,{draggableId:t.id,index:t.index,className:"uploadedItem"},(function(e){return i.a.createElement("div",Object.assign({ref:e.innerRef},e.draggableProps,{className:"uploadedItem"}),i.a.createElement("input",{type:"hidden",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][id]"),value:t.id}),i.a.createElement("input",{type:"hidden",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][name]"),value:f}),i.a.createElement("input",{type:"hidden",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][_destroy]"),value:u}),i.a.createElement("div",e.dragHandleProps,"-"),t.url&&"image"===t.type&&i.a.createElement("img",{src:t.url,alt:t.name,style:{maxHeight:"100px"}}),i.a.createElement(i.a.Fragment,null,i.a.createElement("textarea",{name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][description]"),value:d||"",style:{width:"100%"},onChange:function(t){var e=t.currentTarget;return m(e.value)}}),i.a.createElement("input",{type:"text",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][credit]"),value:y||"",onChange:function(t){var e=t.currentTarget;return v(e.value)}})),i.a.createElement("a",{href:"#",onClick:b},n?"Done":"Edit")," ",i.a.createElement("a",{href:"#",onClick:_},u?"Marked as deleted":"Delete"))}))},v=function(t){return i.a.createElement("div",{className:"uploadedItems"},t.media.map((function(e,n){return i.a.createElement(y,Object.assign({param_key:t.param_key},e,{index:n,key:"media-item-".concat(n)}))})))},b=function(t){return i.a.createElement(o.a,{onDragEnd:t.onUpdatedSort},i.a.createElement(o.c,{droppableId:"media-items"},(function(e,n){return i.a.createElement("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:n.isDraggingOver?"dragging":"inactive"}),i.a.createElement(v,{media:t.media,param_key:t.param_key}),e.placeholder)})))};e.default=m},function(t,e,n){var r=n(931),i=n(86).h;t.exports=function(t){var e=t.file;if(e.preview)return i("img",{className:"uppy-Dashboard-Item-previewImg",alt:e.name,src:e.preview});var n=r(e.type),o=n.color,a=n.icon;return i("div",{className:"uppy-Dashboard-Item-previewIconWrap"},i("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:o}},a),i("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},i("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}},function(t,e,n){function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(86),o=i.h,a=function(t){var e,n;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).triggerFileInputClick=function(){e.fileInput.click()},e.triggerFolderInputClick=function(){e.folderInput.click()},e.onFileInputChange=function(t){e.props.handleInputChange(t),t.target.value=null},e.renderHiddenInput=function(t,n){return o("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:t,type:"file",name:"files[]",multiple:1!==e.props.maxNumberOfFiles,onChange:e.onFileInputChange,accept:e.props.allowedFileTypes,ref:n})},e.renderMyDeviceAcquirer=function(){return o("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},o("button",{type:"button",className:"uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:e.triggerFileInputClick},o("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},o("g",{fill:"none",fillRule:"evenodd"},o("rect",{className:"uppy-ProviderIconBg",width:"32",height:"32",rx:"16",fill:"#2275D7"}),o("path",{d:"M21.973 21.152H9.863l-1.108-5.087h14.464l-1.246 5.087zM9.935 11.37h3.958l.886 1.444a.673.673 0 0 0 .585.316h6.506v1.37H9.935v-3.13zm14.898 3.44a.793.793 0 0 0-.616-.31h-.978v-2.126c0-.379-.275-.613-.653-.613H15.75l-.886-1.445a.673.673 0 0 0-.585-.316H9.232c-.378 0-.667.209-.667.587V14.5h-.782a.793.793 0 0 0-.61.303.795.795 0 0 0-.155.663l1.45 6.633c.078.36.396.618.764.618h13.354c.36 0 .674-.246.76-.595l1.631-6.636a.795.795 0 0 0-.144-.675z",fill:"#FFF"}))),o("div",{className:"uppy-DashboardTab-name"},e.props.i18n("myDevice"))))},e.renderBrowseButton=function(t,n){var r=e.props.acquirers.length;return o("button",{type:"button",className:"uppy-u-reset uppy-Dashboard-browse",onClick:n,"data-uppy-super-focusable":0===r},t)},e.renderDropPasteBrowseTagline=function(){var t=e.props.acquirers.length,n=e.props.fileManagerSelectionType,r=n.charAt(0).toUpperCase()+n.slice(1),i="browse",a="browse",s="browse";if("files"===n)try{i=e.props.i18n("browse"),a=e.props.i18n("browse"),s=e.props.i18n("browse")}catch(h){}try{a=e.props.i18n("browseFiles"),s=e.props.i18n("browseFolders")}catch(p){}var u,l=e.renderBrowseButton(i,e.triggerFileInputClick),c=e.renderBrowseButton(a,e.triggerFileInputClick),f=e.renderBrowseButton(s,e.triggerFolderInputClick);if(u=t>0?e.props.i18nArray("dropPasteImport"+r,{browseFiles:c,browseFolders:f,browse:l}):e.props.i18nArray("dropPaste"+r,{browseFiles:c,browseFolders:f,browse:l}),"files"===n)try{u=t>0?e.props.i18nArray("dropPasteImport",{browse:l}):e.props.i18nArray("dropPaste",{browse:l})}catch(d){}return o("div",{className:"uppy-Dashboard-AddFiles-title"},u)},e.renderAcquirer=function(t){return o("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":t.id},o("button",{type:"button",className:"uppy-DashboardTab-btn",role:"tab",tabIndex:0,"aria-controls":"uppy-DashboardContent-panel--"+t.id,"aria-selected":e.props.activePickerPanel.id===t.id,"data-uppy-super-focusable":!0,onClick:function(){return e.props.showPanel(t.id)}},t.icon(),o("div",{className:"uppy-DashboardTab-name"},t.name)))},e.renderAcquirers=function(t){var n=[].concat(t),r=n.splice(t.length-2,t.length);return o("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},e.renderMyDeviceAcquirer(),n.map((function(t){return e.renderAcquirer(t)})),o("span",{role:"presentation",style:"white-space: nowrap;"},r.map((function(t){return e.renderAcquirer(t)}))))},e}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var a=i.prototype;return a.renderPoweredByUppy=function(){var t=o("span",null,o("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},o("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),o("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy")),e=this.props.i18nArray("poweredBy2",{backwardsCompat:this.props.i18n("poweredBy"),uppy:t});return o("a",{tabIndex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},e)},a.render=function(){var t=this;return o("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,(function(e){t.fileInput=e})),this.renderHiddenInput(!0,(function(e){t.folderInput=e})),this.renderDropPasteBrowseTagline(),this.props.acquirers.length>0&&this.renderAcquirers(this.props.acquirers),o("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&o("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))},i}(i.Component);t.exports=a},function(t,e){t.exports=function(t){var e=t.target.tagName;"INPUT"!==e&&"TEXTAREA"!==e?(t.preventDefault(),t.stopPropagation()):t.stopPropagation()}},function(t,e){t.exports=function(t,e){if(e){var n=t.querySelector('[data-uppy-paneltype="'+e+'"]');if(n)return n}return t}},function(t,e,n){"use strict";var r=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},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();t.exports=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.uppy=e,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this)}return t.prototype.onReceiveResponse=function(t){var e,n=this.uppy.getState().companion||{},i=this.opts.serverUrl,o=t.headers;o.has("i-am")&&o.get("i-am")!==n[i]&&this.uppy.setState({companion:r({},n,(e={},e[i]=o.get("i-am"),e))});return t},t.prototype._getUrl=function(t){return/^(https?:|)\/\//.test(t)?t:this.hostname+"/"+t},t.prototype.get=function(t){var e=this;return fetch(this._getUrl(t),{method:"get",headers:this.headers,credentials:"same-origin"}).then(this.onReceiveResponse).then((function(t){return t.json()})).catch((function(n){throw new Error("Could not get "+e._getUrl(t)+". "+n)}))},t.prototype.post=function(t,e){var n=this;return fetch(this._getUrl(t),{method:"post",headers:this.headers,credentials:"same-origin",body:JSON.stringify(e)}).then(this.onReceiveResponse).then((function(e){if(e.status<200||e.status>300)throw new Error("Could not post "+n._getUrl(t)+". "+e.statusText);return e.json()})).catch((function(e){throw new Error("Could not post "+n._getUrl(t)+". "+e)}))},t.prototype.delete=function(t,e){var n=this;return fetch(this.hostname+"/"+t,{method:"delete",headers:this.headers,credentials:"same-origin",body:e?JSON.stringify(e):null}).then(this.onReceiveResponse).then((function(t){return t.json()})).catch((function(e){throw new Error("Could not delete "+n._getUrl(t)+". "+e)}))},i(t,[{key:"hostname",get:function(){var t=this.uppy.getState().companion,e=this.opts.serverUrl;return(t&&t[e]?t[e]:e).replace(/\/$/,"")}},{key:"defaultHeaders",get:function(){return{Accept:"application/json","Content-Type":"application/json"}}},{key:"headers",get:function(){return r({},this.defaultHeaders,this.opts.serverHeaders||{})}}]),t}()},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return w}));var r=n(0),i=n.n(r),o=n(49),a=n(628),s=n(418),u=n(470),l=n(144),c=n(8),f=n.n(c);function h(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(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 g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function y(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=b(t);if(e){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var _=document.querySelector("meta[name=default-map-style-url]").getAttribute("content"),A=document.querySelector("meta[name=place-search-countries]").getAttribute("content"),w=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(h,t);var e,n,r,c=y(h);function h(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=c.call(this,t)).updateViewport=function(t){e.setState({viewport:t})},e.handleCheckboxChange=function(t){var n=t.target.checked;e.setState({hasPin:!n}),e.updateHasPin(!n)},e.onMarkerDrag=function(t){if(!e.props.interactiveMap)return!1;e.updateFields(t.lngLat)},e.onMarkerDragEnd=function(t){if(!e.props.interactiveMap)return!1;e.setState({marker:{longitude:t.lngLat[0],latitude:t.lngLat[1]}}),e.updateFields(t.lngLat)},e.onMapClick=function(t){if(!e.props.interactiveMap)return!1;e.setState({marker:{longitude:t.lngLat[0],latitude:t.lngLat[1]}}),e.updateFields(t.lngLat)},e.mapRef=i.a.createRef(),e.handleViewportChange=function(t){e.setState({viewport:p(p({},e.state.viewport),t)})},e.handleGeocoderResult=function(t){if(!e.props.interactiveMap)return!1;e.setState({marker:{longitude:t.result.center[0],latitude:t.result.center[1]}}),e.updateFields(t.result.center)},e.handleGeocoderViewportChange=function(t){return e.handleViewportChange(p(p({},t),{transitionDuration:1e3}))},e.getBaseMapURL=function(){return e.props.base_map?"/basemaps/".concat(e.props.base_map):_};var n="number"===typeof t.latitude?t.latitude:parseFloat(document.getElementById("latitude").value||51.53),r="number"===typeof t.longitude?t.longitude:parseFloat(document.getElementById("longitude").value||.1277),o="undefined"!==typeof t.zoom?t.zoom:3.5;return e.countries=A,e.state={viewport:{width:"100%",height:400,latitude:n,longitude:r,zoom:o,bearing:0,pitch:0,maxZoom:20},marker:{latitude:n,longitude:r,object:t.object},events:{},hasPin:void 0===t.hasPin||t.hasPin},e.state.marker&&e.state.marker.object&&(e.state.viewport.latitude=n+600/111111),e.geocoderContainerRef=i.a.createRef(),e}return e=h,(n=[{key:"updateFields",value:function(t){document.getElementById("longitude").value=t[0].toFixed(5),document.getElementById("latitude").value=t[1].toFixed(5)}},{key:"updateHasPin",value:function(t){document.getElementById("has_pin").value=t}},{key:"render",value:function(){var t=this.state.hasPin?{}:{opacity:.5,pointerEvents:"none"},e=this.state,n=e.viewport,r=e.marker,c=e.searchResultLayer;return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{style:p({},t)},i.a.createElement("div",{ref:this.geocoderContainerRef,className:"geocoder-container"}),i.a.createElement(o.l,Object.assign({},n,{mapStyle:this.getBaseMapURL(),onViewportChange:this.updateViewport,onClick:this.onMapClick,ref:this.mapRef}),this.props.showGeocoder&&i.a.createElement(a.a,{mapRef:this.mapRef,onViewportChange:this.handleGeocoderViewportChange,containerRef:this.geocoderContainerRef,mapboxApiAccessToken:"pk.eyJ1IjoiaHVtYXAtaG9zdGluZyIsImEiOiJja2MyNTRraGYxMmJnMzFtcnI1c3VrMm5uIn0.BN87tr4QlV7jPUrIyeIC6g",position:"top-right",marker:!1,trackProximity:!0,countries:this.countries,onResult:this.handleGeocoderResult}),i.a.createElement(s.a,Object.assign({},n,{layers:[c]})),i.a.createElement(o.e,{latitude:r.latitude,longitude:r.longitude,offsetTop:-32,offsetLeft:-15,anchor:"bottom",style:this.state.hasPin?{visibility:"visible"}:{visibility:"hidden"},draggable:!0,onDragStart:this.onMarkerDragStart,onDragEnd:this.onMarkerDragEnd,onDrag:this.onMarkerDrag},i.a.createElement(u.default,{size:30})),this.state.marker&&this.state.marker.object&&i.a.createElement(o.g,{latitude:r.latitude,longitude:r.longitude,closeButton:!1},i.a.createElement(l.default,{path:"#",item:this.state.marker.object,onClick:function(t){return t.preventDefault()}})),i.a.createElement("div",{style:{position:"absolute",bottom:20,left:20}},i.a.createElement(o.f,{showCompass:!1})))),i.a.createElement("div",{className:"latAndLong"},i.a.createElement("span",null,f.a.t("components.wizard_map.latitude")),i.a.createElement("em",{id:"latitudeOutput"},this.state.hasPin?this.state.marker.latitude.toFixed(5):"N/A"),i.a.createElement("span",null,f.a.t("components.wizard_map.longitude")),i.a.createElement("em",{id:"longitudeOutput"},this.state.hasPin?this.state.marker.longitude.toFixed(5):"N/A")),this.props.allowNoPin&&i.a.createElement("div",{className:"setNoLocation formGroup formGroup--singleCheckbox"},i.a.createElement("input",{className:"checkbox",id:"use_pin_checkbox",type:"checkbox",value:"1",name:"use_pin_checkbox",checked:!this.state.hasPin,onChange:this.handleCheckboxChange}),i.a.createElement("label",{htmlFor:"use_pin_checkbox"},i.a.createElement("strong",null,f.a.t("components.wizard_map.dont_use_pin")),f.a.t("components.wizard_map.dont_use_pin_description"))))}}])&&m(e.prototype,n),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),h}(i.a.Component);w.defaultProps={showGeocoder:!0,interactiveMap:!0}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(88),a=n(91),s=n.n(a),u=n(322),l=n(704),c=n.n(l);n(1288),n(1289),n(523);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 h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(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 d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(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 m=document.querySelector("form[data-form-element-name]"),g=function(t){var e=t.media.length-1,n=new s.a(function(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){h(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}({restrictions:{numberOfFiles:4},autoProceed:!0},t.options));return n.use(c.a,{directUploadUrl:"/direct_uploads"}),n.on("complete",(function(r){r.successful.forEach((function(n){!function(t,e,n){var r,i=p(t.response.service_name.split(/_/),2),o=(i[0],i[1]);r=n?"".concat(m.dataset.formElementName,"[").concat(n,"_attributes]"):"".concat(m.dataset.formElementName,"[attached_").concat(o,"_attributes][").concat(e,"]");var a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name","".concat(r,"[file]")),a.setAttribute("data-pending-upload",!0),a.setAttribute("value",t.response.signed_id);var s=document.createElement("input");if(s.setAttribute("type","hidden"),s.setAttribute("name","".concat(r,"[name]")),s.setAttribute("value",t.name),document.querySelector("meta[name=user-id]")){var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","".concat(r,"[user_id]")),u.setAttribute("value",document.querySelector("meta[name=user-id]").getAttribute("content")),m.appendChild(u)}m.appendChild(a),m.appendChild(s);var l=m.querySelector("input[type=hidden][name=media_uploaded]");l&&l.setAttribute("value",!0)}(n,e+=1,t.fieldName)})),m.submit(),n.reset()})),i.a.createElement(y,Object.assign({},t,{uppy:n}))};g.defaultProps={options:{},showCaptionFields:!0};var y=function(t){var e=p(Object(r.useState)(t.media),2),n=e[0],o=e[1];Object(r.useEffect)((function(){if(m&&!m.querySelector("input[name=media_uploaded]")){var t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","media_uploaded"),t.setAttribute("value","false"),m.appendChild(t)}}),[]);var a=n.map((function(t){return"".concat(t.type,":").concat(t.id)}));return i.a.createElement("div",{className:"Media"},a.map((function(e,n){return i.a.createElement("input",{key:"media-item-".concat(n),type:"hidden",name:"".concat(t.param_key,"[media_sort_order][]"),value:e,readOnly:!0})})),i.a.createElement("div",{className:"addImages"},i.a.createElement(u.a,{uppy:t.uppy,note:"",locale:t.locale})),i.a.createElement("br",null),i.a.createElement(u.b,{uppy:t.uppy,hideUploadButton:!0,hideAfterFinish:!1,showProgressDetails:!0}),i.a.createElement(_,{media:n,param_key:t.param_key,showCaptionFields:t.showCaptionFields,onUpdatedSort:function(t){if(t.destination&&t.destination.index!==t.source.index){var e=function(t,e,n){var r=Array.from(t),i=p(r.splice(e,1),1)[0];return r.splice(n,0,i),r}(n,t.source.index,t.destination.index);o(e)}},onMediaUpdate:function(t){var e=parseInt(t.currentTarget.dataset.imageIndex,10),r=n.slice();r.splice(e,1),o(r)},licenseOptions:t.license_options}))},v=function(t){var e,n=p(Object(r.useState)(!1),2),a=n[0],s=n[1],u=p(Object(r.useState)(t.description),2),l=u[0],c=u[1],f=p(Object(r.useState)(t.credit),2),h=f[0],d=f[1],m=p(Object(r.useState)(t.rights_statement),2),g=m[0],y=m[1],v=p(Object(r.useState)(t.source_link),2),b=v[0],_=v[1],w=p(Object(r.useState)(t.identifier),2),x=w[0],E=w[1],O=p(Object(r.useState)(t.transcription),2),S=O[0],P=O[1],C=Object(r.useState)(t.licenseOptions.find((function(e){return e===t.license}))),T=p(C,2),k=T[0],I=T[1],L=function(e){t.onMediaUpdate(e),e.preventDefault();var n=document.querySelector("meta[name=remove_attachment_path]");return n?fetch(n.content,{method:"DELETE",headers:{"X-Csrf-Token":document.querySelector('meta[name="csrf-token"]').content,"Content-Type":"application/json"},body:JSON.stringify({attachment_id:t.id,attachment_type:t.type})}).then((function(t){s(t.ok)})):s(!a),!1};switch(t.type){case"image":e=t.url;break;case"video_embed":case"audio_embed":case"iiif_embed":e=t.image_url}return i.a.createElement(o.b,{draggableId:t.id,index:t.index,className:"uploadedItem"},(function(n){return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",Object.assign({ref:n.innerRef},n.draggableProps,{className:"uploadedItem ".concat(t.hero?"is-hero":""," ").concat(a?"is-deleted-":"")}),i.a.createElement("input",{type:"hidden",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][id]"),value:t.id}),i.a.createElement("input",{type:"hidden",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][name]"),value:name}),"video_embed"===t.type&&i.a.createElement("input",{type:"hidden",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][url]"),value:t.url}),"audio_embed"===t.type&&i.a.createElement("input",{type:"hidden",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][url]"),value:t.url}),i.a.createElement("div",n.dragHandleProps),i.a.createElement("div",{className:"thumbnail"},i.a.createElement("a",{href:"#",onClick:L,"data-image-index":t.index},i.a.createElement("span",null,a?"Marked as deleted":"Delete")),e&&i.a.createElement("img",{src:"".concat(e,"?w=512"),alt:t.name}),t.hero&&i.a.createElement("span",{className:"mainImage"},I18n.t("components.media.main_image"))),i.a.createElement("div",{className:"text-content"},t.showCaptionFields&&i.a.createElement(i.a.Fragment,null,i.a.createElement("textarea",{placeholder:I18n.t("components.media_item.fields.caption"),name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][description]"),value:l||"",style:{width:"100%"},onChange:function(t){var e=t.currentTarget;return c(e.value)}}),i.a.createElement("div",{className:t.showAdditionalFields?"additionalFields":""},t.showAdditionalFields&&i.a.createElement("label",null,I18n.t("components.media_item.fields.creator")),i.a.createElement("input",{placeholder:t.showAdditionalFields?"John Doe":"Credit",type:"text",name:"".concat(t.param_key,"[attached_").concat(t.type,"s_attributes][").concat(t.index,"][credit]"),value:h||"",onChange:function(t){var e=t.currentTarget;return d(e.value)}}),t.showAdditionalFields&&i.a.createElement(A,{props:t,rightStatement:g,setRightsStatement:y,sourceLink:b,setSourceLink:_,identifier:x,setIdentifier:E,transcription:S,setTranscription:P,license:k,setLicense:I,licenseOptions:t.licenseOptions}))))))}))};v.defaultProps={showCaptionFields:!0};var b=function(t){var e=p(Object(r.useState)(t.media.find((function(t){return t.rights_statement||t.source_link||t.identifier||t.transcription||t.license}))),2),n=e[0],o=e[1];return i.a.createElement("div",{className:"uploadedItems"},t.showCaptionFields&&t.media.length>0&&i.a.createElement("div",{className:"showAdditionalFieldsCheck"},i.a.createElement("input",{id:"showAdditionalFields",type:"checkbox",checked:n,onChange:function(){return o(!n)}}),i.a.createElement("label",{htmlFor:"showAdditionalFields"},I18n.t("components.media_list.show_additional_fields"))),t.media.map((function(e,r){return i.a.createElement(v,Object.assign({param_key:t.param_key},e,{index:r,showCaptionFields:t.showCaptionFields,key:"media-item-".concat(e.id),hero:0===r,onMediaUpdate:t.onMediaUpdate,licenseOptions:t.licenseOptions,showAdditionalFields:n,setShowAdditionalFields:o}))})))},_=function(t){return i.a.createElement(o.a,{onDragEnd:t.onUpdatedSort},i.a.createElement(o.c,{droppableId:"media-items"},(function(e,n){return i.a.createElement("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:n.isDraggingOver?"dragging":"inactive"}),i.a.createElement(b,{media:t.media,param_key:t.param_key,showCaptionFields:t.showCaptionFields,onMediaUpdate:t.onMediaUpdate,licenseOptions:t.licenseOptions}),e.placeholder)})))},A=function(t){var e=t.props,n=t.identifier,r=t.setIdentifier,o=t.rightStatement,a=t.setRightsStatement,s=t.sourceLink,u=t.setSourceLink,l=t.transcription,c=t.setTranscription,f=t.license,h=t.setLicense,p=t.licenseOptions;return i.a.createElement(i.a.Fragment,null,i.a.createElement("label",null,I18n.t("components.media_item.fields.license")),i.a.createElement("select",{name:"".concat(e.param_key,"[attached_").concat(e.type,"s_attributes][").concat(e.index,"][license]"),value:f||"",onChange:function(t){var e=t.currentTarget;return h(e.value)}},i.a.createElement("option",{key:"no-licence",value:""}),p.map((function(t,e){return i.a.createElement("option",{key:e},t)}))),i.a.createElement("label",null,I18n.t("components.media_item.fields.right_statement")),i.a.createElement("input",{placeholder:I18n.t("components.media_item.fields.right_statement_placeholder"),type:"text",name:"".concat(e.param_key,"[attached_").concat(e.type,"s_attributes][").concat(e.index,"][rights_statement]"),value:o||"",onChange:function(t){var e=t.currentTarget;return a(e.value)}}),i.a.createElement("label",null,I18n.t("components.media_item.fields.source_link")),i.a.createElement("input",{placeholder:"",type:"text",name:"".concat(e.param_key,"[attached_").concat(e.type,"s_attributes][").concat(e.index,"][source_link]"),value:s||"",onChange:function(t){var e=t.currentTarget;return u(e.value)}}),i.a.createElement("label",null,I18n.t("components.media_item.fields.identifier")),i.a.createElement("input",{placeholder:I18n.t("components.media_item.fields.identifier_placeholder"),type:"text",name:"".concat(e.param_key,"[attached_").concat(e.type,"s_attributes][").concat(e.index,"][identifier]"),value:n||"",onChange:function(t){var e=t.currentTarget;return r(e.value)}}),i.a.createElement("label",null,I18n.t("components.media_item.fields.transcription")),i.a.createElement("textarea",{placeholder:I18n.t("components.media_item.fields.transcription_placeholder"),type:"text",name:"".concat(e.param_key,"[attached_").concat(e.type,"s_attributes][").concat(e.index,"][transcription]"),value:l||"",onChange:function(t){var e=t.currentTarget;return c(e.value)}}))};_.defaultProps={showCaptionFields:!0},e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScaleMode=void 0;var r=g(n(1293)),i=g(n(180)),o=g(n(89)),a=g(n(142)),s=n(60),u=g(n(345)),l=n(656),c=g(n(237)),f=g(n(981)),h=n(370),p=n(157),d=n(112),m=n(258);function g(t){return t&&t.__esModule?t:{default:t}}function y(t){return y="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},y(t)}function v(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return b(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(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.")}()}function b(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 _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(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 w(t,e){return!e||"object"!==y(e)&&"function"!==typeof e?x(t):e}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function E(){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}}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function S(t,e){return S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},S(t,e)}function P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var C=function(t){!function(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&&S(t,e)}(y,t);var e,n,c,d,g=(e=y,function(){var t,n=O(e);if(E()){var r=O(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return w(this,t)});function y(){var t;_(this,y);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return P(x(t=g.call.apply(g,[this].concat(n))),"_geometryBeingScaled",void 0),P(x(t),"_selectedEditHandle",void 0),P(x(t),"_cornerGuidePoints",void 0),P(x(t),"_cursor",void 0),P(x(t),"_isScaling",!1),P(x(t),"_isSinglePointGeometrySelected",(function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,h.getGeom)(e[0]).type})),P(x(t),"_getOppositeScaleHandle",(function(e){var n=e&&e.properties&&Array.isArray(e.properties.positionIndexes)&&e.properties.positionIndexes[0];if("number"!==typeof n)return null;var r=t._cornerGuidePoints.length,i=(n+r/2)%r;return t._cornerGuidePoints.find((function(t){return!!Array.isArray(t.properties.positionIndexes)&&t.properties.positionIndexes[0]===i}))})),P(x(t),"_getUpdatedData",(function(t,e){for(var n=new m.ImmutableFeatureCollection(t.data),r=t.selectedIndexes,i=0;i<r.length;i++){var o=r[i],a=e.features[i];n=n.replaceGeometry(o,a.geometry)}return n.getObject()})),P(x(t),"isEditHandleSelected",(function(){return Boolean(t._selectedEditHandle)})),P(x(t),"getScaleAction",(function(e,n,r,i){if(!t._selectedEditHandle)return null;var o=t._getOppositeScaleHandle(t._selectedEditHandle),a=(0,h.getCoord)(o),s=T(a,e,n),u=(0,f.default)(t._geometryBeingScaled,s,{origin:a});return{updatedData:t._getUpdatedData(i,u),editType:r,editContext:{featureIndexes:i.selectedIndexes}}})),P(x(t),"updateCursor",(function(e){if(t._selectedEditHandle){t._cursor&&e.onUpdateCursor(t._cursor);var n=t.getSelectedFeaturesAsFeatureCollection(e),r=(0,i.default)(n),a=(0,o.default)(r,t._selectedEditHandle),s=a<0?a+180:a;s>=0&&s<=90||s>=180&&s<=270?(t._cursor="nesw-resize",e.onUpdateCursor("nesw-resize")):(t._cursor="nwse-resize",e.onUpdateCursor("nwse-resize"))}else e.onUpdateCursor(null),t._cursor=null})),t}return n=y,(c=[{key:"handlePointerMove",value:function(t,e){if(!this._isScaling){var n=(0,p.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"scale"===n.properties.editHandleType?n:null,n&&this.updateCursor(e)}}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isScaling=!0,this._geometryBeingScaled=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleDragging",value:function(t,e){if(this._isScaling){e.onUpdateCursor(this._cursor);var n=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaling",e);n&&e.onEdit(n),t.cancelPan()}}},{key:"handleStopDragging",value:function(t,e){if(this._isScaling){var n=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaled",e);n&&e.onEdit(n),e.onUpdateCursor(null),this._geometryBeingScaled=null,this._selectedEditHandle=null,this._cursor=null,this._isScaling=!1}}},{key:"getGuides",value:function(t){this._cornerGuidePoints=[];var e=this.getSelectedFeaturesAsFeatureCollection(t);if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};var n=(0,a.default)((0,r.default)(e));n.properties.mode="scale";var i=[];return(0,l.coordEach)(n,(function(t,e){if(e<4){var n=(0,s.point)(t,{guideType:"editHandle",editHandleType:"scale",positionIndexes:[e]});i.push(n)}})),this._cornerGuidePoints=i,(0,s.featureCollection)([(0,u.default)(n)].concat(v(this._cornerGuidePoints)))}}])&&A(n.prototype,c),d&&A(n,d),y}(d.GeoJsonEditMode);function T(t,e,n){var r=(0,c.default)(t,e);return(0,c.default)(t,n)/r}e.ScaleMode=C},function(t,e,n){"use strict";n.r(e);var r=n(656);function i(t){var e=[1/0,1/0,-1/0,-1/0];return Object(r.coordEach)(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}i.default=i,e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RotateMode=void 0;var r=g(n(1293)),i=g(n(180)),o=g(n(89)),a=g(n(142)),s=g(n(237)),u=n(656),l=n(370),c=n(60),f=g(n(442)),h=g(n(345)),p=n(157),d=n(112),m=n(258);function g(t){return t&&t.__esModule?t:{default:t}}function y(t){return y="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},y(t)}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(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 _(t,e){return!e||"object"!==y(e)&&"function"!==typeof e?A(t):e}function A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(){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}}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function E(t,e){return E=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},E(t,e)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var S=function(t){!function(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&&E(t,e)}(P,t);var e,n,g,y,S=(e=P,function(){var t,n=x(e);if(w()){var r=x(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return _(this,t)});function P(){var t;v(this,P);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return O(A(t=S.call.apply(S,[this].concat(n))),"_selectedEditHandle",void 0),O(A(t),"_geometryBeingRotated",void 0),O(A(t),"_isRotating",!1),O(A(t),"_isSinglePointGeometrySelected",(function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,l.getGeom)(e[0]).type})),O(A(t),"getIsRotating",(function(){return t._isRotating})),t}return n=P,(g=[{key:"getGuides",value:function(t){var e=this._geometryBeingRotated||this.getSelectedFeaturesAsFeatureCollection(t);if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};if(this._isRotating)return(0,c.featureCollection)([(0,i.default)(e)]);var n=(0,a.default)((0,r.default)(e)),o=null,l=null,f=0;(0,u.coordEach)(n,(function(t){if(o){var e=(0,d.getIntermediatePosition)(t,o);(!l||e[1]>l[1])&&(l=e);var n=(0,s.default)(t,o);f=Math.max(f,n)}o=t}));var p=l&&[l[0],l[1]+f/1e3],m=(0,c.lineString)([l,p]),g=(0,c.point)(p,{guideType:"editHandle",editHandleType:"rotate"});return(0,c.featureCollection)([(0,h.default)(n),g,m])}},{key:"handleDragging",value:function(t,e){if(this._isRotating){var n=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotating",e);n&&e.onEdit(n),t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){if(!this._isRotating){var n=(0,p.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"rotate"===n.properties.editHandleType?n:null}this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isRotating=!0,this._geometryBeingRotated=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._isRotating){var n=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotated",e);n&&e.onEdit(n),this._geometryBeingRotated=null,this._selectedEditHandle=null,this._isRotating=!1}}},{key:"updateCursor",value:function(t){this._selectedEditHandle?t.onUpdateCursor("crosshair"):t.onUpdateCursor(null)}},{key:"getRotateAction",value:function(t,e,n,r){if(!this._geometryBeingRotated)return null;for(var a=(0,i.default)(this._geometryBeingRotated),s=function(t,e,n){var r=(0,o.default)(t,e);return(0,o.default)(t,n)-r}(a,t,e),u=(0,f.default)(this._geometryBeingRotated,s,{pivot:a}),l=new m.ImmutableFeatureCollection(r.data),c=r.selectedIndexes,h=0;h<c.length;h++){var p=c[h],d=u.features[h];l=l.replaceGeometry(p,d.geometry)}return{updatedData:l.getObject(),editType:n,editContext:{featureIndexes:c}}}}])&&b(n.prototype,g),y&&b(n,y),P}(d.GeoJsonEditMode);e.RotateMode=S},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))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.")}()}function o(t,e){if(t){if("string"===typeof t)return a(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(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 s(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 u(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?l(t):e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeMode=void 0;var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,r,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function d(t){var e,n,r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),e=p.call(this),n=l(e),i=void 0,(r="_modes")in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,e._modes=t,e}return n=d,r=[{key:"_coalesce",value:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=0;r<this._modes.length&&(e=t(this._modes[r]),!(n?n(e):e));r++);return e}},{key:"handleClick",value:function(t,e){this._coalesce((function(n){return n.handleClick(t,e)}))}},{key:"handlePointerMove",value:function(t,e){return this._coalesce((function(n){return n.handlePointerMove(t,e)}))}},{key:"handleStartDragging",value:function(t,e){return this._coalesce((function(n){return n.handleStartDragging(t,e)}))}},{key:"handleStopDragging",value:function(t,e){return this._coalesce((function(n){return n.handleStopDragging(t,e)}))}},{key:"handleDragging",value:function(t,e){return this._coalesce((function(n){return n.handleDragging(t,e)}))}},{key:"getGuides",value:function(t){var e,n=[],r=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=o(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(this._modes);try{for(r.s();!(e=r.n()).done;){var a=e.value;n.push.apply(n,i(a.getGuides(t).features))}}catch(s){r.e(s)}finally{r.f()}return{type:"FeatureCollection",features:n}}}],r&&s(n.prototype,r),a&&s(n,a),d}(n(112).GeoJsonEditMode);e.CompositeMode=p},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ThreeClickPolygonMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"handleClick",value:function(t,e){this.addClickSequence(t);var n=this.getClickSequence(),r=this.getTentativeGuide(e);if(n.length>2&&r&&"Polygon"===r.geometry.type){var i=this.getAddFeatureOrBooleanPolygonAction(r.geometry,e);this.resetClickSequence(),i&&e.onEdit(i)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var o=e.mapCoords;if(1===r.length)i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[0],o]}});else{var a=this.getThreeClickPolygon(r[0],r[1],o,n);a&&i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:a.geometry})}return i}},{key:"getThreeClickPolygon",value:function(t,e,n,r){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),a(l(p.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 2===r.length&&(e=this.getThreeClickPolygon(r[0],r[1],i[0],t.modeConfig)),e}}])&&o(n.prototype,r),f&&o(n,f),p}(n(112).GeoJsonEditMode);e.ThreeClickPolygonMode=f},function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if(Array.isArray(t)){var n=t.length;if(!e||e.length!==n)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n={};return function(i){for(var o in i)if(!r(i[o],n[o])){e=t(i),n=i;break}return e}}},function(t,e,n){"use strict";n.r(e),n.d(e,"v1",(function(){return p})),n.d(e,"v3",(function(){return A})),n.d(e,"v4",(function(){return w})),n.d(e,"v5",(function(){return O}));var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var a=[],s=0;s<256;++s)a[s]=(s+256).toString(16).substr(1);var u,l,c=function(t,e){var n=e||0,r=a;return[r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]]].join("")},f=0,h=0;var p=function(t,e,n){var r=e&&n||0,i=e||[],a=(t=t||{}).node||u,s=void 0!==t.clockseq?t.clockseq:l;if(null==a||null==s){var p=t.random||(t.rng||o)();null==a&&(a=u=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==s&&(s=l=16383&(p[6]<<8|p[7]))}var d=void 0!==t.msecs?t.msecs:(new Date).getTime(),m=void 0!==t.nsecs?t.nsecs:h+1,g=d-f+(m-h)/1e4;if(g<0&&void 0===t.clockseq&&(s=s+1&16383),(g<0||d>f)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=d,h=m,l=s;var y=(1e4*(268435455&(d+=122192928e5))+m)%4294967296;i[r++]=y>>>24&255,i[r++]=y>>>16&255,i[r++]=y>>>8&255,i[r++]=255&y;var v=d/4294967296*1e4&268435455;i[r++]=v>>>8&255,i[r++]=255&v,i[r++]=v>>>24&15|16,i[r++]=v>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var b=0;b<6;++b)i[r+b]=a[b];return e||c(i)};var d=function(t,e,n){var r=function(t,r,i,o){var a=i&&o||0;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(t)),"string"==typeof r&&(r=function(t){var e=[];return t.replace(/[a-fA-F0-9]{2}/g,(function(t){e.push(parseInt(t,16))})),e}(r)),!Array.isArray(t))throw TypeError("value must be an array of bytes");if(!Array.isArray(r)||16!==r.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var s=n(r.concat(t));if(s[6]=15&s[6]|e,s[8]=63&s[8]|128,i)for(var u=0;u<16;++u)i[a+u]=s[u];return i||c(s)};try{r.name=t}catch(i){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function m(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(t,e,n,r,i,o){return m((a=m(m(e,t),m(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function y(t,e,n,r,i,o,a){return g(e&n|~e&r,t,e,i,o,a)}function v(t,e,n,r,i,o,a){return g(e&r|n&~r,t,e,i,o,a)}function b(t,e,n,r,i,o,a){return g(e^n^r,t,e,i,o,a)}function _(t,e,n,r,i,o,a){return g(n^(e|~r),t,e,i,o,a)}var A=d("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Array(e.length);for(var n=0;n<e.length;n++)t[n]=e.charCodeAt(n)}return function(t){var e,n,r,i=[],o=32*t.length,a="0123456789abcdef";for(e=0;e<o;e+=8)n=t[e>>5]>>>e%32&255,r=parseInt(a.charAt(n>>>4&15)+a.charAt(15&n),16),i.push(r);return i}(function(t,e){var n,r,i,o,a;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n<t.length;n+=16)r=s,i=u,o=l,a=c,s=y(s,u,l,c,t[n],7,-680876936),c=y(c,s,u,l,t[n+1],12,-389564586),l=y(l,c,s,u,t[n+2],17,606105819),u=y(u,l,c,s,t[n+3],22,-1044525330),s=y(s,u,l,c,t[n+4],7,-176418897),c=y(c,s,u,l,t[n+5],12,1200080426),l=y(l,c,s,u,t[n+6],17,-1473231341),u=y(u,l,c,s,t[n+7],22,-45705983),s=y(s,u,l,c,t[n+8],7,1770035416),c=y(c,s,u,l,t[n+9],12,-1958414417),l=y(l,c,s,u,t[n+10],17,-42063),u=y(u,l,c,s,t[n+11],22,-1990404162),s=y(s,u,l,c,t[n+12],7,1804603682),c=y(c,s,u,l,t[n+13],12,-40341101),l=y(l,c,s,u,t[n+14],17,-1502002290),s=v(s,u=y(u,l,c,s,t[n+15],22,1236535329),l,c,t[n+1],5,-165796510),c=v(c,s,u,l,t[n+6],9,-1069501632),l=v(l,c,s,u,t[n+11],14,643717713),u=v(u,l,c,s,t[n],20,-373897302),s=v(s,u,l,c,t[n+5],5,-701558691),c=v(c,s,u,l,t[n+10],9,38016083),l=v(l,c,s,u,t[n+15],14,-660478335),u=v(u,l,c,s,t[n+4],20,-405537848),s=v(s,u,l,c,t[n+9],5,568446438),c=v(c,s,u,l,t[n+14],9,-1019803690),l=v(l,c,s,u,t[n+3],14,-187363961),u=v(u,l,c,s,t[n+8],20,1163531501),s=v(s,u,l,c,t[n+13],5,-1444681467),c=v(c,s,u,l,t[n+2],9,-51403784),l=v(l,c,s,u,t[n+7],14,1735328473),s=b(s,u=v(u,l,c,s,t[n+12],20,-1926607734),l,c,t[n+5],4,-378558),c=b(c,s,u,l,t[n+8],11,-2022574463),l=b(l,c,s,u,t[n+11],16,1839030562),u=b(u,l,c,s,t[n+14],23,-35309556),s=b(s,u,l,c,t[n+1],4,-1530992060),c=b(c,s,u,l,t[n+4],11,1272893353),l=b(l,c,s,u,t[n+7],16,-155497632),u=b(u,l,c,s,t[n+10],23,-1094730640),s=b(s,u,l,c,t[n+13],4,681279174),c=b(c,s,u,l,t[n],11,-358537222),l=b(l,c,s,u,t[n+3],16,-722521979),u=b(u,l,c,s,t[n+6],23,76029189),s=b(s,u,l,c,t[n+9],4,-640364487),c=b(c,s,u,l,t[n+12],11,-421815835),l=b(l,c,s,u,t[n+15],16,530742520),s=_(s,u=b(u,l,c,s,t[n+2],23,-995338651),l,c,t[n],6,-198630844),c=_(c,s,u,l,t[n+7],10,1126891415),l=_(l,c,s,u,t[n+14],15,-1416354905),u=_(u,l,c,s,t[n+5],21,-57434055),s=_(s,u,l,c,t[n+12],6,1700485571),c=_(c,s,u,l,t[n+3],10,-1894986606),l=_(l,c,s,u,t[n+10],15,-1051523),u=_(u,l,c,s,t[n+1],21,-2054922799),s=_(s,u,l,c,t[n+8],6,1873313359),c=_(c,s,u,l,t[n+15],10,-30611744),l=_(l,c,s,u,t[n+6],15,-1560198380),u=_(u,l,c,s,t[n+13],21,1309151649),s=_(s,u,l,c,t[n+4],6,-145523070),c=_(c,s,u,l,t[n+11],10,-1120210379),l=_(l,c,s,u,t[n+2],15,718787259),u=_(u,l,c,s,t[n+9],21,-343485551),s=m(s,r),u=m(u,i),l=m(l,o),c=m(c,a);return[s,u,l,c]}(function(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var r=8*t.length;for(e=0;e<r;e+=8)n[e>>5]|=(255&t[e/8])<<e%32;return n}(t),8*t.length))}));var w=function(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var a=0;a<16;++a)e[r+a]=i[a];return e||c(i)};function x(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function E(t,e){return t<<e|t>>>32-e}var O=d("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=new Array(r.length);for(var i=0;i<r.length;i++)t[i]=r.charCodeAt(i)}t.push(128);var o=t.length/4+2,a=Math.ceil(o/16),s=new Array(a);for(i=0;i<a;i++){s[i]=new Array(16);for(var u=0;u<16;u++)s[i][u]=t[64*i+4*u]<<24|t[64*i+4*u+1]<<16|t[64*i+4*u+2]<<8|t[64*i+4*u+3]}for(s[a-1][14]=8*(t.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(t.length-1)&4294967295,i=0;i<a;i++){for(var l=new Array(80),c=0;c<16;c++)l[c]=s[i][c];for(c=16;c<80;c++)l[c]=E(l[c-3]^l[c-8]^l[c-14]^l[c-16],1);var f=n[0],h=n[1],p=n[2],d=n[3],m=n[4];for(c=0;c<80;c++){var g=Math.floor(c/20),y=E(f,5)+x(g,h,p,d)+m+e[g]+l[c]>>>0;m=d,d=p,p=E(h,30)>>>0,h=f,f=y}n[0]=n[0]+f>>>0,n[1]=n[1]+h>>>0,n[2]=n[2]+p>>>0,n[3]=n[3]+d>>>0,n[4]=n[4]+m>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))},,function(t,e,n){"use strict";n.r(e);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,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function a(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function s(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t*n}function u(t,e){void 0===e&&(e="kilometers");var n=i[e];if(!n)throw new Error(e+" units is invalid");return t/n}function l(t){return 180*(t%(2*Math.PI))/Math.PI}function c(t){return t%360*Math.PI/180}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function h(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")}function p(t,e,n){if(void 0===n&&(n={}),!0===n.final)return function(t,e){var n=p(e,t);return n=(n+180)%360}(t,e);var r=h(t),i=h(e),o=c(r[0]),a=c(i[0]),s=c(r[1]),u=c(i[1]),f=Math.sin(a-o)*Math.cos(u),d=Math.cos(s)*Math.sin(u)-Math.sin(s)*Math.cos(u)*Math.cos(a-o);return l(Math.atan2(f,d))}var d=function(t,e,n){void 0===n&&(n={});var r=h(t),i=h(e),o=c(i[1]-r[1]),a=c(i[0]-r[0]),u=c(r[1]),l=c(i[1]),f=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(u)*Math.cos(l);return s(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)};e.default=function(t,e){return function(t,e,n,r){void 0===r&&(r={});var i=h(t),o=c(i[0]),s=c(i[1]),f=c(n),p=u(e,r.units),d=Math.asin(Math.sin(s)*Math.cos(p)+Math.cos(s)*Math.sin(p)*Math.cos(f));return a([l(o+Math.atan2(Math.sin(f)*Math.sin(p)*Math.cos(s),Math.cos(p)-Math.sin(s)*Math.sin(d))),l(d)],r.properties)}(t,d(t,e)/2,p(t,e))}},function(t,e,n){"use strict";n.r(e),n.d(e,"colorStyle",(function(){return s})),n.d(e,"sizeStyle",(function(){return u})),n.d(e,"colorIsDark",(function(){return o})),n.d(e,"normalizeColor",(function(){return a}));var r=n(4),i=function(t){return/^#/.test(t)?function(t){return t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,n,r){return"#"+e+e+n+n+r+r})).substring(1).match(/.{2}/g).map((function(t){return parseInt(t,16)}))}(t):/^rgb/.test(t)?t.match(/rgba?\((\s?[0-9]*\s?),(\s?[0-9]*\s?),(\s?[0-9]*\s?).*?\)/).splice(1):t},o=function(t){var e=i(t);return(299*e[0]+587*e[1]+114*e[2])/1e3<125},a=function t(e,n){var r=n.global.colors[e]||e,i=r;return n.dark&&r.dark?i=r.dark:!n.dark&&r.light&&(i=r.light),i&&n.global.colors[i]&&n.global.colors[i]!==i&&(i=t(i,n)),i},s=function(t,e,n,i){return Object(r.css)(["",":",";"],t,a(e,n,i))},u=function(t,e,n){return Object(r.css)(["",":",";"],t,n.global.size[e]||e)}},function(t,e,n){"use strict";n.r(e),n.d(e,"print",(function(){return i}));var r=n(615);function i(t){return Object(r.a)(t,{leave:o})}var o={Name:function(t){return t.value},Variable:function(t){return"$"+t.name},Document:function(t){return s(t.definitions,"\n\n")+"\n"},OperationDefinition:function(t){var e=t.operation,n=t.name,r=l("(",s(t.variableDefinitions,", "),")"),i=s(t.directives," "),o=t.selectionSet;return n||i||r||"query"!==e?s([e,s([n,r]),i,o]," "):o},VariableDefinition:function(t){var e=t.variable,n=t.type,r=t.defaultValue,i=t.directives;return e+": "+n+l(" = ",r)+l(" ",s(i," "))},SelectionSet:function(t){return u(t.selections)},Field:function(t){var e=t.alias,n=t.name,r=t.arguments,i=t.directives,o=t.selectionSet,a=l("",e,": ")+n,u=a+l("(",s(r,", "),")");return u.length>80&&(u=a+l("(\n",c(s(r,"\n")),"\n)")),s([u,s(i," "),o]," ")},Argument:function(t){return t.name+": "+t.value},FragmentSpread:function(t){return"..."+t.name+l(" ",s(t.directives," "))},InlineFragment:function(t){var e=t.typeCondition,n=t.directives,r=t.selectionSet;return s(["...",l("on ",e),s(n," "),r]," ")},FragmentDefinition:function(t){var e=t.name,n=t.typeCondition,r=t.variableDefinitions,i=t.directives,o=t.selectionSet;return"fragment ".concat(e).concat(l("(",s(r,", "),")")," ")+"on ".concat(n," ").concat(l("",s(i," ")," "))+o},IntValue:function(t){return t.value},FloatValue:function(t){return t.value},StringValue:function(t,e){var n=t.value;return t.block?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===t.indexOf("\n"),i=" "===t[0]||"\t"===t[0],o='"'===t[t.length-1],a="\\"===t[t.length-1],s=!r||o||a||n,u="";return!s||r&&i||(u+="\n"+e),u+=e?t.replace(/\n/g,"\n"+e):t,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}(n,"description"===e?"":"  "):JSON.stringify(n)},BooleanValue:function(t){return t.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){return t.value},ListValue:function(t){return"["+s(t.values,", ")+"]"},ObjectValue:function(t){return"{"+s(t.fields,", ")+"}"},ObjectField:function(t){return t.name+": "+t.value},Directive:function(t){return"@"+t.name+l("(",s(t.arguments,", "),")")},NamedType:function(t){return t.name},ListType:function(t){return"["+t.type+"]"},NonNullType:function(t){return t.type+"!"},SchemaDefinition:a((function(t){var e=t.directives,n=t.operationTypes;return s(["schema",s(e," "),u(n)]," ")})),OperationTypeDefinition:function(t){return t.operation+": "+t.type},ScalarTypeDefinition:a((function(t){return s(["scalar",t.name,s(t.directives," ")]," ")})),ObjectTypeDefinition:a((function(t){var e=t.name,n=t.interfaces,r=t.directives,i=t.fields;return s(["type",e,l("implements ",s(n," & ")),s(r," "),u(i)]," ")})),FieldDefinition:a((function(t){var e=t.name,n=t.arguments,r=t.type,i=t.directives;return e+(h(n)?l("(\n",c(s(n,"\n")),"\n)"):l("(",s(n,", "),")"))+": "+r+l(" ",s(i," "))})),InputValueDefinition:a((function(t){var e=t.name,n=t.type,r=t.defaultValue,i=t.directives;return s([e+": "+n,l("= ",r),s(i," ")]," ")})),InterfaceTypeDefinition:a((function(t){var e=t.name,n=t.interfaces,r=t.directives,i=t.fields;return s(["interface",e,l("implements ",s(n," & ")),s(r," "),u(i)]," ")})),UnionTypeDefinition:a((function(t){var e=t.name,n=t.directives,r=t.types;return s(["union",e,s(n," "),r&&0!==r.length?"= "+s(r," | "):""]," ")})),EnumTypeDefinition:a((function(t){var e=t.name,n=t.directives,r=t.values;return s(["enum",e,s(n," "),u(r)]," ")})),EnumValueDefinition:a((function(t){return s([t.name,s(t.directives," ")]," ")})),InputObjectTypeDefinition:a((function(t){var e=t.name,n=t.directives,r=t.fields;return s(["input",e,s(n," "),u(r)]," ")})),DirectiveDefinition:a((function(t){var e=t.name,n=t.arguments,r=t.repeatable,i=t.locations;return"directive @"+e+(h(n)?l("(\n",c(s(n,"\n")),"\n)"):l("(",s(n,", "),")"))+(r?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(t){var e=t.directives,n=t.operationTypes;return s(["extend schema",s(e," "),u(n)]," ")},ScalarTypeExtension:function(t){return s(["extend scalar",t.name,s(t.directives," ")]," ")},ObjectTypeExtension:function(t){var e=t.name,n=t.interfaces,r=t.directives,i=t.fields;return s(["extend type",e,l("implements ",s(n," & ")),s(r," "),u(i)]," ")},InterfaceTypeExtension:function(t){var e=t.name,n=t.interfaces,r=t.directives,i=t.fields;return s(["extend interface",e,l("implements ",s(n," & ")),s(r," "),u(i)]," ")},UnionTypeExtension:function(t){var e=t.name,n=t.directives,r=t.types;return s(["extend union",e,s(n," "),r&&0!==r.length?"= "+s(r," | "):""]," ")},EnumTypeExtension:function(t){var e=t.name,n=t.directives,r=t.values;return s(["extend enum",e,s(n," "),u(r)]," ")},InputObjectTypeExtension:function(t){var e=t.name,n=t.directives,r=t.fields;return s(["extend input",e,s(n," "),u(r)]," ")}};function a(t){return function(e){return s([e.description,t(e)],"\n")}}function s(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(e=null===t||void 0===t?void 0:t.filter((function(t){return t})).join(n))&&void 0!==e?e:""}function u(t){return l("{\n",c(s(t,"\n")),"\n}")}function l(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=e&&""!==e?t+e+n:""}function c(t){return l("  ",t.replace(/\n/g,"\n  "))}function f(t){return-1!==t.indexOf("\n")}function h(t){return null!=t&&t.some(f)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1343),a=n.n(o);e.default=function(t){return i.a.createElement("div",{className:a.a.Article},i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.content}}))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1322),a=n.n(o);e.default=function(t){var e=t.title,n=t.content,r=t.button_text,o=t.url;return i.a.createElement("div",{className:a.a.SidebarCTA},i.a.createElement("h2",null,e),i.a.createElement("div",{className:a.a.description,dangerouslySetInnerHTML:{__html:n}}),i.a.createElement("a",{href:o},r))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1639),a=n(62),s=n(706),u=n.n(s),l=n(1339),c=n.n(l),f=n(1340),h=n.n(f),p=n(1341),d=n.n(p),m={indicators:function(t){return i.a.createElement("div",{className:"indicator"},i.a.createElement("span",null,t+1))}},g=function(t){var e;switch(t.type){case"pin":e=d.a;break;case"overlay":e=h.a;break;case"collection":e=c.a;break;default:return null}return i.a.createElement("div",{className:u.a.icon},i.a.createElement("img",{src:e}))},y=function(t){var e=t.title,n=t.content,r=t.image,o=t.url,s=t.button_text,l=t.icon;return i.a.createElement("div",{className:u.a.feature},i.a.createElement("div",{className:u.a.image},i.a.createElement(a.default,Object.assign({},r,{width:760}))),i.a.createElement("div",{className:u.a.textContent},i.a.createElement(g,{type:l}),i.a.createElement("h2",null,e),i.a.createElement("div",{className:u.a.description},i.a.createElement("p",null,n)),o&&s&&i.a.createElement("a",{href:o},s)))};e.default=function(t){var e=t.features;return i.a.createElement("div",{className:u.a.FeatureDemo},i.a.createElement(o.Fade,Object.assign({},m,{easing:"ease",arrows:!1,duration:"8000",pauseOnHover:!1}),e.map((function(t){return i.a.createElement(y,Object.assign({},t,{key:t.id}))}))))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7),a=n(17),s=n(848),u=n.n(s);e.default=Object(o.a)((function(t){t.children;var e=Object(a.useStore)().uiSettings,n=e.mobileMenuVisible,r=e.setMobileMenuVisible;return i.a.createElement("div",{className:u.a.Hamburger},i.a.createElement("button",{className:"".concat(u.a.hamburger," ").concat(n?u.a.isActive:""),type:"button",onClick:function(t){r(!n),t.preventDefault()}},i.a.createElement("span",{className:u.a.hamburgerBox},i.a.createElement("span",{className:u.a.hamburgerInner}))))}))},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(847),a=n.n(o),s=n(62);e.default=function(t){return i.a.createElement("div",{className:a.a.HeroContent},t.image&&i.a.createElement(s.default,Object.assign({},t.image,{parameters:{w:1680}})),i.a.createElement("div",{className:a.a.textContent},i.a.createElement("h1",null,t.name),i.a.createElement("p",null,t.description)))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1312),a=n(1323),s=n.n(a);n(1656);e.default=function(t){return i.a.createElement("div",{className:s.a.HeroHome},t.images.length>0&&i.a.createElement(o.default,{images:t.images}),i.a.createElement("div",{className:s.a.textContent},i.a.createElement("h1",null,t.title),i.a.createElement("p",null,t.description)))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1324),a=n.n(o),s=n(1310);e.default=function(t){return i.a.createElement("div",{className:a.a.HomeIntroduction},i.a.createElement("div",{className:a.a.textContent},i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.content}})),i.a.createElement(s.default,null))}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1537),a=n(273),s=n(1346),u=n.n(s);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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return c(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 c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(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}e.default=function(){var t=l(i.a.useState(""),2),e=t[0],n=t[1];return i.a.createElement("div",{className:u.a.Search},i.a.createElement("h2",null,I18n.t("components.pages.search.title")),i.a.createElement("form",{action:"/map/search/results",method:"GET"},i.a.createElement(o.a,{placeholder:I18n.t("components.pages.search.placeholder"),name:"q",value:e,onChange:function(t){return n(t.target.value)}}),i.a.createElement(a.a,{type:"submit",primary:!0,label:I18n.t("search")})))}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchBasemapsQuery",(function(){return i}));var r=n(21),i=function(){return r.default.request("\n    #graphql\n\n    query BaseMapsQuery {\n        basemaps: tenant_base_maps(order_by: {position: asc}) {\n            base_map {\n                id\n                name\n                image {\n                    url\n                }\n            }\n        }\n    }\n")}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(30),o=n(1321),a=n.n(o),s=n(62);function u(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(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 l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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}e.default=function(t){var e=u(Object(r.useState)(0),2),n=e[0],o=e[1];Object(r.useEffect)((function(){var t=setTimeout((function(){d()}),5e3);return function(){clearTimeout(t)}}));var l,c,f,h=t.images.map((function(t){return t.image})),p=(l=0,c=h.length,((n-l)%(f=c-l)+f)%f+l),d=function(){h.length>1&&o(n+1)};return r.createElement("div",{className:a.a.Carousel},r.createElement(i.a,{initial:!1},r.createElement(i.b.div,{className:a.a.slide,key:n,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5}},r.createElement(s.default,Object.assign({},h[p],{sizes:{"(min-width:1520px)":"1440px","(min-width:0px)":"100vw"},options:{maxWidth:1440}})))))}},function(t,e,n){var r=n(1428),i={};function o(t){return i[t=t||256]||(i[t]=new r({size:t})),i[t]}t.exports.viewport=function(t,e,n,r,i,a){n=void 0===n?0:n,r=void 0===r?20:r;var s=o(i),u=r,l=s.px([t[0],t[1]],u),c=s.px([t[2],t[3]],u),f=c[0]-l[0],h=l[1]-c[1],p=l[0]+f/2,d=c[1]+h/2,m=[f/e[0],h/e[1]],g=function(t,e,n){var r=Math.min(t-Math.log(e[0])/Math.log(2),t-Math.log(e[1])/Math.log(2));return n?r:Math.floor(r)}(u,m,a),y=s.ll([p,d],u),v=Math.max(n,Math.min(r,g));return{center:y,zoom:v}},t.exports.bounds=function(t,e,n,r){void 0!==t.lon&&(t=[t.lon,t.lat]);var i=o(r),a=i.px(t,e),s=i.ll([a[0]-n[0]/2,a[1]-n[1]/2],e),u=i.ll([a[0]+n[0]/2,a[1]+n[1]/2],e);return[s[0],u[1],u[0],s[1]]}},function(t,e,n){"use strict";var r,i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var s,u,l,c,f=a(n(0)),h=n(1142),p=n(1141),d=[h.keyframes(s||(s=i(["\n  0%  {transform: scale(0)}\n  100% {transform: scale(1.0)}\n"],["\n  0%  {transform: scale(0)}\n  100% {transform: scale(1.0)}\n"]))),h.keyframes(u||(u=i(["\n  0%  {opacity: 1}\n  100% {opacity: 0}\n"],["\n  0%  {opacity: 1}\n  100% {opacity: 0}\n"])))],m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.style=function(t){var n=e.props,r=n.color,o=n.size;return h.css(l||(l=i(["\n      position: absolute;\n      height: ",";\n      width: ",";\n      border: thick solid ",";\n      border-radius: 50%;\n      opacity: 1;\n      top: 0;\n      left: 0;\n      animation-fill-mode: both;\n      animation: ",", ",";\n      animation-duration: 2s;\n      animation-iteration-count: infinite;\n      animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1);\n      animation-delay: ",";\n    "],["\n      position: absolute;\n      height: ",";\n      width: ",";\n      border: thick solid ",";\n      border-radius: 50%;\n      opacity: 1;\n      top: 0;\n      left: 0;\n      animation-fill-mode: both;\n      animation: ",", ",";\n      animation-duration: 2s;\n      animation-iteration-count: infinite;\n      animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1);\n      animation-delay: ",";\n    "])),p.cssValue(o),p.cssValue(o),r,d[0],d[1],1===t?"-1s":"0s")},e.wrapper=function(){var t=e.props.size;return h.css(c||(c=i(["\n      position: relative;\n      width: ",";\n      height: ",";\n    "],["\n      position: relative;\n      width: ",";\n      height: ",";\n    "])),p.cssValue(t),p.cssValue(t))},e}return o(e,t),e.prototype.render=function(){var t=this.props,e=t.loading,n=t.css;return e?h.jsx("div",{css:[this.wrapper(),n]},h.jsx("div",{css:this.style(1)}),h.jsx("div",{css:this.style(2)})):null},e.defaultProps=p.sizeDefaults(60),e}(f.PureComponent);e.default=m},function(t,e,n){"use strict";var r,i=n(0),o=(r=i)&&"object"===typeof r&&"default"in r?r.default:r;function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=!("undefined"===typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,n){if("function"!==typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!==typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if("undefined"!==typeof n&&"function"!==typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!==typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,l=[];function c(){u=t(l.map((function(t){return t.props}))),f.canUseDOM?e(u):n&&(u=n(u))}var f=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i.peek=function(){return u},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=u;return u=void 0,l=[],t};var a=i.prototype;return a.UNSAFE_componentWillMount=function(){l.push(this),c()},a.componentDidUpdate=function(){c()},a.componentWillUnmount=function(){var t=l.indexOf(this);l.splice(t,1),c()},a.render=function(){return o.createElement(r,this.props)},i}(i.PureComponent);return a(f,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(r)+")"),a(f,"canUseDOM",s),f}}},function(t,e){var n="undefined"!==typeof Element,r="function"===typeof Map,i="function"===typeof Set,o="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var s,u,l,c;if(Array.isArray(t)){if((s=t.length)!=e.length)return!1;for(u=s;0!==u--;)if(!a(t[u],e[u]))return!1;return!0}if(r&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(c=t.entries();!(u=c.next()).done;)if(!e.has(u.value[0]))return!1;for(c=t.entries();!(u=c.next()).done;)if(!a(u.value[1],e.get(u.value[0])))return!1;return!0}if(i&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(c=t.entries();!(u=c.next()).done;)if(!e.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if((s=t.length)!=e.length)return!1;for(u=s;0!==u--;)if(t[u]!==e[u])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if((s=(l=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(u=s;0!==u--;)if(!Object.prototype.hasOwnProperty.call(e,l[u]))return!1;if(n&&t instanceof Element)return!1;for(u=s;0!==u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!t.$$typeof)&&!a(t[l[u]],e[l[u]]))return!1;return!0}return t!==t&&e!==e}t.exports=function(t,e){try{return a(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),i=function(t){var e=Object(r.useRef)(null);return Object(r.useEffect)((function(){t&&("function"===typeof t?t(e.current):t.current=e.current)})),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(275),i=n(41),o=n(1435),a=n(1436),s=n(1437),u=n(0);function l(t){return t&&"object"===typeof t&&"default"in t?t:{default:t}}var c=l(s),f=Object.defineProperty,h=Object.defineProperties,p=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,y=(t,e,n)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;const v={id:"pmt",module:"pmt",name:"PMTiles",version:"undefined"!==typeof __VERSION__?__VERSION__:"latest",extensions:["pmtiles"],mimeTypes:["application/x-protobuf"],worker:!0,category:"geometry",options:{pmt:{raster:!1},mvt:{},image:{}}},b=(_=((t,e)=>{for(var n in e||(e={}))m.call(e,n)&&y(t,n,e[n]);if(d)for(var n of d(e))g.call(e,n)&&y(t,n,e[n]);return t})({},v),h(_,p({parse:(t,e)=>{return n=void 0,r=null,i=function*(){return A(t,e)},new Promise(((t,e)=>{var o=t=>{try{s(i.next(t))}catch(n){e(n)}},a=t=>{try{s(i.throw(t))}catch(n){e(n)}},s=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,a);s((i=i.apply(n,r)).next())}));var n,r,i},parseSync:(t,e)=>A(t,e),binary:!0})));var _;function A(t,e){if(e.pmt.raster){const e=new Blob([t],{type:"image/png"});return URL.createObjectURL(e),createImageBitmap(e)}{const n=function(t,e){if(e===o.Compression.None||e===o.Compression.Unknown)return t;if(e===o.Compression.Gzip)return a.decompressSync(new Uint8Array(t));throw Error("Compression method not supported")}(t,e.pmt.tileCompression);return c.default(n,e)}}var w=Object.defineProperty,x=Object.defineProperties,E=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,C=(t,e,n)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T=(t,e)=>{for(var n in e||(e={}))S.call(e,n)&&C(t,n,e[n]);if(O)for(var n of O(e))P.call(e,n)&&C(t,n,e[n]);return t},k=(t,e)=>x(t,E(e)),I=(t,e,n)=>new Promise(((r,i)=>{var o=t=>{try{s(n.next(t))}catch(e){i(e)}},a=t=>{try{s(n.throw(t))}catch(e){i(e)}},s=t=>t.done?r(t.value):Promise.resolve(t.value).then(o,a);s((n=n.apply(t,e)).next())}));const L=k(T({},i.GeoJsonLayer.defaultProps),{onDataLoad:{type:"function",value:null,optional:!0,compare:!1},uniqueIdProperty:"",highlightedFeatureId:null,binary:!0,raster:!1,loaders:[v]});class j extends o.PMTiles{getZxyOffset(t,e,n,r){return I(this,null,(function*(){const r=o.zxyToTileId(t,e,n),i=yield this.cache.getHeader(this.source);if(t<i.minZoom||t>i.maxZoom)return;let a=i.rootDirectoryOffset,s=i.rootDirectoryLength;for(let t=0;t<=3;t++){const t=yield this.cache.getDirectory(this.source,a,s,i),e=o.findTile(t,r);if(!e)return;if(e.runLength>0)return{offset:e.offset,length:e.length};a=i.leafDirectoryOffset+e.offset,s=e.length}throw Error("Maximum directory depth exceeded")}))}}class M extends r.MVTLayer{initializeState(){super.initializeState();const t=void 0===this.context.viewport.resolution&&this.props.binary,e=this.props.raster;this._updateTileData=()=>I(this,null,(function*(){let t=this.props.data,e=this.props.raster,n=new j(t);const r=yield n.getHeader();this.setState({data:t,tileJSON:null,pmtiles:n,raster:e,header:r})})),this.setState({binary:t,raster:e,data:null,tileJSON:null})}getTileData(t,e){const{index:n,signal:r}=t,{data:i,binary:o,raster:a,pmtiles:s,header:u}=this.state,{x:l,y:c,z:f}=n;let h=this.getLoadOptions();const{fetch:p}=this.props;return s.getZxyOffset(f,l,c,r).then((t=>{if(!t)return new Promise((t=>t(null)));const e=t.offset+u.tileDataOffset,s=t.length;return h=k(T({},h),{mimeType:"application/x-protobuf",pmt:T({workerUrl:"https://unpkg.com/@maticoapp/deck.gl-pmtiles@latest/dist/pmt-worker.js",coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:n,raster:a,tileCompression:u.tileCompression},null==h?void 0:h.pmt),gis:o?{format:"binary"}:{},fetch:{headers:{Range:`bytes=${e}-${e+s-1}`}}}),p(i,{propName:"data",layer:this,loadOptions:h,signal:r})}))}}M.layerName="PMTilesLayer",M.defaultProps=L;var R=Object.defineProperty,N=Object.defineProperties,D=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,U=(t,e,n)=>e in t?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G=(t,e)=>{for(var n in e||(e={}))B.call(e,n)&&U(t,n,e[n]);if(F)for(var n of F(e))z.call(e,n)&&U(t,n,e[n]);return t};function V({mapData:t,shape:e,leftId:n,dataAccessor:r}){switch(e){case"columnar-table":case"binary-geometry":case"binary":{const i="columnar-table"===e?t.data:t;Object.entries(i).forEach((([t,{properties:e}])=>{e&&e.forEach(((e,o)=>{const a=e[n],s=r(a);s&&(i[t].properties[o]=G(G({},e),s))}))}));break}case"geojson-row-table":case"geojson":("geojson-row-table"===e?t.data:t).features.forEach((t=>{const e=t.properties[n],i=r(e);i&&(t.properties=G(G({},t.properties),i))}));break}return t}e.PMTLayer=M,e.PMTLoader=b,e.PMTWorkerLoader=v,e.useJoinData=function({shape:t,leftId:e,rightId:n,tableData:r,dataDict:i,dataMap:o,updateTriggers:a}){const s=u.useMemo((()=>{if(i||o)return o?t=>o.get(t):i?t=>i[t]:t=>{};{const t=new Map;return r&&r.forEach((e=>t.set(e[n],e))),e=>t.get(e)}}),[n,a||r]);return n=>V({shape:t,mapData:n,leftId:e,dataAccessor:s})},e.useJoinLoader=({loader:t,shape:e,leftId:n,rightId:r,tableData:i,dataDict:o,dataMap:a,updateTriggers:s})=>{const l=u.useMemo((()=>{if(o||a)return a?t=>a.get(t):o?t=>o[t]:t=>{};{const t=new Map;return i&&i.forEach((e=>t.set(e[r],e))),e=>t.get(e)}}),[r,s||i]),c=((t,e)=>N(t,D(e)))(G({},t),{parse:(r,i)=>{return o=void 0,a=null,s=function*(){const o=yield t.parse(r,i);return V({shape:e,mapData:o,leftId:n,dataAccessor:l})},new Promise(((t,e)=>{var n=t=>{try{i(s.next(t))}catch(n){e(n)}},r=t=>{try{i(s.throw(t))}catch(n){e(n)}},i=e=>e.done?t(e.value):Promise.resolve(e.value).then(n,r);i((s=s.apply(o,a)).next())}));var o,a,s}});return c}},function(t,e,n){(function(t,r){var i;i=function(e,n,i,o,a,s,u){"use strict";function l(t){return t&&"object"===typeof t&&"default"in t?t:{default:t}}var c=l(n),f=l(a),h=l(s),p=l(u);function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function g(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){m(o,r,i,a,s,"next",t)}function s(t){m(o,r,i,a,s,"throw",t)}a(void 0)}))}}function y(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 v(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=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"===typeof t)return y(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)?y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var _={exports:{}};!function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=c(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(I){return{type:"throw",arg:I}}}t.wrap=l;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",m={};function g(){}function y(){}function v(){}var b={};u(b,o,(function(){return this}));var _=Object.getPrototypeOf,A=_&&_(_(T([])));A&&A!==n&&r.call(A,o)&&(b=A);var w=v.prototype=g.prototype=Object.create(b);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"===typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var n=t[o];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return y.prototype=v,u(w,"constructor",v),u(v,"constructor",y),y.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new E(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),u(w,s,"Generator"),u(w,o,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(_);var A=_.exports,w={exports:{}};function x(){}function E(){}E.resetWarningCache=x,w.exports=function(){function t(t,e,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:E,resetWarningCache:x};return n.PropTypes=n,n}();var O=w.exports;function S(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 P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){P(t,e,n[e])}))}return t}function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var k=function(){},I={},L={},j={mark:k,measure:k};try{"undefined"!==typeof window&&(I=window),"undefined"!==typeof document&&(L=document),"undefined"!==typeof MutationObserver&&MutationObserver,"undefined"!==typeof performance&&(j=performance)}catch(Qe){}var M=(I.navigator||{}).userAgent,R=void 0===M?"":M,N=I,D=L,F=j;N.document;var B=!!D.documentElement&&!!D.head&&"function"===typeof D.addEventListener&&"function"===typeof D.createElement;~R.indexOf("MSIE")||R.indexOf("Trident/");var z="svg-inline--fa",U="group",G="primary",V="secondary",q=N.FontAwesomeConfig||{};D&&"function"===typeof D.querySelector&&[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((function(t){var e=T(t,2),n=e[0],r=e[1],i=function(t){return""===t||"false"!==t&&("true"===t||t)}(function(t){var e=D.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}(n));void 0!==i&&null!==i&&(q[r]=i)}));var H=C({},{familyPrefix:"fa",replacementClass:z,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},q);H.autoReplaceSvg||(H.observeMutations=!1);var W=C({},H);N.FontAwesomeConfig=W;var X=N||{};X.___FONT_AWESOME___||(X.___FONT_AWESOME___={}),X.___FONT_AWESOME___.styles||(X.___FONT_AWESOME___.styles={}),X.___FONT_AWESOME___.hooks||(X.___FONT_AWESOME___.hooks={}),X.___FONT_AWESOME___.shims||(X.___FONT_AWESOME___.shims=[]);var Y=X.___FONT_AWESOME___,Z=[];B&&((D.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(D.readyState)||D.addEventListener("DOMContentLoaded",(function t(){D.removeEventListener("DOMContentLoaded",t),Z.map((function(t){return t()}))}))),"undefined"!==typeof t&&"undefined"!==typeof t.process&&t.process.emit,"undefined"===typeof r&&setTimeout;var K={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function $(){for(var t=12,e="";t-- >0;)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return e}function J(t){return"".concat(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Q(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,": ").concat(t[n],";")}),"")}function tt(t){return t.size!==K.size||t.x!==K.x||t.y!==K.y||t.rotate!==K.rotate||t.flipX||t.flipY}function et(t){var e=t.transform,n=t.containerWidth,r=t.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(32*e.x,", ").concat(32*e.y,") "),a="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),s="rotate(".concat(e.rotate," 0 0)");return{outer:i,inner:{transform:"".concat(o," ").concat(a," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}var nt={x:0,y:0,width:"100%",height:"100%"};function rt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function it(t){var e=t.icons,n=e.main,r=e.mask,i=t.prefix,o=t.iconName,a=t.transform,s=t.symbol,u=t.title,l=t.maskId,c=t.titleId,f=t.extra,h=t.watchable,p=void 0!==h&&h,d=r.found?r:n,m=d.width,g=d.height,y="fak"===i,v=y?"":"fa-w-".concat(Math.ceil(m/g*16)),b=[W.replacementClass,o?"".concat(W.familyPrefix,"-").concat(o):"",v].filter((function(t){return-1===f.classes.indexOf(t)})).filter((function(t){return""!==t||!!t})).concat(f.classes).join(" "),_={children:[],attributes:C({},f.attributes,{"data-prefix":i,"data-icon":o,class:b,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(m," ").concat(g)})},A=y&&!~f.classes.indexOf("fa-fw")?{width:"".concat(m/g*16*.0625,"em")}:{};p&&(_.attributes["data-fa-i2svg"]=""),u&&_.children.push({tag:"title",attributes:{id:_.attributes["aria-labelledby"]||"title-".concat(c||$())},children:[u]});var w=C({},_,{prefix:i,iconName:o,main:n,mask:r,maskId:l,transform:a,symbol:s,styles:C({},A,f.styles)}),x=r.found&&n.found?function(t){var e,n=t.children,r=t.attributes,i=t.main,o=t.mask,a=t.maskId,s=t.transform,u=i.width,l=i.icon,c=o.width,f=o.icon,h=et({transform:s,containerWidth:c,iconWidth:u}),p={tag:"rect",attributes:C({},nt,{fill:"white"})},d=l.children?{children:l.children.map(rt)}:{},m={tag:"g",attributes:C({},h.inner),children:[rt(C({tag:l.tag,attributes:C({},l.attributes,h.path)},d))]},g={tag:"g",attributes:C({},h.outer),children:[m]},y="mask-".concat(a||$()),v="clip-".concat(a||$()),b={tag:"mask",attributes:C({},nt,{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,g]},_={tag:"defs",children:[{tag:"clipPath",attributes:{id:v},children:(e=f,"g"===e.tag?e.children:[e])},b]};return n.push(_,{tag:"rect",attributes:C({fill:"currentColor","clip-path":"url(#".concat(v,")"),mask:"url(#".concat(y,")")},nt)}),{children:n,attributes:r}}(w):function(t){var e=t.children,n=t.attributes,r=t.main,i=t.transform,o=Q(t.styles);if(o.length>0&&(n.style=o),tt(i)){var a=et({transform:i,containerWidth:r.width,iconWidth:r.width});e.push({tag:"g",attributes:C({},a.outer),children:[{tag:"g",attributes:C({},a.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:C({},r.icon.attributes,a.path)}]}]})}else e.push(r.icon);return{children:e,attributes:n}}(w),E=x.children,O=x.attributes;return w.children=E,w.attributes=O,s?function(t){var e=t.prefix,n=t.iconName,r=t.children,i=t.attributes,o=t.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:C({},i,{id:!0===o?"".concat(e,"-").concat(W.familyPrefix,"-").concat(n):o}),children:r}]}]}(w):function(t){var e=t.children,n=t.main,r=t.mask,i=t.attributes,o=t.styles,a=t.transform;if(tt(a)&&n.found&&!r.found){var s={x:n.width/n.height/2,y:.5};i.style=Q(C({},o,{"transform-origin":"".concat(s.x+a.x/16,"em ").concat(s.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:e}]}(w)}W.measurePerformance&&F&&F.mark&&F.measure;var ot=function(t,e,n,r){var i,o,a,s=Object.keys(t),u=s.length,l=void 0!==r?function(t,e){return function(n,r,i,o){return t.call(e,n,r,i,o)}}(e,r):e;for(void 0===n?(i=1,a=t[s[0]]):(i=0,a=n);i<u;i++)a=l(a,t[o=s[i]],o,t);return a};function at(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,i=void 0!==r&&r,o=Object.keys(e).reduce((function(t,n){var r=e[n];return r.icon?t[r.iconName]=r.icon:t[n]=r,t}),{});"function"!==typeof Y.hooks.addPack||i?Y.styles[t]=C({},Y.styles[t]||{},o):Y.hooks.addPack(t,o),"fas"===t&&at("fa",e)}var st=Y.styles,ut=Y.shims,lt=function(){var t=function(t){return ot(st,(function(e,n,r){return e[r]=ot(n,t,{}),e}),{})};t((function(t,e,n){return e[3]&&(t[e[3]]=n),t})),t((function(t,e,n){var r=e[2];return t[n]=n,r.forEach((function(e){t[e]=n})),t}));var e="far"in st;ot(ut,(function(t,n){var r=n[0],i=n[1],o=n[2];return"far"!==i||e||(i="fas"),t[r]={prefix:i,iconName:o},t}),{})};function ct(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}function ft(t){var e=t.tag,n=t.attributes,r=void 0===n?{}:n,i=t.children,o=void 0===i?[]:i;return"string"===typeof t?J(t):"<".concat(e," ").concat(function(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,'="').concat(J(t[n]),'" ')}),"").trim()}(r),">").concat(o.map(ft).join(""),"</").concat(e,">")}function ht(t){this.name="MissingIcon",this.message=t||"Icon unavailable",this.stack=(new Error).stack}lt(),Y.styles,ht.prototype=Object.create(Error.prototype),ht.prototype.constructor=ht;var pt={fill:"currentColor"},dt={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};C({},pt,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"});var mt=C({},dt,{attributeName:"opacity"});function gt(t){var e=t[0],n=t[1],r=T(t.slice(4),1)[0];return{found:!0,width:e,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(W.familyPrefix,"-").concat(U)},children:[{tag:"path",attributes:{class:"".concat(W.familyPrefix,"-").concat(V),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(W.familyPrefix,"-").concat(G),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}C({},pt,{cx:"256",cy:"364",r:"28"}),C({},dt,{attributeName:"r",values:"28;14;28;28;14;28;"}),C({},mt,{values:"1;0;1;1;0;1;"}),C({},pt,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),C({},mt,{values:"1;0;0;0;0;1;"}),C({},pt,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),C({},mt,{values:"0;0;1;1;0;0;"}),Y.styles,Y.styles;var yt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.definitions={}}var e,n,r;return e=t,n=[{key:"add",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n.reduce(this._pullDefinitions,{});Object.keys(i).forEach((function(e){t.definitions[e]=C({},t.definitions[e]||{},i[e]),at(e,i[e]),lt()}))}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(t,e){var n=e.prefix&&e.iconName&&e.icon?{0:e}:e;return Object.keys(n).map((function(e){var r=n[e],i=r.prefix,o=r.iconName,a=r.icon;t[i]||(t[i]={}),t[i][o]=a})),t}}],n&&S(e.prototype,n),r&&S(e,r),t}();function vt(){W.autoAddCss&&!xt&&(function(t){if(t&&B){var e=D.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var n=D.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}D.head.insertBefore(e,r)}}(function(){var t="fa",e=z,n=W.familyPrefix,r=W.replacementClass,i='svg:not(:root).svg-inline--fa {\n  overflow: visible;\n}\n\n.svg-inline--fa {\n  display: inline-block;\n  font-size: inherit;\n  height: 1em;\n  overflow: visible;\n  vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n  vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n  width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n  width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n  width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n  width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n  width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n  width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n  width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n  width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n  width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n  width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n  width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n  width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n  width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n  width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n  width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n  width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n  width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n  width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n  width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n  width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n  margin-right: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n  margin-left: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-border {\n  height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n  width: 2em;\n}\n.svg-inline--fa.fa-fw {\n  width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.fa-layers {\n  display: inline-block;\n  height: 1em;\n  position: relative;\n  text-align: center;\n  vertical-align: -0.125em;\n  width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n  display: inline-block;\n  position: absolute;\n  text-align: center;\n}\n\n.fa-layers-text {\n  left: 50%;\n  top: 50%;\n  -webkit-transform: translate(-50%, -50%);\n          transform: translate(-50%, -50%);\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter {\n  background-color: #ff253a;\n  border-radius: 1em;\n  -webkit-box-sizing: border-box;\n          box-sizing: border-box;\n  color: #fff;\n  height: 1.5em;\n  line-height: 1;\n  max-width: 5em;\n  min-width: 1.5em;\n  overflow: hidden;\n  padding: 0.25em;\n  right: 0;\n  text-overflow: ellipsis;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n  bottom: 0;\n  right: 0;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom right;\n          transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n  bottom: 0;\n  left: 0;\n  right: auto;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom left;\n          transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n  right: 0;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-top-left {\n  left: 0;\n  right: auto;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top left;\n          transform-origin: top left;\n}\n\n.fa-lg {\n  font-size: 1.3333333333em;\n  line-height: 0.75em;\n  vertical-align: -0.0667em;\n}\n\n.fa-xs {\n  font-size: 0.75em;\n}\n\n.fa-sm {\n  font-size: 0.875em;\n}\n\n.fa-1x {\n  font-size: 1em;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-6x {\n  font-size: 6em;\n}\n\n.fa-7x {\n  font-size: 7em;\n}\n\n.fa-8x {\n  font-size: 8em;\n}\n\n.fa-9x {\n  font-size: 9em;\n}\n\n.fa-10x {\n  font-size: 10em;\n}\n\n.fa-fw {\n  text-align: center;\n  width: 1.25em;\n}\n\n.fa-ul {\n  list-style-type: none;\n  margin-left: 2.5em;\n  padding-left: 0;\n}\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  left: -2em;\n  position: absolute;\n  text-align: center;\n  width: 2em;\n  line-height: inherit;\n}\n\n.fa-border {\n  border: solid 0.08em #eee;\n  border-radius: 0.1em;\n  padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n  float: left;\n}\n\n.fa-pull-right {\n  float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n  margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n  margin-left: 0.3em;\n}\n\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n          animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n          animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n.fa-rotate-90 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n  -webkit-transform: rotate(90deg);\n          transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n  -webkit-transform: rotate(180deg);\n          transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n  -webkit-transform: rotate(270deg);\n          transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n  -webkit-transform: scale(-1, 1);\n          transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(1, -1);\n          transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(-1, -1);\n          transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n  -webkit-filter: none;\n          filter: none;\n}\n\n.fa-stack {\n  display: inline-block;\n  height: 2em;\n  position: relative;\n  width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n  height: 1em;\n  width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n  height: 2em;\n  width: 2.5em;\n}\n\n.fa-inverse {\n  color: #fff;\n}\n\n.sr-only {\n  border: 0;\n  clip: rect(0, 0, 0, 0);\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n  clip: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  position: static;\n  width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n  fill: var(--fa-primary-color, currentColor);\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n  fill: var(--fa-secondary-color, currentColor);\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n  fill: black;\n}\n\n.fad.fa-inverse {\n  color: #fff;\n}';if(n!==t||r!==e){var o=new RegExp("\\.".concat(t,"\\-"),"g"),a=new RegExp("\\--".concat(t,"\\-"),"g"),s=new RegExp("\\.".concat(e),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}()),xt=!0)}function bt(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map((function(t){return ft(t)}))}}),Object.defineProperty(t,"node",{get:function(){if(B){var e=D.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function _t(t){var e=t.prefix,n=void 0===e?"fa":e,r=t.iconName;if(r)return ct(wt.definitions,n,r)||ct(Y.styles,n,r)}var At,wt=new yt,xt=!1,Et=function(t){return function(t){var e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t?t.toLowerCase().split(" ").reduce((function(t,e){var n=e.toLowerCase().split("-"),r=n[0],i=n.slice(1).join("-");if(r&&"h"===i)return t.flipX=!0,t;if(r&&"v"===i)return t.flipY=!0,t;if(i=parseFloat(i),isNaN(i))return t;switch(r){case"grow":t.size=t.size+i;break;case"shrink":t.size=t.size-i;break;case"left":t.x=t.x-i;break;case"right":t.x=t.x+i;break;case"up":t.y=t.y-i;break;case"down":t.y=t.y+i;break;case"rotate":t.rotate=t.rotate+i}return t}),e):e}(t)},Ot=(At=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,r=void 0===n?K:n,i=e.symbol,o=void 0!==i&&i,a=e.mask,s=void 0===a?null:a,u=e.maskId,l=void 0===u?null:u,c=e.title,f=void 0===c?null:c,h=e.titleId,p=void 0===h?null:h,d=e.classes,m=void 0===d?[]:d,g=e.attributes,y=void 0===g?{}:g,v=e.styles,b=void 0===v?{}:v;if(t){var _=t.prefix,A=t.iconName,w=t.icon;return bt(C({type:"icon"},t),(function(){return vt(),W.autoA11y&&(f?y["aria-labelledby"]="".concat(W.replacementClass,"-title-").concat(p||$()):(y["aria-hidden"]="true",y.focusable="false")),it({icons:{main:gt(w),mask:s?gt(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:_,iconName:A,transform:C({},K,r),symbol:o,title:f,maskId:l,titleId:p,extra:{attributes:y,styles:b,classes:m}})}))}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(t||{}).icon?t:_t(t||{}),r=e.mask;return r&&(r=(r||{}).icon?r:_t(r||{})),At(n,C({},e,{mask:r}))});function St(t){return St="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},St(t)}function Pt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ct(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 Tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ct(Object(n),!0).forEach((function(e){Pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function kt(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 It(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Lt(t){return e=t,(e-=0)===e?t:(t=t.replace(/[\-_\s]+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))).substr(0,1).toLowerCase()+t.substr(1);var e}function jt(t){return t.split(";").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n,r=e.indexOf(":"),i=Lt(e.slice(0,r)),o=e.slice(r+1).trim();return i.startsWith("webkit")?t[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=o:t[i]=o,t}),{})}var Mt=!1;try{Mt=!0}catch(Qe){}function Rt(t){return t&&"object"===St(t)&&t.prefix&&t.iconName&&t.icon?t:null===t?null:t&&"object"===St(t)&&t.prefix&&t.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"===typeof t?{prefix:"fas",iconName:t}:void 0}function Nt(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?Pt({},t,e):{}}function Dt(t){var e=t.forwardedRef,n=kt(t,["forwardedRef"]),r=n.icon,i=n.mask,o=n.symbol,a=n.className,s=n.title,u=n.titleId,l=Rt(r),c=Nt("classes",[].concat(It(function(t){var e,n=t.spin,r=t.pulse,i=t.fixedWidth,o=t.inverse,a=t.border,s=t.listItem,u=t.flip,l=t.size,c=t.rotation,f=t.pull,h=(Pt(e={"fa-spin":n,"fa-pulse":r,"fa-fw":i,"fa-inverse":o,"fa-border":a,"fa-li":s,"fa-flip-horizontal":"horizontal"===u||"both"===u,"fa-flip-vertical":"vertical"===u||"both"===u},"fa-".concat(l),"undefined"!==typeof l&&null!==l),Pt(e,"fa-rotate-".concat(c),"undefined"!==typeof c&&null!==c&&0!==c),Pt(e,"fa-pull-".concat(f),"undefined"!==typeof f&&null!==f),Pt(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(h).map((function(t){return h[t]?t:null})).filter((function(t){return t}))}(n)),It(a.split(" ")))),f=Nt("transform","string"===typeof n.transform?Et(n.transform):n.transform),h=Nt("mask",Rt(i)),p=Ot(l,Tt({},c,{},f,{},h,{symbol:o,title:s,titleId:u}));if(!p)return function(){var t;!Mt&&console&&"function"===typeof console.error&&(t=console).error.apply(t,arguments)}("Could not find icon",l),null;var d=p.abstract,m={ref:e};return Object.keys(n).forEach((function(t){Dt.defaultProps.hasOwnProperty(t)||(m[t]=n[t])})),qt(d[0],m)}Dt.displayName="FontAwesomeIcon",Dt.propTypes={border:O.bool,className:O.string,mask:O.oneOfType([O.object,O.array,O.string]),fixedWidth:O.bool,inverse:O.bool,flip:O.oneOf(["horizontal","vertical","both"]),icon:O.oneOfType([O.object,O.array,O.string]),listItem:O.bool,pull:O.oneOf(["right","left"]),pulse:O.bool,rotation:O.oneOf([0,90,180,270]),size:O.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:O.bool,symbol:O.oneOfType([O.bool,O.string]),title:O.string,transform:O.oneOfType([O.string,O.object]),swapOpacity:O.bool},Dt.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var Ft,Bt,zt,Ut,Gt,Vt,qt=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"===typeof n)return n;var i=(n.children||[]).map((function(n){return t(e,n)})),o=Object.keys(n.attributes||{}).reduce((function(t,e){var r=n.attributes[e];switch(e){case"class":t.attrs.className=r,delete n.attributes.class;break;case"style":t.attrs.style=jt(r);break;default:0===e.indexOf("aria-")||0===e.indexOf("data-")?t.attrs[e.toLowerCase()]=r:t.attrs[Lt(e)]=r}return t}),{attrs:{}}),a=r.style,s=void 0===a?{}:a,u=kt(r,["style"]);return o.attrs.style=Tt({},o.attrs.style,{},s),e.apply(void 0,[n.tag,Tt({},o.attrs,{},u)].concat(It(i)))}.bind(null,c.default.createElement),Ht=o.css(Ft||(Ft=b(["\n  display: flex;\n  justify-content: flex-end;\n  align-items: center;\n  margin-right: 1rem;\n  .osrv-toolbar-button-text {\n    display: none;\n  }\n  @media screen and (max-width: 768px) {\n    margin-right: 0;\n  }\n"]))),Wt=o.css(Bt||(Bt=b(["\n  color: white;\n  background: rgba(0, 0, 0, 0.5);\n  border-radius: 14px;\n  border: 0;\n  font-size: 2rem;\n  padding: 10px;\n\n  &:hover {\n    background: rgba(0, 0, 0, 0.75);\n  }\n"]))),Xt=o.css(zt||(zt=b(["\n  position: relative;\n  display: inline-block;\n"]))),Yt=o.css(Ut||(Ut=b(["\n  position: absolute;\n  top: 50px;\n  left: -65px;\n  background: #342f2e;\n  color: #e3e3e3;\n  width: 200px;\n  list-style: none;\n  margin: 0;\n  padding: 0;\n  border: 1px solid #716c6b;\n\n  button {\n    padding: 0.75rem 1rem;\n    color: #f0f0f0;\n    display: inline-block;\n    width: 100%;\n    font-size: 1rem;\n    &:hover {\n      background: #716c6b;\n      transition: all 0.25s ease-in-out;\n    }\n  }\n"]))),Zt=function(t){var e=t.onDownloadCropClick,r=t.onDownloadFullSize,a=t.toolBarOptions,s=void 0===a?{}:a,u=t.containerId,l=v(n.useState(!1),2),f=l[0],h=l[1];return o.jsx("nav",{css:Ht,className:"osrv-toolbar-wrapper"},(null===s||void 0===s?void 0:s.showZoom)&&o.jsx(c.default.Fragment,null,o.jsx("button",{id:"zoom-in-".concat(u),"data-testid":"zoom-in",href:"#zoom-in",css:Wt,className:"osrv-toolbar-button",title:"Zoom In"},o.jsx(Dt,{icon:"search-plus"}),o.jsx("span",{className:"osrv-toolbar-button-text"},"Zoom In")),o.jsx("button",{id:"zoom-out-".concat(u),"data-testid":"zoom-out",href:"#zoom-out",css:Wt,className:"osrv-toolbar-button",title:"Zoom Out"},o.jsx(Dt,{icon:"search-minus"}),o.jsx("span",{className:"osrv-toolbar-button-text"},"Zoom Out"))),!i.isMobile&&(null===s||void 0===s?void 0:s.showFullScreen)&&o.jsx("button",{id:"full-page-".concat(u),"data-testid":"full-page",href:"#full-page",css:Wt,className:"osrv-toolbar-button",title:"Full Screen"},o.jsx(Dt,{icon:"expand"}),o.jsx("span",{className:"osrv-toolbar-button-text"},"Full Screen")),!i.isMobile&&(null===s||void 0===s?void 0:s.showDownload)&&o.jsx("div",{css:Xt},o.jsx("button",{"data-testid":"download",onClick:function(t){t.preventDefault(),h(!f)},css:Wt,className:"osrv-toolbar-button","aria-haspopup":"true","aria-expanded":f,title:"Download"},o.jsx(Dt,{icon:"download"}),o.jsx("span",{className:"osrv-toolbar-button-text"},"Download Image")),f&&o.jsx("ul",{css:Yt},o.jsx("li",null,o.jsx("button",{"data-testid":"download-crop",title:"Download cropped canvas",onClick:function(t){t.preventDefault(),e(),h(!1)},css:Wt,className:"osrv-toolbar-button"},"Download crop")),o.jsx("li",null,o.jsx("button",{"data-testid":"download-full",onClick:function(t){t.preventDefault(),r(),h(!1)},css:Wt,className:"osrv-toolbar-button",title:"Download full size image"},"Download full size")))),(null===s||void 0===s?void 0:s.showPreviousNext)&&o.jsx(c.default.Fragment,null,o.jsx("button",{id:"previous-".concat(u),"data-testid":"previous",href:"#previous",css:Wt,className:"osrv-toolbar-button",title:"Previous"},o.jsx(Dt,{icon:"arrow-circle-left"}),o.jsx("span",{className:"osrv-toolbar-button-text"},"Previous")),o.jsx("button",{id:"next-".concat(u),"data-testid":"next",href:"#next",css:Wt,className:"osrv-toolbar-button",title:"Next"},o.jsx(Dt,{icon:"arrow-circle-right"}),o.jsx("span",{className:"osrv-toolbar-button-text"},"Next"))))};function Kt(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 $t(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}Zt.propTypes={isMobile:O.bool,onDownloadCropClick:O.func,onDownloadFullSize:O.func,toolBarOptions:O.shape({showDownload:O.bool,showFullScreen:O.bool,showPreviousNext:O.bool,showZoom:O.bool,containerId:O.string})},Zt.defaultProps={toolBarOptions:{showDownload:!0,showFullScreen:!0,showPreviousNext:!0,showZoom:!0,containerId:"openseadragon1"}};var Jt,Qt,te,ee,ne=o.css(Gt||(Gt=b(["\n  width: 350px;\n  color: #342f2e;\n  padding-right: 1rem;\n  font-size: 1rem;\n  @media screen and (max-width: 767px) {\n    display: none;\n  }\n"]))),re=o.css(Vt||(Vt=b(["\n  text-align: left;\n"]))),ie=function(t){var e=t.currentTileSource,n=t.onFileSetChange,r=t.tileSources,i=void 0===r?[]:r,a=i.length;return!e||a<2?null:o.jsx("div",{css:ne,className:"osrv-tilesource-select-wrapper","data-testid":"react-select-wrapper"},o.jsx(f.default,{classNamePrefix:"react-select",css:re,getOptionValue:function(t){return t.id},isMulti:!1,maxMenuHeight:600,onChange:function(t){n(t.id)},options:i,placeholder:"Filter work file sets",theme:function(t){return $t($t({},t),{},{borderRadius:0,colors:$t($t({},t.colors),{},{primary:"#716c6b",primary50:"#d8d6d6",primary25:"#bbb8b8"})})},"aria-label":"Select file set",value:e}))},oe={label:O.string,id:O.string};ie.propTypes={currentTileSource:O.shape(oe),onFileSetChange:O.func,tileSources:O.array};var ae=o.css(Qt||(Qt=b(["\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  overflow-x: scroll;\n  overflow-y: hidden;\n"]))),se=o.css(te||(te=b(["\n  outline: 8px solid #f0f0f0;\n  cursor: pointer;\n  transition: outline 0.2s ease-in-out;\n"]))),ue=o.css(ee||(ee=b(["\n  clear: both;\n  list-style: none;\n  padding: 0;\n  white-space: nowrap;\n  margin-top: 13px;\n  margin-bottom: 4px;\n  li {\n    box-sizing: border-box;\n    padding: 0 10px 0 10px;\n    display: inline-block;\n\n    &.active {\n      img {\n        ","\n      }\n    }\n  }\n\n  img {\n    margin: 8px;\n    &:hover {\n      ","\n    }\n  }\n"])),se,se);function le(t){var e,n=t.currentTileSource,r=t.tileSources,i=void 0===r?[]:r,a=t.onThumbClick;return t.isPreview,o.jsx("div",{"data-testid":"open-seadragon-thumbnails-container",className:"osrv-thumbnails-wrapper",css:(e="relative",o.css(Jt||(Jt=b(["\n  position: ",";\n  height: 113px;\n  z-index: 4;\n  overflow: hidden;\n  transition: transform 0.3s ease;\n"])),e))},o.jsx("div",{css:ae},o.jsx("ul",{css:ue},i.map((function(t){return o.jsx("li",{key:t.id,"data-testid":"tile-source-thumbnail",onClick:function(){return a(t.id)},"aria-label":"Thumbnail",className:n&&n.id===t.id?"active":""},o.jsx("img",{src:"".concat(t.id,"/square/70,70/0/default.jpg"),"data-testid":"thumbnail-image",alt:t.label}))})))))}le.propTypes={currentFileset:O.object,onThumbClick:O.func,tileSources:O.array,isPreview:O.bool};var ce,fe,he,pe,de=c.default.createContext();function me(t){var e=t.pan,n=t.tileSourceIndex,r=t.zoom,i=new URLSearchParams(window.location.hash.slice(1));r&&i.set("zoom",r),e&&(i.set("x",e.x),i.set("y",e.y)),n&&n>0&&i.set("tilesource",n);var o=window.location.pathname+"#"+i.toString();window.history.replaceState({},"",o)}function ge(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 ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ge(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ve=o.css(ce||(ce=b(["\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: rgba(0, 0, 0, 0.8);\n  position: absolute;\n  z-index: 100;\n  width: 100%;\n  height: 60px;\n"]))),be=o.css(fe||(fe=b(["\n  text-align: left;\n  color: white;\n  font-size: 1.25rem;\n  padding-left: 1rem;\n"]))),_e=o.css(he||(he=b(["\n  font-size: 1rem;\n  color: #e3e3e3;\n  position: absolute;\n  z-index: 10;\n  width: 100%;\n  top: 80px;\n  padding-right: 1rem;\n\n  select {\n    color: #e3e3e3;\n    background-color: #716c6b;\n    height: auto;\n    margin: 1rem 0 1rem 1rem;\n  }\n\n  @media screen and (max-width: 768px) {\n    select {\n      display: none;\n    }\n  }\n"]))),Ae=function(t){var e=t.manifest;if(!e)return null;var r=e.label||"",a=v(n.useState(),2),s=a[0],l=a[1],f=v(n.useState([]),2),d=f[0],m=f[1],g=v(n.useState(),2),y=g[0],_=g[1],A=v(n.useState(),2),w=A[0],x=A[1],E=v(n.useState(window.location.hash),2),O=E[0],S=E[1],P=n.useContext(de),C=o.css(pe||(pe=b(["\n    display: inline-block;\n    background: black;\n    width: 100%;\n    height: ","px;\n\n    @media screen and (max-width: 768px) {\n      height: ","px;\n    }\n  "])),P.height?P.height:800,P.height?P.height:500);n.useEffect((function(){m(function(t){var e=[];return t.sequences&&t.sequences[0].canvases?(t.sequences[0].canvases.forEach((function(t){t.images.length>0&&t.images[0].resource&&e.push({id:t.images[0].resource.service["@id"],label:t.label})})),e):e}(e))}),[]),n.useEffect((function(){var t=function(){var t={},e=window.location.hash.slice(1);return e&&e.split("&").forEach((function(e){var n=e.split("="),r=n[0],i=parseFloat(n[1]);!r||isNaN(i)?console.error("Bad hash param",e):t[r]=i})),t}(),e=t.tilesource;_(d.length>0?d[e||0]:null),x(e||0),S(t),function(){if(0!==d.length){var t={zoomInButton:"zoom-in-".concat(P.containerId),zoomOutButton:"zoom-out-".concat(P.containerId),fullPageButton:"full-page-".concat(P.containerId),nextButton:"next-".concat(P.containerId),previousButton:"previous-".concat(P.containerId)},e=function(){var t=null===P||void 0===P?void 0:P.openSeadragonOptions;return t&&Object.keys(t).length>0?t:{}};l(p.default(ye(ye({ajaxWithCredentials:!0,crossOriginPolicy:"Anonymous",defaultZoomLevel:0,gestureSettingsMouse:{scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!0,pinchToZoom:!0},id:P.containerId,loadTilesWithAjax:!0,navigatorPosition:"ABSOLUTE",navigatorTop:"100px",navigatorLeft:"40px",navigatorHeight:"200px",navigatorWidth:"260px",navImages:{},preserveViewport:!0,referenceStripScroll:"vertical",sequenceMode:!0,showFullPageControl:!i.isMobile,showNavigator:!i.isMobile,showNavigationControl:!0,showHomeControl:!1,showReferenceStrip:!1,toolbar:"toolbarDiv",tileSources:d.map((function(t){return t.id})),visibilityRatio:1},t),e())))}}()}),[d]),n.useEffect((function(){return s&&(s.addHandler("page",L),w>0&&s.goToPage(w),P.deepLinking&&(s.addHandler("pan",T),s.addHandler("zoom",T),s.addOnceHandler("open",k))),function(){s&&(s.removeHandler("pan",T),s.removeHandler("zoom",T))}}),[s]);var T=function(){s&&me({pan:s.viewport.getCenter(),zoom:s.viewport.getZoom()})},k=function(){var t=O,e=t.zoom||s.viewport.getZoom(),n=s.viewport.getCenter(),r=t.x||n.x,i=t.y||n.y;s.viewport.panTo(new u.Point(r,i),!0),s.viewport.zoomTo(e,null,!0)},I=function(){var t={};try{var e,n=s.drawer.canvas.height,r=s.drawer.canvas.width;t={width:e=r>3e3?3e3:r,height:e*(n/r)}}catch(i){console.error("Error in handling download click for a tile source in OpenSeadragon viewer"),t={}}return t},L=function(t){var e=t.page;_(d[e]),P.deepLinking&&me({tileSourceIndex:e})};function j(t){var e=d.findIndex((function(e){return e.id===t}));_(d[e]),s.goToPage(e)}return o.jsx(c.default.Fragment,null,o.jsx("div",{css:ve,className:"osrv-top-row-wrapper"},o.jsx("div",{css:be,className:"osrv-work-title"},r),P.showDropdown&&o.jsx("div",{"data-testid":"select-component-wrapper"},o.jsx(ie,{currentTileSource:y,onFileSetChange:function(t){j(t)},tileSources:d}))),o.jsx("div",{"data-testid":"toolbar-container",css:_e},o.jsx("div",{id:"toolbarDiv"},P.showToolbar&&o.jsx("div",{"data-testid":"toolbar-wrapper"},o.jsx(Zt,{onDownloadCropClick:function(){var t=I(),e=t.width,n=t.height;e&&n&&h.default.saveAsJPEG(s.drawer.canvas,y.label?y.label.split(" ").join("-"):"openseadragon-react-viewer-download",e,n)},onDownloadFullSize:function(){var t=I().width,e="".concat(y.id,"/full/").concat(t,",/0/default.jpg");window.open(e,"_blank")},toolBarOptions:P.toolBarOptions,containerId:P.containerId})))),o.jsx("div",{"data-testid":"instance-container",id:P.containerId,css:C}),P.showThumbnails&&d.length>1&&o.jsx("div",{"data-testid":"thumbnails-wrapper"},o.jsx(le,{currentTileSource:y,onThumbClick:function(t){j(t)},tileSources:d})))};Ae.propTypes={manifestUrl:O.string};var we,xe,Ee={prefix:"fas",iconName:"arrow-circle-left",icon:[512,512,[],"f0a8","M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm28.9-143.6L209.4 288H392c13.3 0 24-10.7 24-24v-16c0-13.3-10.7-24-24-24H209.4l75.5-72.4c9.7-9.3 9.9-24.8.4-34.3l-11-10.9c-9.4-9.4-24.6-9.4-33.9 0L107.7 239c-9.4 9.4-9.4 24.6 0 33.9l132.7 132.7c9.4 9.4 24.6 9.4 33.9 0l11-10.9c9.5-9.5 9.3-25-.4-34.3z"]},Oe={prefix:"fas",iconName:"arrow-circle-right",icon:[512,512,[],"f0a9","M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm-28.9 143.6l75.5 72.4H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h182.6l-75.5 72.4c-9.7 9.3-9.9 24.8-.4 34.3l11 10.9c9.4 9.4 24.6 9.4 33.9 0L404.3 273c9.4-9.4 9.4-24.6 0-33.9L271.6 106.3c-9.4-9.4-24.6-9.4-33.9 0l-11 10.9c-9.5 9.6-9.3 25.1.4 34.4z"]},Se={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"]},Pe={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"]},Ce={prefix:"fas",iconName:"home",icon:[576,512,[],"f015","M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"]},Te={prefix:"fas",iconName:"pen",icon:[512,512,[],"f304","M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"]},ke={prefix:"fas",iconName:"save",icon:[448,512,[],"f0c7","M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"]},Ie={prefix:"fas",iconName:"search-minus",icon:[512,512,[],"f010","M304 192v32c0 6.6-5.4 12-12 12H124c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"]},Le={prefix:"fas",iconName:"search-plus",icon:[512,512,[],"f00e","M304 192v32c0 6.6-5.4 12-12 12h-56v56c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-56h-56c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h56v-56c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v56h56c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"]},je={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"]},Me=o.css(we||(we=b(["\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  padding: 1.25rem 2.5rem 1.25rem 1.5rem;\n  position: relative;\n  text-align: center;\n  font-size: 1rem;\n"]))),Re=o.css(xe||(xe=b(["\n  background-color: #f14668;\n  color: #fff;\n"])));function Ne(t){var e=t.error,n=void 0===e?"An error occurred with no data passed to the notification":e;return o.jsx("div",{className:"osrv-error-message",css:[Me,Re]},n)}function De(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 Fe(t,e){return Fe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fe(t,e)}function Be(t){return Be="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},Be(t)}function ze(t,e){if(e&&("object"===Be(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ue(t){return Ue=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ue(t)}function Ge(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Qe){return!1}}();return function(){var n,r=Ue(t);if(e){var i=Ue(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ze(this,n)}}Ne.propTypes={error:O.string};var Ve,qe,He,We=function(t){!function(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&&Fe(t,e)}(o,t);var e,n,r,i=Ge(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).state={hasError:!1,displayError:""},e}return e=o,r=[{key:"getDerivedStateFromError",value:function(t){return{hasError:!0,error:t}}}],(n=[{key:"componentDidCatch",value:function(t,e){console.log("error",t),console.log("errorInfo",e)}},{key:"render",value:function(){return this.state.hasError?c.default.createElement(Ne,{error:this.state.error.message}):this.props.children}}])&&De(e.prototype,n),r&&De(e,r),o}(c.default.Component),Xe=o.css(Ve||(Ve=b(["\n  display: inline-block;\n  position: relative;\n  width: 80px;\n  height: 80px;\n  margin: auto;\n  top: 45%;\n  div {\n    box-sizing: border-box;\n    display: block;\n    position: absolute;\n    width: 64px;\n    height: 64px;\n    margin: 8px;\n    border: 8px solid #ccc;\n    border-radius: 50%;\n    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n    border-color: #ccc transparent transparent transparent;\n  }\n\n  div:nth-of-type(1) {\n    animation-delay: -0.45s;\n  }\n  div:nth-of-type(2) {\n    animation-delay: -0.3s;\n  }\n  div:nth-of-type(3) {\n    animation-delay: -0.15s;\n  }\n  @keyframes lds-ring {\n    0% {\n      transform: rotate(0deg);\n    }\n    100% {\n      transform: rotate(360deg);\n    }\n  }\n"])));function Ye(t){var e=t.active;return void 0===e||e?o.jsx("div",{css:Xe},o.jsx("div",null),o.jsx("div",null),o.jsx("div",null),o.jsx("div",null)):o.jsx(c.default.Fragment,null)}function Ze(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?Ze(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}Ye.propTypes={active:O.bool};var $e=o.css(qe||(qe=b(["\n  position: relative;\n"])));function Je(t){var e=t.manifest,r=void 0===e?{}:e,i=t.manifestUrl,a=t.options,s=t.openSeadragonOptions,u=t.toolBarOptions,l=void 0===u?{showZoom:!0,showFullScreen:!0,showDownload:!0,showPreviousNext:!0}:u,c=v(n.useState(),2),f=c[0],h=c[1],p=v(n.useState(),2),d=p[0],m=p[1];n.useEffect((function(){0!==Object.keys(r).length?h(r):function(){_.apply(this,arguments)}()}),[]);var y=o.css(He||(He=b(["\n    text-align: center;\n    height: ","px;\n  "])),a.height?a.height:500);function _(){return(_=g(A.mark((function t(){var e,n,r;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(i);case 3:return e=t.sent,t.next=6,e.json();case 6:n=t.sent,h(n),t.next=17;break;case 10:return t.prev=10,t.t0=t.catch(0),console.error("e",t.t0),console.error("".concat(t.t0.name,": ").concat(t.t0.message)),r=t.t0.message.includes("Unexpected token N in JSON at position")?"Error fetching the manifest url, or the manifest is invalid.  View browser console for details.":"".concat(t.t0.name,": ").concat(t.t0.message),m(r),t.abrupt("return",Promise.resolve());case 17:case"end":return t.stop()}}),t,null,[[0,10]])})))).apply(this,arguments)}return d?o.jsx(Ne,{error:d}):f?o.jsx(de.Provider,{value:Ke(Ke({},a),{},{openSeadragonOptions:s,toolBarOptions:l})},o.jsx(We,null,o.jsx("div",{css:$e},o.jsx(Ae,{manifest:f})))):o.jsx("div",{css:y},o.jsx(Ye,{active:!0}))}wt.add(Te,ke,je,Le,Ie,Pe,Se,Ee,Oe,Ce),Je.propTypes={manifest:O.object,manifestUrl:O.string,options:O.shape({deepLinking:O.bool,height:O.number,showDropdown:O.bool,showThumbnails:O.bool,showToolbar:O.bool,containerId:O.string}),openSeadragonOptions:O.object,toolBarOptions:O.shape({showZoom:O.bool,showFullScreen:O.bool,showDownload:O.bool,showPreviousNext:O.bool})},Je.defaultProps={options:{deepLinking:!0,height:800,openSeadragonOptions:{},showDropdown:!0,showThumbnails:!0,showToolbar:!0,containerId:"openseadragon1"},toolBarOptions:{showZoom:!0,showFullScreen:!0,showDownload:!0,showPreviousNext:!0}},e.Notification=Ne,e.OpenSeadragonViewer=Je,e.Thumbnails=le,e.TileSourceSelect=ie,e.Toolbar=Zt,Object.defineProperty(e,"__esModule",{value:!0})},i(e,n(0),n(1447),n(38),n(1532),n(1462),n(651))}).call(this,n(36),n(330).setImmediate)},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){t.exports=n(7)()},function(t,e,n){(function(t,n){var r=200,i="__lodash_hash_undefined__",o=1,a=2,s=9007199254740991,u="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",f="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Function]",m="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Null]",b="[object Object]",_="[object Proxy]",A="[object RegExp]",w="[object Set]",x="[object String]",E="[object Symbol]",O="[object Undefined]",S="[object ArrayBuffer]",P="[object DataView]",C=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[u]=k[l]=k[S]=k[f]=k[P]=k[h]=k[p]=k[d]=k[g]=k[y]=k[b]=k[A]=k[w]=k[x]=k["[object WeakMap]"]=!1;var I="object"==typeof t&&t&&t.Object===Object&&t,L="object"==typeof self&&self&&self.Object===Object&&self,j=I||L||Function("return this")(),M=e&&!e.nodeType&&e,R=M&&"object"==typeof n&&n&&!n.nodeType&&n,N=R&&R.exports===M,D=N&&I.process,F=function(){try{return D&&D.binding&&D.binding("util")}catch(t){}}(),B=F&&F.isTypedArray;function z(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function U(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function G(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var V,q,H,W=Array.prototype,X=Function.prototype,Y=Object.prototype,Z=j["__core-js_shared__"],K=X.toString,$=Y.hasOwnProperty,J=(V=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",Q=Y.toString,tt=RegExp("^"+K.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=N?j.Buffer:void 0,nt=j.Symbol,rt=j.Uint8Array,it=Y.propertyIsEnumerable,ot=W.splice,at=nt?nt.toStringTag:void 0,st=Object.getOwnPropertySymbols,ut=et?et.isBuffer:void 0,lt=(q=Object.keys,H=Object,function(t){return q(H(t))}),ct=Ft(j,"DataView"),ft=Ft(j,"Map"),ht=Ft(j,"Promise"),pt=Ft(j,"Set"),dt=Ft(j,"WeakMap"),mt=Ft(Object,"create"),gt=Gt(ct),yt=Gt(ft),vt=Gt(ht),bt=Gt(pt),_t=Gt(dt),At=nt?nt.prototype:void 0,wt=At?At.valueOf:void 0;function xt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Et(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function St(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ot;++e<n;)this.add(t[e])}function Pt(t){var e=this.__data__=new Et(t);this.size=e.size}function Ct(t,e){var n=Ht(t),r=!n&&qt(t),i=!n&&!r&&Wt(t),o=!n&&!r&&!i&&$t(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var l in t)!e&&!$.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ut(l,u))||s.push(l);return s}function Tt(t,e){for(var n=t.length;n--;)if(Vt(t[n][0],e))return n;return-1}function kt(t){return null==t?void 0===t?O:v:at&&at in Object(t)?function(t){var e=$.call(t,at),n=t[at];try{t[at]=void 0;var r=!0}catch(t){}var i=Q.call(t);return r&&(e?t[at]=n:delete t[at]),i}(t):function(t){return Q.call(t)}(t)}function It(t){return Kt(t)&&kt(t)==u}function Lt(t,e,n,r,i){return t===e||(null==t||null==e||!Kt(t)&&!Kt(e)?t!=t&&e!=e:function(t,e,n,r,i,s){var c=Ht(t),d=Ht(e),m=c?l:zt(t),v=d?l:zt(e),_=(m=m==u?b:m)==b,O=(v=v==u?b:v)==b,C=m==v;if(C&&Wt(t)){if(!Wt(e))return!1;c=!0,_=!1}if(C&&!_)return s||(s=new Pt),c||$t(t)?Rt(t,e,n,r,i,s):function(t,e,n,r,i,s,u){switch(n){case P:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!s(new rt(t),new rt(e)));case f:case h:case y:return Vt(+t,+e);case p:return t.name==e.name&&t.message==e.message;case A:case x:return t==e+"";case g:var l=U;case w:var c=r&o;if(l||(l=G),t.size!=e.size&&!c)return!1;var d=u.get(t);if(d)return d==e;r|=a,u.set(t,e);var m=Rt(l(t),l(e),r,i,s,u);return u.delete(t),m;case E:if(wt)return wt.call(t)==wt.call(e)}return!1}(t,e,m,n,r,i,s);if(!(n&o)){var T=_&&$.call(t,"__wrapped__"),k=O&&$.call(e,"__wrapped__");if(T||k){var I=T?t.value():t,L=k?e.value():e;return s||(s=new Pt),i(I,L,n,r,s)}}return!!C&&(s||(s=new Pt),function(t,e,n,r,i,a){var s=n&o,u=Nt(t),l=u.length;if(l!=Nt(e).length&&!s)return!1;for(var c=l;c--;){var f=u[c];if(!(s?f in e:$.call(e,f)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var p=!0;a.set(t,e),a.set(e,t);for(var d=s;++c<l;){var m=t[f=u[c]],g=e[f];if(r)var y=s?r(g,m,f,e,t,a):r(m,g,f,t,e,a);if(!(void 0===y?m===g||i(m,g,n,r,a):y)){p=!1;break}d||(d="constructor"==f)}if(p&&!d){var v=t.constructor,b=e.constructor;v!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return a.delete(t),a.delete(e),p}(t,e,n,r,i,s))}(t,e,n,r,Lt,i))}function jt(t){return!(!Zt(t)||function(t){return!!J&&J in t}(t))&&(Xt(t)?tt:C).test(Gt(t))}function Mt(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||Y))return lt(t);var e,n,r=[];for(var i in Object(t))$.call(t,i)&&"constructor"!=i&&r.push(i);return r}function Rt(t,e,n,r,i,s){var u=n&o,l=t.length,c=e.length;if(l!=c&&!(u&&c>l))return!1;var f=s.get(t);if(f&&s.get(e))return f==e;var h=-1,p=!0,d=n&a?new St:void 0;for(s.set(t,e),s.set(e,t);++h<l;){var m=t[h],g=e[h];if(r)var y=u?r(g,m,h,e,t,s):r(m,g,h,t,e,s);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!z(e,(function(t,e){if(o=e,!d.has(o)&&(m===t||i(m,t,n,r,s)))return d.push(e);var o}))){p=!1;break}}else if(m!==g&&!i(m,g,n,r,s)){p=!1;break}}return s.delete(t),s.delete(e),p}function Nt(t){return function(t,e,n){var r=e(t);return Ht(t)?r:function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}(r,n(t))}(t,Jt,Bt)}function Dt(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Ft(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return jt(n)?n:void 0}xt.prototype.clear=function(){this.__data__=mt?mt(null):{},this.size=0},xt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},xt.prototype.get=function(t){var e=this.__data__;if(mt){var n=e[t];return n===i?void 0:n}return $.call(e,t)?e[t]:void 0},xt.prototype.has=function(t){var e=this.__data__;return mt?void 0!==e[t]:$.call(e,t)},xt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=mt&&void 0===e?i:e,this},Et.prototype.clear=function(){this.__data__=[],this.size=0},Et.prototype.delete=function(t){var e=this.__data__,n=Tt(e,t);return!(n<0)&&(n==e.length-1?e.pop():ot.call(e,n,1),--this.size,!0)},Et.prototype.get=function(t){var e=this.__data__,n=Tt(e,t);return n<0?void 0:e[n][1]},Et.prototype.has=function(t){return Tt(this.__data__,t)>-1},Et.prototype.set=function(t,e){var n=this.__data__,r=Tt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Ot.prototype.clear=function(){this.size=0,this.__data__={hash:new xt,map:new(ft||Et),string:new xt}},Ot.prototype.delete=function(t){var e=Dt(this,t).delete(t);return this.size-=e?1:0,e},Ot.prototype.get=function(t){return Dt(this,t).get(t)},Ot.prototype.has=function(t){return Dt(this,t).has(t)},Ot.prototype.set=function(t,e){var n=Dt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},St.prototype.add=St.prototype.push=function(t){return this.__data__.set(t,i),this},St.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.clear=function(){this.__data__=new Et,this.size=0},Pt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Pt.prototype.get=function(t){return this.__data__.get(t)},Pt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Et){var i=n.__data__;if(!ft||i.length<r-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ot(i)}return n.set(t,e),this.size=n.size,this};var Bt=st?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(st(t),(function(e){return it.call(t,e)})))}:function(){return[]},zt=kt;function Ut(t,e){return!!(e=null==e?s:e)&&("number"==typeof t||T.test(t))&&t>-1&&t%1==0&&t<e}function Gt(t){if(null!=t){try{return K.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vt(t,e){return t===e||t!=t&&e!=e}(ct&&zt(new ct(new ArrayBuffer(1)))!=P||ft&&zt(new ft)!=g||ht&&"[object Promise]"!=zt(ht.resolve())||pt&&zt(new pt)!=w||dt&&"[object WeakMap]"!=zt(new dt))&&(zt=function(t){var e=kt(t),n=e==b?t.constructor:void 0,r=n?Gt(n):"";if(r)switch(r){case gt:return P;case yt:return g;case vt:return"[object Promise]";case bt:return w;case _t:return"[object WeakMap]"}return e});var qt=It(function(){return arguments}())?It:function(t){return Kt(t)&&$.call(t,"callee")&&!it.call(t,"callee")},Ht=Array.isArray,Wt=ut||function(){return!1};function Xt(t){if(!Zt(t))return!1;var e=kt(t);return e==d||e==m||e==c||e==_}function Yt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=s}function Zt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Kt(t){return null!=t&&"object"==typeof t}var $t=B?function(t){return function(e){return t(e)}}(B):function(t){return Kt(t)&&Yt(t.length)&&!!k[kt(t)]};function Jt(t){return null!=(e=t)&&Yt(e.length)&&!Xt(e)?Ct(t):Mt(t);var e}n.exports=function(t,e){return Lt(t,e)}}).call(this,n(10),n(11)(t))},function(t,e,n){"use strict";t.exports=n(5)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;l=u=void 0,r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(a)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=o,n=a,r=!0}},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};function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=a(n(2)),l=a(n(9));function c(t){if("undefined"==typeof window)return null;for(var e=t.split("."),n=window,r=0;r<e.length;r++){var i=n[e[r]];if(void 0===i)return null;n=i}return n}e.default=function(t){return function(e){var n=function(n){function a(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i(Object.getPrototypeOf(a.prototype),"constructor",this).apply(this,arguments),this.displayName="AsyncLoaded("+function(t){return t.displayName||t.name||"Component"}(e)+")",this.state=(n=this.props,r=t(n),Object.keys(r).reduce((function(t,e){return o({},t,s({},e,c(r[e].globalPath)))}),{}))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,n),r(a,[{key:"loadScripts",value:function(t){var e=this;return Object.keys(t).filter((function(t){return null===e.state[t]})).map((function(n){var r=t[n];return function(t,e){var n=this;if("undefined"==typeof document)return null;var r=t.globalPath,i=t.url,o=t.jsonp,a=document.createElement("script");if(o){var s=t.callbackName,u=void 0===s?"_async_"+r.replace(".","_"):s;i=i+(i.indexOf("?")>-1?"&":"?")+"callback="+u,window[u]=e}else a.onload=e,a.onreadystatechange=function(){"loaded"===n.readyState&&window.setTimeout(a.onload,0)};return a.async=1,a.src=i,a}(r,e.loadHandler.bind(e,n,r.globalPath))})).map((function(t){"undefined"!=typeof document&&document.body.appendChild(t)}))}},{key:"componentDidMount",value:function(){this.loadScripts(t(this.props))}},{key:"loadHandler",value:function(t,e){var n=c(e);null!==n&&this.setState(s({},t,n))}},{key:"injectScripts",value:function(t){return u.default.cloneElement(u.default.createElement(t,this.props),this.state)}},{key:"render",value:function(){return this.injectScripts(e)}}]),a}(u.default.Component);return(0,l.default)(n,e)}},t.exports=e.default},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l);function f(t){return(f="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 h(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 p(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){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var y=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=d(this,m(e).call(this))).streetView=null,t}var n,r,o;return function(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&&g(t,e)}(e,t),n=e,(r=[{key:"componentDidMount",value:function(){this.initialize(this.node,this.props)}},{key:"componentDidUpdate",value:function(t){this.initialize(this.node,t)}},{key:"componentWillUnmount",value:function(){this.streetView&&this.props.googleMaps.event.clearInstanceListeners(this.streetView)}},{key:"initialize",value:function(t,e){var n=this;if(this.props.googleMaps&&null==this.streetView&&(this.streetView=new this.props.googleMaps.StreetViewPanorama(t,this.props.streetViewPanoramaOptions),this.streetView.addListener("pano_changed",(function(){n.props.onPanoChanged&&n.props.onPanoChanged(n.streetView.getPano())})),this.streetView.addListener("position_changed",(function(){n.props.onPositionChanged&&n.props.onPositionChanged(n.streetView.getPosition())})),this.streetView.addListener("pov_changed",(function(){n.props.onPovChanged&&n.props.onPovChanged(n.streetView.getPov())})),this.streetView.addListener("visible_changed",(function(){n.props.onVisibleChanged&&n.props.onVisibleChanged(n.streetView.getVisible())})),this.streetView.addListener("zoom_changed",(function(){n.props.onZoomChanged&&n.props.onZoomChanged(n.streetView.getZoom())}))),null!==this.streetView&&this.props.streetViewPanoramaOptions&&!c()(this.props.streetViewPanoramaOptions,e.streetViewPanoramaOptions)){var r=this.props.streetViewPanoramaOptions,i=r.zoom,o=r.pov,a=r.position,s=h(r,["zoom","pov","position"]),u=e.streetViewPanoramaOptions,l=u.zoom,f=u.pov,p=u.position,d=h(u,["zoom","pov","position"]);c()(i,l)||this.streetView.setZoom(i),c()(o,f)||this.streetView.setPov(o),c()(a,p)||this.streetView.setPosition(a),c()(s,d)||this.streetView.setOptions(s)}}},{key:"render",value:function(){var t=this;return i.a.createElement("div",{style:{height:"100%"},ref:function(e){return t.node=e}})}}])&&p(n.prototype,r),o&&p(n,o),e}(i.a.Component);y.propTypes={apiKey:a.a.string,streetViewPanoramaOptions:a.a.object,onPositionChanged:a.a.func,onPovChanged:a.a.func,onZoomChanged:a.a.func,onPanoChanged:a.a.func,onVisibleChanged:a.a.func,googleMaps:a.a.object},y.defaultProps={apiKey:null,streetViewPanoramaOptions:{position:{lat:46.9171876,lng:17.8951832},pov:{heading:0,pitch:0},zoom:1},googleMaps:{},onPositionChanged:function(){},onPovChanged:function(){},onZoomChanged:function(){},onPanoChanged:function(){},onVisibleChanged:function(){}},e.default=u()((function(t){var e=t.apiKey;return e?{googleMaps:{globalPath:"google.maps",url:"https://maps.googleapis.com/maps/api/js?key=".concat(e),jsonp:!0}}:{}}))(y)},function(t,e,n){"use strict";var r=n(6),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.suspense_list"):60120,m=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116;i&&Symbol.for("react.fundamental"),i&&Symbol.for("react.responder"),i&&Symbol.for("react.scope");var y="function"==typeof Symbol&&Symbol.iterator;function v(t){for(var e=t.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return t.message="Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",t}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function A(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||b}function w(){}function x(t,e,n){this.props=t,this.context=e,this.refs=_,this.updater=n||b}A.prototype.isReactComponent={},A.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw v(Error(85));this.updater.enqueueSetState(this,t,e,"setState")},A.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=A.prototype;var E=x.prototype=new w;E.constructor=x,r(E,A.prototype),E.isPureReactComponent=!0;var O={current:null},S={suspense:null},P={current:null},C=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function k(t,e,n){var r,i={},a=null,s=null;if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)C.call(e,r)&&!T.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:t,key:a,ref:s,props:i,_owner:P.current}}function I(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var L=/\/+/g,j=[];function M(t,e,n,r){if(j.length){var i=j.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function R(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>j.length&&j.push(t)}function N(t,e,n){return null==t?0:function t(e,n,r,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return r(i,e,""===n?"."+D(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=n+D(s=e[l],l);u+=t(s,c,r,i)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=y&&e[y]||e["@@iterator"])?c:null))for(e=c.call(e),l=0;!(s=e.next()).done;)u+=t(s=s.value,c=n+D(s,l++),r,i);else if("object"===s)throw r=""+e,v(Error(31),"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,"");return u}(t,"",e,n)}function D(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function F(t,e){t.func.call(t.context,e,t.count++)}function B(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?z(t,r,n,(function(t){return t})):null!=t&&(I(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(L,"$&/")+"/")+n)),r.push(t))}function z(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(L,"$&/")+"/"),N(t,B,e=M(e,o,r,i)),R(e)}function U(){var t=O.current;if(null===t)throw v(Error(321));return t}var G={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return z(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;N(t,F,e=M(null,null,e,n)),R(e)},count:function(t){return N(t,(function(){return null}),null)},toArray:function(t){var e=[];return z(t,e,null,(function(t){return t})),e},only:function(t){if(!I(t))throw v(Error(143));return t}},createRef:function(){return{current:null}},Component:A,PureComponent:x,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:f,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:h,render:t}},lazy:function(t){return{$$typeof:g,_ctor:t,_status:-1,_result:null}},memo:function(t,e){return{$$typeof:m,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return U().useCallback(t,e)},useContext:function(t,e){return U().useContext(t,e)},useEffect:function(t,e){return U().useEffect(t,e)},useImperativeHandle:function(t,e,n){return U().useImperativeHandle(t,e,n)},useDebugValue:function(){},useLayoutEffect:function(t,e){return U().useLayoutEffect(t,e)},useMemo:function(t,e){return U().useMemo(t,e)},useReducer:function(t,e,n){return U().useReducer(t,e,n)},useRef:function(t){return U().useRef(t)},useState:function(t){return U().useState(t)},Fragment:s,Profiler:l,StrictMode:u,Suspense:p,unstable_SuspenseList:d,createElement:k,cloneElement:function(t,e,n){if(null==t)throw v(Error(267),t);var i=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=P.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)C.call(e,c)&&!T.hasOwnProperty(c)&&(i[c]=void 0===e[c]&&void 0!==l?l[c]:e[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var f=0;f<c;f++)l[f]=arguments[f+2];i.children=l}return{$$typeof:o,type:t.type,key:a,ref:s,props:i,_owner:u}},createFactory:function(t){var e=k.bind(null,t);return e.type=t,e},isValidElement:I,version:"16.10.2",unstable_withSuspenseConfig:function(t,e){var n=S.suspense;S.suspense=void 0===e?null:e;try{t()}finally{S.suspense=n}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:O,ReactCurrentBatchConfig:S,ReactCurrentOwner:P,IsSomeRendererActing:{current:!1},assign:r}},V={default:G},q=V&&G||V;t.exports=q.default||q},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(t,e,n){"use strict";var r=n(8);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;t.exports=function(t,e,n){if("string"!=typeof e){var a=Object.getOwnPropertyNames(e);o&&(a=a.concat(Object.getOwnPropertySymbols(e)));for(var s=0;s<a.length;++s)if(!(r[a[s]]||i[a[s]]||n&&n[a[s]]))try{t[a[s]]=e[a[s]]}catch(t){}}return t}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}}])},function(t,e,n){t.exports={Carousel:"Carousel-module__Carousel___2cK5s",slide:"Carousel-module__slide___1_AxL"}},function(t,e,n){t.exports={SidebarCTA:"SidebarCTA-module__SidebarCTA___113CE"}},function(t,e,n){t.exports={HeroHome:"HeroHome-module__HeroHome___2sqjD",textContent:"HeroHome-module__textContent___d64f3"}},function(t,e,n){t.exports={HomeIntroduction:"HomeIntroduction-module__HomeIntroduction___3opHE",textContent:"HomeIntroduction-module__textContent___3tacu"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14);e.default=function(t){return i.a.createElement("li",null,i.a.createElement(o.a,{to:"/".concat(t.page.slug),onClick:t.onClick},t.page.name))}},function(t,e,n){t.exports={SecondaryFooter:"SecondaryFooter-module__SecondaryFooter___22Zvt",sponsorLogos:"SecondaryFooter-module__sponsorLogos___1eC8A"}},function(t,e,n){t.exports=n.p+"media/images/contribute-record-bfc1a14016fcc6f4140a39d798cb2f24.svg"},function(t,e,n){t.exports=n.p+"media/images/contribute-project-eb3f3641d3367edb5d4a6ffa6604d6d7.svg"},function(t,e,n){"use strict";var r,i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var s,u,l,c=a(n(0)),f=n(1142),h=n(1141),p=f.keyframes(s||(s=i(["\n  0%, 100% {transform: scale(0)}\n  50% {transform: scale(1.0)}\n"],["\n  0%, 100% {transform: scale(0)}\n  50% {transform: scale(1.0)}\n"]))),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.style=function(t){var n=e.props,r=n.color,o=n.size;return f.css(u||(u=i(["\n      position: absolute;\n      height: ",";\n      width: ",";\n      background-color: ",";\n      border-radius: 100%;\n      opacity: 0.6;\n      top: 0;\n      left: 0;\n      animation-fill-mode: both;\n      animation: "," 2.1s "," infinite ease-in-out;\n    "],["\n      position: absolute;\n      height: ",";\n      width: ",";\n      background-color: ",";\n      border-radius: 100%;\n      opacity: 0.6;\n      top: 0;\n      left: 0;\n      animation-fill-mode: both;\n      animation: "," 2.1s "," infinite ease-in-out;\n    "])),h.cssValue(o),h.cssValue(o),r,p,1===t?"1s":"0s")},e.wrapper=function(){var t=e.props.size;return f.css(l||(l=i(["\n      position: relative;\n      width: ",";\n      height: ",";\n    "],["\n      position: relative;\n      width: ",";\n      height: ",";\n    "])),h.cssValue(t),h.cssValue(t))},e}return o(e,t),e.prototype.render=function(){var t=this.props,e=t.loading,n=t.css;return e?f.jsx("div",{css:[this.wrapper(),n]},f.jsx("div",{css:this.style(1)}),f.jsx("div",{css:this.style(2)})):null},e.defaultProps=h.sizeDefaults(60),e}(c.PureComponent);e.default=d},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var s=n(91).Plugin,u=n(86).h;t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).id=r.opts.id||"ProgressBar",r.title="Progress Bar",r.type="progressindicator";return r.opts=o({},{target:"body",replaceTargetContent:!1,fixed:!1,hideAfterFinish:!0},n),r.render=r.render.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(r)),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n);var i=r.prototype;return i.render=function(t){var e=t.totalProgress||0,n=(0===e||100===e)&&this.opts.hideAfterFinish;return u("div",{className:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":n},u("div",{className:"uppy-ProgressBar-inner",style:{width:e+"%"}}),u("div",{className:"uppy-ProgressBar-percentage"},e))},i.install=function(){var t=this.opts.target;t&&this.mount(t,this)},i.uninstall=function(){this.unmount()},r}(s),r.VERSION="1.3.27",i)},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=n(91).Plugin,l=n(257),c=n(256),f=n(86).h;t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).id=r.opts.id||"FileInput",r.title="File Input",r.type="acquirer",r.defaultLocale={strings:{chooseFiles:"Choose files"}};return r.opts=o({},{target:null,pretty:!0,inputName:"files[]"},n),r.i18nInit(),r.render=r.render.bind(a(r)),r.handleInputChange=r.handleInputChange.bind(a(r)),r.handleClick=r.handleClick.bind(a(r)),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var i=r.prototype;return i.setOptions=function(e){t.prototype.setOptions.call(this,e),this.i18nInit()},i.i18nInit=function(){this.translator=new c([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},i.addFiles=function(t){var e=this,n=t.map((function(t){return{source:e.id,name:t.name,type:t.type,data:t}}));try{this.uppy.addFiles(n)}catch(r){this.uppy.log(r)}},i.handleInputChange=function(t){this.uppy.log("[FileInput] Something selected through input...");var e=l(t.target.files);this.addFiles(e),t.target.value=null},i.handleClick=function(t){this.input.click()},i.render=function(t){var e=this,n=this.uppy.opts.restrictions,r=n.allowedFileTypes?n.allowedFileTypes.join(","):null;return f("div",{className:"uppy-Root uppy-FileInput-container"},f("input",{className:"uppy-FileInput-input",style:this.opts.pretty&&{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},type:"file",name:this.opts.inputName,onChange:this.handleInputChange,multiple:1!==n.maxNumberOfFiles,accept:r,ref:function(t){e.input=t}}),this.opts.pretty&&f("button",{className:"uppy-FileInput-btn",type:"button",onClick:this.handleClick},this.i18n("chooseFiles")))},i.install=function(){var t=this.opts.target;t&&this.mount(t,this)},i.uninstall=function(){this.unmount()},r}(u),r.VERSION="1.4.25",i)},function(t,e,n){"use strict";function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"GeoJsonEditMode",{enumerable:!0,get:function(){return o.GeoJsonEditMode}}),Object.defineProperty(e,"ModifyMode",{enumerable:!0,get:function(){return a.ModifyMode}}),Object.defineProperty(e,"ResizeCircleMode",{enumerable:!0,get:function(){return s.ResizeCircleMode}}),Object.defineProperty(e,"TranslateMode",{enumerable:!0,get:function(){return u.TranslateMode}}),Object.defineProperty(e,"ScaleMode",{enumerable:!0,get:function(){return l.ScaleMode}}),Object.defineProperty(e,"RotateMode",{enumerable:!0,get:function(){return c.RotateMode}}),Object.defineProperty(e,"DuplicateMode",{enumerable:!0,get:function(){return f.DuplicateMode}}),Object.defineProperty(e,"ExtendLineStringMode",{enumerable:!0,get:function(){return h.ExtendLineStringMode}}),Object.defineProperty(e,"SplitPolygonMode",{enumerable:!0,get:function(){return p.SplitPolygonMode}}),Object.defineProperty(e,"ExtrudeMode",{enumerable:!0,get:function(){return d.ExtrudeMode}}),Object.defineProperty(e,"ElevationMode",{enumerable:!0,get:function(){return m.ElevationMode}}),Object.defineProperty(e,"TransformMode",{enumerable:!0,get:function(){return g.TransformMode}}),Object.defineProperty(e,"DrawPointMode",{enumerable:!0,get:function(){return y.DrawPointMode}}),Object.defineProperty(e,"DrawLineStringMode",{enumerable:!0,get:function(){return v.DrawLineStringMode}}),Object.defineProperty(e,"DrawPolygonMode",{enumerable:!0,get:function(){return b.DrawPolygonMode}}),Object.defineProperty(e,"DrawRectangleMode",{enumerable:!0,get:function(){return _.DrawRectangleMode}}),Object.defineProperty(e,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return A.DrawCircleByDiameterMode}}),Object.defineProperty(e,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return w.DrawCircleFromCenterMode}}),Object.defineProperty(e,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return x.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(e,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return E.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(e,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return O.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(e,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return S.Draw90DegreePolygonMode}}),Object.defineProperty(e,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return P.DrawPolygonByDraggingMode}}),Object.defineProperty(e,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return C.ImmutableFeatureCollection}}),Object.defineProperty(e,"ViewMode",{enumerable:!0,get:function(){return T.ViewMode}}),Object.defineProperty(e,"MeasureDistanceMode",{enumerable:!0,get:function(){return k.MeasureDistanceMode}}),Object.defineProperty(e,"MeasureAreaMode",{enumerable:!0,get:function(){return I.MeasureAreaMode}}),Object.defineProperty(e,"MeasureAngleMode",{enumerable:!0,get:function(){return L.MeasureAngleMode}}),Object.defineProperty(e,"CompositeMode",{enumerable:!0,get:function(){return j.CompositeMode}}),Object.defineProperty(e,"SnappableMode",{enumerable:!0,get:function(){return M.SnappableMode}}),Object.defineProperty(e,"_memoize",{enumerable:!0,get:function(){return R.default}}),e.utils=void 0;var i,o=n(112),a=n(942),s=n(1502),u=n(943),l=n(1292),c=n(1294),f=n(1503),h=n(1504),p=n(1505),d=n(1507),m=n(1508),g=n(1509),y=n(1510),v=n(1511),b=n(944),_=n(1512),A=n(1513),w=n(1514),x=n(1515),E=n(1516),O=n(1517),S=n(1518),P=n(1519),C=n(258),T=n(1520),k=n(1521),I=n(1522),L=n(1523),j=n(1295),M=n(1524),R=(i=n(1297))&&i.__esModule?i:{default:i},N=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!==typeof t)return{default:t};var e=D();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=t[o]}n.default=t,e&&e.set(t,n);return n}(n(157));function D(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return D=function(){return t},t}e.utils=N},function(t,e,n){"use strict";var r={};function i(t){return Math.floor(Math.abs(t)+.5)*(t>=0?1:-1)}function o(t,e,n){var r=(t=i(t*n))-(e=i(e*n));r<<=1,t-e<0&&(r=~r);for(var o="";r>=32;)o+=String.fromCharCode(63+(32|31&r)),r>>=5;return o+=String.fromCharCode(r+63)}function a(t){for(var e=[],n=0;n<t.length;n++){var r=t[n].slice();e.push([r[1],r[0]])}return e}r.decode=function(t,e){for(var n,r=0,i=0,o=0,a=[],s=0,u=0,l=null,c=Math.pow(10,Number.isInteger(e)?e:5);r<t.length;){l=null,s=0,u=0;do{u|=(31&(l=t.charCodeAt(r++)-63))<<s,s+=5}while(l>=32);n=1&u?~(u>>1):u>>1,s=u=0;do{u|=(31&(l=t.charCodeAt(r++)-63))<<s,s+=5}while(l>=32);i+=n,o+=1&u?~(u>>1):u>>1,a.push([i/c,o/c])}return a},r.encode=function(t,e){if(!t.length)return"";for(var n=Math.pow(10,Number.isInteger(e)?e:5),r=o(t[0][0],0,n)+o(t[0][1],0,n),i=1;i<t.length;i++){var a=t[i],s=t[i-1];r+=o(a[0],s[0],n),r+=o(a[1],s[1],n)}return r},r.fromGeoJSON=function(t,e){if(t&&"Feature"===t.type&&(t=t.geometry),!t||"LineString"!==t.type)throw new Error("Input must be a GeoJSON LineString");return r.encode(a(t.coordinates),e)},r.toGeoJSON=function(t,e){return{type:"LineString",coordinates:a(r.decode(t,e))}},t.exports&&(t.exports=r)},function(t,e,n){t.exports=n.p+"media/images/create-order-751cf52ce92d3d9a514248e3e47c4306.svg"},function(t,e,n){"use strict";n.d(e,"a",(function(){return F}));var r=n(0),i=n.n(r),o=n(4),a=n(1594),s=n(51),u=n(32),l=n(436),c=n(273),f=n(1676),h=n(1317);function p(){return p=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},p.apply(this,arguments)}var d={top:"top",left:"left"},m=Object(r.forwardRef)((function(t,e){var n=t.a11yTitle,o=void 0===n?"Open Drop":n,a=t.onAlign,s=t.disabled,u=t.dropAlign,l=void 0===u?d:u,m=t.dropProps,g=t.dropContent,y=t.dropTarget,v=t.id,b=t.open,_=t.onClick,A=t.onClose,w=t.onOpen,x=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,["a11yTitle","onAlign","disabled","dropAlign","dropProps","dropContent","dropTarget","id","open","onClick","onClose","onOpen"]),E=Object(h.a)(e),O=Object(r.useState)(),S=O[0],P=O[1];Object(r.useEffect)((function(){void 0!==b&&b!==S&&P(b)}),[b,S]);var C=Object(r.useCallback)((function(t){for(var e=t.target;e!==document&&e!==E.current;)e=e.parentNode;e!==E.current&&(void 0===b&&P(!1),A&&A(t))}),[E,A,b]),T=Object(r.useCallback)((function(t){S?(P(!1),A&&A(t)):(P(!0),w&&w(t)),_&&_(t)}),[_,A,w,S]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(c.a,p({id:v,ref:E,a11yTitle:o,disabled:s},x,{onClick:T})),S&&E.current&&i.a.createElement(f.a,p({id:v?v+"__drop":void 0,onAlign:a,restrictFocus:!0,align:l,target:y||E.current,onClickOutside:C,onEsc:C},m),g))}));m.displayName="DropButton";var g=m,y=n(1592),v=n(143),b=n(1537),_=n(403),A=n(381),w=n(1655),x=n(1677),E=o.default.div.withConfig({displayName:"StyledSelect__StyledContainer",componentId:"znp66n-0"})(["@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){width:100%;}",";",";"],(function(t){return t.dropHeight?Object(a.m)("max-height",t.dropHeight,t.theme):"max-height: inherit;"}),(function(t){return t.theme.select.container&&t.theme.select.container.extend})),O=function t(e,n){if(void 0!==e)return"object"===typeof n?t(e,n.key):"function"===typeof n?n(e):void 0!==n?e[n]:e};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},S.apply(this,arguments)}var P=o.default.div.withConfig({displayName:"SelectContainer__OptionsBox",componentId:"sc-1wi0ul8-0"})(["position:relative;scroll-behavior:smooth;overflow:auto;outline:none;"]),C=Object(o.default)(l.a).withConfig({displayName:"SelectContainer__OptionBox",componentId:"sc-1wi0ul8-1"})(["",""],(function(t){return t.selected&&_.g})),T=Object(o.default)(c.a).withConfig({displayName:"SelectContainer__SelectOption",componentId:"sc-1wi0ul8-2"})(["display:block;width:100%;"]),k=function(t){var e=t.clear,n=t.onClear,r=t.name,o=t.theme,a=t.setFocus,s=e.label,u="bottom"!==e.position?"start":"center",f=s||"Clear "+(r||"selection");return i.a.createElement(c.a,{onClick:n,onFocus:function(){return a(!0)},onBlur:function(){return a(!1)}},i.a.createElement(l.a,S({},o.select.clear.container,{align:u}),i.a.createElement(x.a,o.select.clear.text,f)))},I=Object(r.forwardRef)((function(t,e){var n=t.clear,a=t.children,s=void 0===a?null:a,c=t.disabled,f=t.disabledKey,h=t.dropHeight,p=t.emptySearchMessage,d=void 0===p?"No matches found":p,m=t.id,g=t.labelKey,v=t.multiple,_=t.name,I=t.onChange,L=t.onKeyDown,j=t.onMore,M=t.onSearch,R=t.optionIndexesInValue,N=t.options,D=t.allOptions,F=t.searchPlaceholder,B=t.search,z=t.setSearch,U=t.selected,G=t.value,V=void 0===G?"":G,q=t.valueKey,H=t.replace,W=void 0===H||H,X=Object(r.useContext)(o.ThemeContext)||u.a.theme,Y=Object(r.useState)(-1),Z=Y[0],K=Y[1],$=Object(r.useState)(),J=$[0],Q=$[1],tt=Object(r.useState)(!1),et=tt[0],nt=tt[1],rt=Object(r.useRef)(),it=Object(r.useRef)();Object(r.useEffect)((function(){-1===Z&&B&&R.length&&K(R[0])}),[Z,R,B]),Object(r.useEffect)((function(){var t=setTimeout((function(){var t=it.current;if(M){var e=rt.current;e&&e.focus&&Object(A.j)(e)}else t&&Object(A.j)(t)}),100);return function(){return clearTimeout(t)}}),[M]),Object(r.useEffect)((function(){if(J){var t=setTimeout((function(){return Q(!1)}),100);return function(){return clearTimeout(t)}}}),[J]);var ot=Object(r.useCallback)((function(t){return O(N[t],g)}),[g,N]),at=Object(r.useCallback)((function(t){return O(N[t],q)}),[N,q]),st=Object(r.useCallback)((function(t){var e,n=N[t];if(f)e=O(n,f);else if(Array.isArray(c))if("number"===typeof c[0])e=-1!==c.indexOf(t);else{var r=at(t);e=-1!==c.indexOf(r)}return e}),[c,f,N,at]),ut=Object(r.useCallback)((function(t){var e;if(U)e=-1!==U.indexOf(t);else{var n=at(t);if(Array.isArray(V))0===V.length?e=!1:"object"!==typeof V[0]?e=-1!==V.indexOf(n):q&&(e=V.some((function(t){return("function"===typeof q?q(t):t[q])===n})));else if(q&&"object"===typeof V){e=("function"===typeof q?q(V):V[q])===n}else e=V===n}return e}),[at,U,V,q]),lt=Object(r.useCallback)((function(t){return function(e){if(I){var n,r;if(v){var i=R.slice(0),o=D.indexOf(N[t]),a=R.indexOf(o);-1===a?i.push(o):i.splice(a,1),n=i.map((function(t){return q&&q.reduce?O(D[t],q):D[t]})),r=i}else n=q&&q.reduce?O(N[t],q):N[t],r=t;I(e,{option:N[t],value:n,selected:r})}}}),[v,I,R,N,D,q]),ct=Object(r.useCallback)((function(t){I(t,{option:void 0,value:"",selected:""})}),[I]),ft=Object(r.useCallback)((function(t){t.preventDefault();for(var e=Z+1;e<N.length&&st(e);)e+=1;e!==N.length&&(K(e),Q(!0))}),[Z,st,N]),ht=Object(r.useCallback)((function(t){t.preventDefault();for(var e=Z-1;e>=0&&st(e);)e-=1;e>=0&&(K(e),Q(!0))}),[Z,st]),pt=Object(r.useCallback)((function(t){if(!M){t.preventDefault();var e=N.findIndex((function(e,n){return("object"===typeof e?e.label:e).charAt(0).toLowerCase()===t.key.toLowerCase()&&!st(n)}));e>=0&&(K(e),Q(!0))}L&&L(t)}),[L,N,st,M]),dt=Object(r.useCallback)((function(t){return function(){J||K(t)}}),[J]),mt=Object(r.useCallback)((function(t){Z>=0&&!et&&(t.preventDefault(),lt(Z)(t))}),[Z,lt,et]),gt=X.select.searchInput,yt=gt||b.a,vt=X.select.options?S({},X.select.options.box,X.select.options.container):{};return i.a.createElement(y.a,{onEnter:mt,onUp:ht,onDown:ft,onKeyDown:pt},i.a.createElement(E,{ref:e,as:l.a,id:m?m+"__select-drop":void 0,dropHeight:h},M&&i.a.createElement(l.a,{pad:gt?void 0:"xsmall",flex:!1},i.a.createElement(yt,{focusIndicator:!gt,size:"small",ref:rt,type:"search",value:B||"",placeholder:F,onChange:function(t){var e=t.target.value;z(e),K(-1),M(e)}})),n&&"bottom"!==n.position&&V&&i.a.createElement(k,{clear:n,name:_,onClear:ct,theme:X,setFocus:nt}),i.a.createElement(P,{role:"menubar",tabIndex:"-1",ref:it},N.length>0?i.a.createElement(w.a,{items:N,step:X.select.step,onMore:j,replace:W,show:-1!==Z?Z:void 0},(function(t,e,n){var r,o=st(e),a=ut(e),u=Z===e;return s?r=s(t,e,N,{active:u,disabled:o,selected:a}):X.select.options&&(r=i.a.createElement(C,S({},vt,{selected:a}),i.a.createElement(x.a,X.select.options.text,ot(e)))),i.a.createElement(T,{key:e,ref:n,tabIndex:"-1",role:"menuitem",plain:!!r||void 0,align:"start",kind:r?void 0:"option",hoverIndicator:r?"background":void 0,label:r?void 0:ot(e),disabled:o||void 0,active:u,selected:a,option:t,onMouseOver:o?void 0:dt(e),onClick:o?void 0:lt(e)},r)})):i.a.createElement(T,{key:"search_empty",tabIndex:"-1",role:"menuitem",hoverIndicator:"background",disabled:!0,option:d},i.a.createElement(C,vt,i.a.createElement(x.a,X.select.container.text,d)))),n&&"bottom"===n.position&&V&&i.a.createElement(k,{clear:n,name:_,onClear:ct,theme:X,setFocus:nt})))}));function L(){return L=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},L.apply(this,arguments)}var j=Object(o.default)(b.a).withConfig({displayName:"Select__SelectTextInput",componentId:"sc-17idtfo-0"})(["cursor:",";"],(function(t){return t.defaultCursor?"default":"pointer"})),M=Object(o.default)(g).withConfig({displayName:"Select__StyledSelectDropButton",componentId:"sc-17idtfo-1"})(["",";",";",";"],(function(t){return!t.callerPlain&&a.b}),(function(t){return t.theme.select&&t.theme.select.control&&t.theme.select.control.extend}),(function(t){return t.open&&t.theme.select.control.open}));M.defaultProps={},Object.setPrototypeOf(M.defaultProps,u.a);var R={top:"bottom",left:"left"},N={multiple:"multiple"},D=Object(r.forwardRef)((function(t,e){var n=t.a11yTitle,a=t.alignSelf,c=t.children,f=t.clear,h=void 0!==f&&f,p=t.closeOnChange,d=void 0===p||p,m=t.defaultValue,g=t.disabled,b=t.disabledKey,_=t.dropAlign,A=void 0===_?R:_,w=t.dropHeight,x=t.dropProps,E=t.dropTarget,S=t.emptySearchMessage,P=t.focusIndicator,C=t.gridArea,T=t.id,k=t.icon,D=t.labelKey,F=t.margin,B=t.messages,z=void 0===B?N:B,U=t.multiple,G=t.name,V=t.onChange,q=t.onClick,H=t.onClose,W=t.onKeyDown,X=t.onMore,Y=t.onOpen,Z=t.onSearch,K=t.open,$=t.options,J=t.placeholder,Q=t.plain,tt=t.replace,et=t.searchPlaceholder,nt=t.selected,rt=t.size,it=t.value,ot=t.valueKey,at=t.valueLabel,st=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,["a11yTitle","alignSelf","children","clear","closeOnChange","defaultValue","disabled","disabledKey","dropAlign","dropHeight","dropProps","dropTarget","emptySearchMessage","focusIndicator","gridArea","id","icon","labelKey","margin","messages","multiple","name","onChange","onClick","onClose","onKeyDown","onMore","onOpen","onSearch","open","options","placeholder","plain","replace","searchPlaceholder","selected","size","value","valueKey","valueLabel"]),ut=Object(r.useContext)(o.ThemeContext)||u.a.theme,lt=Object(r.useRef)(),ct=Object(r.useContext)(v.a).useFormInput(G,it,m||""),ft=ct[0],ht=ct[1],pt=Object(r.useMemo)((function(){return Array.isArray(ft)?ft.map((function(t){return ot&&ot.reduce?t:O(t,ot)})):ot&&ot.reduce?ft:O(ft,ot)}),[ft,ot]),dt=Object(r.useState)(),mt=dt[0],gt=dt[1],yt=Object(r.useState)($),vt=yt[0],bt=yt[1];Object(r.useEffect)((function(){mt||bt($)}),[$,mt]);var _t=Object(r.useMemo)((function(){var t=[];return vt.forEach((function(e,n){void 0!==nt?Array.isArray(nt)?-1!==nt.indexOf(n)&&t.push(n):n===nt&&t.push(n):Array.isArray(pt)?pt.some((function(t){return t===O(e,ot)}))&&t.push(n):pt===O(e,ot)&&t.push(n)})),t}),[vt,nt,ot,pt]),At=Object(r.useState)(K),wt=At[0],xt=At[1];Object(r.useEffect)((function(){return xt(K)}),[K]);var Et,Ot=Object(r.useCallback)((function(){wt||(xt(!0),Y&&Y())}),[Y,wt]),St=Object(r.useCallback)((function(){xt(!1),H&&H()}),[H]),Pt=Object(r.useCallback)((function(t,e){var n=e.option,r=e.value,i=e.selected;if(d&&St(),ht(r),V){t.persist();var o=t;o.target=lt.current,o.value=r,o.option=n,o.selected=i,V(o)}gt()}),[d,V,St,ht]);switch(k){case!1:break;case!0:case void 0:Et=wt&&ut.select.icons.up?ut.select.icons.up:ut.select.icons.down;break;default:Et=k}var Ct=Object(r.useMemo)((function(){return at||(i.a.isValidElement(ft)?ft:void 0)}),[ft,at]),Tt=Object(r.useMemo)((function(){if(!Ct)return 0===_t.length?"":1===_t.length?O(vt[_t[0]],D):z.multiple}),[D,z,_t,vt,Ct]),kt=Object(s.c)(ut.select.icons.color||"control",ut);return i.a.createElement(y.a,{onDown:Ot,onUp:Ot},i.a.createElement(M,{ref:e,id:T,disabled:!0===g||void 0,dropAlign:A,dropTarget:E,open:wt,alignSelf:a,focusIndicator:P,gridArea:C,margin:F,onOpen:Ot,onClose:St,onClick:q,dropContent:i.a.createElement(I,{clear:h,disabled:g,disabledKey:b,dropHeight:w,emptySearchMessage:S,id:T,labelKey:D,multiple:U,name:G,onChange:Pt,onKeyDown:W,onMore:X,onSearch:Z,options:$,allOptions:vt,optionIndexesInValue:_t,replace:tt,searchPlaceholder:et,search:mt,setSearch:gt,selected:nt,value:ft,valueKey:ot},c),callerPlain:Q,plain:!0,dropProps:x,theme:ut},i.a.createElement(l.a,{align:"center",direction:"row",justify:"between",background:ut.select.background},i.a.createElement(l.a,{direction:"row",flex:!0,basis:"auto"},Ct||i.a.createElement(j,L({a11yTitle:n&&n+(ft&&"string"===typeof ft?", "+ft:""),defaultCursor:!0===g||void 0,id:T?T+"__input":void 0,name:G,ref:lt},st,{tabIndex:"-1",type:"text",placeholder:J,plain:!0,readOnly:!0,value:Tt,size:rt,theme:ut}))),Et&&i.a.createElement(l.a,{margin:ut.select.icons.margin,flex:!1,style:{minWidth:"auto"}},Object(r.isValidElement)(Et)?Et:i.a.createElement(Et,{color:kt,size:rt})))))}));D.defaultProps=L({},u.a),D.displayName="Select";var F=D},,function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1149),a=n.n(o),s=n(629);e.default=function(t){return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:a.a.HighlightedContent},i.a.createElement("div",{className:a.a.textContent},i.a.createElement("h2",null,I18n.t("components.pages.highlighted_content.title")),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.content}})),i.a.createElement("div",{className:a.a.contentItems},i.a.createElement(s.default,null),i.a.createElement(s.default,null),i.a.createElement(s.default,null),i.a.createElement(s.default,null),i.a.createElement(s.default,null),i.a.createElement(s.default,null))))}},function(t,e,n){},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/marketingpage-icon-collection-3174cbf78a4ad71d8b7d8d86eef0596d.svg"},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/marketingpage-icon-overlay-088d342dcd51157ca9741dcdc6d49096.svg"},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/marketingpage-icon-pin-ffaf8f78348edc22ee4728f5ea3f56a0.svg"},function(t,e,n){t.exports={CollectionAssociations:"CollectionAssociations-module__CollectionAssociations___30p_Y"}},function(t,e,n){t.exports={Article:"Article-module__Article___Ot0Xt"}},function(t,e,n){t.exports={EmailSignup:"EmailSignup-module__EmailSignup___QEWmE"}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r);e.default=function(t){var e=t.width+"x"+t.height,n="https://source.unsplash.com/random/".concat(e,"?sig=").concat(Math.floor(100*Math.random()));return i.a.createElement("img",{src:n,alt:"Placeholder image"})}},function(t,e,n){t.exports={Search:"Search-module__Search___3SHd5"}},function(t,e,n){t.exports={Logo:"Logo-module__Logo___3qv8h"}},function(t,e,n){t.exports={Page:"Page-module__Page___EBzU3"}},function(t,e,n){t.exports={SiteHeader:"SiteHeader-module__SiteHeader___cwLGz"}},function(t,e,n){t.exports={SiteWrapper:"SiteWrapper-module__SiteWrapper___3BOW-"}},function(t,e,n){t.exports={ContentOptions:"ContentOptions-module__ContentOptions___27Kg9"}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchTrayQuickStartsQuery",(function(){return i}));var r=n(21),i=function(t){return r.default.request("\n    #graphql\n\n    query QuickStartsQuery($limit: Int) {\n        total: tray_view_quick_starts_aggregate {\n            aggregate {\n                count\n            }\n        }\n        results: tray_view_quick_starts(limit: $limit, order_by: {updated_at: desc}) {\n            quick_start {\n                title\n                content\n                url\n                image {\n                    name\n                    url\n                }\n            }\n        }\n    }\n",t)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`))},function(t,e,n){"use strict";var r="%[a-f0-9]{2}",i=new RegExp(r,"gi"),o=new RegExp("("+r+")+","gi");function a(t,e){try{return decodeURIComponent(t.join(""))}catch(i){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],a(n),a(r))}function s(t){try{return decodeURIComponent(t)}catch(r){for(var e=t.match(i),n=1;n<e.length;n++)e=(t=a(e,n).join("")).match(i);return t}}t.exports=function(t){if("string"!==typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var n={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},r=o.exec(t);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch(e){var i=s(r[0]);i!==r[0]&&(n[r[0]]=i)}r=o.exec(t)}n["%C2"]="\ufffd";for(var a=Object.keys(n),u=0;u<a.length;u++){var l=a[u];t=t.replace(new RegExp(l,"g"),n[l])}return t}(t)}}},function(t,e,n){"use strict";t.exports=(t,e)=>{if("string"!==typeof t||"string"!==typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},function(t,e,n){"use strict";t.exports=function(t,e){for(var n={},r=Object.keys(t),i=Array.isArray(e),o=0;o<r.length;o++){var a=r[o],s=t[a];(i?-1!==e.indexOf(a):e(a,s,t))&&(n[a]=s)}return n}},function(t,e,n){var r=function(){var t={},e=Math.PI/180,n=180/Math.PI,r=6378137,i=20037508.342789244;function o(t){return Number(t)===t&&t%1!==0}function a(e){if(e=e||{},this.size=e.size||256,!t[this.size]){var n=this.size,r=t[this.size]={};r.Bc=[],r.Cc=[],r.zc=[],r.Ac=[];for(var i=0;i<30;i++)r.Bc.push(n/360),r.Cc.push(n/(2*Math.PI)),r.zc.push(n/2),r.Ac.push(n),n*=2}this.Bc=t[this.size].Bc,this.Cc=t[this.size].Cc,this.zc=t[this.size].zc,this.Ac=t[this.size].Ac}return a.prototype.px=function(t,n){if(o(n)){var r=this.size*Math.pow(2,n),i=r/2,a=r/360,s=r/(2*Math.PI),u=r,l=Math.min(Math.max(Math.sin(e*t[1]),-.9999),.9999);return(c=i+t[0]*a)>u&&(c=u),(f=i+.5*Math.log((1+l)/(1-l))*-s)>u&&(f=u),[c,f]}i=this.zc[n],l=Math.min(Math.max(Math.sin(e*t[1]),-.9999),.9999);var c=Math.round(i+t[0]*this.Bc[n]),f=Math.round(i+.5*Math.log((1+l)/(1-l))*-this.Cc[n]);return c>this.Ac[n]&&(c=this.Ac[n]),f>this.Ac[n]&&(f=this.Ac[n]),[c,f]},a.prototype.ll=function(t,e){if(o(e)){var r=this.size*Math.pow(2,e),i=r/360,a=r/(2*Math.PI),s=r/2,u=(t[1]-s)/-a;return[(t[0]-s)/i,n*(2*Math.atan(Math.exp(u))-.5*Math.PI)]}u=(t[1]-this.zc[e])/-this.Cc[e];return[(t[0]-this.zc[e])/this.Bc[e],n*(2*Math.atan(Math.exp(u))-.5*Math.PI)]},a.prototype.bbox=function(t,e,n,r,i){r&&(e=Math.pow(2,n)-1-e);var o=[t*this.size,(+e+1)*this.size],a=[(+t+1)*this.size,e*this.size],s=this.ll(o,n).concat(this.ll(a,n));return"900913"===i?this.convert(s,"900913"):s},a.prototype.xyz=function(t,e,n,r){"900913"===r&&(t=this.convert(t,"WGS84"));var i=[t[0],t[1]],o=[t[2],t[3]],a=this.px(i,e),s=this.px(o,e),u=[Math.floor(a[0]/this.size),Math.floor((s[0]-1)/this.size)],l=[Math.floor(s[1]/this.size),Math.floor((a[1]-1)/this.size)],c={minX:Math.min.apply(Math,u)<0?0:Math.min.apply(Math,u),minY:Math.min.apply(Math,l)<0?0:Math.min.apply(Math,l),maxX:Math.max.apply(Math,u),maxY:Math.max.apply(Math,l)};if(n){var f={minY:Math.pow(2,e)-1-c.maxY,maxY:Math.pow(2,e)-1-c.minY};c.minY=f.minY,c.maxY=f.maxY}return c},a.prototype.convert=function(t,e){return"900913"===e?this.forward(t.slice(0,2)).concat(this.forward(t.slice(2,4))):this.inverse(t.slice(0,2)).concat(this.inverse(t.slice(2,4)))},a.prototype.forward=function(t){var n=[r*t[0]*e,r*Math.log(Math.tan(.25*Math.PI+.5*t[1]*e))];return n[0]>i&&(n[0]=i),n[0]<-i&&(n[0]=-i),n[1]>i&&(n[1]=i),n[1]<-i&&(n[1]=-i),n},a.prototype.inverse=function(t){return[t[0]*n/r,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/r)))*n]},a}();t.exports=r},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(14),a=n(171),s=n(18),u=n(21),l=n(17),c=n(7),f=n(1342),h=n.n(f),p=n(102);function d(){d=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var m={};s(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function m(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function g(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return y(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 y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(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}e.default=Object(c.a)((function(){var t=Object(l.useStore)(),e=t.user,n=t.collection,c=g(Object(r.useState)([]),2),f=c[0],y=c[1];return Object(r.useEffect)((function(){var t=!0,r=function(){var n,r=(n=d().mark((function n(r){var i,o;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=Object(s.userIsSignedIn)()?Object(u.buildHeaders)({"X-Hasura-User-Token":e.userToken}):{},n.next=3,Object(a.fetchParentItemsQuery)(r,i);case 3:o=n.sent,t&&y(o.collection_parents);case 5:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){m(o,r,i,a,s,"next",t)}function s(t){m(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return r.apply(this,arguments)}}();return r({parent_item_ids:n.parent_item_ids}),function(){return t=!1}}),[]),f&&0!==f.length?i.a.createElement("div",{className:h.a.CollectionAssociations},i.a.createElement("h2",null,I18n.t("components.records.collection_associations.title",{type:n.type})),i.a.createElement("ul",null,f.map((function(t){return i.a.createElement("li",{key:"collection-association-".concat(t.slug)},i.a.createElement(o.a,{to:Object(p.getPath)(t)},t.name," ",i.a.createElement("span",null,t.type)))})))):i.a.createElement(i.a.Fragment,null)}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(244),i=n(304);const o=globalThis;function a(t){if(!t&&!Object(r.a)())return"Node";if(Object(i.a)(t))return"Electron";const e="undefined"!==typeof navigator?navigator:{},n=t||e.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";const a=-1!==n.indexOf("MSIE "),s=-1!==n.indexOf("Trident/");return a||s?"IE":o.chrome?"Chrome":o.safari?"Safari":o.mozInnerScreenX?"Firefox":"Unknown"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(6),i=n(59),o=n(50),a=n(73);class s extends i.a{get[Symbol.toStringTag](){return"TransformFeedback"}static isSupported(t){return Object(r.j)(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(t),super(t,e),this.initialize(e),this.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(this)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,Object(a.a)(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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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:a}=this._getBufferParams(e);return n<0?(this.unused[t]=i,r.k.warn("".concat(this.id," unused varying buffer ").concat(t))(),this):(this.buffers[n]=e,this.bindOnUse||this._bindBuffer(n,i,a,o),this)}begin(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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.a===!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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;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)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));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;\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}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(81),i=n(209),o=n(79);function a(t){return a="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},a(t)}function s(){s=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(C){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=c;var h={};function p(){}function d(){}function m(){}var g={};l(g,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,i)&&(g=v);var b=m.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(i,o,s,u){var l=f(t[i],t,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==a(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=m,l(b,"constructor",m),l(m,"constructor",d),d.displayName=l(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(A.prototype),l(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function u(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)}))}}var c={};function f(t){return h.apply(this,arguments)}function h(){return h=l(s().mark((function t(e){var n,r,i=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:null,r=i.length>2&&void 0!==i[2]?i[2]:{},n&&(e=p(e,n,r)),c[e]=c[e]||d(e),t.next=6,c[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)}))),h.apply(this,arguments)}function p(t,e,n){if(t.startsWith("http"))return t;var i=n.modules||{};return i[t]?i[t]:r.b?n.CDN?(Object(o.a)(n.CDN.startsWith("http")),"".concat(n.CDN,"/").concat(e,"@").concat("3.2.12","/dist/libs/").concat(t)):r.d?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function d(t){return m.apply(this,arguments)}function m(){return(m=l(s().mark((function t(e){var n,o,a;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return n=t.sent,t.next=6,n.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(r.b){t.next=20;break}if(t.prev=8,t.t0=i&&i.requireFromFile,!t.t0){t.next=14;break}return t.next=13,i.requireFromFile(e);case 13:t.t0=t.sent;case 14:return t.abrupt("return",t.t0);case 17:return t.prev=17,t.t1=t.catch(8),t.abrupt("return",null);case 20:if(!r.d){t.next=22;break}return t.abrupt("return",importScripts(e));case 22:return t.next=24,fetch(e);case 24:return o=t.sent,t.next=27,o.text();case 27:return a=t.sent,t.abrupt("return",g(a,e));case 29:case"end":return t.stop()}}),t,null,[[8,17]])})))).apply(this,arguments)}function g(t,e){if(!r.b)return i.requireFromString&&i.requireFromString(t,e);if(r.d)return eval.call(r.a,t),null;var n=document.createElement("script");n.id=e;try{n.appendChild(document.createTextNode(t))}catch(o){n.text=t}return document.body.appendChild(n),null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(130),i=n(73);const o=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),a=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),s=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),u=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),l={POSITION:{size:3,value:new Float32Array(a)},NORMAL:{size:3,value:new Float32Array(s)},TEXCOORD_0:{size:2,value:new Float32Array(u)}};class c extends r.a{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(i.c)("cube-geometry")}=t;super({...t,id:e,indices:{size:1,value:new Uint16Array(o)},attributes:{...l,...t.attributes}})}}},function(t,e,n){"use strict";n.r(e),n.d(e,"Compression",(function(){return nt})),n.d(e,"EtagMismatch",(function(){return ft})),n.d(e,"FetchSource",(function(){return st})),n.d(e,"FileAPISource",(function(){return at})),n.d(e,"PMTiles",(function(){return gt})),n.d(e,"Protocol",(function(){return Z})),n.d(e,"ResolvedValueCache",(function(){return dt})),n.d(e,"SharedPromiseCache",(function(){return mt})),n.d(e,"TileType",(function(){return it})),n.d(e,"bytesToHeader",(function(){return lt})),n.d(e,"findTile",(function(){return ot})),n.d(e,"getUint64",(function(){return ut})),n.d(e,"leafletRasterLayer",(function(){return Y})),n.d(e,"readVarint",(function(){return $})),n.d(e,"tileIdToZxy",(function(){return et})),n.d(e,"zxyToTileId",(function(){return tt}));var r=(t,e,n)=>new Promise(((r,i)=>{var o=t=>{try{s(n.next(t))}catch(e){i(e)}},a=t=>{try{s(n.throw(t))}catch(e){i(e)}},s=t=>t.done?r(t.value):Promise.resolve(t.value).then(o,a);s((n=n.apply(t,e)).next())})),i=Uint8Array,o=Uint16Array,a=Uint32Array,s=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),u=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(t,e){for(var n=new o(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];var i=new a(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},f=c(s,2),h=f[0],p=f[1];h[28]=258,p[258]=28;var d,m=c(u,0),g=m[0],y=(m[1],new o(32768));for(_=0;_<32768;++_)d=(61680&(d=(52428&(d=(43690&_)>>>1|(21845&_)<<1))>>>2|(13107&d)<<2))>>>4|(3855&d)<<4,y[_]=((65280&d)>>>8|(255&d)<<8)>>>1;var v=function(t,e,n){for(var r=t.length,i=0,a=new o(e);i<r;++i)t[i]&&++a[t[i]-1];var s,u=new o(e);for(i=0;i<e;++i)u[i]=u[i-1]+a[i-1]<<1;if(n){s=new o(1<<e);var l=15-e;for(i=0;i<r;++i)if(t[i])for(var c=i<<4|t[i],f=e-t[i],h=u[t[i]-1]++<<f,p=h|(1<<f)-1;h<=p;++h)s[y[h]>>>l]=c}else for(s=new o(r),i=0;i<r;++i)t[i]&&(s[i]=y[u[t[i]-1]++]>>>15-t[i]);return s},b=new i(288);for(_=0;_<144;++_)b[_]=8;for(_=144;_<256;++_)b[_]=9;for(_=256;_<280;++_)b[_]=7;for(_=280;_<288;++_)b[_]=8;var _,A=new i(32);for(_=0;_<32;++_)A[_]=5;var w=v(b,9,1),x=v(A,5,1),E=function(t){for(var e=t[0],n=1;n<t.length;++n)t[n]>e&&(e=t[n]);return e},O=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(7&e)&n},S=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(7&e)},P=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],C=function(t,e,n){var r=new Error(e||P[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,C),!n)throw r;return r},T=function(t,e,n){var r=t.length;if(!r||n&&n.f&&!n.l)return e||new i(0);var c=!e||n,f=!n||n.i;n||(n={}),e||(e=new i(3*r));var p=function(t){var n=e.length;if(t>n){var r=new i(Math.max(2*n,t));r.set(e),e=r}},d=n.f||0,m=n.p||0,y=n.b||0,b=n.l,_=n.d,A=n.m,P=n.n,T=8*r;do{if(!b){d=O(t,m,1);var k=O(t,m+1,3);if(m+=3,!k){var I=t[(G=4+((m+7)/8|0))-4]|t[G-3]<<8,L=G+I;if(L>r){f&&C(0);break}c&&p(y+I),e.set(t.subarray(G,L),y),n.b=y+=I,n.p=m=8*L,n.f=d;continue}if(1==k)b=w,_=x,A=9,P=5;else if(2==k){var j=O(t,m,31)+257,M=O(t,m+10,15)+4,R=j+O(t,m+5,31)+1;m+=14;for(var N=new i(R),D=new i(19),F=0;F<M;++F)D[l[F]]=O(t,m+3*F,7);m+=3*M;var B=E(D),z=(1<<B)-1,U=v(D,B,1);for(F=0;F<R;){var G,V=U[O(t,m,z)];if(m+=15&V,(G=V>>>4)<16)N[F++]=G;else{var q=0,H=0;for(16==G?(H=3+O(t,m,3),m+=2,q=N[F-1]):17==G?(H=3+O(t,m,7),m+=3):18==G&&(H=11+O(t,m,127),m+=7);H--;)N[F++]=q}}var W=N.subarray(0,j),X=N.subarray(j);A=E(W),P=E(X),b=v(W,A,1),_=v(X,P,1)}else C(1);if(m>T){f&&C(0);break}}c&&p(y+131072);for(var Y=(1<<A)-1,Z=(1<<P)-1,K=m;;K=m){var $=(q=b[S(t,m)&Y])>>>4;if((m+=15&q)>T){f&&C(0);break}if(q||C(2),$<256)e[y++]=$;else{if(256==$){K=m,b=null;break}var J=$-254;if($>264){var Q=s[F=$-257];J=O(t,m,(1<<Q)-1)+h[F],m+=Q}var tt=_[S(t,m)&Z],et=tt>>>4;tt||C(3),m+=15&tt;X=g[et];if(et>3){Q=u[et];X+=S(t,m)&(1<<Q)-1,m+=Q}if(m>T){f&&C(0);break}c&&p(y+131072);for(var nt=y+J;y<nt;y+=4)e[y]=e[y-X],e[y+1]=e[y+1-X],e[y+2]=e[y+2-X],e[y+3]=e[y+3-X];y=nt}}n.l=b,n.p=K,n.b=y,n.f=d,b&&(d=1,n.m=A,n.d=_,n.n=P)}while(!d);return y==e.length?e:function(t,e,n){(null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);var r=new(2==t.BYTES_PER_ELEMENT?o:4==t.BYTES_PER_ELEMENT?a:i)(n-e);return r.set(t.subarray(e,n)),r}(e,0,y)},k=new i(0);function I(t,e){return T(t.subarray(function(t){31==t[0]&&139==t[1]&&8==t[2]||C(6,"invalid gzip data");var e=t[3],n=10;4&e&&(n+=t[10]|2+(t[11]<<8));for(var r=(e>>3&1)+(e>>4&1);r>0;r-=!t[n++]);return n+(2&e)}(t),-8),e||new i((r=(n=t).length,(n[r-4]|n[r-3]<<8|n[r-2]<<16|n[r-1]<<24)>>>0)));var n,r}function j(t,e){return T(((8!=(15&(n=t)[0])||n[0]>>>4>7||(n[0]<<8|n[1])%31)&&C(6,"invalid zlib data"),32&n[1]&&C(6,"invalid zlib data: preset dictionaries not supported"),t.subarray(2,-4)),e);var n}function M(t,e){return 31==t[0]&&139==t[1]&&8==t[2]?I(t,e):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?function(t,e){return T(t,e)}(t,e):j(t,e)}var R="undefined"!=typeof TextDecoder&&new TextDecoder;try{R.decode(k,{stream:!0}),1}catch(yt){}var N=(t,e)=>t*Math.pow(2,e),D=(t,e)=>Math.floor(t/Math.pow(2,e)),F=(t,e)=>N(t.getUint16(e+1,!0),8)+t.getUint8(e),B=(t,e)=>N(t.getUint32(e+2,!0),16)+t.getUint16(e,!0),z=(t,e,n,r,i)=>{if(t!=r.getUint8(i))return t-r.getUint8(i);const o=F(r,i+1);if(e!=o)return e-o;const a=F(r,i+4);return n!=a?n-a:0},U=(t,e,n,r)=>{const i=G(t,e,n,r);return i?{z:e,x:n,y:r,offset:i[0],length:i[1],is_dir:!1}:null},G=(t,e,n,r)=>{let i=0,o=t.byteLength/17-1;for(;i<=o;){const a=o+i>>1,s=z(e,n,r,t,17*a);if(s>0)i=a+1;else{if(!(s<0))return[B(t,17*a+7),t.getUint32(17*a+13,!0)];o=a-1}}return null},V=(t,e)=>t.is_dir&&!e.is_dir?1:!t.is_dir&&e.is_dir?-1:t.z!==e.z?t.z-e.z:t.x!==e.x?t.x-e.x:t.y-e.y,q=(t,e)=>{const n=t.getUint8(17*e);return{z:127&n,x:F(t,17*e+1),y:F(t,17*e+4),offset:B(t,17*e+7),length:t.getUint32(17*e+13,!0),is_dir:n>>7===1}},H=t=>{const e=[],n=new DataView(t);for(let r=0;r<n.byteLength/17;r++)e.push(q(n,r));return W(e)},W=t=>{t.sort(V);const e=new ArrayBuffer(17*t.length),n=new Uint8Array(e);for(let r=0;r<t.length;r++){const e=t[r];let i=e.z;e.is_dir&&(i|=128),n[17*r]=i,n[17*r+1]=255&e.x,n[17*r+2]=e.x>>8&255,n[17*r+3]=e.x>>16&255,n[17*r+4]=255&e.y,n[17*r+5]=e.y>>8&255,n[17*r+6]=e.y>>16&255,n[17*r+7]=255&e.offset,n[17*r+8]=255&D(e.offset,8),n[17*r+9]=255&D(e.offset,16),n[17*r+10]=255&D(e.offset,24),n[17*r+11]=255&D(e.offset,32),n[17*r+12]=255&D(e.offset,48),n[17*r+13]=255&e.length,n[17*r+14]=e.length>>8&255,n[17*r+15]=e.length>>16&255,n[17*r+16]=e.length>>24&255}return e};var X={getHeader:function(t){return r(this,null,(function*(){const e=yield t.getBytes(0,512e3),n=new DataView(e.data),r=n.getUint32(4,!0),i=n.getUint16(8,!0),o=new TextDecoder("utf-8"),a=JSON.parse(o.decode(new DataView(e.data,10,r)));let s=0;"gzip"===a.compression&&(s=2);let u=0;"minzoom"in a&&(u=+a.minzoom);let l=0;"maxzoom"in a&&(l=+a.maxzoom);let c=0,f=0,h=0,p=-180,d=-85,m=180,g=85;if(a.bounds){const t=a.bounds.split(",");p=+t[0],d=+t[1],m=+t[2],g=+t[3]}if(a.center){const t=a.center.split(",");c=+t[0],f=+t[1],h=+t[2]}return{specVersion:n.getUint16(2,!0),rootDirectoryOffset:10+r,rootDirectoryLength:17*i,jsonMetadataOffset:10,jsonMetadataLength:r,leafDirectoryOffset:0,leafDirectoryLength:void 0,tileDataOffset:0,tileDataLength:void 0,numAddressedTiles:0,numTileEntries:0,numTileContents:0,clustered:!1,internalCompression:1,tileCompression:s,tileType:1,minZoom:u,maxZoom:l,minLon:p,minLat:d,maxLon:m,maxLat:g,centerZoom:h,centerLon:c,centerLat:f,etag:e.etag}}))},getZxy:function(t,e,n,i,o,a,s){return r(this,null,(function*(){let r=yield n.getArrayBuffer(e,t.rootDirectoryOffset,t.rootDirectoryLength,t);1===t.specVersion&&(r=H(r));const u=U(new DataView(r),i,o,a);if(u){let t=(yield e.getBytes(u.offset,u.length,s)).data;const n=new DataView(t);return 31==n.getUint8(0)&&139==n.getUint8(1)&&(t=M(new Uint8Array(t))),{data:t}}const l=((t,e)=>{if(t.byteLength<17)return null;const n=t.byteLength/17,r=q(t,n-1);if(r.is_dir){const t=r.z,n=e.z-t;return{z:t,x:Math.trunc(e.x/(1<<n)),y:Math.trunc(e.y/(1<<n))}}return null})(new DataView(r),{z:i,x:o,y:a});if(l){const u=((t,e,n,r)=>{const i=G(t,128|e,n,r);return i?{z:e,x:n,y:r,offset:i[0],length:i[1],is_dir:!0}:null})(new DataView(r),l.z,l.x,l.y);if(u){let r=yield n.getArrayBuffer(e,u.offset,u.length,t);1===t.specVersion&&(r=H(r));const l=U(new DataView(r),i,o,a);if(l){let t=(yield e.getBytes(l.offset,l.length,s)).data;const n=new DataView(t);return 31==n.getUint8(0)&&139==n.getUint8(1)&&(t=M(new Uint8Array(t))),{data:t}}}}}))}},Y=(t,e)=>{let n=!1;return new(L.GridLayer.extend({createTile:function(e,r){const i=document.createElement("img"),o=new AbortController,a=o.signal;return i.cancel=()=>{o.abort()},n||(t.getHeader().then((t=>{1==t.tileType&&console.error("Error: archive contains MVT vector tiles, but leafletRasterLayer is for displaying raster tiles. See https://github.com/protomaps/PMTiles/tree/main/js for details.")})),n=!0),t.getZxy(e.z,e.x,e.y,a).then((t=>{if(t){const e=new Blob([t.data]),n=window.URL.createObjectURL(e);i.src=n,i.cancel=null,r(null,i)}})).catch((t=>{if("AbortError"!==t.name)throw t})),i},_removeTile:function(t){const e=this._tiles[t];e&&(e.el.cancel&&e.el.cancel(),e.el.width=0,e.el.height=0,e.el.deleted=!0,L.DomUtil.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))}}))(e)},Z=class{constructor(){this.tile=(t,e)=>{if("json"==t.type){const n=t.url.substr(10);let r=this.tiles.get(n);return r||(r=new gt(n),this.tiles.set(n,r)),r.getHeader().then((n=>{const r={tiles:[t.url+"/{z}/{x}/{y}"],minzoom:n.minZoom,maxzoom:n.maxZoom};e(null,r,null,null)})),{cancel:()=>{}}}{const n=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),r=t.url.match(n);if(!r)throw new Error("Invalid PMTiles protocol URL");const i=r[1];let o=this.tiles.get(i);o||(o=new gt(i),this.tiles.set(i,o));const a=r[2],s=r[3],u=r[4],l=new AbortController,c=l.signal;let f=()=>{l.abort()};return o.getHeader().then((t=>{o.getZxy(+a,+s,+u,c).then((n=>{n?e(null,new Uint8Array(n.data),n.cacheControl,n.expires):1==t.tileType?e(null,new Uint8Array,null,null):e(null,null,null,null)})).catch((t=>{if("AbortError"!==t.name)throw t}))})),{cancel:f}}},this.tiles=new Map}add(t){this.tiles.set(t.source.getKey(),t)}get(t){return this.tiles.get(t)}};function K(t,e){return 4294967296*(e>>>0)+(t>>>0)}function $(t){const e=t.buf;let n,r;return r=e[t.pos++],n=127&r,r<128?n:(r=e[t.pos++],n|=(127&r)<<7,r<128?n:(r=e[t.pos++],n|=(127&r)<<14,r<128?n:(r=e[t.pos++],n|=(127&r)<<21,r<128?n:(r=e[t.pos],n|=(15&r)<<28,function(t,e){const n=e.buf;let r,i;if(i=n[e.pos++],r=(112&i)>>4,i<128)return K(t,r);if(i=n[e.pos++],r|=(127&i)<<3,i<128)return K(t,r);if(i=n[e.pos++],r|=(127&i)<<10,i<128)return K(t,r);if(i=n[e.pos++],r|=(127&i)<<17,i<128)return K(t,r);if(i=n[e.pos++],r|=(127&i)<<24,i<128)return K(t,r);if(i=n[e.pos++],r|=(1&i)<<31,i<128)return K(t,r);throw new Error("Expected varint not more than 10 bytes")}(n,t)))))}function J(t,e,n,r){if(0==r){1==n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const r=e[0];e[0]=e[1],e[1]=r}}function Q(t,e){const n=Math.pow(2,t);let r=e,i=e,o=e;const a=[0,0];let s=1;for(;s<n;)r=1&o/2,i=1&(o^r),J(s,a,r,i),a[0]+=s*r,a[1]+=s*i,o/=4,s*=2;return[t,a[0],a[1]]}function tt(t,e,n){if(t>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(e>Math.pow(2,t)-1||n>Math.pow(2,t)-1)throw Error("tile x/y outside zoom level bounds");let r=0,i=0;for(;i<t;)r+=Math.pow(2,i)*Math.pow(2,i),i++;let o=0,a=0,s=0;const u=[e,n];let l=Math.pow(2,t)/2;for(;l>0;)o=(u[0]&l)>0?1:0,a=(u[1]&l)>0?1:0,s+=l*l*(3*o^a),J(l,u,o,a),l/=2;return r+s}function et(t){let e=0;for(let n=0;n<27;n++){const r=(1<<n)*(1<<n);if(e+r>t)return Q(n,t-e);e+=r}throw Error("Tile zoom level exceeds max safe number limit (26)")}var nt=(t=>(t[t.Unknown=0]="Unknown",t[t.None=1]="None",t[t.Gzip=2]="Gzip",t[t.Brotli=3]="Brotli",t[t.Zstd=4]="Zstd",t))(nt||{});function rt(t,e){return r(this,null,(function*(){if(1===e||0===e)return t;if(2===e)return M(new Uint8Array(t));throw Error("Compression method not supported")}))}var it=(t=>(t[t.Unknown=0]="Unknown",t[t.Mvt=1]="Mvt",t[t.Png=2]="Png",t[t.Jpeg=3]="Jpeg",t[t.Webp=4]="Webp",t))(it||{});function ot(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=r+n>>1,o=e-t[i].tileId;if(o>0)n=i+1;else{if(!(o<0))return t[i];r=i-1}}if(r>=0){if(0===t[r].runLength)return t[r];if(e-t[r].tileId<t[r].runLength)return t[r]}return null}var at=class{constructor(t){this.file=t}getKey(){return this.file.name}getBytes(t,e){return r(this,null,(function*(){const n=this.file.slice(t,t+e);return{data:yield n.arrayBuffer()}}))}},st=class{constructor(t){this.url=t}getKey(){return this.url}getBytes(t,e,n){return r(this,null,(function*(){let r;n||(r=new AbortController,n=r.signal);let i=yield fetch(this.url,{signal:n,headers:{Range:"bytes="+t+"-"+(t+e-1)}});if(416===i.status&&0===t){const t=i.headers.get("Content-Range");if(!t||!t.startsWith("bytes */"))throw Error("Missing content-length on 416 response");const e=+t.substr(8);i=yield fetch(this.url,{signal:n,headers:{Range:"bytes=0-"+(e-1)}})}if(i.status>=300)throw Error("Bad response code: "+i.status);const o=i.headers.get("Content-Length");if(200===i.status&&(!o||+o>e))throw r&&r.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield i.arrayBuffer(),etag:i.headers.get("ETag")||void 0,cacheControl:i.headers.get("Cache-Control")||void 0,expires:i.headers.get("Expires")||void 0}}))}};function ut(t,e){const n=t.getUint32(e+4,!0),r=t.getUint32(e+0,!0);return n*Math.pow(2,32)+r}function lt(t,e){const n=new DataView(t),r=n.getUint8(7);if(r>3)throw Error(`Archive is spec version ${r} but this library supports up to spec version 3`);return{specVersion:r,rootDirectoryOffset:ut(n,8),rootDirectoryLength:ut(n,16),jsonMetadataOffset:ut(n,24),jsonMetadataLength:ut(n,32),leafDirectoryOffset:ut(n,40),leafDirectoryLength:ut(n,48),tileDataOffset:ut(n,56),tileDataLength:ut(n,64),numAddressedTiles:ut(n,72),numTileEntries:ut(n,80),numTileContents:ut(n,88),clustered:1===n.getUint8(96),internalCompression:n.getUint8(97),tileCompression:n.getUint8(98),tileType:n.getUint8(99),minZoom:n.getUint8(100),maxZoom:n.getUint8(101),minLon:n.getInt32(102,!0)/1e7,minLat:n.getInt32(106,!0)/1e7,maxLon:n.getInt32(110,!0)/1e7,maxLat:n.getInt32(114,!0)/1e7,centerZoom:n.getUint8(118),centerLon:n.getInt32(119,!0)/1e7,centerLat:n.getInt32(123,!0)/1e7,etag:e}}function ct(t){const e={buf:new Uint8Array(t),pos:0},n=$(e),r=[];let i=0;for(let o=0;o<n;o++){const t=$(e);r.push({tileId:i+t,offset:0,length:0,runLength:1}),i+=t}for(let o=0;o<n;o++)r[o].runLength=$(e);for(let o=0;o<n;o++)r[o].length=$(e);for(let o=0;o<n;o++){const t=$(e);r[o].offset=0===t&&o>0?r[o-1].offset+r[o-1].length:t-1}return r}var ft=class extends Error{};function ht(t,e,n,i){return r(this,null,(function*(){const r=yield t.getBytes(0,16384);if(19792!==new DataView(r.data).getUint16(0,!0))throw new Error("Wrong magic number for PMTiles archive");if(function(t){const e=new DataView(t);return 2===e.getUint16(2,!0)?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):1===e.getUint16(2,!0)?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}(r.data)<3)return[yield X.getHeader(t)];const o=r.data.slice(0,127);let a=r.etag;i&&r.etag!=i&&(console.warn("ETag conflict detected; your HTTP server might not support content-based ETag headers. ETags disabled for "+t.getKey()),a=void 0);const s=lt(o,a);if(n){const n=r.data.slice(s.rootDirectoryOffset,s.rootDirectoryOffset+s.rootDirectoryLength),i=t.getKey()+"|"+(s.etag||"")+"|"+s.rootDirectoryOffset+"|"+s.rootDirectoryLength,o=ct(yield e(n,s.internalCompression));return[s,[i,o.length,o]]}return[s,void 0]}))}function pt(t,e,n,i,o){return r(this,null,(function*(){const r=yield t.getBytes(n,i);if(o.etag&&o.etag!==r.etag)throw new ft(r.etag);const a=ct(yield e(r.data,o.internalCompression));if(0===a.length)throw new Error("Empty directory is invalid");return a}))}var dt=class{constructor(t=100,e=!0,n=rt){this.cache=new Map,this.maxCacheEntries=t,this.counter=1,this.prefetch=e,this.decompress=n}getHeader(t,e){return r(this,null,(function*(){const n=t.getKey();if(this.cache.has(n)){this.cache.get(n).lastUsed=this.counter++;return this.cache.get(n).data}const r=yield ht(t,this.decompress,this.prefetch,e);return r[1]&&this.cache.set(r[1][0],{lastUsed:this.counter++,data:r[1][2]}),this.cache.set(n,{lastUsed:this.counter++,data:r[0]}),this.prune(),r[0]}))}getDirectory(t,e,n,i){return r(this,null,(function*(){const r=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+n;if(this.cache.has(r)){this.cache.get(r).lastUsed=this.counter++;return this.cache.get(r).data}const o=yield pt(t,this.decompress,e,n,i);return this.cache.set(r,{lastUsed:this.counter++,data:o}),this.prune(),o}))}getArrayBuffer(t,e,n,i){return r(this,null,(function*(){const r=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+n;if(this.cache.has(r)){this.cache.get(r).lastUsed=this.counter++;return yield this.cache.get(r).data}const o=yield t.getBytes(e,n);if(i.etag&&i.etag!==o.etag)throw new ft(i.etag);return this.cache.set(r,{lastUsed:this.counter++,data:o.data}),this.prune(),o.data}))}prune(){if(this.cache.size>this.maxCacheEntries){let t,e=1/0;this.cache.forEach(((n,r)=>{n.lastUsed<e&&(e=n.lastUsed,t=r)})),t&&this.cache.delete(t)}}invalidate(t,e){return r(this,null,(function*(){this.cache.delete(t.getKey()),yield this.getHeader(t,e)}))}},mt=class{constructor(t=100,e=!0,n=rt){this.cache=new Map,this.maxCacheEntries=t,this.counter=1,this.prefetch=e,this.decompress=n}getHeader(t,e){return r(this,null,(function*(){const n=t.getKey();if(this.cache.has(n)){this.cache.get(n).lastUsed=this.counter++;return yield this.cache.get(n).data}const r=new Promise(((n,r)=>{ht(t,this.decompress,this.prefetch,e).then((t=>{t[1]&&this.cache.set(t[1][0],{lastUsed:this.counter++,data:Promise.resolve(t[1][2])}),n(t[0]),this.prune()})).catch((t=>{r(t)}))}));return this.cache.set(n,{lastUsed:this.counter++,data:r}),r}))}getDirectory(t,e,n,i){return r(this,null,(function*(){const r=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+n;if(this.cache.has(r)){this.cache.get(r).lastUsed=this.counter++;return yield this.cache.get(r).data}const o=new Promise(((r,o)=>{pt(t,this.decompress,e,n,i).then((t=>{r(t),this.prune()})).catch((t=>{o(t)}))}));return this.cache.set(r,{lastUsed:this.counter++,data:o}),o}))}getArrayBuffer(t,e,n,i){return r(this,null,(function*(){const r=t.getKey()+"|"+(i.etag||"")+"|"+e+"|"+n;if(this.cache.has(r)){this.cache.get(r).lastUsed=this.counter++;return yield this.cache.get(r).data}const o=new Promise(((o,a)=>{t.getBytes(e,n).then((t=>{if(i.etag&&i.etag!==t.etag)throw new ft(t.etag);o(t.data),this.cache.has(r),this.prune()})).catch((t=>{a(t)}))}));return this.cache.set(r,{lastUsed:this.counter++,data:o}),o}))}prune(){if(this.cache.size>=this.maxCacheEntries){let t,e=1/0;this.cache.forEach(((n,r)=>{n.lastUsed<e&&(e=n.lastUsed,t=r)})),t&&this.cache.delete(t)}}invalidate(t,e){return r(this,null,(function*(){this.cache.delete(t.getKey()),yield this.getHeader(t,e)}))}},gt=class{constructor(t,e,n){this.source="string"===typeof t?new st(t):t,this.decompress=n||rt,this.cache=e||new mt}getHeader(){return r(this,null,(function*(){return yield this.cache.getHeader(this.source)}))}getZxyAttempt(t,e,n,i){return r(this,null,(function*(){const r=tt(t,e,n),o=yield this.cache.getHeader(this.source);if(o.specVersion<3)return X.getZxy(o,this.source,this.cache,t,e,n,i);if(t<o.minZoom||t>o.maxZoom)return;let a=o.rootDirectoryOffset,s=o.rootDirectoryLength;for(let t=0;t<=3;t++){const t=ot(yield this.cache.getDirectory(this.source,a,s,o),r);if(!t)return;if(t.runLength>0){const e=yield this.source.getBytes(o.tileDataOffset+t.offset,t.length,i);if(o.etag&&o.etag!==e.etag)throw new ft(e.etag);return{data:yield this.decompress(e.data,o.tileCompression),cacheControl:e.cacheControl,expires:e.expires}}a=o.leafDirectoryOffset+t.offset,s=t.length}throw Error("Maximum directory depth exceeded")}))}getZxy(t,e,n,i){return r(this,null,(function*(){try{return yield this.getZxyAttempt(t,e,n,i)}catch(yt){if(yt instanceof ft)return this.cache.invalidate(this.source,yt.message),yield this.getZxyAttempt(t,e,n,i);throw yt}}))}getMetadataAttempt(){return r(this,null,(function*(){const t=yield this.cache.getHeader(this.source),e=yield this.source.getBytes(t.jsonMetadataOffset,t.jsonMetadataLength);if(t.etag&&t.etag!==e.etag)throw new ft(e.etag);const n=yield this.decompress(e.data,t.internalCompression),r=new TextDecoder("utf-8");return JSON.parse(r.decode(n))}))}getMetadata(){return r(this,null,(function*(){try{return yield this.getMetadataAttempt()}catch(yt){if(yt instanceof ft)return this.cache.invalidate(this.source,yt.message),yield this.getMetadataAttempt();throw yt}}))}}},function(t,e,n){"use strict";n.r(e),n.d(e,"FlateErrorCode",(function(){return L})),n.d(e,"Deflate",(function(){return xt})),n.d(e,"AsyncDeflate",(function(){return Et})),n.d(e,"deflate",(function(){return Ot})),n.d(e,"deflateSync",(function(){return St})),n.d(e,"Inflate",(function(){return Pt})),n.d(e,"AsyncInflate",(function(){return Ct})),n.d(e,"inflate",(function(){return Tt})),n.d(e,"inflateSync",(function(){return kt})),n.d(e,"Gzip",(function(){return It})),n.d(e,"AsyncGzip",(function(){return Lt})),n.d(e,"gzip",(function(){return jt})),n.d(e,"gzipSync",(function(){return Mt})),n.d(e,"Gunzip",(function(){return Rt})),n.d(e,"AsyncGunzip",(function(){return Nt})),n.d(e,"gunzip",(function(){return Dt})),n.d(e,"gunzipSync",(function(){return Ft})),n.d(e,"Zlib",(function(){return Bt})),n.d(e,"AsyncZlib",(function(){return zt})),n.d(e,"zlib",(function(){return Ut})),n.d(e,"zlibSync",(function(){return Gt})),n.d(e,"Unzlib",(function(){return Vt})),n.d(e,"AsyncUnzlib",(function(){return qt})),n.d(e,"unzlib",(function(){return Ht})),n.d(e,"unzlibSync",(function(){return Wt})),n.d(e,"compress",(function(){return jt})),n.d(e,"AsyncCompress",(function(){return Lt})),n.d(e,"compressSync",(function(){return Mt})),n.d(e,"Compress",(function(){return It})),n.d(e,"Decompress",(function(){return Xt})),n.d(e,"AsyncDecompress",(function(){return Yt})),n.d(e,"decompress",(function(){return Zt})),n.d(e,"decompressSync",(function(){return Kt})),n.d(e,"DecodeUTF8",(function(){return ne})),n.d(e,"EncodeUTF8",(function(){return re})),n.d(e,"strToU8",(function(){return ie})),n.d(e,"strFromU8",(function(){return oe})),n.d(e,"ZipPassThrough",(function(){return pe})),n.d(e,"ZipDeflate",(function(){return de})),n.d(e,"AsyncZipDeflate",(function(){return me})),n.d(e,"Zip",(function(){return ge})),n.d(e,"zip",(function(){return ye})),n.d(e,"zipSync",(function(){return ve})),n.d(e,"UnzipPassThrough",(function(){return be})),n.d(e,"UnzipInflate",(function(){return _e})),n.d(e,"AsyncUnzipInflate",(function(){return Ae})),n.d(e,"Unzip",(function(){return we})),n.d(e,"unzip",(function(){return Ee})),n.d(e,"unzipSync",(function(){return Oe}));var r={},i=Uint8Array,o=Uint16Array,a=Uint32Array,s=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),u=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(t,e){for(var n=new o(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];var i=new a(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},f=c(s,2),h=f[0],p=f[1];h[28]=258,p[258]=28;for(var d=c(u,0),m=d[0],g=d[1],y=new o(32768),v=0;v<32768;++v){var b=(43690&v)>>>1|(21845&v)<<1;b=(61680&(b=(52428&b)>>>2|(13107&b)<<2))>>>4|(3855&b)<<4,y[v]=((65280&b)>>>8|(255&b)<<8)>>>1}var _=function(t,e,n){for(var r=t.length,i=0,a=new o(e);i<r;++i)t[i]&&++a[t[i]-1];var s,u=new o(e);for(i=0;i<e;++i)u[i]=u[i-1]+a[i-1]<<1;if(n){s=new o(1<<e);var l=15-e;for(i=0;i<r;++i)if(t[i])for(var c=i<<4|t[i],f=e-t[i],h=u[t[i]-1]++<<f,p=h|(1<<f)-1;h<=p;++h)s[y[h]>>>l]=c}else for(s=new o(r),i=0;i<r;++i)t[i]&&(s[i]=y[u[t[i]-1]++]>>>15-t[i]);return s},A=new i(288);for(v=0;v<144;++v)A[v]=8;for(v=144;v<256;++v)A[v]=9;for(v=256;v<280;++v)A[v]=7;for(v=280;v<288;++v)A[v]=8;var w=new i(32);for(v=0;v<32;++v)w[v]=5;var x=_(A,9,0),E=_(A,9,1),O=_(w,5,0),S=_(w,5,1),P=function(t){for(var e=t[0],n=1;n<t.length;++n)t[n]>e&&(e=t[n]);return e},C=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(7&e)&n},T=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(7&e)},k=function(t){return(t+7)/8|0},I=function(t,e,n){(null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);var r=new(2==t.BYTES_PER_ELEMENT?o:4==t.BYTES_PER_ELEMENT?a:i)(n-e);return r.set(t.subarray(e,n)),r},L={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},j=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],M=function(t,e,n){var r=new Error(e||j[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,M),!n)throw r;return r},R=function(t,e,n){var r=t.length;if(!r||n&&n.f&&!n.l)return e||new i(0);var o=!e||n,a=!n||n.i;n||(n={}),e||(e=new i(3*r));var c=function(t){var n=e.length;if(t>n){var r=new i(Math.max(2*n,t));r.set(e),e=r}},f=n.f||0,p=n.p||0,d=n.b||0,g=n.l,y=n.d,v=n.m,b=n.n,A=8*r;do{if(!g){f=C(t,p,1);var w=C(t,p+1,3);if(p+=3,!w){var x=t[(G=k(p)+4)-4]|t[G-3]<<8,O=G+x;if(O>r){a&&M(0);break}o&&c(d+x),e.set(t.subarray(G,O),d),n.b=d+=x,n.p=p=8*O,n.f=f;continue}if(1==w)g=E,y=S,v=9,b=5;else if(2==w){var L=C(t,p,31)+257,j=C(t,p+10,15)+4,R=L+C(t,p+5,31)+1;p+=14;for(var N=new i(R),D=new i(19),F=0;F<j;++F)D[l[F]]=C(t,p+3*F,7);p+=3*j;var B=P(D),z=(1<<B)-1,U=_(D,B,1);for(F=0;F<R;){var G,V=U[C(t,p,z)];if(p+=15&V,(G=V>>>4)<16)N[F++]=G;else{var q=0,H=0;for(16==G?(H=3+C(t,p,3),p+=2,q=N[F-1]):17==G?(H=3+C(t,p,7),p+=3):18==G&&(H=11+C(t,p,127),p+=7);H--;)N[F++]=q}}var W=N.subarray(0,L),X=N.subarray(L);v=P(W),b=P(X),g=_(W,v,1),y=_(X,b,1)}else M(1);if(p>A){a&&M(0);break}}o&&c(d+131072);for(var Y=(1<<v)-1,Z=(1<<b)-1,K=p;;K=p){var $=(q=g[T(t,p)&Y])>>>4;if((p+=15&q)>A){a&&M(0);break}if(q||M(2),$<256)e[d++]=$;else{if(256==$){K=p,g=null;break}var J=$-254;if($>264){var Q=s[F=$-257];J=C(t,p,(1<<Q)-1)+h[F],p+=Q}var tt=y[T(t,p)&Z],et=tt>>>4;tt||M(3),p+=15&tt;X=m[et];if(et>3){Q=u[et];X+=T(t,p)&(1<<Q)-1,p+=Q}if(p>A){a&&M(0);break}o&&c(d+131072);for(var nt=d+J;d<nt;d+=4)e[d]=e[d-X],e[d+1]=e[d+1-X],e[d+2]=e[d+2-X],e[d+3]=e[d+3-X];d=nt}}n.l=g,n.p=K,n.b=d,n.f=f,g&&(f=1,n.m=v,n.d=y,n.n=b)}while(!f);return d==e.length?e:I(e,0,d)},N=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8},D=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},F=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var a=n.length,s=n.slice();if(!a)return[H,0];if(1==a){var u=new i(n[0].s+1);return u[n[0].s]=1,[u,1]}n.sort((function(t,e){return t.f-e.f})),n.push({s:-1,f:25001});var l=n[0],c=n[1],f=0,h=1,p=2;for(n[0]={s:-1,f:l.f+c.f,l:l,r:c};h!=a-1;)l=n[n[f].f<n[p].f?f++:p++],c=n[f!=h&&n[f].f<n[p].f?f++:p++],n[h++]={s:-1,f:l.f+c.f,l:l,r:c};var d=s[0].s;for(r=1;r<a;++r)s[r].s>d&&(d=s[r].s);var m=new o(d+1),g=B(n[h-1],m,0);if(g>e){r=0;var y=0,v=g-e,b=1<<v;for(s.sort((function(t,e){return m[e.s]-m[t.s]||t.f-e.f}));r<a;++r){var _=s[r].s;if(!(m[_]>e))break;y+=b-(1<<g-m[_]),m[_]=e}for(y>>>=v;y>0;){var A=s[r].s;m[A]<e?y-=1<<e-m[A]++-1:++r}for(;r>=0&&y;--r){var w=s[r].s;m[w]==e&&(--m[w],++y)}g=e}return[new i(m),g]},B=function(t,e,n){return-1==t.s?Math.max(B(t.l,e,n+1),B(t.r,e,n+1)):e[t.s]=n},z=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new o(++e),r=0,i=t[0],a=1,s=function(t){n[r++]=t},u=1;u<=e;++u)if(t[u]==i&&u!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=t[u]}return[n.subarray(0,r),e]},U=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},G=function(t,e,n){var r=n.length,i=k(e+2);t[i]=255&r,t[i+1]=r>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var o=0;o<r;++o)t[i+o+4]=n[o];return 8*(i+4+r)},V=function(t,e,n,r,i,a,c,f,h,p,d){N(e,d++,n),++i[256];for(var m=F(i,15),g=m[0],y=m[1],v=F(a,15),b=v[0],E=v[1],S=z(g),P=S[0],C=S[1],T=z(b),k=T[0],I=T[1],L=new o(19),j=0;j<P.length;++j)L[31&P[j]]++;for(j=0;j<k.length;++j)L[31&k[j]]++;for(var M=F(L,7),R=M[0],B=M[1],V=19;V>4&&!R[l[V-1]];--V);var q,H,W,X,Y=p+5<<3,Z=U(i,A)+U(a,w)+c,K=U(i,g)+U(a,b)+c+14+3*V+U(L,R)+(2*L[16]+3*L[17]+7*L[18]);if(Y<=Z&&Y<=K)return G(e,d,t.subarray(h,h+p));if(N(e,d,1+(K<Z)),d+=2,K<Z){q=_(g,y,0),H=g,W=_(b,E,0),X=b;var $=_(R,B,0);N(e,d,C-257),N(e,d+5,I-1),N(e,d+10,V-4),d+=14;for(j=0;j<V;++j)N(e,d+3*j,R[l[j]]);d+=3*V;for(var J=[P,k],Q=0;Q<2;++Q){var tt=J[Q];for(j=0;j<tt.length;++j){var et=31&tt[j];N(e,d,$[et]),d+=R[et],et>15&&(N(e,d,tt[j]>>>5&127),d+=tt[j]>>>12)}}}else q=x,H=A,W=O,X=w;for(j=0;j<f;++j)if(r[j]>255){et=r[j]>>>18&31;D(e,d,q[et+257]),d+=H[et+257],et>7&&(N(e,d,r[j]>>>23&31),d+=s[et]);var nt=31&r[j];D(e,d,W[nt]),d+=X[nt],nt>3&&(D(e,d,r[j]>>>5&8191),d+=u[nt])}else D(e,d,q[r[j]]),d+=H[r[j]];return D(e,d,q[256]),d+H[256]},q=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),H=new i(0),W=function(t,e,n,r,l,c){var f=t.length,h=new i(r+f+5*(1+Math.ceil(f/7e3))+l),d=h.subarray(r,h.length-l),m=0;if(!e||f<8)for(var y=0;y<=f;y+=65535){var v=y+65535;v>=f&&(d[m>>3]=c),m=G(d,m+1,t.subarray(y,v))}else{for(var b=q[e-1],_=b>>>13,A=8191&b,w=(1<<n)-1,x=new o(32768),E=new o(w+1),O=Math.ceil(n/3),S=2*O,P=function(e){return(t[e]^t[e+1]<<O^t[e+2]<<S)&w},C=new a(25e3),T=new o(288),L=new o(32),j=0,M=0,R=(y=0,0),N=0,D=0;y<f;++y){var F=P(y),B=32767&y,z=E[F];if(x[B]=z,E[F]=B,N<=y){var U=f-y;if((j>7e3||R>24576)&&U>423){m=V(t,d,0,C,T,L,M,R,D,y-D,m),R=j=M=0,D=y;for(var W=0;W<286;++W)T[W]=0;for(W=0;W<30;++W)L[W]=0}var X=2,Y=0,Z=A,K=B-z&32767;if(U>2&&F==P(y-K))for(var $=Math.min(_,U)-1,J=Math.min(32767,y),Q=Math.min(258,U);K<=J&&--Z&&B!=z;){if(t[y+X]==t[y+X-K]){for(var tt=0;tt<Q&&t[y+tt]==t[y+tt-K];++tt);if(tt>X){if(X=tt,Y=K,tt>$)break;var et=Math.min(K,tt-2),nt=0;for(W=0;W<et;++W){var rt=y-K+W+32768&32767,it=rt-x[rt]+32768&32767;it>nt&&(nt=it,z=rt)}}}K+=(B=z)-(z=x[B])+32768&32767}if(Y){C[R++]=268435456|p[X]<<18|g[Y];var ot=31&p[X],at=31&g[Y];M+=s[ot]+u[at],++T[257+ot],++L[at],N=y+X,++j}else C[R++]=t[y],++T[t[y]]}}m=V(t,d,c,C,T,L,M,R,D,y-D,m),!c&&7&m&&(m=G(d,m+1,H))}return I(h,0,r+k(m)+l)},X=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(1&n&&-306674912)^n>>>1;t[e]=n}return t}(),Y=function(){var t=-1;return{p:function(e){for(var n=t,r=0;r<e.length;++r)n=X[255&n^e[r]]^n>>>8;t=n},d:function(){return~t}}},Z=function(){var t=1,e=0;return{p:function(n){for(var r=t,i=e,o=0|n.length,a=0;a!=o;){for(var s=Math.min(a+2655,o);a<s;++a)i+=r+=n[a];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}t=r,e=i},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(e%=65521))<<8|e>>>8}}},K=function(t,e,n,r,i){return W(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,r,!i)},$=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n},J=function(t,e,n){for(var r=t(),i=t.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],u=o[a];if("function"==typeof s){e+=";"+u+"=";var l=s.toString();if(s.prototype)if(-1!=l.indexOf("[native code]")){var c=l.indexOf(" ",8)+1;e+=l.slice(c,l.indexOf("(",c))}else for(var f in e+=l,s.prototype)e+=";"+u+".prototype."+f+"="+s.prototype[f].toString();else e+=l}else n[u]=s}return[e,n]},Q=[],tt=function(t,e,n,i){var o;if(!Q[n]){for(var a="",s={},u=t.length-1,l=0;l<u;++l)a=(o=J(t[l],a,s))[0],s=o[1];Q[n]=J(t[u],a,s)}var c=$({},Q[n][1]);return function(t,e,n,i,o){var a=new Worker(r[e]||(r[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(t){var e=t.data,n=e.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,e)},a.postMessage(n,i),a}(Q[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",n,c,function(t){var e=[];for(var n in t)t[n].buffer&&e.push((t[n]=new t[n].constructor(t[n])).buffer);return e}(c),i)},et=function(){return[i,o,a,s,u,l,h,m,E,S,y,j,_,P,C,T,k,I,M,R,kt,st,ut]},nt=function(){return[i,o,a,s,u,l,p,g,x,A,O,w,y,q,H,_,N,D,F,B,z,U,G,V,k,I,W,K,St,st]},rt=function(){return[gt,bt,mt,Y,X]},it=function(){return[yt,vt]},ot=function(){return[_t,mt,Z]},at=function(){return[At]},st=function(t){return postMessage(t,[t.buffer])},ut=function(t){return t&&t.size&&new i(t.size)},lt=function(t,e,n,r,i,o){var a=tt(n,r,i,(function(t,e){a.terminate(),o(t,e)}));return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate()}},ct=function(t){return t.ondata=function(t,e){return postMessage([t,e],[t.buffer])},function(e){return t.push(e.data[0],e.data[1])}},ft=function(t,e,n,r,i){var o,a=tt(t,r,i,(function(t,n){t?(a.terminate(),e.ondata.call(e,t)):(n[1]&&a.terminate(),e.ondata.call(e,t,n[0],n[1]))}));a.postMessage(n),e.push=function(t,n){e.ondata||M(5),o&&e.ondata(M(4,0,1),null,!!n),a.postMessage([t,o=n],[t.buffer])},e.terminate=function(){a.terminate()}},ht=function(t,e){return t[e]|t[e+1]<<8},pt=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},dt=function(t,e){return pt(t,e)+4294967296*pt(t,e+4)},mt=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},gt=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&mt(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var r=0;r<=n.length;++r)t[r+10]=n.charCodeAt(r)}},yt=function(t){31==t[0]&&139==t[1]&&8==t[2]||M(6,"invalid gzip data");var e=t[3],n=10;4&e&&(n+=t[10]|2+(t[11]<<8));for(var r=(e>>3&1)+(e>>4&1);r>0;r-=!t[n++]);return n+(2&e)},vt=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},bt=function(t){return 10+(t.filename&&t.filename.length+1||0)},_t=function(t,e){var n=e.level,r=0==n?0:n<6?1:9==n?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)},At=function(t){(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&M(6,"invalid zlib data"),32&t[1]&&M(6,"invalid zlib data: preset dictionaries not supported")};function wt(t,e){return e||"function"!=typeof t||(e=t,t={}),this.ondata=e,t}var xt=function(){function t(t,e){e||"function"!=typeof t||(e=t,t={}),this.ondata=e,this.o=t||{}}return t.prototype.p=function(t,e){this.ondata(K(t,this.o,0,0,!e),e)},t.prototype.push=function(t,e){this.ondata||M(5),this.d&&M(4),this.d=e,this.p(t,e||!1)},t}(),Et=function(){return function(t,e){ft([nt,function(){return[ct,xt]}],this,wt.call(this,t,e),(function(t){var e=new xt(t.data);onmessage=ct(e)}),6)}}();function Ot(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&M(7),lt(t,e,[nt],(function(t){return st(St(t.data[0],t.data[1]))}),0,n)}function St(t,e){return K(t,e||{},0,0)}var Pt=function(){function t(t){this.s={},this.p=new i(0),this.ondata=t}return t.prototype.e=function(t){this.ondata||M(5),this.d&&M(4);var e=this.p.length,n=new i(e+t.length);n.set(this.p),n.set(t,e),this.p=n},t.prototype.c=function(t){this.d=this.s.i=t||!1;var e=this.s.b,n=R(this.p,this.o,this.s);this.ondata(I(n,e,this.s.b),this.d),this.o=I(n,this.s.b-32768),this.s.b=this.o.length,this.p=I(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(t,e){this.e(t),this.c(e)},t}(),Ct=function(){return function(t){this.ondata=t,ft([et,function(){return[ct,Pt]}],this,0,(function(){var t=new Pt;onmessage=ct(t)}),7)}}();function Tt(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&M(7),lt(t,e,[et],(function(t){return st(kt(t.data[0],ut(t.data[1])))}),1,n)}function kt(t,e){return R(t,e)}var It=function(){function t(t,e){this.c=Y(),this.l=0,this.v=1,xt.call(this,t,e)}return t.prototype.push=function(t,e){xt.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t),this.l+=t.length;var n=K(t,this.o,this.v&&bt(this.o),e&&8,!e);this.v&&(gt(n,this.o),this.v=0),e&&(mt(n,n.length-8,this.c.d()),mt(n,n.length-4,this.l)),this.ondata(n,e)},t}(),Lt=function(){return function(t,e){ft([nt,rt,function(){return[ct,xt,It]}],this,wt.call(this,t,e),(function(t){var e=new It(t.data);onmessage=ct(e)}),8)}}();function jt(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&M(7),lt(t,e,[nt,rt,function(){return[Mt]}],(function(t){return st(Mt(t.data[0],t.data[1]))}),2,n)}function Mt(t,e){e||(e={});var n=Y(),r=t.length;n.p(t);var i=K(t,e,bt(e),8),o=i.length;return gt(i,e),mt(i,o-8,n.d()),mt(i,o-4,r),i}var Rt=function(){function t(t){this.v=1,Pt.call(this,t)}return t.prototype.push=function(t,e){if(Pt.prototype.e.call(this,t),this.v){var n=this.p.length>3?yt(this.p):4;if(n>=this.p.length&&!e)return;this.p=this.p.subarray(n),this.v=0}e&&(this.p.length<8&&M(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),Pt.prototype.c.call(this,e)},t}(),Nt=function(){return function(t){this.ondata=t,ft([et,it,function(){return[ct,Pt,Rt]}],this,0,(function(){var t=new Rt;onmessage=ct(t)}),9)}}();function Dt(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&M(7),lt(t,e,[et,it,function(){return[Ft]}],(function(t){return st(Ft(t.data[0]))}),3,n)}function Ft(t,e){return R(t.subarray(yt(t),-8),e||new i(vt(t)))}var Bt=function(){function t(t,e){this.c=Z(),this.v=1,xt.call(this,t,e)}return t.prototype.push=function(t,e){xt.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t);var n=K(t,this.o,this.v&&2,e&&4,!e);this.v&&(_t(n,this.o),this.v=0),e&&mt(n,n.length-4,this.c.d()),this.ondata(n,e)},t}(),zt=function(){return function(t,e){ft([nt,ot,function(){return[ct,xt,Bt]}],this,wt.call(this,t,e),(function(t){var e=new Bt(t.data);onmessage=ct(e)}),10)}}();function Ut(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&M(7),lt(t,e,[nt,ot,function(){return[Gt]}],(function(t){return st(Gt(t.data[0],t.data[1]))}),4,n)}function Gt(t,e){e||(e={});var n=Z();n.p(t);var r=K(t,e,2,4);return _t(r,e),mt(r,r.length-4,n.d()),r}var Vt=function(){function t(t){this.v=1,Pt.call(this,t)}return t.prototype.push=function(t,e){if(Pt.prototype.e.call(this,t),this.v){if(this.p.length<2&&!e)return;this.p=this.p.subarray(2),this.v=0}e&&(this.p.length<4&&M(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Pt.prototype.c.call(this,e)},t}(),qt=function(){return function(t){this.ondata=t,ft([et,at,function(){return[ct,Pt,Vt]}],this,0,(function(){var t=new Vt;onmessage=ct(t)}),11)}}();function Ht(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&M(7),lt(t,e,[et,at,function(){return[Wt]}],(function(t){return st(Wt(t.data[0],ut(t.data[1])))}),5,n)}function Wt(t,e){return R((At(t),t.subarray(2,-4)),e)}var Xt=function(){function t(t){this.G=Rt,this.I=Pt,this.Z=Vt,this.ondata=t}return t.prototype.push=function(t,e){if(this.ondata||M(5),this.s)this.s.push(t,e);else{if(this.p&&this.p.length){var n=new i(this.p.length+t.length);n.set(this.p),n.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var r=this,o=function(){r.ondata.apply(r,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(o):new this.Z(o),this.s.push(this.p,e),this.p=null}}},t}(),Yt=function(){function t(t){this.G=Nt,this.I=Ct,this.Z=qt,this.ondata=t}return t.prototype.push=function(t,e){Xt.prototype.push.call(this,t,e)},t}();function Zt(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&M(7),31==t[0]&&139==t[1]&&8==t[2]?Dt(t,e,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?Tt(t,e,n):Ht(t,e,n)}function Kt(t,e){return 31==t[0]&&139==t[1]&&8==t[2]?Ft(t,e):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?kt(t,e):Wt(t,e)}var $t=function(t,e,n,r){for(var o in t){var a=t[o],s=e+o,u=r;Array.isArray(a)&&(u=$(r,a[1]),a=a[0]),a instanceof i?n[s]=[a,u]:(n[s+="/"]=[new i(0),u],$t(a,s,n,r))}},Jt="undefined"!=typeof TextEncoder&&new TextEncoder,Qt="undefined"!=typeof TextDecoder&&new TextDecoder,te=0;try{Qt.decode(H,{stream:!0}),te=1}catch(Se){}var ee=function(t){for(var e="",n=0;;){var r=t[n++],i=(r>127)+(r>223)+(r>239);if(n+i>t.length)return[e,I(t,n-1)];i?3==i?(r=((15&r)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,e+=String.fromCharCode(55296|r>>10,56320|1023&r)):e+=1&i?String.fromCharCode((31&r)<<6|63&t[n++]):String.fromCharCode((15&r)<<12|(63&t[n++])<<6|63&t[n++]):e+=String.fromCharCode(r)}},ne=function(){function t(t){this.ondata=t,te?this.t=new TextDecoder:this.p=H}return t.prototype.push=function(t,e){if(this.ondata||M(5),e=!!e,this.t)return this.ondata(this.t.decode(t,{stream:!0}),e),void(e&&(this.t.decode().length&&M(8),this.t=null));this.p||M(4);var n=new i(this.p.length+t.length);n.set(this.p),n.set(t,this.p.length);var r=ee(n),o=r[0],a=r[1];e?(a.length&&M(8),this.p=null):this.p=a,this.ondata(o,e)},t}(),re=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,e){this.ondata||M(5),this.d&&M(4),this.ondata(ie(t),this.d=e||!1)},t}();function ie(t,e){if(e){for(var n=new i(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}if(Jt)return Jt.encode(t);var o=t.length,a=new i(t.length+(t.length>>1)),s=0,u=function(t){a[s++]=t};for(r=0;r<o;++r){if(s+5>a.length){var l=new i(s+8+(o-r<<1));l.set(a),a=l}var c=t.charCodeAt(r);c<128||e?u(c):c<2048?(u(192|c>>6),u(128|63&c)):c>55295&&c<57344?(u(240|(c=65536+(1047552&c)|1023&t.charCodeAt(++r))>>18),u(128|c>>12&63),u(128|c>>6&63),u(128|63&c)):(u(224|c>>12),u(128|c>>6&63),u(128|63&c))}return I(a,0,s)}function oe(t,e){if(e){for(var n="",r=0;r<t.length;r+=16384)n+=String.fromCharCode.apply(null,t.subarray(r,r+16384));return n}if(Qt)return Qt.decode(t);var i=ee(t),o=i[0];return i[1].length&&M(8),o}var ae=function(t){return 1==t?3:t<6?2:9==t?1:0},se=function(t,e){return e+30+ht(t,e+26)+ht(t,e+28)},ue=function(t,e,n){var r=ht(t,e+28),i=oe(t.subarray(e+46,e+46+r),!(2048&ht(t,e+8))),o=e+46+r,a=pt(t,e+20),s=n&&4294967295==a?le(t,o):[a,pt(t,e+24),pt(t,e+42)],u=s[0],l=s[1],c=s[2];return[ht(t,e+10),u,l,i,o+ht(t,e+30)+ht(t,e+32),c]},le=function(t,e){for(;1!=ht(t,e);e+=4+ht(t,e+2));return[dt(t,e+12),dt(t,e+4),dt(t,e+20)]},ce=function(t){var e=0;if(t)for(var n in t){var r=t[n].length;r>65535&&M(9),e+=r+4}return e},fe=function(t,e,n,r,i,o,a,s){var u=r.length,l=n.extra,c=s&&s.length,f=ce(l);mt(t,e,null!=a?33639248:67324752),e+=4,null!=a&&(t[e++]=20,t[e++]=n.os),t[e]=20,e+=2,t[e++]=n.flag<<1|(o<0&&8),t[e++]=i&&8,t[e++]=255&n.compression,t[e++]=n.compression>>8;var h=new Date(null==n.mtime?Date.now():n.mtime),p=h.getFullYear()-1980;if((p<0||p>119)&&M(10),mt(t,e,p<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>>1),e+=4,-1!=o&&(mt(t,e,n.crc),mt(t,e+4,o<0?-o-2:o),mt(t,e+8,n.size)),mt(t,e+12,u),mt(t,e+14,f),e+=16,null!=a&&(mt(t,e,c),mt(t,e+6,n.attrs),mt(t,e+10,a),e+=14),t.set(r,e),e+=u,f)for(var d in l){var m=l[d],g=m.length;mt(t,e,+d),mt(t,e+2,g),t.set(m,e+4),e+=4+g}return c&&(t.set(s,e),e+=c),e},he=function(t,e,n,r,i){mt(t,e,101010256),mt(t,e+8,n),mt(t,e+10,n),mt(t,e+12,r),mt(t,e+16,i)},pe=function(){function t(t){this.filename=t,this.c=Y(),this.size=0,this.compression=0}return t.prototype.process=function(t,e){this.ondata(null,t,e)},t.prototype.push=function(t,e){this.ondata||M(5),this.c.p(t),this.size+=t.length,e&&(this.crc=this.c.d()),this.process(t,e||!1)},t}(),de=function(){function t(t,e){var n=this;e||(e={}),pe.call(this,t),this.d=new xt(e,(function(t,e){n.ondata(null,t,e)})),this.compression=8,this.flag=ae(e.level)}return t.prototype.process=function(t,e){try{this.d.push(t,e)}catch(Se){this.ondata(Se,null,e)}},t.prototype.push=function(t,e){pe.prototype.push.call(this,t,e)},t}(),me=function(){function t(t,e){var n=this;e||(e={}),pe.call(this,t),this.d=new Et(e,(function(t,e,r){n.ondata(t,e,r)})),this.compression=8,this.flag=ae(e.level),this.terminate=this.d.terminate}return t.prototype.process=function(t,e){this.d.push(t,e)},t.prototype.push=function(t,e){pe.prototype.push.call(this,t,e)},t}(),ge=function(){function t(t){this.ondata=t,this.u=[],this.d=1}return t.prototype.add=function(t){var e=this;if(this.ondata||M(5),2&this.d)this.ondata(M(4+8*(1&this.d),0,1),null,!1);else{var n=ie(t.filename),r=n.length,o=t.comment,a=o&&ie(o),s=r!=t.filename.length||a&&o.length!=a.length,u=r+ce(t.extra)+30;r>65535&&this.ondata(M(11,0,1),null,!1);var l=new i(u);fe(l,0,t,n,s,-1);var c=[l],f=function(){for(var t=0,n=c;t<n.length;t++){var r=n[t];e.ondata(null,r,!1)}c=[]},h=this.d;this.d=0;var p=this.u.length,d=$(t,{f:n,u:s,o:a,t:function(){t.terminate&&t.terminate()},r:function(){if(f(),h){var t=e.u[p+1];t?t.r():e.d=1}h=1}}),m=0;t.ondata=function(n,r,o){if(n)e.ondata(n,r,o),e.terminate();else if(m+=r.length,c.push(r),o){var a=new i(16);mt(a,0,134695760),mt(a,4,t.crc),mt(a,8,m),mt(a,12,t.size),c.push(a),d.c=m,d.b=u+m+16,d.crc=t.crc,d.size=t.size,h&&d.r(),h=1}else h&&f()},this.u.push(d)}},t.prototype.end=function(){var t=this;2&this.d?this.ondata(M(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&t.d&&(t.u.splice(-1,1),t.e())},t:function(){}}),this.d=3)},t.prototype.e=function(){for(var t=0,e=0,n=0,r=0,o=this.u;r<o.length;r++){n+=46+(l=o[r]).f.length+ce(l.extra)+(l.o?l.o.length:0)}for(var a=new i(n+22),s=0,u=this.u;s<u.length;s++){var l=u[s];fe(a,t,l,l.f,l.u,-l.c-2,e,l.o),t+=46+l.f.length+ce(l.extra)+(l.o?l.o.length:0),e+=l.b}he(a,t,this.u.length,n,e),this.ondata(null,a,!0),this.d=2},t.prototype.terminate=function(){for(var t=0,e=this.u;t<e.length;t++){e[t].t()}this.d=2},t}();function ye(t,e,n){n||(n=e,e={}),"function"!=typeof n&&M(7);var r={};$t(t,"",r,e);var o=Object.keys(r),a=o.length,s=0,u=0,l=a,c=new Array(a),f=[],h=function(){for(var t=0;t<f.length;++t)f[t]()},p=function(t,e){xe((function(){n(t,e)}))};xe((function(){p=n}));var d=function(){var t=new i(u+22),e=s,n=u-s;u=0;for(var r=0;r<l;++r){var o=c[r];try{var a=o.c.length;fe(t,u,o,o.f,o.u,a);var f=30+o.f.length+ce(o.extra),h=u+f;t.set(o.c,h),fe(t,s,o,o.f,o.u,a,u,o.m),s+=16+f+(o.m?o.m.length:0),u=h+a}catch(Se){return p(Se,null)}}he(t,s,c.length,n,e),p(null,t)};a||d();for(var m=function(t){var e=o[t],n=r[e],i=n[0],l=n[1],m=Y(),g=i.length;m.p(i);var y=ie(e),v=y.length,b=l.comment,_=b&&ie(b),A=_&&_.length,w=ce(l.extra),x=0==l.level?0:8,E=function(n,r){if(n)h(),p(n,null);else{var i=r.length;c[t]=$(l,{size:g,crc:m.d(),c:r,f:y,m:_,u:v!=e.length||_&&b.length!=A,compression:x}),s+=30+v+w+i,u+=76+2*(v+w)+(A||0)+i,--a||d()}};if(v>65535&&E(M(11,0,1),null),x)if(g<16e4)try{E(null,St(i,l))}catch(Se){E(Se,null)}else f.push(Ot(i,l,E));else E(null,i)},g=0;g<l;++g)m(g);return h}function ve(t,e){e||(e={});var n={},r=[];$t(t,"",n,e);var o=0,a=0;for(var s in n){var u=n[s],l=u[0],c=u[1],f=0==c.level?0:8,h=(E=ie(s)).length,p=c.comment,d=p&&ie(p),m=d&&d.length,g=ce(c.extra);h>65535&&M(11);var y=f?St(l,c):l,v=y.length,b=Y();b.p(l),r.push($(c,{size:l.length,crc:b.d(),c:y,f:E,m:d,u:h!=s.length||d&&p.length!=m,o:o,compression:f})),o+=30+h+g+v,a+=76+2*(h+g)+(m||0)+v}for(var _=new i(a+22),A=o,w=a-o,x=0;x<r.length;++x){var E=r[x];fe(_,E.o,E,E.f,E.u,E.c.length);var O=30+E.f.length+ce(E.extra);_.set(E.c,E.o+O),fe(_,o,E,E.f,E.u,E.c.length,E.o,E.m),o+=16+O+(E.m?E.m.length:0)}return he(_,o,r.length,w,A),_}var be=function(){function t(){}return t.prototype.push=function(t,e){this.ondata(null,t,e)},t.compression=0,t}(),_e=function(){function t(){var t=this;this.i=new Pt((function(e,n){t.ondata(null,e,n)}))}return t.prototype.push=function(t,e){try{this.i.push(t,e)}catch(Se){this.ondata(Se,null,e)}},t.compression=8,t}(),Ae=function(){function t(t,e){var n=this;e<32e4?this.i=new Pt((function(t,e){n.ondata(null,t,e)})):(this.i=new Ct((function(t,e,r){n.ondata(t,e,r)})),this.terminate=this.i.terminate)}return t.prototype.push=function(t,e){this.i.terminate&&(t=I(t,0)),this.i.push(t,e)},t.compression=8,t}(),we=function(){function t(t){this.onfile=t,this.k=[],this.o={0:be},this.p=H}return t.prototype.push=function(t,e){var n=this;if(this.onfile||M(5),this.p||M(4),this.c>0){var r=Math.min(this.c,t.length),o=t.subarray(0,r);if(this.c-=r,this.d?this.d.push(o,!this.c):this.k[0].push(o),(t=t.subarray(r)).length)return this.push(t,e)}else{var a=0,s=0,u=void 0,l=void 0;this.p.length?t.length?((l=new i(this.p.length+t.length)).set(this.p),l.set(t,this.p.length)):l=this.p:l=t;for(var c=l.length,f=this.c,h=f&&this.d,p=function(){var t,e=pt(l,s);if(67324752==e){a=1,u=s,d.d=null,d.c=0;var r=ht(l,s+6),i=ht(l,s+8),o=2048&r,h=8&r,p=ht(l,s+26),m=ht(l,s+28);if(c>s+30+p+m){var g=[];d.k.unshift(g),a=2;var y,v=pt(l,s+18),b=pt(l,s+22),_=oe(l.subarray(s+30,s+=30+p),!o);4294967295==v?(t=h?[-2]:le(l,s),v=t[0],b=t[1]):h&&(v=-1),s+=m,d.c=v;var A={name:_,compression:i,start:function(){if(A.ondata||M(5),v){var t=n.o[i];t||A.ondata(M(14,"unknown compression type "+i,1),null,!1),(y=v<0?new t(_):new t(_,v,b)).ondata=function(t,e,n){A.ondata(t,e,n)};for(var e=0,r=g;e<r.length;e++){var o=r[e];y.push(o,!1)}n.k[0]==g&&n.c?n.d=y:y.push(H,!0)}else A.ondata(null,H,!0)},terminate:function(){y&&y.terminate&&y.terminate()}};v>=0&&(A.size=v,A.originalSize=b),d.onfile(A)}return"break"}if(f){if(134695760==e)return u=s+=12+(-2==f&&8),a=3,d.c=0,"break";if(33639248==e)return u=s-=4,a=3,d.c=0,"break"}},d=this;s<c-4;++s){if("break"===p())break}if(this.p=H,f<0){var m=a?l.subarray(0,u-12-(-2==f&&8)-(134695760==pt(l,u-16)&&4)):l.subarray(0,s);h?h.push(m,!!a):this.k[+(2==a)].push(m)}if(2&a)return this.push(l.subarray(s),e);this.p=l.subarray(s)}e&&(this.c&&M(13),this.p=null)},t.prototype.register=function(t){this.o[t.compression]=t},t}(),xe="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()};function Ee(t,e,n){n||(n=e,e={}),"function"!=typeof n&&M(7);var r=[],o=function(){for(var t=0;t<r.length;++t)r[t]()},a={},s=function(t,e){xe((function(){n(t,e)}))};xe((function(){s=n}));for(var u=t.length-22;101010256!=pt(t,u);--u)if(!u||t.length-u>65558)return s(M(13,0,1),null),o;var l=ht(t,u+8);if(l){var c=l,f=pt(t,u+16),h=4294967295==f||65535==c;if(h){var p=pt(t,u-12);(h=101075792==pt(t,p))&&(c=l=pt(t,p+32),f=pt(t,p+48))}for(var d=e&&e.filter,m=function(e){var n=ue(t,f,h),c=n[0],p=n[1],m=n[2],g=n[3],y=n[4],v=n[5],b=se(t,v);f=y;var _=function(t,e){t?(o(),s(t,null)):(e&&(a[g]=e),--l||s(null,a))};if(!d||d({name:g,size:p,originalSize:m,compression:c}))if(c)if(8==c){var A=t.subarray(b,b+p);if(p<32e4)try{_(null,kt(A,new i(m)))}catch(u){_(u,null)}else r.push(Tt(A,{size:m},_))}else _(M(14,"unknown compression type "+c,1),null);else _(null,I(t,b,b+p));else _(null,null)},g=0;g<c;++g)m()}else s(null,{});return o}function Oe(t,e){for(var n={},r=t.length-22;101010256!=pt(t,r);--r)(!r||t.length-r>65558)&&M(13);var o=ht(t,r+8);if(!o)return{};var a=pt(t,r+16),s=4294967295==a||65535==o;if(s){var u=pt(t,r-12);(s=101075792==pt(t,u))&&(o=pt(t,u+32),a=pt(t,u+48))}for(var l=e&&e.filter,c=0;c<o;++c){var f=ue(t,a,s),h=f[0],p=f[1],d=f[2],m=f[3],g=f[4],y=f[5],v=se(t,y);a=g,l&&!l({name:m,size:p,originalSize:d,compression:h})||(h?8==h?n[m]=kt(t.subarray(v,v+p),new i(d)):M(14,"unknown compression type "+h):n[m]=I(t,v,v+p))}return n}},function(t,e,n){"use strict";function r(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return i(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 i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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}var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(528),s=o(n(369)),u=o(n(1438)),l=o(n(1442));function c(t,e){var n=function(t,e){var n=[],r={coordLength:2,pointPositionsCount:0,pointFeaturesCount:0,linePositionsCount:0,linePathsCount:0,lineFeaturesCount:0,polygonPositionsCount:0,polygonObjectsCount:0,polygonRingsCount:0,polygonFeaturesCount:0};if(t.byteLength<=0)return[n,r];var i=new l.default(new s.default(t));return(e&&Array.isArray(e.layers)?e.layers:Object.keys(i.layers)).forEach((function(t){var o=i.layers[t];if(o)for(var a=0;a<o.length;a++){var s=p(o.feature(a,r),e,t);n.push(s)}})),[n,r]}(t,e),i=r(n,2),o=i[0],u=i[1],c=(0,a.flatGeojsonToBinary)(o,u);return c.byteLength=t.byteLength,c}function f(t,e){if(t.byteLength<=0)return[];var n=[],r=new u.default(new s.default(t));return(Array.isArray(e.layers)?e.layers:Object.keys(r.layers)).forEach((function(t){var i=r.layers[t];if(i)for(var o=0;o<i.length;o++){var a=h(i.feature(o),e,t);n.push(a)}})),n}function h(t,e,n){var r=t.toGeoJSON("wgs84"===e.coordinates?e.tileIndex:d);return e.layerProperty&&(r.properties[e.layerProperty]=n),r}function p(t,e,n){var r=t.toBinaryCoordinates("wgs84"===e.coordinates?e.tileIndex:m);return e.layerProperty&&r.properties&&(r.properties[e.layerProperty]=n),r}function d(t,e){for(var n=e.extent,r=0;r<t.length;r++){var i=t[r];i[0]/=n,i[1]/=n}}function m(t,e){for(var n=e.extent,r=0,i=t.length;r<i;++r)t[r]/=n}e.default=function(t,e){var n,r,i=function(t){var e;if(null===t||void 0===t||!t.mvt)throw new Error("mvt options required");var n="wgs84"===(null===(e=t.mvt)||void 0===e?void 0:e.coordinates),r=t.mvt.tileIndex,i=r&&Number.isFinite(r.x)&&Number.isFinite(r.y)&&Number.isFinite(r.z);if(n&&!i)throw new Error("MVT Loader: WGS84 coordinates need tileIndex property");return t.mvt}(e),o=(null===e||void 0===e||null===(n=e.gis)||void 0===n?void 0:n.format)||(null===e||void 0===e||null===(r=e.mvt)||void 0===r?void 0:r.shape);switch(o){case"columnar-table":return{shape:"columnar-table",data:c(t,i)};case"geojson-row-table":return{shape:"geojson-row-table",data:f(t,i)};case"geojson":return f(t,i);case"binary-geometry":case"binary":return c(t,i);default:throw new Error(o)}}},function(t,e,n){"use strict";function r(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 i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=o(n(1439)),s=i((function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layers=e.readFields(u,{},n)}));function u(t,e,n){if(3===t&&n){var r=new a.default(n,n.readVarint()+n.pos);r.length&&e&&(e[r.name]=r)}}e.default=s},function(t,e,n){"use strict";function r(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)}}var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(1440)),a=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(s,this,n),this.length=this._features.length}var e,n,i;return e=t,(n=[{key:"feature",value:function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new o.default(this._pbf,e,this.extent,this._keys,this._values)}}])&&r(e.prototype,n),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function s(t,e,n){e&&n&&(15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){var e=null,n=t.readVarint()+t.pos;for(;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n)))}e.default=a},function(t,e,n){"use strict";function r(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)}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1441),o=function(){function t(e,n,r,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.properties={},this.extent=r,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=o,this._values=a,e.readFields(i.readFeature,this,n)}var e,n,o;return e=t,o=[{key:"types",get:function(){return["Unknown","Point","LineString","Polygon"]}}],(n=[{key:"loadGeometry",value:function(){var t=this._pbf;t.pos=this._geometry;for(var e,n=t.readVarint()+t.pos,r=1,i=0,o=0,a=0,s=[];t.pos<n;){if(i<=0){var u=t.readVarint();r=7&u,i=u>>3}if(i--,1===r||2===r)o+=t.readSVarint(),a+=t.readSVarint(),1===r&&(e&&s.push(e),e=[]),e&&e.push([o,a]);else{if(7!==r)throw new Error("unknown command ".concat(r));e&&e.push(e[0].slice())}}return e&&s.push(e),s}},{key:"bbox",value:function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(r<=0){var c=t.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=t.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==n)throw new Error("unknown command ".concat(n))}return[a,u,s,l]}},{key:"_toGeoJSON",value:function(e){var n,r,o=this.loadGeometry(),a=t.types[this.type];switch(this.type){case 1:var s=[];for(n=0;n<o.length;n++)s[n]=o[n][0];e(o=s,this);break;case 2:for(n=0;n<o.length;n++)e(o[n],this);break;case 3:for(o=(0,i.classifyRings)(o),n=0;n<o.length;n++)for(r=0;r<o[n].length;r++)e(o[n][r],this)}1===o.length?o=o[0]:a="Multi".concat(a);var u={type:"Feature",geometry:{type:a,coordinates:o},properties:this.properties};return null!==this.id&&(u.id=this.id),u}},{key:"toGeoJSON",value:function(t){if("function"===typeof t)return this._toGeoJSON(t);var e=t.x,n=t.y,r=t.z,i=this.extent*Math.pow(2,r),o=this.extent*e,a=this.extent*n;return this._toGeoJSON((function(t){for(var e=0;e<t.length;e++){var n=t[e];n[0]=360*(n[0]+o)/i-180;var r=180-360*(n[1]+a)/i;n[1]=360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90}}))}}])&&r(e.prototype,n),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=o},function(t,e,n){"use strict";function r(t){for(var e,n,r=0,i=0,o=t.length-1;i<t.length;o=i++)e=t[i],r+=((n=t[o])[0]-e[0])*(e[1]+n[1]);return r}function i(t,e){for(var n=t.readVarint()+t.pos;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}Object.defineProperty(e,"__esModule",{value:!0}),e.readTag=e.readFeature=e.signedArea=e.classifyRings=void 0,e.classifyRings=function(t){var e=t.length;if(e<=1)return[t];for(var n,i,o=[],a=0;a<e;a++){var s=r(t[a]);0!==s&&(void 0===i&&(i=s<0),i===s<0?(n&&o.push(n),n=[t[a]]):n&&n.push(t[a]))}return n&&o.push(n),o},e.signedArea=r,e.readFeature=function(t,e,n){e&&n&&(1===t?e.id=n.readVarint():2===t?i(n,e):3===t?e.type=n.readVarint():4===t&&(e._geometry=n.pos))},e.readTag=i},function(t,e,n){"use strict";function r(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 i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=o(n(1443)),s=i((function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layers=e.readFields(u,{},n)}));function u(t,e,n){if(3===t&&n){var r=new a.default(n,n.readVarint()+n.pos);r.length&&e&&(e[r.name]=r)}}e.default=s},function(t,e,n){"use strict";function r(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)}}var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(1444)),a=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(s,this,n),this.length=this._features.length}var e,n,i;return e=t,(n=[{key:"feature",value:function(t,e){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var n=this._pbf.readVarint()+this._pbf.pos;return new o.default(this._pbf,n,this.extent,this._keys,this._values,e)}}])&&r(e.prototype,n),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function s(t,e,n){e&&n&&(15===t?e.version=n.readVarint():1===t?e.name=n.readString():5===t?e.extent=n.readVarint():2===t?e._features.push(n.pos):3===t?e._keys.push(n.readString()):4===t&&e._values.push(function(t){var e=null,n=t.readVarint()+t.pos;for(;t.pos<n;){var r=t.readVarint()>>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n)))}e.default=a},function(t,e,n){"use strict";function r(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return i(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 i(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}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){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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(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)}}Object.defineProperty(e,"__esModule",{value:!0}),e.TEST_EXPORTS=void 0;var l,c,f,h,p,d,m,g=n(1445);e.TEST_EXPORTS={classifyRings:g.classifyRings};var y=function(){function t(e,n,r,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.properties={},this.extent=r,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=i,this._values=o,this._geometryInfo=a,e.readFields(g.readFeature,this,n)}var e,n,i;return e=t,(n=[{key:"loadGeometry",value:function(){var t=this._pbf;t.pos=this._geometry,l=t.readVarint()+t.pos,c=1,h=0,p=0,d=0,m=0;for(var e=[],n=[];t.pos<l;)if(h<=0&&(f=t.readVarint(),c=7&f,h=f>>3),h--,1===c||2===c)p+=t.readSVarint(),d+=t.readSVarint(),1===c&&e.push(m),n.push(p,d),m+=2;else{if(7!==c)throw new Error("unknown command ".concat(c));if(m>0){var r=e[e.length-1];n.push(n[r],n[r+1]),m+=2}}return{data:n,indices:e}}},{key:"_toBinaryCoordinates",value:function(t){var e,n=this.loadGeometry();switch(t(n.data,this),this.type){case 1:this._geometryInfo.pointFeaturesCount++,this._geometryInfo.pointPositionsCount+=n.indices.length,e=a({type:"Point"},n);break;case 2:this._geometryInfo.lineFeaturesCount++,this._geometryInfo.linePathsCount+=n.indices.length,this._geometryInfo.linePositionsCount+=n.data.length/2,e=a({type:"LineString"},n);break;case 3:e=(0,g.classifyRings)(n),this._geometryInfo.polygonFeaturesCount++,this._geometryInfo.polygonObjectsCount+=e.indices.length;var i,o=r(e.indices);try{for(o.s();!(i=o.n()).done;){var s=i.value;this._geometryInfo.polygonRingsCount+=s.length}}catch(l){o.e(l)}finally{o.f()}this._geometryInfo.polygonPositionsCount+=e.data.length/2;break;default:throw new Error("Invalid geometry type: ".concat(this.type))}var u={type:"Feature",geometry:e,properties:this.properties};return null!==this.id&&(u.id=this.id),u}},{key:"toBinaryCoordinates",value:function(t){if("function"===typeof t)return this._toBinaryCoordinates(t);var e=t.x,n=t.y,r=t.z,i=this.extent*Math.pow(2,r),o=this.extent*e,a=this.extent*n;return this._toBinaryCoordinates((function(t){return(0,g.project)(t,o,a,i)}))}}])&&u(e.prototype,n),i&&u(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readTag=e.readFeature=e.project=e.classifyRings=void 0;var r=n(53);function i(t,e){for(var n=t.readVarint()+t.pos;t.pos<n;){var r=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[r]=i}}e.classifyRings=function(t){var e=t.indices.length,n="Polygon";if(e<=1)return{type:n,data:t.data,areas:[[(0,r.getPolygonSignedArea)(t.data)]],indices:[t.indices]};for(var i,o,a,s=[],u=[],l=[],c=[],f=0,h=0;h<e;h++){a=t.indices[h]-f,o=t.indices[h+1]-f||t.data.length;var p=t.data.slice(a,o),d=(0,r.getPolygonSignedArea)(p);if(0!==d)void 0===i&&(i=d<0),i===d<0?(c.length&&(s.push(l),u.push(c)),c=[a],l=[d]):(l.push(d),c.push(a));else{var m=t.data.slice(0,a),g=t.data.slice(o);t.data=m.concat(g),f+=o-a}}return l&&s.push(l),c.length&&u.push(c),{type:n,areas:s,indices:u,data:t.data}},e.project=function(t,e,n,r){for(var i=0,o=t.length;i<o;i+=2){t[i]=360*(t[i]+e)/r-180;var a=180-360*(t[i+1]+n)/r;t[i+1]=360/Math.PI*Math.atan(Math.exp(a*Math.PI/180))-90}},e.readFeature=function(t,e,n){e&&n&&(1===t?e.id=n.readVarint():2===t?i(n,e):3===t?e.type=n.readVarint():4===t&&(e._geometry=n.pos))},e.readTag=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));let r=1,i=1;class o{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:i=1,repeat:o=1}=t,a=r++,s={time:0,delay:e,duration:n,rate:i,repeat:o};return this._setChannelTime(s,this.time),this.channels.set(a,s),a}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=i++;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)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(0),o=(r=i)&&"object"===typeof r&&"default"in r?r.default:r,a=new(n(1448)),s=a.getBrowser(),u=(a.getCPU(),a.getDevice()),l=a.getEngine(),c=a.getOS(),f=a.getUA(),h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return t||e},p=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},d=function(t){var e=p();return e&&e.platform&&(-1!==e.platform.indexOf(t)||"MacIntel"===e.platform&&e.maxTouchPoints>1&&!window.MSStream)};function m(t){return m="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},m(t)}function g(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 y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(){return v=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},v.apply(this,arguments)}function b(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 _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}function w(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 x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var E="mobile",O="tablet",S="smarttv",P="console",C="wearable",T=void 0,k={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},I={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},L={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},j=function(t,e,n,r){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(n,!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{vendor:h(e.vendor),model:h(e.model),os:h(n.name),osVersion:h(n.version),ua:h(r)})},M=function(t){switch(t){case E:return{isMobile:!0};case O:return{isTablet:!0};case S:return{isSmartTV:!0};case P:return{isConsole:!0};case C:return{isWearable:!0};case T:return{isBrowser:!0};default:return L}}(u.type);var R,N=function(){return"string"===typeof f&&-1!==f.indexOf("Edg/")},D=function(){return u.type===T},F=function(){return s.name===k.Edge},B=function(){return d("iPad")},z=u.type===S,U=u.type===P,G=u.type===C,V=s.name===k.MobileSafari||B(),q=s.name===k.Chromium,H=function(){switch(u.type){case E:case O:return!0;default:return!1}}()||B(),W=u.type===E,X=u.type===O||B(),Y=D(),Z=D(),K=c.name===I.Android,$=c.name===I.WindowsPhone,J=c.name===I.IOS||B(),Q=s.name===k.Chrome,tt=s.name===k.Firefox,et=s.name===k.Safari||s.name===k.MobileSafari,nt=s.name===k.Opera,rt=s.name===k.InternetExplorer||s.name===k.Ie,it=h(c.version),ot=h(c.name),at=h(s.version),st=h(s.major),ut=h(s.name),lt=h(u.vendor),ct=h(u.model),ft=h(l.name),ht=h(l.version),pt=h(f),dt=F()||N(),mt=s.name===k.Yandex,gt=h(u.type,"browser"),yt=(R=p())&&(/iPad|iPhone|iPod/.test(R.platform)||"MacIntel"===R.platform&&R.maxTouchPoints>1)&&!window.MSStream,vt=B(),bt=d("iPhone"),_t=d("iPod"),At=function(){var t=p(),e=t&&t.userAgent&&t.userAgent.toLowerCase();return"string"===typeof e&&/electron/.test(e)}(),wt=N(),xt=F()&&!N(),Et=c.name===I.Windows,Ot=c.name===I.MAC_OS,St=s.name===k.MIUI,Pt=s.name===k.SamsungBrowser;e.AndroidView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return K?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.BrowserTypes=k,e.BrowserView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return Y?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.ConsoleView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return U?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.CustomView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=t.condition,u=w(t,["renderWithFragment","children","viewClassName","style","condition"]);return s?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},u),n):null},e.IEView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return rt?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.IOSView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return J?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.MobileOnlyView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return W?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.MobileView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return H?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.OsTypes=I,e.SmartTVView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return z?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.TabletView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return X?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.WearableView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return G?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.WinPhoneView=function(t){var e=t.renderWithFragment,n=t.children,r=t.viewClassName,a=t.style,s=w(t,["renderWithFragment","children","viewClassName","style"]);return $?e?o.createElement(i.Fragment,null,n):o.createElement("div",v({className:r,style:a},s),n):null},e.browserName=ut,e.browserVersion=st,e.deviceDetect=function(){var t=M.isBrowser,e=M.isMobile,n=M.isTablet,r=M.isSmartTV,i=M.isConsole,o=M.isWearable;return t?function(t,e,n,r,i){return{isBrowser:t,browserMajorVersion:h(e.major),browserFullVersion:h(e.version),browserName:h(e.name),engineName:h(n.name),engineVersion:h(n.version),osName:h(r.name),osVersion:h(r.version),userAgent:h(i)}}(t,s,l,c,f):r?function(t,e,n,r){return{isSmartTV:t,engineName:h(e.name),engineVersion:h(e.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(r,l,c,f):i?function(t,e,n,r){return{isConsole:t,engineName:h(e.name),engineVersion:h(e.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(i,l,c,f):e||n?j(M,u,c,f):o?function(t,e,n,r){return{isWearable:t,engineName:h(e.name),engineVersion:h(e.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(o,l,c,f):void 0},e.deviceType=gt,e.engineName=ft,e.engineVersion=ht,e.fullBrowserVersion=at,e.getUA=pt,e.isAndroid=K,e.isBrowser=Y,e.isChrome=Q,e.isChromium=q,e.isConsole=U,e.isDesktop=Z,e.isEdge=dt,e.isEdgeChromium=wt,e.isElectron=At,e.isFirefox=tt,e.isIE=rt,e.isIOS=J,e.isIOS13=yt,e.isIPad13=vt,e.isIPhone13=bt,e.isIPod13=_t,e.isLegacyEdge=xt,e.isMIUI=St,e.isMacOs=Ot,e.isMobile=H,e.isMobileOnly=W,e.isMobileSafari=V,e.isOpera=nt,e.isSafari=et,e.isSamsungBrowser=Pt,e.isSmartTV=z,e.isTablet=X,e.isWearable=G,e.isWinPhone=$,e.isWindows=Et,e.isYandex=mt,e.mobileModel=ct,e.mobileVendor=lt,e.osName=ot,e.osVersion=it,e.withOrientationChange=function(t){return function(e){function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=function(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?x(t):e}(this,_(n).call(this,t))).isEventListenerAdded=!1,e.handleOrientationChange=e.handleOrientationChange.bind(x(e)),e.onOrientationChange=e.onOrientationChange.bind(x(e)),e.onPageLoad=e.onPageLoad.bind(x(e)),e.state={isLandscape:!1,isPortrait:!1},e}var r,i,a;return function(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&&A(t,e)}(n,e),r=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var t=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===t,isLandscape:90===t})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"===typeof window?"undefined":m(window))&&H&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return o.createElement(t,v({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&g(r.prototype,i),a&&g(r,a),n}(o.Component)}},function(t,e,n){var r;!function(i,o){"use strict";var a="function",s="undefined",u="object",l="string",c="model",f="name",h="type",p="vendor",d="version",m="architecture",g="console",y="mobile",v="tablet",b="smarttv",_="wearable",A="embedded",w={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2===0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return typeof t===l&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===l?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===s?t:t.substring(0,255)}},x={rgx:function(t,e){for(var n,r,i,s,l,c,f=0;f<e.length&&!l;){var h=e[f],p=e[f+1];for(n=r=0;n<h.length&&!l;)if(l=h[n++].exec(t))for(i=0;i<p.length;i++)c=l[++r],typeof(s=p[i])===u&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):o:this[s[0]]=c?s[1].call(this,c,s[2]):o:4==s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):o):this[s]=c||o;f+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===u&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(w.has(e[n][r],t))return"?"===n?o:n}else if(w.has(e[n],t))return"?"===n?o:n;return t}},E={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},O={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[f,"Chrome"]],[/(?:edge|edgios|edga|edg)\/([\w\.]+)/i],[d,[f,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[f,d],[/opios[\/\s]+([\w\.]+)/i],[d,[f,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[f,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[f,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[f,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[f,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[f,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[f,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[f,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[f,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[f,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[f,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[f,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[f,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[f],[/;fbav\/([\w\.]+);/i],[d,[f,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[f,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[f,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[f,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[f,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[f,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[f,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[f,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[f,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[f,[d,x.str,E.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[f,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[f,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[f,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[f,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,w.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[m,/ower/,"",w.lowerize]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,w.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[c,[p,"Samsung"],[h,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[c,[p,"Samsung"],[h,y]],[/\((ip(?:hone|od)[\s\w]*);/i],[c,[p,"Apple"],[h,y]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[p,"Apple"],[h,v]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[c,[p,"Huawei"],[h,v]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[c,[p,"Huawei"],[h,y]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[c,/_/g," "],[p,"Xiaomi"],[h,y]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[c,/_/g," "],[p,"Xiaomi"],[h,v]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[c,[p,"OPPO"],[h,y]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[c,[p,"Vivo"],[h,y]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[c,[p,"Realme"],[h,y]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[c,[p,"Motorola"],[h,y]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[c,[p,"Motorola"],[h,v]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[c,[p,"LG"],[h,v]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[c,[p,"LG"],[h,y]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[c,[p,"Lenovo"],[h,v]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[c,/_/g," "],[p,"Nokia"],[h,y]],[/droid.+;\s(pixel\sc)[\s)]/i],[c,[p,"Google"],[h,v]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[c,[p,"Google"],[h,y]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[p,"Sony"],[h,y]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[c,"Xperia Tablet"],[p,"Sony"],[h,v]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[c,[p,"OnePlus"],[h,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[c,[p,"Amazon"],[h,v]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[c,"Fire Phone"],[p,"Amazon"],[h,y]],[/\((playbook);[\w\s\),;-]+(rim)/i],[c,p,[h,v]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[c,[p,"BlackBerry"],[h,y]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[c,[p,"ASUS"],[h,v]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[c,[p,"ASUS"],[h,y]],[/(nexus\s9)/i],[c,[p,"HTC"],[h,v]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[p,[c,/_/g," "],[h,y]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[c,[p,"Acer"],[h,v]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[c,[p,"Meizu"],[h,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[p,c,[h,y]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[p,c,[h,v]],[/\s(surface\sduo)\s/i],[c,[p,"Microsoft"],[h,v]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[c,[p,"Fairphone"],[h,y]],[/\s(u304aa)\sbuild/i],[c,[p,"AT&T"],[h,y]],[/sie-(\w*)/i],[c,[p,"Siemens"],[h,y]],[/[;\/]\s?(rct\w+)\sbuild/i],[c,[p,"RCA"],[h,v]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[c,[p,"Dell"],[h,v]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[c,[p,"Verizon"],[h,v]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[c,[p,"Barnes & Noble"],[h,v]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[c,[p,"NuVision"],[h,v]],[/;\s(k88)\sbuild/i],[c,[p,"ZTE"],[h,v]],[/;\s(nx\d{3}j)\sbuild/i],[c,[p,"ZTE"],[h,y]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[c,[p,"Swiss"],[h,y]],[/[;\/]\s?(zur\d{3})\sbuild/i],[c,[p,"Swiss"],[h,v]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[c,[p,"Zeki"],[h,v]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[p,"Dragon Touch"],c,[h,v]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[c,[p,"Insignia"],[h,v]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[c,[p,"NextBook"],[h,v]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[p,"Voice"],c,[h,y]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[p,"LvTel"],c,[h,y]],[/;\s(ph-1)\s/i],[c,[p,"Essential"],[h,y]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[c,[p,"Envizen"],[h,v]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[c,[p,"MachSpeed"],[h,v]],[/[;\/]\s?tu_(1491)\sbuild/i],[c,[p,"Rotor"],[h,v]],[/(shield[\w\s]+)\sbuild/i],[c,[p,"Nvidia"],[h,v]],[/(sprint)\s(\w+)/i],[p,c,[h,y]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[p,"Microsoft"],[h,y]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[p,"Zebra"],[h,v]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[p,"Zebra"],[h,y]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[p,c,[h,g]],[/droid.+;\s(shield)\sbuild/i],[c,[p,"Nvidia"],[h,g]],[/(playstation\s[345portablevi]+)/i],[c,[p,"Sony"],[h,g]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[c,[p,"Microsoft"],[h,g]],[/smart-tv.+(samsung)/i],[p,[h,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[p,"Samsung"],[h,b]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[p,"LG"],[h,b]],[/(apple)\s?tv/i],[p,[c,"Apple TV"],[h,b]],[/crkey/i],[[c,"Chromecast"],[p,"Google"],[h,b]],[/droid.+aft([\w])(\sbuild\/|\))/i],[c,[p,"Amazon"],[h,b]],[/\(dtv[\);].+(aquos)/i],[c,[p,"Sharp"],[h,b]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[p,w.trim],[c,w.trim],[h,b]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,b]],[/((pebble))app\/[\d\.]+\s/i],[p,c,[h,_]],[/droid.+;\s(glass)\s\d/i],[c,[p,"Google"],[h,_]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[c,[p,"Zebra"],[h,_]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[p,[h,A]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[c,[h,y]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[c,[h,v]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,w.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[c,[p,"Generic"]],[/(phone)/i],[[h,y]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[f,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,f]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[f,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[f,[d,x.str,E.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[f,"Windows"],[d,x.str,E.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[f,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[f,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[f,d],[/\(bb(10);/i],[d,[f,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[f,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[f,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[f,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[f,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[f,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[f,d],[/(sunos)\s?([\w\.\d]*)/i],[[f,"Solaris"],d],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[f,d]]},S=function(t,e){if("object"===typeof t&&(e=t,t=o),!(this instanceof S))return new S(t,e).getResult();var n=t||("undefined"!==typeof i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?w.extend(O,e):O;return this.getBrowser=function(){var t={name:o,version:o};return x.rgx.call(t,n,r.browser),t.major=w.major(t.version),t},this.getCPU=function(){var t={architecture:o};return x.rgx.call(t,n,r.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return x.rgx.call(t,n,r.device),t},this.getEngine=function(){var t={name:o,version:o};return x.rgx.call(t,n,r.engine),t},this.getOS=function(){var t={name:o,version:o};return x.rgx.call(t,n,r.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n=typeof t===l&&t.length>255?w.trim(t,255):t,this},this.setUA(n),this};S.VERSION="0.7.28",S.BROWSER={NAME:f,MAJOR:"major",VERSION:d},S.CPU={ARCHITECTURE:m},S.DEVICE={MODEL:c,VENDOR:p,TYPE:h,CONSOLE:g,MOBILE:y,SMARTTV:b,TABLET:v,WEARABLE:_,EMBEDDED:A},S.ENGINE={NAME:f,VERSION:d},S.OS={NAME:f,VERSION:d},typeof e!==s?(typeof t!==s&&t.exports&&(e=t.exports=S),e.UAParser=S):(r=function(){return S}.call(e,n,e,t))===o||(t.exports=r);var P="undefined"!==typeof i&&(i.jQuery||i.Zepto);if(P&&!P.ua){var C=new S;P.ua=C.getResult(),P.ua.get=function(){return C.getUA()},P.ua.set=function(t){C.setUA(t);var e=C.getResult();for(var n in e)P.ua[n]=e[n]}}}("object"===typeof window?window:this)},function(t,e){function n(){return t.exports=n=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},t.exports.default=t.exports,t.exports.__esModule=!0,n.apply(this,arguments)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(){return t.exports=n=Object.assign?Object.assign.bind():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},t.exports.__esModule=!0,t.exports.default=t.exports,n.apply(this,arguments)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(1452),i=n(1453),o=n(1454),a=n(1455);t.exports=function(t){return r(t)||i(t)||o(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(1229);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(1229);t.exports=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.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=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.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(1457);t.exports=function(t,e){if(null==t)return{};var n,i,o=r(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=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.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(1460);t.exports=function(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(882).default,i=n(1461);t.exports=function(t){var e=i(t,"string");return"symbol"===r(e)?e:String(e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(882).default;t.exports=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.r(e);var r,i,o=(r=document.createElement("canvas"),{canvas:!!(i=r.getContext("2d")),imageData:!!i.getImageData,dataURL:!!r.toDataURL,btoa:!!window.btoa});function a(t,e,n,r){return t=function(t,e,n){var r=t.width,i=t.height;void 0==e&&(e=r),void 0==n&&(n=i);var o=document.createElement("canvas"),a=o.getContext("2d");return o.width=e,o.height=n,a.drawImage(t,0,0,r,i,0,0,e,n),o}(t,n,r),t.toDataURL(e)}var s=function(t,e,n,r,i){if(o.canvas&&o.dataURL){"string"==typeof t&&(t=document.getElementById(t)),void 0==r&&(r="png");var s=r;!function(t,e="default.png"){var n=document.createElement("a");"string"===typeof n.download?(document.body.appendChild(n),n.download=e,n.href=t,n.click(),document.body.removeChild(n)):location.replace(t)}(a(t,r=function(t){return"image/"+(t=t.toLowerCase().replace(/jpg/i,"jpeg")).match(/png|jpeg|gif/)[0]}(r),e,n).replace(r,"image/octet-stream"),i+"."+s)}};e.default={saveAsImage:s,saveAsPNG:function(t,e,n,r){return s(t,n,r,"png",e)},saveAsJPEG:function(t,e,n,r){return s(t,n,r,"jpeg",e)},saveAsGIF:function(t,e,n,r){return s(t,n,r,"gif",e)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(1537),a=n(273),s=n(1344),u=n.n(s);e.default=function(t){var e=t.children;return i.a.createElement("div",{className:u.a.EmailSignup},i.a.createElement("h2",null,I18n.t("components.pages.email_signup.title")),i.a.createElement("form",null,i.a.createElement(o.a,{placeholder:I18n.t("components.pages.email_signup.label"),value:""}),i.a.createElement(a.a,{type:"submit",primary:!0,label:I18n.t("submit")})),i.a.createElement("p",null,"Quisque congue nisi velit, vel accumsan massa molestie et. Nunc scelerisque, nisl eu venenatis blandit, ante eros molestie justo, at."),e)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(419),a=n(7),s=n(17),u=n(1351),l=n.n(u);e.default=Object(a.a)((function(){var t=Object(s.useStore)().cardItems.filter;return i.a.createElement("div",{className:l.a.ContentOptions},i.a.createElement(o.a,{name:"record",checked:t.type.indexOf("record")>-1,label:I18n.t("records"),onChange:t.toggleSearchType}),i.a.createElement(o.a,{name:"collection",checked:t.type.indexOf("collection")>-1,label:I18n.t("collections"),onChange:t.toggleSearchType}))}))},function(t,e,n){t.exports={HumapEmbed:"Embed-module__HumapEmbed___1TPhK",hero:"Embed-module__hero___1D3OY",type:"Embed-module__type___cs9bP",miniMap:"Embed-module__miniMap___Tgzdb",user:"Embed-module__user___2j0NZ",tenant:"Embed-module__tenant___3i-E6",profileImage:"Embed-module__profileImage___2IQxp",profileText:"Embed-module__profileText___2scfu",profileLink:"Embed-module__profileLink___2Ygxh",description:"Embed-module__description___2GdUN",humapLink:"Embed-module__humapLink___DEzjN"}},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}var i=n(1467),o=n(1284),a=n(1477),s=n(1478),u=n(1479),l=n(1480),c=n(1481),f=n(1482),h=n(236),p=n(643),d=n(86).h;t.exports=function(t){var e=0===t.totalFileCount,n=t.containerWidth>576,m=h({"uppy-Root":t.isTargetDOMEl}),g=h({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":t.disabled,"uppy-Dashboard--animateOpenClose":t.animateOpenClose,"uppy-Dashboard--isClosing":t.isClosing,"uppy-Dashboard--isDraggingOver":t.isDraggingOver,"uppy-Dashboard--modal":!t.inline,"uppy-size--md":t.containerWidth>576,"uppy-size--lg":t.containerWidth>700,"uppy-size--xl":t.containerWidth>900,"uppy-size--height-md":t.containerHeight>400,"uppy-Dashboard--isAddFilesPanelVisible":t.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":t.areInsidesReadyToBeVisible}),y=1;t.containerWidth>900?y=5:t.containerWidth>700?y=4:t.containerWidth>576&&(y=3);var v=t.showSelectedFiles&&!e,b=d("div",{className:g,"data-uppy-theme":t.theme,"data-uppy-num-acquirers":t.acquirers.length,"data-uppy-drag-drop-supported":p(),"aria-hidden":t.inline?"false":t.isHidden,"aria-disabled":t.disabled,"aria-label":t.inline?t.i18n("dashboardTitle"):t.i18n("dashboardWindowTitle"),onPaste:t.handlePaste,onDragOver:t.handleDragOver,onDragLeave:t.handleDragLeave,onDrop:t.handleDrop},d("div",{className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:t.handleClickOutside}),d("div",{className:"uppy-Dashboard-inner","aria-modal":!t.inline&&"true",role:!t.inline&&"dialog",style:{width:t.inline&&t.width?t.width:"",height:t.inline&&t.height?t.height:""}},t.inline?null:d("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":t.i18n("closeModal"),title:t.i18n("closeModal"),onClick:t.closeModal},d("span",{"aria-hidden":"true"},"\xd7")),d("div",{className:"uppy-Dashboard-innerWrap"},d("div",{className:"uppy-Dashboard-dropFilesHereHint"},t.i18n("dropHint")),v&&d(l,t),v?d(i,r({},t,{itemsPerRow:y})):d(o,r({},t,{isSizeMD:n})),d(f,null,t.showAddFilesPanel?d(a,r({key:"AddFiles"},t,{isSizeMD:n})):null),d(f,null,t.fileCardFor?d(c,r({key:"FileCard"},t)):null),d(f,null,t.activePickerPanel?d(s,r({key:"Picker"},t)):null),d(f,null,t.showFileEditor?d(u,r({key:"Editor"},t)):null),d("div",{className:"uppy-Dashboard-progressindicators"},t.progressindicators.map((function(e){return t.getPlugin(e.id).render(t.state)}))))));return d("div",{className:m,dir:t.direction},b)}},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}var i=n(1468),o=n(1476),a=n(236),s=n(86).h;t.exports=function(t){var e,n,u,l,c=0===t.totalFileCount,f=a("uppy-Dashboard-files",{"uppy-Dashboard-files--noFiles":c}),h=1===t.itemsPerRow?71:200,p={id:t.id,error:t.error,i18n:t.i18n,log:t.log,info:t.info,acquirers:t.acquirers,resumableUploads:t.resumableUploads,individualCancellation:t.individualCancellation,hideRetryButton:t.hideRetryButton,hidePauseResumeButton:t.hidePauseResumeButton,hideCancelButton:t.hideCancelButton,showLinkToFileUploadResult:t.showLinkToFileUploadResult,showRemoveButtonAfterComplete:t.showRemoveButtonAfterComplete,isWide:t.isWide,metaFields:t.metaFields,retryUpload:t.retryUpload,pauseUpload:t.pauseUpload,cancelUpload:t.cancelUpload,toggleFileCard:t.toggleFileCard,removeFile:t.removeFile,handleRequestThumbnail:t.handleRequestThumbnail,handleCancelThumbnail:t.handleCancelThumbnail},d=(e=Object.keys(t.files),n=t.itemsPerRow,u=[],l=[],e.forEach((function(t,e){l.length<n?l.push(t):(u.push(l),l=[t])})),l.length&&u.push(l),u);return s(o,{class:f,role:"list",data:d,renderRow:function(e){return s("div",{role:"presentation",key:e[0]},e.map((function(e){return s(i,r({key:e},p,{role:"listitem",openFileEditor:t.openFileEditor,canEditFile:t.canEditFile,file:t.files[e]}))})))},rowHeight:h})}},function(t,e,n){function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(86),o=i.h,a=i.Component,s=n(236),u=n(1469),l=n(1470),c=n(1471),f=n(1472),h=n(1474);t.exports=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var a=i.prototype;return a.shouldComponentUpdate=function(t){return!u(this.props,t)},a.componentDidMount=function(){var t=this.props.file;t.preview||this.props.handleRequestThumbnail(t)},a.componentWillUnmount=function(){var t=this.props.file;t.preview||this.props.handleCancelThumbnail(t)},a.render=function(){var t=this.props.file,e=t.progress.preprocess||t.progress.postprocess,n=t.progress.uploadComplete&&!e&&!t.error,r=t.progress.uploadStarted||e,i=t.progress.uploadStarted&&!t.progress.uploadComplete||e,a=t.error||!1,u=(this.props.individualCancellation||!i)&&!n;n&&this.props.showRemoveButtonAfterComplete&&(u=!0);var p=s({"uppy-Dashboard-Item":!0,"is-inprogress":i,"is-processing":e,"is-complete":n,"is-error":!!a,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation});return o("div",{className:p,id:"uppy_"+t.id,role:this.props.role},o("div",{className:"uppy-Dashboard-Item-preview"},o(l,{file:t,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult}),o(c,{file:t,error:a,isUploaded:n,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,pauseUpload:this.props.pauseUpload,cancelUpload:this.props.cancelUpload,retryUpload:this.props.retryUpload,i18n:this.props.i18n})),o("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},o(f,{file:t,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,i18n:this.props.i18n}),o(h,{file:t,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:u,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:r,removeFile:this.props.removeFile,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,i18n:this.props.i18n,log:this.props.log,info:this.props.info})))},i}(a)},function(t,e){t.exports=function(t,e){if(t===e)return!0;for(var n in t)if(!(n in e))return!1;for(var n in e)if(t[n]!==e[n])return!1;return!0}},function(t,e,n){var r=n(86).h,i=n(1283),o=n(931);t.exports=function(t){return r("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:o(t.file.type).color}},t.showLinkToFileUploadResult&&t.file.uploadURL&&r("a",{className:"uppy-Dashboard-Item-previewLink",href:t.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":t.file.meta.name}),r(i,{file:t.file}))}},function(t,e,n){var r=n(86).h;function i(t){return t.isUploaded?t.i18n("uploadComplete"):t.error?t.i18n("retryUpload"):t.resumableUploads?t.file.isPaused?t.i18n("resumeUpload"):t.i18n("pauseUpload"):t.individualCancellation?t.i18n("cancelUpload"):""}function o(t){return r("div",{className:"uppy-Dashboard-Item-progress"},r("button",{className:"uppy-u-reset uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":i(t),title:i(t),onClick:function(){return function(t){t.isUploaded||(!t.error||t.hideRetryButton?t.resumableUploads&&!t.hidePauseResumeButton?t.pauseUpload(t.file.id):t.individualCancellation&&!t.hideCancelButton&&t.cancelUpload(t.file.id):t.retryUpload(t.file.id))}(t)}},t.children))}function a(t){var e=t.children;return r("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},e)}function s(t){var e=t.progress,n=2*Math.PI*15;return r("g",null,r("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18",strokeWidth:"2",fill:"none"}),r("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",strokeWidth:"2",fill:"none",strokeDasharray:n,strokeDashoffset:n-n/100*e}))}t.exports=function(t){return t.file.progress.uploadStarted?t.isUploaded?r("div",{className:"uppy-Dashboard-Item-progress"},r("div",{className:"uppy-Dashboard-Item-progressIndicator"},r(a,null,r("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),r("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):t.error&&!t.hideRetryButton?r(o,t,r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},r("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),r("path",{d:"M7.9 3H10v2H7.9z"}),r("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),r("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):t.resumableUploads&&!t.hidePauseResumeButton?r(o,t,r(a,null,r(s,{progress:t.file.progress.percentage}),t.file.isPaused?r("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):r("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},r("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),r("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):t.resumableUploads||!t.individualCancellation||t.hideCancelButton?r("div",{className:"uppy-Dashboard-Item-progress"},r("div",{className:"uppy-Dashboard-Item-progressIndicator"},r(a,null,r(s,{progress:t.file.progress.percentage})))):r(o,t,r(a,null,r(s,{progress:t.file.progress.percentage}),r("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null}},function(t,e,n){var r=n(86).h,i=n(439),o=n(1473),a=function(t){return t.file.source&&t.file.source!==t.id&&r("div",{className:"uppy-Dashboard-Item-sourceIcon"},t.acquirers.map((function(e){if(e.id===t.file.source)return function(t,e){return r("span",{title:e.i18n("fileSource",{name:t.name})},t.icon())}(e,t)})))},s=function(t){var e=t.file,n=t.onClick;return e.error?r("span",{className:"uppy-Dashboard-Item-errorDetails","aria-label":e.error,"data-microtip-position":"bottom","data-microtip-size":"medium",role:"tooltip",onClick:n},"?"):null};t.exports=function(t){return r("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.file.source},function(t){var e;return e=t.containerWidth<=352?35:t.containerWidth<=576?60:30,r("div",{className:"uppy-Dashboard-Item-name",title:t.file.meta.name},o(t.file.meta.name,e))}(t),r("div",{className:"uppy-Dashboard-Item-status"},function(t){return t.file.data.size&&r("div",{className:"uppy-Dashboard-Item-statusSize"},i(t.file.data.size))}(t),a(t),r(s,{file:t.file,onClick:function(){alert(t.file.error)}})))}},function(t,e){t.exports=function(t,e){var n="...";if(t.length<=e)return t;if(e<=n.length)return t.substr(0,e);var r=e-n.length,i=Math.ceil(r/2),o=Math.floor(r/2);return t.substr(0,i)+n+t.substr(t.length-o)}},function(t,e,n){var r=n(86).h,i=n(1475);function o(t){var e=t.file,n=t.uploadInProgressOrComplete,i=t.metaFields,o=t.canEditFile,a=t.i18n,s=t.onClick;return!n&&i&&i.length>0||!n&&o(e)?r("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":a("editFile")+" "+e.meta.name,title:a("editFile"),onClick:function(){return s()}},r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},r("g",{fillRule:"evenodd"},r("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),r("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),r("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function a(t){var e=t.i18n,n=t.onClick;return r("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":e("removeFile"),title:e("removeFile"),onClick:function(){return n()}},r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},r("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),r("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}function s(t){return r("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t.i18n("copyLink"),title:t.i18n("copyLink"),onClick:function(e){return function(t,e){i(e.file.uploadURL,e.i18n("copyLinkToClipboardFallback")).then((function(){e.log("Link copied to clipboard."),e.info(e.i18n("copyLinkToClipboardSuccess"),"info",3e3)})).catch(e.log).then((function(){return t.target.focus({preventScroll:!0})}))}(e,t)}},r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},r("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}t.exports=function(t){var e=t.file,n=t.uploadInProgressOrComplete,i=t.canEditFile,u=t.metaFields,l=t.showLinkToFileUploadResult,c=t.showRemoveButton,f=t.i18n,h=t.removeFile,p=t.toggleFileCard,d=t.openFileEditor,m=t.log,g=t.info;return r("div",{className:"uppy-Dashboard-Item-actionWrapper"},r(o,{i18n:f,file:e,uploadInProgressOrComplete:n,canEditFile:i,metaFields:u,onClick:function(){u&&u.length>0?p(!0,e.id):d(e)}}),l&&e.uploadURL?r(s,{file:e,i18n:f,info:g,log:m}):null,c?r(a,{i18n:f,info:t.info,log:t.log,onClick:function(){return h(e.id,"removed-by-user")}}):null)}},function(t,e){t.exports=function(t,e){return e=e||"Copy the URL below",new Promise((function(n){var r=document.createElement("textarea");r.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),r.value=t,document.body.appendChild(r),r.select();var i=function(){document.body.removeChild(r),window.prompt(e,t),n()};try{return document.execCommand("copy")?(document.body.removeChild(r),n()):i()}catch(o){return document.body.removeChild(r),i()}}))}},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(86),a=o.h,s=o.Component,u={position:"relative",width:"100%",minHeight:"100%"},l={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"},c=function(t){var e,n;function o(e){var n;return(n=t.call(this,e)||this).handleResize=function(){n.resize()},n.handleScroll=function(){n.setState({offset:n.base.scrollTop}),n.props.sync&&n.forceUpdate()},n.focusElement=null,n.state={offset:0,height:0},n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,i(e,n);var s=o.prototype;return s.resize=function(){this.state.height!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})},s.componentWillUpdate=function(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)},s.componentDidUpdate=function(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()},s.componentDidMount=function(){this.resize(),window.addEventListener("resize",this.handleResize)},s.componentWillUnmount=function(){window.removeEventListener("resize",this.handleResize)},s.render=function(t){var e=t.data,n=t.rowHeight,i=t.renderRow,o=t.overscanCount,s=void 0===o?10:o,c=(t.sync,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,["data","rowHeight","renderRow","overscanCount","sync"])),f=this.state,h=f.offset,p=f.height,d=Math.floor(h/n),m=Math.floor(p/n);s&&(d=Math.max(0,d-d%s),m+=s);var g=d+m+4,y=e.slice(d,g),v=r({},u,{height:e.length*n}),b=r({},l,{top:d*n});return a("div",r({onScroll:this.handleScroll},c),a("div",{role:"presentation",style:v},a("div",{role:"presentation",style:b},y.map(i))))},o}(s);t.exports=c},function(t,e,n){var r=n(86).h,i=n(236),o=n(1284);t.exports=function(t){return r("div",{className:i("uppy-Dashboard-AddFilesPanel",t.className),"data-uppy-panelType":"AddFiles","aria-hidden":t.showAddFilesPanel},r("div",{className:"uppy-DashboardContent-bar"},r("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},t.i18n("addingMoreFiles")),r("button",{className:"uppy-DashboardContent-back",type:"button",onClick:function(e){return t.toggleAddFilesPanel(!1)}},t.i18n("back"))),r(o,t))}},function(t,e,n){var r=n(86).h,i=n(236),o=n(1285);t.exports=function(t){return r("div",{className:i("uppy-DashboardContent-panel",t.className),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:"uppy-DashboardContent-panel--"+t.activePickerPanel.id,onDragOver:o,onDragLeave:o,onDrop:o,onPaste:o},r("div",{className:"uppy-DashboardContent-bar"},r("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},t.i18n("importFrom",{name:t.activePickerPanel.name})),r("button",{className:"uppy-DashboardContent-back",type:"button",onClick:t.hideAllPanels},t.i18n("done"))),r("div",{className:"uppy-DashboardContent-panelBody"},t.getPlugin(t.activePickerPanel.id).render(t.state)))}},function(t,e,n){var r=n(86).h,i=n(236);t.exports=function(t){var e=this.props.files[this.props.fileCardFor];return r("div",{className:i("uppy-DashboardContent-panel",t.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},r("div",{className:"uppy-DashboardContent-bar"},r("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},t.i18nArray("editing",{file:r("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),r("button",{className:"uppy-DashboardContent-back",type:"button",onClick:t.hideAllPanels},t.i18n("done"))),r("div",{className:"uppy-DashboardContent-panelBody"},t.editors.map((function(e){return t.getPlugin(e.id).render(t.state)}))))}},function(t,e,n){var r=n(86).h,i="error",o="waiting",a="preprocessing",s="uploading",u="postprocessing",l="complete",c="paused";function f(t){switch(function(t,e,n,r){if(void 0===r&&(r={}),t)return i;if(e)return l;if(n)return c;for(var f=o,h=Object.keys(r),p=0;p<h.length;p++){var d=r[h[p]].progress;if(d.uploadStarted&&!d.uploadComplete)return s;d.preprocess&&f!==s&&(f=a),d.postprocess&&f!==s&&f!==a&&(f=u)}return f}(t.isAllErrored,t.isAllComplete,t.isAllPaused,t.files)){case"uploading":return t.i18n("uploadingXFiles",{smart_count:t.inProgressNotPausedFiles.length});case"preprocessing":case"postprocessing":return t.i18n("processingXFiles",{smart_count:t.processingFiles.length});case"paused":return t.i18n("uploadPaused");case"waiting":return t.i18n("xFilesSelected",{smart_count:t.newFiles.length});case"complete":return t.i18n("uploadComplete")}}t.exports=function(t){var e=t.allowNewUpload;return e&&t.maxNumberOfFiles&&(e=t.totalFileCount<t.maxNumberOfFiles),r("div",{className:"uppy-DashboardContent-bar"},t.isAllComplete||t.hideCancelButton?r("div",null):r("button",{className:"uppy-DashboardContent-back",type:"button",onClick:t.cancelAll},t.i18n("cancel")),r("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},r(f,t)),e?r("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t.i18n("addMoreFiles"),title:t.i18n("addMoreFiles"),onClick:function(){return t.toggleAddFilesPanel(!0)}},r("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},r("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),r("span",{className:"uppy-DashboardContent-addMoreCaption"},t.i18n("addMore"))):r("div",null))}},function(t,e,n){function r(){return r=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},r.apply(this,arguments)}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(86),a=o.h,s=o.Component,u=n(236),l=n(931),c=n(1285),f=n(1283),h=function(t){var e,n;function o(e){var n;(n=t.call(this,e)||this).saveOnEnter=function(t){if(13===t.keyCode){t.stopPropagation(),t.preventDefault();var e=n.props.files[n.props.fileCardFor];n.props.saveFileCard(n.state.formState,e.id)}},n.updateMeta=function(t,e){var i;n.setState({formState:r({},n.state.formState,(i={},i[e]=t,i))})},n.handleSave=function(){var t=n.props.fileCardFor;n.props.saveFileCard(n.state.formState,t)},n.handleCancel=function(){n.props.toggleFileCard(!1)},n.renderMetaFields=function(){var t=n.getMetaFields()||[],e={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return t.map((function(t){var r="uppy-Dashboard-FileCard-input-"+t.id;return a("fieldset",{key:t.id,className:"uppy-Dashboard-FileCard-fieldset"},a("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:r},t.name),void 0!==t.render?t.render({value:n.state.formState[t.id],onChange:function(e){return n.updateMeta(e,t.id)},fieldCSSClasses:e},a):a("input",{className:e.text,id:r,type:t.type||"text",value:n.state.formState[t.id],placeholder:t.placeholder,onKeyUp:n.saveOnEnter,onKeyDown:n.saveOnEnter,onKeyPress:n.saveOnEnter,onInput:function(e){return n.updateMeta(e.target.value,t.id)},"data-uppy-super-focusable":!0}))}))};var i=n.props.files[n.props.fileCardFor],o=n.getMetaFields()||[],s={};return o.forEach((function(t){s[t.id]=i.meta[t.id]||""})),n.state={formState:s},n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,i(e,n);var s=o.prototype;return s.getMetaFields=function(){return"function"===typeof this.props.metaFields?this.props.metaFields(this.props.files[this.props.fileCardFor]):this.props.metaFields},s.render=function(){var t=this,e=this.props.files[this.props.fileCardFor],n=this.props.canEditFile(e);return a("div",{className:u("uppy-Dashboard-FileCard",this.props.className),"data-uppy-panelType":"FileCard",onDragOver:c,onDragLeave:c,onDrop:c,onPaste:c},a("div",{className:"uppy-DashboardContent-bar"},a("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},this.props.i18nArray("editing",{file:a("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),a("button",{className:"uppy-DashboardContent-back",type:"button",title:this.props.i18n("finishEditingFile"),onClick:this.handleSave},this.props.i18n("done"))),a("div",{className:"uppy-Dashboard-FileCard-inner"},a("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:l(e.type).color}},a(f,{file:e}),n&&a("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:function(){return t.props.openFileEditor(e)}},this.props.i18n("editFile"))),a("div",{className:"uppy-Dashboard-FileCard-info"},this.renderMetaFields()),a("div",{className:"uppy-Dashboard-FileCard-actions"},a("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:this.handleSave},this.props.i18n("saveChanges")),a("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:this.handleCancel},this.props.i18n("cancel")))))},o}(s);t.exports=h},function(t,e,n){function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(86),o=i.cloneElement,a=i.Component,s=n(236),u="uppy-transition-slideDownUp",l=function(t){var e,n;function i(e){var n;return(n=t.call(this,e)||this).state={cachedChildren:null,className:""},n}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var a=i.prototype;return a.componentWillUpdate=function(t){var e=this,n=this.state.cachedChildren,r=t.children[0];if(n!==r){var i={cachedChildren:r};r&&!n&&(i.className=u+"-enter",cancelAnimationFrame(this.animationFrame),clearTimeout(this.leaveTimeout),this.leaveTimeout=void 0,this.animationFrame=requestAnimationFrame((function(){e.base.getBoundingClientRect(),e.setState({className:u+"-enter "+u+"-enter-active"}),e.enterTimeout=setTimeout((function(){e.setState({className:""})}),250)}))),n&&!r&&void 0===this.leaveTimeout&&(i.cachedChildren=n,i.className=u+"-leave",cancelAnimationFrame(this.animationFrame),clearTimeout(this.enterTimeout),this.enterTimeout=void 0,this.animationFrame=requestAnimationFrame((function(){e.setState({className:u+"-leave "+u+"-leave-active"}),e.leaveTimeout=setTimeout((function(){e.setState({cachedChildren:null,className:""})}),250)}))),this.setState(i)}},a.render=function(){var t=this.state,e=t.cachedChildren,n=t.className;return e?o(e,{className:s(n,e.attributes.className)}):null},i}(a);t.exports=l},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var s=n(91).Plugin,u=n(86).h;t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).render=function(t){var e=t.info,n=e.isHidden,i=e.message,o=e.details;return u("div",{className:"uppy uppy-Informer","aria-hidden":n},u("p",{role:"alert"},i," ",o&&u("span",{"aria-label":o,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:function(){alert(i+" \n\n "+o)},onMouseOver:function(){clearTimeout(r.uppy.infoTimeoutID)},onMouseLeave:function(){r.uppy.infoTimeoutID=setTimeout(r.uppy.hideInfo,2e3)}},"?")))},r.type="progressindicator",r.id=r.opts.id||"Informer",r.title="Informer";return r.opts=o({},{},n),r}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n),r.prototype.install=function(){var t=this.opts.target;t&&this.mount(t,this)},r}(s),r.VERSION="1.6.3",i)},function(t,e,n){var r,i;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},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var s=n(91).Plugin,u=n(256),l=n(1485),c=n(1486),f=n(1487),h=n(1488),p=n(1489);t.exports=(i=r=function(t){var e,n;function r(e,n){var r;(r=t.call(this,e,n)||this).onFileAdded=function(t){t.preview||!f(t.type)||t.isRemote||r.addToQueue(t.id)},r.onCancelRequest=function(t){var e=r.queue.indexOf(t.id);-1!==e&&r.queue.splice(e,1)},r.onFileRemoved=function(t){var e=r.queue.indexOf(t.id);-1!==e&&r.queue.splice(e,1),t.preview&&c(t.preview)&&URL.revokeObjectURL(t.preview)},r.onRestored=function(){var t=r.uppy.getState().files;Object.keys(t).forEach((function(t){var e=r.uppy.getFile(t);e.isRestored&&(e.preview&&!c(e.preview)||r.addToQueue(e.id))}))},r.waitUntilAllProcessed=function(t){t.forEach((function(t){var e=r.uppy.getFile(t);r.uppy.emit("preprocess-progress",e,{mode:"indeterminate",message:r.i18n("generatingThumbnails")})}));var e=function(){t.forEach((function(t){var e=r.uppy.getFile(t);r.uppy.emit("preprocess-complete",e)}))};return new Promise((function(t,n){r.queueProcessing?r.uppy.once("thumbnail:all-generated",(function(){e(),t()})):(e(),t())}))},r.type="modifier",r.id=r.opts.id||"ThumbnailGenerator",r.title="Thumbnail Generator",r.queue=[],r.queueProcessing=!1,r.defaultThumbnailDimension=200,r.thumbnailType=r.opts.thumbnailType||"image/jpeg",r.defaultLocale={strings:{generatingThumbnails:"Generating thumbnails..."}};if(r.opts=o({},{thumbnailWidth:null,thumbnailHeight:null,waitForThumbnailsBeforeUpload:!1,lazy:!1},n),r.opts.lazy&&r.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.");return r.i18nInit(),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n);var i=r.prototype;return i.setOptions=function(e){t.prototype.setOptions.call(this,e),this.i18nInit()},i.i18nInit=function(){this.translator=new u([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.setPluginState()},i.createThumbnail=function(t,e,n){var r=this,i=URL.createObjectURL(t.data),o=new Promise((function(t,e){var n=new Image;n.src=i,n.addEventListener("load",(function(){URL.revokeObjectURL(i),t(n)})),n.addEventListener("error",(function(t){URL.revokeObjectURL(i),e(t.error||new Error("Could not create thumbnail"))}))})),a=p.rotation(t.data).catch((function(t){return 1}));return Promise.all([o,a]).then((function(t){var i=t[0],o=t[1],a=r.getProportionalDimensions(i,e,n,o.deg),s=r.rotateImage(i,o),u=r.resizeImage(s,a.width,a.height);return r.canvasToBlob(u,r.thumbnailType,80)})).then((function(t){return URL.createObjectURL(t)}))},i.getProportionalDimensions=function(t,e,n,r){var i=t.width/t.height;return 90!==r&&270!==r||(i=t.height/t.width),null!=e?{width:e,height:Math.round(e/i)}:null!=n?{width:Math.round(n*i),height:n}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/i)}},i.protect=function(t){var e=t.width/t.height,n=5e6,r=4096,i=Math.floor(Math.sqrt(n*e)),o=Math.floor(n/Math.sqrt(n*e));if(i>r&&(i=r,o=Math.round(i/e)),o>r&&(o=r,i=Math.round(e*o)),t.width>i){var a=document.createElement("canvas");a.width=i,a.height=o,a.getContext("2d").drawImage(t,0,0,i,o),t=a}return t},i.resizeImage=function(t,e,n){t=this.protect(t);var r=Math.ceil(h(t.width/e));r<1&&(r=1);for(var i=e*Math.pow(2,r-1),o=n*Math.pow(2,r-1);r--;){var a=document.createElement("canvas");a.width=i,a.height=o,a.getContext("2d").drawImage(t,0,0,i,o),t=a,i=Math.round(i/2),o=Math.round(o/2)}return t},i.rotateImage=function(t,e){var n=t.width,r=t.height;90!==e.deg&&270!==e.deg||(n=t.height,r=t.width);var i=document.createElement("canvas");i.width=n,i.height=r;var o=i.getContext("2d");return o.translate(n/2,r/2),e.canvas&&(o.rotate(e.rad),o.scale(e.scaleX,e.scaleY)),o.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),i},i.canvasToBlob=function(t,e,n){try{t.getContext("2d").getImageData(0,0,1,1)}catch(r){if(18===r.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return t.toBlob?new Promise((function(r){t.toBlob(r,e,n)})).then((function(t){if(null===t)throw new Error("cannot read image, probably an svg with external resources");return t})):Promise.resolve().then((function(){return l(t.toDataURL(e,n),{})})).then((function(t){if(null===t)throw new Error("could not extract blob, probably an old browser");return t}))},i.setPreviewURL=function(t,e){this.uppy.setFileState(t,{preview:e})},i.addToQueue=function(t){this.queue.push(t),!1===this.queueProcessing&&this.processQueue()},i.processQueue=function(){var t=this;if(this.queueProcessing=!0,this.queue.length>0){var e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch((function(t){})).then((function(){return t.processQueue()})):void this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error")}this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated")},i.requestThumbnail=function(t){var e=this;return f(t.type)&&!t.isRemote?this.createThumbnail(t,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then((function(n){e.setPreviewURL(t.id,n),e.uppy.log("[ThumbnailGenerator] Generated thumbnail for "+t.id),e.uppy.emit("thumbnail:generated",e.uppy.getFile(t.id),n)})).catch((function(n){e.uppy.log("[ThumbnailGenerator] Failed thumbnail for "+t.id+":","warning"),e.uppy.log(n,"warning"),e.uppy.emit("thumbnail:error",e.uppy.getFile(t.id),n)})):Promise.resolve()},i.install=function(){this.uppy.on("file-removed",this.onFileRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)},i.uninstall=function(){this.uppy.off("file-removed",this.onFileRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)},r}(s),r.VERSION="1.7.8",i)},function(t,e){t.exports=function(t,e,n){var r=t.split(",")[1],i=e.mimeType||t.split(",")[0].split(":")[1].split(";")[0];null==i&&(i="plain/text");for(var o,a=atob(r),s=[],u=0;u<a.length;u++)s.push(a.charCodeAt(u));try{o=new Uint8Array(s)}catch(l){return null}return n?new File([o],e.name||"",{type:i}):new Blob([o],{type:i})}},function(t,e){t.exports=function(t){return 0===t.indexOf("blob:")}},function(t,e){t.exports=function(t){if(!t)return!1;var e=t.split("/")[1];return!!/^(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}},function(t,e,n){"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},function(t,e,n){(function(t,n,r){!function(e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(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}});var n=["prototype","__proto__","caller","arguments","length","name"];Object.getOwnPropertyNames(e).forEach((function(r){-1===n.indexOf(r)&&t[r]!==e[r]&&(t[r]=e[r])})),e&&c(t,e)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function h(t,e,n){return(h=f()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&c(i,n.prototype),i}).apply(null,arguments)}function p(t){var e="function"==typeof Map?new Map:void 0;return(p=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return h(t,arguments,l(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)})(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?d(t):e}function g(t){var e=f();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function y(t,e,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}var v=Object.values||function(t){var e=[];for(var n in t)e.push(t[n]);return e},b=Object.entries||function(t){var e=[];for(var n in t)e.push([n,t[n]]);return e},_=Object.assign||function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((function(e){for(var n in e)t[n]=e[n]})),t},A=Object.fromEntries||function(t){var e={};return w(t).forEach((function(t){var n=t[0],r=t[1];e[n]=r})),e},w=Array.from||function(t){if(t instanceof C){var e=[];return t.forEach((function(t,n){return e.push([n,t])})),e}return Array.prototype.slice.call(t)};function x(t){return-1!==this.indexOf(t)}Array.prototype.includes||(Array.prototype.includes=x),String.prototype.includes||(String.prototype.includes=x),String.prototype.startsWith||(String.prototype.startsWith=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.substring(e,e+t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return this.substring(e-t.length,e)===t});var E="undefined"!=typeof self?self:t,O=E.fetch||function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var i=new XMLHttpRequest;if(i.open("get",t,!0),i.responseType="arraybuffer",i.onerror=r,e.headers)for(var o in e.headers)i.setRequestHeader(o,e.headers[o]);i.onload=function(){n({ok:i.status>=200&&i.status<300,status:i.status,arrayBuffer:function(){return Promise.resolve(i.response)}})},i.send(null)}))},S=function(t){var e=[];if(Object.defineProperties(e,{size:{get:function(){return this.length}},has:{value:function(t){return-1!==this.indexOf(t)}},add:{value:function(t){this.has(t)||this.push(t)}},delete:{value:function(t){if(this.has(t)){var e=this.indexOf(t);this.splice(e,1)}}}}),Array.isArray(t))for(var n=0;n<t.length;n++)e.add(t[n]);return e},P=function(t){return new C(t)},C=void 0!==E.Map&&void 0!==E.Map.prototype.keys?E.Map:function(){function t(e){if(i(this,t),this.clear(),e)for(var n=0;n<e.length;n++)this.set(e[n][0],e[n][1])}return a(t,[{key:"clear",value:function(){this._map={},this._keys=[]}},{key:"size",get:function(){return this._keys.length}},{key:"get",value:function(t){return this._map["map_"+t]}},{key:"set",value:function(t,e){return this._map["map_"+t]=e,this._keys.indexOf(t)<0&&this._keys.push(t),this}},{key:"has",value:function(t){return this._keys.indexOf(t)>=0}},{key:"delete",value:function(t){var e=this._keys.indexOf(t);return!(e<0)&&(delete this._map["map_"+t],this._keys.splice(e,1),!0)}},{key:"keys",value:function(){return this._keys.slice(0)}},{key:"values",value:function(){var t=this;return this._keys.map((function(e){return t.get(e)}))}},{key:"entries",value:function(){var t=this;return this._keys.map((function(e){return[e,t.get(e)]}))}},{key:"forEach",value:function(t,e){for(var n=0;n<this._keys.length;n++)t.call(e,this._map["map_"+this._keys[n]],this._keys[n],this)}}]),t}(),T="undefined"!=typeof self?self:t,k="undefined"!=typeof navigator,I=k&&"undefined"==typeof HTMLImageElement,L=!("undefined"==typeof t||"undefined"==typeof n||!n.versions||!n.versions.node),j=T.Buffer,M=!!j,R=function(t){return void 0!==t};function N(t){return void 0===t||(t instanceof C?0===t.size:0===v(t).filter(R).length)}function D(t){var e=new Error(t);throw delete e.stack,e}function F(t){var e=function(t){var e=0;return t.ifd0.enabled&&(e+=1024),t.exif.enabled&&(e+=2048),t.makerNote&&(e+=2048),t.userComment&&(e+=1024),t.gps.enabled&&(e+=512),t.interop.enabled&&(e+=100),t.ifd1.enabled&&(e+=1024),e+2048}(t);return t.jfif.enabled&&(e+=50),t.xmp.enabled&&(e+=2e4),t.iptc.enabled&&(e+=14e3),t.icc.enabled&&(e+=6e3),e}var B=function(t){return String.fromCharCode.apply(null,t)},z="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;function U(t){return z?z.decode(t):M?r.from(t).toString("utf8"):decodeURIComponent(escape(B(t)))}var G=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;if(i(this,t),"boolean"==typeof o&&(this.le=o),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===r&&(r=e.byteLength-n);var a=new DataView(e,n,r);this._swapDataView(a)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof t){void 0===r&&(r=e.byteLength-n),(n+=e.byteOffset)+r>e.byteOffset+e.byteLength&&D("Creating view outside of available memory in ArrayBuffer");var s=new DataView(e.buffer,n,r);this._swapDataView(s)}else if("number"==typeof e){var u=new DataView(new ArrayBuffer(e));this._swapDataView(u)}else D("Invalid input argument for BufferView: "+e)}return a(t,[{key:"_swapArrayBuffer",value:function(t){this._swapDataView(new DataView(t))}},{key:"_swapBuffer",value:function(t){this._swapDataView(new DataView(t.buffer,t.byteOffset,t.byteLength))}},{key:"_swapDataView",value:function(t){this.dataView=t,this.buffer=t.buffer,this.byteOffset=t.byteOffset,this.byteLength=t.byteLength}},{key:"_lengthToEnd",value:function(t){return this.byteLength-t}},{key:"set",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return e instanceof DataView||e instanceof t?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||D("BufferView.set(): Invalid data argument."),this.toUint8().set(e,n),new r(this,n,e.byteLength)}},{key:"subarray",value:function(e,n){return new t(this,e,n=n||this._lengthToEnd(e))}},{key:"toUint8",value:function(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}},{key:"getUint8Array",value:function(t,e){return new Uint8Array(this.buffer,this.byteOffset+t,e)}},{key:"getString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength;return U(this.getUint8Array(t,e))}},{key:"getLatin1String",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=this.getUint8Array(t,e);return B(n)}},{key:"getUnicodeString",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=[],r=0;r<e&&t+r<this.byteLength;r+=2)n.push(this.getUint16(t+r));return B(n)}},{key:"getInt8",value:function(t){return this.dataView.getInt8(t)}},{key:"getUint8",value:function(t){return this.dataView.getUint8(t)}},{key:"getInt16",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt16(t,e)}},{key:"getInt32",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt32(t,e)}},{key:"getUint16",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint16(t,e)}},{key:"getUint32",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint32(t,e)}},{key:"getFloat32",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(t,e)}},{key:"getFloat64",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(t,e)}},{key:"getFloat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(t,e)}},{key:"getDouble",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(t,e)}},{key:"getUintBytes",value:function(t,e,n){switch(e){case 1:return this.getUint8(t,n);case 2:return this.getUint16(t,n);case 4:return this.getUint32(t,n);case 8:return this.getUint64&&this.getUint64(t,n)}}},{key:"getUint",value:function(t,e,n){switch(e){case 8:return this.getUint8(t,n);case 16:return this.getUint16(t,n);case 32:return this.getUint32(t,n);case 64:return this.getUint64&&this.getUint64(t,n)}}},{key:"toString",value:function(t){return this.dataView.toString(t,this.constructor.name)}},{key:"ensureChunk",value:function(){}}],[{key:"from",value:function(e,n){return e instanceof this&&e.le===n?e:new t(e,void 0,void 0,n)}}]),t}();function V(t,e){D("".concat(t," '").concat(e,"' was not loaded, try using full build of exifr."))}var q=function(t){u(n,t);var e=g(n);function n(t){var r;return i(this,n),(r=e.call(this)).kind=t,r}return a(n,[{key:"get",value:function(t,e){return this.has(t)||V(this.kind,t),e&&(t in e||function(t,e){D("Unknown ".concat(t," '").concat(e,"'."))}(this.kind,t),e[t].enabled||V(this.kind,t)),y(l(n.prototype),"get",this).call(this,t)}},{key:"keyList",value:function(){return w(this.keys())}}]),n}(p(C)),H=new q("file parser"),W=new q("segment parser"),X=new q("file reader");function Y(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function Z(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}var K=Y((function(t){return new Promise((function(e,n){var r=new FileReader;r.onloadend=function(){return e(r.result||new ArrayBuffer)},r.onerror=n,r.readAsArrayBuffer(t)}))})),$=Y((function(t){return O(t).then((function(t){return t.arrayBuffer()}))})),J=Y((function(t,e){return Z(e(t),(function(t){return new G(t)}))})),Q=Y((function(t,e,n){var r=new(X.get(n))(t,e);return Z(r.read(),(function(){return r}))})),tt=Y((function(t,e,n,r){return X.has(n)?Q(t,e,n):r?J(t,r):(D("Parser ".concat(n," is not loaded")),Z())})),et="Invalid input argument";function nt(t,e){return(n=t).startsWith("data:")||n.length>1e4?Q(t,e,"base64"):k?tt(t,e,"url",$):L?Q(t,e,"fs"):void D(et);var n}var rt=function(t){u(n,t);var e=g(n);function n(){return i(this,n),e.apply(this,arguments)}return a(n,[{key:"tagKeys",get:function(){return this.allKeys||(this.allKeys=w(this.keys())),this.allKeys}},{key:"tagValues",get:function(){return this.allValues||(this.allValues=w(this.values())),this.allValues}}]),n}(p(C));function it(t,e,n){var r=new rt,i=n;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=w(i));for(var o=0;o<i.length;o++){var a=i[o],s=a[0],u=a[1];r.set(s,u)}if(Array.isArray(e)){var l=e;Array.isArray(l)||("function"==typeof l.entries&&(l=l.entries()),l=w(l));for(var c=0;c<l.length;c++){var f=l[c];t.set(f,r)}}else t.set(e,r);return r}function ot(t,e,n){var r,i=t.get(e),o=n;Array.isArray(o)||("function"==typeof o.entries&&(o=o.entries()),o=w(o));for(var a=0;a<o.length;a++)r=o[a],i.set(r[0],r[1])}var at=P(),st=P(),ut=P(),lt=37500,ct=37510,ft=33723,ht=34675,pt=34665,dt=34853,mt=40965,gt=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],yt=["jfif","xmp","icc","iptc","ihdr"],vt=["tiff"].concat(yt),bt=["ifd0","ifd1","exif","gps","interop"],_t=[].concat(vt,bt),At=["makerNote","userComment"],wt=["translateKeys","translateValues","reviveValues","multiSegment"],xt=[].concat(wt,["sanitize","mergeOutput","silentErrors"]),Et=function(){function t(){i(this,t)}return a(t,[{key:"translate",get:function(){return this.translateKeys||this.translateValues||this.reviveValues}}]),t}(),Ot=function(t){u(n,t);var e=g(n);function n(t,r,o,a){var u;if(i(this,n),s(d(u=e.call(this)),"enabled",!1),s(d(u),"skip",S()),s(d(u),"pick",S()),s(d(u),"deps",S()),s(d(u),"translateKeys",!1),s(d(u),"translateValues",!1),s(d(u),"reviveValues",!1),u.key=t,u.enabled=r,u.parse=u.enabled,u.applyInheritables(a),u.canBeFiltered=bt.includes(t),u.canBeFiltered&&(u.dict=at.get(t)),void 0!==o)if(Array.isArray(o))u.parse=u.enabled=!0,u.canBeFiltered&&o.length>0&&u.translateTagSet(o,u.pick);else if("object"==typeof o){if(u.enabled=!0,u.parse=!1!==o.parse,u.canBeFiltered){var l=o.pick,c=o.skip;l&&l.length>0&&u.translateTagSet(l,u.pick),c&&c.length>0&&u.translateTagSet(c,u.skip)}u.applyInheritables(o)}else!0===o||!1===o?u.parse=u.enabled=o:D("Invalid options argument: ".concat(o));return u}return a(n,[{key:"needed",get:function(){return this.enabled||this.deps.size>0}},{key:"applyInheritables",value:function(t){var e,n,r=wt;Array.isArray(r)||("function"==typeof r.entries&&(r=r.entries()),r=w(r));for(var i=0;i<r.length;i++)void 0!==(n=t[e=r[i]])&&(this[e]=n)}},{key:"translateTagSet",value:function(t,e){if(this.dict){var n,r,i=this.dict,o=i.tagKeys,a=i.tagValues,s=t;Array.isArray(s)||("function"==typeof s.entries&&(s=s.entries()),s=w(s));for(var u=0;u<s.length;u++)"string"==typeof(n=s[u])?(-1===(r=a.indexOf(n))&&(r=o.indexOf(Number(n))),-1!==r&&e.add(Number(o[r]))):e.add(n)}else{var l=t;Array.isArray(l)||("function"==typeof l.entries&&(l=l.entries()),l=w(l));for(var c=0;c<l.length;c++){var f=l[c];e.add(f)}}}},{key:"finalizeFilters",value:function(){!this.enabled&&this.deps.size>0?(this.enabled=!0,It(this.pick,this.deps)):this.enabled&&this.pick.size>0&&It(this.pick,this.deps)}}]),n}(Et),St={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Pt=P(),Ct=function(t){u(n,t);var e=g(n);function n(t){var r;return i(this,n),r=e.call(this),!0===t?r.setupFromTrue():void 0===t?r.setupFromUndefined():Array.isArray(t)?r.setupFromArray(t):"object"==typeof t?r.setupFromObject(t):D("Invalid options argument ".concat(t)),void 0===r.firstChunkSize&&(r.firstChunkSize=k?r.firstChunkSizeBrowser:r.firstChunkSizeNode),r.mergeOutput&&(r.ifd1.enabled=!1),r.filterNestedSegmentTags(),r.traverseTiffDependencyTree(),r.checkLoadedPlugins(),r}return a(n,[{key:"setupFromUndefined",value:function(){var t,e=gt;Array.isArray(e)||("function"==typeof e.entries&&(e=e.entries()),e=w(e));for(var n=0;n<e.length;n++)this[t=e[n]]=St[t];var r=xt;Array.isArray(r)||("function"==typeof r.entries&&(r=r.entries()),r=w(r));for(var i=0;i<r.length;i++)this[t=r[i]]=St[t];var o=At;Array.isArray(o)||("function"==typeof o.entries&&(o=o.entries()),o=w(o));for(var a=0;a<o.length;a++)this[t=o[a]]=St[t];var s=_t;Array.isArray(s)||("function"==typeof s.entries&&(s=s.entries()),s=w(s));for(var u=0;u<s.length;u++)this[t=s[u]]=new Ot(t,St[t],void 0,this)}},{key:"setupFromTrue",value:function(){var t,e=gt;Array.isArray(e)||("function"==typeof e.entries&&(e=e.entries()),e=w(e));for(var n=0;n<e.length;n++)this[t=e[n]]=St[t];var r=xt;Array.isArray(r)||("function"==typeof r.entries&&(r=r.entries()),r=w(r));for(var i=0;i<r.length;i++)this[t=r[i]]=St[t];var o=At;Array.isArray(o)||("function"==typeof o.entries&&(o=o.entries()),o=w(o));for(var a=0;a<o.length;a++)this[t=o[a]]=!0;var s=_t;Array.isArray(s)||("function"==typeof s.entries&&(s=s.entries()),s=w(s));for(var u=0;u<s.length;u++)this[t=s[u]]=new Ot(t,!0,void 0,this)}},{key:"setupFromArray",value:function(t){var e,n=gt;Array.isArray(n)||("function"==typeof n.entries&&(n=n.entries()),n=w(n));for(var r=0;r<n.length;r++)this[e=n[r]]=St[e];var i=xt;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=w(i));for(var o=0;o<i.length;o++)this[e=i[o]]=St[e];var a=At;Array.isArray(a)||("function"==typeof a.entries&&(a=a.entries()),a=w(a));for(var s=0;s<a.length;s++)this[e=a[s]]=St[e];var u=_t;Array.isArray(u)||("function"==typeof u.entries&&(u=u.entries()),u=w(u));for(var l=0;l<u.length;l++)this[e=u[l]]=new Ot(e,!1,void 0,this);this.setupGlobalFilters(t,void 0,bt)}},{key:"setupFromObject",value:function(t){var e;bt.ifd0=bt.ifd0||bt.image,bt.ifd1=bt.ifd1||bt.thumbnail,_(this,t);var n=gt;Array.isArray(n)||("function"==typeof n.entries&&(n=n.entries()),n=w(n));for(var r=0;r<n.length;r++)this[e=n[r]]=kt(t[e],St[e]);var i=xt;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=w(i));for(var o=0;o<i.length;o++)this[e=i[o]]=kt(t[e],St[e]);var a=At;Array.isArray(a)||("function"==typeof a.entries&&(a=a.entries()),a=w(a));for(var s=0;s<a.length;s++)this[e=a[s]]=kt(t[e],St[e]);var u=vt;Array.isArray(u)||("function"==typeof u.entries&&(u=u.entries()),u=w(u));for(var l=0;l<u.length;l++)this[e=u[l]]=new Ot(e,St[e],t[e],this);var c=bt;Array.isArray(c)||("function"==typeof c.entries&&(c=c.entries()),c=w(c));for(var f=0;f<c.length;f++)this[e=c[f]]=new Ot(e,St[e],t[e],this.tiff);this.setupGlobalFilters(t.pick,t.skip,bt,_t),!0===t.tiff?this.batchEnableWithBool(bt,!0):!1===t.tiff?this.batchEnableWithUserValue(bt,t):Array.isArray(t.tiff)?this.setupGlobalFilters(t.tiff,void 0,bt):"object"==typeof t.tiff&&this.setupGlobalFilters(t.tiff.pick,t.tiff.skip,bt)}},{key:"batchEnableWithBool",value:function(t,e){var n=t;Array.isArray(n)||("function"==typeof n.entries&&(n=n.entries()),n=w(n));for(var r=0;r<n.length;r++)this[n[r]].enabled=e}},{key:"batchEnableWithUserValue",value:function(t,e){var n=t;Array.isArray(n)||("function"==typeof n.entries&&(n=n.entries()),n=w(n));for(var r=0;r<n.length;r++){var i=n[r],o=e[i];this[i].enabled=!1!==o&&void 0!==o}}},{key:"setupGlobalFilters",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(t&&t.length){var i=r;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=w(i));for(var o=0;o<i.length;o++)this[i[o]].enabled=!1;var a=Tt(t,n);Array.isArray(a)||("function"==typeof a.entries&&(a=a.entries()),a=w(a));for(var s=0;s<a.length;s++){var u=a[s],l=u[0],c=u[1];It(this[l].pick,c),this[l].enabled=!0}}else if(e&&e.length){var f=Tt(e,n);Array.isArray(f)||("function"==typeof f.entries&&(f=f.entries()),f=w(f));for(var h=0;h<f.length;h++){var p=f[h],d=p[0],m=p[1];It(this[d].skip,m)}}}},{key:"filterNestedSegmentTags",value:function(){var t=this.ifd0,e=this.exif,n=this.xmp,r=this.iptc,i=this.icc;this.makerNote?e.deps.add(lt):e.skip.add(lt),this.userComment?e.deps.add(ct):e.skip.add(ct),n.enabled||t.skip.add(700),r.enabled||t.skip.add(ft),i.enabled||t.skip.add(ht)}},{key:"traverseTiffDependencyTree",value:function(){var t=this,e=this.ifd0,n=this.exif,r=this.gps;this.interop.needed&&(n.deps.add(mt),e.deps.add(mt)),n.needed&&e.deps.add(pt),r.needed&&e.deps.add(dt),this.tiff.enabled=bt.some((function(e){return!0===t[e].enabled}))||this.makerNote||this.userComment;var i=bt;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=w(i));for(var o=0;o<i.length;o++)this[i[o]].finalizeFilters()}},{key:"onlyTiff",get:function(){var t=this;return!yt.map((function(e){return t[e].enabled})).some((function(t){return!0===t}))&&this.tiff.enabled}},{key:"checkLoadedPlugins",value:function(){var t=vt;Array.isArray(t)||("function"==typeof t.entries&&(t=t.entries()),t=w(t));for(var e=0;e<t.length;e++){var n=t[e];this[n].enabled&&!W.has(n)&&V("segment parser",n)}}}],[{key:"useCached",value:function(t){var e=Pt.get(t);return void 0!==e||(e=new this(t),Pt.set(t,e)),e}}]),n}(Et);function Tt(t,e){var n,r,i,o=[],a=e;Array.isArray(a)||("function"==typeof a.entries&&(a=a.entries()),a=w(a));for(var s=0;s<a.length;s++){r=a[s],n=[];var u=at.get(r);Array.isArray(u)||("function"==typeof u.entries&&(u=u.entries()),u=w(u));for(var l=0;l<u.length;l++)i=u[l],(t.includes(i[0])||t.includes(i[1]))&&n.push(i[0]);n.length&&o.push([r,n])}return o}function kt(t,e){return void 0!==t?t:void 0!==e?e:void 0}function It(t,e){var n=e;Array.isArray(n)||("function"==typeof n.entries&&(n=n.entries()),n=w(n));for(var r=0;r<n.length;r++){var i=n[r];t.add(i)}}function Lt(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function jt(){}function Mt(t,e){if(!e)return t&&t.then?t.then(jt):Promise.resolve()}function Rt(t,e){var n=t();return n&&n.then?n.then(e):e(n)}s(Ct,"default",St);var Nt,Dt=function(){function t(e){i(this,t),s(this,"parsers",{}),this.options=Ct.useCached(e)}return a(t,[{key:"setup",value:function(){if(!this.fileParser){var t=this.file,e=t.getUint16(0),n=H;Array.isArray(n)||("function"==typeof n.entries&&(n=n.entries()),n=w(n));for(var r=0;r<n.length;r++){var i=n[r],o=i[0],a=i[1];if(a.canHandle(t,e))return this.fileParser=new a(this.options,this.file,this.parsers),t[o]=!0}D("Unknown file format")}}},{key:"read",value:function(t){try{var e=this;return Lt(function(t,e){return"string"==typeof t?nt(t,e):k&&!I&&t instanceof HTMLImageElement?nt(t.src,e):t instanceof Uint8Array||t instanceof ArrayBuffer||t instanceof DataView?new G(t):k&&t instanceof Blob?tt(t,e,"blob",K):void D(et)}(t,e.options),(function(t){e.file=t}))}catch(t){return Promise.reject(t)}}},{key:"parse",value:function(){try{var t=this;t.setup();var e={},n=[];return Rt((function(){return t.options.silentErrors?Lt(t.doParse(e,n).catch((function(t){return n.push(t)})),(function(){n.push.apply(n,t.fileParser.errors)})):Mt(t.doParse(e,n))}),(function(){return t.file.close&&t.file.close(),t.options.silentErrors&&n.length>0&&(e.errors=n),N(r=e)?void 0:r;var r}))}catch(t){return Promise.reject(t)}}},{key:"doParse",value:function(t,e){try{var n=this;return Lt(n.fileParser.parse(),(function(){var r,i=v(n.parsers).map((r=function(e){return Lt(e.parse(),(function(n){e.assignToOutput(t,n)}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(r.apply(this,t))}catch(t){return Promise.reject(t)}}));if(n.options.silentErrors){var o=function(t){return e.push(t)};i=i.map((function(t){return t.catch(o)}))}return Mt(Promise.all(i))}))}catch(t){return Promise.reject(t)}}},{key:"extractThumbnail",value:function(){try{var t=this;t.setup();var e,n=t.options,r=t.file,i=W.get("tiff",n);return Rt((function(){if(!r.tiff)return function(t){var e=t();if(e&&e.then)return e.then(jt)}((function(){if(r.jpeg)return Lt(t.fileParser.getOrFindSegment("tiff"),(function(t){e=t}))}));e={start:0,type:"tiff"}}),(function(){if(void 0!==e)return Lt(t.fileParser.ensureSegmentChunk(e),(function(e){return Lt((t.parsers.tiff=new i(e,n,r)).extractThumbnail(),(function(t){return r.close&&r.close(),t}))}))}))}catch(t){return Promise.reject(t)}}}]),t}(),Ft=(Nt=function(t,e){var n,r,i,o=new Dt(e);return n=o.read(t),r=function(){return o.parse()},i?r?r(n):n:(n&&n.then||(n=Promise.resolve(n)),r?n.then(r):n)},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(Nt.apply(this,t))}catch(t){return Promise.reject(t)}}),Bt=Object.freeze({__proto__:null,parse:Ft,Exifr:Dt,fileParsers:H,segmentParsers:W,fileReaders:X,tagKeys:at,tagValues:st,tagRevivers:ut,createDictionary:it,extendDictionary:ot,fetchUrlAsArrayBuffer:$,readBlobAsArrayBuffer:K,chunkedProps:gt,otherSegments:yt,segments:vt,tiffBlocks:bt,segmentsAndBlocks:_t,tiffExtractables:At,inheritables:wt,allFormatters:xt,Options:Ct});function zt(){}var Ut=function(){function t(e,n,r){var o=this;i(this,t),s(this,"errors",[]),s(this,"ensureSegmentChunk",function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t){var e,n,r,i=t.start,a=t.size||65536;return e=function(){if(o.file.chunked)return function(t){var e=t();if(e&&e.then)return e.then(zt)}((function(){if(!o.file.available(i,a))return function(t){if(t&&t.then)return t.then(zt)}(function(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}((function(){return e=o.file.readChunk(i,a),n=function(e){t.chunk=e},r?n?n(e):e:(e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e);var e,n,r}),(function(e){D("Couldn't read segment: ".concat(JSON.stringify(t),". ").concat(e.message))})));t.chunk=o.file.subarray(i,a)}));o.file.byteLength>i+a?t.chunk=o.file.subarray(i,a):void 0===t.size?t.chunk=o.file.subarray(i):D("Segment unreachable: "+JSON.stringify(t))},n=function(){return t.chunk},(r=e())&&r.then?r.then(n):n(r)}))),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=n,this.parsers=r}return a(t,[{key:"injectSegment",value:function(t,e){this.options[t].enabled&&this.createParser(t,e)}},{key:"createParser",value:function(t,e){var n=new(W.get(t))(e,this.options,this.file);return this.parsers[t]=n}},{key:"createParsers",value:function(t){var e=t;Array.isArray(e)||("function"==typeof e.entries&&(e=e.entries()),e=w(e));for(var n=0;n<e.length;n++){var r=e[n],i=r.type,o=r.chunk,a=this.options[i];if(a&&a.enabled){var s=this.parsers[i];s&&s.append||s||this.createParser(i,o)}}}},{key:"readSegments",value:function(t){try{var e=t.map(this.ensureSegmentChunk);return function(t,e){return t&&t.then?t.then(zt):Promise.resolve()}(Promise.all(e))}catch(t){return Promise.reject(t)}}}]),t}(),Gt=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;i(this,t),s(this,"errors",[]),s(this,"raw",P()),s(this,"handleError",(function(t){if(!n.options.silentErrors)throw t;n.errors.push(t.message)})),this.chunk=this.normalizeInput(e),this.file=o,this.type=this.constructor.type,this.globalOptions=this.options=r,this.localOptions=r[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}return a(t,[{key:"normalizeInput",value:function(t){return t instanceof G?t:new G(t)}},{key:"translate",value:function(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}},{key:"output",get:function(){return this.translated?this.translated:this.raw?A(this.raw):void 0}},{key:"translateBlock",value:function(t,e){var n=ut.get(e),r=st.get(e),i=at.get(e),o=this.options[e],a=o.reviveValues&&!!n,s=o.translateValues&&!!r,u=o.translateKeys&&!!i,l={},c=t;Array.isArray(c)||("function"==typeof c.entries&&(c=c.entries()),c=w(c));for(var f=0;f<c.length;f++){var h=c[f],p=h[0],d=h[1];a&&n.has(p)?d=n.get(p)(d):s&&r.has(p)&&(d=this.translateValue(d,r.get(p))),u&&i.has(p)&&(p=i.get(p)||p),l[p]=d}return l}},{key:"translateValue",value:function(t,e){return e[t]||e.DEFAULT||t}},{key:"assignToOutput",value:function(t,e){this.assignObjectToOutput(t,this.constructor.type,e)}},{key:"assignObjectToOutput",value:function(t,e,n){if(this.globalOptions.mergeOutput)return _(t,n);t[e]?_(t[e],n):t[e]=n}}],[{key:"findPosition",value:function(t,e){var n=t.getUint16(e+2)+2,r="function"==typeof this.headerLength?this.headerLength(t,e,n):this.headerLength,i=e+r,o=n-r;return{offset:e,length:n,headerLength:r,start:i,size:o,end:i+o}}},{key:"parse",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new this(t,new Ct(s({},this.type,e))).parse()}}]),t}();function Vt(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function qt(){}function Ht(t,e){if(!e)return t&&t.then?t.then(qt):Promise.resolve()}function Wt(t){var e=t();if(e&&e.then)return e.then(qt)}function Xt(t,e){var n=t();return n&&n.then?n.then(e):e(n)}function Yt(t,e,n){if(!t.s){if(n instanceof Zt){if(!n.s)return void(n.o=Yt.bind(null,t,e));1&e&&(e=n.s),n=n.v}if(n&&n.then)return void n.then(Yt.bind(null,t,e),Yt.bind(null,t,2));t.s=e,t.v=n;var r=t.o;r&&r(t)}}s(Gt,"headerLength",4),s(Gt,"type",void 0),s(Gt,"multiSegment",!1),s(Gt,"canHandle",(function(){return!1}));var Zt=function(){function t(){}return t.prototype.then=function(e,n){var r=new t,i=this.s;if(i){var o=1&i?e:n;if(o){try{Yt(r,1,o(this.v))}catch(t){Yt(r,2,t)}return r}return this}return this.o=function(t){try{var i=t.v;1&t.s?Yt(r,1,e?e(i):i):n?Yt(r,1,n(i)):Yt(r,2,i)}catch(t){Yt(r,2,t)}},r},t}();function Kt(t){return t instanceof Zt&&1&t.s}function $t(t,e,n){for(var r;;){var i=t();if(Kt(i)&&(i=i.v),!i)return o;if(i.then){r=0;break}var o=n();if(o&&o.then){if(!Kt(o)){r=1;break}o=o.s}if(e){var a=e();if(a&&a.then&&!Kt(a)){r=2;break}}}var s=new Zt,u=Yt.bind(null,s,2);return(0===r?i.then(c):1===r?o.then(l):a.then(f)).then(void 0,u),s;function l(r){o=r;do{if(e&&(a=e())&&a.then&&!Kt(a))return void a.then(f).then(void 0,u);if(!(i=t())||Kt(i)&&!i.v)return void Yt(s,1,o);if(i.then)return void i.then(c).then(void 0,u);Kt(o=n())&&(o=o.v)}while(!o||!o.then);o.then(l).then(void 0,u)}function c(t){t?(o=n())&&o.then?o.then(l).then(void 0,u):l(o):Yt(s,1,o)}function f(){(i=t())?i.then?i.then(c).then(void 0,u):c(i):Yt(s,1,o)}}function Jt(t){return 192===t||194===t||196===t||219===t||221===t||218===t||254===t}function Qt(t){return t>=224&&t<=239}function te(t,e,n){var r=W;Array.isArray(r)||("function"==typeof r.entries&&(r=r.entries()),r=w(r));for(var i=0;i<r.length;i++){var o=r[i],a=o[0];if(o[1].canHandle(t,e,n))return a}}var ee=function(t){u(n,t);var e=g(n);function n(){var t;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return s(d(t=e.call.apply(e,[this].concat(o))),"appSegments",[]),s(d(t),"jpegSegments",[]),s(d(t),"unknownSegments",[]),t}return a(n,[{key:"parse",value:function(){try{var t=this;return Vt(t.findAppSegments(),(function(){return Vt(t.readSegments(t.appSegments),(function(){t.mergeMultiSegments(),t.createParsers(t.mergedAppSegments||t.appSegments)}))}))}catch(t){return Promise.reject(t)}}},{key:"setupSegmentFinderArgs",value:function(t){var e=this;!0===t?(this.findAll=!0,this.wanted=S(W.keyList())):(t=void 0===t?W.keyList().filter((function(t){return e.options[t].enabled})):t.filter((function(t){return e.options[t].enabled&&W.has(t)})),this.findAll=!1,this.remaining=S(t),this.wanted=S(t)),this.unfinishedMultiSegment=!1}},{key:"findAppSegments",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;try{var n=this;n.setupSegmentFinderArgs(e);var r=n.file,i=n.findAll,o=n.wanted,a=n.remaining;return Xt((function(){if(!i&&n.file.chunked)return i=w(o).some((function(t){var e=W.get(t),r=n.options[t];return e.multiSegment&&r.multiSegment})),Wt((function(){if(i)return Ht(n.file.readWhole())}))}),(function(){var e=!1;if(t=n.findAppSegmentsInRange(t,r.byteLength),!n.options.onlyTiff)return function(){if(r.chunked){var i=!1;return $t((function(){return!e&&a.size>0&&!i&&(!!r.canReadNextChunk||!!n.unfinishedMultiSegment)}),void 0,(function(){var o=r.nextChunkOffset,a=n.appSegments.some((function(t){return!n.file.available(t.offset||t.start,t.length||t.size)}));return Xt((function(){return Vt(t>o&&!a?r.readNextChunk(t):r.readNextChunk(o),(function(t){i=!t}))}),(function(){void 0===(t=n.findAppSegmentsInRange(t,r.byteLength))&&(e=!0)}))}))}}()}))}catch(t){return Promise.reject(t)}}},{key:"findAppSegmentsInRange",value:function(t,e){e-=2;for(var n,r,i,o,a,s,u=this.file,l=this.findAll,c=this.wanted,f=this.remaining,h=this.options;t<e;t++)if(255===u.getUint8(t))if(Qt(n=u.getUint8(t+1))){if(r=u.getUint16(t+2),(i=te(u,t,r))&&c.has(i)&&(a=(o=W.get(i)).findPosition(u,t),s=h[i],a.type=i,this.appSegments.push(a),!l&&(o.multiSegment&&s.multiSegment?(this.unfinishedMultiSegment=a.chunkNumber<a.chunkCount,this.unfinishedMultiSegment||f.delete(i)):f.delete(i),0===f.size)))break;h.recordUnknownSegments&&((a=Gt.findPosition(u,t)).marker=n,this.unknownSegments.push(a)),t+=r+1}else if(Jt(n)){if(r=u.getUint16(t+2),218===n&&!1!==h.stopAfterSos)return;h.recordJpegSegments&&this.jpegSegments.push({offset:t,length:r,marker:n}),t+=r+1}return t}},{key:"mergeMultiSegments",value:function(){var t=this;if(this.appSegments.some((function(t){return t.multiSegment}))){var e=function(t,e){for(var n,r,i,o=P(),a=0;a<t.length;a++)r=(n=t[a])[e],o.has(r)?i=o.get(r):o.set(r,i=[]),i.push(n);return w(o)}(this.appSegments,"type");this.mergedAppSegments=e.map((function(e){var n=e[0],r=e[1],i=W.get(n,t.options);return i.handleMultiSegments?{type:n,chunk:i.handleMultiSegments(r)}:r[0]}))}}},{key:"getSegment",value:function(t){return this.appSegments.find((function(e){return e.type===t}))}},{key:"getOrFindSegment",value:function(t){try{var e=this,n=e.getSegment(t);return Xt((function(){if(void 0===n)return Vt(e.findAppSegments(0,[t]),(function(){n=e.getSegment(t)}))}),(function(){return n}))}catch(t){return Promise.reject(t)}}}],[{key:"canHandle",value:function(t,e){return 65496===e}}]),n}(Ut);function ne(){}function re(t,e){if(!e)return t&&t.then?t.then(ne):Promise.resolve()}function ie(t,e){var n=t();return n&&n.then?n.then(e):e(n)}s(ee,"type","jpeg"),H.set("jpeg",ee);var oe=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4],ae=function(t){u(n,t);var e=g(n);function n(){return i(this,n),e.apply(this,arguments)}return a(n,[{key:"parse",value:function(){try{var t=this;t.parseHeader();var e=t.options;return ie((function(){if(e.ifd0.enabled)return re(t.parseIfd0Block())}),(function(){return ie((function(){if(e.exif.enabled)return re(t.safeParse("parseExifBlock"))}),(function(){return ie((function(){if(e.gps.enabled)return re(t.safeParse("parseGpsBlock"))}),(function(){return ie((function(){if(e.interop.enabled)return re(t.safeParse("parseInteropBlock"))}),(function(){return ie((function(){if(e.ifd1.enabled)return re(t.safeParse("parseThumbnailBlock"))}),(function(){return t.createOutput()}))}))}))}))}))}catch(t){return Promise.reject(t)}}},{key:"safeParse",value:function(t){var e=this[t]();return void 0!==e.catch&&(e=e.catch(this.handleError)),e}},{key:"findIfd0Offset",value:function(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}},{key:"findIfd1Offset",value:function(){if(void 0===this.ifd1Offset){this.findIfd0Offset();var t=this.chunk.getUint16(this.ifd0Offset),e=this.ifd0Offset+2+12*t;this.ifd1Offset=this.chunk.getUint32(e)}}},{key:"parseBlock",value:function(t,e){var n=P();return this[e]=n,this.parseTags(t,e,n),n}},{key:"parseIfd0Block",value:function(){try{var t=this;if(t.ifd0)return;var e=t.file;return t.findIfd0Offset(),t.ifd0Offset<8&&D("Malformed EXIF data"),!e.chunked&&t.ifd0Offset>e.byteLength&&D("IFD0 offset points to outside of file.\nthis.ifd0Offset: ".concat(t.ifd0Offset,", file.byteLength: ").concat(e.byteLength)),ie((function(){if(e.tiff)return re(e.ensureChunk(t.ifd0Offset,F(t.options)))}),(function(){var e=t.parseBlock(t.ifd0Offset,"ifd0");if(0!==e.size)return t.exifOffset=e.get(pt),t.interopOffset=e.get(mt),t.gpsOffset=e.get(dt),t.xmp=e.get(700),t.iptc=e.get(ft),t.icc=e.get(ht),t.options.sanitize&&(e.delete(pt),e.delete(mt),e.delete(dt),e.delete(700),e.delete(ft),e.delete(ht)),e}))}catch(t){return Promise.reject(t)}}},{key:"parseExifBlock",value:function(){try{var t=this;if(t.exif)return;return ie((function(){if(!t.ifd0)return re(t.parseIfd0Block())}),(function(){if(void 0!==t.exifOffset)return ie((function(){if(t.file.tiff)return re(t.file.ensureChunk(t.exifOffset,F(t.options)))}),(function(){var e=t.parseBlock(t.exifOffset,"exif");return t.interopOffset||(t.interopOffset=e.get(mt)),t.makerNote=e.get(lt),t.userComment=e.get(ct),t.options.sanitize&&(e.delete(mt),e.delete(lt),e.delete(ct)),t.unpack(e,41728),t.unpack(e,41729),e}))}))}catch(t){return Promise.reject(t)}}},{key:"unpack",value:function(t,e){var n=t.get(e);n&&1===n.length&&t.set(e,n[0])}},{key:"parseGpsBlock",value:function(){try{var t=this;if(t.gps)return;return ie((function(){if(!t.ifd0)return re(t.parseIfd0Block())}),(function(){if(void 0!==t.gpsOffset){var e=t.parseBlock(t.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",se.apply(void 0,e.get(2).concat([e.get(1)]))),e.set("longitude",se.apply(void 0,e.get(4).concat([e.get(3)])))),e}}))}catch(t){return Promise.reject(t)}}},{key:"parseInteropBlock",value:function(){try{var t=this;if(t.interop)return;return ie((function(){if(!t.ifd0)return re(t.parseIfd0Block())}),(function(){return ie((function(){if(void 0===t.interopOffset&&!t.exif)return re(t.parseExifBlock())}),(function(){if(void 0!==t.interopOffset)return t.parseBlock(t.interopOffset,"interop")}))}))}catch(t){return Promise.reject(t)}}},{key:"parseThumbnailBlock",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var e=this;if(e.ifd1||e.ifd1Parsed)return;if(e.options.mergeOutput&&!t)return;return e.findIfd1Offset(),e.ifd1Offset>0&&(e.parseBlock(e.ifd1Offset,"ifd1"),e.ifd1Parsed=!0),e.ifd1}catch(t){return Promise.reject(t)}}},{key:"extractThumbnail",value:function(){try{var t=this;return t.headerParsed||t.parseHeader(),ie((function(){if(!t.ifd1Parsed)return re(t.parseThumbnailBlock(!0))}),(function(){if(void 0!==t.ifd1){var e=t.ifd1.get(513),n=t.ifd1.get(514);return t.chunk.getUint8Array(e,n)}}))}catch(t){return Promise.reject(t)}}},{key:"image",get:function(){return this.ifd0}},{key:"thumbnail",get:function(){return this.ifd1}},{key:"createOutput",value:function(){var t,e,n,r={},i=bt;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=w(i));for(var o=0;o<i.length;o++)if(!N(t=this[e=i[o]]))if(n=this.canTranslate?this.translateBlock(t,e):A(t),this.options.mergeOutput){if("ifd1"===e)continue;_(r,n)}else r[e]=n;return this.makerNote&&(r.makerNote=this.makerNote),this.userComment&&(r.userComment=this.userComment),r}},{key:"assignToOutput",value:function(t,e){if(this.globalOptions.mergeOutput)_(t,e);else{var n=b(e);Array.isArray(n)||("function"==typeof n.entries&&(n=n.entries()),n=w(n));for(var r=0;r<n.length;r++){var i=n[r],o=i[0],a=i[1];this.assignObjectToOutput(t,o,a)}}}}],[{key:"canHandle",value:function(t,e){return 225===t.getUint8(e+1)&&1165519206===t.getUint32(e+4)&&0===t.getUint16(e+8)}}]),n}(function(t){u(n,t);var e=g(n);function n(){return i(this,n),e.apply(this,arguments)}return a(n,[{key:"parseHeader",value:function(){var t=this.chunk.getUint16();18761===t?this.le=!0:19789===t&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}},{key:"parseTags",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P(),r=this.options[e],i=r.pick,o=r.skip,a=(i=S(i)).size>0,s=0===o.size,u=this.chunk.getUint16(t);t+=2;for(var l=0;l<u;l++){var c=this.chunk.getUint16(t);if(a){if(i.has(c)&&(n.set(c,this.parseTag(t,c,e)),i.delete(c),0===i.size))break}else!s&&o.has(c)||n.set(c,this.parseTag(t,c,e));t+=12}return n}},{key:"parseTag",value:function(t,e,n){var r,i=this.chunk,o=i.getUint16(t+2),a=i.getUint32(t+4),s=oe[o];if(s*a<=4?t+=8:t=i.getUint32(t+8),(o<1||o>13)&&D("Invalid TIFF value type. block: ".concat(n.toUpperCase(),", tag: ").concat(e.toString(16),", type: ").concat(o,", offset ").concat(t)),t>i.byteLength&&D("Invalid TIFF value offset. block: ".concat(n.toUpperCase(),", tag: ").concat(e.toString(16),", type: ").concat(o,", offset ").concat(t," is outside of chunk size ").concat(i.byteLength)),1===o)return i.getUint8Array(t,a);if(2===o)return""===(r=function(t){for(;t.endsWith("\0");)t=t.slice(0,-1);return t}(r=i.getString(t,a)).trim())?void 0:r;if(7===o)return i.getUint8Array(t,a);if(1===a)return this.parseTagValue(o,t);for(var u=new(function(t){switch(t){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}(o))(a),l=s,c=0;c<a;c++)u[c]=this.parseTagValue(o,t),t+=l;return u}},{key:"parseTagValue",value:function(t,e){var n=this.chunk;switch(t){case 1:return n.getUint8(e);case 3:return n.getUint16(e);case 4:case 13:return n.getUint32(e);case 5:return n.getUint32(e)/n.getUint32(e+4);case 6:return n.getInt8(e);case 8:return n.getInt16(e);case 9:return n.getInt32(e);case 10:return n.getInt32(e)/n.getInt32(e+4);case 11:return n.getFloat(e);case 12:return n.getDouble(e);default:D("Invalid tiff type ".concat(t))}}}]),n}(Gt));function se(t,e,n,r){var i=t+e/60+n/3600;return"S"!==r&&"W"!==r||(i*=-1),i}s(ae,"type","tiff"),s(ae,"headerLength",10),W.set("tiff",ae);var ue=Object.freeze({__proto__:null,default:Bt,Exifr:Dt,fileParsers:H,segmentParsers:W,fileReaders:X,tagKeys:at,tagValues:st,tagRevivers:ut,createDictionary:it,extendDictionary:ot,fetchUrlAsArrayBuffer:$,readBlobAsArrayBuffer:K,chunkedProps:gt,otherSegments:yt,segments:vt,tiffBlocks:bt,segmentsAndBlocks:_t,tiffExtractables:At,inheritables:wt,allFormatters:xt,Options:Ct,parse:Ft});function le(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function ce(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}var fe=ce((function(t){var e=new Dt(ye);return le(e.read(t),(function(){return le(e.parse(),(function(t){if(t&&t.ifd0)return t.ifd0[274]}))}))})),he=ce((function(t){var e=new Dt(ge);return le(e.read(t),(function(){return le(e.parse(),(function(t){if(t&&t.gps){var e=t.gps;return{latitude:e.latitude,longitude:e.longitude}}}))}))})),pe=ce((function(t){return le(this.thumbnail(t),(function(t){if(void 0!==t){var e=new Blob([t]);return URL.createObjectURL(e)}}))})),de=ce((function(t){var e=new Dt(ve);return le(e.read(t),(function(){return le(e.extractThumbnail(),(function(t){return t&&M?j.from(t):t}))}))})),me={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},ge=_({},me,{firstChunkSize:4e4,gps:[1,2,3,4]}),ye=_({},me,{firstChunkSize:4e4,ifd0:[274]}),ve=_({},me,{tiff:!1,ifd1:!0,mergeOutput:!1}),be=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(e.rotateCanvas=!0,e.rotateCss=!0,"object"==typeof navigator){var _e=navigator.userAgent;if(_e.includes("iPad")||_e.includes("iPhone")){var Ae=_e.match(/OS (\d+)_(\d+)/);if(Ae){var we=Ae[1],xe=Ae[2],Ee=Number(we)+.1*Number(xe);e.rotateCanvas=Ee<13.4,e.rotateCss=!1}}else if(_e.includes("OS X 10")){var Oe=_e.match(/OS X 10[_.](\d+)/)[1];e.rotateCanvas=e.rotateCss=Number(Oe)<15}if(_e.includes("Chrome/")){var Se=_e.match(/Chrome\/(\d+)/)[1];e.rotateCanvas=e.rotateCss=Number(Se)<81}else if(_e.includes("Firefox/")){var Pe=_e.match(/Firefox\/(\d+)/)[1];e.rotateCanvas=e.rotateCss=Number(Pe)<77}}function Ce(){}var Te=function(t){u(n,t);var e=g(n);function n(){var t;i(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return s(d(t=e.call.apply(e,[this].concat(o))),"ranges",new ke),0!==t.byteLength&&t.ranges.add(0,t.byteLength),t}return a(n,[{key:"_tryExtend",value:function(t,e,n){if(0===t&&0===this.byteLength&&n){var r=new DataView(n.buffer||n,n.byteOffset,n.byteLength);this._swapDataView(r)}else{var i=t+e;if(i>this.byteLength){var o=this._extend(i).dataView;this._swapDataView(o)}}}},{key:"_extend",value:function(t){var e;e=M?j.allocUnsafe(t):new Uint8Array(t);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return e.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:e,dataView:n}}},{key:"subarray",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e=e||this._lengthToEnd(t),r&&this._tryExtend(t,e),this.ranges.add(t,e),y(l(n.prototype),"subarray",this).call(this,t,e)}},{key:"set",value:function(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&this._tryExtend(e,t.byteLength,t);var r=y(l(n.prototype),"set",this).call(this,t,e);return this.ranges.add(e,r.byteLength),r}},{key:"ensureChunk",value:function(t,e){try{var n=this;if(!n.chunked)return;if(n.ranges.available(t,e))return;return function(t,e){return t&&t.then?t.then(Ce):Promise.resolve()}(n.readChunk(t,e))}catch(t){return Promise.reject(t)}}},{key:"available",value:function(t,e){return this.ranges.available(t,e)}}]),n}(G),ke=function(){function t(){i(this,t),s(this,"list",[])}return a(t,[{key:"length",get:function(){return this.list.length}},{key:"add",value:function(t,e){var n=t+e,r=this.list.filter((function(e){return Ie(t,e.offset,n)||Ie(t,e.end,n)}));if(r.length>0){t=Math.min.apply(Math,[t].concat(r.map((function(t){return t.offset})))),e=(n=Math.max.apply(Math,[n].concat(r.map((function(t){return t.end})))))-t;var i=r.shift();i.offset=t,i.length=e,i.end=n,this.list=this.list.filter((function(t){return!r.includes(t)}))}else this.list.push({offset:t,length:e,end:n})}},{key:"available",value:function(t,e){var n=t+e;return this.list.some((function(e){return e.offset<=t&&n<=e.end}))}}]),t}();function Ie(t,e,n){return t<=e&&e<=n}function Le(){}function je(t,e){if(!e)return t&&t.then?t.then(Le):Promise.resolve()}function Me(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}var Re=function(t){u(n,t);var e=g(n);function n(){return i(this,n),e.apply(this,arguments)}return a(n,[{key:"readWhole",value:function(){try{var t=this;return t.chunked=!1,Me(K(t.input),(function(e){t._swapArrayBuffer(e)}))}catch(t){return Promise.reject(t)}}},{key:"readChunked",value:function(){return this.chunked=!0,this.size=this.input.size,y(l(n.prototype),"readChunked",this).call(this)}},{key:"_readChunk",value:function(t,e){try{var n=this,r=e?t+e:void 0,i=n.input.slice(t,r);return Me(K(i),(function(e){return n.set(e,t,!0)}))}catch(t){return Promise.reject(t)}}}]),n}(function(t){u(n,t);var e=g(n);function n(t,r){var o;return i(this,n),s(d(o=e.call(this,0)),"chunksRead",0),o.input=t,o.options=r,o}return a(n,[{key:"readWhole",value:function(){try{var t=this;return t.chunked=!1,je(t.readChunk(t.nextChunkOffset))}catch(t){return Promise.reject(t)}}},{key:"readChunked",value:function(){try{var t=this;return t.chunked=!0,je(t.readChunk(0,t.options.firstChunkSize))}catch(t){return Promise.reject(t)}}},{key:"readNextChunk",value:function(t){try{var e=this;if(void 0===t&&(t=e.nextChunkOffset),e.fullyRead)return e.chunksRead++,!1;var n=e.options.chunkSize;return r=e.readChunk(t,n),i=function(t){return!!t&&t.byteLength===n},o?i?i(r):r:(r&&r.then||(r=Promise.resolve(r)),i?r.then(i):r)}catch(t){return Promise.reject(t)}var r,i,o}},{key:"readChunk",value:function(t,e){try{var n=this;if(n.chunksRead++,0===(e=n.safeWrapAddress(t,e)))return;return n._readChunk(t,e)}catch(t){return Promise.reject(t)}}},{key:"safeWrapAddress",value:function(t,e){return void 0!==this.size&&t+e>this.size?Math.max(0,this.size-t):e}},{key:"nextChunkOffset",get:function(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}},{key:"canReadNextChunk",get:function(){return this.chunksRead<this.options.chunkLimit}},{key:"fullyRead",get:function(){return void 0!==this.size&&this.nextChunkOffset===this.size}},{key:"read",value:function(){return this.options.chunked?this.readChunked():this.readWhole()}},{key:"close",value:function(){}}]),n}(Te));X.set("blob",Re),e.Exifr=Dt,e.Options=Ct,e.allFormatters=xt,e.chunkedProps=gt,e.createDictionary=it,e.default=ue,e.disableAllOptions=me,e.extendDictionary=ot,e.fetchUrlAsArrayBuffer=$,e.fileParsers=H,e.fileReaders=X,e.gps=he,e.gpsOnlyOptions=ge,e.inheritables=wt,e.orientation=fe,e.orientationOnlyOptions=ye,e.otherSegments=yt,e.parse=Ft,e.readBlobAsArrayBuffer=K,e.rotation=function(t){return le(fe(t),(function(t){return _({canvas:e.rotateCanvas,css:e.rotateCss},be[t])}))},e.rotations=be,e.segmentParsers=W,e.segments=vt,e.segmentsAndBlocks=_t,e.tagKeys=at,e.tagRevivers=ut,e.tagValues=st,e.thumbnail=de,e.thumbnailOnlyOptions=ve,e.thumbnailUrl=pe,e.tiffBlocks=bt,e.tiffExtractables=At,Object.defineProperty(e,"__esModule",{value:!0})}(e)}).call(this,n(36),n(68),n(422).Buffer)},function(t,e,n){var r=n(642);t.exports=function(t){if("string"===typeof t){var e=[].slice.call(document.querySelectorAll(t));return e.length>0?e:null}if("object"===typeof t&&r(t))return[t]}},function(t,e,n){var r=n(257),i=n(1286),o=n(941);function a(t,e){var n=e[0];n&&(n.focus(),t.preventDefault())}function s(t,e,n){var s=i(n,e),u=r(s.querySelectorAll(o)),l=u.indexOf(document.activeElement);!function(t){return t.contains(document.activeElement)}(s)?a(t,u):t.shiftKey&&0===l?function(t,e){var n=e[e.length-1];n&&(n.focus(),t.preventDefault())}(t,u):t.shiftKey||l!==u.length-1||a(t,u)}t.exports={forModal:function(t,e,n){s(t,e,n)},forInline:function(t,e,n){null===e||s(t,e,n)}}},function(t,e,n){var r=n(191),i=n(941),o=n(1286);t.exports=function(){var t=!1;return r((function(e,n){var r=o(e,n),a=r.contains(document.activeElement);if(!a||!t){var s=r.querySelector("[data-uppy-super-focusable]");if(!a||s)if(s)s.focus({preventScroll:!0}),t=!0;else{var u=r.querySelector(i);u&&u.focus({preventScroll:!0}),t=!1}}}),260)}},function(t,e){var n=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};t.exports=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r={locale:{strings:{},pluralize:function(t){return 1===t?0:1}}};this.opts=n({},r,e),this.locale=n({},r.locale,e.locale)}return t.prototype.interpolate=function(t,e){var n=String.prototype,r=n.split,i=n.replace,o=/\$/g,a=[t];for(var s in e)if("_"!==s&&e.hasOwnProperty(s)){var u=e[s];"string"===typeof u&&(u=i.call(e[s],o,"$$$$")),a=l(a,new RegExp("%\\{"+s+"\\}","g"),u)}return a;function l(t,e,n){var i=[];return t.forEach((function(t){r.call(t,e).forEach((function(t,e,r){""!==t&&i.push(t),e<r.length-1&&i.push(n)}))})),i}},t.prototype.translate=function(t,e){return this.translateArray(t,e).join("")},t.prototype.translateArray=function(t,e){if(e&&"undefined"!==typeof e.smart_count){var n=this.locale.pluralize(e.smart_count);return this.interpolate(this.opts.locale.strings[t][n],e)}return this.interpolate(this.opts.locale.strings[t],e)},t}()},function(t,e,n){var r=n(1287),i=n(1495),o=n(1496);t.exports={RequestClient:r,Provider:i,Socket:o}},function(t,e,n){"use strict";var r=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},i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=n(1287);t.exports=function(t){function e(n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,t.call(this,n,r));return i.provider=r.provider,i.id=i.provider,i.authProvider=r.authProvider||i.provider,i.name=i.opts.name||i.id.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "),i.tokenKey="companion-"+i.id+"-auth-token",i}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.setAuthToken=function(t){localStorage.setItem(this.tokenKey,t)},e.prototype.checkAuth=function(){return this.get(this.id+"/authorized").then((function(t){return t.authenticated}))},e.prototype.authUrl=function(){return this.hostname+"/"+this.id+"/connect"},e.prototype.fileUrl=function(t){return this.hostname+"/"+this.id+"/get/"+t},e.prototype.list=function(t){return this.get(this.id+"/list/"+(t||""))},e.prototype.logout=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location.href;return this.get(this.id+"/logout?redirect="+e).then((function(e){return localStorage.removeItem(t.tokenKey),e}))},e.initPlugin=function(t,e,n){if(t.type="acquirer",t.files=[],n&&(t.opts=r({},n,e)),e.serverPattern){var i=e.serverPattern;if("string"!==typeof i&&!Array.isArray(i)&&!(i instanceof RegExp))throw new TypeError(t.id+': the option "serverPattern" must be one of string, Array, RegExp');t.opts.serverPattern=i}else/^(?!https?:\/\/).*$/.test(e.serverUrl)?t.opts.serverPattern=location.protocol+"//"+e.serverUrl.replace(/^\/\//,""):t.opts.serverPattern=e.serverUrl},i(e,[{key:"defaultHeaders",get:function(){return r({},t.prototype.defaultHeaders,{"uppy-auth-token":localStorage.getItem(this.tokenKey)})}}]),e}(o)},function(t,e,n){var r=n(438);t.exports=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.queued=[],this.isOpen=!1,this.socket=new WebSocket(e.target),this.emitter=r(),this.socket.onopen=function(t){for(n.isOpen=!0;n.queued.length>0&&n.isOpen;){var e=n.queued[0];n.send(e.action,e.payload),n.queued=n.queued.slice(1)}},this.socket.onclose=function(t){n.isOpen=!1},this._handleMessage=this._handleMessage.bind(this),this.socket.onmessage=this._handleMessage,this.close=this.close.bind(this),this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.once=this.once.bind(this),this.send=this.send.bind(this)}return t.prototype.close=function(){return this.socket.close()},t.prototype.send=function(t,e){this.isOpen?this.socket.send(JSON.stringify({action:t,payload:e})):this.queued.push({action:t,payload:e})},t.prototype.on=function(t,e){this.emitter.on(t,e)},t.prototype.emit=function(t,e){this.emitter.emit(t,e)},t.prototype.once=function(t,e){this.emitter.once(t,e)},t.prototype._handleMessage=function(t){try{var e=JSON.parse(t.data);this.emit(e.action,e.payload)}catch(n){console.log(n)}},t}()},function(t,e,n){var r=n(235);t.exports=r((function(t,e,n){var r=e.progress,i=e.bytesUploaded,o=e.bytesTotal;r&&(t.uppy.log("Upload progress: "+r),t.uppy.emit("upload-progress",n,{uploader:t,bytesUploaded:i,bytesTotal:o}))}),300,{leading:!0,trailing:!0})},function(t,e){t.exports=function(t){var e=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/.exec(t)[1];return("https:"===location.protocol?"wss":"ws")+"://"+e}},function(t,e){t.exports=function(t){var e=[],n=[];function r(t){e.push(t)}function i(t){n.push(t)}return Promise.all(t.map((function(t){return t.then(r,i)}))).then((function(){return{successful:e,failed:n}}))}},function(t,e){t.exports=function(t){var e=0,n=[];return function(i){return function(){for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=function(){e++;var t=i.apply(void 0,a);return t.then(r,r),t};return e>=t?new Promise((function(t,e){n.push((function(){u().then(t,e)}))})):u()}};function r(){e--;var t=n.shift();t&&t()}}},function(t,e,n){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e,n){"use strict";function r(t){var e=o(document.head,'meta[name="'+t+'"]');if(e)return e.getAttribute("content")}function i(t,e){return"string"==typeof t&&(e=t,t=document),s(t.querySelectorAll(e))}function o(t,e){return"string"==typeof t&&(e=t,t=document),t.querySelector(e)}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.disabled,i=n.bubbles,o=n.cancelable,a=n.detail,s=document.createEvent("Event");s.initEvent(e,i||!0,o||!0),s.detail=a||{};try{t.disabled=!1,t.dispatchEvent(s)}finally{t.disabled=r}return s}function s(t){return Array.isArray(t)?t:Array.from?Array.from(t):[].slice.call(t)}e.d=r,e.c=i,e.b=o,e.a=a,e.e=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(t&&"function"==typeof t[e]){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return t[e].apply(t,r)}}n.d(e,"a",(function(){return c}));var o=n(6),a=n(8),s=n(9),u=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=0,c=function(){function t(e,n,i){r(this,t),this.id=++l,this.file=e,this.url=n,this.delegate=i}return u(t,[{key:"create",value:function(t){var e=this;o.a.create(this.file,(function(n,r){if(n)t(n);else{var o=new a.a(e.file,r,e.url);i(e.delegate,"directUploadWillCreateBlobWithXHR",o.xhr),o.create((function(n){if(n)t(n);else{var r=new s.a(o);i(e.delegate,"directUploadWillStoreFileWithXHR",r.xhr),r.create((function(e){e?t(e):t(null,o.toJSON())}))}}))}}))}}]),t}()},function(t,e,n){"use strict";function r(){window.ActiveStorage&&Object(i.a)()}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(1);n.d(e,"start",(function(){return i.a})),n.d(e,"DirectUpload",(function(){return o.a})),setTimeout(r,1)},function(t,e,n){"use strict";function r(){p||(p=!0,document.addEventListener("submit",i),document.addEventListener("ajax:before",o))}function i(t){a(t)}function o(t){"FORM"==t.target.tagName&&a(t)}function a(t){var e=t.target;if(e.hasAttribute(h))t.preventDefault();else{var n=new c.a(e),r=n.inputs;r.length&&(t.preventDefault(),e.setAttribute(h,""),r.forEach(u),n.start((function(t){e.removeAttribute(h),t?r.forEach(l):s(e)})))}}function s(t){var e=Object(f.b)(t,"input[type=submit]");if(e){var n=e.disabled;e.disabled=!1,e.focus(),e.click(),e.disabled=n}else(e=document.createElement("input")).type="submit",e.style.display="none",t.appendChild(e),e.click(),t.removeChild(e)}function u(t){t.disabled=!0}function l(t){t.disabled=!1}e.a=r;var c=n(4),f=n(0),h="data-direct-uploads-processing",p=!1},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return u}));var i=n(5),o=n(0),a=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s="input[type=file][data-direct-upload-url]:not([disabled])",u=function(){function t(e){r(this,t),this.form=e,this.inputs=Object(o.c)(e,s).filter((function(t){return t.files.length}))}return a(t,[{key:"start",value:function(t){var e=this,n=this.createDirectUploadControllers();this.dispatch("start"),function r(){var i=n.shift();i?i.start((function(n){n?(t(n),e.dispatch("end")):r()})):(t(),e.dispatch("end"))}()}},{key:"createDirectUploadControllers",value:function(){var t=[];return this.inputs.forEach((function(e){Object(o.e)(e.files).forEach((function(n){var r=new i.a(e,n);t.push(r)}))})),t}},{key:"dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(this.form,"direct-uploads:"+t,{detail:e})}}]),t}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return s}));var i=n(1),o=n(0),a=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(){function t(e,n){r(this,t),this.input=e,this.file=n,this.directUpload=new i.a(this.file,this.url,this),this.dispatch("initialize")}return a(t,[{key:"start",value:function(t){var e=this,n=document.createElement("input");n.type="hidden",n.name=this.input.name,this.input.insertAdjacentElement("beforebegin",n),this.dispatch("start"),this.directUpload.create((function(r,i){r?(n.parentNode.removeChild(n),e.dispatchError(r)):n.value=i.signed_id,e.dispatch("end"),t(r)}))}},{key:"uploadRequestDidProgress",value:function(t){var e=t.loaded/t.total*100;e&&this.dispatch("progress",{progress:e})}},{key:"dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.file=this.file,e.id=this.directUpload.id,Object(o.a)(this.input,"direct-upload:"+t,{detail:e})}},{key:"dispatchError",value:function(t){this.dispatch("error",{error:t}).defaultPrevented||alert(t)}},{key:"directUploadWillCreateBlobWithXHR",value:function(t){this.dispatch("before-blob-request",{xhr:t})}},{key:"directUploadWillStoreFileWithXHR",value:function(t){var e=this;this.dispatch("before-storage-request",{xhr:t}),t.upload.addEventListener("progress",(function(t){return e.uploadRequestDidProgress(t)}))}},{key:"url",get:function(){return this.input.getAttribute("data-direct-upload-url")}}]),t}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return u}));var i=n(7),o=n.n(i),a=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,u=function(){function t(e){r(this,t),this.file=e,this.chunkSize=2097152,this.chunkCount=Math.ceil(this.file.size/this.chunkSize),this.chunkIndex=0}return a(t,null,[{key:"create",value:function(e,n){new t(e).create(n)}}]),a(t,[{key:"create",value:function(t){var e=this;this.callback=t,this.md5Buffer=new o.a.ArrayBuffer,this.fileReader=new FileReader,this.fileReader.addEventListener("load",(function(t){return e.fileReaderDidLoad(t)})),this.fileReader.addEventListener("error",(function(t){return e.fileReaderDidError(t)})),this.readNextChunk()}},{key:"fileReaderDidLoad",value:function(t){if(this.md5Buffer.append(t.target.result),!this.readNextChunk()){var e=this.md5Buffer.end(!0),n=btoa(e);this.callback(null,n)}}},{key:"fileReaderDidError",value:function(t){this.callback("Error reading "+this.file.name)}},{key:"readNextChunk",value:function(){if(this.chunkIndex<this.chunkCount||0==this.chunkIndex&&0==this.chunkCount){var t=this.chunkIndex*this.chunkSize,e=Math.min(t+this.chunkSize,this.file.size),n=s.call(this.file,t,e);return this.fileReader.readAsArrayBuffer(n),this.chunkIndex++,!0}return!1}}]),t}()},function(t,e,n){!function(e){t.exports=e()}((function(t){"use strict";function e(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function n(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function i(t){var r,i,o,a,s,u,l=t.length,c=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=l;r+=64)e(c,n(t.substring(r-64,r)));for(i=(t=t.substring(r-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<i;r+=1)o[r>>2]|=t.charCodeAt(r)<<(r%4<<3);if(o[r>>2]|=128<<(r%4<<3),r>55)for(e(c,o),r=0;r<16;r+=1)o[r]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,e(c,o),c}function o(t){var n,i,o,a,s,u,l=t.length,c=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=l;n+=64)e(c,r(t.subarray(n-64,n)));for(i=(t=n-64<l?t.subarray(n-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0;n<i;n+=1)o[n>>2]|=t[n]<<(n%4<<3);if(o[n>>2]|=128<<(n%4<<3),n>55)for(e(c,o),n=0;n<16;n+=1)o[n]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,e(c,o),c}function a(t){var e,n="";for(e=0;e<4;e+=1)n+=d[t>>8*e+4&15]+d[t>>8*e&15];return n}function s(t){var e;for(e=0;e<t.length;e+=1)t[e]=a(t[e]);return t.join("")}function u(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function c(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function f(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function h(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}var d=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return s(i("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,l=e(n,u),c=u;return r!==t&&(c=e(r,u)),l>c?new ArrayBuffer(0):(i=c-l,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,l,i),a.set(s),o)}}(),p.prototype.append=function(t){return this.appendBinary(u(t)),this},p.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var r,i=this._buff.length;for(r=64;r<=i;r+=64)e(this._hash,n(this._buff.substring(r-64,r)));return this._buff=this._buff.substring(r-64),this},p.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=s(this._hash),t&&(n=h(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},p.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(t,n){var r,i,o,a=n;if(t[a>>2]|=128<<(a%4<<3),a>55)for(e(this._hash,t),a=0;a<16;a+=1)t[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,e(this._hash,t)},p.hash=function(t,e){return p.hashBinary(u(t),e)},p.hashBinary=function(t,e){var n=s(i(t));return e?h(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(t){var n,i=f(this._buff.buffer,t,!0),o=i.length;for(this._length+=t.byteLength,n=64;n<=o;n+=64)e(this._hash,r(i.subarray(n-64,n)));return this._buff=n-64<o?new Uint8Array(i.buffer.slice(n-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=s(this._hash),t&&(n=h(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var t=p.prototype.getState.call(this);return t.buff=c(t.buff),t},p.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),p.prototype.setState.call(this,t)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(t,e){var n=s(o(new Uint8Array(t)));return e?h(n):n},p}))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return a}));var i=n(0),o=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(e,n,o){var a=this;r(this,t),this.file=e,this.attributes={filename:e.name,content_type:e.type,byte_size:e.size,checksum:n},this.xhr=new XMLHttpRequest,this.xhr.open("POST",o,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.xhr.setRequestHeader("X-CSRF-Token",Object(i.d)("csrf-token")),this.xhr.addEventListener("load",(function(t){return a.requestDidLoad(t)})),this.xhr.addEventListener("error",(function(t){return a.requestDidError(t)}))}return o(t,[{key:"create",value:function(t){this.callback=t,this.xhr.send(JSON.stringify({blob:this.attributes}))}},{key:"requestDidLoad",value:function(t){if(this.status>=200&&this.status<300){var e=this.response,n=e.direct_upload;delete e.direct_upload,this.attributes=e,this.directUploadData=n,this.callback(null,this.toJSON())}else this.requestDidError(t)}},{key:"requestDidError",value:function(t){this.callback('Error creating Blob for "'+this.file.name+'". Status: '+this.status)}},{key:"toJSON",value:function(){var t={};for(var e in this.attributes)t[e]=this.attributes[e];return t}},{key:"status",get:function(){return this.xhr.status}},{key:"response",get:function(){var t=this.xhr,e=t.responseType,n=t.response;return"json"==e?n:JSON.parse(n)}}]),t}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return o}));var i=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){var n=this;r(this,t),this.blob=e,this.file=e.file;var i=e.directUploadData,o=i.url,a=i.headers;for(var s in this.xhr=new XMLHttpRequest,this.xhr.open("PUT",o,!0),this.xhr.responseType="text",a)this.xhr.setRequestHeader(s,a[s]);this.xhr.addEventListener("load",(function(t){return n.requestDidLoad(t)})),this.xhr.addEventListener("error",(function(t){return n.requestDidError(t)}))}return i(t,[{key:"create",value:function(t){this.callback=t,this.xhr.send(this.file.slice())}},{key:"requestDidLoad",value:function(t){var e=this.xhr,n=e.status,r=e.response;n>=200&&n<300?this.callback(null,r):this.requestDidError(t)}},{key:"requestDidError",value:function(t){this.callback('Error storing "'+this.file.name+'". Status: '+this.xhr.status)}}]),t}()}])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeCircleMode=void 0;var r=f(n(427)),i=n(60),o=f(n(346)),a=f(n(237)),s=f(n(224)),u=n(157),l=n(112),c=n(258);function f(t){return t&&t.__esModule?t:{default:t}}function h(t){return h="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},h(t)}function p(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return d(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(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.")}()}function d(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 m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(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 y(t,e){return!e||"object"!==h(e)&&"function"!==typeof e?v(t):e}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(){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}}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}function w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var x=function(t){!function(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&&A(t,e)}(d,t);var e,n,l,f,h=(e=d,function(){var t,n=_(e);if(b()){var r=_(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return y(this,t)});function d(){var t;m(this,d);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return w(v(t=h.call.apply(h,[this].concat(n))),"_selectedEditHandle",void 0),w(v(t),"_isResizing",!1),t}return n=d,(l=[{key:"getGuides",value:function(t){var e=this,n=[],r=t.selectedIndexes,o=t.lastPointerMoveEvent,a=o&&o.picks,s=o&&o.mapCoords;if(a&&a.length&&s&&1===r.length&&!this._isResizing){var l=a.find((function(t){return!t.isGuide}));if(l&&l.object.properties.shape&&l.object.properties.shape.includes("Circle")&&t.selectedIndexes.includes(l.index)){var c=null,f=[],h=(0,i.point)(s);if((0,u.recursivelyTraverseNestedArrays)(l.object.geometry.coordinates,[],(function(n,r){var o=(0,i.lineString)(n),a=e.nearestPointOnLine(o,h,t.modeConfig&&t.modeConfig.viewport);(!c||a.properties.dist<c.properties.dist)&&(c=a,f=r)})),c){var d=c,m=d.geometry.coordinates,g=d.properties.index;n.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:l.index,positionIndexes:[].concat(p(f),[g+1])},geometry:{type:"Point",coordinates:m}})}}}return{type:"FeatureCollection",features:n}}},{key:"nearestPointOnLine",value:function(t,e,n){if(t.geometry.coordinates.some((function(t){return t.length>2}))){if(n)return(0,u.nearestPointOnProjectedLine)(t,e,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,r.default)(t,e)}},{key:"handleDragging",value:function(t,e){var n=(0,u.getPickedEditHandle)(t.pointerDownPicks);if(n){t.cancelPan();var r=n.properties,i=this.getSelectedFeature(e),l=(0,s.default)(i).geometry.coordinates,f=Object.entries(i.geometry.coordinates[0]).length-1,h=Math.max((0,a.default)(l,t.mapCoords),.001),p={}.steps,d={steps:void 0===p?f:p},m=(0,o.default)(l,h,d).geometry,g=new c.ImmutableFeatureCollection(e.data).replaceGeometry(r.featureIndex,m).getObject();e.onEdit({updatedData:g,editType:"unionGeometry",editContext:{featureIndexes:[r.featureIndex]}})}}},{key:"handlePointerMove",value:function(t,e){if(!this._isResizing){var n=(0,u.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"intermediate"===n.properties.editHandleType?n:null}var r=this.getCursor(t);e.onUpdateCursor(r)}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isResizing=!0)}},{key:"handleStopDragging",value:function(t,e){this._isResizing&&(this._selectedEditHandle=null,this._isResizing=!1)}},{key:"getCursor",value:function(t){var e=t&&t.picks||[];return(0,u.getPickedEditHandles)(e).length?"cell":null}}])&&g(n.prototype,l),f&&g(n,f),d}(l.GeoJsonEditMode);e.ResizeCircleMode=x},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DuplicateMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"handleStartDragging",value:function(t,e){a(l(p.prototype),"handleStartDragging",this).call(this,t,e),this._geometryBeforeTranslate&&e.onEdit(this.getAddManyFeaturesAction(this._geometryBeforeTranslate,e.data))}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("copy"):t.onUpdateCursor(null)}}])&&o(n.prototype,r),f&&o(n,f),p}(n(943).TranslateMode);e.DuplicateMode=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendLineStringMode=void 0;var r=n(112),i=n(258);function o(t){return o="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},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var h=function(t){!function(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&&f(t,e)}(p,t);var e,n,r,o,h=(e=p,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function p(){return a(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"getSingleSelectedLineString",value:function(t){var e=this.getSelectedGeometry(t);return e&&"LineString"===e.type?e:null}},{key:"handleClick",value:function(t,e){var n=e.selectedIndexes,r=this.getSingleSelectedLineString(e);if(r){var o=[r.coordinates.length],a=e.modeConfig;a&&a.drawAtFront&&(o=[0]);var s=n[0],u=new i.ImmutableFeatureCollection(e.data).addPosition(s,o,t.mapCoords).getObject();e.onEdit({updatedData:u,editType:"addPosition",editContext:{featureIndexes:[s],positionIndexes:o,position:t.mapCoords}})}else console.warn("ExtendLineStringMode only supported for single LineString selection")}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},n=this.getSingleSelectedLineString(t);if(!n)return e;var r=t.lastPointerMoveEvent&&t.lastPointerMoveEvent.mapCoords,i=null,o=t.modeConfig;return i=o&&o.drawAtFront?n.coordinates[0]:n.coordinates[n.coordinates.length-1],e.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[i,r]}}),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&s(n.prototype,r),o&&s(n,o),p}(r.GeoJsonEditMode);e.ExtendLineStringMode=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPolygonMode=void 0;var r=g(n(1506)),i=g(n(331)),o=g(n(440)),a=g(n(260)),s=n(60),u=g(n(89)),l=g(n(237)),c=g(n(151)),f=g(n(345)),h=g(n(427)),p=n(157),d=n(112),m=n(258);function g(t){return t&&t.__esModule?t:{default:t}}function y(t){return y="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},y(t)}function v(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||_(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.")}()}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||_(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){if(t){if("string"===typeof t)return A(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function A(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 w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(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 E(t,e){return!e||"object"!==y(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function O(){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}}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function P(t,e){return P=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},P(t,e)}var C=function(t){!function(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&&P(t,e)}(_,t);var e,n,d,g,y=(e=_,function(){var t,n=S(e);if(O()){var r=S(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return E(this,t)});function _(){return w(this,_),y.apply(this,arguments)}return n=_,(d=[{key:"calculateMapCoords",value:function(t,e,n){var r=n.modeConfig;if(!r||!r.lock90Degree||!t.length)return e;if(1===t.length){var i=t[0],o=this.getSelectedGeometry(n),a=(0,f.default)(o),d="FeatureCollection"===a.type?a.features:[a],m=Number.MAX_SAFE_INTEGER,g=null;if(d.forEach((function(t){var e=(0,h.default)(t,i),n=(0,l.default)(e,i);m>n&&(m=n,g=e)})),g){var y=(0,u.default)(i,g),v=(0,l.default)(i,e,{units:"meters"});return(0,c.default)(i,v,y,{units:"meters"}).geometry.coordinates}return e}var _=t[t.length-1],A=b((0,p.generatePointsParallelToLinePoints)(t[t.length-2],_,e),1)[0];return(0,h.default)((0,s.lineString)([_,A]),e).geometry.coordinates}},{key:"getGuides",value:function(t){var e=this.getClickSequence(),n={type:"FeatureCollection",features:[]};if(0===e.length||!t.lastPointerMoveEvent)return n;var r=t.lastPointerMoveEvent.mapCoords;return n.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(v(e),[this.calculateMapCoords(e,r,t)])}}),n}},{key:"handleClick",value:function(t,e){var n=this.getTentativeGuide(e),i=this.getSelectedGeometry(e);if(i){var o=this.getClickSequence();n&&"LineString"===n.geometry.type?o.push(n.geometry.coordinates[n.geometry.coordinates.length-1]):this.addClickSequence(t);var s={type:"Point",coordinates:o[o.length-1]},u=(0,r.default)(s,i);if(o.length>1&&n&&!u){if(this.resetClickSequence(),0===(0,a.default)(n,i).features.length)return;var l=this.splitPolygon(n,e);l&&e.onEdit(l)}}else console.warn("A polygon must be selected for splitting")}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"splitPolygon",value:function(t,e){var n=this.getSelectedGeometry(e),r=e.selectedIndexes[0],a=e.modeConfig||{},s=a.gap,u=void 0===s?.1:s,l=a.units,c=void 0===l?"centimeters":l;0===u&&(u=.1,c="centimeters");var f=(0,o.default)(t,u,{units:c}),h=(0,i.default)(n,f);if(!h)return console.warn("Canceling edit. Split Polygon erased"),null;var p=h.geometry,d=p.type,g=p.coordinates,y=[];return y="Polygon"===d?g.map((function(t){return[t]})):g.reduce((function(t,e){return e.forEach((function(e){t.push([e])})),t}),[]),{updatedData:new m.ImmutableFeatureCollection(e.data).replaceGeometry(r,{type:"MultiPolygon",coordinates:y}).getObject(),editType:"split",editContext:{featureIndexes:[r]}}}}])&&x(n.prototype,d),g&&x(n,g),_}(d.GeoJsonEditMode);e.SplitPolygonMode=C},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return i}));var r=n(370);function i(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=Object(r.getCoord)(t),a=Object(r.getGeom)(e),s=a.type,u=e.bbox,l=a.coordinates;if(u&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(i,u))return!1;"Polygon"===s&&(l=[l]);for(var c=!1,f=0;f<l.length&&!c;f++)if(o(i,l[f][0],n.ignoreBoundary)){for(var h=!1,p=1;p<l[f].length&&!h;)o(i,l[f][p],!n.ignoreBoundary)&&(h=!0),p++;h||(c=!0)}return c}function o(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],u=e[o][0],l=e[o][1];if(t[1]*(a-u)+s*(u-t[0])+l*(t[0]-a)===0&&(a-t[0])*(u-t[0])<=0&&(s-t[1])*(l-t[1])<=0)return!n;s>t[1]!==l>t[1]&&t[0]<(u-a)*(t[1]-s)/(l-s)+a&&(r=!r)}return r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtrudeMode=void 0;var r,i=(r=n(89))&&r.__esModule?r:{default:r},o=n(157),a=n(942),s=n(258);function u(t){return u="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},u(t)}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(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.")}()}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"===typeof t)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(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 p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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 m(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?g(t):e}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(){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}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=function(t){!function(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&&b(t,e)}(f,t);var e,n,r,a,u=(e=f,function(){var t,n=v(e);if(y()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return m(this,t)});function f(){var t;p(this,f);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _(g(t=u.call.apply(u,[this].concat(n))),"isPointAdded",!1),t}return n=f,(r=[{key:"handleDragging",value:function(t,e){var n=(0,o.getPickedEditHandle)(t.pointerDownPicks);if(n){var r=n.properties.featureIndex,i=n.properties.positionIndexes,a=this.coordinatesSize(i,r,e.data);i=this.isPointAdded?this.nextPositionIndexes(i,a):i;var u=this.getPointForPositionIndexes(this.prevPositionIndexes(i,a),r,e.data),l=this.getPointForPositionIndexes(i,r,e.data);if(u&&l){var f=c((0,o.generatePointsParallelToLinePoints)(u,l,t.mapCoords),2),h=f[0],p=f[1],d=new s.ImmutableFeatureCollection(e.data).replacePosition(r,this.prevPositionIndexes(i,a),p).replacePosition(r,i,h).getObject();e.onEdit({updatedData:d,editType:"extruding",editContext:{featureIndexes:[r],positionIndexes:this.nextPositionIndexes(i,a),position:h}}),t.cancelPan()}}}},{key:"handleStartDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,o.getPickedIntermediateEditHandle)(t.picks);if(n.length&&r){var i=r.properties,a=i.positionIndexes,u=i.featureIndex,l=this.coordinatesSize(a,u,e.data),c=this.getPointForPositionIndexes(this.prevPositionIndexes(a,l),u,e.data),f=this.getPointForPositionIndexes(a,u,e.data);if(c&&f){var h=new s.ImmutableFeatureCollection(e.data);this.isOrthogonal(a,u,l,e.data)||(h=h.addPosition(u,a,f)),this.isOrthogonal(this.prevPositionIndexes(a,l),u,l,e.data)||(h=h.addPosition(u,a,c),this.isPointAdded=!0),e.onEdit({updatedData:h.getObject(),editType:"startExtruding",editContext:{featureIndexes:[u],positionIndexes:a,position:c}})}}}},{key:"handleStopDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,o.getPickedEditHandle)(t.pointerDownPicks);if(n.length&&r){var i=r.properties.featureIndex,a=r.properties.positionIndexes,u=this.coordinatesSize(a,i,e.data);a=this.isPointAdded?this.nextPositionIndexes(a,u):a;var l=this.getPointForPositionIndexes(this.prevPositionIndexes(a,u),i,e.data),f=this.getPointForPositionIndexes(a,i,e.data);if(l&&f){var h=c((0,o.generatePointsParallelToLinePoints)(l,f,t.mapCoords),2),p=h[0],d=h[1],m=new s.ImmutableFeatureCollection(e.data).replacePosition(i,this.prevPositionIndexes(a,u),d).replacePosition(i,a,p).getObject();e.onEdit({updatedData:m,editType:"extruded",editContext:{featureIndexes:[i],positionIndexes:a,position:p}})}}this.isPointAdded=!1}},{key:"coordinatesSize",value:function(t,e,n){var r=n.features,i=0;if(Array.isArray(t)){var o=r[e].geometry.coordinates;if(3===t.length){var a=c(t,2),s=a[0],u=a[1];o.length&&o[s].length&&(i=o[s][u].length)}else{var l=c(t,1)[0];o.length&&o[l].length&&(i=o[l].length)}}return i}},{key:"getBearing",value:function(t,e){var n=(0,i.default)(t,e);return n<0?Math.floor(360+n):Math.floor(n)}},{key:"isOrthogonal",value:function(t,e,n,r){if(!Array.isArray(t))return!1;t[t.length-1]===n-1&&(t[t.length-1]=0);var i=this.getPointForPositionIndexes(this.prevPositionIndexes(t,n),e,r),o=this.getPointForPositionIndexes(this.nextPositionIndexes(t,n),e,r),a=this.getPointForPositionIndexes(t,e,r),s=this.getBearing(a,i),u=this.getBearing(a,o);return[89,90,91,269,270,271].includes(Math.abs(s-u))}},{key:"nextPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var n=l(t);return n.length&&(n[n.length-1]=n[n.length-1]===e-1?0:n[n.length-1]+1),n}},{key:"prevPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var n=l(t);return n.length&&(n[n.length-1]=0===n[n.length-1]?e-2:n[n.length-1]-1),n}},{key:"getPointForPositionIndexes",value:function(t,e,n){var r,i=n.features;if(Array.isArray(t)){var o=i[e].geometry.coordinates;if(3===t.length){var a=c(t,3),s=a[0],u=a[1],l=a[2];o.length&&o[s].length&&(r=o[s][u][l])}else{var f=c(t,2),h=f[0],p=f[1];o.length&&o[h].length&&(r=o[h][p])}}return r}}])&&d(n.prototype,r),a&&d(n,a),f}(a.ModifyMode);e.ExtrudeMode=A},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElevationMode=void 0;var r=n(157);function i(t){return i="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},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 s(t,e,n){return s="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},s(t,e,n||t)}function u(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){var e=t.pointerDownScreenCoords,n=t.screenCoords;return 10*(e[1]-n[1])}var p=function(t){!function(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&&f(t,e)}(m,t);var e,n,i,p,d=(e=m,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function m(){return o(this,m),d.apply(this,arguments)}return n=m,p=[{key:"calculateElevationChangeWithViewport",value:function(t,e){var n=e.pointerDownScreenCoords,r=e.screenCoords;return 156543.03392*Math.cos(t.latitude*Math.PI/180)/Math.pow(2,t.zoom)*(n[1]-r[1])/2}}],(i=[{key:"makeElevatedEvent",value:function(t,e,n){var r=n.modeConfig||{},i=r.minElevation,o=void 0===i?0:i,a=r.maxElevation,s=void 0===a?2e4:a,u=r.calculateElevationChange,l=void 0===u?h:u;if(!t.pointerDownScreenCoords)return t;var c=3===e.length?e[2]:0;return c+=l({pointerDownScreenCoords:t.pointerDownScreenCoords,screenCoords:t.screenCoords}),c=Math.min(c,s),c=Math.max(c,o),Object.assign({},t,{mapCoords:[e[0],e[1],c]})}},{key:"handlePointerMove",value:function(t,e){var n=(0,r.getPickedEditHandle)(t.pointerDownPicks),i=n?n.geometry.coordinates:t.mapCoords;s(c(m.prototype),"handlePointerMove",this).call(this,this.makeElevatedEvent(t,i,e),e)}},{key:"handleStopDragging",value:function(t,e){var n=(0,r.getPickedEditHandle)(t.picks),i=n?n.geometry.coordinates:t.mapCoords;s(c(m.prototype),"handleStopDragging",this).call(this,this.makeElevatedEvent(t,i,e),e)}},{key:"getCursor",value:function(t){var e=s(c(m.prototype),"getCursor",this).call(this,t);return"cell"===e&&(e="ns-resize"),e}}])&&a(n.prototype,i),p&&a(n,p),m}(n(942).ModifyMode);e.ElevationMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransformMode=void 0;var r=n(60),i=n(943),o=n(1292),a=n(1294);function s(t){return s="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},s(t)}function u(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 l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(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 f(t,e,n){return f="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},f(t,e,n||t)}function h(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t){!function(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&&m(t,e)}(v,t);var e,n,s,g,y=(e=v,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function v(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),y.call(this,[new i.TranslateMode,new o.ScaleMode,new a.RotateMode])}return n=v,s=[{key:"handlePointerMove",value:function(t,e){var n=null;f(d(v.prototype),"handlePointerMove",this).call(this,t,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{onUpdateCursor:function(t){n=t||n}})),e.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(t,e){var n=null,r=null,a=[];this._modes.forEach((function(t){t instanceof i.TranslateMode?r=t:(t instanceof o.ScaleMode&&(n=t),a.push(t))})),n instanceof o.ScaleMode&&!n.isEditHandleSelected()&&a.push(r),a.filter(Boolean).forEach((function(n){return n.handleStartDragging(t,e)}))}},{key:"getGuides",value:function(t){var e=f(d(v.prototype),"getGuides",this).call(this,t),n=(this._modes||[]).find((function(t){return t instanceof a.RotateMode}));if(n instanceof a.RotateMode){var i=e.features.filter((function(t){var e=t.properties||{},r=e.editHandleType,i=[e.mode];return n.getIsRotating()&&i.push(r),!i.includes("scale")}));e=(0,r.featureCollection)(i)}return e}}],s&&c(n.prototype,s),g&&c(n,g),v}(n(1295).CompositeMode);e.TransformMode=g},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 a(t,e,n){return a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(){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}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPointMode=void 0;var f=function(t){!function(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&&c(t,e)}(p,t);var e,n,r,f,h=(e=p,function(){var t,n=l(e);if(u()){var r=l(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return s(this,t)});function p(){return i(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"createTentativeFeature",value:function(t){var e=t.lastPointerMoveEvent;return{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Point",coordinates:(e?[e.mapCoords]:[])[0]}}}},{key:"handleClick",value:function(t,e){var n={type:"Point",coordinates:t.mapCoords};e.onEdit(this.getAddFeatureAction(n,e.data))}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),a(l(p.prototype),"handlePointerMove",this).call(this,t,e)}}])&&o(n.prototype,r),f&&o(n,f),p}(n(112).GeoJsonEditMode);e.DrawPointMode=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawLineStringMode=void 0;var r=n(157);function i(t){return i="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},i(t)}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return a(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(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.")}()}function a(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 s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,i,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)});function d(){return s(this,d),p.apply(this,arguments)}return n=d,(i=[{key:"handleClick",value:function(t,e){var n=t.picks,i=(0,r.getPickedEditHandle)(n),a=!1;i||(this.addClickSequence(t),a=!0);var s=this.getClickSequence();if(s.length>1&&i&&Array.isArray(i.properties.positionIndexes)&&i.properties.positionIndexes[0]===s.length-1){var u={type:"LineString",coordinates:o(s)};this.resetClickSequence();var l=this.getAddFeatureAction(u,e.data);l&&e.onEdit(l)}else a&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var n=this.getClickSequence();if(n.length>1){var r={type:"LineString",coordinates:o(n)};this.resetClickSequence();var i=this.getAddFeatureAction(r,e.data);i&&e.onEdit(i)}}}},{key:"getGuides",value:function(t){var e,n,r=t.lastPointerMoveEvent,i=this.getClickSequence(),a=r?[r.mapCoords]:[],s={type:"FeatureCollection",features:[]};i.length>0&&(n={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(o(i),a)}}),n&&s.features.push(n);var u=i.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=s.features).push.apply(e,o(u)),s}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&u(n.prototype,i),a&&u(n,a),d}(n(112).GeoJsonEditMode);e.DrawLineStringMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleMode=void 0;var r,i=(r=n(142))&&r.__esModule?r:{default:r};function o(t){return o="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},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 u(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(){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}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var h=function(t){!function(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&&f(t,e)}(p,t);var e,n,r,o,h=(e=p,function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return u(this,t)});function p(){return a(this,p),h.apply(this,arguments)}return n=p,(r=[{key:"getTwoClickPolygon",value:function(t,e,n){var r=(0,i.default)([t[0],t[1],e[0],e[1]]);return r.properties=r.properties||{},r.properties.shape="Rectangle",r}}])&&s(n.prototype,r),o&&s(n,o),p}(n(646).TwoClickPolygonMode);e.DrawRectangleMode=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleByDiameterMode=void 0;var r=a(n(346)),i=a(n(237)),o=n(112);function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(){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}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}var d=function(t){!function(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&&p(t,e)}(m,t);var e,n,a,s,d=(e=m,function(){var t,n=h(e);if(f()){var r=h(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return c(this,t)});function m(){return u(this,m),d.apply(this,arguments)}return n=m,(a=[{key:"getTwoClickPolygon",value:function(t,e,n){var a=(n||{}).steps,s=void 0===a?64:a,u={steps:s};s<4&&(console.warn("Minimum steps to draw a circle is 4 "),u.steps=4);var l=(0,o.getIntermediatePosition)(t,e),c=Math.max((0,i.default)(t,l),.001),f=(0,r.default)(l,c,u);return f.properties=f.properties||{},f.properties.shape="Circle",f}}])&&l(n.prototype,a),s&&l(n,s),m}(n(646).TwoClickPolygonMode);e.DrawCircleByDiameterMode=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleFromCenterMode=void 0;var r=o(n(346)),i=o(n(237));function o(t){return t&&t.__esModule?t:{default:t}}function a(t){return a="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},a(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,o,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)});function d(){return s(this,d),p.apply(this,arguments)}return n=d,(o=[{key:"getTwoClickPolygon",value:function(t,e,n){var o=(n||{}).steps,a=void 0===o?64:o,s={steps:a};a<4&&(console.warn("Minimum steps to draw a circle is 4 "),s.steps=4);var u=Math.max((0,i.default)(t,e),.001),l=(0,r.default)(t,u,s);return l.properties=l.properties||{},l.properties.shape="Circle",l}}])&&u(n.prototype,o),a&&u(n,a),d}(n(646).TwoClickPolygonMode);e.DrawCircleFromCenterMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseByBoundingBoxMode=void 0;var r=u(n(142)),i=u(n(237)),o=u(n(469)),a=n(60),s=n(112);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="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},l(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t){!function(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&&m(t,e)}(y,t);var e,n,u,l,g=(e=y,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function y(){return c(this,y),g.apply(this,arguments)}return n=y,(u=[{key:"getTwoClickPolygon",value:function(t,e,n){var u=Math.min(t[0],e[0]),l=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),f=Math.max(t[1],e[1]),h=(0,r.default)([u,l,c,f]).geometry.coordinates[0],p=(0,s.getIntermediatePosition)(t,e),d=Math.max((0,i.default)((0,a.point)(h[0]),(0,a.point)(h[1])),.001),m=Math.max((0,i.default)((0,a.point)(h[0]),(0,a.point)(h[3])),.001);return(0,o.default)(p,d,m)}}])&&f(n.prototype,u),l&&f(n,l),y}(n(646).TwoClickPolygonMode);e.DrawEllipseByBoundingBoxMode=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseUsingThreePointsMode=void 0;var r=u(n(237)),i=u(n(469)),o=u(n(89)),a=n(60),s=n(112);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="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},l(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t){!function(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&&m(t,e)}(y,t);var e,n,u,l,g=(e=y,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function y(){return c(this,y),g.apply(this,arguments)}return n=y,(u=[{key:"getThreeClickPolygon",value:function(t,e,n,u){var l=(0,s.getIntermediatePosition)(t,e),c=Math.max((0,r.default)(l,(0,a.point)(n)),.001),f=Math.max((0,r.default)(t,e),.001)/2,h={angle:(0,o.default)(t,e)};return(0,i.default)(l,c,f,h)}}])&&f(n.prototype,u),l&&f(n,l),y}(n(1296).ThreeClickPolygonMode);e.DrawEllipseUsingThreePointsMode=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleUsingThreePointsMode=void 0;var r=n(157);function i(t){return i="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},i(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return a(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 l(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(){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}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(t){!function(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&&h(t,e)}(d,t);var e,n,i,a,p=(e=d,function(){var t,n=f(e);if(c()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)});function d(){return s(this,d),p.apply(this,arguments)}return n=d,(i=[{key:"getThreeClickPolygon",value:function(t,e,n,i){var a=o((0,r.generatePointsParallelToLinePoints)(t,e,n),2);return{type:"Feature",properties:{shape:"Rectangle"},geometry:{type:"Polygon",coordinates:[[t,e,a[0],a[1],t]]}}}}])&&u(n.prototype,i),a&&u(n,a),d}(n(1296).ThreeClickPolygonMode);e.DrawRectangleUsingThreePointsMode=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Draw90DegreePolygonMode=void 0;var r=l(n(151)),i=l(n(89)),o=l(n(260)),a=l(n(237)),s=n(60),u=n(157);function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function f(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||p(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.")}()}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){if(t){if("string"===typeof t)return d(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(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 m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(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 y(t,e,n){return y="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},y(t,e,n||t)}function v(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function b(){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}}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}var w=function(t){!function(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&&A(t,e)}(d,t);var e,n,l,c,p=(e=d,function(){var t,n=_(e);if(b()){var r=_(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return v(this,t)});function d(){return m(this,d),p.apply(this,arguments)}return n=d,(l=[{key:"createTentativeFeature",value:function(t){var e,n=this.getClickSequence(),r=t.lastPointerMoveEvent.mapCoords;if(1===n.length)e=r;else{var i=n[n.length-2],o=n[n.length-1];e=h((0,u.generatePointsParallelToLinePoints)(i,o,r),1)[0]}return n.length<3?{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(f(n),[e])}}:{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(f(n),[e,n[0]])]}}}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]};if(0===this.getClickSequence().length||!t.lastPointerMoveEvent)return e;var n=this.createTentativeFeature(t);return e.features.push(n),e.features=e.features.concat((0,u.getEditHandlesForGeometry)(n.geometry,-1)),e.features=e.features.slice(0,-1),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),y(_(d.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"handleClick",value:function(t,e){var n=t.picks,r=this.getTentativeGuide(e);this.addClickSequence(t);var i=this.getClickSequence();if(r){if(3===i.length&&"LineString"===r.geometry.type){var o=r.geometry;i[i.length-1]=o.coordinates[o.coordinates.length-1]}else if(i.length>3&&"Polygon"===r.geometry.type){var a=r.geometry;i[i.length-1]=a.coordinates[0][a.coordinates[0].length-2];var s=(0,u.getPickedEditHandle)(n);if(s&&Array.isArray(s.properties.positionIndexes)&&(0===s.properties.positionIndexes[1]||s.properties.positionIndexes[1]===a.coordinates[0].length-3)){var l={type:"Polygon",coordinates:this.finalizedCoordinates(f(a.coordinates[0]))};this.resetClickSequence();var c=this.getAddFeatureOrBooleanPolygonAction(l,e);c&&e.onEdit(c)}}var h={screenCoords:[-1,-1],mapCoords:t.mapCoords,picks:[],pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,cancelPan:function(){},sourceEvent:null};this.handlePointerMove(h,e)}}},{key:"finalizedCoordinates",value:function(t){var e=[[].concat(f(t.slice(0,-2)),[t[0]])],n=this.getIntermediatePoint(f(t));if(n)e=[[].concat(f(t.slice(0,-2)),[n,t[0]])];else{var r=f(t);r.splice(-3,1),(n=this.getIntermediatePoint(f(r)))&&(e=[[].concat(f(t.slice(0,-3)),[n,t[0]])])}return e}},{key:"getIntermediatePoint",value:function(t){var e;if(t.length>4){var n=f(t),u=n[0],l=n[1],c=(0,i.default)(u,l),h=t[t.length-3],p=t[t.length-4],d=(0,i.default)(h,p),m={first:[],second:[]};[1,2,3].forEach((function(t){var e=c+90*t;m.first.push(e>180?e-360:e);var n=d+90*t;m.second.push(n>180?n-360:n)}));var g=(0,a.default)((0,s.point)(u),(0,s.point)(h));[0,1,2].forEach((function(t){var n=(0,s.lineString)([u,(0,r.default)(u,g,m.first[t]).geometry.coordinates]);[0,1,2].forEach((function(t){var i=(0,s.lineString)([h,(0,r.default)(h,g,m.second[t]).geometry.coordinates]),a=(0,o.default)(n,i);a&&a.features.length&&(e=a.features[0].geometry.coordinates)}))}))}return e}}])&&g(n.prototype,l),c&&g(n,c),d}(n(112).GeoJsonEditMode);e.Draw90DegreePolygonMode=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonByDraggingMode=void 0;var r,i=(r=n(235))&&r.__esModule?r:{default:r},o=n(157);function a(t){return a="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},a(t)}function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return u(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(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.")}()}function u(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 l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?h(t):e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=function(t){!function(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&&m(t,e)}(y,t);var e,n,r,a,u=(e=y,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)});function y(){var t;l(this,y);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return g(h(t=u.call.apply(u,[this].concat(n))),"handleDraggingThrottled",null),t}return n=y,(r=[{key:"handleClick",value:function(t,e){}},{key:"handleStartDragging",value:function(t,e){t.cancelPan(),e.modeConfig&&e.modeConfig.throttleMs?this.handleDraggingThrottled=(0,i.default)(this.handleDraggingAux,e.modeConfig.throttleMs):this.handleDraggingThrottled=this.handleDraggingAux}},{key:"handleStopDragging",value:function(t,e){this.addClickSequence(t);var n=this.getClickSequence();if(this.handleDraggingThrottled&&this.handleDraggingThrottled.cancel&&this.handleDraggingThrottled.cancel(),n.length>2){var r={type:"Polygon",coordinates:[[].concat(s(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,e);i&&e.onEdit(i)}}},{key:"handleDraggingAux",value:function(t,e){var n=t.picks;(0,o.getPickedEditHandle)(n)||this.addClickSequence(t)}},{key:"handleDragging",value:function(t,e){this.handleDraggingThrottled&&this.handleDraggingThrottled(t,e)}}])&&c(n.prototype,r),a&&c(n,a),y}(n(944).DrawPolygonMode);e.DrawPolygonByDraggingMode=y},function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(){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}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ViewMode=void 0;var l=function(t){!function(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&&u(t,e)}(r,t);var e,n=(e=r,function(){var t,n=s(e);if(a()){var r=s(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return o(this,t)});function r(){return i(this,r),n.apply(this,arguments)}return r}(n(112).GeoJsonEditMode);e.ViewMode=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureDistanceMode=void 0;var r,i=(r=n(237))&&r.__esModule?r:{default:r},o=n(157);function a(t){return a="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},a(t)}function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return u(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(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.")}()}function u(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 l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?h(t):e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(){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}}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=function(t){!function(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&&m(t,e)}(y,t);var e,n,r,a,u=(e=y,function(){var t,n=d(e);if(p()){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)});function y(){var t;l(this,y);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return g(h(t=u.call.apply(u,[this].concat(n))),"_isMeasuringSessionFinished",!1),g(h(t),"_currentTooltips",[]),g(h(t),"_currentDistance",0),g(h(t),"_calculateDistanceForTooltip",(function(t){var e=t.positionA,n=t.positionB,r=t.modeConfig||{},o=r.turfOptions,a=r.measurementCallback,s=(0,i.default)(e,n,o);return a&&a(s),s})),t}return n=y,(r=[{key:"_formatTooltip",value:function(t,e){var n=e||{},r=n.formatTooltip,i=n.turfOptions,o=i&&i.units||"kilometers";return r?r(t):"".concat(parseFloat(t).toFixed(2)," ").concat(o)}},{key:"handleClick",value:function(t,e){var n=e.modeConfig,r=e.data,i=e.onEdit;this._isMeasuringSessionFinished&&(this._isMeasuringSessionFinished=!1,this.resetClickSequence(),this._currentTooltips=[],this._currentDistance=0);var a=t.picks,s=(0,o.getPickedEditHandle)(a),u=!1;s||(this.addClickSequence(t),u=!0);var l=this.getClickSequence();l.length>1&&s&&Array.isArray(s.properties.positionIndexes)&&s.properties.positionIndexes[0]===l.length-1?this._isMeasuringSessionFinished=!0:u&&(l.length>1&&(this._currentDistance+=this._calculateDistanceForTooltip({positionA:l[l.length-2],positionB:l[l.length-1],modeConfig:n}),this._currentTooltips.push({position:t.mapCoords,text:this._formatTooltip(this._currentDistance,n)})),i({updatedData:r,editType:"addTentativePosition",editContext:{position:t.mapCoords}}))}},{key:"handleKeyUp",value:function(t,e){if(!this._isMeasuringSessionFinished){t.stopPropagation();var n=t.key,r=this.getClickSequence().length;switch(n){case"Escape":this._isMeasuringSessionFinished=!0,1===r&&(this.resetClickSequence(),this._currentTooltips=[]),e.onUpdateCursor("cell");break;case"Enter":this.handleClick(e.lastPointerMoveEvent,e),this._isMeasuringSessionFinished=!0}}}},{key:"getGuides",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n&&!this._isMeasuringSessionFinished?[n.mapCoords]:[],o={type:"FeatureCollection",features:[]};r.length>0&&o.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(s(r),i)}});var a=r.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=o.features).push.apply(e,s(a)),o}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"getTooltips",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=this.getClickSequence();if(r.length>0&&e&&!this._isMeasuringSessionFinished){var i=this._calculateDistanceForTooltip({positionA:r[r.length-1],positionB:e.mapCoords,modeConfig:t.modeConfig});return[].concat(s(this._currentTooltips),[{position:e.mapCoords,text:this._formatTooltip(this._currentDistance+i,n)}])}return this._currentTooltips}}])&&c(n.prototype,r),a&&c(n,a),y}(n(112).GeoJsonEditMode);e.MeasureDistanceMode=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAreaMode=void 0;var r=a(n(986)),i=a(n(180)),o=n(944);function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function u(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 l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 h(t,e,n){return h="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function p(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(){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}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var y=[],v=function(t){!function(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&&g(t,e)}(v,t);var e,n,o,a,s=(e=v,function(){var t,n=m(e);if(d()){var r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function v(){return c(this,v),s.apply(this,arguments)}return n=v,o=[{key:"handleClick",value:function(t,e){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{onEdit:function(){}});h(m(v.prototype),"handleClick",this).call(this,t,n)}},{key:"getTooltips",value:function(t){var e=this.getTentativeGuide(t);if(e&&"Polygon"===e.geometry.type){var n,o=t.modeConfig||{},a=o.formatTooltip,s=o.measurementCallback,u=(0,i.default)(e),l=(0,r.default)(e);return n=a?a(l):"".concat(parseFloat(l).toFixed(2)," ").concat("sq. m"),s&&s(l),[{position:u.geometry.coordinates,text:n}]}return y}}],o&&f(n.prototype,o),a&&f(n,a),v}(o.DrawPolygonMode);e.MeasureAreaMode=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAngleMode=void 0;var r=s(n(89)),i=s(n(224)),o=s(n(1297)),a=n(112);function s(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function l(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return c(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(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.")}()}function c(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 f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(){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}}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function y(t,e){return y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},y(t,e)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=[],_=function(t){!function(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&&y(t,e)}(c,t);var e,n,a,s,u=(e=c,function(){var t,n=g(e);if(m()){var r=g(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)});function c(){var t;f(this,c);for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v(d(t=u.call.apply(u,[this].concat(n))),"_getTooltips",(0,o.default)((function(t){var e=t.modeConfig,n=t.vertex,o=t.point1,a=t.point2,s=b;if(n&&o&&a){var u,l=e||{},c=l.formatTooltip,f=l.measurementCallback,h=(0,r.default)(n,o),p=(0,r.default)(n,a),d=Math.abs(h-p);d>180&&(d=360-d),u=c?c(d):"".concat(parseFloat(d).toFixed(2)," ").concat("deg"),f&&f(d),s=[{position:(0,i.default)({type:"FeatureCollection",features:[o,a].map((function(t){return{type:"Feature",geometry:{type:"Point",coordinates:t}}}))}).geometry.coordinates,text:u}]}return s}))),t}return n=c,(a=[{key:"handleClick",value:function(t,e){this.getClickSequence().length>=3&&this.resetClickSequence(),this.addClickSequence(t)}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"getPoints",value:function(t){var e=this.getClickSequence(),n=l(e);return e.length<3&&t.lastPointerMoveEvent&&n.push(t.lastPointerMoveEvent.mapCoords),n}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},n=e.features,r=this.getPoints(t);return r.length>2?n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0],r[2]]}}):r.length>1&&n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0]]}}),e}},{key:"getTooltips",value:function(t){var e=this.getPoints(t);return this._getTooltips({modeConfig:t.modeConfig,vertex:e[0],point1:e[1],point2:e[2]})}}])&&h(n.prototype,a),s&&h(n,s),c}(a.GeoJsonEditMode);e.MeasureAngleMode=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnappableMode=void 0;var r=n(157);function i(t){return i="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},i(t)}function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(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.")}()}function a(t,e){if(t){if("string"===typeof t)return s(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(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 u(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 l(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 c(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?f(t):e}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(){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}}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=function(t){!function(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&&d(t,e)}(y,t);var e,n,i,s,g=(e=y,function(){var t,n=p(e);if(h()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return c(this,t)});function y(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),m(f(e=g.call(this)),"_handler",void 0),e._handler=t,e}return n=y,i=[{key:"_getSnappedMouseEvent",value:function(t,e,n){return Object.assign(t,{mapCoords:n.geometry.coordinates,pointerDownMapCoords:e&&e.geometry.coordinates})}},{key:"_getPickedSnapTarget",value:function(t){return(0,r.getPickedEditHandles)(t).find((function(t){return"snap-target"===t.properties.editHandleType}))}},{key:"_getPickedSnapSource",value:function(t){return(0,r.getPickedSnapSourceEditHandle)(t)}},{key:"_getUpdatedSnapSourceHandle",value:function(t,e){var n=t.properties,r=n.featureIndex,i=n.positionIndexes;if(!Array.isArray(i))return t;var o=e.features[r];return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{geometry:{type:"Point",coordinates:i.reduce((function(t,e){return t[e]}),o.geometry.coordinates)}})}},{key:"_getSnapTargets",value:function(t){var e=(t.modeConfig||{}).additionalSnapTargets;return e=e||[],[].concat(o(t.data.features),o(e))}},{key:"_getSnapTargetHandles",value:function(t){for(var e=[],n=this._getSnapTargets(t),i=0;i<n.length;i++)if(!t.selectedIndexes.includes(i)){var a=n[i].geometry;e.push.apply(e,o((0,r.getEditHandlesForGeometry)(a,i,"snap-target")))}return e}},{key:"getGuides",value:function(t){var e=t.modeConfig,n=t.lastPointerMoveEvent,i=(e||{}).enableSnapping,s={type:"FeatureCollection",features:o(this._handler.getGuides(t).features)};if(!i)return s;var u,l=n&&this._getPickedSnapSource(n.pointerDownPicks);if(l)return(u=s.features).push.apply(u,o(this._getSnapTargetHandles(t)).concat([this._getUpdatedSnapSourceHandle(l,t.data)])),s;var c,f=t.data.features,h=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=a(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,i,o=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(t.selectedIndexes);try{for(h.s();!(c=h.n()).done;){var p=c.value;if(p<f.length){var d,m=f[p].geometry;(d=s.features).push.apply(d,o((0,r.getEditHandlesForGeometry)(m,p,"snap-source")))}}}catch(g){h.e(g)}finally{h.f()}return s}},{key:"_getSnapAwareEvent",value:function(t,e){var n=this._getPickedSnapSource(e.lastPointerMoveEvent.pointerDownPicks),r=this._getPickedSnapTarget(t.picks);return n&&r?this._getSnappedMouseEvent(t,n,r):t}},{key:"handleStartDragging",value:function(t,e){this._handler.handleStartDragging(t,e)}},{key:"handleStopDragging",value:function(t,e){this._handler.handleStopDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handleDragging",value:function(t,e){this._handler.handleDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handlePointerMove",value:function(t,e){this._handler.handlePointerMove(this._getSnapAwareEvent(t,e),e)}}],i&&l(n.prototype,i),s&&l(n,s),y}(n(112).GeoJsonEditMode);e.SnappableMode=g},function(t,e,n){},function(t,e,n){},,function(t,e,n){"use strict";n.d(e,"a",(function(){return $r}));var r={};n.r(r),n.d(r,"name",(function(){return re})),n.d(r,"decode",(function(){return ie}));var i={};n.r(i),n.d(i,"name",(function(){return me})),n.d(i,"preprocess",(function(){return ge}));var o={};n.r(o),n.d(o,"name",(function(){return _e})),n.d(o,"preprocess",(function(){return Ae}));var a={};n.r(a),n.d(a,"name",(function(){return Fe})),n.d(a,"preprocess",(function(){return Be})),n.d(a,"decode",(function(){return ze})),n.d(a,"encode",(function(){return Ge}));var s={};n.r(s),n.d(s,"name",(function(){return en})),n.d(s,"decode",(function(){return nn})),n.d(s,"encode",(function(){return on}));var u={};n.r(u),n.d(u,"name",(function(){return dn})),n.d(u,"decode",(function(){return mn})),n.d(u,"encode",(function(){return yn}));var l={};n.r(l),n.d(l,"name",(function(){return On})),n.d(l,"decode",(function(){return Sn})),n.d(l,"encode",(function(){return Cn}));var c=n(1433);function f(t){return f="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},f(t)}function h(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return p(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 p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(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 d(){d=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var c={};function h(){}function p(){}function m(){}var g={};s(g,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,i)&&(g=v);var b=m.prototype=h.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==f(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return p.prototype=m,s(b,"constructor",m),s(m,"constructor",p),p.displayName=s(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(A.prototype),s(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),s(b,a,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function m(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function g(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){m(o,r,i,a,s,"next",t)}function s(t){m(o,r,i,a,s,"throw",t)}a(void 0)}))}}var y,v,b="3.2.12",_="https://unpkg.com/@loaders.gl/textures@".concat(b,"/dist/libs/basis_encoder.wasm"),A="https://unpkg.com/@loaders.gl/textures@".concat(b,"/dist/libs/basis_encoder.js");function w(t){return x.apply(this,arguments)}function x(){return(x=g(d().mark((function t(e){var n;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.modules||{}).basis){t.next=3;break}return t.abrupt("return",n.basis);case 3:return y=y||E(e),t.next=6,y;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(t){return O.apply(this,arguments)}function O(){return(O=g(d().mark((function t(e){var n,r,i,o;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=null,r=null,t.t0=Promise,t.next=5,Object(c.a)("basis_transcoder.js","textures",e);case 5:return t.t1=t.sent,t.next=8,Object(c.a)("basis_transcoder.wasm","textures",e);case 8:return t.t2=t.sent,t.t3=[t.t1,t.t2],t.next=12,t.t0.all.call(t.t0,t.t3);case 12:return i=t.sent,o=h(i,2),n=o[0],r=o[1],n=n||globalThis.BASIS,t.next=19,S(n,r);case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(t,e){var n={};return e&&(n.wasmBinary=e),new Promise((function(e){t(n).then((function(t){var n=t.BasisFile;(0,t.initializeBasis)(),e({BasisFile:n})}))}))}function P(t){return C.apply(this,arguments)}function C(){return(C=g(d().mark((function t(e){var n;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.modules||{}).basisEncoder){t.next=3;break}return t.abrupt("return",n.basisEncoder);case 3:return v=v||T(e),t.next=6,v;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(t){return k.apply(this,arguments)}function k(){return(k=g(d().mark((function t(e){var n,r,i,o;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=null,r=null,t.t0=Promise,t.next=5,Object(c.a)(A,"textures",e);case 5:return t.t1=t.sent,t.next=8,Object(c.a)(_,"textures",e);case 8:return t.t2=t.sent,t.t3=[t.t1,t.t2],t.next=12,t.t0.all.call(t.t0,t.t3);case 12:return i=t.sent,o=h(i,2),n=o[0],r=o[1],n=n||globalThis.BASIS,t.next=19,I(n,r);case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function I(t,e){var n={};return e&&(n.wasmBinary=e),new Promise((function(e){t(n).then((function(t){var n=t.BasisFile,r=t.KTX2File,i=t.initializeBasis,o=t.BasisEncoder;i(),e({BasisFile:n,KTX2File:r,BasisEncoder:o})}))}))}var L={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919};function j(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return M(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 M(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function M(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 R=["","WEBKIT_","MOZ_"],N={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"},D=null;function F(t){if(!D){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,D=new Set;var e,n=j(R);try{for(n.s();!(e=n.n()).done;){var r=e.value;for(var i in N)if(t&&t.getExtension("".concat(r).concat(i))){var o=N[i];D.add(o)}}}catch(a){n.e(a)}finally{n.f()}}return D}n(568);var B=[171,75,84,88,32,50,48,187,13,10,26,10];function z(t){var e=new Uint8Array(t);return!(e.byteLength<B.length||e[0]!==B[0]||e[1]!==B[1]||e[2]!==B[2]||e[3]!==B[3]||e[4]!==B[4]||e[5]!==B[5]||e[6]!==B[6]||e[7]!==B[7]||e[8]!==B[8]||e[9]!==B[9]||e[10]!==B[10]||e[11]!==B[11])}function U(){U=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==G(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function G(t){return G="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},G(t)}function V(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function q(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){V(o,r,i,a,s,"next",t)}function s(t){V(o,r,i,a,s,"throw",t)}a(void 0)}))}}var H={etc1:{basisFormat:0,compressed:!0,format:L.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:L.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:L.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:L.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:L.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:L.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function W(){return(W=q(U().mark((function t(e,n){var r,i,o,a,s,u;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("auto"!==n.basis.containerFormat){t.next=11;break}if(!z(e)){t.next=6;break}return t.next=4,P(n);case 4:return r=t.sent,t.abrupt("return",Z(r.KTX2File,e,n));case 6:return t.next=8,w(n);case 8:return i=t.sent,o=i.BasisFile,t.abrupt("return",X(o,e,n));case 11:t.t0=n.basis.module,t.next="encoder"===t.t0?14:(t.t0,22);break;case 14:return t.next=16,P(n);case 16:a=t.sent,t.t1=n.basis.containerFormat,t.next="ktx2"===t.t1?20:(t.t1,21);break;case 20:return t.abrupt("return",Z(a.KTX2File,e,n));case 21:return t.abrupt("return",X(a.BasisFile,e,n));case 22:return t.next=24,w(n);case 24:return s=t.sent,u=s.BasisFile,t.abrupt("return",X(u,e,n));case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function X(t,e,n){var r=new t(new Uint8Array(e));try{if(!r.startTranscoding())throw new Error("Failed to start basis transcoding");for(var i=r.getNumImages(),o=[],a=0;a<i;a++){for(var s=r.getNumLevels(a),u=[],l=0;l<s;l++)u.push(Y(r,a,l,n));o.push(u)}return o}finally{r.close(),r.delete()}}function Y(t,e,n,r){var i=t.getImageWidth(e,n),o=t.getImageHeight(e,n),a=t.getHasAlpha(),s=$(r,a),u=s.compressed,l=s.format,c=s.basisFormat,f=t.getImageTranscodedSizeInBytes(e,n,c),h=new Uint8Array(f);if(!t.transcodeImage(h,e,n,c,0,0))throw new Error("failed to start Basis transcoding");return{width:i,height:o,data:h,compressed:u,format:l,hasAlpha:a}}function Z(t,e,n){var r=new t(new Uint8Array(e));try{if(!r.startTranscoding())throw new Error("failed to start KTX2 transcoding");for(var i=r.getLevels(),o=[],a=0;a<i;a++){o.push(K(r,a,n));break}return[o]}finally{r.close(),r.delete()}}function K(t,e,n){var r=t.getImageLevelInfo(e,0,0),i=r.alphaFlag,o=r.height,a=r.width,s=$(n,i),u=s.compressed,l=s.format,c=s.basisFormat,f=t.getImageTranscodedSizeInBytes(e,0,0,c),h=new Uint8Array(f);if(!t.transcodeImage(h,e,0,0,c,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:a,height:o,data:h,compressed:u,hasAlpha:i,format:l}}function $(t,e){var n=t&&t.basis&&t.basis.format;return"auto"===n&&(n=J()),"object"===G(n)&&(n=e?n.alpha:n.noAlpha),n=n.toLowerCase(),H[n]}function J(){var t=F();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}function Q(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 tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){et(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nt={name:"Basis",id:"basis",module:"textures",version:"3.2.12",worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},rt=tt(tt({},nt),{},{parse:function(t,e){return W.apply(this,arguments)}}),it=n(1530),ot=n(495),at=n(150);function st(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function ut(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;var n=e.baseUri||e.uri;if(!n)throw new Error("'baseUri' must be provided to resolve relative url ".concat(t));return n.substr(0,n.lastIndexOf("/")+1)+t}function lt(t,e,n){var r=t.bufferViews[n];st(r);var i=e[r.buffer];st(i);var o=(r.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,o,r.byteLength)}var ct=n(1),ft=n(309),ht=n(290),pt=["SCALAR","VEC2","VEC3","VEC4"],dt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],mt=new Map(dt),gt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},yt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},vt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function bt(t){return pt[t-1]||pt[0]}function _t(t){var e=mt.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function At(t,e){var n=vt[t.componentType],r=gt[t.type],i=yt[t.componentType],o=t.count*r,a=t.count*r*i;return st(a>=0&&a<=e.byteLength),{ArrayType:n,length:o,byteLength:a}}function wt(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return xt(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 xt(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function xt(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 Et(t){return Et="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},Et(t)}function Ot(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 St(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(n),!0).forEach((function(e){Pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Pt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ct(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)}}var Tt={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},kt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(ct.a)(this,"gltf",void 0),Object(ct.a)(this,"sourceBuffers",void 0),Object(ct.a)(this,"byteLength",void 0),this.gltf=e||{json:St({},Tt),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]])}var e,n,r;return e=t,n=[{key:"json",get:function(){return this.gltf.json}},{key:"getApplicationData",value:function(t){return this.json[t]}},{key:"getExtraData",value:function(t){return(this.json.extras||{})[t]}},{key:"getExtension",value:function(t){var e=this.getUsedExtensions().find((function(e){return e===t})),n=this.json.extensions||{};return e?n[t]||!0:null}},{key:"getRequiredExtension",value:function(t){return this.getRequiredExtensions().find((function(e){return e===t}))?this.getExtension(t):null}},{key:"getRequiredExtensions",value:function(){return this.json.extensionsRequired||[]}},{key:"getUsedExtensions",value:function(){return this.json.extensionsUsed||[]}},{key:"getObjectExtension",value:function(t,e){return(t.extensions||{})[e]}},{key:"getScene",value:function(t){return this.getObject("scenes",t)}},{key:"getNode",value:function(t){return this.getObject("nodes",t)}},{key:"getSkin",value:function(t){return this.getObject("skins",t)}},{key:"getMesh",value:function(t){return this.getObject("meshes",t)}},{key:"getMaterial",value:function(t){return this.getObject("materials",t)}},{key:"getAccessor",value:function(t){return this.getObject("accessors",t)}},{key:"getTexture",value:function(t){return this.getObject("textures",t)}},{key:"getSampler",value:function(t){return this.getObject("samplers",t)}},{key:"getImage",value:function(t){return this.getObject("images",t)}},{key:"getBufferView",value:function(t){return this.getObject("bufferViews",t)}},{key:"getBuffer",value:function(t){return this.getObject("buffers",t)}},{key:"getObject",value:function(t,e){if("object"===Et(e))return e;var n=this.json[t]&&this.json[t][e];if(!n)throw new Error("glTF file error: Could not find ".concat(t,"[").concat(e,"]"));return n}},{key:"getTypedArrayForBufferView",value:function(t){var e=(t=this.getBufferView(t)).buffer,n=this.gltf.buffers[e];st(n);var r=(t.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,t.byteLength)}},{key:"getTypedArrayForAccessor",value:function(t){t=this.getAccessor(t);var e=this.getBufferView(t.bufferView),n=this.getBuffer(e.buffer).data,r=At(t,e),i=r.ArrayType,o=r.length;return new i(n,e.byteOffset+t.byteOffset,o)}},{key:"getTypedArrayForImageData",value:function(t){t=this.getAccessor(t);var e=this.getBufferView(t.bufferView),n=this.getBuffer(e.buffer).data,r=e.byteOffset||0;return new Uint8Array(n,r,e.byteLength)}},{key:"addApplicationData",value:function(t,e){return this.json[t]=e,this}},{key:"addExtraData",value:function(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}},{key:"addObjectExtension",value:function(t,e,n){return t.extensions=t.extensions||{},t.extensions[e]=n,this.registerUsedExtension(e),this}},{key:"setObjectExtension",value:function(t,e,n){(t.extensions||{})[e]=n}},{key:"removeObjectExtension",value:function(t,e){var n=t.extensions||{},r=n[e];return delete n[e],r}},{key:"addExtension",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return st(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}},{key:"addRequiredExtension",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return st(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}},{key:"registerUsedExtension",value:function(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((function(e){return e===t}))||this.json.extensionsUsed.push(t)}},{key:"registerRequiredExtension",value:function(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((function(e){return e===t}))||this.json.extensionsRequired.push(t)}},{key:"removeExtension",value:function(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]}},{key:"setDefaultScene",value:function(t){this.json.scene=t}},{key:"addScene",value:function(t){var e=t.nodeIndices;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}},{key:"addNode",value:function(t){var e=t.meshIndex,n=t.matrix;this.json.nodes=this.json.nodes||[];var r={mesh:e};return n&&(r.matrix=n),this.json.nodes.push(r),this.json.nodes.length-1}},{key:"addMesh",value:function(t){var e=t.attributes,n=t.indices,r=t.material,i=t.mode,o=void 0===i?4:i,a={primitives:[{attributes:this._addAttributes(e),mode:o}]};if(n){var s=this._addIndices(n);a.primitives[0].indices=s}return Number.isFinite(r)&&(a.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}},{key:"addPointCloud",value:function(t){var 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}},{key:"addImage",value:function(t,e){var n=Object(ft.a)(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}},{key:"addBufferView",value:function(t){var e=t.byteLength;st(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);var n={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Object(ht.b)(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}},{key:"addAccessor",value:function(t,e){var n={bufferView:t,type:bt(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}},{key:"addBinaryBuffer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3},n=this.addBufferView(t),r={min:e.min,max:e.max};r.min&&r.max||(r=this._getAccessorMinMax(t,e.size));var i={size:e.size,componentType:_t(t),count:Math.round(t.length/e.size),min:r.min,max:r.max};return this.addAccessor(n,Object.assign(i,e))}},{key:"addTexture",value:function(t){var e={source:t.imageIndex};return this.json.textures=this.json.textures||[],this.json.textures.push(e),this.json.textures.length-1}},{key:"addMaterial",value:function(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}},{key:"createBinaryChunk",value:function(){var t,e;this.gltf.buffers=[];var n,r=this.byteLength,i=new ArrayBuffer(r),o=new Uint8Array(i),a=0,s=wt(this.sourceBuffers||[]);try{for(s.s();!(n=s.n()).done;){var u=n.value;a=Object(ht.a)(u,o,a)}}catch(l){s.e(l)}finally{s.f()}null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=i,this.sourceBuffers=[i]}},{key:"_removeStringFromArray",value:function(t,e){for(var n=!0;n;){var r=t.indexOf(e);r>-1?t.splice(r,1):n=!1}}},{key:"_addAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};for(var n in t){var r=t[n],i=this._getGltfAttributeName(n),o=this.addBinaryBuffer(r.value,r);e[i]=o}return e}},{key:"_addIndices",value:function(t){return this.addBinaryBuffer(t,{size:1})}},{key:"_getGltfAttributeName",value:function(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}}},{key:"_getAccessorMinMax",value:function(t,e){var n={min:null,max:null};if(t.length<e)return n;n.min=[],n.max=[];var r,i=wt(t.subarray(0,e));try{for(i.s();!(r=i.n()).done;){var o=r.value;n.min.push(o),n.max.push(o)}}catch(u){i.e(u)}finally{i.f()}for(var a=e;a<t.length;a+=e)for(var s=0;s<e;s++)n.min[0+s]=Math.min(n.min[0+s],t[a+s]),n.max[0+s]=Math.max(n.max[0+s],t[a+s]);return n}}],n&&Ct(e.prototype,n),r&&Ct(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function It(){It=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Mt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Lt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function jt(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Lt(o,r,i,a,s,"next",t)}function s(t){Lt(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Mt(t){return Mt="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},Mt(t)}"undefined"===typeof WebAssembly||Mt(WebAssembly);var Rt,Nt="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",Dt="B9h9z9tFBBBF8dL9gBB9gLaaaaaFa9gEaaaB9gGaaB9gFaFaEQSBBFBFFGEGEGIILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBNn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBcI9z9iqlBMc/j9JSIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMkRIbaG97FaK978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAnDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAnDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBRnCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBHiCFD9tAiAPD9OD9hD9RHiDQBTFtGmEYIPLdKeOnH8ZAIAQJDBIBHpCFD9tApAPD9OD9hD9RHpAIASJDBIBHyCFD9tAyAPD9OD9hD9RHyDQBTFtGmEYIPLdKeOnH8cDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAnD9uHnDyBjGBAEAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnA8ZA8cDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNiV8ZcpMyS8cQ8df8eb8fHdApAyDQNiV8ZcpMyS8cQ8df8eb8fHiDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/xLGEaK978jUUUUBCAlHE8kUUUUBGXGXAGCI9HQBGXAFC98ZHI9FQBABRGCBRLEXAGAGDBBBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMBBAGCTJRGALCIJHLAI9JQBMMAIAF9PQFAEAFCEZHLCGWHGqCBCTAGl/8MBAEABAICGWJHIAG/8cBBGXAL9FQBAEAEDBIBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMIBMAIAEAG/8cBBSFMABAFC98ZHGT+HUUUBAGAF9PQBAEAFCEZHICEWHLJCBCAALl/8MBAEABAGCEWJHGAL/8cBBAEAIT+HUUUBAGAEAL/8cBBMAECAJ8kUUUUBM+yEGGaO97GXAF9FQBCBRGEXABCTJHEAEDBBBHICBDtHLCUU98D8cFCUU98D8cEHKD9OABDBBBHOAIDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAOAIDQBFGENVcMTtmYi8ZpyHICTD+sFD/6FHND/gFAICTD+rFCTD+sFD/6FHVD/gFD/kFD/lFHI9DB/+g6DYAVAIALD+2FHLAVCUUUU94DtHcD9OD9RD/kFHVAVD/mFAIAID/mFANALANAcD9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHLD/kFCTD+rFAVAND/mFALD/kFCggEDtD9OD9QHVAIAND/mFALD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHIDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAOAKD9OAVAIDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM94FEa8jUUUUBCAlHE8kUUUUBABAFC98ZHIT+JUUUBGXAIAF9PQBAEAFCEZHLCEWHFJCBCAAFl/8MBAEABAICEWJHBAF/8cBBAEALT+JUUUBABAEAF/8cBBMAECAJ8kUUUUBM/hEIGaF97FaL978jUUUUBCTlRGGXAF9FQBCBREEXAGABDBBBHIABCTJHLDBBBHKDQILKOSQfbPden8c8d8e8fHOCTD+sFHNCID+rFDMIBAB9DBBU8/DY9D/zI818/DYANCEDtD9QD/6FD/nFHNAIAKDQBFGENVcMTtmYi8ZpyHICTD+rFCTD+sFD/6FD/mFHKAKD/mFANAICTD+sFD/6FD/mFHVAVD/mFANAOCTD+rFCTD+sFD/6FD/mFHOAOD/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHND/mF9DBBX9LDYHID/kFCggEDtHcD9OAVAND/mFAID/kFCTD+rFD9QHVAOAND/mFAID/kFCTD+rFAKAND/mFAID/kFAcD9OD9QHNDQBFTtGEmYILPdKOenHID8dBAGDBIBDyB+t+J83EBABCNJAID8dFAGDBIBDyF+t+J83EBALAVANDQNVi8ZcMpySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",Ft=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),Bt=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),zt={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Ut={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};function Gt(t,e,n,r,i){return Vt.apply(this,arguments)}function Vt(){return Vt=jt(It().mark((function t(e,n,r,i,o){var a,s,u=arguments;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=u.length>5&&void 0!==u[5]?u[5]:"NONE",t.next=3,qt();case 3:Zt(s=t.sent,s.exports[Ut[o]],e,n,r,i,s.exports[zt[a||"NONE"]]);case 5:case"end":return t.stop()}}),t)}))),Vt.apply(this,arguments)}function qt(){return Ht.apply(this,arguments)}function Ht(){return(Ht=jt(It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Rt||(Rt=Wt()),t.abrupt("return",Rt);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Wt(){return Xt.apply(this,arguments)}function Xt(){return(Xt=jt(It().mark((function t(){var e,n;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Nt,WebAssembly.validate(Ft)&&(e=Dt,console.log("Warning: meshopt_decoder is using experimental SIMD support")),t.next=4,WebAssembly.instantiate(Yt(e),{});case 4:return n=t.sent,t.next=7,n.instance.exports.__wasm_call_ctors();case 7:return t.abrupt("return",n.instance);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yt(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;++n){var r=t.charCodeAt(n);e[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}for(var i=0,o=0;o<t.length;++o)e[i++]=e[o]<60?Bt[e[o]]:64*(e[o]-60)+e[++o];return e.buffer.slice(0,i)}function Zt(t,e,n,r,i,o,a){var s=t.exports.sbrk,u=r+3&-4,l=s(u*i),c=s(o.length),f=new Uint8Array(t.exports.memory.buffer);f.set(o,c);var h=e(l,r,i,c,o.length);if(0===h&&a&&a(l,u,i),n.set(f.subarray(l,l+r*i)),s(l-s(0)),0!==h)throw new Error("Malformed buffer data: ".concat(h))}function Kt(t){return Kt="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},Kt(t)}function $t(){$t=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Kt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Jt(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Qt(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 Qt(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Qt(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 te(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){te(o,r,i,a,s,"next",t)}function s(t){te(o,r,i,a,s,"throw",t)}a(void 0)}))}}var ne="EXT_meshopt_compression",re=ne;function ie(t,e){return oe.apply(this,arguments)}function oe(){return(oe=ee($t().mark((function t(e,n){var r,i,o,a,s,u;return $t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=new kt(e),null!==n&&void 0!==n&&null!==(r=n.gltf)&&void 0!==r&&r.decompressMeshes){t.next=3;break}return t.abrupt("return");case 3:o=[],a=Jt(e.json.bufferViews||[]);try{for(a.s();!(s=a.n()).done;)u=s.value,o.push(ae(i,u))}catch(l){a.e(l)}finally{a.f()}return t.next=8,Promise.all(o);case 8:i.removeExtension(ne);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ae(t,e){return se.apply(this,arguments)}function se(){return(se=ee($t().mark((function t(e,n){var r,i,o,a,s,u,l,c,f,h,p,d,m,g;return $t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.getObjectExtension(n,ne))){t.next=9;break}return i=r.byteOffset,o=void 0===i?0:i,a=r.byteLength,s=void 0===a?0:a,u=r.byteStride,l=r.count,c=r.mode,f=r.filter,h=void 0===f?"NONE":f,p=r.buffer,d=e.gltf.buffers[p],m=new Uint8Array(d.arrayBuffer,d.byteOffset+o,s),g=new Uint8Array(e.gltf.buffers[n.buffer].arrayBuffer,n.byteOffset,n.byteLength),t.next=8,Gt(g,l,u,m,c,h);case 8:return t.abrupt("return",g);case 9:return t.abrupt("return",null);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ue=n(149),le=["image/png","image/jpeg","image/gif"],ce={};function fe(t){return void 0===ce[t]&&(ce[t]=function(t){switch(t){case"image/webp":return function(){if(!ue.a)return!1;try{return 0===document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp")}catch(t){return!1}}();case"image/svg":return ue.a;default:if(!ue.a){var e=globalThis._parseImageNode;return Boolean(e)&&le.includes(t)}return!0}}(t)),ce[t]}function he(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return pe(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 pe(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function pe(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 de="EXT_texture_webp",me=de;function ge(t,e){var n=new kt(t);if(fe("image/webp")){var r,i=he(n.json.textures||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=n.getObjectExtension(o,de);a&&(o.source=a.source),n.removeObjectExtension(o,de)}}catch(s){i.e(s)}finally{i.f()}n.removeExtension(de)}else if(n.getRequiredExtensions().includes(de))throw new Error("gltf: Required extension ".concat(de," not supported by browser"))}function ye(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return ve(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 ve(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ve(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 be="KHR_texture_basisu",_e=be;function Ae(t,e){var n,r=new kt(t),i=ye(r.json.textures||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=r.getObjectExtension(o,be);a&&(o.source=a.source),r.removeObjectExtension(o,be)}}catch(s){i.e(s)}finally{i.f()}r.removeExtension(be)}var we=n(314);function xe(t){var e={};for(var n in t){var r=t[n];if("indices"!==n){var i=Ee(r);e[n]=i}}return e}function Ee(t){var e=function(t){var e=t,n=1,r=0;t&&t.value&&(e=t.value,n=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];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),n=e.buffer,r=e.size;return{value:n,size:r,byteOffset:0,count:e.count,type:bt(r),componentType:_t(n)}}function Oe(t){return Oe="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},Oe(t)}function Se(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||Re(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(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 Ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pe(Object(n),!0).forEach((function(e){Ie(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Te(){Te=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Oe(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var ke=Te().mark(Xe);function Ie(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Le(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function je(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Le(o,r,i,a,s,"next",t)}function s(t){Le(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Me(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Re(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Re(t,e){if(t){if("string"===typeof t)return Ne(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)?Ne(t,e):void 0}}function Ne(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 De="KHR_draco_mesh_compression",Fe=De;function Be(t,e,n){var r,i=new kt(t),o=Me(Xe(i));try{for(o.s();!(r=o.n()).done;){var a=r.value;i.getObjectExtension(a,De)}}catch(s){o.e(s)}finally{o.f()}}function ze(t,e,n){return Ue.apply(this,arguments)}function Ue(){return(Ue=je(Te().mark((function t(e,n,r){var i,o,a,s,u,l;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==n&&void 0!==n&&null!==(i=n.gltf)&&void 0!==i&&i.decompressMeshes){t.next=2;break}return t.abrupt("return");case 2:o=new kt(e),a=[],s=Me(Xe(o));try{for(s.s();!(u=s.n()).done;)l=u.value,o.getObjectExtension(l,De)&&a.push(Ve(o,l,n,r))}catch(c){s.e(c)}finally{s.f()}return t.next=8,Promise.all(a);case 8:o.removeExtension(De);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ge(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new kt(t),i=Me(r.json.meshes||[]);try{for(i.s();!(e=i.n()).done;){var o=e.value;He(o,n),r.addRequiredExtension(De)}}catch(a){i.e(a)}finally{i.f()}}function Ve(t,e,n,r){return qe.apply(this,arguments)}function qe(){return(qe=je(Te().mark((function t(e,n,r,i){var o,a,s,u,l,c,f,h,p,d,m,g,y,v,b;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.getObjectExtension(n,De)){t.next=3;break}return t.abrupt("return");case 3:return a=e.getTypedArrayForBufferView(o.bufferView),s=Object(at.c)(a.buffer,a.byteOffset),u=i.parse,delete(l=Ce({},r))["3d-tiles"],t.next=10,u(s,we.a,l,i);case 10:for(c=t.sent,f=xe(c.attributes),h=0,p=Object.entries(f);h<p.length;h++)d=p[h],m=Se(d,2),g=m[0],y=m[1],g in n.attributes&&(v=n.attributes[g],null!==(b=e.getAccessor(v))&&void 0!==b&&b.min&&null!==b&&void 0!==b&&b.max&&(y.min=b.min,y.max=b.max));n.attributes=f,c.indices&&(n.indices=Ee(c.indices)),We(n);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function He(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!i.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");var a=i.DracoWriter.encodeSync({attributes:t}),s=null===o||void 0===o||null===(n=o.parseSync)||void 0===n?void 0:n.call(o,{attributes:t}),u=i._addFauxAttributes(s.attributes),l=i.addBufferView(a),c={primitives:[{attributes:u,mode:r,extensions:Ie({},De,{bufferView:l,attributes:u})}]};return c}function We(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function Xe(t){var e,n,r,i,o,a;return Te().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:e=Me(t.json.meshes||[]),s.prev=1,e.s();case 3:if((n=e.n()).done){s.next=24;break}r=n.value,i=Me(r.primitives),s.prev=6,i.s();case 8:if((o=i.n()).done){s.next=14;break}return a=o.value,s.next=12,a;case 12:s.next=8;break;case 14:s.next=19;break;case 16:s.prev=16,s.t0=s.catch(6),i.e(s.t0);case 19:return s.prev=19,i.f(),s.finish(19);case 22:s.next=3;break;case 24:s.next=29;break;case 26:s.prev=26,s.t1=s.catch(1),e.e(s.t1);case 29:return s.prev=29,e.f(),s.finish(29);case 32:case"end":return s.stop()}}),ke,null,[[1,26,29,32],[6,16,19,22]])}function Ye(t){return Ye="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},Ye(t)}function Ze(){Ze=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ye(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Ke(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return $e(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 $e(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function $e(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 Je(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Qe(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Je(o,r,i,a,s,"next",t)}function s(t){Je(o,r,i,a,s,"throw",t)}a(void 0)}))}}var tn="KHR_lights_punctual",en=tn;function nn(t){return rn.apply(this,arguments)}function rn(){return(rn=Qe(Ze().mark((function t(e){var n,r,i,o,a,s,u;return Ze().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new kt(e),r=n.json,(i=n.getExtension(tn))&&(n.json.lights=i.lights,n.removeExtension(tn)),o=Ke(r.nodes||[]);try{for(o.s();!(a=o.n()).done;)s=a.value,(u=n.getObjectExtension(s,tn))&&(s.light=u.light),n.removeObjectExtension(s,tn)}catch(l){o.e(l)}finally{o.f()}case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function on(t){return an.apply(this,arguments)}function an(){return(an=Qe(Ze().mark((function t(e){var n,r,i,o,a,s,u;return Ze().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=new kt(e),(r=n.json).lights&&(st(!(i=n.addExtension(tn)).lights),i.lights=r.lights,delete r.lights),n.json.lights){o=Ke(n.json.lights);try{for(o.s();!(a=o.n()).done;)s=a.value,u=s.node,n.addObjectExtension(u,tn,s)}catch(l){o.e(l)}finally{o.f()}delete n.json.lights}case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function sn(t){return sn="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},sn(t)}function un(){un=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==sn(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function ln(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return cn(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 cn(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function cn(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 fn(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function hn(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){fn(o,r,i,a,s,"next",t)}function s(t){fn(o,r,i,a,s,"throw",t)}a(void 0)}))}}var pn="KHR_materials_unlit",dn=pn;function mn(t){return gn.apply(this,arguments)}function gn(){return(gn=hn(un().mark((function t(e){var n,r,i,o,a;return un().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new kt(e),r=n.json,n.removeExtension(pn),i=ln(r.materials||[]);try{for(i.s();!(o=i.n()).done;)a=o.value,a.extensions&&a.extensions.KHR_materials_unlit&&(a.unlit=!0),n.removeObjectExtension(a,pn)}catch(s){i.e(s)}finally{i.f()}case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yn(t){var e=new kt(t),n=e.json;if(e.materials){var r,i=ln(n.materials||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.unlit&&(delete o.unlit,e.addObjectExtension(o,pn,{}),e.addExtension(pn))}}catch(a){i.e(a)}finally{i.f()}}}function vn(){vn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==An(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function bn(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return _n(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 _n(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function _n(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 An(t){return An="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},An(t)}function wn(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function xn(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){wn(o,r,i,a,s,"next",t)}function s(t){wn(o,r,i,a,s,"throw",t)}a(void 0)}))}}var En="KHR_techniques_webgl",On=En;function Sn(t){return Pn.apply(this,arguments)}function Pn(){return(Pn=xn(vn().mark((function t(e){var n,r,i,o,a,s,u,l;return vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=new kt(e),r=n.json,i=n.getExtension(En)){o=kn(i,n),a=bn(r.materials||[]);try{for(a.s();!(s=a.n()).done;)u=s.value,(l=n.getObjectExtension(u,En))&&(u.technique=Object.assign({},l,o[l.technique]),u.technique.values=In(u.technique,n)),n.removeObjectExtension(u,En)}catch(c){a.e(c)}finally{a.f()}n.removeExtension(En)}case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Cn(t,e){return Tn.apply(this,arguments)}function Tn(){return(Tn=xn(vn().mark((function t(e,n){return vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kn(t,e){var n=t.programs,r=void 0===n?[]:n,i=t.shaders,o=void 0===i?[]:i,a=t.techniques,s=void 0===a?[]:a,u=new TextDecoder;return o.forEach((function(t){if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=u.decode(e.getTypedArrayForBufferView(t.bufferView))})),r.forEach((function(t){t.fragmentShader=o[t.fragmentShader],t.vertexShader=o[t.vertexShader]})),s.forEach((function(t){t.program=r[t.program]})),s}function In(t,e){var n=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach((function(e){t.uniforms[e].value&&!(e in n)&&(n[e]=t.uniforms[e].value)})),Object.keys(n).forEach((function(t){"object"===An(n[t])&&void 0!==n[t].index&&(n[t].texture=e.getTexture(n[t].index))})),n}function Ln(t){return Ln="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},Ln(t)}function jn(){jn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Ln(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Mn(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Rn(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Mn(o,r,i,a,s,"next",t)}function s(t){Mn(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Nn(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Dn(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 Dn(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Dn(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 Fn=[r,i,o,a,s,u,l];function Bn(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=Fn.filter((function(t){return Gn(t.name,n)})),o=Nn(i);try{for(o.s();!(e=o.n()).done;){var a,s=e.value;null===(a=s.preprocess)||void 0===a||a.call(s,t,n,r)}}catch(u){o.e(u)}finally{o.f()}}function zn(t){return Un.apply(this,arguments)}function Un(){return Un=Rn(jn().mark((function t(e){var n,r,i,o,a,s,u,l=arguments;return jn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=l.length>1&&void 0!==l[1]?l[1]:{},r=l.length>2?l[2]:void 0,i=Fn.filter((function(t){return Gn(t.name,n)})),o=Nn(i),t.prev=4,o.s();case 6:if((a=o.n()).done){t.next=12;break}return s=a.value,t.next=10,null===(u=s.decode)||void 0===u?void 0:u.call(s,e,n,r);case 10:t.next=6;break;case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(4),o.e(t.t0);case 17:return t.prev=17,o.f(),t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[4,14,17,20]])}))),Un.apply(this,arguments)}function Gn(t,e){var n,r=(null===e||void 0===e||null===(n=e.gltf)||void 0===n?void 0:n.excludeExtensions)||{};return!(t in r&&!r[t])}function Vn(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return qn(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 qn(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function qn(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 Hn="KHR_binary_glTF";function Wn(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Xn(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 Xn(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xn(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 Yn(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)}}var Zn,Kn={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},$n={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},Jn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(ct.a)(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}),Object(ct.a)(this,"json",void 0)}var e,n,r;return e=t,(n=[{key:"normalize",value:function(t,e){this.json=t.json;var 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 ".concat(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){var e,n=new kt(t),r=n.json,i=Vn(r.images||[]);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=n.getObjectExtension(o,Hn);a&&Object.assign(o,a),n.removeObjectExtension(o,Hn)}}catch(s){i.e(s)}finally{i.f()}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,n.removeExtension(Hn)}(t),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}},{key:"_addAsset",value:function(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}},{key:"_convertTopLevelObjectsToArrays",value:function(t){for(var e in Kn)this._convertTopLevelObjectToArray(t,e)}},{key:"_convertTopLevelObjectToArray",value:function(t,e){var n=t[e];if(n&&!Array.isArray(n))for(var r in t[e]=[],n){var i=n[r];i.id=i.id||r;var o=t[e].length;t[e].push(i),this.idToIndexMap[e][r]=o}}},{key:"_convertObjectIdsToArrayIndices",value:function(t){for(var e in Kn)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));var n,r=Wn(t.textures);try{for(r.s();!(n=r.n()).done;){var i=n.value;this._convertTextureIds(i)}}catch(d){r.e(d)}finally{r.f()}var o,a=Wn(t.meshes);try{for(a.s();!(o=a.n()).done;){var s=o.value;this._convertMeshIds(s)}}catch(d){a.e(d)}finally{a.f()}var u,l=Wn(t.nodes);try{for(l.s();!(u=l.n()).done;){var c=u.value;this._convertNodeIds(c)}}catch(d){l.e(d)}finally{l.f()}var f,h=Wn(t.scenes);try{for(h.s();!(f=h.n()).done;){var p=f.value;this._convertSceneIds(p)}}catch(d){h.e(d)}finally{h.f()}}},{key:"_convertTextureIds",value:function(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}},{key:"_convertMeshIds",value:function(t){var e,n=Wn(t.primitives);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=r.attributes,o=r.indices,a=r.material;for(var s in i)i[s]=this._convertIdToIndex(i[s],"accessor");o&&(r.indices=this._convertIdToIndex(o,"accessor")),a&&(r.material=this._convertIdToIndex(a,"material"))}}catch(u){n.e(u)}finally{n.f()}}},{key:"_convertNodeIds",value:function(t){var e=this;t.children&&(t.children=t.children.map((function(t){return e._convertIdToIndex(t,"node")}))),t.meshes&&(t.meshes=t.meshes.map((function(t){return e._convertIdToIndex(t,"mesh")})))}},{key:"_convertSceneIds",value:function(t){var e=this;t.nodes&&(t.nodes=t.nodes.map((function(t){return e._convertIdToIndex(t,"node")})))}},{key:"_convertIdsToIndices",value:function(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute ".concat(e)),t[e]=[]);var n,r=Wn(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;for(var o in i){var a=i[o],s=this._convertIdToIndex(a,o);i[o]=s}}}catch(u){r.e(u)}finally{r.f()}}},{key:"_convertIdToIndex",value:function(t,e){var n=$n[e];if(n in this.idToIndexMap){var r=this.idToIndexMap[n][t];if(!Number.isFinite(r))throw new Error("gltf v1: failed to resolve ".concat(e," with id ").concat(t));return r}return t}},{key:"_updateObjects",value:function(t){var e,n=Wn(this.json.buffers);try{for(n.s();!(e=n.n()).done;)delete e.value.type}catch(r){n.e(r)}finally{n.f()}}},{key:"_updateMaterial",value:function(t){var e,n=Wn(t.materials);try{var r=function(){var n=e.value;n.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};var r=(null===(i=n.values)||void 0===i?void 0:i.tex)||(null===(o=n.values)||void 0===o?void 0:o.texture2d_0)||(null===(a=n.values)||void 0===a?void 0:a.diffuseTex),s=t.textures.findIndex((function(t){return t.id===r}));-1!==s&&(n.pbrMetallicRoughness.baseColorTexture={index:s})};for(n.s();!(e=n.n()).done;){var i,o,a;r()}}catch(s){n.e(s)}finally{n.f()}}}])&&Yn(e.prototype,n),r&&Yn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(new Jn).normalize(t,e)}function tr(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 er(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tr(Object(n),!0).forEach((function(e){ir(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function nr(t){return nr="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},nr(t)}function rr(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 ir(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var or={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ar={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},sr=10240,ur=10241,lr=10242,cr=10243,fr=10497,hr=9986,pr={magFilter:sr,minFilter:ur,wrapS:lr,wrapT:cr},dr=(ir(Zn={},sr,9729),ir(Zn,ur,hr),ir(Zn,lr,fr),ir(Zn,cr,fr),Zn);var mr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(ct.a)(this,"baseUri",""),Object(ct.a)(this,"json",{}),Object(ct.a)(this,"buffers",[]),Object(ct.a)(this,"images",[])}var e,n,r;return e=t,n=[{key:"postProcess",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.json,r=t.buffers,i=void 0===r?[]:r,o=t.images,a=void 0===o?[]:o,s=t.baseUri,u=void 0===s?"":s;return st(n),this.baseUri=u,this.json=n,this.buffers=i,this.images=a,this._resolveTree(this.json,e),this.json}},{key:"_resolveTree",value:function(t){var e=this;t.bufferViews&&(t.bufferViews=t.bufferViews.map((function(t,n){return e._resolveBufferView(t,n)}))),t.images&&(t.images=t.images.map((function(t,n){return e._resolveImage(t,n)}))),t.samplers&&(t.samplers=t.samplers.map((function(t,n){return e._resolveSampler(t,n)}))),t.textures&&(t.textures=t.textures.map((function(t,n){return e._resolveTexture(t,n)}))),t.accessors&&(t.accessors=t.accessors.map((function(t,n){return e._resolveAccessor(t,n)}))),t.materials&&(t.materials=t.materials.map((function(t,n){return e._resolveMaterial(t,n)}))),t.meshes&&(t.meshes=t.meshes.map((function(t,n){return e._resolveMesh(t,n)}))),t.nodes&&(t.nodes=t.nodes.map((function(t,n){return e._resolveNode(t,n)}))),t.skins&&(t.skins=t.skins.map((function(t,n){return e._resolveSkin(t,n)}))),t.scenes&&(t.scenes=t.scenes.map((function(t,n){return e._resolveScene(t,n)}))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}},{key:"getScene",value:function(t){return this._get("scenes",t)}},{key:"getNode",value:function(t){return this._get("nodes",t)}},{key:"getSkin",value:function(t){return this._get("skins",t)}},{key:"getMesh",value:function(t){return this._get("meshes",t)}},{key:"getMaterial",value:function(t){return this._get("materials",t)}},{key:"getAccessor",value:function(t){return this._get("accessors",t)}},{key:"getCamera",value:function(t){return null}},{key:"getTexture",value:function(t){return this._get("textures",t)}},{key:"getSampler",value:function(t){return this._get("samplers",t)}},{key:"getImage",value:function(t){return this._get("images",t)}},{key:"getBufferView",value:function(t){return this._get("bufferViews",t)}},{key:"getBuffer",value:function(t){return this._get("buffers",t)}},{key:"_get",value:function(t,e){if("object"===nr(e))return e;var n=this.json[t]&&this.json[t][e];return n||console.warn("glTF file error: Could not find ".concat(t,"[").concat(e,"]")),n}},{key:"_resolveScene",value:function(t,e){var n=this;return t.id=t.id||"scene-".concat(e),t.nodes=(t.nodes||[]).map((function(t){return n.getNode(t)})),t}},{key:"_resolveNode",value:function(t,e){var n=this;return t.id=t.id||"node-".concat(e),t.children&&(t.children=t.children.map((function(t){return n.getNode(t)}))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((function(t,e){var r=n.getMesh(e);return t.id=r.id,t.primitives=t.primitives.concat(r.primitives),t}),{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}},{key:"_resolveSkin",value:function(t,e){return t.id=t.id||"skin-".concat(e),t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}},{key:"_resolveMesh",value:function(t,e){var n=this;return t.id=t.id||"mesh-".concat(e),t.primitives&&(t.primitives=t.primitives.map((function(t){var e=(t=er({},t)).attributes;for(var r in t.attributes={},e)t.attributes[r]=n.getAccessor(e[r]);return void 0!==t.indices&&(t.indices=n.getAccessor(t.indices)),void 0!==t.material&&(t.material=n.getMaterial(t.material)),t}))),t}},{key:"_resolveMaterial",value:function(t,e){if(t.id=t.id||"material-".concat(e),t.normalTexture&&(t.normalTexture=er({},t.normalTexture),t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture=er({},t.occlustionTexture),t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture=er({},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=er({},t.pbrMetallicRoughness);var n=t.pbrMetallicRoughness;n.baseColorTexture&&(n.baseColorTexture=er({},n.baseColorTexture),n.baseColorTexture.texture=this.getTexture(n.baseColorTexture.index)),n.metallicRoughnessTexture&&(n.metallicRoughnessTexture=er({},n.metallicRoughnessTexture),n.metallicRoughnessTexture.texture=this.getTexture(n.metallicRoughnessTexture.index))}return t}},{key:"_resolveAccessor",value:function(t,e){var n,r;if(t.id=t.id||"accessor-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(n=t.componentType,ar[n]),t.components=(r=t.type,or[r]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){var i=t.bufferView.buffer,o=At(t,t.bufferView),a=o.ArrayType,s=o.byteLength,u=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+i.byteOffset,l=i.arrayBuffer.slice(u,u+s);t.bufferView.byteStride&&(l=this._getValueFromInterleavedBuffer(i,u,t.bufferView.byteStride,t.bytesPerElement,t.count)),t.value=new a(l)}return t}},{key:"_getValueFromInterleavedBuffer",value:function(t,e,n,r,i){for(var o=new Uint8Array(i*r),a=0;a<i;a++){var s=e+a*n;o.set(new Uint8Array(t.arrayBuffer.slice(s,s+r)),a*r)}return o.buffer}},{key:"_resolveTexture",value:function(t,e){return t.id=t.id||"texture-".concat(e),t.sampler="sampler"in t?this.getSampler(t.sampler):dr,t.source=this.getImage(t.source),t}},{key:"_resolveSampler",value:function(t,e){for(var n in t.id=t.id||"sampler-".concat(e),t.parameters={},t){var r=this._enumSamplerParameter(n);void 0!==r&&(t.parameters[r]=t[n])}return t}},{key:"_enumSamplerParameter",value:function(t){return pr[t]}},{key:"_resolveImage",value:function(t,e){t.id=t.id||"image-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));var n=this.images[e];return n&&(t.image=n),t}},{key:"_resolveBufferView",value:function(t,e){var n=t.buffer,r=er(er({id:"bufferView-".concat(e)},t),{},{buffer:this.buffers[n]}),i=this.buffers[n].arrayBuffer,o=this.buffers[n].byteOffset||0;return"byteOffset"in t&&(o+=t.byteOffset),r.data=new Uint8Array(i,o,t.byteLength),r}},{key:"_resolveCamera",value:function(t,e){return t.id=t.id||"camera-".concat(e),t.perspective,t.orthographic,t}}],n&&rr(e.prototype,n),r&&rr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function gr(t,e){return(new mr).postProcess(t,e)}var yr=n(172),vr=1735152710,br=1313821514,_r=5130562,Ar=!0;function wr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"".concat(String.fromCharCode(t.getUint8(e+0))).concat(String.fromCharCode(t.getUint8(e+1))).concat(String.fromCharCode(t.getUint8(e+2))).concat(String.fromCharCode(t.getUint8(e+3)))}function xr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new DataView(t),i=n.magic,o=void 0===i?vr:i,a=r.getUint32(e,!1);return a===o||a===vr}function Er(t,e,n){Object(yr.a)(t.header.byteLength>20);var r=e.getUint32(n+0,Ar),i=e.getUint32(n+4,Ar);return n+=8,Object(yr.a)(0===i),Sr(t,e,n,r),n+=r,n+=Pr(t,e,n,t.header.byteLength)}function Or(t,e,n,r){return Object(yr.a)(t.header.byteLength>20),function(t,e,n,r){for(;n+8<=t.header.byteLength;){var i=e.getUint32(n+0,Ar),o=e.getUint32(n+4,Ar);switch(n+=8,o){case br:Sr(t,e,n,i);break;case _r:Pr(t,e,n,i);break;case 0:r.strict||Sr(t,e,n,i);break;case 1:r.strict||Pr(t,e,n,i)}n+=Object(ht.b)(i,4)}}(t,e,n,r),n+t.header.byteLength}function Sr(t,e,n,r){var i=new Uint8Array(e.buffer,n,r),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),Object(ht.b)(r,4)}function Pr(t,e,n,r){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:n,byteLength:r,arrayBuffer:e.buffer}),Object(ht.b)(r,4)}function Cr(t){return Cr="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},Cr(t)}function Tr(){Tr=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Cr(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function kr(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Ir(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 Ir(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ir(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 Lr(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function jr(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Lr(o,r,i,a,s,"next",t)}function s(t){Lr(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Mr(t,e){return Rr.apply(this,arguments)}function Rr(){return Rr=jr(Tr().mark((function t(e,n){var r,i,o,a,s,u,l,c,f,h,p=arguments;return Tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p.length>2&&void 0!==p[2]?p[2]:0,i=p.length>3?p[3]:void 0,o=p.length>4?p[4]:void 0,Nr(e,n,r,i),Qn(e,{normalize:null===i||void 0===i||null===(a=i.gltf)||void 0===a?void 0:a.normalize}),Bn(e,i,o),c=[],null===i||void 0===i||null===(s=i.gltf)||void 0===s||!s.loadBuffers||!e.json.buffers){t.next=10;break}return t.next=10,Dr(e,i,o);case 10:return null!==i&&void 0!==i&&null!==(u=i.gltf)&&void 0!==u&&u.loadImages&&(f=Br(e,i,o),c.push(f)),h=zn(e,i,o),c.push(h),t.next=15,Promise.all(c);case 15:return t.abrupt("return",null!==i&&void 0!==i&&null!==(l=i.gltf)&&void 0!==l&&l.postProcess?gr(e,i):e);case 16:case"end":return t.stop()}}),t)}))),Rr.apply(this,arguments)}function Nr(t,e,n,r){(r.uri&&(t.baseUri=r.uri),e instanceof ArrayBuffer&&!xr(e,n,r))&&(e=(new TextDecoder).decode(e));if("string"===typeof e)t.json=Object(ot.a)(e);else if(e instanceof ArrayBuffer){var i={};n=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new DataView(e),i=wr(r,n+0),o=r.getUint32(n+4,Ar),a=r.getUint32(n+8,Ar);switch(Object.assign(t,{header:{byteOffset:n,byteLength:a,hasBinChunk:!1},type:i,version:o,json:{},binChunks:[]}),n+=12,t.version){case 1:return Er(t,r,n);case 2:return Or(t,r,n,{});default:throw new Error("Invalid GLB version ".concat(t.version,". Only supports v1 and v2."))}}(i,e,n,r.glb),st("glTF"===i.type,"Invalid GLB magic string ".concat(i.type)),t._glb=i,t.json=i.json}else st(!1,"GLTF: must be ArrayBuffer or string");var o=t.json.buffers||[];if(t.buffers=new Array(o.length).fill(null),t._glb&&t._glb.header.hasBinChunk){var a=t._glb.binChunks;t.buffers[0]={arrayBuffer:a[0].arrayBuffer,byteOffset:a[0].byteOffset,byteLength:a[0].byteLength}}var s=t.json.images||[];t.images=new Array(s.length).fill({})}function Dr(t,e,n){return Fr.apply(this,arguments)}function Fr(){return(Fr=jr(Tr().mark((function t(e,n,r){var i,o,a,s,u,l,c,f;return Tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=e.json.buffers||[],o=0;case 2:if(!(o<i.length)){t.next=22;break}if(!(a=i[o]).uri){t.next=18;break}return st(r.fetch),l=ut(a.uri,n),t.next=10,null===r||void 0===r||null===(s=r.fetch)||void 0===s?void 0:s.call(r,l);case 10:return c=t.sent,t.next=13,null===c||void 0===c||null===(u=c.arrayBuffer)||void 0===u?void 0:u.call(c);case 13:f=t.sent,e.buffers[o]={arrayBuffer:f,byteOffset:0,byteLength:f.byteLength},delete a.uri,t.next=19;break;case 18:null===e.buffers[o]&&(e.buffers[o]={arrayBuffer:new ArrayBuffer(a.byteLength),byteOffset:0,byteLength:a.byteLength});case 19:++o,t.next=2;break;case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Br(t,e,n){return zr.apply(this,arguments)}function zr(){return(zr=jr(Tr().mark((function t(e,n,r){var i,o,a,s,u,l;return Tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=Ur(e),o=e.json.images||[],a=[],s=kr(i);try{for(s.s();!(u=s.n()).done;)l=u.value,a.push(Gr(e,o[l],l,n,r))}catch(c){s.e(c)}finally{s.f()}return t.next=7,Promise.all(a);case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ur(t){var e,n=new Set,r=kr(t.json.textures||[]);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i.source&&n.add(i.source)}}catch(o){r.e(o)}finally{r.f()}return Array.from(n).sort()}function Gr(t,e,n,r,i){return Vr.apply(this,arguments)}function Vr(){return(Vr=jr(Tr().mark((function t(e,n,r,i,o){var a,s,u,l,c,f,h;return Tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=o.fetch,s=o.parse,!n.uri||n.hasOwnProperty("bufferView")){t.next=9;break}return l=ut(n.uri,i),t.next=5,a(l);case 5:return c=t.sent,t.next=8,c.arrayBuffer();case 8:u=t.sent;case 9:return Number.isFinite(n.bufferView)&&(f=lt(e.json,e.buffers,n.bufferView),u=Object(at.c)(f.buffer,f.byteOffset,f.byteLength)),st(u,"glTF image has no data"),t.next=13,s(u,[it.a,rt],{mimeType:n.mimeType,basis:i.basis||{format:J()}},o);case 13:(h=t.sent)&&h[0]&&(h={compressed:!0,mipmaps:!1,width:h[0].width,height:h[0].height,data:h[0]}),e.images=e.images||[],e.images[r]=h;case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qr(t){return qr="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},qr(t)}function Hr(){Hr=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==qr(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Wr(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 Xr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wr(Object(n),!0).forEach((function(e){Yr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Yr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zr(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Kr(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Zr(o,r,i,a,s,"next",t)}function s(t){Zr(o,r,i,a,s,"throw",t)}a(void 0)}))}}var $r={name:"glTF",id:"gltf",module:"gltf",version:"3.2.12",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:function(t){return Jr.apply(this,arguments)},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"}}};function Jr(){return Jr=Kr(Hr().mark((function t(e){var n,r,i,o,a,s=arguments;return Hr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=s.length>2?s[2]:void 0,(n=Xr(Xr({},$r.options),n)).gltf=Xr(Xr({},$r.options.gltf),n.gltf),i=n.byteOffset,o=void 0===i?0:i,a={},t.next=8,Mr(a,e,o,n,r);case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)}))),Jr.apply(this,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return qt}));var r=n(29),i=n(136),o=n(138),a=n(79),s=n(296);function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.a;Object(a.a)(t,"no worker provided");var n=t.version;return!(!e||!n)}var l=n(391),c=n(387);function f(t){return f="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},f(t)}function h(){h=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var c={};function p(){}function d(){}function m(){}var g={};s(g,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,i)&&(g=v);var b=m.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==f(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=m,s(b,"constructor",m),s(m,"constructor",d),d.displayName=s(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(A.prototype),s(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),s(b,a,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var p=h().mark(d);function d(t,e){var n,r,i,o,a;return h().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:n=(null===e||void 0===e?void 0:e.chunkSize)||262144,r=0,i=new TextEncoder;case 3:if(!(r<t.length)){s.next=11;break}return o=Math.min(t.length-r,n),a=t.slice(r,r+o),r+=o,s.next=9,i.encode(a);case 9:s.next=3;break;case 11:case"end":return s.stop()}}),p)}function m(t){return m="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},m(t)}function g(){g=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,i)&&(d=v);var b=p.prototype=f.prototype=Object.create(d);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==m(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=p,s(b,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(A.prototype),s(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),s(b,a,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}var y=g().mark(b),v=262144;function b(t){var e,n,r,i,o,a,s,u=arguments;return g().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:e=u.length>1&&void 0!==u[1]?u[1]:{},n=e.chunkSize,r=void 0===n?v:n,i=0;case 3:if(!(i<t.byteLength)){l.next=14;break}return o=Math.min(t.byteLength-i,r),a=new ArrayBuffer(o),s=new Uint8Array(t,i,o),new Uint8Array(a).set(s),i+=o,l.next=12,a;case 12:l.next=3;break;case 14:case"end":return l.stop()}}),y)}function _(t){return _="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 A(){A=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==_(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function w(t){return new O(t)}function x(t){return function(){return new E(t.apply(this,arguments))}}function E(t){var e,n;function r(e,n){try{var o=t[e](n),a=o.value,s=a instanceof O;Promise.resolve(s?a.wrapped:a).then((function(t){s?r("return"===e?"return":"next",t):i(o.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(u){i("throw",u)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(o,a){var s={key:t,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(e=n=s,r(t,i))}))},"function"!==typeof t.return&&(this.return=void 0)}function O(t){this.wrapped=t}E.prototype["function"===typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},E.prototype.next=function(t){return this._invoke("next",t)},E.prototype.throw=function(t){return this._invoke("throw",t)},E.prototype.return=function(t){return this._invoke("return",t)};var S=1048576;function P(){return(P=x(A().mark((function t(e,n){var r,i,o,a;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(null===n||void 0===n?void 0:n.chunkSize)||S,i=0;case 2:if(!(i<e.size)){t.next=12;break}return o=i+r,t.next=6,w(e.slice(i,o).arrayBuffer());case 6:return a=t.sent,i=o,t.next=10,a;case 10:t.next=2;break;case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var C=n(149),T=n(150);function k(t){return k="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},k(t)}function I(){I=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==k(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function L(t){var e,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(e=t[n]))return e.call(t);if(r&&null!=(e=t[r]))return new j(e.call(t));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function j(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return j=function(t){this.s=t,this.n=t.next},j.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var n=this.s.return;return void 0===n?Promise.resolve({value:t,done:!0}):e(n.apply(this.s,arguments))},throw:function(t){var n=this.s.return;return void 0===n?Promise.reject(t):e(n.apply(this.s,arguments))}},new j(t)}function M(t){return new D(t)}function R(t){return function(){return new N(t.apply(this,arguments))}}function N(t){var e,n;function r(e,n){try{var o=t[e](n),a=o.value,s=a instanceof D;Promise.resolve(s?a.wrapped:a).then((function(t){s?r("return"===e?"return":"next",t):i(o.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(u){i("throw",u)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(o,a){var s={key:t,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(e=n=s,r(t,i))}))},"function"!==typeof t.return&&(this.return=void 0)}function D(t){this.wrapped=t}function F(t,e){return C.a?function(t,e){return B.apply(this,arguments)}(t,e):function(t,e){return z.apply(this,arguments)}(t,e)}function B(){return(B=R(I().mark((function t(e,n){var r,i,o,a,s,u;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.getReader(),t.prev=1;case 2:return o=i||r.read(),null!==n&&void 0!==n&&n._streamReadAhead&&(i=r.read()),t.next=7,M(o);case 7:if(a=t.sent,s=a.done,u=a.value,!s){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,Object(T.d)(u);case 14:t.next=2;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(1),r.releaseLock();case 21:case"end":return t.stop()}}),t,null,[[1,18]])})))).apply(this,arguments)}function z(){return(z=R(I().mark((function t(e,n){var r,i,o,a,s,u;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!1,i=!1,t.prev=2,a=L(e);case 4:return t.next=6,M(a.next());case 6:if(!(r=!(s=t.sent).done)){t.next=13;break}return u=s.value,t.next=10,Object(T.d)(u);case 10:r=!1,t.next=4;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(2),i=!0,o=t.t0;case 19:if(t.prev=19,t.prev=20,!r||null==a.return){t.next=24;break}return t.next=24,M(a.return());case 24:if(t.prev=24,!i){t.next=27;break}throw o;case 27:return t.finish(24);case 28:return t.finish(19);case 29:case"end":return t.stop()}}),t,null,[[2,15,19,29],[20,,24,28]])})))).apply(this,arguments)}function U(t,e){if("string"===typeof t)return d(t,e);if(t instanceof ArrayBuffer)return b(t,e);if(Object(r.b)(t))return function(t,e){return P.apply(this,arguments)}(t,e);if(Object(r.h)(t))return F(t,e);if(Object(r.i)(t))return F(t.body,e);throw new Error("makeIterator")}N.prototype["function"===typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},N.prototype.next=function(t){return this._invoke("next",t)},N.prototype.throw=function(t){return this._invoke("throw",t)},N.prototype.return=function(t){return this._invoke("return",t)};var G=n(175);function V(t){return V="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},V(t)}function q(){q=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==V(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function H(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function W(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){H(o,r,i,a,s,"next",t)}function s(t){H(o,r,i,a,s,"throw",t)}a(void 0)}))}}var X="Cannot convert supplied data type";function Y(t,e,n){if(e.text&&"string"===typeof t)return t;if(Object(r.c)(t)&&(t=t.buffer),t instanceof ArrayBuffer){var i=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(i):i}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);var o=t.buffer,a=t.byteLength||t.length;return 0===t.byteOffset&&a===o.byteLength||(o=o.slice(t.byteOffset,t.byteOffset+a)),o}throw new Error(X)}function Z(t,e,n){return K.apply(this,arguments)}function K(){return(K=W(q().mark((function t(e,n,i){var o,a;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!==typeof e&&!o){t.next=3;break}return t.abrupt("return",Y(e,n));case 3:if(!Object(r.b)(e)){t.next=7;break}return t.next=6,Object(G.b)(e);case 6:e=t.sent;case 7:if(!Object(r.i)(e)){t.next=21;break}return a=e,t.next=11,Object(G.a)(a);case 11:if(!n.binary){t.next=17;break}return t.next=14,a.arrayBuffer();case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,a.text();case 19:t.t0=t.sent;case 20:return t.abrupt("return",t.t0);case 21:if(Object(r.h)(e)&&(e=U(e,i)),!Object(r.d)(e)&&!Object(r.a)(e)){t.next=24;break}return t.abrupt("return",Object(c.a)(e));case 24:throw new Error(X);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $(t){return function(t){if(Array.isArray(t))return J(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)return;if("string"===typeof t)return J(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 J(t,e)}(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.")}()}function J(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 Q(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 tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){et(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(n)return n;var r=tt({fetch:Object(o.a)(e,t)},t);return Array.isArray(r.loaders)||(r.loaders=null),r}function rt(t,e){if(!e&&t&&!Array.isArray(t))return t;var n;if(t&&(n=Array.isArray(t)?t:[t]),e&&e.loaders){var r=Array.isArray(e.loaders)?e.loaders:[e.loaders];n=n?[].concat($(n),$(r)):r}return n&&n.length?n:null}var it=n(152),ot=n(37),at=new(n(1135).a)({id:"loaders.gl"}),st=n(561);function ut(){ut=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ht(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}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 ct(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){ft(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}function ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ht(t){return ht="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},ht(t)}function pt(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=mt(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function dt(t){return function(t){if(Array.isArray(t))return gt(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||mt(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.")}()}function mt(t,e){if(t){if("string"===typeof t)return gt(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)?gt(t,e):void 0}}function gt(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 yt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function vt(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){yt(o,r,i,a,s,"next",t)}function s(t){yt(o,r,i,a,s,"throw",t)}a(void 0)}))}}var bt=/\.([^.]+)$/;function _t(t){return At.apply(this,arguments)}function At(){return At=vt(ut().mark((function t(e){var n,i,o,a,s=arguments;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:[],i=s.length>2?s[2]:void 0,o=s.length>3?s[3]:void 0,Et(e)){t.next=5;break}return t.abrupt("return",null);case 5:if(!(a=wt(e,n,ct(ct({},i),{},{nothrow:!0}),o))){t.next=8;break}return t.abrupt("return",a);case 8:if(!Object(r.b)(e)){t.next=13;break}return t.next=11,e.slice(0,10).arrayBuffer();case 11:e=t.sent,a=wt(e,n,i,o);case 13:if(a||null!==i&&void 0!==i&&i.nothrow){t.next=15;break}throw new Error(Ot(e));case 15:return t.abrupt("return",a);case 16:case"end":return t.stop()}}),t)}))),At.apply(this,arguments)}function wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!Et(t))return null;if(e&&!Array.isArray(e))return Object(i.b)(e);var o,a=[];(e&&(a=a.concat(e)),null!==n&&void 0!==n&&n.ignoreRegisteredLoaders)||(o=a).push.apply(o,dt(Object(st.a)()));St(a);var s=xt(t,a,n,r);if(!s&&(null===n||void 0===n||!n.nothrow))throw new Error(Ot(t));return s}function xt(t,e,n,r){var i,o=Object(it.b)(t),a=o.url,s=o.type,u=a||(null===r||void 0===r?void 0:r.url),l=null,c="";(null!==n&&void 0!==n&&n.mimeType&&(l=Pt(e,null===n||void 0===n?void 0:n.mimeType),c="match forced by supplied MIME type ".concat(null===n||void 0===n?void 0:n.mimeType)),l=l||function(t,e){var n=e&&bt.exec(e),r=n&&n[1];return r?function(t,e){e=e.toLowerCase();var n,r=pt(t);try{for(r.s();!(n=r.n()).done;){var i,o=n.value,a=pt(o.extensions);try{for(a.s();!(i=a.n()).done;){if(i.value.toLowerCase()===e)return o}}catch(s){a.e(s)}finally{a.f()}}}catch(s){r.e(s)}finally{r.f()}return null}(t,r):null}(e,u),c=c||(l?"matched url ".concat(u):""),l=l||Pt(e,s),c=c||(l?"matched MIME type ".concat(s):""),l=l||function(t,e){if(!e)return null;var n,r=pt(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if("string"===typeof e){if(Ct(e,i))return i}else if(ArrayBuffer.isView(e)){if(Tt(e.buffer,e.byteOffset,i))return i}else if(e instanceof ArrayBuffer){if(Tt(e,0,i))return i}}}catch(o){r.e(o)}finally{r.f()}return null}(e,t),c=c||(l?"matched initial data ".concat(kt(t)):""),l=l||Pt(e,null===n||void 0===n?void 0:n.fallbackMimeType),c=c||(l?"matched fallback MIME type ".concat(s):""))&&at.log(1,"selectLoader selected ".concat(null===(i=l)||void 0===i?void 0:i.name,": ").concat(c,"."));return l}function Et(t){return!(t instanceof Response&&204===t.status)}function Ot(t){var e=Object(it.b)(t),n=e.url,r=e.type,i="No valid loader found (";i+=n?"".concat(ot.a.filename(n),", "):"no url provided, ",i+="MIME type: ".concat(r?'"'.concat(r,'"'):"not provided",", ");var o=t?kt(t):"";return i+=o?' first bytes: "'.concat(o,'"'):"first bytes: not available",i+=")"}function St(t){var e,n=pt(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;Object(i.b)(r)}}catch(o){n.e(o)}finally{n.f()}}function Pt(t,e){var n,r=pt(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.mimeTypes&&i.mimeTypes.includes(e))return i;if(e==="application/x.".concat(i.id))return i}}catch(o){r.e(o)}finally{r.f()}return null}function Ct(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some((function(e){return t.startsWith(e)}))}function Tt(t,e,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some((function(r){return function(t,e,n,r){if(r instanceof ArrayBuffer)return Object(T.a)(r,t,r.byteLength);switch(ht(r)){case"function":return r(t,n);case"string":return r===It(t,e,r.length);default:return!1}}(t,e,n,r)}))}function kt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return It(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var n=0;return It(t,n,e)}return""}function It(t,e,n){if(t.byteLength<e+n)return"";for(var r=new DataView(t),i="",o=0;o<n;o++)i+=String.fromCharCode(r.getUint8(e+o));return i}function Lt(){Lt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==jt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function jt(t){return jt="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},jt(t)}function Mt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Rt(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Mt(o,r,i,a,s,"next",t)}function s(t){Mt(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Nt(t,e,n,r){return Dt.apply(this,arguments)}function Dt(){return(Dt=Rt(Lt().mark((function t(e,n,r,s){var u,l,c,f;return Lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(a.a)(!s||"object"===jt(s)),!n||Array.isArray(n)||Object(i.a)(n)||(s=void 0,r=n,n=void 0),t.next=4,e;case 4:return e=t.sent,r=r||{},u=Object(it.b)(e),l=u.url,c=rt(n,s),t.next=11,_t(e,c,r);case 11:if(f=t.sent){t.next=14;break}return t.abrupt("return",null);case 14:return r=Object(o.c)(r,f,c,l),s=nt({url:l,parse:Nt,loaders:c},r,s),t.next=18,Ft(f,e,r,s);case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ft(t,e,n,r){return Bt.apply(this,arguments)}function Bt(){return(Bt=Rt(Lt().mark((function t(e,n,i,o){var s,c,f,h,p,d,m,g;return Lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(e),Object(r.i)(n)&&(c=(s=n).ok,f=s.redirected,h=s.status,p=s.statusText,d=s.type,m=s.url,g=Object.fromEntries(s.headers.entries()),o.response={headers:g,ok:c,redirected:f,status:h,statusText:p,type:d,url:m}),t.next=4,Z(n,e,i);case 4:if(n=t.sent,!e.parseTextSync||"string"!==typeof n){t.next=8;break}return i.dataType="text",t.abrupt("return",e.parseTextSync(n,i,o,e));case 8:if(!Object(l.a)(e,i)){t.next=12;break}return t.next=11,Object(l.b)(e,n,i,o,Nt);case 11:case 15:case 19:return t.abrupt("return",t.sent);case 12:if(!e.parseText||"string"!==typeof n){t.next=16;break}return t.next=15,e.parseText(n,i,o,e);case 16:if(!e.parse){t.next=20;break}return t.next=19,e.parse(n,i,o,e);case 20:throw Object(a.a)(!e.parseSync),new Error("".concat(e.id," loader - no parser found and worker is disabled"));case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zt(t){return zt="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},zt(t)}function Ut(){Ut=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==zt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function Gt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Vt(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Gt(o,r,i,a,s,"next",t)}function s(t){Gt(o,r,i,a,s,"throw",t)}a(void 0)}))}}function qt(t,e,n,r){return Ht.apply(this,arguments)}function Ht(){return(Ht=Vt(Ut().mark((function t(e,n,a,s){var u,l;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(n)||Object(i.a)(n)||(void 0,a=n,n=void 0),u=Object(o.a)(a),l=e,"string"!==typeof e){t.next=7;break}return t.next=6,u(e);case 6:l=t.sent;case 7:if(!Object(r.b)(e)){t.next=11;break}return t.next=10,u(e);case 10:l=t.sent;case 11:return t.next=13,Nt(l,n,a);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return $}));var r=n(172),i=n(149),o=globalThis._parseImageNode,a="undefined"!==typeof Image,s="undefined"!==typeof ImageBitmap,u=Boolean(o),l=!!i.a||u;function c(t){return c="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},c(t)}function f(t){var e=p(t);if(!e)throw new Error("Not an image");return e}function h(t){switch(f(t)){case"data":return t;case"image":case"imagebitmap":var 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 p(t){return"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&t instanceof Image?"image":t&&"object"===c(t)&&t.data&&t.width&&t.height?"data":null}var d=/^data:image\/svg\+xml/,m=/\.svg((\?|#).*)?$/;function g(t){return t&&(d.test(t)||m.test(t))}function y(t,e){if(g(e)){var n=(new TextDecoder).decode(t);try{"function"===typeof unescape&&"function"===typeof encodeURIComponent&&(n=unescape(encodeURIComponent(n)))}catch(r){throw new Error(r.message)}return"data:image/svg+xml;base64,".concat(btoa(n))}return v(t,e)}function v(t,e){if(g(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}function b(t){return b="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},b(t)}function _(){_=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==b(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(A.prototype),s(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function A(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,s,"next",t)}function s(t){A(o,r,i,a,s,"throw",t)}a(void 0)}))}}function x(t,e,n){return E.apply(this,arguments)}function E(){return(E=w(_().mark((function t(e,n,r){var i,o,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=y(e,r),o=self.URL||self.webkitURL,a="string"!==typeof i&&o.createObjectURL(i),t.prev=3,t.next=6,O(a||i,n);case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,a&&o.revokeObjectURL(a),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[3,,7,10]])})))).apply(this,arguments)}function O(t,e){return S.apply(this,arguments)}function S(){return(S=w(_().mark((function t(e,n){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=new Image).src=e,!(n.image&&n.image.decode&&r.decode)){t.next=6;break}return t.next=5,r.decode();case 5:return t.abrupt("return",r);case 6:return t.next=8,new Promise((function(t,n){try{r.onload=function(){return t(r)},r.onerror=function(t){return n(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(i){n(i)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(t){return P="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},P(t)}function C(){C=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==P(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function T(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function k(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){T(o,r,i,a,s,"next",t)}function s(t){T(o,r,i,a,s,"throw",t)}a(void 0)}))}}var I={},L=!0;function j(t,e,n){return M.apply(this,arguments)}function M(){return(M=k(C().mark((function t(e,n,r){var i,o,a;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!g(r)){t.next=7;break}return t.next=3,x(e,n,r);case 3:o=t.sent,i=o,t.next=8;break;case 7:i=v(e,r);case 8:return a=n&&n.imagebitmap,t.next=11,R(i,a);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(t){return N.apply(this,arguments)}function N(){return N=k(C().mark((function t(e){var n,r=arguments;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!D(n=r.length>1&&void 0!==r[1]?r[1]:null)&&L||(n=null),!n){t.next=13;break}return t.prev=3,t.next=6,createImageBitmap(e,n);case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(3),console.warn(t.t0),L=!1;case 13:return t.next=15,createImageBitmap(e);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[3,9]])}))),N.apply(this,arguments)}function D(t){for(var e in t||I)return!1;return!0}var F=n(309);function B(t){return B="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},B(t)}function z(){z=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==B(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function U(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function G(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){U(o,r,i,a,s,"next",t)}function s(t){U(o,r,i,a,s,"throw",t)}a(void 0)}))}}function V(t,e){return q.apply(this,arguments)}function q(){return(q=G(z().mark((function t(e,n){var i,o,a;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Object(F.a)(e)||{},o=i.mimeType,a=globalThis._parseImageNode,Object(r.a)(a),t.next=5,a(e,o);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(t){return H="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},H(t)}function W(){W=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var c={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=p.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==H(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,s(y,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}function X(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void n(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Y(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){X(o,r,i,a,s,"next",t)}function s(t){X(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Z(){return(Z=Y(W().mark((function t(e,n,i){var o,a,s,u,l;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=(n=n||{}).image||{},a=o.type||"auto",s=(i||{}).url,u=K(a),t.t0=u,t.next="imagebitmap"===t.t0?8:"image"===t.t0?12:"data"===t.t0?16:20;break;case 8:return t.next=10,j(e,n,s);case 10:return l=t.sent,t.abrupt("break",21);case 12:return t.next=14,x(e,n,s);case 14:return l=t.sent,t.abrupt("break",21);case 16:return t.next=18,V(e,n);case 18:return l=t.sent,t.abrupt("break",21);case 20:Object(r.a)(!1);case 21:return"data"===a&&(l=h(l)),t.abrupt("return",l);case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(t){switch(t){case"auto":case"data":return function(){if(s)return"imagebitmap";if(a)return"image";if(l)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return s||a||l;case"imagebitmap":return s;case"image":return a;case"data":return l;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}var $={id:"image",module:"images",name:"Images",version:"3.2.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:function(t,e,n){return Z.apply(this,arguments)},tests:[function(t){return Boolean(Object(F.a)(new DataView(t)))}],options:{image:{type:"auto",decode:!0}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var r=n(317);const i="void main() {gl_FragColor = vec4(0);}",o="out vec4 transform_output;\nvoid main() {\n  transform_output = vec4(0);\n}",a="#version 300 es\n".concat(o);function s(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 u(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{version:e=100,input:n,inputType:r,output:s}=t;if(!n)return 300===e?a:e>300?"#version ".concat(e,"\n").concat(o):i;const u=l(n,r);return e>=300?"#version ".concat(e," ").concat(300===e?"es":"","\nin ").concat(r," ").concat(n,";\nout vec4 ").concat(s,";\nvoid main() {\n  ").concat(s," = ").concat(u,";\n}"):"varying ".concat(r," ").concat(n,";\nvoid main() {\n  gl_FragColor = ").concat(u,";\n}")}function l(t,e){switch(e){case"float":return"vec4(".concat(t,", 0.0, 0.0, 1.0)");case"vec2":return"vec4(".concat(t,", 0.0, 1.0)");case"vec3":return"vec4(".concat(t,", 1.0)");case"vec4":return t;default:return Object(r.a)(!1),null}}var c=n(6),f=n(50),h=n(1431),p=n(10);class d{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{varyings:e}=this;return e.length>0&&(t=Object.assign({},t,{varyings:e})),t}getDrawOptions(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t)}getBuffer(t){const{feedbackBuffers:e}=this.bindings[this.currentIndex],n=t?e[t]:null;return n?n instanceof f.a?n:n.buffer:null}getData(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t),this.varyings=t.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&Object(p.a)(Object(c.j)(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:a,accessor:s}=i;n[r]=this._createNewBuffer(r,{byteLength:o,usage:a,accessor:s})}}return n}_setupBuffers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:e=null}=t;Object.assign(this.feedbackMap,t.feedbackMap);const n=this._getFeedbackBuffers(t);this._updateBindings({sourceBuffers:e,feedbackBuffers:n})}_setupTransformFeedback(t,e){let{model:n}=e;const{program:r}=n;t.transformFeedback=new h.a(this.gl,{program:r,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],Object(p.a)(n[i]instanceof f.a)}return{sourceBuffers:e,feedbackBuffers:n}}_createNewBuffer(t,e){const n=new f.a(this.gl,e);return this.resources[t]&&this.resources[t].delete(),this.resources[t]=n,n}_getNextIndex(){return(this.currentIndex+1)%2}}var m=n(411),g=n(173),y=n(123),v=n(562);function b(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 _=n(323);const A={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},w="transform_uSampler_",x="transform_uSize_",E="transform_position";function O(t){let{vs:e,sourceTextureMap:n,targetTextureVarying:i,targetTexture:o}=t;let a=Object.keys(n).length,u=null;const l={};let c=e,f={};if(a>0||i){const t=c.split("\n"),e=t.slice();if(t.forEach(((t,o,c)=>{if(a>0){const i=function(t,e){const n={},i=function(t){return s(t,["attribute","in"])}(t);if(!i)return null;const{type:o,name:a}=i;if(a&&e[a]){const e="// ".concat(t," => Replaced by Transform with a sampler"),{samplerName:i,sizeName:s,uniformDeclerations:u}=function(t){const e="".concat(w).concat(t),n="".concat(x).concat(t),r="  uniform sampler2D ".concat(e,";\n  uniform vec2 ").concat(n,";");return{samplerName:e,sizeName:n,uniformDeclerations:r}}(a),l=function(t){switch(t){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return Object(r.a)(!1),null}}(o),c="  ".concat(o," ").concat(a," = transform_getInput(").concat(i,", ").concat(s,").").concat(l,";\n");n[i]=a;return{updatedLine:e,inject:{"vs:#decl":u,"vs:#main-start":c},samplerTextureMap:n}}return null}(t,n);if(i){const{updatedLine:t,inject:n}=i;e[o]=t,f=Object(_.b)([f,n]),Object.assign(l,i.samplerTextureMap),a--}}i&&!u&&(u=function(t,e){const n=s(t,["varying","out"]);if(!n)return null;return n.name===e?n.type:null}(t,i))})),i){Object(p.a)(o);const t="".concat(x).concat(i),e={"vs:#decl":"uniform vec2 ".concat(t,";\n"),"vs:#main-start":"     vec2 ".concat(E," = transform_getPos(").concat(t,");\n     gl_Position = vec4(").concat(E,", 0, 1.);\n")};f=Object(_.b)([f,e])}c=e.join("\n")}return{vs:c,targetTextureType:u,inject:f,samplerTextureMap:l}}const S={10241:9728,10240:9728,10242:33071,10243:33071};class P{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this._processVertexShader(t);return Object.assign({},t,e)}getDrawOptions(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:e,sourceTextures:n,framebuffer:r,targetTexture:i}=this.bindings[this.currentIndex],o=Object.assign({},e,t.attributes),a=Object.assign({},t.uniforms),s=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];a[e]=n[t]}this._setSourceTextureParameters();const t=function(t){let{sourceTextureMap:e,targetTextureVarying:n,targetTexture:r}=t;const i={};let o,a;n&&(({width:o,height:a}=r),i["".concat(x).concat(n)]=[o,a]);for(const s in e)({width:o,height:a}=e[s]),i["".concat(x).concat(s)]=[o,a];return i}({sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:i});Object.assign(a,t)}return this.hasTargetTexture&&(u=!1,s.viewport=[0,0,r.width,r.height]),{attributes:o,framebuffer:r,uniforms:a,discard:u,parameters:s}}swap(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupTextures(t)}getTargetTexture(){const{targetTexture:t}=this.bindings[this.currentIndex];return t}getData(){let{packed:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{framebuffer:e}=this.bindings[this.currentIndex],n=Object(m.c)(e);if(!t)return n;const i=n.constructor,o=function(t){switch(t){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return Object(r.a)(!1),null}}(this.targetTextureType),a=new i(n.length*o/4);let s=0;for(let r=0;r<n.length;r+=4)for(let t=0;t<o;t++)a[s++]=n[r+t];return a}getFramebuffer(){return this.bindings[this.currentIndex].framebuffer}delete(){this.ownTexture&&this.ownTexture.delete(),this.elementIDBuffer&&this.elementIDBuffer.delete()}_initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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 g.a)return n;const r=e[n];return r?(this._targetRefTexName=n,this._createNewTexture(r)):null}_setupTextures(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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)}_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 f.a(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 y.a(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(S)}_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=Object(v.a)(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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceTextures:e,targetTexture:n}=this.bindings[this.currentIndex],{vs:r,uniforms:i,targetTextureType:o,inject:a,samplerTextureMap:s}=O({vs:t.vs,sourceTextureMap:e,targetTextureVarying:this.targetTextureVarying,targetTexture:n}),l=Object(_.b)([t.inject||{},a]);this.targetTextureType=o,this.samplerTextureMap=s;return{vs:r,fs:t._fs||u({version:b(r),input:this.targetTextureVarying,inputType:o,output:"transform_output"}),modules:this.hasSourceTextures||this.targetTextureVarying?[A].concat(t.modules||[]):t.modules,uniforms:i,inject:l}}}var C=n(73),T=n(366);class k{static isSupported(t){return Object(c.j)(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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();Object(p.a)(t,"Nothing to swap")}getBuffer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.bufferTransform&&this.bufferTransform.getBuffer(t)}getData(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{gl:e}=this;this._buildResourceTransforms(e,t),t=this._updateModelProps(t),this.model=new T.a(e,Object.assign({},t,{fs:t.fs||u({version:b(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(!Object(C.a)(t.feedbackBuffers)||!Object(C.a)(t.feedbackMap)||t.varyings&&t.varyings.length>0)return!0;return!1})(e)&&(this.bufferTransform=new d(t,e)),function(t){if(!Object(C.a)(t._sourceTextures)||t._targetTexture||t._targetTextureVarying)return!0;return!1}(e)&&(this.textureTransform=new P(t,e)),Object(p.a)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}_updateDrawOptions(t){let e=Object.assign({},t);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const r of n)e=Object.assign(e,r.getDrawOptions(e));return e}}},function(t,e,n){"use strict";n.r(e),n.d(e,"createFilter",(function(){return kt})),n.d(e,"defaultTheme",(function(){return Wt})),n.d(e,"mergeStyles",(function(){return Ht})),n.d(e,"components",(function(){return ft})),n.d(e,"NonceProvider",(function(){return he}));var r=n(35),i=n(38);var o=n(162),a=n(85),s=n(1053),u=n.n(s),l=n(39),c=n(40),f=n(84),h=n(1),p=n(0),d=n.n(p),m=n(128);function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(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 v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function _(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function A(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=b(t);if(e){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _(this,n)}}var w=function(){};function x(t,e){return e?"-"===e[0]?t+e:t+"__"+e:t}function E(t,e,n){var r=[n];if(e&&t)for(var i in e)e.hasOwnProperty(i)&&e[i]&&r.push("".concat(x(t,i)));return r.filter((function(t){return t})).map((function(t){return String(t).trim()})).join(" ")}var O=function(t){return Array.isArray(t)?t.filter(Boolean):"object"===Object(a.a)(t)&&null!==t?[t]:[]},S=function(t){return t.className,t.clearValue,t.cx,t.getStyles,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme,v({},Object(o.a)(t,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function P(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function C(t){return P(t)?window.pageYOffset:t.scrollTop}function T(t,e){P(t)?window.scrollTo(0,e):t.scrollTop=e}function k(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function I(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:w,i=C(t),o=e-i,a=10,s=0;function u(){var e=k(s+=a,i,o,n);T(t,e),s<n?window.requestAnimationFrame(u):r(t)}u()}function L(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}var j=!1,M={get passive(){return j=!0}},R="undefined"!==typeof window?window:{};R.addEventListener&&R.removeEventListener&&(R.addEventListener("p",w,M),R.removeEventListener("p",w,!1));var N=j;function D(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,o=t.shouldScroll,a=t.isFixedPosition,s=t.theme.spacing,u=function(t){var e=getComputedStyle(t),n="absolute"===e.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===e.position)return i;for(var o=t;o=o.parentElement;)if(e=getComputedStyle(o),(!n||"static"!==e.position)&&r.test(e.overflow+e.overflowY+e.overflowX))return o;return i}(n),l={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return l;var c=u.getBoundingClientRect().height,f=n.getBoundingClientRect(),h=f.bottom,p=f.height,d=f.top,m=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,y=C(u),v=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),_=m-b,A=g-d,w=_+y,x=c-y-d,E=h-g+y+v,O=y+d-b,S=160;switch(i){case"auto":case"bottom":if(A>=p)return{placement:"bottom",maxHeight:e};if(x>=p&&!a)return o&&I(u,E,S),{placement:"bottom",maxHeight:e};if(!a&&x>=r||a&&A>=r)return o&&I(u,E,S),{placement:"bottom",maxHeight:a?A-v:x-v};if("auto"===i||a){var P=e,k=a?_:w;return k>=r&&(P=Math.min(k-v-s.controlHeight,e)),{placement:"top",maxHeight:P}}if("bottom"===i)return o&&T(u,E),{placement:"bottom",maxHeight:e};break;case"top":if(_>=p)return{placement:"top",maxHeight:e};if(w>=p&&!a)return o&&I(u,O,S),{placement:"top",maxHeight:e};if(!a&&w>=r||a&&_>=r){var L=e;return(!a&&w>=r||a&&_>=r)&&(L=a?_-b:w-b),o&&I(u,O,S),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return l}var F=function(t){return"auto"===t?"bottom":t},B=Object(p.createContext)({getPortalPlacement:null}),z=function(t){Object(f.a)(n,t);var e=A(n);function n(){var t;Object(l.a)(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))).state={maxHeight:t.props.maxMenuHeight,placement:null},t.getPlacement=function(e){var n=t.props,r=n.minMenuHeight,i=n.maxMenuHeight,o=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,u=n.theme;if(e){var l="fixed"===a,c=D({maxHeight:i,menuEl:e,minHeight:r,placement:o,shouldScroll:s&&!l,isFixedPosition:l,theme:u}),f=t.context.getPortalPlacement;f&&f(c),t.setState(c)}},t.getUpdatedProps=function(){var e=t.props.menuPlacement,n=t.state.placement||F(e);return v(v({},t.props),{},{placement:n,maxHeight:t.state.maxHeight})},t}return Object(c.a)(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(p.Component);z.contextType=B;var U=function(t){var e=t.theme,n=e.spacing.baseUnit;return{color:e.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},G=U,V=U,q=function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("noOptionsMessage",t),className:o({"menu-notice":!0,"menu-notice--no-options":!0},n)},s),e)};q.defaultProps={children:"No options"};var H=function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("loadingMessage",t),className:o({"menu-notice":!0,"menu-notice--loading":!0},n)},s),e)};H.defaultProps={children:"Loading..."};var W,X=function(t){Object(f.a)(n,t);var e=A(n);function n(){var t;Object(l.a)(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))).state={placement:null},t.getPortalPlacement=function(e){var n=e.placement;n!==F(t.props.menuPlacement)&&t.setState({placement:n})},t}return Object(c.a)(n,[{key:"render",value:function(){var t=this.props,e=t.appendTo,n=t.children,o=t.className,a=t.controlElement,s=t.cx,u=t.innerProps,l=t.menuPlacement,c=t.menuPosition,f=t.getStyles,h="fixed"===c;if(!e&&!h||!a)return null;var p=this.state.placement||F(l),d=function(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}(a),g=h?0:window.pageYOffset,y={offset:d[p]+g,position:c,rect:d},v=Object(i.jsx)("div",Object(r.a)({css:f("menuPortal",y),className:s({"menu-portal":!0},o)},u),n);return Object(i.jsx)(B.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},e?Object(m.createPortal)(v,e):v)}}]),n}(p.Component);var Y,Z,K={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},$=function(t){var e=t.size,n=Object(o.a)(t,["size"]);return Object(i.jsx)("svg",Object(r.a)({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:K},n))},J=function(t){return Object(i.jsx)($,Object(r.a)({size:20},t),Object(i.jsx)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Q=function(t){return Object(i.jsx)($,Object(r.a)({size:20},t),Object(i.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},tt=function(t){var e=t.isFocused,n=t.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:e?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:e?i.neutral80:i.neutral40}}},et=tt,nt=tt,rt=Object(i.keyframes)(W||(Y=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],Z||(Z=Y.slice(0)),W=Object.freeze(Object.defineProperties(Y,{raw:{value:Object.freeze(Z)}})))),it=function(t){var e=t.delay,n=t.offset;return Object(i.jsx)("span",{css:Object(i.css)({animation:"".concat(rt," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ot=function(t){var e=t.className,n=t.cx,o=t.getStyles,a=t.innerProps,s=t.isRtl;return Object(i.jsx)("div",Object(r.a)({css:o("loadingIndicator",t),className:n({indicator:!0,"loading-indicator":!0},e)},a),Object(i.jsx)(it,{delay:0,offset:s}),Object(i.jsx)(it,{delay:160,offset:!0}),Object(i.jsx)(it,{delay:320,offset:!s}))};ot.defaultProps={size:4};var at=function(t){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:t?0:1,outline:0,padding:0,color:"inherit"}},st=function(t){var e=t.children,n=t.innerProps;return Object(i.jsx)("div",n,e)},ut=st,lt=st;var ct=function(t){var e=t.children,n=t.className,r=t.components,o=t.cx,a=t.data,s=t.getStyles,u=t.innerProps,l=t.isDisabled,c=t.removeProps,f=t.selectProps,h=r.Container,p=r.Label,d=r.Remove;return Object(i.jsx)(i.ClassNames,null,(function(r){var m=r.css,g=r.cx;return Object(i.jsx)(h,{data:a,innerProps:v({className:g(m(s("multiValue",t)),o({"multi-value":!0,"multi-value--is-disabled":l},n))},u),selectProps:f},Object(i.jsx)(p,{data:a,innerProps:{className:g(m(s("multiValueLabel",t)),o({"multi-value__label":!0},n))},selectProps:f},e),Object(i.jsx)(d,{data:a,innerProps:v({className:g(m(s("multiValueRemove",t)),o({"multi-value__remove":!0},n))},c),selectProps:f}))}))};ct.defaultProps={cropWithEllipsis:!0};var ft={ClearIndicator:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("clearIndicator",t),className:o({indicator:!0,"clear-indicator":!0},n)},s),e||Object(i.jsx)(J,null))},Control:function(t){var e=t.children,n=t.cx,o=t.getStyles,a=t.className,s=t.isDisabled,u=t.isFocused,l=t.innerRef,c=t.innerProps,f=t.menuIsOpen;return Object(i.jsx)("div",Object(r.a)({ref:l,css:o("control",t),className:n({control:!0,"control--is-disabled":s,"control--is-focused":u,"control--menu-is-open":f},a)},c),e)},DropdownIndicator:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("dropdownIndicator",t),className:o({indicator:!0,"dropdown-indicator":!0},n)},s),e||Object(i.jsx)(Q,null))},DownChevron:Q,CrossIcon:J,Group:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.Heading,u=t.headingProps,l=t.innerProps,c=t.label,f=t.theme,h=t.selectProps;return Object(i.jsx)("div",Object(r.a)({css:a("group",t),className:o({group:!0},n)},l),Object(i.jsx)(s,Object(r.a)({},u,{selectProps:h,theme:f,getStyles:a,cx:o}),c),Object(i.jsx)("div",null,e))},GroupHeading:function(t){var e=t.getStyles,n=t.cx,a=t.className,s=S(t);s.data;var u=Object(o.a)(s,["data"]);return Object(i.jsx)("div",Object(r.a)({css:e("groupHeading",t),className:n({"group-heading":!0},a)},u))},IndicatorsContainer:function(t){var e=t.children,n=t.className,o=t.cx,a=t.innerProps,s=t.getStyles;return Object(i.jsx)("div",Object(r.a)({css:s("indicatorsContainer",t),className:o({indicators:!0},n)},a),e)},IndicatorSeparator:function(t){var e=t.className,n=t.cx,o=t.getStyles,a=t.innerProps;return Object(i.jsx)("span",Object(r.a)({},a,{css:o("indicatorSeparator",t),className:n({"indicator-separator":!0},e)}))},Input:function(t){var e=t.className,n=t.cx,a=t.getStyles,s=S(t),l=s.innerRef,c=s.isDisabled,f=s.isHidden,h=Object(o.a)(s,["innerRef","isDisabled","isHidden"]);return Object(i.jsx)("div",{css:a("input",t)},Object(i.jsx)(u.a,Object(r.a)({className:n({input:!0},e),inputRef:l,inputStyle:at(f),disabled:c},h)))},LoadingIndicator:ot,Menu:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerRef,u=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("menu",t),className:o({menu:!0},n),ref:s},u),e)},MenuList:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerProps,u=t.innerRef,l=t.isMulti;return Object(i.jsx)("div",Object(r.a)({css:a("menuList",t),className:o({"menu-list":!0,"menu-list--is-multi":l},n),ref:u},s),e)},MenuPortal:X,LoadingMessage:H,NoOptionsMessage:q,MultiValue:ct,MultiValueContainer:ut,MultiValueLabel:lt,MultiValueRemove:function(t){var e=t.children,n=t.innerProps;return Object(i.jsx)("div",n,e||Object(i.jsx)(J,{size:14}))},Option:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.isDisabled,u=t.isFocused,l=t.isSelected,c=t.innerRef,f=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("option",t),className:o({option:!0,"option--is-disabled":s,"option--is-focused":u,"option--is-selected":l},n),ref:c},f),e)},Placeholder:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("placeholder",t),className:o({placeholder:!0},n)},s),e)},SelectContainer:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.innerProps,u=t.isDisabled,l=t.isRtl;return Object(i.jsx)("div",Object(r.a)({css:a("container",t),className:o({"--is-disabled":u,"--is-rtl":l},n)},s),e)},SingleValue:function(t){var e=t.children,n=t.className,o=t.cx,a=t.getStyles,s=t.isDisabled,u=t.innerProps;return Object(i.jsx)("div",Object(r.a)({css:a("singleValue",t),className:o({"single-value":!0,"single-value--is-disabled":s},n)},u),e)},ValueContainer:function(t){var e=t.children,n=t.className,o=t.cx,a=t.innerProps,s=t.isMulti,u=t.getStyles,l=t.hasValue;return Object(i.jsx)("div",Object(r.a)({css:u("valueContainer",t),className:o({"value-container":!0,"value-container--is-multi":s,"value-container--has-value":l},n)},a),e)}},ht=n(282),pt=Number.isNaN||function(t){return"number"===typeof t&&t!==t};function dt(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(r=t[n],i=e[n],!(r===i||pt(r)&&pt(i)))return!1;var r,i;return!0}var mt=function(t,e){var n;void 0===e&&(e=dt);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&e(a,i)||(r=t.apply(this,a),o=!0,n=this,i=a),r}};for(var gt={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},yt=function(t){return Object(i.jsx)("span",Object(r.a)({css:gt},t))},vt={guidance:function(t){var e=t.isSearchable,n=t.isMulti,r=t.isDisabled,i=t.tabSelectsValue;switch(t.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(t["aria-label"]||"Select"," is focused ").concat(e?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var e=t.action,n=t.label,r=void 0===n?"":n,i=t.isDisabled;switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(t){var e=t.context,n=t.focused,r=void 0===n?{}:n,i=t.options,o=t.label,a=void 0===o?"":o,s=t.selectValue,u=t.isDisabled,l=t.isSelected,c=function(t,e){return t&&t.length?"".concat(t.indexOf(e)+1," of ").concat(t.length):""};if("value"===e&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if("menu"===e){var f=u?" disabled":"",h="".concat(l?"selected":"focused").concat(f);return"option ".concat(a," ").concat(h,", ").concat(c(i,r),".")}return""},onFilter:function(t){var e=t.inputValue,n=t.resultsMessage;return"".concat(n).concat(e?" for search term "+e:"",".")}},bt=function(t){var e=t.ariaSelection,n=t.focusedOption,r=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,u=t.selectProps,l=u.ariaLiveMessages,c=u.getOptionLabel,f=u.inputValue,h=u.isMulti,m=u.isOptionDisabled,g=u.isSearchable,y=u.menuIsOpen,b=u.options,_=u.screenReaderStatus,A=u.tabSelectsValue,w=u["aria-label"],x=u["aria-live"],E=Object(p.useMemo)((function(){return v(v({},vt),l||{})}),[l]),O=Object(p.useMemo)((function(){var t,n="";if(e&&E.onChange){var r=e.option,i=e.removedValue,o=e.value,a=i||r||(t=o,Array.isArray(t)?null:t),s=v({isDisabled:a&&m(a),label:a?c(a):""},e);n=E.onChange(s)}return n}),[e,m,c,E]),S=Object(p.useMemo)((function(){var t="",e=n||r,i=!!(n&&s&&s.includes(n));if(e&&E.onFocus){var o={focused:e,label:c(e),isDisabled:m(e),isSelected:i,options:b,context:e===n?"menu":"value",selectValue:s};t=E.onFocus(o)}return t}),[n,r,c,m,E,b,s]),P=Object(p.useMemo)((function(){var t="";if(y&&b.length&&E.onFilter){var e=_({count:o.length});t=E.onFilter({inputValue:f,resultsMessage:e})}return t}),[o,f,y,E,b,_]),C=Object(p.useMemo)((function(){var t="";if(E.guidance){var e=r?"value":y?"menu":"input";t=E.guidance({"aria-label":w,context:e,isDisabled:n&&m(n),isMulti:h,isSearchable:g,tabSelectsValue:A})}return t}),[w,n,r,h,m,g,y,E,A]),T="".concat(S," ").concat(P," ").concat(C);return Object(i.jsx)(yt,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text"},a&&Object(i.jsx)(d.a.Fragment,null,Object(i.jsx)("span",{id:"aria-selection"},O),Object(i.jsx)("span",{id:"aria-context"},T)))},_t=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],At=new RegExp("["+_t.map((function(t){return t.letters})).join("")+"]","g"),wt={},xt=0;xt<_t.length;xt++)for(var Et=_t[xt],Ot=0;Ot<Et.letters.length;Ot++)wt[Et.letters[Ot]]=Et.base;var St=function(t){return t.replace(At,(function(t){return wt[t]}))},Pt=mt(St),Ct=function(t){return t.replace(/^\s+|\s+$/g,"")},Tt=function(t){return"".concat(t.label," ").concat(t.value)},kt=function(t){return function(e,n){var r=v({ignoreCase:!0,ignoreAccents:!0,stringify:Tt,trim:!0,matchFrom:"any"},t),i=r.ignoreCase,o=r.ignoreAccents,a=r.stringify,s=r.trim,u=r.matchFrom,l=s?Ct(n):n,c=s?Ct(a(e)):a(e);return i&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=Pt(l),c=St(c)),"start"===u?c.substr(0,l.length)===l:c.indexOf(l)>-1}};function It(t){t.in,t.out,t.onExited,t.appear,t.enter,t.exit;var e=t.innerRef;t.emotion;var n=Object(o.a)(t,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return Object(i.jsx)("input",Object(r.a)({ref:e},n,{css:Object(i.css)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var Lt=["boxSizing","height","overflow","paddingRight","position"],jt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Mt(t){t.preventDefault()}function Rt(t){t.stopPropagation()}function Nt(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;0===t?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function Dt(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ft=!("undefined"===typeof window||!window.document||!window.document.createElement),Bt=0,zt={capture:!1,passive:!1};var Ut=function(){return document.activeElement&&document.activeElement.blur()},Gt={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Vt(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,o=function(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,o=t.onTopLeave,a=Object(p.useRef)(!1),s=Object(p.useRef)(!1),u=Object(p.useRef)(0),l=Object(p.useRef)(null),c=Object(p.useCallback)((function(t,e){if(null!==l.current){var u=l.current,c=u.scrollTop,f=u.scrollHeight,h=u.clientHeight,p=l.current,d=e>0,m=f-h-c,g=!1;m>e&&a.current&&(r&&r(t),a.current=!1),d&&s.current&&(o&&o(t),s.current=!1),d&&e>m?(n&&!a.current&&n(t),p.scrollTop=f,g=!0,a.current=!0):!d&&-e>c&&(i&&!s.current&&i(t),p.scrollTop=0,g=!0,s.current=!0),g&&function(t){t.preventDefault(),t.stopPropagation()}(t)}}),[]),f=Object(p.useCallback)((function(t){c(t,t.deltaY)}),[c]),h=Object(p.useCallback)((function(t){u.current=t.changedTouches[0].clientY}),[]),d=Object(p.useCallback)((function(t){var e=u.current-t.changedTouches[0].clientY;c(t,e)}),[c]),m=Object(p.useCallback)((function(t){if(t){var e=!!N&&{passive:!1};"function"===typeof t.addEventListener&&t.addEventListener("wheel",f,e),"function"===typeof t.addEventListener&&t.addEventListener("touchstart",h,e),"function"===typeof t.addEventListener&&t.addEventListener("touchmove",d,e)}}),[d,h,f]),g=Object(p.useCallback)((function(t){t&&("function"===typeof t.removeEventListener&&t.removeEventListener("wheel",f,!1),"function"===typeof t.removeEventListener&&t.removeEventListener("touchstart",h,!1),"function"===typeof t.removeEventListener&&t.removeEventListener("touchmove",d,!1))}),[d,h,f]);return Object(p.useEffect)((function(){if(e){var t=l.current;return m(t),function(){g(t)}}}),[e,m,g]),function(t){l.current=t}}({isEnabled:void 0===r||r,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),a=function(t){var e=t.isEnabled,n=t.accountForScrollbars,r=void 0===n||n,i=Object(p.useRef)({}),o=Object(p.useRef)(null),a=Object(p.useCallback)((function(t){if(Ft){var e=document.body,n=e&&e.style;if(r&&Lt.forEach((function(t){var e=n&&n[t];i.current[t]=e})),r&&Bt<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys(jt).forEach((function(t){var e=jt[t];n&&(n[t]=e)})),n&&(n.paddingRight="".concat(s,"px"))}e&&Dt()&&(e.addEventListener("touchmove",Mt,zt),t&&(t.addEventListener("touchstart",Nt,zt),t.addEventListener("touchmove",Rt,zt))),Bt+=1}}),[]),s=Object(p.useCallback)((function(t){if(Ft){var e=document.body,n=e&&e.style;Bt=Math.max(Bt-1,0),r&&Bt<1&&Lt.forEach((function(t){var e=i.current[t];n&&(n[t]=e)})),e&&Dt()&&(e.removeEventListener("touchmove",Mt,zt),t&&(t.removeEventListener("touchstart",Nt,zt),t.removeEventListener("touchmove",Rt,zt)))}}),[]);return Object(p.useEffect)((function(){if(e){var t=o.current;return a(t),function(){s(t)}}}),[e,a,s]),function(t){o.current=t}}({isEnabled:n});return Object(i.jsx)(d.a.Fragment,null,n&&Object(i.jsx)("div",{onClick:Ut,css:Gt}),e((function(t){o(t),a(t)})))}var qt={clearIndicator:nt,container:function(t){var e=t.isDisabled;return{label:"container",direction:t.isRtl?"rtl":null,pointerEvents:e?"none":null,position:"relative"}},control:function(t){var e=t.isDisabled,n=t.isFocused,r=t.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:e?i.neutral5:i.neutral0,borderColor:e?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:et,group:function(t){var e=t.theme.spacing;return{paddingBottom:2*e.baseUnit,paddingTop:2*e.baseUnit}},groupHeading:function(t){var e=t.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*e.baseUnit,paddingRight:3*e.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(t){var e=t.isDisabled,n=t.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:e?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(t){var e=t.isDisabled,n=t.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:e?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(t){var e=t.isFocused,n=t.size,r=t.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:e?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:V,menu:function(t){var e,n=t.placement,r=t.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return e={label:"menu"},Object(h.a)(e,function(t){return t?{bottom:"top",top:"bottom"}[t]:"bottom"}(n),"100%"),Object(h.a)(e,"backgroundColor",a.neutral0),Object(h.a)(e,"borderRadius",i),Object(h.a)(e,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Object(h.a)(e,"marginBottom",o.menuGutter),Object(h.a)(e,"marginTop",o.menuGutter),Object(h.a)(e,"position","absolute"),Object(h.a)(e,"width","100%"),Object(h.a)(e,"zIndex",1),e},menuList:function(t){var e=t.maxHeight,n=t.theme.spacing.baseUnit;return{maxHeight:e,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(t){var e=t.rect,n=t.offset,r=t.position;return{left:e.left,position:r,top:n,width:e.width,zIndex:1}},multiValue:function(t){var e=t.theme,n=e.spacing,r=e.borderRadius;return{label:"multiValue",backgroundColor:e.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(t){var e=t.theme,n=e.borderRadius,r=e.colors,i=t.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(t){var e=t.theme,n=e.spacing,r=e.borderRadius,i=e.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:t.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:G,option:function(t){var e=t.isDisabled,n=t.isFocused,r=t.isSelected,i=t.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:e?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!e&&(r?a.primary:a.primary50)}}},placeholder:function(t){var e=t.theme,n=e.spacing;return{label:"placeholder",color:e.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(t){var e=t.isDisabled,n=t.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:e?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(t){var e=t.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(e.baseUnit/2,"px ").concat(2*e.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};function Ht(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=v({},t);return Object.keys(e).forEach((function(r){t[r]?n[r]=function(n,i){return e[r](t[r](n,i),i)}:n[r]=e[r]})),n}var Wt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Xt={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:L(),captureMenuScroll:!L(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:kt(),formatGroupLabel:function(t){return t.label},getOptionLabel:function(t){return t.label},getOptionValue:function(t){return t.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(t){return!!t.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(1!==e?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Yt(t,e,n,r){return{type:"option",data:e,isDisabled:te(t,e,n),isSelected:ee(t,e,n),label:Jt(t,e),value:Qt(t,e),index:r}}function Zt(t,e){return t.options.map((function(n,r){if(n.options){var i=n.options.map((function(n,r){return Yt(t,n,e,r)})).filter((function(e){return $t(t,e)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Yt(t,n,e,r);return $t(t,o)?o:void 0})).filter((function(t){return!!t}))}function Kt(t){return t.reduce((function(t,e){return"group"===e.type?t.push.apply(t,Object(ht.a)(e.options.map((function(t){return t.data})))):t.push(e.data),t}),[])}function $t(t,e){var n=t.inputValue,r=void 0===n?"":n,i=e.data,o=e.isSelected,a=e.label,s=e.value;return(!re(t)||!o)&&ne(t,{label:a,value:s,data:i},r)}var Jt=function(t,e){return t.getOptionLabel(e)},Qt=function(t,e){return t.getOptionValue(e)};function te(t,e,n){return"function"===typeof t.isOptionDisabled&&t.isOptionDisabled(e,n)}function ee(t,e,n){if(n.indexOf(e)>-1)return!0;if("function"===typeof t.isOptionSelected)return t.isOptionSelected(e,n);var r=Qt(t,e);return n.some((function(e){return Qt(t,e)===r}))}function ne(t,e,n){return!t.filterOption||t.filterOption(e,n)}var re=function(t){var e=t.hideSelectedOptions,n=t.isMulti;return void 0===e?n:e},ie=1,oe=function(t){Object(f.a)(n,t);var e=A(n);function n(t){var r;return Object(l.a)(this,n),(r=e.call(this,t)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(t){r.controlRef=t},r.focusedOptionRef=null,r.getFocusedOptionRef=function(t){r.focusedOptionRef=t},r.menuListRef=null,r.getMenuListRef=function(t){r.menuListRef=t},r.inputRef=null,r.getInputRef=function(t){r.inputRef=t},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(t,e){var n=r.props,i=n.onChange,o=n.name;e.name=o,r.ariaOnChange(t,e),i(t,e)},r.setValue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=r.props,o=i.closeMenuOnSelect,a=i.isMulti;r.onInputChange("",{action:"set-value"}),o&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(t,{action:e,option:n})},r.selectOption=function(t){var e=r.props,n=e.blurInputOnSelect,i=e.isMulti,o=e.name,a=r.state.selectValue,s=i&&r.isOptionSelected(t,a),u=r.isOptionDisabled(t,a);if(s){var l=r.getOptionValue(t);r.setValue(a.filter((function(t){return r.getOptionValue(t)!==l})),"deselect-option",t)}else{if(u)return void r.ariaOnChange(t,{action:"select-option",name:o});i?r.setValue([].concat(Object(ht.a)(a),[t]),"select-option",t):r.setValue(t,"select-option")}n&&r.blurInput()},r.removeValue=function(t){var e=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(t),o=n.filter((function(t){return r.getOptionValue(t)!==i})),a=e?o:o[0]||null;r.onChange(a,{action:"remove-value",removedValue:t}),r.focusInput()},r.clearValue=function(){var t=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:t})},r.popValue=function(){var t=r.props.isMulti,e=r.state.selectValue,n=e[e.length-1],i=e.slice(0,e.length-1),o=t?i:i[0]||null;r.onChange(o,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return E.apply(void 0,[r.props.classNamePrefix].concat(e))},r.getOptionLabel=function(t){return Jt(r.props,t)},r.getOptionValue=function(t){return Qt(r.props,t)},r.getStyles=function(t,e){var n=qt[t](e);n.boxSizing="border-box";var i=r.props.styles[t];return i?i(n,e):n},r.getElementId=function(t){return"".concat(r.instancePrefix,"-").concat(t)},r.getComponents=function(){return t=r.props,v(v({},ft),t.components);var t},r.buildCategorizedOptions=function(){return Zt(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Kt(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(t,e){r.setState({ariaSelection:v({value:t},e)})},r.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(t){r.blockOptionHover=!1},r.onControlMouseDown=function(t){var e=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&r.onMenuClose():e&&r.openMenu("first"):(e&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&t.preventDefault()},r.onDropdownIndicatorMouseDown=function(t){if((!t||"mousedown"!==t.type||0===t.button)&&!r.props.isDisabled){var e=r.props,n=e.isMulti,i=e.menuIsOpen;r.focusInput(),i?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),t.preventDefault(),t.stopPropagation()}},r.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(r.clearValue(),t.stopPropagation(),r.openAfterFocus=!1,"touchend"===t.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(t){"boolean"===typeof r.props.closeMenuOnScroll?t.target instanceof HTMLElement&&P(t.target)&&r.props.onMenuClose():"function"===typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(t)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(t){var e=t.touches,n=e&&e.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(t){var e=t.touches,n=e&&e.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=i>5||o>5}},r.onTouchEnd=function(t){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(t.target)&&r.menuListRef&&!r.menuListRef.contains(t.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(t){r.userIsDragging||r.onControlMouseDown(t)},r.onClearIndicatorTouchEnd=function(t){r.userIsDragging||r.onClearIndicatorMouseDown(t)},r.onDropdownIndicatorTouchEnd=function(t){r.userIsDragging||r.onDropdownIndicatorMouseDown(t)},r.handleInputChange=function(t){var e=t.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(e,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(t){r.props.onFocus&&r.props.onFocus(t),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(t){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(t),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(t){r.blockOptionHover||r.state.focusedOption===t||r.setState({focusedOption:t})},r.shouldHideSelectedOptions=function(){return re(r.props)},r.onKeyDown=function(t){var e=r.props,n=e.isMulti,i=e.backspaceRemovesValue,o=e.escapeClearsValue,a=e.inputValue,s=e.isClearable,u=e.isDisabled,l=e.menuIsOpen,c=e.onKeyDown,f=e.tabSelectsValue,h=e.openMenuOnFocus,p=r.state,d=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!u&&("function"!==typeof c||(c(t),!t.defaultPrevented))){switch(r.blockOptionHover=!0,t.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(t.shiftKey||!l||!f||!d||h&&r.isOptionSelected(d,g))return;r.selectOption(d);break;case"Enter":if(229===t.keyCode)break;if(l){if(!d)return;if(r.isComposing)return;r.selectOption(d);break}return;case"Escape":l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&o&&r.clearValue();break;case" ":if(a)return;if(!l){r.openMenu("first");break}if(!d)return;r.selectOption(d);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}t.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++ie),r.state.selectValue=O(t.value),r}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(t){var e,n,r,i,o,a=this.props,s=a.isDisabled,u=a.menuIsOpen,l=this.state.isFocused;(l&&!s&&t.isDisabled||l&&u&&!t.menuIsOpen)&&this.focusInput(),l&&s&&!t.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(e=this.menuListRef,n=this.focusedOptionRef,r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?T(e,Math.min(n.offsetTop+n.clientHeight-e.offsetHeight+o,e.scrollHeight)):i.top-o<r.top&&T(e,Math.max(n.offsetTop-o,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(t,e){this.props.onInputChange(t,e)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(t){var e=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildFocusableOptions(),a="first"===t?0:o.length-1;if(!this.props.isMulti){var s=o.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[a]},(function(){return e.onMenuOpen()}))}},{key:"focusValue",value:function(t){var e=this.state,n=e.selectValue,r=e.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var o=n.length-1,a=-1;if(n.length){switch(t){case"previous":a=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i<o&&(a=i+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",e=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,o=r.indexOf(n);n||(o=-1),"up"===t?i=o>0?o-1:r.length-1:"down"===t?i=(o+1)%r.length:"pageup"===t?(i=o-e)<0&&(i=0):"pagedown"===t?(i=o+e)>r.length-1&&(i=r.length-1):"last"===t&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Wt):v(v({},Wt),this.props.theme):Wt}},{key:"getCommonProps",value:function(){var t=this.clearValue,e=this.cx,n=this.getStyles,r=this.getValue,i=this.selectOption,o=this.setValue,a=this.props,s=a.isMulti,u=a.isRtl,l=a.options;return{clearValue:t,cx:e,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:i,selectProps:a,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var t=this.props,e=t.isClearable,n=t.isMulti;return void 0===e?n:e}},{key:"isOptionDisabled",value:function(t,e){return te(this.props,t,e)}},{key:"isOptionSelected",value:function(t,e){return ee(this.props,t,e)}},{key:"filterOption",value:function(t,e){return ne(this.props,t,e)}},{key:"formatOptionLabel",value:function(t,e){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(t,{context:e,inputValue:n,selectValue:r})}return this.getOptionLabel(t)}},{key:"formatGroupLabel",value:function(t){return this.props.formatGroupLabel(t)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,e=t.isDisabled,n=t.isSearchable,i=t.inputId,o=t.inputValue,a=t.tabIndex,s=t.form,u=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,f=i||this.getElementId("input"),h={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?d.a.createElement(u,Object(r.a)({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:e,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:o},h)):d.a.createElement(It,Object(r.a)({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:w,onFocus:this.onInputFocus,readOnly:!0,disabled:e,tabIndex:a,form:s,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,e=this.getComponents(),n=e.MultiValue,i=e.MultiValueContainer,o=e.MultiValueLabel,a=e.MultiValueRemove,s=e.SingleValue,u=e.Placeholder,l=this.commonProps,c=this.props,f=c.controlShouldRenderValue,h=c.isDisabled,p=c.isMulti,m=c.inputValue,g=c.placeholder,y=this.state,v=y.selectValue,b=y.focusedValue,_=y.isFocused;if(!this.hasValue()||!f)return m?null:d.a.createElement(u,Object(r.a)({},l,{key:"placeholder",isDisabled:h,isFocused:_}),g);if(p)return v.map((function(e,s){var u=e===b;return d.a.createElement(n,Object(r.a)({},l,{components:{Container:i,Label:o,Remove:a},isFocused:u,isDisabled:h,key:"".concat(t.getOptionValue(e)).concat(s),index:s,removeProps:{onClick:function(){return t.removeValue(e)},onTouchEnd:function(){return t.removeValue(e)},onMouseDown:function(t){t.preventDefault(),t.stopPropagation()}},data:e}),t.formatOptionLabel(e,"value"))}));if(m)return null;var A=v[0];return d.a.createElement(s,Object(r.a)({},l,{data:A,isDisabled:h}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,e=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||i||!this.hasValue()||o)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return d.a.createElement(t,Object(r.a)({},e,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,e=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!t||!o)return null;return d.a.createElement(t,Object(r.a)({},e,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),e=t.DropdownIndicator,n=t.IndicatorSeparator;if(!e||!n)return null;var i=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return d.a.createElement(n,Object(r.a)({},i,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var e=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return d.a.createElement(t,Object(r.a)({},e,{innerProps:o,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var t=this,e=this.getComponents(),n=e.Group,i=e.GroupHeading,o=e.Menu,a=e.MenuList,s=e.MenuPortal,u=e.LoadingMessage,l=e.NoOptionsMessage,c=e.Option,f=this.commonProps,h=this.state.focusedOption,p=this.props,m=p.captureMenuScroll,g=p.inputValue,y=p.isLoading,v=p.loadingMessage,b=p.minMenuHeight,_=p.maxMenuHeight,A=p.menuIsOpen,w=p.menuPlacement,x=p.menuPosition,E=p.menuPortalTarget,O=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,P=p.noOptionsMessage,C=p.onMenuScrollToTop,T=p.onMenuScrollToBottom;if(!A)return null;var k,I=function(e,n){var i=e.type,o=e.data,a=e.isDisabled,s=e.isSelected,u=e.label,l=e.value,p=h===o,m=a?void 0:function(){return t.onOptionHover(o)},g=a?void 0:function(){return t.selectOption(o)},y="".concat(t.getElementId("option"),"-").concat(n),v={id:y,onClick:g,onMouseMove:m,onMouseOver:m,tabIndex:-1};return d.a.createElement(c,Object(r.a)({},f,{innerProps:v,data:o,isDisabled:a,isSelected:s,key:y,label:u,type:i,value:l,isFocused:p,innerRef:p?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(e.data,"menu"))};if(this.hasOptions())k=this.getCategorizedOptions().map((function(e){if("group"===e.type){var o=e.data,a=e.options,s=e.index,u="".concat(t.getElementId("group"),"-").concat(s),l="".concat(u,"-heading");return d.a.createElement(n,Object(r.a)({},f,{key:u,data:o,options:a,Heading:i,headingProps:{id:l,data:e.data},label:t.formatGroupLabel(e.data)}),e.options.map((function(t){return I(t,"".concat(s,"-").concat(t.index))})))}if("option"===e.type)return I(e,"".concat(e.index))}));else if(y){var L=v({inputValue:g});if(null===L)return null;k=d.a.createElement(u,f,L)}else{var j=P({inputValue:g});if(null===j)return null;k=d.a.createElement(l,f,j)}var M={minMenuHeight:b,maxMenuHeight:_,menuPlacement:w,menuPosition:x,menuShouldScrollIntoView:S},R=d.a.createElement(z,Object(r.a)({},f,M),(function(e){var n=e.ref,i=e.placerProps,s=i.placement,u=i.maxHeight;return d.a.createElement(o,Object(r.a)({},f,M,{innerRef:n,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:y,placement:s}),d.a.createElement(Vt,{captureEnabled:m,onTopArrive:C,onBottomArrive:T,lockEnabled:O},(function(e){return d.a.createElement(a,Object(r.a)({},f,{innerRef:function(n){t.getMenuListRef(n),e(n)},isLoading:y,maxHeight:u,focusedOption:h}),k)})))}));return E||"fixed"===x?d.a.createElement(s,Object(r.a)({},f,{appendTo:E,controlElement:this.controlRef,menuPlacement:w,menuPosition:x}),R):R}},{key:"renderFormField",value:function(){var t=this,e=this.props,n=e.delimiter,r=e.isDisabled,i=e.isMulti,o=e.name,a=this.state.selectValue;if(o&&!r){if(i){if(n){var s=a.map((function(e){return t.getOptionValue(e)})).join(n);return d.a.createElement("input",{name:o,type:"hidden",value:s})}var u=a.length>0?a.map((function(e,n){return d.a.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:t.getOptionValue(e)})})):d.a.createElement("input",{name:o,type:"hidden"});return d.a.createElement("div",null,u)}var l=a[0]?this.getOptionValue(a[0]):"";return d.a.createElement("input",{name:o,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,e=this.state,n=e.ariaSelection,i=e.focusedOption,o=e.focusedValue,a=e.isFocused,s=e.selectValue,u=this.getFocusableOptions();return d.a.createElement(bt,Object(r.a)({},t,{ariaSelection:n,focusedOption:i,focusedValue:o,isFocused:a,selectValue:s,focusableOptions:u}))}},{key:"render",value:function(){var t=this.getComponents(),e=t.Control,n=t.IndicatorsContainer,i=t.SelectContainer,o=t.ValueContainer,a=this.props,s=a.className,u=a.id,l=a.isDisabled,c=a.menuIsOpen,f=this.state.isFocused,h=this.commonProps=this.getCommonProps();return d.a.createElement(i,Object(r.a)({},h,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),d.a.createElement(e,Object(r.a)({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:c}),d.a.createElement(o,Object(r.a)({},h,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),d.a.createElement(n,Object(r.a)({},h,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=e.prevProps,r=e.clearFocusValueOnUpdate,i=e.inputIsHiddenAfterUpdate,o=t.options,a=t.value,s=t.menuIsOpen,u=t.inputValue,l={};if(n&&(a!==n.value||o!==n.options||s!==n.menuIsOpen||u!==n.inputValue)){var c=O(a),f=s?function(t,e){return Kt(Zt(t,e))}(t,c):[],h=r?function(t,e){var n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}(e,c):null,p=function(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}(e,f);l={selectValue:c,focusedOption:p,focusedValue:h,clearFocusValueOnUpdate:!1}}var d=null!=i&&t!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return v(v(v({},l),d),{},{prevProps:t})}}]),n}(p.Component);oe.defaultProps=Xt;var ae,se,ue,le={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},ce=n(158),fe=n(587),he=(n(1450),n(1451),n(1456),n(1458),n(882),n(1459),function(t){Object(f.a)(n,t);var e=A(n);function n(t){var r;return Object(l.a)(this,n),(r=e.call(this,t)).createEmotionCache=function(t,e){return Object(fe.a)({nonce:t,key:e})},r.createEmotionCache=mt(r.createEmotionCache),r}return Object(c.a)(n,[{key:"render",value:function(){var t=this.createEmotionCache(this.props.nonce,this.props.cacheKey);return d.a.createElement(ce.a,{value:t},this.props.children)}}]),n}(p.Component)),pe=(ae=oe,ue=se=function(t){Object(f.a)(n,t);var e=A(n);function n(){var t;Object(l.a)(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))).select=void 0,t.state={inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue},t.onChange=function(e,n){t.callProp("onChange",e,n),t.setState({value:e})},t.onInputChange=function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})},t.onMenuOpen=function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})},t.onMenuClose=function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})},t}return Object(c.a)(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(t){return void 0!==this.props[t]?this.props[t]:this.state[t]}},{key:"callProp",value:function(t){if("function"===typeof this.props[t]){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(e=this.props)[t].apply(e,r)}}},{key:"render",value:function(){var t=this,e=this.props;e.defaultInputValue,e.defaultMenuIsOpen,e.defaultValue;var n=Object(o.a)(e,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return d.a.createElement(ae,Object(r.a)({},n,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(p.Component),se.defaultProps=le,ue);e.default=pe},function(t,e,n){"use strict";n.d(e,"a",(function(){return M}));var r=n(59),i=n(92),o=n(123),a=n(6),s=n(176),u=n(10);const l={5126:x.bind(null,"uniform1fv",m,1,E),35664:x.bind(null,"uniform2fv",m,2,E),35665:x.bind(null,"uniform3fv",m,3,E),35666:x.bind(null,"uniform4fv",m,4,E),5124:x.bind(null,"uniform1iv",g,1,E),35667:x.bind(null,"uniform2iv",g,2,E),35668:x.bind(null,"uniform3iv",g,3,E),35669:x.bind(null,"uniform4iv",g,4,E),35670:x.bind(null,"uniform1iv",g,1,E),35671:x.bind(null,"uniform2iv",g,2,E),35672:x.bind(null,"uniform3iv",g,3,E),35673:x.bind(null,"uniform4iv",g,4,E),35674:x.bind(null,"uniformMatrix2fv",m,4,O),35675:x.bind(null,"uniformMatrix3fv",m,9,O),35676:x.bind(null,"uniformMatrix4fv",m,16,O),35678:w,35680:w,5125:x.bind(null,"uniform1uiv",y,1,E),36294:x.bind(null,"uniform2uiv",y,2,E),36295:x.bind(null,"uniform3uiv",y,3,E),36296:x.bind(null,"uniform4uiv",y,4,E),35685:x.bind(null,"uniformMatrix2x3fv",m,6,O),35686:x.bind(null,"uniformMatrix2x4fv",m,8,O),35687:x.bind(null,"uniformMatrix3x2fv",m,6,O),35688:x.bind(null,"uniformMatrix3x4fv",m,12,O),35689:x.bind(null,"uniformMatrix4x2fv",m,8,O),35690:x.bind(null,"uniformMatrix4x3fv",m,12,O),35678:w,35680:w,35679:w,35682:w,36289:w,36292:w,36293:w,36298:w,36299:w,36300:w,36303:w,36306:w,36307:w,36308:w,36311:w},c={},f={},h={},p=[0];function d(t,e,n,r){1===e&&"boolean"===typeof t&&(t=t?1:0),Number.isFinite(t)&&(p[0]=t,t=p);const i=t.length;if(i%e&&a.k.warn("Uniform size should be multiples of ".concat(e),t)(),t instanceof n)return t;let o=r[i];o||(o=new n(i),r[i]=o);for(let a=0;a<i;a++)o[a]=t[a];return o}function m(t,e){return d(t,e,Float32Array,c)}function g(t,e){return d(t,e,Int32Array,f)}function y(t,e){return d(t,e,Uint32Array,h)}function v(t,e,n){const r=l[n.type];if(!r)throw new Error("Unknown GLSL uniform type ".concat(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 ".concat(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.a||(t instanceof s.a||t instanceof o.a&&Boolean(t.texture))))}function A(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 w(){let t=null;return(e,n,r)=>{const i=t!==r;return i&&(e.uniform1i(n,r),t=r),i}}function x(t,e,n,r){let i=null,o=null;return(a,s,l)=>{const c=e(l,n),f=c.length;let h=!1;if(null===i)i=new Float32Array(f),o=f,h=!0;else{Object(u.a)(o===f,"Uniform length cannot change.");for(let t=0;t<f;++t)if(c[t]!==i[t]){h=!0;break}}return h&&(r(a,t,s,c),i.set(c)),h}}function E(t,e,n,r){t[e](n,r)}function O(t,e,n,r){t[e](n,!1,r)}var S=n(178),P=n(104),C=n(137);class T{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}getAttributeAccessor(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),a=e.getAttribLocation(t.handle,n);a>=0&&this._addAttribute(a,n,i,o)}this.attributeInfos.sort(((t,e)=>t.location-e.location))}_readVaryingsFromProgram(t){const{gl:e}=t;if(!Object(a.j)(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}=Object(C.a)(n),a={type:i,size:r*o};this._inferProperties(t,e,a);const s={location:t,name:e,accessor:new P.a(a)};this.attributeInfos.push(s),this.attributeInfosByLocation[t]=s,this.attributeInfosByName[s.name]=s}_inferProperties(t,e,n){/instance/i.test(e)&&(n.divisor=1)}_addVarying(t,e,n,r){const{type:i,components:o}=Object(C.a)(n),a={location:t,name:e,accessor:new P.a({type:i,size:r*o})};this.varyingInfos.push(a),this.varyingInfosByName[a.name]=a}}var k=n(74),I=n(73);const L=35981,j=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"];class M extends r.a{get[Symbol.toStringTag](){return"Program"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.stubRemovedMethods("Program","v6.0",j),this._isCached=!1,this.initialize(e),Object.seal(this),this._setId(e.id)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{hash:e,vs:n,fs:r,varyings:i,bufferMode:o=L}=t;return this.hash=e||"",this.vs="string"===typeof n?new S.b(this.gl,{id:"".concat(t.id,"-vs"),source:n}):n,this.fs="string"===typeof r?new S.a(this.gl,{id:"".concat(t.id,"-fs"),source:r}):r,Object(u.a)(this.vs instanceof S.b),Object(u.a)(this.fs instanceof S.a),this.uniforms={},this._textureUniforms={},i&&i.length>0&&(Object(a.a)(this.gl),this.varyings=i,this.gl2.transformFeedbackVaryings(this.handle,i,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new T(this),this.setProps(t)}delete(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isCached?this:super.delete(t)}setProps(t){return"uniforms"in t&&this.setUniforms(t.uniforms),this}draw(t){let{logPriority:e,drawMode:n=4,vertexCount:r,offset:i=0,start:o,end:s,isIndexed:l=!1,indexType:c=5123,instanceCount:f=0,isInstanced:h=f>0,vertexArray:p=null,transformFeedback:d,framebuffer:m,parameters:g={},uniforms:y,samplers:v}=t;if((y||v)&&(a.k.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(y||{})),a.k.priority>=e){const t=m?m.id:"default",i="mode=".concat(Object(k.a)(this.gl,n)," verts=").concat(r," ")+"instances=".concat(f," indexType=").concat(Object(k.a)(this.gl,c)," ")+"isInstanced=".concat(h," isIndexed=").concat(l," ")+"Framebuffer=".concat(t);a.k.log(e,i)()}return Object(u.a)(p),this.gl.useProgram(this.handle),!(!this._areTexturesRenderable()||0===r||h&&0===f)&&(p.bindForDraw(r,f,(()=>{if(void 0!==m&&(g=Object.assign({},g,{framebuffer:m})),d){const t=Object(C.c)(n);d.begin(t)}this._bindTextures(),Object(a.o)(this.gl,g,(()=>{l&&h?this.gl2.drawElementsInstanced(n,r,c,i,f):l&&Object(a.j)(this.gl)&&!isNaN(o)&&!isNaN(s)?this.gl2.drawRangeElements(n,o,s,r,c,i):l?this.gl.drawElements(n,r,c,i):h?this.gl2.drawArraysInstanced(n,i,r,f):this.gl.drawArrays(n,i,r)})),d&&d.end()})),!0)}setUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.k.priority>=2&&function(t,e,n){for(const r in t){const i=t[r];if((!n||Boolean(n[r]))&&!_(i))throw e=e?"".concat(e," "):"",console.error("".concat(e," Bad uniform ").concat(r),i),new Error("".concat(e," Bad uniform ").concat(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,a=!1;if(t instanceof o.a&&(t=t.texture),t instanceof i.a)if(a=this.uniforms[e]!==n,a){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)||a)&&A(this.uniforms,e,n)}}return this}_areTexturesRenderable(){let t=!0;for(const e in this._textureUniforms){const n=this._textureUniforms[e];n.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 S.b({handle:r});break;case 35632:n.fs=new S.a({handle:r})}}return n}_getParameter(t){return this.gl.getProgramParameter(this.handle,t)}_setId(t){if(!t){const t=this._getName();this.id=Object(I.c)(t)}}_getName(){let t=this.vs.getName()||this.fs.getName();return t=t.replace(/shader/i,""),t=t?"".concat(t,"-program"):"program",t}_compileAndLink(){const{gl:t}=this;if(t.attachShader(this.handle,this.vs.handle),t.attachShader(this.handle,this.fs.handle),a.k.time(4,"linkProgram for ".concat(this._getName()))(),t.linkProgram(this.handle),a.k.timeEnd(4,"linkProgram for ".concat(this._getName()))(),t.debug||a.k.level>0){if(!t.getProgramParameter(this.handle,35714))throw new Error("Error linking: ".concat(t.getProgramInfoLog(this.handle)));t.validateProgram(this.handle);if(!t.getProgramParameter(this.handle,35715))throw new Error("Error validating: ".concat(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]=v(t,i,n),n.size>1)for(let e=0;e<n.size;e++)i=t.getUniformLocation(this.handle,"".concat(r,"[").concat(e,"]")),this._uniformSetters["".concat(r,"[").concat(e,"]")]=v(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)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(6),i=n(208),o=n(10),a=n(59),s=n(608),u=n(315);class l extends a.a{get[Symbol.toStringTag](){return"Query"}static isSupported(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=Object(r.j)(t),i=Object(s.c)(t,u.a.TIMER_QUERY);let a=n||i;for(const r of e)switch(r){case"queries":a=a&&n;break;case"timers":a=a&&i;break;default:Object(o.a)(!1)}return a}constructor(t){super(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.target=null,this._queryPending=!1,this._pollingPromise=null,Object.seal(this)}beginTimeElapsedQuery(){return this.begin(35007)}beginOcclusionQuery(){let{conservative:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 l.isSupported(this.gl)?this.gl2.createQuery():null}_deleteHandle(){this.gl2.deleteQuery(this.handle)}}var c=n(123),f=n(244);const h=Object(f.a)()&&"undefined"!==typeof document;let p=0;class d{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onCreateContext:e=(t=>Object(r.c)(t)),onAddHTML:n=null,onInitialize:o=(()=>{}),onRender:a=(()=>{}),onFinalize:s=(()=>{}),onError:u,gl:l=null,glOptions:c={},debug:f=!1,createFramebuffer:h=!1,autoResizeViewport:d=!0,autoResizeDrawingBuffer:m=!0,stats:g=i.b.get("animation-loop-".concat(p++))}=t;let{useDevicePixels:y=!0}=t;"useDevicePixelRatio"in t&&(r.k.deprecated("useDevicePixelRatio","useDevicePixels")(),y=t.useDevicePixelRatio),this.props={onCreateContext:e,onAddHTML:n,onInitialize:o,onRender:a,onFinalize:s,onError:u,gl:l,glOptions:c,debug:f,createFramebuffer:h},this.gl=l,this.needsRedraw=null,this.timeline=null,this.stats=g,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:d,autoResizeDrawingBuffer:m,useDevicePixels:y}),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 Object(o.a)("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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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=l.isSupported(this.gl,["timers"])?new l(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(){return this.props.onCreateContext(...arguments)}onInitialize(){return this.props.onInitialize(...arguments)}onRender(){return this.props.onRender(...arguments)}onFinalize(){return this.props.onFinalize(...arguments)}getHTMLControlValue(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=document.getElementById(t);return n?Number(n.value):e}setViewParameters(){return r.k.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=h?new Promise(((t,e)=>{h&&"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(){this.display?this.display._renderFrame(...arguments):this.onRender(...arguments)}_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?Object(r.h)(this.props.gl,t):this.onCreateContext(t),!Object(r.i)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");Object(r.l)(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&&Object(r.m)(this.gl,{useDevicePixels:this.useDevicePixels})}_createFramebuffer(){this.props.createFramebuffer&&(this.framebuffer=new c.a(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()&&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}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r={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;\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;\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:[n(247).a]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var r=n(0),i=n.n(r),o=n(4),a=n(143),s=n(32),u=n(1592),l=n(436),c=n(51),f=n(284),h=n(1594),p=o.default.label.withConfig({displayName:"StyledRadioButton__StyledRadioButtonContainer",componentId:"g1f6ld-0"})(["display:flex;flex-direction:row;align-items:center;user-select:none;width:fit-content;"," ",":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:",";}:hover{background-color:",";}",";"],(function(t){return t.disabled&&"\n  opacity: 0.5;\n  cursor: default;\n"}),(function(t){return!t.disabled&&"cursor: pointer;"}),(function(t){return Object(c.c)(t.theme.radioButton.hover.border.color,t.theme)}),(function(t){return Object(c.c)(!t.disabled&&t.theme.radioButton.hover&&t.theme.radioButton.hover.background&&t.theme.radioButton.hover.background.color,t.theme)}),(function(t){return t.theme.radioButton.container.extend}));p.defaultProps={},Object.setPrototypeOf(p.defaultProps,s.a);var d=o.default.input.withConfig({displayName:"StyledRadioButton__StyledRadioButtonInput",componentId:"g1f6ld-1"})(["opacity:0;-moz-appearance:none;width:0;height:0;margin:0;",";"],(function(t){return!t.disabled&&"cursor: pointer;"}));d.defaultProps={},Object.setPrototypeOf(d.defaultProps,s.a);var m=o.default.span.withConfig({displayName:"StyledRadioButton__StyledRadioButtonLabel",componentId:"g1f6ld-2"})(["",""],(function(t){return t.theme.radioButton.font.weight&&Object(o.css)(["font-weight:",";"],t.theme.radioButton.font.weight)}));m.defaultProps={},Object.setPrototypeOf(m.defaultProps,s.a);var g=o.default.svg.withConfig({displayName:"StyledRadioButton__StyledRadioButtonIcon",componentId:"g1f6ld-3"})(["box-sizing:border-box;width:",";height:",";fill:",";",";"],(function(t){return t.theme.radioButton.icon.size||t.theme.radioButton.size}),(function(t){return t.theme.radioButton.icon.size||t.theme.radioButton.size}),(function(t){return Object(c.c)(t.theme.radioButton.check.color||"control",t.theme)}),(function(t){return t.theme.radioButton.icon.extend}));g.defaultProps={},Object.setPrototypeOf(g.defaultProps,s.a);var y=o.default.div.withConfig({displayName:"StyledRadioButton__StyledRadioButtonBox",componentId:"g1f6ld-4"})(["background-color:",";",";",";"],(function(t){return t.theme.radioButton.check.background&&t.theme.radioButton.check.background.color}),(function(t){return t.focus&&Object(h.f)()}),(function(t){return t.theme.radioButton.check.extend}));y.defaultProps={},Object.setPrototypeOf(y.defaultProps,s.a);var v=o.default.div.withConfig({displayName:"StyledRadioButton",componentId:"g1f6ld-5"})(["",";"],(function(t){return t.theme.radioButton&&t.theme.radioButton.extend}));function b(){return b=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},b.apply(this,arguments)}v.defaultProps={},Object.setPrototypeOf(v.defaultProps,s.a);var _=Object(r.forwardRef)((function(t,e){var n=t.a11yTitle,a=t.checked,u=t.children,h=t.disabled,_=t.focus,A=t.id,w=t.label,x=t.name,E=t.onChange,O=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,["a11yTitle","checked","children","disabled","focus","id","label","name","onChange"]),S=Object(r.useContext)(o.ThemeContext)||s.a.theme,P=Object(r.useState)(),C=P[0],T=P[1],k="string"===typeof w?i.a.createElement(m,null,w):w,I=S.radioButton.icons.circle,L=Object(c.c)(S.radioButton.border.color,S);return a&&(L=Object(c.c)(S.radioButton.color||"control",S)),i.a.createElement(p,b({},Object(f.c)({htmlFor:A,disabled:h}),{onClick:function(t){"radio"!==t.target.type&&t.stopPropagation()},onMouseEnter:function(){return T(!0)},onMouseLeave:function(){return T(!1)}}),i.a.createElement(v,{as:l.a,flex:!1,margin:w?{right:S.radioButton.gap||"small"}:void 0},i.a.createElement(d,b({"aria-label":n},O,{ref:e,type:"radio"},Object(f.c)({id:A,name:x,checked:a,disabled:h,onChange:E}))),u?u({checked:a,hover:C}):i.a.createElement(y,{focus:_,as:l.a,align:"center",justify:"center",width:S.radioButton.size,height:S.radioButton.size,border:{size:S.radioButton.border.width,color:L},round:S.radioButton.check.radius},a&&(I?i.a.createElement(I,{as:g}):i.a.createElement(g,{viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"},i.a.createElement("circle",{cx:12,cy:12,r:6}))))),k)}));_.displayName="RadioButton";var A=_;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},w.apply(this,arguments)}function x(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 E=Object(r.forwardRef)((function(t,e){var n=t.children,c=t.disabled,f=t.name,h=t.onChange,p=t.options,d=t.value,m=t.gap,g=x(t,["children","disabled","name","onChange","options","value","gap"]),y=Object(r.useContext)(a.a),v=Object(r.useContext)(o.ThemeContext)||s.a.theme,b=Object(r.useMemo)((function(){return p.map((function(t){return"object"!==typeof t?{disabled:c,id:g.id?g.id+"-"+t:""+t,label:"string"!==typeof t?JSON.stringify(t):t,value:t}:w({disabled:c},t)}))}),[c,p,g.id]),_=y.useFormInput(f,d,""),E=_[0],O=_[1],S=Object(r.useState)(),P=S[0],C=S[1],T=Object(r.useRef)([]),k=i.a.useMemo((function(){var t;return b.some((function(e,n){return e.value===E&&(t=n,!0)})),t}),[b,E]);Object(r.useEffect)((function(){P&&k>=0&&T.current[k].focus()}),[P,k]);var I=function(){if(void 0!==k&&k<b.length-1){var t=b[k+1].value;O(t),h&&h({target:{value:t}})}},L=function(){if(k>0){var t=b[k-1].value;O(t),h&&h({target:{value:t}})}},j=function(){setTimeout((function(){return!P&&C(!0)}),1)},M=function(){return P&&C(!1)};return i.a.createElement(u.a,{target:"document",onUp:P?L:void 0,onDown:P?I:void 0,onLeft:P?L:void 0,onRight:P?I:void 0},i.a.createElement(l.a,w({ref:e},v.radioButtonGroup.container,{gap:m||(v.radioButtonGroup.container&&v.radioButtonGroup.container.gap?v.radioButtonGroup.container.gap:"small")},g),b.map((function(t,e){var r=t.disabled,o=t.id,a=t.label,s=t.value,u=x(t,["disabled","id","label","value"]);return i.a.createElement(A,w({ref:function(t){T.current[e]=t},key:s,name:f,label:n?void 0:a,disabled:r,checked:s===E,focus:P&&(s===E||void 0===E&&!e),id:o,value:s,onFocus:j,onBlur:M,onChange:function(t){O(s),h&&h(t)}},u),n?function(t){return n(p[e],t)}:null)}))))}));E.displayName="RadioButtonGroup";var O=E},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var r=n(0),i=n.n(r),o=n(4),a=n(32),s=n(436),u=n(273),l=n(1676),c=n(1655),f=n(1592),h=n(143),p=i.a.createContext((function(t,e,n){void 0===e&&(e="polite"),void 0===n&&(n=500);var r=document.body.querySelector("#grommet-announcer[aria-live]")||function(){var t=document.createElement("div");return t.id="grommet-announcer",t.style.left="-100%",t.style.right="100%",t.style.position="fixed",t.style["z-index"]="-1",document.body.insertBefore(t,document.body.firstChild),t}();r.setAttribute("aria-live","off"),r.innerHTML=t,r.setAttribute("aria-live",e),setTimeout((function(){r.innerHTML=""}),n)})),d=n(1594),m=n(1317),g=n(381),y=n(56),v=o.default.input.withConfig({displayName:"StyledTextInput",componentId:"sc-1x30a0s-0"})([""," "," "," "," ",";",""],d.i,(function(t){return"full"===(e=t.plain)?Object(o.css)([""," padding:0;"],d.l):e&&d.l;var e}),(function(t){return t.icon&&(t.reverse?"padding-right: "+t.theme.global.edgeSize.large+";":"padding-left: "+t.theme.global.edgeSize.large+";")}),(function(t){return t.disabled&&Object(d.c)(t.theme.textInput.disabled&&t.theme.textInput.disabled.opacity)}),(function(t){return t.theme.textInput&&t.theme.textInput.extend}),(function(t){return t.textAlign&&d.n}));v.defaultProps={},Object.setPrototypeOf(v.defaultProps,a.a);var b=o.default.div.withConfig({displayName:"StyledTextInput__StyledTextInputContainer",componentId:"sc-1x30a0s-1"})(["position:relative;width:100%;",";"],(function(t){return t.theme.textInput&&t.theme.textInput.container&&t.theme.textInput.container.extend}));b.defaultProps={},Object.setPrototypeOf(b.defaultProps,a.a);var _=o.default.div.withConfig({displayName:"StyledTextInput__StyledPlaceholder",componentId:"sc-1x30a0s-2"})(["position:absolute;left:","px;top:50%;transform:translateY(-50%);display:flex;justify-content:center;pointer-events:none;",";"],(function(t){return Object(y.b)(Object(d.h)(t,"left"))-Object(y.b)(t.theme.global.control.border.width)}),(function(t){return t.theme.textInput&&t.theme.textInput.placeholder&&t.theme.textInput.placeholder.extend}));_.defaultProps={},Object.setPrototypeOf(_.defaultProps,a.a);var A=o.default.div.withConfig({displayName:"StyledTextInput__StyledIcon",componentId:"sc-1x30a0s-3"})(["position:absolute;display:flex;justify:center;top:50%;transform:translateY(-50%);pointer-events:none;",""],(function(t){return t.reverse?"right: "+Object(d.h)(t,"right")+";":"left: "+Object(d.h)(t,"left")+";"})),w=o.default.ol.withConfig({displayName:"StyledTextInput__StyledSuggestions",componentId:"sc-1x30a0s-4"})(["border-top-left-radius:0;border-top-right-radius:0;margin:0;padding:0;list-style-type:none;",";"],(function(t){return t.theme.textInput&&t.theme.textInput.suggestions&&t.theme.textInput.suggestions.extend}));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},x.apply(this,arguments)}w.defaultProps={},Object.setPrototypeOf(w.defaultProps,a.a);var E=function(t){return t&&"object"===typeof t?t.label||t.value:t},O=function(t){return t&&"object"===typeof t?t.label&&"string"===typeof t.label?t.label:t.value:t},S=Object(o.default)(s.a).withConfig({displayName:"TextInput__ContainerBox",componentId:"sc-1ai0c08-0"})(["",";@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){width:100%;}"],(function(t){return t.dropHeight?Object(d.m)("max-height",t.dropHeight,t.theme):"max-height: inherit;"})),P={top:"bottom",left:"left"},C={enterSelect:"(Press Enter to Select)",suggestionsCount:"suggestions available",suggestionsExist:"This input has suggestions use arrow keys to navigate",suggestionIsOpen:"Suggestions drop is open, continue to use arrow keys to navigate"},T=Object(r.forwardRef)((function(t,e){var n=t.a11yTitle,d=t.defaultSuggestion,y=t.defaultValue,T=t.dropAlign,k=void 0===T?P:T,I=t.dropHeight,L=t.dropTarget,j=t.dropProps,M=t.icon,R=t.id,N=t.messages,D=void 0===N?C:N,F=t.name,B=t.onBlur,z=t.onChange,U=t.onFocus,G=t.onKeyDown,V=t.onSelect,q=t.onSuggestionSelect,H=t.onSuggestionsClose,W=t.onSuggestionsOpen,X=t.placeholder,Y=t.plain,Z=t.readOnly,K=t.reverse,$=t.suggestions,J=t.textAlign,Q=t.value,tt=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,["a11yTitle","defaultSuggestion","defaultValue","dropAlign","dropHeight","dropTarget","dropProps","icon","id","messages","name","onBlur","onChange","onFocus","onKeyDown","onSelect","onSuggestionSelect","onSuggestionsClose","onSuggestionsOpen","placeholder","plain","readOnly","reverse","suggestions","textAlign","value"]),et=Object(r.useContext)(o.ThemeContext)||a.a.theme,nt=Object(r.useContext)(p),rt=Object(r.useContext)(h.a),it=Object(m.a)(e),ot=Object(r.useRef)(),at=Object(r.useRef)(),st=rt.useFormInput(Z?void 0:F,Q),ut=st[0],lt=st[1],ct=Object(r.useState)(),ft=ct[0],ht=ct[1],pt=Object(r.useState)(!1),dt=pt[0],mt=pt[1],gt=Object(r.useMemo)((function(){return V&&!q?V:q}),[V,q]),yt=Object(r.useMemo)((function(){return V&&q?V:void 0}),[V,q]),vt=Object(r.useState)(),bt=vt[0],_t=vt[1],At=Object(r.useCallback)((function(){mt(!0),nt(D.suggestionIsOpen),nt($.length+" "+D.suggestionsCount),W&&W()}),[nt,D.suggestionsCount,D.suggestionIsOpen,W,$]),wt=Object(r.useCallback)((function(){_t($),mt(!1),D.onSuggestionsClose&&H(),H&&H()}),[D.onSuggestionsClose,H,$]);Object(r.useEffect)((function(){!ft||dt||!$||!$.length||bt&&bt.length===$.length||At()}),[ft,At,dt,$,bt]),Object(r.useEffect)((function(){!dt||$&&$.length||wt()}),[wt,dt,$]);var xt=Object(r.useMemo)((function(){return $?$.map((function(t){return"object"===typeof t?t.value:t})).indexOf(ut):-1}),[$,ut]),Et=Object(r.useMemo)((function(){return-1===xt&&"number"===typeof d?d:xt}),[d,xt]),Ot=Object(r.useState)(Et),St=Ot[0],Pt=Ot[1],Ct=Object(r.useState)(),Tt=Ct[0],kt=Ct[1];Object(r.useEffect)((function(){return Pt(xt)}),[xt]),Object(r.useEffect)((function(){dt||Pt(Et)}),[Et,dt]),Object(r.useEffect)((function(){if(St>=0){var t=O($[St]);nt(t+" "+D.enterSelect)}}),[St,nt,D,$]),Object(r.useEffect)((function(){var t=setTimeout((function(){var t=at.current;if(dt&&-1!==St&&t){var e=t.parentNode,n=t.children[St];e.scrollTo&&(Object(g.f)(n,e)?e.scrollTo(0,n.offsetTop-(e.getBoundingClientRect().height-n.getBoundingClientRect().height)):Object(g.g)(n,e)&&e.scrollTo(0,n.offsetTop))}}),50);return function(){return clearTimeout(t)}}),[St,dt]);var It,Lt=function(t,e){if(it.current.focus(),it.current.value=e,wt(),gt){t.persist&&t.persist();var n=t;n.suggestion=e,gt(n)}lt(e)},jt=Object(r.useCallback)((function(t){t.preventDefault();var e=Math.min(St+1,$.length-1);Pt(e),kt(!1)}),[St,$]),Mt=Object(r.useCallback)((function(t){t.preventDefault();var e=Math.max(St-1,0);Pt(e),kt(!1)}),[St]),Rt=Object(r.useState)(X&&"string"!==typeof X&&!(it.current&&it.current.value)&&!ut),Nt=Rt[0],Dt=Rt[1],Ft={onSelect:yt};dt&&(It=i.a.createElement(l.a,x({ref:ot,id:R?"text-input-drop__"+R:void 0,align:k,responsive:!1,target:L||it.current,onClickOutside:wt,onEsc:wt},j),i.a.createElement(S,{overflow:"auto",dropHeight:I,onMouseMove:function(){return kt(!0)}},i.a.createElement(w,{ref:at},i.a.createElement(c.a,{items:$,step:et.select.step,show:-1!==St?St:void 0},(function(t,e,n){var r,o=E(t);return"string"!==typeof o?r=o:et.button.option||(r=i.a.createElement(s.a,{align:"start",pad:"small"},o)),i.a.createElement("li",{key:O(t)+"-"+e,ref:n},i.a.createElement(u.a,{active:St===e,fill:!0,plain:!!r||void 0,align:"start",kind:r?void 0:"option",label:r?void 0:o,onClick:function(e){return Lt(e,t)},onMouseMove:Tt&&St!==e?function(){return Pt(e)}:void 0},r))}))))));var Bt={onKeyDown:G};return dt?(Bt.onEnter=function(t){t.preventDefault(),St>=0?Lt(t,$[St]):wt()},St>0&&(Bt.onUp=Mt),St<$.length-1&&(Bt.onDown=jt),Bt.onTab=wt):$&&$.length>0&&(Bt.onDown=At),i.a.createElement(b,{plain:Y},Nt&&i.a.createElement(_,null,X),M&&i.a.createElement(A,{reverse:K,theme:et},M),i.a.createElement(f.a,x({target:ft?"document":void 0},Bt),i.a.createElement(v,x({"aria-label":n,ref:it,id:R,name:F,autoComplete:"off",plain:Y,placeholder:"string"===typeof X?X:void 0,icon:M,reverse:K,focus:ft,textAlign:J},tt,Ft,{defaultValue:E(y),value:E(ut),readOnly:Z,onFocus:function(t){ft||(ht(!0),$&&$.length>0&&(nt(D.suggestionsExist),At()),U&&U(t))},onBlur:function(t){t.relatedTarget&&t.relatedTarget===ot.current||(ht(!1),B&&B(t))},onChange:Z?void 0:function(t){Dt(X&&"string"!==typeof X&&!t.target.value),lt(t.target.value),Pt(-1),z&&z(t)}}))),It)}));T.displayName="TextInput";var k=T},,,,,function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e){},function(t,e,n){"use strict";n.r(e),n.d(e,"wrapRootElement",(function(){return a}));var r=n(0),i=n.n(r),o=n(17),a=function(t){var e=t.element;return i.a.createElement(o.StoreProvider,{value:o.rootStore},e)}},function(t,e){},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/backdrop-with-pins-gray-98b316ec9a0f35ba3d75efe7317c8190.svg"},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/backdrop-with-pins-purple-17d8b83c61bbdb6a26a8eb297ddeb69e.svg"},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/backdrop-with-pins-scattered-gray-42e801c3bd4f3e4ef5295e6dd41c4e50.svg"},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/backdrop-with-pins-scattered-purple-bdc6b75a7983d32b466cfcff289f9713.svg"},function(t,e,n){t.exports=n.p+"media/components/humap-map_frontend/assets/images/map-background-c0555cabe30495bdd51da012b517ca59.jpg"},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0);var i={8:"onBackspace",9:"onTab",13:"onEnter",27:"onEsc",32:"onSpace",37:"onLeft",38:"onUp",39:"onRight",40:"onDown",188:"onComma",16:"onShift"};var o=function(t){var e=t.capture,n=t.target,o=t.children,a=t.onKeyDown,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}(t,["capture","target","children","onKeyDown"]),u=Object(r.useCallback)((function(t){for(var e=t.keyCode?t.keyCode:t.which,n=i[e],r=arguments.length,o=new Array(r>1?r-1:0),u=1;u<r;u++)o[u-1]=arguments[u];n&&s[n]&&s[n].apply(s,[t].concat(o)),a&&a.apply(void 0,[t].concat(o))}),[a,s]);return Object(r.useEffect)((function(){return"document"===n&&document.addEventListener("keydown",u,e),function(){"document"===n&&document.removeEventListener("keydown",u,e)}}),[e,u,n]),"document"===n?o:Object(r.cloneElement)(r.Children.only(o),{onKeyDown:u})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o}));var r=function(t,e){var n,r=Object.keys(e.global.breakpoints).sort((function(t,n){var r=e.global.breakpoints[t],i=e.global.breakpoints[n];return r?i?r.value?i.value?r.value-i.value:-1:1:-1:1})),i=r[r.length-1];return r.some((function(r){var i=e.global.breakpoints[r];return!(!i||i.value&&!(i.value>=t))&&(n=r,!0)})),n||i},i=function(t,e){return e.global.deviceBreakpoints[t]},o=function(t,e){var n=e&&t.global.breakpoints[e]||{};return n.edgeSize||(n.edgeSize=t.global.edgeSize),n.borderSize||(n.borderSize=t.global.borderSize),n.size||(n.size=t.global.size),n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return h})),n.d(e,"h",(function(){return d})),n.d(e,"i",(function(){return y})),n.d(e,"k",(function(){return v})),n.d(e,"g",(function(){return _})),n.d(e,"c",(function(){return A})),n.d(e,"m",(function(){return w})),n.d(e,"l",(function(){return x})),n.d(e,"j",(function(){return E})),n.d(e,"n",(function(){return S}));var r=n(4),i=n(403),o=n(51),a=n(56),s=Object(r.css)(["font-family:",";font-size:",";line-height:",";font-weight:",";"," box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;"],(function(t){return t.theme.global.font.family}),(function(t){return t.theme.global.font.size}),(function(t){return t.theme.global.font.height}),(function(t){return t.theme.global.font.weight}),(function(t){return!t.plain&&Object(i.d)(t.theme.baseBackground,t.theme)})),u=Object(r.css)(["border:"," solid ",";border-radius:",";"],(function(t){return t.theme.global.control.border.width}),(function(t){return Object(o.c)(t.theme.global.control.border.color||"border",t.theme)}),(function(t){return t.theme.global.control.border.radius})),l=function(t,e,n,i,o){var s=i&&o.global.breakpoints[i];if("string"===typeof e)return Object(r.css)(["",":",";",";"],t,o.global.edgeSize[e]||e,n&&s?Object(a.a)(s,"\n        "+t+": "+(s.edgeSize[e]||e)+";\n      "):"");var u=[],l=e.horizontal,c=e.vertical,f=e.top,h=e.bottom,p=e.left,d=e.right,m=l&&c&&l===c;if(m||f&&h&&p&&d&&f===h===p===d){var g=m?l:f;return Object(r.css)(["",":",";",";"],t,o.global.edgeSize[g]||g,n&&s?Object(a.a)(s,"\n        "+t+": "+(s.edgeSize[g]||g)+";\n      "):"")}return l&&u.push(Object(r.css)(["","-left:",";","-right:",";",";"],t,o.global.edgeSize[l]||l,t,o.global.edgeSize[l]||l,n&&s?Object(a.a)(s,"\n          "+t+"-left: "+(s.edgeSize[l]||l)+";\n          "+t+"-right: "+(s.edgeSize[l]||l)+";\n        "):"")),c&&u.push(Object(r.css)(["","-top:",";","-bottom:",";",";"],t,o.global.edgeSize[c]||c,t,o.global.edgeSize[c]||c,n&&s?Object(a.a)(s,"\n          "+t+"-top: "+(s.edgeSize[c]||c)+";\n          "+t+"-bottom: "+(s.edgeSize[c]||c)+";\n        "):"")),f&&u.push(Object(r.css)(["","-top:",";",";"],t,o.global.edgeSize[f]||f,n&&s?Object(a.a)(s,"\n          "+t+"-top: "+(s.edgeSize[f]||f)+";\n        "):"")),h&&u.push(Object(r.css)(["","-bottom:",";",";"],t,o.global.edgeSize[h]||h,n&&s?Object(a.a)(s,"\n          "+t+"-bottom: "+(s.edgeSize[h]||h)+";\n        "):"")),p&&u.push(Object(r.css)(["","-left:",";",";"],t,o.global.edgeSize[p]||p,n&&s?Object(a.a)(s,"\n          "+t+"-left: "+(s.edgeSize[p]||p)+";\n        "):"")),d&&u.push(Object(r.css)(["","-right:",";",";"],t,o.global.edgeSize[d]||d,n&&s?Object(a.a)(s,"\n          "+t+"-right: "+(s.edgeSize[d]||d)+";\n        "):"")),e.start&&u.push(Object(r.css)(["","-inline-start:",";",";"],t,o.global.edgeSize[e.start]||e.start,n&&s?Object(a.a)(s,"\n          "+t+"-inline-start: "+(s.edgeSize[e.start]||e.start)+";\n        "):"")),e.end&&u.push(Object(r.css)(["","-inline-end:",";",";"],t,o.global.edgeSize[e.end]||e.end,n&&s?Object(a.a)(s,"\n          "+t+"-inline-end: "+(s.edgeSize[e.end]||e.end)+";\n        "):"")),u},c=function(t){return"horizontal"===t?"width: 100%;":"vertical"===t?"height: 100%;":t?"\n      width: 100%;\n      height: 100%;\n    ":void 0},f=function(t,e){var n=void 0===e?{}:e,r=n.forceOutline,i=n.justBorder,a=t.theme.global.focus;if(!a||r&&!a.outline){var s=Object(o.c)("focus",t.theme);return s?"outline: 2px solid "+s+";":""}if(a.outline&&(!a.border||!i)){if("object"===typeof a.outline){var u=Object(o.c)(a.outline.color||"focus",t.theme);return"\n        outline-offset: 0px;\n        outline: "+(a.outline.size||"2px")+" solid "+u+";\n      "}return"outline: "+a.outline+";"}if(a.shadow&&(!a.border||!i)){if("object"===typeof a.shadow){var l=Object(o.c)(a.border&&a.border.color||a.shadow.color||"focus",t.theme),c=a.shadow.size||"2px";return"\n        outline: none;\n        box-shadow: 0 0 "+c+" "+c+" "+l+";\n      "}return"\n      outline: none;\n      box-shadow: "+a.shadow+";\n    "}return a.border?"\n      outline: none;\n      border-color: "+Object(o.c)(a.border.color||"focus",t.theme)+";\n    ":""},h=function(t){var e=void 0===t?{}:t,n=e.forceOutline,i=e.justBorder,o=e.skipSvgChildren;return Object(r.css)([""," "," ",""],(function(t){return!o&&"\n  > circle,\n  > ellipse,\n  > line,\n  > path,\n  > polygon,\n  > polyline,\n  > rect {\n    "+f(t)+"\n  }"}),(function(t){return f(t,{forceOutline:n,justBorder:i})}),!n&&"\n  ::-moz-focus-inner {\n    border: 0;\n  }\n  ")},p=function(t,e){return Object(a.b)((t.theme.global.edgeSize[e]||e)+"px")+Object(a.b)(t.theme.global.control.border.width+"px")+"px"},d=function(t,e){var n;if("object"!==typeof t.theme.global.input.padding)return p(t,t.theme.global.input.padding);n="left"===e||"right"===e?"horizontal":"top"===e||"bottom"===e?"vertical":void 0;var r=t.theme.global.input.padding[e]||t.theme.global.input.padding[n];return p(t,r)},m=Object(r.css)(["color:",";"],(function(t){return Object(o.c)(t.theme.global.colors.placeholder,t.theme)})),g=Object(r.css)(["&::-webkit-input-placeholder{",";}&::-moz-placeholder{",";}&:-ms-input-placeholder{",";}"],m,m,m),y=Object(r.css)(["box-sizing:border-box;"," font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;"," "," "," margin:0;"," ",";"," ","::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}",""],(function(t){return"font-size: "+(t.theme.global.input.font.size?t.theme.text[t.theme.global.input.font.size].size||t.theme.global.input.font.size:"inherit")+";"}),(function(t){return t.theme.global.input.font.height&&"line-height: "+t.theme.global.input.font.height+";"}),(function(t){return t.theme.global.input.padding&&"object"!==typeof t.theme.global.input.padding?"padding: "+(Object(a.b)(t.theme.global.edgeSize[t.theme.global.input.padding]||t.theme.global.input.padding)-Object(a.b)(t.theme.global.control.border.width))+"px;":l("padding",t.theme.global.input.padding,t.responsive,t.theme.box.responsiveBreakpoint,t.theme)}),(function(t){return(t.theme.global.input.weight||t.theme.global.input.font.weight)&&Object(r.css)(["font-weight:",";"],t.theme.global.input.weight||t.theme.global.input.font.weight)}),(function(t){return t.size&&function(t){var e=t.theme.text[t.size];return Object(r.css)(["font-size:",";line-height:",";"],e.size,e.height)}(t)}),(function(t){return t.focus&&!t.plain&&h()}),u,g,(function(t){return t.theme.global.input.extend})),v=function(t){return"string"===typeof t?Object(r.css)(["overflow:",";"],t):Object(r.css)([""," ",";"],t.horizontal&&"overflow-x: "+t.horizontal+";",t.vertical&&"overflow-y: "+t.vertical+";")},b={center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},_=Object(r.css)([""," "," ",""],(function(t){return t.alignSelf&&"align-self: "+b[t.alignSelf]+";"}),(function(t){return t.gridArea&&"grid-area: "+t.gridArea+";"}),(function(t){return t.margin&&t.theme.global&&l("margin",t.margin,t.responsive,t.theme.global.edgeSize.responsiveBreakpoint,t.theme)})),A=function(t){return Object(r.css)(["opacity:",";cursor:default;"],(function(e){return t||e.theme.global.control.disabled.opacity}))},w=function(t,e,n){return Object(r.css)(["",":",";"],t,n.global.size[e]||e)},x=Object(r.css)(["outline:none;border:none;"]),E=function(t,e,n){var a=[];if(t.padding||t.pad){var s=t.padding||t.pad;s.vertical||s.horizontal?a.push("padding: "+(e.global.edgeSize[s.vertical]||s.vertical||0)+" "+(e.global.edgeSize[s.horizontal]||s.horizontal||0)+";"):a.push("padding: "+(e.global.edgeSize[s]||s||0)+";")}if(t.background?a.push(Object(i.d)(n||t.background,e,t.color||(!Object.prototype.hasOwnProperty.call(t,"color")||void 0!==t.color)&&void 0)):t.color&&a.push("color: "+Object(o.c)(t.color,e)+";"),t.border?(t.border.width&&a.push(Object(r.css)(["border-style:solid;border-width:",";"],t.border.width)),t.border.color&&a.push(Object(r.css)(["border-color:",";"],Object(o.c)(!t.background&&n||t.border.color||"border",e))),t.border.radius&&a.push(Object(r.css)(["border-radius:",";"],t.border.radius))):!1===t.border&&a.push("border: none;"),!n||t.border||t.background||a.push("color: "+Object(o.c)(n,e)+";"),t.font&&(t.font.size&&a.push("font-size: "+(e.text[t.font.size].size||t.font.size)+";"),t.font.height&&a.push("line-height: "+t.font.height+";"),t.font.weight&&a.push("font-weight: "+t.font.weight+";")),t.opacity){var u=!0===t.opacity?e.global.opacity.medium:e.global.opacity[t.opacity]||t.opacity;a.push("opacity: "+u+";")}return t.extend&&a.push(t.extend),a},O={center:"center",end:"right",start:"left"},S=Object(r.css)(["text-align:",";"],(function(t){return O[t.textAlign]}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),i=n.n(r).a.createContext("object"===typeof document?document.body:void 0)},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(184),a=n.n(o);e.default=function(t){return Object(r.useEffect)((function(){var e=a.a.stringify(t.params);window.location=["".concat(t.to),e].join("?")})),i.a.createElement(i.a.Fragment,null)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r);function o(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return a(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 a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 s=function(t){var e=o(Object(r.useState)(!1),2),n=e[0],a=e[1],s=i.a.createElement("span",{className:"confirmation",onClick:t.onConfirmation},t.confirmationLabel),u=i.a.createElement("span",{onClick:function(){return a(!1)}},t.cancelConfirmationLabel),l=n?i.a.createElement("span",null,t.beforeConfirmationLabel," ",s," ",u):i.a.createElement("span",{onClick:function(){return a(!0)}},t.label);return i.a.createElement("button",{className:"".concat(n?"confirm":"")},l)};s.defaultProps={label:"",beforeConfirmationLabel:I18n.t("are_you_sure"),cancelConfirmationLabel:I18n.t("no"),confirmationLabel:I18n.t("yes"),onConfirmation:function(){}},e.default=s},function(t,e,n){"use strict";n.r(e),n.d(e,"query",(function(){return a}));var r=n(0),i=n.n(r);n(443),n(667),n(1307),n(989),n(763),n(1230),n(668),n(669),n(1231),n(1058),n(670),n(1059);function o(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n  query ContentPageQuery($pageId: Humap_bigint!) {\n    humap {\n      pages_by_pk(id: $pageId) {\n\t\t\t\tdescription\n\t\t\t\tname\n\t\t\t\tsanitised_content\n\t\t\t\thighlighted_content_intro\n\t\t\t\timage {\n\t\t\t\t\turl\n\t\t\t\t\tname\n\t\t\t\t\tdescription\n\t\t\t\t\tcredit\n\t\t\t\t}\n\t\t\t\tcta_blocks {\n\t\t\t\t\turl\n\t\t\t\t\ttitle\n\t\t\t\t\tsanitised_content\n\t\t\t\t\tbutton_text\n\t\t\t\t}\n\t\t\t},\n\t\t\tpage_quick_starts(where: {page_id: {_eq: $pageId}}) {\n\t\t\t\tquick_start {\n\t\t\t\t\ttitle\n\t\t\t\t\tcontent\n\t\t\t\t\turl\n\t\t\t\t\timage {\n\t\t\t\t\t\turl\n\t\t\t\t\t\tname\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n    }\n  }\n"]);return o=function(){return t},t}e.default=function(t){t.data;return i.a.createElement("p",null,"fixme")};var a=graphql(o())},function(t,e,n){"use strict";n.r(e),n.d(e,"query",(function(){return y}));var r=n(0),i=n.n(r),o=n(443),a=n(398),s=n(667),u=n(1305),l=n(1308),c=n(1309),f=(n(1337),n(989),n(763)),h=(n(1230),n(668)),p=n(669),d=(n(1231),n(670)),m=n(1059);function g(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n  query HomePageQuery($pageId: Humap_bigint!) {\n    humap {\n      pages_by_pk(id: $pageId) {\n\t\t\t\tdescription\n\t\t\t\tname\n\t\t\t\tsanitised_content\n\t\t\t\thighlighted_content_intro\n\t\t\t\tsearch_image {\n\t\t\t\t\turl\n\t\t\t\t\tname\n\t\t\t\t}\n\t\t\t\timages {\n      \t\timage {\n       \t\t\turl\n        \t\tname\n      \t\t}\n    \t\t}\n\t\t\t},\n\t\t\tpage_quick_starts(where: {page_id: {_eq: $pageId}}) {\n\t\t\t\tquick_start {\n\t\t\t\t\ttitle\n\t\t\t\t\tcontent\n\t\t\t\t\turl\n\t\t\t\t\timage {\n\t\t\t\t\t\turl\n\t\t\t\t\t\tname\n\t\t\t\t\t}\n\t\t\t\t}\n            }\n            site_meta: site_metas {\n                title: site_title\n            }\n    }\n  }\n"]);return g=function(){return t},t}e.default=function(t){var e=t.data,n=e.humap.pages_by_pk,r=e.humap.page_quick_starts,o=e.humap.site_meta[0].title;return i.a.createElement(s.default,null,i.a.createElement(p.default,null,i.a.createElement(h.default,null,i.a.createElement(f.default,null)),i.a.createElement(l.default,{title:o,image:n.image,description:n.description,images:n.images}),i.a.createElement(c.default,{content:n.sanitised_content}),i.a.createElement(u.default,null),i.a.createElement(m.default,{content:n.highlighted_content_intro,quick_starts:r}),i.a.createElement(d.default,null)))};Object(a.deepMerge)(o.default,{global:{spacing:"12px",colors:{focus:{dark:"#444444",light:"#CCCCCC"}},font:{family:!1,size:!1,height:!1},breakpoints:{small:!1,medium:!1,large:!1,smallMobile:{value:480},mobile:{value:767},tablet:{value:1024},desktop:{value:1680},wide:{value:1e4}},input:{weight:400}},rangeInput:{track:{height:"2px"},thumb:{}}});var y=graphql(g())},function(t,e,n){"use strict";n.r(e),n.d(e,"useQueryStringParams",(function(){return l}));n(0);var r=n(17),i=n(184),o=n.n(i);function a(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=function(t){var e=Object(r.useStore)().searchResults.filter.defaultSearchProperties,n=o.a.parse(t.search,{arrayFormat:"comma"});return s(s({},e),n)}},function(t,e,n){"use strict";n.r(e),n.d(e,"QuickStartsFilter",(function(){return u}));var r=n(2),i=n(664),o=n(153),a=n(1352);function s(){s=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,a,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}var u=r.types.model({limit:r.types.number}).actions((function(t){return{setSearchParameter:function(e,n){t[e]=n}}})).views((function(t){return{get nextOffset(){return t.limit+t.offset}}})),l=o.default.named("QuickStartsCollection").props({filter:u,results:r.types.array(i.default,[])}).actions((function(t){return{fetchQuickStarts:Object(r.flow)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading.loading(),e.prev=1,e.next=4,t.fetch(a.fetchTrayQuickStartsQuery,{limit:100});case 4:t.loading.done(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))}})).preProcessSnapshot((function(t){return t}));e.default=l},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(614),a=n(669),s=n(668),u=(n(989),n(763),n(1058)),l=n(670),c=n(667),f=n(847),h=n.n(f);e.default=function(){return i.a.createElement(o.default,null,i.a.createElement(c.default,null,i.a.createElement(a.default,null,i.a.createElement(s.default,null),i.a.createElement("div",{className:h.a.HeroContent},i.a.createElement("img",{src:"/404.jpg",alt:"Image courtesy Annie Spratt on Unsplash"}),i.a.createElement("div",{className:h.a.textContent},i.a.createElement("h1",null,I18n.t("pages.error_404.title")),i.a.createElement("p",null,I18n.t("pages.error_404.description")))),i.a.createElement(u.default,{content:I18n.t("pages.error_404.sidebar_content"),quick_starts:[],cta_blocks:[]}),i.a.createElement(l.default,null))))}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e){},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(366),i=n(130);const o=[-1,-1,1,-1,-1,1,1,1];class a extends r.a{constructor(t,e){const n=o.map((t=>-1===t?0:t));super(t,Object.assign({},e,{vs:"attribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n  gl_Position = vec4(aClipSpacePosition, 0., 1.);\n  position = aClipSpacePosition;\n  coordinate = aCoordinate;\n  uv = aTexCoord;\n}\n",geometry:new i.a({drawMode:5,vertexCount:4,attributes:{aClipSpacePosition:{size:2,value:new Float32Array(o)},aTexCoord:{size:2,value:new Float32Array(n)},aCoordinate:{size:2,value:new Float32Array(n)}}})})),this.setVertexCount(4)}}},function(t,e,n){t.exports=n.p+"media/components/placemaker/assets/images/logo-humap-white-1a5d5b473ef7f37e52f0858ee91321a9.svg"},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(7);e.default=Object(o.a)((function(t){var e,n=t.field,r=n.annotation_field.options.slice();return i.a.createElement("select",{onChange:n.onChange,value:null!==(e=n.fieldValue)&&void 0!==e?e:[-1],multiple:!0},r.map((function(t,e){return i.a.createElement("option",{key:"option-field-".concat(n.id,"-").concat(e),value:t.id},t.name)})))}))},function(t,e,n){"use strict";n.r(e);n(0);var r=n(7);e.default=Object(r.a)((function(t){var e=t.field,n=e.annotation_field.options.slice();return e.annotation_field.multi_choice||n.unshift({id:"",name:""}),null}))},function(t,e,n){t.exports={ToolbarButtonToggleToggle:"ToolbarButtonToggle-module__ToolbarButtonToggleToggle___1uVDq",ToolbarButtonToggle:"ToolbarButtonToggle-module__ToolbarButtonToggle___2TtHg",isCurrent:"ToolbarButtonToggle-module__isCurrent___3zmR7","icon--marker":"ToolbarButtonToggle-module__icon--marker___o5c6x","icon--line":"ToolbarButtonToggle-module__icon--line___qUIyD","icon--select":"ToolbarButtonToggle-module__icon--select___1Fr5f","icon--measure":"ToolbarButtonToggle-module__icon--measure___1Bueq","icon--polygon":"ToolbarButtonToggle-module__icon--polygon___1G7I6","icon--trace":"ToolbarButtonToggle-module__icon--trace___TnzCL","icon--delete":"ToolbarButtonToggle-module__icon--delete___3JuWU","icon--move":"ToolbarButtonToggle-module__icon--move___2AveB","icon--edit-metadata":"ToolbarButtonToggle-module__icon--edit-metadata___2YJIK","icon--combine":"ToolbarButtonToggle-module__icon--combine___3TU4D","icon--cut-away":"ToolbarButtonToggle-module__icon--cut-away___1b49u",disabled:"ToolbarButtonToggle-module__disabled___1U39u",hasSubmenuOpen:"ToolbarButtonToggle-module__hasSubmenuOpen___21ucG"}},function(t,e,n){"use strict";n.r(e),n.d(e,"fetchLayersQuery",(function(){return i}));var r=n(147),i=function(t){return r.default.request("\n  #graphql\n  query Layers($place_id: bigint!) {\n    card_items(where:{id:{_eq: $place_id}}) {\n      name\n    }\n  }\n",{place_id:t})}},function(t,e,n){"use strict";n.r(e),n.d(e,"getIconName",(function(){return R})),n.d(e,"default",(function(){return N}));var r=n(368),i=n(146);function o(t,e,n,r,i,s){if(i-r<=n)return;const u=r+i>>1;a(t,e,u,r,i,s%2),o(t,e,n,r,u-1,s+1),o(t,e,n,u+1,i,s+1)}function a(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const s=i-r+1,u=n-r+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);a(t,e,n,Math.max(r,Math.floor(n-u*c/s+f)),Math.min(i,Math.floor(n+(s-u)*c/s+f)),o)}const u=e[2*n+o];let l=r,c=i;for(s(t,e,r,n),e[2*i+o]>u&&s(t,e,r,i);l<c;){for(s(t,e,l,c),l++,c--;e[2*l+o]<u;)l++;for(;e[2*c+o]>u;)c--}e[2*r+o]===u?s(t,e,r,c):(c++,s(t,e,c,i)),c<=n&&(r=c+1),n<=c&&(i=c-1)}}function s(t,e,n,r){u(t,n,r),u(e,2*n,2*r),u(e,2*n+1,2*r+1)}function u(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function l(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const c=t=>t[0],f=t=>t[1];class h{constructor(t,e=c,n=f,r=64,i=Float64Array){this.nodeSize=r,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,s=this.ids=new a(t.length),u=this.coords=new i(2*t.length);for(let o=0;o<t.length;o++)s[o]=o,u[2*o]=e(t[o]),u[2*o+1]=n(t[o]);o(s,u,r,0,s.length-1,0)}range(t,e,n,r){return function(t,e,n,r,i,o,a){const s=[0,t.length-1,0],u=[];let l,c;for(;s.length;){const f=s.pop(),h=s.pop(),p=s.pop();if(h-p<=a){for(let a=p;a<=h;a++)l=e[2*a],c=e[2*a+1],l>=n&&l<=i&&c>=r&&c<=o&&u.push(t[a]);continue}const d=Math.floor((p+h)/2);l=e[2*d],c=e[2*d+1],l>=n&&l<=i&&c>=r&&c<=o&&u.push(t[d]);const m=(f+1)%2;(0===f?n<=l:r<=c)&&(s.push(p),s.push(d-1),s.push(m)),(0===f?i>=l:o>=c)&&(s.push(d+1),s.push(h),s.push(m))}return u}(this.ids,this.coords,t,e,n,r,this.nodeSize)}within(t,e,n){return function(t,e,n,r,i,o){const a=[0,t.length-1,0],s=[],u=i*i;for(;a.length;){const c=a.pop(),f=a.pop(),h=a.pop();if(f-h<=o){for(let i=h;i<=f;i++)l(e[2*i],e[2*i+1],n,r)<=u&&s.push(t[i]);continue}const p=Math.floor((h+f)/2),d=e[2*p],m=e[2*p+1];l(d,m,n,r)<=u&&s.push(t[p]);const g=(c+1)%2;(0===c?n-i<=d:r-i<=m)&&(a.push(h),a.push(p-1),a.push(g)),(0===c?n+i>=d:r+i>=m)&&(a.push(p+1),a.push(f),a.push(g))}return s}(this.ids,this.coords,t,e,n,this.nodeSize)}}const p={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},d=Math.fround||(m=new Float32Array(1),t=>(m[0]=+t,m[0]));var m;class g{constructor(t){this.options=E(Object.create(p),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:n,maxZoom:r,nodeSize:i}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;let a=[];for(let s=0;s<t.length;s++)t[s].geometry&&a.push(v(t[s],s));this.trees[r+1]=new h(a,O,S,i,Float32Array),e&&console.timeEnd(o);for(let s=r;s>=n;s--){const t=+Date.now();a=this._cluster(a,s),this.trees[s]=new h(a,O,S,i,Float32Array),e&&console.log("z%d: %d clusters in %dms",s,a.length,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const t=this.getClusters([n,r,180,o],e),a=this.getClusters([-180,r,i,o],e);return t.concat(a)}const a=this.trees[this._limitZoom(e)],s=a.range(A(n),w(o),A(i),w(r)),u=[];for(const l of s){const t=a.points[l];u.push(t.numPoints?b(t):this.points[t.index])}return u}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.points[e];if(!o)throw new Error(r);const a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i.within(o.x,o.y,a),u=[];for(const l of s){const e=i.points[l];e.parentId===t&&u.push(e.numPoints?b(e):this.points[e.index])}if(0===u.length)throw new Error(r);return u}getLeaves(t,e,n){e=e||10,n=n||0;const r=[];return this._appendLeaves(r,t,e,n,0),r}getTile(t,e,n){const r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:a}=this.options,s=a/o,u=(n-s)/i,l=(n+1+s)/i,c={features:[]};return this._addTileFeatures(r.range((e-s)/i,u,(e+1+s)/i,l),r.points,e,n,i,c),0===e&&this._addTileFeatures(r.range(1-s/i,u,1,l),r.points,i,n,i,c),e===i-1&&this._addTileFeatures(r.range(0,u,s/i,l),r.points,-1,n,i,c),c.features.length?c:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}_appendLeaves(t,e,n,r,i){const o=this.getChildren(e);for(const a of o){const e=a.properties;if(e&&e.cluster?i+e.point_count<=r?i+=e.point_count:i=this._appendLeaves(t,e.cluster_id,n,r,i):i<r?i++:t.push(a),t.length===n)break}return i}_addTileFeatures(t,e,n,r,i,o){for(const a of t){const t=e[a],s=t.numPoints,u={type:1,geometry:[[Math.round(this.options.extent*(t.x*i-n)),Math.round(this.options.extent*(t.y*i-r))]],tags:s?_(t):this.points[t.index].properties};let l;s?l=t.id:this.options.generateId?l=t.index:this.points[t.index].id&&(l=this.points[t.index].id),void 0!==l&&(u.id=l),o.features.push(u)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(+t,this.options.maxZoom+1))}_cluster(t,e){const n=[],{radius:r,extent:i,reduce:o,minPoints:a}=this.options,s=r/(i*Math.pow(2,e));for(let u=0;u<t.length;u++){const r=t[u];if(r.zoom<=e)continue;r.zoom=e;const i=this.trees[e+1],l=i.within(r.x,r.y,s),c=r.numPoints||1;let f=c;for(const t of l){const n=i.points[t];n.zoom>e&&(f+=n.numPoints||1)}if(f>=a){let t=r.x*c,a=r.y*c,s=o&&c>1?this._map(r,!0):null;const h=(u<<5)+(e+1)+this.points.length;for(const n of l){const u=i.points[n];if(u.zoom<=e)continue;u.zoom=e;const l=u.numPoints||1;t+=u.x*l,a+=u.y*l,u.parentId=h,o&&(s||(s=this._map(r,!0)),o(s,this._map(u)))}r.parentId=h,n.push(y(t/f,a/f,h,f,s))}else if(n.push(r),f>1)for(const t of l){const r=i.points[t];r.zoom<=e||(r.zoom=e,n.push(r))}}return n}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?E({},t.properties):t.properties;const n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?E({},r):r}}function y(t,e,n,r,i){return{x:d(t),y:d(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function v(t,e){const[n,r]=t.geometry.coordinates;return{x:d(A(n)),y:d(w(r)),zoom:1/0,index:e,parentId:-1}}function b(t){return{type:"Feature",id:t.id,properties:_(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),x(t.y)]}};var e}function _(t){const e=t.numPoints,n=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?Math.round(e/100)/10+"k":e;return E(E({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function A(t){return t/360+.5}function w(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function x(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function E(t,e){for(const n in e)t[n]=e[n];return t}function O(t){return t.x}function S(t){return t.y}var P=["getIcon","iconAtlas","iconMapping","sizeScale"];function C(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 T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(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 I(t,e){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},I(t,e)}function L(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=M(t);if(e){var i=M(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return j(this,n)}}function j(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function M(t){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},M(t)}function R(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=n===r,a=e.properties.customSpriteType||e.properties.type,s=[],u=i.alwaysNumbered,l=i.isHighlighted||!1;e.properties.customSpriteType&&"trailpin"===e.properties.customSpriteType&&(u=!0,t=e.properties.ordinalPosition),1===t||u?s.push(a):o?s.push("pin"):s.push("point");var c="";return t>1&&t<10||u?c=String(t).padStart(2,"0"):t>=10&&t<100?c="".concat(Math.floor(t/10),"0"):t>=100&&(c="100"),c.length&&s.push(c),l&&s.push("highlighted"),s.join("-")}var N=function(t){!function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}(a,t);var e,n,r,o=L(a);function a(){return T(this,a),o.apply(this,arguments)}return e=a,(n=[{key:"shouldUpdateState",value:function(t){return t.changeFlags.somethingChanged}},{key:"updateState",value:function(t){var e=t.props,n=t.oldProps,r=t.changeFlags.dataChanged||e.sizeScale!==n.sizeScale,i=e.clusterRadius?e.sizeScale/e.clusterRadius:0;if(r){var o=new g({maxZoom:this.context.deck.viewState.maxZoom+1,radius:i});o.load(e.data.map((function(t){return{geometry:{coordinates:e.getPosition(t)},properties:t}}))),this.setState({index:o})}var a=Math.floor(this.context.viewport.zoom);(r||a!==this.state.z)&&this.setState({data:this.state.index.getClusters([-180,-85,180,85],a),z:a})}},{key:"getPickingInfo",value:function(t){var e=t.info,n=t.mode,r=e.object&&e.object.properties;return r&&(r.cluster&&"hover"!==n&&(e.objects=this.state.index.getLeaves(r.cluster_id,25).map((function(t){return t.properties}))),e.object=r),e}},{key:"renderLayers",value:function(){var t=this,e=this.state.data,n=this.props,r=n.getIcon,o=n.iconAtlas,a=n.iconMapping,s=n.sizeScale,u=C(n,P);return new i.a(this.getSubLayerProps({id:"icon",data:e,iconAtlas:o,iconMapping:a,sizeScale:s,getIcon:r||function(e){return R(e.properties.cluster?e.properties.point_count:1,e,t.context.deck.viewState.zoom,t.context.deck.viewState.maxZoom,u)},getPosition:function(t){return t.geometry.coordinates},getSize:function(t){return t.properties.cluster&&t.properties.point_count,1}}))}}])&&k(e.prototype,n),r&&k(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a)},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}n.d(e,"a",(function(){return u}));const i={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 o(t){let e=a(t);return"object"===e?t?"type"in t?Object.assign({},t,i[t.type]):"value"in t?(e=a(t.value),Object.assign({type:e},t,i[e])):{type:"object",value:t}:{type:"object",value:null}:Object.assign({type:e,value:t},i[e])}function a(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}class s{constructor(t){let{name:e,vs:n,fs:i,dependencies:a=[],uniforms:s,getUniforms:u,deprecations:l=[],defines:c={},inject:f={},vertexShader:h,fragmentShader:p}=t;r("string"===typeof e),this.name=e,this.vs=n||h,this.fs=i||p,this.getModuleUniforms=u,this.dependencies=a,this.deprecations=this._parseDeprecationDefinitions(l),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}(f),s&&(this.uniforms=function(t){const e={};for(const n in t){const r=o(t[n]);e[n]=r}return e}(s))}getModuleSource(t){let e;switch(t){case"vs":e=this.vs||"";break;case"fs":e=this.fs||"";break;default:r(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(e,"// END MODULE_").concat(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=>{if("function"===t.type)t.regex=new RegExp("\\b".concat(t.old,"\\("));else t.regex=new RegExp("".concat(t.type," ").concat(t.old,";"))})),t}_defaultGetUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={},n=this.uniforms;for(const i in n){const o=n[i];i in t&&!o.private?(o.validate&&r(o.validate(t[i],o),"".concat(this.name,": invalid ").concat(i)),e[i]=t[i]):e[i]=o.value}return e}}function u(t){if(!t.normalized&&(t.normalized=!0,t.uniforms&&!t.getUniforms)){const e=new s(t);t.getUniforms=e.getUniforms.bind(e)}return t}},,function(t,e,n){var r;t.exports=(r=n(0),function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e){t.exports=r},function(t,e,n){"use strict";(function(t){var n=function(){this._tweens={},this._tweensAddedDuringUpdate={}};n.prototype={getAll:function(){return Object.keys(this._tweens).map(function(t){return this._tweens[t]}.bind(this))},removeAll:function(){this._tweens={}},add:function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},remove:function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},update:function(t,e){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(t=void 0!==t?t:i.now();n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var o=this._tweens[n[r]];o&&!1===o.update(t)&&(o._isPlaying=!1,e||delete this._tweens[n[r]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var r,i=new n;i.Group=n,i._nextId=0,i.nextId=function(){return i._nextId++},"undefined"==typeof self&&void 0!==t&&t.hrtime?i.now=function(){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?i.now=self.performance.now.bind(self.performance):void 0!==Date.now?i.now=Date.now:i.now=function(){return(new Date).getTime()},i.Tween=function(t,e){this._object=t,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=i.Easing.Linear.None,this._interpolationFunction=i.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=e||i,this._id=i.nextId()},i.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},duration:function(t){return this._duration=t,this},start:function(t){for(var e in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==t?"string"==typeof t?i.now()+parseFloat(t):t:i.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[e]instanceof Array){if(0===this._valuesEnd[e].length)continue;this._valuesEnd[e]=[this._object[e]].concat(this._valuesEnd[e])}void 0!==this._object[e]&&(this._valuesStart[e]=this._object[e],this._valuesStart[e]instanceof Array==0&&(this._valuesStart[e]*=1),this._valuesStartRepeat[e]=this._valuesStart[e]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop()},group:function(t){return this._group=t,this},delay:function(t){return this._delayTime=t,this},repeat:function(t){return this._repeat=t,this},repeatDelay:function(t){return this._repeatDelayTime=t,this},yoyo:function(t){return this._yoyo=t,this},easing:function(t){return this._easingFunction=t,this},interpolation:function(t){return this._interpolationFunction=t,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(t){return this._onStartCallback=t,this},onUpdate:function(t){return this._onUpdateCallback=t,this},onRepeat:function(t){return this._onRepeatCallback=t,this},onComplete:function(t){return this._onCompleteCallback=t,this},onStop:function(t){return this._onStopCallback=t,this},update:function(t){var e,n,r;if(t<this._startTime)return!0;for(e in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?1:n,r=this._easingFunction(n),this._valuesEnd)if(void 0!==this._valuesStart[e]){var i=this._valuesStart[e]||0,o=this._valuesEnd[e];o instanceof Array?this._object[e]=this._interpolationFunction(o,r):("string"==typeof o&&(o="+"===o.charAt(0)||"-"===o.charAt(0)?i+parseFloat(o):parseFloat(o)),"number"==typeof o&&(this._object[e]=i+(o-i)*r))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[e]&&(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo){var a=this._valuesStartRepeat[e];this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=a}this._valuesStart[e]=this._valuesStartRepeat[e]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,u=this._chainedTweens.length;s<u;s++)this._chainedTweens[s].start(this._startTime+this._duration);return!1}return!0}},i.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-i.Easing.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*i.Easing.Bounce.In(2*t):.5*i.Easing.Bounce.Out(2*t-1)+.5}}},i.Interpolation={Linear:function(t,e){var n=t.length-1,r=n*e,o=Math.floor(r),a=i.Interpolation.Utils.Linear;return e<0?a(t[0],t[1],r):e>1?a(t[n],t[n-1],n-r):a(t[o],t[o+1>n?n:o+1],r-o)},Bezier:function(t,e){for(var n=0,r=t.length-1,o=Math.pow,a=i.Interpolation.Utils.Bernstein,s=0;s<=r;s++)n+=o(1-e,r-s)*o(e,s)*t[s]*a(r,s);return n},CatmullRom:function(t,e){var n=t.length-1,r=n*e,o=Math.floor(r),a=i.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(r=n*(1+e))),a(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],r-o)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-r)-t[0]):e>1?t[n]-(a(t[n],t[n],t[n-1],t[n-1],r-n)-t[n]):a(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],r-o)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=i.Interpolation.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(r=[1],function(t){var e=1;if(r[t])return r[t];for(var n=t;n>1;n--)e*=n;return r[t]=e,e}),CatmullRom:function(t,e,n,r,i){var o=.5*(n-t),a=.5*(r-e),s=i*i;return(2*e-2*n+o+a)*(i*s)+(-3*e+3*n-2*o-a)*s+o*i+e}}},e.a=i}).call(this,n(3))},function(t,e,n){"use strict";(function(t){var n=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}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=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 a(){n&&(n=!1,t()),r&&u()}function s(){o(a)}function u(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return u}(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(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(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(){r&&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;a.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}(),l=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},c=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},f=y(0,0,0,0);function h(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+h(t["border-"+n+"-width"])}),0)}function d(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=c(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]=h(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=p(r,"left","right")+o),Math.round(u+a)!==n&&(u-=p(r,"top","bottom")+a)),!function(t){return t===c(t).document.documentElement}(t)){var l=Math.round(s+o)-e,d=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(d)&&(u-=d)}return y(i.left,i.top,s,u)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof c(t).SVGGraphicsElement}:function(t){return t instanceof c(t).SVGElement&&"function"==typeof t.getBBox};function g(t){return r?m(t)?function(t){var e=t.getBBox();return y(0,0,e.width,e.height)}(t):d(t):f}function y(t,e,n,r){return{x:t,y:e,width:n,height:r}}var v=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=g(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}(),b=function(t,e){var n,r,i,o,a,s,u,c=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:t,contentRect:c})},_=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}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 c(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new v(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 c(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 b(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}(),A="undefined"!=typeof WeakMap?new WeakMap:new n,w=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=u.getInstance(),r=new _(e,n,this);A.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=A.get(this))[t].apply(e,arguments)}}));var x=void 0!==i.ResizeObserver?i.ResizeObserver:w;e.a=x}).call(this,n(4))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f<e;)u&&u[f].run();f=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.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];l.push(new d(t,e)),1!==l.length||c||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"Slide",(function(){return k})),n.d(e,"Fade",(function(){return D})),n.d(e,"Zoom",(function(){return q}));var r=n(0),i=n.n(r),o=n(1),a=n(2);function s(t){return(s="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 u(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 l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={duration:5e3,transitionDuration:1e3,defaultIndex:0,infinite:!0,autoplay:!0,indicators:!1,arrows:!0,pauseOnHover:!0,scale:1,easing:"linear",canSwipe:!0},f=function(t){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(n,!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},c,{},t)},h={duration:"number",transitionDuration:"number",defaultIndex:"number",infinite:"boolean",indicators:["boolean","function"],autoplay:"boolean",arrows:"boolean",onChange:"function",pauseOnHover:"boolean",prevArrow:["object","function"],nextArrow:["object","function"],scale:"number",easing:"string",canSwipe:"boolean"},p=function(t){for(var e in t){var n=s(t[e]);h[e]&&(Array.isArray(h[e])&&!h[e].includes(n)?console.warn("".concat(e," must be of one of type ").concat(h[e].join(", "))):Array.isArray(h[e])||n===h[e]||console.warn("".concat(e," must be of type ").concat(h[e])))}};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 m(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 g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(n,!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v={linear:o.a.Easing.Linear.None,ease:o.a.Easing.Quadratic.InOut,"ease-in":o.a.Easing.Quadratic.In,"ease-out":o.a.Easing.Quadratic.Out,cubic:o.a.Easing.Cubic.InOut,"cubic-in":o.a.Easing.Cubic.In,"cubic-out":o.a.Easing.Cubic.Out},b=function(t){return v[t]||v.linear},_=function(t,e){var n=Object.keys(t);return Object.keys(e).reduce((function(t,r){return-1===n.indexOf(r)&&(t[r]=e[r]),t}),{})},A=function(t,e,n){var r=t.prevArrow,o=t.infinite,a=e<=0&&!o,s={"data-type":"prev","aria-label":"Previous Slide",disabled:a,onClick:n};if(r)return i.a.cloneElement(r,g({className:"".concat(r.props.className," nav ").concat(a?"disabled":"")},s));var u="nav default-nav ".concat(a?"disabled":"");return i.a.createElement("button",d({className:u},s),i.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},i.a.createElement("path",{d:"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"})))},w=function(t,e,n){var r=t.nextArrow,o=t.infinite,a=e===t.children.length-1&&!o,s={"data-type":"next","aria-label":"Next Slide",disabled:a,onClick:n};if(r)return i.a.cloneElement(r,g({className:"".concat(r.props.className," nav ").concat(a?"disabled":"")},s));var u="nav default-nav ".concat(a?"disabled":"");return i.a.createElement("button",d({className:u},s),i.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},i.a.createElement("path",{d:"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"})))},x=function(t,e,n){var r=t.children,o=t.indicators,a="boolean"!=typeof o;return i.a.createElement("ul",{className:"indicators"},r.map((function(t,r){var s={"data-key":r,"aria-label":"Go to slide ".concat(r+1),onClick:n};return a?function(t,e,n,r){return i.a.cloneElement(r,g({className:"".concat(r.props.className," ").concat(t===e?"active":""),key:e},n))}(e,r,s,o(r)):function(t,e,n){return i.a.createElement("li",{key:e},i.a.createElement("button",d({className:"each-slideshow-indicator ".concat(t===e?"active":"")},n)))}(e,r,s)})))};function E(t){return(E="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 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 S(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 P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function T(t,e){return(T=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var k=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==E(e)&&"function"!=typeof e?C(t):e}(this,P(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.dragging=!1,n.imageContainer=null,n.wrapper=null,n.timeout=null,n.moveSlides=n.moveSlides.bind(C(n)),n.pauseSlides=n.pauseSlides.bind(C(n)),n.startSlides=n.startSlides.bind(C(n)),n.handleResize=n.handleResize.bind(C(n)),n.initResizeObserver=n.initResizeObserver.bind(C(n)),n.reactSlideshowWrapper=Object(r.createRef)(),n.goToSlide=n.goToSlide.bind(C(n)),n.tweenGroup=new o.a.Group,n.startSwipe=n.startSwipe.bind(C(n)),n.endSwipe=n.endSwipe.bind(C(n)),n.swipe=n.swipe.bind(C(n)),n.distanceSwiped=0,n}var n,s,u;return function(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&&T(t,e)}(e,t),n=e,(s=[{key:"componentDidMount",value:function(){var t=this;this.setWidth(),this.initResizeObserver(),p(this.props);var e=f(this.props),n=e.autoplay,r=e.duration;n&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"initResizeObserver",value:function(){var t=this;this.resizeObserver=new a.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current)}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"startSwipe",value:function(t){f(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(){f(this.props).canSwipe&&(this.dragging=!1,Math.abs(this.distanceSwiped)/this.width>.2?this.distanceSwiped<0?this.goNext():this.goBack():Math.abs(this.distanceSwiped)>0&&this.slideImages(this.state.index,300))}},{key:"swipe",value:function(t){if(f(this.props).canSwipe){var e=t.touches?t.touches[0].pageX:t.clientX;if(this.dragging){var n=this.width*(this.state.index+1);this.distanceSwiped=e-this.startingClientX,n-=this.distanceSwiped,this.imageContainer.style.transform="translate(-".concat(n,"px)")}}}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.allImages=Array.prototype.slice.call(this.wrapper.querySelectorAll(".images-wrap > div"),0),this.width=this.wrapper.clientWidth;var t=this.width*(this.props.children.length+2);this.imageContainer.style.width="".concat(t,"px"),this.imageContainer.style.transform="translate(-".concat(this.width*(this.state.index+1),"px)"),this.applySlideStyle()}},{key:"componentDidUpdate",value:function(t){var e=this,n=f(this.props),r=n.autoplay,i=n.duration,o=n.children,a=f(t);r!==a.autoplay&&(r?this.timeout=setTimeout((function(){return e.goNext()}),i):clearTimeout(this.timeout)),o.length!=a.children.length&&(this.setWidth(),clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.goNext()}),i))}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applySlideStyle",value:function(){var t=this;this.allImages.forEach((function(e,n){e.style.width="".concat(t.width,"px")}))}},{key:"pauseSlides",value:function(){f(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=f(this.props),n=e.pauseOnHover,r=e.autoplay,i=e.duration;this.dragging?this.endSwipe():n&&r&&(this.timeout=setTimeout((function(){return t.goNext()}),i))}},{key:"moveSlides",value:function(t){"next"===t.currentTarget.dataset.type?this.goNext():this.goBack()}},{key:"goToSlide",value:function(t){var e=t.currentTarget;this.goTo(parseInt(e.dataset.key))}},{key:"goTo",value:function(t){this.slideImages(t)}},{key:"goNext",value:function(){var t=this.state.index,e=f(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.slideImages(t+1)}},{key:"goBack",value:function(){var t=this.state.index;(f(this.props).infinite||0!==t)&&this.slideImages(t-1)}},{key:"render",value:function(){var t=this,e=f(this.props),n=e.children,r=e.indicators,o=e.arrows,a=_(h,this.props),s=this.state.index,u={transform:"translate(-".concat((s+1)*this.width,"px)")};return i.a.createElement("div",O({"aria-roledescription":"carousel"},a),i.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onMouseMove:this.swipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,onTouchMove:this.swipe,ref:this.reactSlideshowWrapper},o&&A(f(this.props),this.state.index,this.moveSlides),i.a.createElement("div",{className:"react-slideshow-wrapper slide",ref:function(e){return t.wrapper=e}},i.a.createElement("div",{className:"images-wrap",style:u,ref:function(e){return t.imageContainer=e}},i.a.createElement("div",{"data-index":"-1","aria-roledescription":"slide","aria-hidden":"false"},n[n.length-1]),n.map((function(t,e){return i.a.createElement("div",{"data-index":e,key:e,className:e===s?"active":"","aria-roledescription":"slide","aria-hidden":e===s?"false":"true"},t)})),i.a.createElement("div",{"data-index":"-1","aria-roledescription":"slide","aria-hidden":"false"},n[0]))),o&&w(f(this.props),this.state.index,this.moveSlides)),r&&x(f(this.props),this.state.index,this.goToSlide))}},{key:"slideImages",value:function(t,e){var n=this,r=f(this.props),i=r.children,a=r.transitionDuration,s=r.autoplay,u=r.infinite,l=r.duration,c=r.onChange,h=r.easing;if(a=e||a,!this.tweenGroup.getAll().length){clearTimeout(this.timeout);var p={margin:-this.width*(this.state.index+1)+this.distanceSwiped},d=new o.a.Tween(p,this.tweenGroup).to({margin:-this.width*(t+1)},a).onUpdate((function(t){n.imageContainer.style.transform="translate(".concat(t.margin,"px)")})).start();d.easing(b(h)),function t(){n.willUnmount?n.tweenGroup.removeAll():(requestAnimationFrame(t),n.tweenGroup.update())}(),d.onComplete((function(){if(!n.willUnmount){n.distanceSwiped=0;var e=t;e<0?e=i.length-1:e>=i.length&&(e=0),"function"==typeof c&&c(n.state.index,e),n.setState({index:e},(function(){s&&(u||n.state.index<i.length)&&(clearTimeout(n.timeout),n.timeout=setTimeout((function(){return n.goNext()}),l))}))}}))}}}])&&S(n.prototype,s),u&&S(n,u),e}(r.Component);function I(t){return(I="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 L(){return(L=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 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 M(t){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function R(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N(t,e){return(N=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var D=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==I(e)&&"function"!=typeof e?R(t):e}(this,M(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(R(n)),n.handleResize=n.handleResize.bind(R(n)),n.navigate=n.navigate.bind(R(n)),n.preFade=n.preFade.bind(R(n)),n.pauseSlides=n.pauseSlides.bind(R(n)),n.startSlides=n.startSlides.bind(R(n)),n.initResizeObserver=n.initResizeObserver.bind(R(n)),n.tweenGroup=new o.a.Group,n.reactSlideshowWrapper=Object(r.createRef)(),n.wrapper=Object(r.createRef)(),n}var n,s,u;return function(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&&N(t,e)}(e,t),n=e,(s=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),p(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.resizeObserver=new a.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current)}},{key:"play",value:function(){var t=this,e=f(this.props),n=e.autoplay,r=e.children,i=e.duration,o=this.state.index;n&&r.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.fadeImages(o+1)}),i))}},{key:"componentDidUpdate",value:function(t){var e=f(this.props),n=e.autoplay,r=e.children,i=f(t);n!==i.autoplay&&(n?this.play():clearTimeout(this.timeout)),r.length!=i.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.width=this.wrapper.current.clientWidth,this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*this.props.children.length;this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}},{key:"pauseSlides",value:function(){f(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=f(this.props),n=e.pauseOnHover,r=e.autoplay,i=e.duration;n&&r&&(this.timeout=setTimeout((function(){return t.goNext()}),i))}},{key:"goNext",value:function(){var t=this.state.index,e=f(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.fadeImages((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=f(this.props),n=e.children;(e.infinite||0!==t)&&this.fadeImages(0===t?n.length-1:t-1)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"goTo",value:function(t){this.fadeImages(t)}},{key:"preFade",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"render",value:function(){var t=this,e=f(this.props),n=e.indicators,r=e.children,o=e.arrows,a=this.state.index,s=_(h,this.props);return i.a.createElement("div",L({"aria-roledescription":"carousel"},s),i.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,ref:this.reactSlideshowWrapper},o&&A(f(this.props),this.state.index,this.preFade),i.a.createElement("div",{className:"react-slideshow-fade-wrapper",ref:this.wrapper},i.a.createElement("div",{className:"react-slideshow-fade-images-wrap",ref:function(e){return t.divsContainer=e}},r.map((function(t,e){return i.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),o&&w(f(this.props),this.state.index,this.preFade)),n&&x(f(this.props),this.state.index,this.navigate))}},{key:"fadeImages",value:function(t){var e=this,n=this.state.index,r=f(this.props),i=r.autoplay,a=r.children,s=r.infinite,u=r.duration,l=r.transitionDuration,c=r.onChange,h=r.easing;if(!this.tweenGroup.getAll().length){this.divsContainer.children[t]||(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var p=new o.a.Tween({opacity:0},this.tweenGroup).to({opacity:1},l).onUpdate((function(r){e.divsContainer.children[t].style.opacity=r.opacity,e.divsContainer.children[n].style.opacity=1-r.opacity})).start();p.easing(b(h)),p.onComplete((function(){e.willUnmount||(e.setState({index:t}),"function"==typeof c&&c(n,t),i&&(s||t<a.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.fadeImages((t+1)%a.length)}),u)))}))}}}])&&j(n.prototype,s),u&&j(n,u),e}(r.Component);function F(t){return(F="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 B(){return(B=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 z(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 U(t){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function G(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V(t,e){return(V=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var q=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==F(e)&&"function"!=typeof e?G(t):e}(this,U(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(G(n)),n.handleResize=n.handleResize.bind(G(n)),n.navigate=n.navigate.bind(G(n)),n.preZoom=n.preZoom.bind(G(n)),n.pauseSlides=n.pauseSlides.bind(G(n)),n.startSlides=n.startSlides.bind(G(n)),n.tweenGroup=new o.a.Group,n.initResizeObserver=n.initResizeObserver.bind(G(n)),n.reactSlideshowWrapper=Object(r.createRef)(),n}var n,s,u;return function(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&&V(t,e)}(e,t),n=e,(s=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),p(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.resizeObserver=new a.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current)}},{key:"play",value:function(){var t=this,e=f(this.props),n=e.autoplay,r=e.children,i=e.duration,o=this.state.index;n&&r.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.zoomTo(o+1)}),i))}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"componentDidUpdate",value:function(t){var e=f(this.props),n=e.autoplay,r=e.children,i=f(t);n!==i.autoplay&&(n?this.play():clearTimeout(this.timeout)),r.length!=i.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"setWidth",value:function(){this.width=this.wrapper.clientWidth,this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*this.props.children.length;this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}},{key:"pauseSlides",value:function(){f(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=f(this.props),n=e.pauseOnHover,r=e.autoplay,i=e.duration;n&&r&&(this.timeout=setTimeout((function(){return t.goNext()}),i))}},{key:"goNext",value:function(){var t=this.state.index,e=f(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.zoomTo((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=f(this.props),n=e.children;(e.infinite||0!==t)&&this.zoomTo(0===t?n.length-1:t-1)}},{key:"goTo",value:function(t){this.zoomTo(t)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"preZoom",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"render",value:function(){var t=this,e=f(this.props),n=e.indicators,r=e.arrows,o=e.children,a=this.state.index,s=_(h,this.props);return i.a.createElement("div",B({"aria-roledescription":"carousel"},s),i.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,ref:this.reactSlideshowWrapper},r&&A(f(this.props),this.state.index,this.preZoom),i.a.createElement("div",{className:"react-slideshow-zoom-wrapper",ref:function(e){return t.wrapper=e}},i.a.createElement("div",{className:"zoom-wrapper",ref:function(e){return t.divsContainer=e}},o.map((function(t,e){return i.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),r&&w(f(this.props),this.state.index,this.preZoom)),n&&x(f(this.props),this.state.index,this.navigate))}},{key:"zoomTo",value:function(t){var e=this,n=this.state.index,r=f(this.props),i=r.children,a=r.scale,s=r.autoplay,u=r.infinite,l=r.transitionDuration,c=r.duration,h=r.onChange,p=r.easing;if(!this.tweenGroup.getAll().length){this.divsContainer.children[t]||(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var d=new o.a.Tween({opacity:0,scale:1},this.tweenGroup).to({opacity:1,scale:a},l).onUpdate((function(r){e.divsContainer.children[t].style.opacity=r.opacity,e.divsContainer.children[n].style.opacity=1-r.opacity,e.divsContainer.children[n].style.transform="scale(".concat(r.scale,")")})).start();d.easing(b(p)),d.onComplete((function(){e.willUnmount||("function"==typeof h&&h(n,t),e.setState({index:t},(function(){e.divsContainer.children[n].style.transform="scale(1)"})),s&&(u||t<i.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.zoomTo((t+1)%i.length)}),c)))}))}}}])&&z(n.prototype,s),u&&z(n,u),e}(r.Component)}]))},,,,,,,,,,,,function(t,e,n){n(1652),t.exports=n(1657)},function(t,e,n){"use strict";n.r(e),function(t){var e=n(337),r=n(99),i=n.n(r);n(437),n(342);n(860),n(987),n(99).start(),window.Rails=i.a;var o=n(1653);n(1186).useContext(o),n(964),Object(e.trackView)(),t(document).ready((function(){var e;e=!1,t(".Hamburger").click((function(n){e?(t(this).find(".hamburger").removeClass("isActive"),e=!1,t(".NavigationMobile").animate({opacity:0},200,(function(){t(this).removeClass("isActive"),t(this).addClass("isHidden")})),t("body").removeClass("has-mobile-menu-open")):(t(this).find(".hamburger").addClass("isActive"),e=!0,t(".NavigationMobile").css("visibility","visible"),t(".NavigationMobile").css("z-index","300"),t(".NavigationMobile").removeClass("isHidden"),t(".NavigationMobile").addClass("isActive"),t(".NavigationMobile").animate({opacity:1},200,(function(){})),t("body").addClass("has-mobile-menu-open"))}))}))}.call(this,n(155))},function(t,e,n){var r={"./active_admin/AdminLocationPickerMap":1158,"./active_admin/AdminLocationPickerMap.js":1158,"./admin/assets/styles/all":1542,"./admin/assets/styles/all.scss":1542,"./admin/assets/styles/base/buttons":1543,"./admin/assets/styles/base/buttons.scss":1543,"./admin/assets/styles/base/form-elements":1544,"./admin/assets/styles/base/form-elements.scss":1544,"./admin/assets/styles/members":1545,"./admin/assets/styles/members.scss":1545,"./admin/assets/styles/mixins/mixins":1546,"./admin/assets/styles/mixins/mixins.scss":1546,"./admin/assets/styles/modules/actions-menu":1547,"./admin/assets/styles/modules/actions-menu.scss":1547,"./admin/assets/styles/modules/article-list":1548,"./admin/assets/styles/modules/article-list.scss":1548,"./admin/assets/styles/modules/badge":1549,"./admin/assets/styles/modules/badge.scss":1549,"./admin/assets/styles/modules/box":1550,"./admin/assets/styles/modules/box.scss":1550,"./admin/assets/styles/modules/boxes":1551,"./admin/assets/styles/modules/boxes.scss":1551,"./admin/assets/styles/modules/centred-panel":1552,"./admin/assets/styles/modules/centred-panel.scss":1552,"./admin/assets/styles/modules/control-header":1553,"./admin/assets/styles/modules/control-header.scss":1553,"./admin/assets/styles/modules/easy-module-picker":1554,"./admin/assets/styles/modules/easy-module-picker.scss":1554,"./admin/assets/styles/modules/feature-list":1555,"./admin/assets/styles/modules/feature-list.scss":1555,"./admin/assets/styles/modules/flash-message":1556,"./admin/assets/styles/modules/flash-message.scss":1556,"./admin/assets/styles/modules/image-upload-input":1557,"./admin/assets/styles/modules/image-upload-input.scss":1557,"./admin/assets/styles/modules/main-with-sidebar":1558,"./admin/assets/styles/modules/main-with-sidebar.scss":1558,"./admin/assets/styles/modules/menu-item-list":1559,"./admin/assets/styles/modules/menu-item-list.scss":1559,"./admin/assets/styles/modules/module":1560,"./admin/assets/styles/modules/module.scss":1560,"./admin/assets/styles/modules/modules":1561,"./admin/assets/styles/modules/modules.scss":1561,"./admin/assets/styles/modules/navbar":1562,"./admin/assets/styles/modules/navbar.scss":1562,"./admin/assets/styles/modules/pages-list":1563,"./admin/assets/styles/modules/pages-list.scss":1563,"./admin/assets/styles/modules/pagination":1564,"./admin/assets/styles/modules/pagination.scss":1564,"./admin/assets/styles/modules/projects-list":1565,"./admin/assets/styles/modules/projects-list.scss":1565,"./admin/assets/styles/modules/quill":1566,"./admin/assets/styles/modules/quill.scss":1566,"./admin/assets/styles/modules/repeater":1567,"./admin/assets/styles/modules/repeater.scss":1567,"./admin/assets/styles/modules/site-footer":1568,"./admin/assets/styles/modules/site-footer.scss":1568,"./admin/assets/styles/modules/site-preview":1569,"./admin/assets/styles/modules/site-preview.scss":1569,"./admin/assets/styles/modules/stacked-bars-navigation":1570,"./admin/assets/styles/modules/stacked-bars-navigation.scss":1570,"./admin/assets/styles/modules/title-bar":1571,"./admin/assets/styles/modules/title-bar.scss":1571,"./admin/assets/styles/modules/user-tenants-list":1572,"./admin/assets/styles/modules/user-tenants-list.scss":1572,"./admin/assets/styles/modules/users-list":1573,"./admin/assets/styles/modules/users-list.scss":1573,"./admin/assets/styles/modules/well":1574,"./admin/assets/styles/modules/well.scss":1574,"./admin/assets/styles/utilities":1575,"./admin/assets/styles/utilities.scss":1575,"./admin/assets/styles/variables":1576,"./admin/assets/styles/variables.scss":1576,"./admin/controllers":1140,"./admin/controllers/":1140,"./admin/controllers/autocomplete_controller":861,"./admin/controllers/autocomplete_controller.js":861,"./admin/controllers/content_modules_controller":862,"./admin/controllers/content_modules_controller.js":862,"./admin/controllers/dropzone_controller":988,"./admin/controllers/dropzone_controller.js":988,"./admin/controllers/easy_module_picker_controller":863,"./admin/controllers/easy_module_picker_controller.js":863,"./admin/controllers/feature_list_controller":864,"./admin/controllers/feature_list_controller.js":864,"./admin/controllers/flash_controller":865,"./admin/controllers/flash_controller.js":865,"./admin/controllers/helpers/helpers":196,"./admin/controllers/helpers/helpers.js":196,"./admin/controllers/index":1140,"./admin/controllers/index.js":1140,"./admin/controllers/map_content_grid_controller":866,"./admin/controllers/map_content_grid_controller.js":866,"./admin/controllers/menu_items_controller":867,"./admin/controllers/menu_items_controller.js":867,"./admin/controllers/nested_form_controller":868,"./admin/controllers/nested_form_controller.js":868,"./admin/controllers/quill_editor_controller":869,"./admin/controllers/quill_editor_controller.js":869,"./admin/controllers/quill_viewer_controller":870,"./admin/controllers/quill_viewer_controller.js":870,"./admin/controllers/responsive_navigation_controller":871,"./admin/controllers/responsive_navigation_controller.js":871,"./admin/controllers/site_preview_controller":872,"./admin/controllers/site_preview_controller.js":872,"./admin/controllers/sortable_controller":873,"./admin/controllers/sortable_controller.js":873,"./admin/controllers/sortable_tree_controller":874,"./admin/controllers/sortable_tree_controller.js":874,"./admin/controllers/tenant_slug_controller":875,"./admin/controllers/tenant_slug_controller.js":875,"./admin/controllers/tenant_user_permissions_controller":876,"./admin/controllers/tenant_user_permissions_controller.js":876,"./humap-map_frontend/apollo/preview":1577,"./humap-map_frontend/apollo/preview.js":1577,"./humap-map_frontend/apollo/wrap-root-element":1578,"./humap-map_frontend/apollo/wrap-root-element.js":1578,"./humap-map_frontend/assets/images/_readme":1579,"./humap-map_frontend/assets/images/_readme.js":1579,"./humap-map_frontend/assets/images/backdrop-with-pins-gray":1580,"./humap-map_frontend/assets/images/backdrop-with-pins-gray.svg":1580,"./humap-map_frontend/assets/images/backdrop-with-pins-purple":1581,"./humap-map_frontend/assets/images/backdrop-with-pins-purple.svg":1581,"./humap-map_frontend/assets/images/backdrop-with-pins-scattered-gray":1582,"./humap-map_frontend/assets/images/backdrop-with-pins-scattered-gray.svg":1582,"./humap-map_frontend/assets/images/backdrop-with-pins-scattered-purple":1583,"./humap-map_frontend/assets/images/backdrop-with-pins-scattered-purple.svg":1583,"./humap-map_frontend/assets/images/logo-humap-map-blue":1015,"./humap-map_frontend/assets/images/logo-humap-map-blue.svg":1015,"./humap-map_frontend/assets/images/logo-humap-white":666,"./humap-map_frontend/assets/images/logo-humap-white.svg":666,"./humap-map_frontend/assets/images/map-background":1584,"./humap-map_frontend/assets/images/map-background.jpg":1584,"./humap-map_frontend/assets/images/marketingpage-icon-collection":1339,"./humap-map_frontend/assets/images/marketingpage-icon-collection.svg":1339,"./humap-map_frontend/assets/images/marketingpage-icon-overlay":1340,"./humap-map_frontend/assets/images/marketingpage-icon-overlay.svg":1340,"./humap-map_frontend/assets/images/marketingpage-icon-pin":1341,"./humap-map_frontend/assets/images/marketingpage-icon-pin.svg":1341,"./humap-map_frontend/assets/images/sprites/map-points@1":250,"./humap-map_frontend/assets/images/sprites/map-points@1.json":262,"./humap-map_frontend/assets/images/sprites/map-points@1.png":250,"./humap-map_frontend/assets/images/sprites/overlay-patterns@1":382,"./humap-map_frontend/assets/images/sprites/overlay-patterns@1.json":396,"./humap-map_frontend/assets/images/sprites/overlay-patterns@1.png":382,"./humap-map_frontend/assets/images/sprites/point-markers@1":1016,"./humap-map_frontend/assets/images/sprites/point-markers@1.json":1145,"./humap-map_frontend/assets/images/sprites/point-markers@1.png":1016,"./humap-map_frontend/assets/images/wizard-pin":611,"./humap-map_frontend/assets/images/wizard-pin.png":611,"./humap-map_frontend/assets/styles/base":1585,"./humap-map_frontend/assets/styles/base.scss":1585,"./humap-map_frontend/assets/styles/boilerplate":1586,"./humap-map_frontend/assets/styles/boilerplate.scss":1586,"./humap-map_frontend/assets/styles/library/hamburgers":1587,"./humap-map_frontend/assets/styles/library/hamburgers.scss":1587,"./humap-map_frontend/assets/styles/normalise":1588,"./humap-map_frontend/assets/styles/normalise.scss":1588,"./humap-map_frontend/assets/styles/theme/default":1589,"./humap-map_frontend/assets/styles/theme/default.scss":1589,"./humap-map_frontend/assets/styles/theme/mixins":1590,"./humap-map_frontend/assets/styles/theme/mixins.scss":1590,"./humap-map_frontend/assets/styles/theme/variables":1591,"./humap-map_frontend/assets/styles/theme/variables.scss":1591,"./humap-map_frontend/components/Browse/BrowseIndex":254,"./humap-map_frontend/components/Browse/BrowseIndex.js":254,"./humap-map_frontend/components/Browse/BrowseIndex.module":680,"./humap-map_frontend/components/Browse/BrowseIndex.module.scss":680,"./humap-map_frontend/components/Collections/CollectionActions":731,"./humap-map_frontend/components/Collections/CollectionActions.js":731,"./humap-map_frontend/components/Collections/CollectionActions.module":593,"./humap-map_frontend/components/Collections/CollectionActions.module.scss":593,"./humap-map_frontend/components/Collections/CollectionAssociations":1429,"./humap-map_frontend/components/Collections/CollectionAssociations.js":1429,"./humap-map_frontend/components/Collections/CollectionAssociations.module":1342,"./humap-map_frontend/components/Collections/CollectionAssociations.module.scss":1342,"./humap-map_frontend/components/Collections/CollectionBoothCloseButton":733,"./humap-map_frontend/components/Collections/CollectionBoothCloseButton.js":733,"./humap-map_frontend/components/Collections/CollectionBoothCloseButton.module":1024,"./humap-map_frontend/components/Collections/CollectionBoothCloseButton.module.scss":1024,"./humap-map_frontend/components/Collections/CollectionBoothIIIFLink":616,"./humap-map_frontend/components/Collections/CollectionBoothIIIFLink.js":616,"./humap-map_frontend/components/Collections/CollectionBoothIIIFLink.module":1025,"./humap-map_frontend/components/Collections/CollectionBoothIIIFLink.module.scss":1025,"./humap-map_frontend/components/Collections/CollectionContainer":450,"./humap-map_frontend/components/Collections/CollectionContainer.js":450,"./humap-map_frontend/components/Collections/CollectionView":255,"./humap-map_frontend/components/Collections/CollectionView.js":255,"./humap-map_frontend/components/Collections/CollectionView.module":373,"./humap-map_frontend/components/Collections/CollectionView.module.scss":373,"./humap-map_frontend/components/Global/BaseMapPicker":735,"./humap-map_frontend/components/Global/BaseMapPicker.js":735,"./humap-map_frontend/components/Global/BaseMapPicker.module":451,"./humap-map_frontend/components/Global/BaseMapPicker.module.scss":451,"./humap-map_frontend/components/Global/CloseTrayButton":736,"./humap-map_frontend/components/Global/CloseTrayButton.js":736,"./humap-map_frontend/components/Global/CloseTrayButton.module":594,"./humap-map_frontend/components/Global/CloseTrayButton.module.scss":594,"./humap-map_frontend/components/Global/CustomLegend":737,"./humap-map_frontend/components/Global/CustomLegend.js":737,"./humap-map_frontend/components/Global/CustomLegend.module":452,"./humap-map_frontend/components/Global/CustomLegend.module.scss":452,"./humap-map_frontend/components/Global/GrommetTheme":443,"./humap-map_frontend/components/Global/GrommetTheme.js":443,"./humap-map_frontend/components/Global/GrommetTheme.module":684,"./humap-map_frontend/components/Global/GrommetTheme.module.scss":684,"./humap-map_frontend/components/Global/HumapTrackedLink":336,"./humap-map_frontend/components/Global/HumapTrackedLink.js":336,"./humap-map_frontend/components/Global/IconClusterLayer":1636,"./humap-map_frontend/components/Global/IconClusterLayer.js":1636,"./humap-map_frontend/components/Global/LanguageSelector":738,"./humap-map_frontend/components/Global/LanguageSelector.js":738,"./humap-map_frontend/components/Global/LanguageSelector.module":685,"./humap-map_frontend/components/Global/LanguageSelector.module.scss":685,"./humap-map_frontend/components/Global/Logo":739,"./humap-map_frontend/components/Global/Logo.js":739,"./humap-map_frontend/components/Global/Logo.module":1031,"./humap-map_frontend/components/Global/Logo.module.scss":1031,"./humap-map_frontend/components/Global/Map":740,"./humap-map_frontend/components/Global/Map.js":740,"./humap-map_frontend/components/Global/Map.module":455,"./humap-map_frontend/components/Global/Map.module.scss":455,"./humap-map_frontend/components/Global/MapPopover":741,"./humap-map_frontend/components/Global/MapPopover.js":741,"./humap-map_frontend/components/Global/MapPopover.module":454,"./humap-map_frontend/components/Global/MapPopover.module.scss":454,"./humap-map_frontend/components/Global/MapTools":742,"./humap-map_frontend/components/Global/MapTools.js":742,"./humap-map_frontend/components/Global/MapTools.module":187,"./humap-map_frontend/components/Global/MapTools.module.scss":187,"./humap-map_frontend/components/Global/Metatags":78,"./humap-map_frontend/components/Global/Metatags.js":78,"./humap-map_frontend/components/Global/MetatagsBase":1045,"./humap-map_frontend/components/Global/MetatagsBase.js":1045,"./humap-map_frontend/components/Global/OverflowToolbar":744,"./humap-map_frontend/components/Global/OverflowToolbar.js":744,"./humap-map_frontend/components/Global/OverflowToolbar.module":413,"./humap-map_frontend/components/Global/OverflowToolbar.module.scss":413,"./humap-map_frontend/components/Global/PlaceSearch":743,"./humap-map_frontend/components/Global/PlaceSearch.js":743,"./humap-map_frontend/components/Global/PlaceSearch.module":106,"./humap-map_frontend/components/Global/PlaceSearch.module.scss":106,"./humap-map_frontend/components/Global/PlaceSearchCustom":1043,"./humap-map_frontend/components/Global/PlaceSearchCustom.js":1043,"./humap-map_frontend/components/Global/Toolbar":617,"./humap-map_frontend/components/Global/Toolbar.js":617,"./humap-map_frontend/components/Global/Toolbar.module":211,"./humap-map_frontend/components/Global/Toolbar.module.scss":211,"./humap-map_frontend/components/Global/UserRedirect":1596,"./humap-map_frontend/components/Global/UserRedirect.js":1596,"./humap-map_frontend/components/Help/HelpIndex":745,"./humap-map_frontend/components/Help/HelpIndex.js":745,"./humap-map_frontend/components/Help/HelpIndex.module":1046,"./humap-map_frontend/components/Help/HelpIndex.module.scss":1046,"./humap-map_frontend/components/Introduction/IntroductionIndex":618,"./humap-map_frontend/components/Introduction/IntroductionIndex.js":618,"./humap-map_frontend/components/Introduction/IntroductionIndex.module":456,"./humap-map_frontend/components/Introduction/IntroductionIndex.module.scss":456,"./humap-map_frontend/components/Introduction/Quickstart":748,"./humap-map_frontend/components/Introduction/Quickstart.js":748,"./humap-map_frontend/components/Introduction/Quickstart.module":595,"./humap-map_frontend/components/Introduction/Quickstart.module.scss":595,"./humap-map_frontend/components/Language/LanguageIndex":749,"./humap-map_frontend/components/Language/LanguageIndex.js":749,"./humap-map_frontend/components/Language/LanguageIndex.module":1050,"./humap-map_frontend/components/Language/LanguageIndex.module.scss":1050,"./humap-map_frontend/components/Layout":614,"./humap-map_frontend/components/Layout.js":614,"./humap-map_frontend/components/Layout.module":1051,"./humap-map_frontend/components/Layout.module.scss":1051,"./humap-map_frontend/components/Map/layers/DefaultLayer":1039,"./humap-map_frontend/components/Map/layers/DefaultLayer.js":1039,"./humap-map_frontend/components/Map/layers/FillPatternsLayer":1040,"./humap-map_frontend/components/Map/layers/FillPatternsLayer.js":1040,"./humap-map_frontend/components/Map/layers/MVTIconLayer":565,"./humap-map_frontend/components/Map/layers/MVTIconLayer.js":565,"./humap-map_frontend/components/Map/layers/MarkersHelper":318,"./humap-map_frontend/components/Map/layers/MarkersHelper.js":318,"./humap-map_frontend/components/Map/layers/PMTIconLayer":1033,"./humap-map_frontend/components/Map/layers/PMTIconLayer.js":1033,"./humap-map_frontend/components/Map/layers/PointSizesLayer":1041,"./humap-map_frontend/components/Map/layers/PointSizesLayer.js":1041,"./humap-map_frontend/components/Map/layers/RasterOverlayLayer":1038,"./humap-map_frontend/components/Map/layers/RasterOverlayLayer.js":1038,"./humap-map_frontend/components/Map/layers/RouteLayer":1035,"./humap-map_frontend/components/Map/layers/RouteLayer.js":1035,"./humap-map_frontend/components/Map/layers/SearchRadiusLayer":1036,"./humap-map_frontend/components/Map/layers/SearchRadiusLayer.js":1036,"./humap-map_frontend/components/Map/layers/TrailLayer":1034,"./humap-map_frontend/components/Map/layers/TrailLayer.js":1034,"./humap-map_frontend/components/MediaGallery/MediaGallery":619,"./humap-map_frontend/components/MediaGallery/MediaGallery.js":619,"./humap-map_frontend/components/MediaGallery/MediaGallery.module":327,"./humap-map_frontend/components/MediaGallery/MediaGallery.module.scss":327,"./humap-map_frontend/components/MediaGallery/MediaGalleryAudioEmbed":752,"./humap-map_frontend/components/MediaGallery/MediaGalleryAudioEmbed.js":752,"./humap-map_frontend/components/MediaGallery/MediaGalleryAudioEmbed.module":190,"./humap-map_frontend/components/MediaGallery/MediaGalleryAudioEmbed.module.scss":190,"./humap-map_frontend/components/MediaGallery/MediaGalleryIIIFEmbed":753,"./humap-map_frontend/components/MediaGallery/MediaGalleryIIIFEmbed.js":753,"./humap-map_frontend/components/MediaGallery/MediaGalleryIIIFEmbed.module":326,"./humap-map_frontend/components/MediaGallery/MediaGalleryIIIFEmbed.module.scss":326,"./humap-map_frontend/components/MediaGallery/MediaGalleryImage":750,"./humap-map_frontend/components/MediaGallery/MediaGalleryImage.js":750,"./humap-map_frontend/components/MediaGallery/MediaGalleryImage.module":188,"./humap-map_frontend/components/MediaGallery/MediaGalleryImage.module.scss":188,"./humap-map_frontend/components/MediaGallery/MediaGallerySketchfabEmbed":755,"./humap-map_frontend/components/MediaGallery/MediaGallerySketchfabEmbed.js":755,"./humap-map_frontend/components/MediaGallery/MediaGallerySketchfabEmbed.module":212,"./humap-map_frontend/components/MediaGallery/MediaGallerySketchfabEmbed.module.scss":212,"./humap-map_frontend/components/MediaGallery/MediaGalleryStreetViewOverlay":754,"./humap-map_frontend/components/MediaGallery/MediaGalleryStreetViewOverlay.js":754,"./humap-map_frontend/components/MediaGallery/MediaGalleryStreetViewOverlay.module":133,"./humap-map_frontend/components/MediaGallery/MediaGalleryStreetViewOverlay.module.scss":133,"./humap-map_frontend/components/MediaGallery/MediaGalleryVideoEmbed":751,"./humap-map_frontend/components/MediaGallery/MediaGalleryVideoEmbed.js":751,"./humap-map_frontend/components/MediaGallery/MediaGalleryVideoEmbed.module":189,"./humap-map_frontend/components/MediaGallery/MediaGalleryVideoEmbed.module.scss":189,"./humap-map_frontend/components/Overlays/OverlayActions":756,"./humap-map_frontend/components/Overlays/OverlayActions.js":756,"./humap-map_frontend/components/Overlays/OverlayActions.module":687,"./humap-map_frontend/components/Overlays/OverlayActions.module.scss":687,"./humap-map_frontend/components/Overlays/OverlayGroup":1054,"./humap-map_frontend/components/Overlays/OverlayGroup.js":1054,"./humap-map_frontend/components/Overlays/OverlayGroupInner":1055,"./humap-map_frontend/components/Overlays/OverlayGroupInner.js":1055,"./humap-map_frontend/components/Overlays/OverlayIndex":758,"./humap-map_frontend/components/Overlays/OverlayIndex.js":758,"./humap-map_frontend/components/Overlays/OverlayIndex.module":458,"./humap-map_frontend/components/Overlays/OverlayIndex.module.scss":458,"./humap-map_frontend/components/Overlays/OverlayKeeper":759,"./humap-map_frontend/components/Overlays/OverlayKeeper.js":759,"./humap-map_frontend/components/Overlays/OverlayKeeper.module":1056,"./humap-map_frontend/components/Overlays/OverlayKeeper.module.scss":1056,"./humap-map_frontend/components/Overlays/OverlayLayersList":760,"./humap-map_frontend/components/Overlays/OverlayLayersList.js":760,"./humap-map_frontend/components/Overlays/OverlayLayersList.module":1057,"./humap-map_frontend/components/Overlays/OverlayLayersList.module.scss":1057,"./humap-map_frontend/components/Overlays/OverlayToolGridItem":757,"./humap-map_frontend/components/Overlays/OverlayToolGridItem.js":757,"./humap-map_frontend/components/Overlays/OverlayToolGridItem.module":457,"./humap-map_frontend/components/Overlays/OverlayToolGridItem.module.scss":457,"./humap-map_frontend/components/Overlays/OverlayToolListRow":688,"./humap-map_frontend/components/Overlays/OverlayToolListRow.js":688,"./humap-map_frontend/components/Overlays/OverlayTools":761,"./humap-map_frontend/components/Overlays/OverlayTools.js":761,"./humap-map_frontend/components/Overlays/OverlayTools.module":66,"./humap-map_frontend/components/Overlays/OverlayTools.module.scss":66,"./humap-map_frontend/components/Overlays/OverlayView":762,"./humap-map_frontend/components/Overlays/OverlayView.js":762,"./humap-map_frontend/components/Overlays/OverlayView.module":596,"./humap-map_frontend/components/Overlays/OverlayView.module.scss":596,"./humap-map_frontend/components/Overlays/map/OverlayLayers":1037,"./humap-map_frontend/components/Overlays/map/OverlayLayers.js":1037,"./humap-map_frontend/components/Overlays/map/OverlayPopover":1042,"./humap-map_frontend/components/Overlays/map/OverlayPopover.js":1042,"./humap-map_frontend/components/Overlays/map/OverlayPopoverData":444,"./humap-map_frontend/components/Overlays/map/OverlayPopoverData.js":444,"./humap-map_frontend/components/Overlays/map/OverlayPopoverData.module":613,"./humap-map_frontend/components/Overlays/map/OverlayPopoverData.module.scss":613,"./humap-map_frontend/components/Overlays/map/OverlayPopoverDataRow":549,"./humap-map_frontend/components/Overlays/map/OverlayPopoverDataRow.js":549,"./humap-map_frontend/components/Overlays/map/OverlayPopoverDataRow.module":612,"./humap-map_frontend/components/Overlays/map/OverlayPopoverDataRow.module.scss":612,"./humap-map_frontend/components/Pages/Article":1303,"./humap-map_frontend/components/Pages/Article.js":1303,"./humap-map_frontend/components/Pages/Article.module":1343,"./humap-map_frontend/components/Pages/Article.module.scss":1343,"./humap-map_frontend/components/Pages/Carousel":1312,"./humap-map_frontend/components/Pages/Carousel.js":1312,"./humap-map_frontend/components/Pages/Carousel.module":1321,"./humap-map_frontend/components/Pages/Carousel.module.scss":1321,"./humap-map_frontend/components/Pages/ContentAreaWithSidebar":1058,"./humap-map_frontend/components/Pages/ContentAreaWithSidebar.js":1058,"./humap-map_frontend/components/Pages/ContentAreaWithSidebar.module":1147,"./humap-map_frontend/components/Pages/ContentAreaWithSidebar.module.scss":1147,"./humap-map_frontend/components/Pages/EmailSignup":1463,"./humap-map_frontend/components/Pages/EmailSignup.js":1463,"./humap-map_frontend/components/Pages/EmailSignup.module":1344,"./humap-map_frontend/components/Pages/EmailSignup.module.scss":1344,"./humap-map_frontend/components/Pages/FeatureDemo":1305,"./humap-map_frontend/components/Pages/FeatureDemo.js":1305,"./humap-map_frontend/components/Pages/FeatureDemo.module":706,"./humap-map_frontend/components/Pages/FeatureDemo.module.scss":706,"./humap-map_frontend/components/Pages/Hamburger":1306,"./humap-map_frontend/components/Pages/Hamburger.js":1306,"./humap-map_frontend/components/Pages/Hamburger.module":848,"./humap-map_frontend/components/Pages/Hamburger.module.scss":848,"./humap-map_frontend/components/Pages/HeroContent":1307,"./humap-map_frontend/components/Pages/HeroContent.js":1307,"./humap-map_frontend/components/Pages/HeroContent.module":847,"./humap-map_frontend/components/Pages/HeroContent.module.scss":847,"./humap-map_frontend/components/Pages/HeroHome":1308,"./humap-map_frontend/components/Pages/HeroHome.js":1308,"./humap-map_frontend/components/Pages/HeroHome.module":1323,"./humap-map_frontend/components/Pages/HeroHome.module.scss":1323,"./humap-map_frontend/components/Pages/HighlightedContent":1337,"./humap-map_frontend/components/Pages/HighlightedContent.js":1337,"./humap-map_frontend/components/Pages/HighlightedContent.module":1149,"./humap-map_frontend/components/Pages/HighlightedContent.module.scss":1149,"./humap-map_frontend/components/Pages/HomeIntroduction":1309,"./humap-map_frontend/components/Pages/HomeIntroduction.js":1309,"./humap-map_frontend/components/Pages/HomeIntroduction.module":1324,"./humap-map_frontend/components/Pages/HomeIntroduction.module.scss":1324,"./humap-map_frontend/components/Pages/Logo":989,"./humap-map_frontend/components/Pages/Logo.js":989,"./humap-map_frontend/components/Pages/Logo.module":1347,"./humap-map_frontend/components/Pages/Logo.module.scss":1347,"./humap-map_frontend/components/Pages/MainFooter":1230,"./humap-map_frontend/components/Pages/MainFooter.js":1230,"./humap-map_frontend/components/Pages/MainFooter.module":1150,"./humap-map_frontend/components/Pages/MainFooter.module.scss":1150,"./humap-map_frontend/components/Pages/Navigation":763,"./humap-map_frontend/components/Pages/Navigation.js":763,"./humap-map_frontend/components/Pages/Navigation.module":849,"./humap-map_frontend/components/Pages/Navigation.module.scss":849,"./humap-map_frontend/components/Pages/NavigationItem":1325,"./humap-map_frontend/components/Pages/NavigationItem.js":1325,"./humap-map_frontend/components/Pages/Page":667,"./humap-map_frontend/components/Pages/Page.js":667,"./humap-map_frontend/components/Pages/Page.module":1348,"./humap-map_frontend/components/Pages/Page.module.scss":1348,"./humap-map_frontend/components/Pages/QuickStart":1144,"./humap-map_frontend/components/Pages/QuickStart.js":1144,"./humap-map_frontend/components/Pages/QuickStart.module":1146,"./humap-map_frontend/components/Pages/QuickStart.module.scss":1146,"./humap-map_frontend/components/Pages/QuickStarts":1059,"./humap-map_frontend/components/Pages/QuickStarts.js":1059,"./humap-map_frontend/components/Pages/QuickStarts.module":1151,"./humap-map_frontend/components/Pages/QuickStarts.module.scss":1151,"./humap-map_frontend/components/Pages/Record":629,"./humap-map_frontend/components/Pages/Record.js":629,"./humap-map_frontend/components/Pages/Record.module":1148,"./humap-map_frontend/components/Pages/Record.module.scss":1148,"./humap-map_frontend/components/Pages/Search":1310,"./humap-map_frontend/components/Pages/Search.js":1310,"./humap-map_frontend/components/Pages/Search.module":1346,"./humap-map_frontend/components/Pages/Search.module.scss":1346,"./humap-map_frontend/components/Pages/SecondaryFooter":1231,"./humap-map_frontend/components/Pages/SecondaryFooter.js":1231,"./humap-map_frontend/components/Pages/SecondaryFooter.module":1326,"./humap-map_frontend/components/Pages/SecondaryFooter.module.scss":1326,"./humap-map_frontend/components/Pages/SidebarCTA":1304,"./humap-map_frontend/components/Pages/SidebarCTA.js":1304,"./humap-map_frontend/components/Pages/SidebarCTA.module":1322,"./humap-map_frontend/components/Pages/SidebarCTA.module.scss":1322,"./humap-map_frontend/components/Pages/SiteHeader":668,"./humap-map_frontend/components/Pages/SiteHeader.js":668,"./humap-map_frontend/components/Pages/SiteHeader.module":1349,"./humap-map_frontend/components/Pages/SiteHeader.module.scss":1349,"./humap-map_frontend/components/Pages/SiteWrapper":669,"./humap-map_frontend/components/Pages/SiteWrapper.js":669,"./humap-map_frontend/components/Pages/SiteWrapper.module":1350,"./humap-map_frontend/components/Pages/SiteWrapper.module.scss":1350,"./humap-map_frontend/components/Pages/TertiaryFooter":670,"./humap-map_frontend/components/Pages/TertiaryFooter.js":670,"./humap-map_frontend/components/Pages/TertiaryFooter.module":1152,"./humap-map_frontend/components/Pages/TertiaryFooter.module.scss":1152,"./humap-map_frontend/components/Records/RecordActions":764,"./humap-map_frontend/components/Records/RecordActions.js":764,"./humap-map_frontend/components/Records/RecordActions.module":597,"./humap-map_frontend/components/Records/RecordActions.module.scss":597,"./humap-map_frontend/components/Records/RecordAssociations":765,"./humap-map_frontend/components/Records/RecordAssociations.js":765,"./humap-map_frontend/components/Records/RecordAssociations.module":1060,"./humap-map_frontend/components/Records/RecordAssociations.module.scss":1060,"./humap-map_frontend/components/Records/RecordBoothCloseButton":766,"./humap-map_frontend/components/Records/RecordBoothCloseButton.js":766,"./humap-map_frontend/components/Records/RecordBoothCloseButton.module":1061,"./humap-map_frontend/components/Records/RecordBoothCloseButton.module.scss":1061,"./humap-map_frontend/components/Records/RecordBoothIIIFLink":620,"./humap-map_frontend/components/Records/RecordBoothIIIFLink.js":620,"./humap-map_frontend/components/Records/RecordBoothIIIFLink.module":1062,"./humap-map_frontend/components/Records/RecordBoothIIIFLink.module.scss":1062,"./humap-map_frontend/components/Records/RecordKeywords":767,"./humap-map_frontend/components/Records/RecordKeywords.js":767,"./humap-map_frontend/components/Records/RecordKeywords.module":1063,"./humap-map_frontend/components/Records/RecordKeywords.module.scss":1063,"./humap-map_frontend/components/Records/RecordLinks":768,"./humap-map_frontend/components/Records/RecordLinks.js":768,"./humap-map_frontend/components/Records/RecordLinks.module":1064,"./humap-map_frontend/components/Records/RecordLinks.module.scss":1064,"./humap-map_frontend/components/Records/RecordRelatedRecords":769,"./humap-map_frontend/components/Records/RecordRelatedRecords.js":769,"./humap-map_frontend/components/Records/RecordRelatedRecords.module":1065,"./humap-map_frontend/components/Records/RecordRelatedRecords.module.scss":1065,"./humap-map_frontend/components/Records/RecordTextContent":770,"./humap-map_frontend/components/Records/RecordTextContent.js":770,"./humap-map_frontend/components/Records/RecordTextContent.module":1066,"./humap-map_frontend/components/Records/RecordTextContent.module.scss":1066,"./humap-map_frontend/components/Records/RecordTrayHero":771,"./humap-map_frontend/components/Records/RecordTrayHero.js":771,"./humap-map_frontend/components/Records/RecordTrayHero.module":415,"./humap-map_frontend/components/Records/RecordTrayHero.module.scss":415,"./humap-map_frontend/components/Records/RecordView":621,"./humap-map_frontend/components/Records/RecordView.js":621,"./humap-map_frontend/components/Records/RecordView.module":374,"./humap-map_frontend/components/Records/RecordView.module.scss":374,"./humap-map_frontend/components/Records/RecordsList":148,"./humap-map_frontend/components/Records/RecordsList.js":148,"./humap-map_frontend/components/Records/RecordsList.module":1018,"./humap-map_frontend/components/Records/RecordsList.module.scss":1018,"./humap-map_frontend/components/Search/SearchForm":826,"./humap-map_frontend/components/Search/SearchForm.js":826,"./humap-map_frontend/components/Search/SearchForm.module":271,"./humap-map_frontend/components/Search/SearchForm.module.scss":271,"./humap-map_frontend/components/Search/SearchResults":473,"./humap-map_frontend/components/Search/SearchResults.js":473,"./humap-map_frontend/components/Search/SearchResults.module":599,"./humap-map_frontend/components/Search/SearchResults.module.scss":599,"./humap-map_frontend/components/Search/TypeFacets":778,"./humap-map_frontend/components/Search/TypeFacets.js":778,"./humap-map_frontend/components/Search/TypeFacets.module":416,"./humap-map_frontend/components/Search/TypeFacets.module.scss":416,"./humap-map_frontend/components/Search/YearSlider":825,"./humap-map_frontend/components/Search/YearSlider.js":825,"./humap-map_frontend/components/Search/YearSlider.module":376,"./humap-map_frontend/components/Search/YearSlider.module.scss":376,"./humap-map_frontend/components/Shared/CTA":471,"./humap-map_frontend/components/Shared/CTA.js":471,"./humap-map_frontend/components/Shared/CTA.module":683,"./humap-map_frontend/components/Shared/CTA.module.scss":683,"./humap-map_frontend/components/Shared/Card":144,"./humap-map_frontend/components/Shared/Card.js":144,"./humap-map_frontend/components/Shared/Card.module":156,"./humap-map_frontend/components/Shared/Card.module.scss":156,"./humap-map_frontend/components/Shared/CardOrder":779,"./humap-map_frontend/components/Shared/CardOrder.js":779,"./humap-map_frontend/components/Shared/CardOrder.module":1070,"./humap-map_frontend/components/Shared/CardOrder.module.scss":1070,"./humap-map_frontend/components/Shared/CategoryList":746,"./humap-map_frontend/components/Shared/CategoryList.js":746,"./humap-map_frontend/components/Shared/CategoryList.module":1048,"./humap-map_frontend/components/Shared/CategoryList.module.scss":1048,"./humap-map_frontend/components/Shared/CategoryListItem":747,"./humap-map_frontend/components/Shared/CategoryListItem.js":747,"./humap-map_frontend/components/Shared/CategoryListItem.module":1047,"./humap-map_frontend/components/Shared/CategoryListItem.module.scss":1047,"./humap-map_frontend/components/Shared/CloseButton":193,"./humap-map_frontend/components/Shared/CloseButton.js":193,"./humap-map_frontend/components/Shared/CloseButton.module":1026,"./humap-map_frontend/components/Shared/CloseButton.module.scss":1026,"./humap-map_frontend/components/Shared/ColophonAndLog":252,"./humap-map_frontend/components/Shared/ColophonAndLog.js":252,"./humap-map_frontend/components/Shared/ColophonAndLog.module":117,"./humap-map_frontend/components/Shared/ColophonAndLog.module.scss":117,"./humap-map_frontend/components/Shared/Comments":773,"./humap-map_frontend/components/Shared/Comments.js":773,"./humap-map_frontend/components/Shared/Comments.module":1068,"./humap-map_frontend/components/Shared/Comments.module.scss":1068,"./humap-map_frontend/components/Shared/ConfirmationButton":1597,"./humap-map_frontend/components/Shared/ConfirmationButton.js":1597,"./humap-map_frontend/components/Shared/ContentOptions":1464,"./humap-map_frontend/components/Shared/ContentOptions.js":1464,"./humap-map_frontend/components/Shared/ContentOptions.module":1351,"./humap-map_frontend/components/Shared/ContentOptions.module.scss":1351,"./humap-map_frontend/components/Shared/Counts":277,"./humap-map_frontend/components/Shared/Counts.js":277,"./humap-map_frontend/components/Shared/Counts.module":1022,"./humap-map_frontend/components/Shared/Counts.module.scss":1022,"./humap-map_frontend/components/Shared/Embed":1465,"./humap-map_frontend/components/Shared/Embed.module":1465,"./humap-map_frontend/components/Shared/Embed.module.scss":1465,"./humap-map_frontend/components/Shared/EmbedSettings":732,"./humap-map_frontend/components/Shared/EmbedSettings.js":732,"./humap-map_frontend/components/Shared/EmbedSettings.module":210,"./humap-map_frontend/components/Shared/EmbedSettings.module.scss":210,"./humap-map_frontend/components/Shared/ErrorMessage":202,"./humap-map_frontend/components/Shared/ErrorMessage.js":202,"./humap-map_frontend/components/Shared/FavouriteButton":397,"./humap-map_frontend/components/Shared/FavouriteButton.js":397,"./humap-map_frontend/components/Shared/FormFieldTaxonomyCheckboxes":774,"./humap-map_frontend/components/Shared/FormFieldTaxonomyCheckboxes.js":774,"./humap-map_frontend/components/Shared/FormFieldTaxonomyCheckboxes.module":459,"./humap-map_frontend/components/Shared/FormFieldTaxonomyCheckboxes.module.scss":459,"./humap-map_frontend/components/Shared/FormFieldTaxonomyDropdown":777,"./humap-map_frontend/components/Shared/FormFieldTaxonomyDropdown.js":777,"./humap-map_frontend/components/Shared/FormFieldTaxonomyDropdown.module":598,"./humap-map_frontend/components/Shared/FormFieldTaxonomyDropdown.module.scss":598,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNested":775,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNested.js":775,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNested.module":690,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNested.module.scss":690,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNestedItem":776,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNestedItem.js":776,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNestedItem.module":375,"./humap-map_frontend/components/Shared/FormFieldTaxonomyNestedItem.module.scss":375,"./humap-map_frontend/components/Shared/HumapFooter":730,"./humap-map_frontend/components/Shared/HumapFooter.js":730,"./humap-map_frontend/components/Shared/HumapFooter.module":1019,"./humap-map_frontend/components/Shared/HumapFooter.module.scss":1019,"./humap-map_frontend/components/Shared/Image":62,"./humap-map_frontend/components/Shared/Image.js":62,"./humap-map_frontend/components/Shared/LoadingSpinner":54,"./humap-map_frontend/components/Shared/LoadingSpinner.js":54,"./humap-map_frontend/components/Shared/LoadingSpinner.module":678,"./humap-map_frontend/components/Shared/LoadingSpinner.module.scss":678,"./humap-map_frontend/components/Shared/LocationBar":194,"./humap-map_frontend/components/Shared/LocationBar.js":194,"./humap-map_frontend/components/Shared/LocationBar.module":682,"./humap-map_frontend/components/Shared/LocationBar.module.scss":682,"./humap-map_frontend/components/Shared/MediaList":772,"./humap-map_frontend/components/Shared/MediaList.js":772,"./humap-map_frontend/components/Shared/MediaList.module":689,"./humap-map_frontend/components/Shared/MediaList.module.scss":689,"./humap-map_frontend/components/Shared/MediaTypeIcon":547,"./humap-map_frontend/components/Shared/MediaTypeIcon.js":547,"./humap-map_frontend/components/Shared/MediaTypeIcon.module":177,"./humap-map_frontend/components/Shared/MediaTypeIcon.module.scss":177,"./humap-map_frontend/components/Shared/ModalWrapper":279,"./humap-map_frontend/components/Shared/ModalWrapper.js":279,"./humap-map_frontend/components/Shared/ModalWrapper.module":1023,"./humap-map_frontend/components/Shared/ModalWrapper.module.scss":1023,"./humap-map_frontend/components/Shared/ParentBar":283,"./humap-map_frontend/components/Shared/ParentBar.js":283,"./humap-map_frontend/components/Shared/ParentBar.module":325,"./humap-map_frontend/components/Shared/ParentBar.module.scss":325,"./humap-map_frontend/components/Shared/PlaceholderImage":1345,"./humap-map_frontend/components/Shared/PlaceholderImage.js":1345,"./humap-map_frontend/components/Shared/SelectedTermList":780,"./humap-map_frontend/components/Shared/SelectedTermList.js":780,"./humap-map_frontend/components/Shared/SelectedTermList.module":1071,"./humap-map_frontend/components/Shared/SelectedTermList.module.scss":1071,"./humap-map_frontend/components/Shared/SelectedTermListItem":781,"./humap-map_frontend/components/Shared/SelectedTermListItem.js":781,"./humap-map_frontend/components/Shared/SelectedTermListItem.module":691,"./humap-map_frontend/components/Shared/SelectedTermListItem.module.scss":691,"./humap-map_frontend/components/Shared/ShareButtons":278,"./humap-map_frontend/components/Shared/ShareButtons.js":278,"./humap-map_frontend/components/Shared/ShareButtons.module":412,"./humap-map_frontend/components/Shared/ShareButtons.module.scss":412,"./humap-map_frontend/components/Shared/TermList":339,"./humap-map_frontend/components/Shared/TermList.js":339,"./humap-map_frontend/components/Shared/TermList.module":1028,"./humap-map_frontend/components/Shared/TermList.module.scss":1028,"./humap-map_frontend/components/Shared/TermListItem":734,"./humap-map_frontend/components/Shared/TermListItem.js":734,"./humap-map_frontend/components/Shared/TermListItem.module":1027,"./humap-map_frontend/components/Shared/TermListItem.module.scss":1027,"./humap-map_frontend/components/Shared/UserColophonAndLog":1072,"./humap-map_frontend/components/Shared/UserColophonAndLog.js":1072,"./humap-map_frontend/components/Shared/useTriggerFetchNextPage":307,"./humap-map_frontend/components/Shared/useTriggerFetchNextPage.js":307,"./humap-map_frontend/components/Templates/contentPage":1598,"./humap-map_frontend/components/Templates/contentPage.js":1598,"./humap-map_frontend/components/Templates/homePage":1599,"./humap-map_frontend/components/Templates/homePage.js":1599,"./humap-map_frontend/components/Timelines/Timeline":431,"./humap-map_frontend/components/Timelines/Timeline.js":431,"./humap-map_frontend/components/Timelines/Timeline.module":132,"./humap-map_frontend/components/Timelines/Timeline.module.scss":132,"./humap-map_frontend/components/Tray/CardItemsContainer":1049,"./humap-map_frontend/components/Tray/CardItemsContainer.js":1049,"./humap-map_frontend/components/Tray/Tray":782,"./humap-map_frontend/components/Tray/Tray.js":782,"./humap-map_frontend/components/Tray/Tray.module":460,"./humap-map_frontend/components/Tray/Tray.module.scss":460,"./humap-map_frontend/components/Tray/TrayArticle":127,"./humap-map_frontend/components/Tray/TrayArticle.js":127,"./humap-map_frontend/components/Tray/TrayArticle.module":1030,"./humap-map_frontend/components/Tray/TrayArticle.module.scss":1030,"./humap-map_frontend/components/Tray/TrayContent":63,"./humap-map_frontend/components/Tray/TrayContent.js":63,"./humap-map_frontend/components/Tray/TrayContent.module":1020,"./humap-map_frontend/components/Tray/TrayContent.module.scss":1020,"./humap-map_frontend/components/Tray/TrayHero":280,"./humap-map_frontend/components/Tray/TrayHero.js":280,"./humap-map_frontend/components/Tray/TrayHero.module":1029,"./humap-map_frontend/components/Tray/TrayHero.module.scss":1029,"./humap-map_frontend/components/Tray/TrayIntro":783,"./humap-map_frontend/components/Tray/TrayIntro.js":783,"./humap-map_frontend/components/Tray/TrayIntro.module":1073,"./humap-map_frontend/components/Tray/TrayIntro.module.scss":1073,"./humap-map_frontend/components/Tray/TrayOverview":215,"./humap-map_frontend/components/Tray/TrayOverview.js":215,"./humap-map_frontend/components/Tray/TrayOverview.module":600,"./humap-map_frontend/components/Tray/TrayOverview.module.scss":600,"./humap-map_frontend/components/Tray/TrayTitle":70,"./humap-map_frontend/components/Tray/TrayTitle.js":70,"./humap-map_frontend/components/Tray/TrayTitle.module":1021,"./humap-map_frontend/components/Tray/TrayTitle.module.scss":1021,"./humap-map_frontend/components/Tray/TrayTitleActions":472,"./humap-map_frontend/components/Tray/TrayTitleActions.js":472,"./humap-map_frontend/components/Tray/TrayTitleActions.module":1069,"./humap-map_frontend/components/Tray/TrayTitleActions.module.scss":1069,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectCollectionsList":784,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectCollectionsList.js":784,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectCollectionsList.module":692,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectCollectionsList.module.scss":692,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectsList":785,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectsList.js":785,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectsList.module":222,"./humap-map_frontend/components/UserGeneratedContent/ContributeProjectsList.module.scss":222,"./humap-map_frontend/components/UserGeneratedContent/ContributeView":786,"./humap-map_frontend/components/UserGeneratedContent/ContributeView.js":786,"./humap-map_frontend/components/UserGeneratedContent/ContributeView.module":1074,"./humap-map_frontend/components/UserGeneratedContent/ContributeView.module.scss":1074,"./humap-map_frontend/components/UserGeneratedContent/CurrentUserActions":789,"./humap-map_frontend/components/UserGeneratedContent/CurrentUserActions.js":789,"./humap-map_frontend/components/UserGeneratedContent/CurrentUserActions.module":1075,"./humap-map_frontend/components/UserGeneratedContent/CurrentUserActions.module.scss":1075,"./humap-map_frontend/components/UserGeneratedContent/FavouritesList":788,"./humap-map_frontend/components/UserGeneratedContent/FavouritesList.js":788,"./humap-map_frontend/components/UserGeneratedContent/FavouritesList.module":601,"./humap-map_frontend/components/UserGeneratedContent/FavouritesList.module.scss":601,"./humap-map_frontend/components/UserGeneratedContent/ProjectActions":790,"./humap-map_frontend/components/UserGeneratedContent/ProjectActions.js":790,"./humap-map_frontend/components/UserGeneratedContent/ProjectActions.module":693,"./humap-map_frontend/components/UserGeneratedContent/ProjectActions.module.scss":693,"./humap-map_frontend/components/UserGeneratedContent/ProjectMemberDirectory":791,"./humap-map_frontend/components/UserGeneratedContent/ProjectMemberDirectory.js":791,"./humap-map_frontend/components/UserGeneratedContent/ProjectMemberDirectory.module":1076,"./humap-map_frontend/components/UserGeneratedContent/ProjectMemberDirectory.module.scss":1076,"./humap-map_frontend/components/UserGeneratedContent/ProjectMembership":1077,"./humap-map_frontend/components/UserGeneratedContent/ProjectMembership.js":1077,"./humap-map_frontend/components/UserGeneratedContent/ProjectPreMemberActions":792,"./humap-map_frontend/components/UserGeneratedContent/ProjectPreMemberActions.js":792,"./humap-map_frontend/components/UserGeneratedContent/ProjectPreMemberActions.module":1078,"./humap-map_frontend/components/UserGeneratedContent/ProjectPreMemberActions.module.scss":1078,"./humap-map_frontend/components/UserGeneratedContent/ProjectView":793,"./humap-map_frontend/components/UserGeneratedContent/ProjectView.js":793,"./humap-map_frontend/components/UserGeneratedContent/ProjectView.module":602,"./humap-map_frontend/components/UserGeneratedContent/ProjectView.module.scss":602,"./humap-map_frontend/components/UserGeneratedContent/UserActionsList":787,"./humap-map_frontend/components/UserGeneratedContent/UserActionsList.js":787,"./humap-map_frontend/components/UserGeneratedContent/UserActionsList.module":328,"./humap-map_frontend/components/UserGeneratedContent/UserActionsList.module.scss":328,"./humap-map_frontend/components/UserGeneratedContent/UserCardItems":313,"./humap-map_frontend/components/UserGeneratedContent/UserCardItems.js":313,"./humap-map_frontend/components/UserGeneratedContent/UserProjects":794,"./humap-map_frontend/components/UserGeneratedContent/UserProjects.js":794,"./humap-map_frontend/components/UserGeneratedContent/UserProjects.module":694,"./humap-map_frontend/components/UserGeneratedContent/UserProjects.module.scss":694,"./humap-map_frontend/components/UserGeneratedContent/UserTenantProfile":795,"./humap-map_frontend/components/UserGeneratedContent/UserTenantProfile.js":795,"./humap-map_frontend/components/UserGeneratedContent/UserTenantProfile.module":272,"./humap-map_frontend/components/UserGeneratedContent/UserTenantProfile.module.scss":272,"./humap-map_frontend/components/UserGeneratedContent/UserView":796,"./humap-map_frontend/components/UserGeneratedContent/UserView.js":796,"./humap-map_frontend/components/UserGeneratedContent/UserView.module":603,"./humap-map_frontend/components/UserGeneratedContent/UserView.module.scss":603,"./humap-map_frontend/helpers/ActionBarButtonHelper":557,"./humap-map_frontend/helpers/ActionBarButtonHelper.js":557,"./humap-map_frontend/helpers/ActivityLogHelper":560,"./humap-map_frontend/helpers/ActivityLogHelper.js":560,"./humap-map_frontend/helpers/BoothHelper":1067,"./humap-map_frontend/helpers/BoothHelper.js":1067,"./humap-map_frontend/helpers/FeaturesHelper":18,"./humap-map_frontend/helpers/FeaturesHelper.js":18,"./humap-map_frontend/helpers/GidHelper":367,"./humap-map_frontend/helpers/GidHelper.js":367,"./humap-map_frontend/helpers/OverlaysHelper":213,"./humap-map_frontend/helpers/OverlaysHelper.js":213,"./humap-map_frontend/helpers/PathsHelper":102,"./humap-map_frontend/helpers/PathsHelper.js":102,"./humap-map_frontend/helpers/TextHelper":686,"./humap-map_frontend/helpers/TextHelper.js":686,"./humap-map_frontend/helpers/TrackEventsHelper":337,"./humap-map_frontend/helpers/TrackEventsHelper.js":337,"./humap-map_frontend/hooks/QueryStringParams":1600,"./humap-map_frontend/hooks/QueryStringParams.js":1600,"./humap-map_frontend/hooks/UseAssociatedOverlayGroup":558,"./humap-map_frontend/hooks/UseAssociatedOverlayGroup.js":558,"./humap-map_frontend/hooks/UseMapZooming":1017,"./humap-map_frontend/hooks/UseMapZooming.js":1017,"./humap-map_frontend/hooks/UseParentContext":77,"./humap-map_frontend/hooks/UseParentContext.js":77,"./humap-map_frontend/hooks/useDebouncedEffect":1032,"./humap-map_frontend/hooks/useDebouncedEffect.js":1032,"./humap-map_frontend/models/AudioEmbedModel":994,"./humap-map_frontend/models/AudioEmbedModel.js":994,"./humap-map_frontend/models/BasemapsCollection":675,"./humap-map_frontend/models/BasemapsCollection.js":675,"./humap-map_frontend/models/CardItemImage":1001,"./humap-map_frontend/models/CardItemImage.js":1001,"./humap-map_frontend/models/CardItemResult":306,"./humap-map_frontend/models/CardItemResult.js":306,"./humap-map_frontend/models/CardItemsCollection":554,"./humap-map_frontend/models/CardItemsCollection.js":554,"./humap-map_frontend/models/CardItemsFilter":1006,"./humap-map_frontend/models/CardItemsFilter.js":1006,"./humap-map_frontend/models/CollectionModel":999,"./humap-map_frontend/models/CollectionModel.js":999,"./humap-map_frontend/models/ContentTypesCollection":1010,"./humap-map_frontend/models/ContentTypesCollection.js":1010,"./humap-map_frontend/models/CtaBlockModel":552,"./humap-map_frontend/models/CtaBlockModel.js":552,"./humap-map_frontend/models/HistoryItemModel":676,"./humap-map_frontend/models/HistoryItemModel.js":676,"./humap-map_frontend/models/IiifEmbedModel":995,"./humap-map_frontend/models/IiifEmbedModel.js":995,"./humap-map_frontend/models/ImageModel":114,"./humap-map_frontend/models/ImageModel.js":114,"./humap-map_frontend/models/LinkModel":998,"./humap-map_frontend/models/LinkModel.js":998,"./humap-map_frontend/models/LoadingStateModel":139,"./humap-map_frontend/models/LoadingStateModel.js":139,"./humap-map_frontend/models/LocationModel":204,"./humap-map_frontend/models/LocationModel.js":204,"./humap-map_frontend/models/MapStoreModel":992,"./humap-map_frontend/models/MapStoreModel.js":992,"./humap-map_frontend/models/OverlayGroupStore":555,"./humap-map_frontend/models/OverlayGroupStore.js":555,"./humap-map_frontend/models/PageableQueryModel":153,"./humap-map_frontend/models/PageableQueryModel.js":153,"./humap-map_frontend/models/ParentContext":1014,"./humap-map_frontend/models/ParentContext.js":1014,"./humap-map_frontend/models/ParentContextEntryModel":446,"./humap-map_frontend/models/ParentContextEntryModel.js":446,"./humap-map_frontend/models/PointLayerModel":1013,"./humap-map_frontend/models/PointLayerModel.js":1013,"./humap-map_frontend/models/PointsStack":1012,"./humap-map_frontend/models/PointsStack.js":1012,"./humap-map_frontend/models/PolygonModel":1e3,"./humap-map_frontend/models/PolygonModel.js":1e3,"./humap-map_frontend/models/ProjectModel":553,"./humap-map_frontend/models/ProjectModel.js":553,"./humap-map_frontend/models/QuickStartModel":664,"./humap-map_frontend/models/QuickStartModel.js":664,"./humap-map_frontend/models/QuickStartsCollection":1601,"./humap-map_frontend/models/QuickStartsCollection.js":1601,"./humap-map_frontend/models/RecordModel":532,"./humap-map_frontend/models/RecordModel.js":532,"./humap-map_frontend/models/RootStore":17,"./humap-map_frontend/models/RootStore.js":17,"./humap-map_frontend/models/SearchResultsCollection":1005,"./humap-map_frontend/models/SearchResultsCollection.js":1005,"./humap-map_frontend/models/SiteMetaModel":673,"./humap-map_frontend/models/SiteMetaModel.js":673,"./humap-map_frontend/models/SketchfabEmbedModel":996,"./humap-map_frontend/models/SketchfabEmbedModel.js":996,"./humap-map_frontend/models/StreetViewOverlayModel":997,"./humap-map_frontend/models/StreetViewOverlayModel.js":997,"./humap-map_frontend/models/TaxonomiesCollection":1007,"./humap-map_frontend/models/TaxonomiesCollection.js":1007,"./humap-map_frontend/models/TaxonomyModel":551,"./humap-map_frontend/models/TaxonomyModel.js":551,"./humap-map_frontend/models/TaxonomyTermModel":305,"./humap-map_frontend/models/TaxonomyTermModel.js":305,"./humap-map_frontend/models/TrayViewModel":672,"./humap-map_frontend/models/TrayViewModel.js":672,"./humap-map_frontend/models/UISettingsModel":1002,"./humap-map_frontend/models/UISettingsModel.js":1002,"./humap-map_frontend/models/UserModel":445,"./humap-map_frontend/models/UserModel.js":445,"./humap-map_frontend/models/UserProfileModel":1004,"./humap-map_frontend/models/UserProfileModel.js":1004,"./humap-map_frontend/models/UserProjectMembershipModel":1003,"./humap-map_frontend/models/UserProjectMembershipModel.js":1003,"./humap-map_frontend/models/VideoEmbedModel":993,"./humap-map_frontend/models/VideoEmbedModel.js":993,"./humap-map_frontend/models/hydration/url":248,"./humap-map_frontend/models/hydration/url.js":248,"./humap-map_frontend/models/overlays/OverlayGroupModel":674,"./humap-map_frontend/models/overlays/OverlayGroupModel.js":674,"./humap-map_frontend/models/overlays/OverlayModel":1009,"./humap-map_frontend/models/overlays/OverlayModel.js":1009,"./humap-map_frontend/models/types/functionType":1205,"./humap-map_frontend/models/types/functionType.js":1205,"./humap-map_frontend/pages/404":1602,"./humap-map_frontend/pages/404.js":1602,"./humap-map_frontend/pages/map":990,"./humap-map_frontend/pages/map/":990,"./humap-map_frontend/pages/map/MapPointsRoutes":652,"./humap-map_frontend/pages/map/MapPointsRoutes/":652,"./humap-map_frontend/pages/map/MapPointsRoutes/ClusteredPoints":377,"./humap-map_frontend/pages/map/MapPointsRoutes/ClusteredPoints.js":377,"./humap-map_frontend/pages/map/MapPointsRoutes/ItemPoints":160,"./humap-map_frontend/pages/map/MapPointsRoutes/ItemPoints.js":160,"./humap-map_frontend/pages/map/MapPointsRoutes/SearchResultsPoints":1080,"./humap-map_frontend/pages/map/MapPointsRoutes/SearchResultsPoints.js":1080,"./humap-map_frontend/pages/map/MapPointsRoutes/UserPoints":604,"./humap-map_frontend/pages/map/MapPointsRoutes/UserPoints.js":604,"./humap-map_frontend/pages/map/MapPointsRoutes/index":652,"./humap-map_frontend/pages/map/MapPointsRoutes/index.js":652,"./humap-map_frontend/pages/map/MapPointsRoutes/useDynamicTilePoints":399,"./humap-map_frontend/pages/map/MapPointsRoutes/useDynamicTilePoints.js":399,"./humap-map_frontend/pages/map/MapPointsRoutes/usePregeneratedTilePoints":1079,"./humap-map_frontend/pages/map/MapPointsRoutes/usePregeneratedTilePoints.js":1079,"./humap-map_frontend/pages/map/index":990,"./humap-map_frontend/pages/map/index.js":990,"./humap-map_frontend/queries/BasemapQueries":1311,"./humap-map_frontend/queries/BasemapQueries.js":1311,"./humap-map_frontend/queries/CardItemQueries":1011,"./humap-map_frontend/queries/CardItemQueries.js":1011,"./humap-map_frontend/queries/CollectionQueries":171,"./humap-map_frontend/queries/CollectionQueries.js":171,"./humap-map_frontend/queries/CustomPlaceLookupQueries":1044,"./humap-map_frontend/queries/CustomPlaceLookupQueries.js":1044,"./humap-map_frontend/queries/EmbedQueries":610,"./humap-map_frontend/queries/EmbedQueries.js":610,"./humap-map_frontend/queries/EventQueries":559,"./humap-map_frontend/queries/EventQueries.js":559,"./humap-map_frontend/queries/FavouriteQueries":404,"./humap-map_frontend/queries/FavouriteQueries.js":404,"./humap-map_frontend/queries/ImgixClient":447,"./humap-map_frontend/queries/ImgixClient.js":447,"./humap-map_frontend/queries/OverlayQueries":589,"./humap-map_frontend/queries/OverlayQueries.js":589,"./humap-map_frontend/queries/PointDataQueries":453,"./humap-map_frontend/queries/PointDataQueries.js":453,"./humap-map_frontend/queries/ProjectQueries":402,"./humap-map_frontend/queries/ProjectQueries.js":402,"./humap-map_frontend/queries/QuickStartQueries":1352,"./humap-map_frontend/queries/QuickStartQueries.js":1352,"./humap-map_frontend/queries/RecordQueries":154,"./humap-map_frontend/queries/RecordQueries.js":154,"./humap-map_frontend/queries/SearchQueries":671,"./humap-map_frontend/queries/SearchQueries.js":671,"./humap-map_frontend/queries/SiteMetaQueries":665,"./humap-map_frontend/queries/SiteMetaQueries.js":665,"./humap-map_frontend/queries/TaxonomyQueries":1008,"./humap-map_frontend/queries/TaxonomyQueries.js":1008,"./humap-map_frontend/queries/TrayViewQueries":677,"./humap-map_frontend/queries/TrayViewQueries.js":677,"./humap-map_frontend/queries/UserQueries":174,"./humap-map_frontend/queries/UserQueries.js":174,"./humap-map_frontend/queries/client":21,"./humap-map_frontend/queries/client.js":21,"./pagemaker/assets/styles/font-face":1603,"./pagemaker/assets/styles/font-face.scss":1603,"./pagemaker/assets/styles/library/hamburgers":1604,"./pagemaker/assets/styles/library/hamburgers.scss":1604,"./pagemaker/assets/styles/members":1605,"./pagemaker/assets/styles/members.scss":1605,"./pagemaker/assets/styles/mixins/custom":1606,"./pagemaker/assets/styles/mixins/custom.scss":1606,"./pagemaker/assets/styles/mixins/forms":1607,"./pagemaker/assets/styles/mixins/forms.scss":1607,"./pagemaker/assets/styles/mixins/media-queries":1608,"./pagemaker/assets/styles/mixins/media-queries.scss":1608,"./pagemaker/assets/styles/mixins/misc":1609,"./pagemaker/assets/styles/mixins/misc.scss":1609,"./pagemaker/assets/styles/mixins/mixins":1610,"./pagemaker/assets/styles/mixins/mixins.scss":1610,"./pagemaker/assets/styles/modules/m-actions":1611,"./pagemaker/assets/styles/modules/m-actions.scss":1611,"./pagemaker/assets/styles/modules/m-article":1612,"./pagemaker/assets/styles/modules/m-article.scss":1612,"./pagemaker/assets/styles/modules/m-cta":1613,"./pagemaker/assets/styles/modules/m-cta.scss":1613,"./pagemaker/assets/styles/modules/m-footer":1614,"./pagemaker/assets/styles/modules/m-footer.scss":1614,"./pagemaker/assets/styles/modules/m-hamburger":1615,"./pagemaker/assets/styles/modules/m-hamburger.scss":1615,"./pagemaker/assets/styles/modules/m-logo":1616,"./pagemaker/assets/styles/modules/m-logo.scss":1616,"./pagemaker/assets/styles/modules/m-sidebar":1617,"./pagemaker/assets/styles/modules/m-sidebar.scss":1617,"./pagemaker/assets/styles/modules/m-site-header":1618,"./pagemaker/assets/styles/modules/m-site-header.scss":1618,"./pagemaker/assets/styles/modules/m-site-wrapper":1619,"./pagemaker/assets/styles/modules/m-site-wrapper.scss":1619,"./pagemaker/assets/styles/modules/m-sponsors":1620,"./pagemaker/assets/styles/modules/m-sponsors.scss":1620,"./pagemaker/assets/styles/normalize":1621,"./pagemaker/assets/styles/normalize.scss":1621,"./pagemaker/assets/styles/pagemaker_site_header_for_map_bits":1338,"./pagemaker/assets/styles/pagemaker_site_header_for_map_bits.scss":1338,"./pagemaker/assets/styles/variables":1622,"./pagemaker/assets/styles/variables.scss":1622,"./pagemaker/controllers/readme":1623,"./pagemaker/controllers/readme.js":1623,"./pagemaker/shared/reveals":729,"./pagemaker/shared/reveals.js":729,"./placemaker":991,"./placemaker/":991,"./placemaker/Layout":797,"./placemaker/Layout.js":797,"./placemaker/Layout.module":1081,"./placemaker/Layout.module.scss":1081,"./placemaker/SendMessageToParent":810,"./placemaker/SendMessageToParent.js":810,"./placemaker/assets/images/logo-humap-map-blue":1092,"./placemaker/assets/images/logo-humap-map-blue.svg":1092,"./placemaker/assets/images/logo-humap-white":1625,"./placemaker/assets/images/logo-humap-white.svg":1625,"./placemaker/assets/styles/base":1626,"./placemaker/assets/styles/base.scss":1626,"./placemaker/assets/styles/library/hamburgers":1627,"./placemaker/assets/styles/library/hamburgers.scss":1627,"./placemaker/assets/styles/normalise":1628,"./placemaker/assets/styles/normalise.scss":1628,"./placemaker/assets/styles/theme/base":1629,"./placemaker/assets/styles/theme/base.scss":1629,"./placemaker/assets/styles/theme/mixins":1630,"./placemaker/assets/styles/theme/mixins.scss":1630,"./placemaker/assets/styles/theme/variables":1631,"./placemaker/assets/styles/theme/variables.scss":1631,"./placemaker/components/AllFeatures/AllFeatures":822,"./placemaker/components/AllFeatures/AllFeatures.js":822,"./placemaker/components/AllFeatures/AllFeatures.module":1128,"./placemaker/components/AllFeatures/AllFeatures.module.scss":1128,"./placemaker/components/DeckLayers/DeckLayerCloseLinePoints":1281,"./placemaker/components/DeckLayers/DeckLayerCloseLinePoints.js":1281,"./placemaker/components/DeckLayers/DeckLayerCurrentGridSquare":1094,"./placemaker/components/DeckLayers/DeckLayerCurrentGridSquare.js":1094,"./placemaker/components/DeckLayers/DeckLayerDrawingNewFeature":1099,"./placemaker/components/DeckLayers/DeckLayerDrawingNewFeature.js":1099,"./placemaker/components/DeckLayers/DeckLayerDrawingNewFeatureProtoPolygon":1100,"./placemaker/components/DeckLayers/DeckLayerDrawingNewFeatureProtoPolygon.js":1100,"./placemaker/components/DeckLayers/DeckLayerDrawingNewFeatureTerminators":1108,"./placemaker/components/DeckLayers/DeckLayerDrawingNewFeatureTerminators.js":1108,"./placemaker/components/DeckLayers/DeckLayerEditableGrid":1104,"./placemaker/components/DeckLayers/DeckLayerEditableGrid.js":1104,"./placemaker/components/DeckLayers/DeckLayerFeatures":1101,"./placemaker/components/DeckLayers/DeckLayerFeatures.js":1101,"./placemaker/components/DeckLayers/DeckLayerMeasure":1103,"./placemaker/components/DeckLayers/DeckLayerMeasure.js":1103,"./placemaker/components/DeckLayers/DeckLayerMetadataWarningIcons":1109,"./placemaker/components/DeckLayers/DeckLayerMetadataWarningIcons.js":1109,"./placemaker/components/DeckLayers/DeckLayerNearbyFeatures":1098,"./placemaker/components/DeckLayers/DeckLayerNearbyFeatures.js":1098,"./placemaker/components/DeckLayers/DeckLayerPickableGrid":1095,"./placemaker/components/DeckLayers/DeckLayerPickableGrid.js":1095,"./placemaker/components/DeckLayers/DeckLayerPickableGridBookmarks":1106,"./placemaker/components/DeckLayers/DeckLayerPickableGridBookmarks.js":1106,"./placemaker/components/DeckLayers/DeckLayerPickableGridHighlights":1107,"./placemaker/components/DeckLayers/DeckLayerPickableGridHighlights.js":1107,"./placemaker/components/DeckLayers/DeckLayerSelectedFeatures":1096,"./placemaker/components/DeckLayers/DeckLayerSelectedFeatures.js":1096,"./placemaker/components/DeckLayers/DeckLayerSubtleGrid":1102,"./placemaker/components/DeckLayers/DeckLayerSubtleGrid.js":1102,"./placemaker/components/DeckLayers/DeckLayerUpdateRecencyGrid":1105,"./placemaker/components/DeckLayers/DeckLayerUpdateRecencyGrid.js":1105,"./placemaker/components/EditGrid/EditGrid":823,"./placemaker/components/EditGrid/EditGrid.js":823,"./placemaker/components/EditGrid/EditGrid.module":1129,"./placemaker/components/EditGrid/EditGrid.module.scss":1129,"./placemaker/components/FeatureLayers/FeatureLayer":1124,"./placemaker/components/FeatureLayers/FeatureLayer.js":1124,"./placemaker/components/FeatureLayers/FeatureLayersContainer":334,"./placemaker/components/FeatureLayers/FeatureLayersContainer.js":334,"./placemaker/components/FeatureLayers/FeatureLayersContainer.module":1125,"./placemaker/components/FeatureLayers/FeatureLayersContainer.module.scss":1125,"./placemaker/components/FeaturePopovers/FeatureAnnotationData":340,"./placemaker/components/FeaturePopovers/FeatureAnnotationData.js":340,"./placemaker/components/FeaturePopovers/FeatureAnnotationData.module":1110,"./placemaker/components/FeaturePopovers/FeatureAnnotationData.module.scss":1110,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataForm":807,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataForm.js":807,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataForm.module":1112,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataForm.module.scss":1112,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataFormRow":808,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataFormRow.js":808,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataFormRow.module":462,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataFormRow.module.scss":462,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataRow":806,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataRow.js":806,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataRow.module":700,"./placemaker/components/FeaturePopovers/FeatureAnnotationDataRow.module.scss":700,"./placemaker/components/FeaturePopovers/FeatureMetadata":623,"./placemaker/components/FeaturePopovers/FeatureMetadata.js":623,"./placemaker/components/FeaturePopovers/FeatureMetadata.module":1114,"./placemaker/components/FeaturePopovers/FeatureMetadata.module.scss":1114,"./placemaker/components/FeaturePopovers/FeatureMetadataRow":624,"./placemaker/components/FeaturePopovers/FeatureMetadataRow.js":624,"./placemaker/components/FeaturePopovers/FeatureMetadataRow.module":1113,"./placemaker/components/FeaturePopovers/FeatureMetadataRow.module.scss":1113,"./placemaker/components/FeaturePopovers/FeaturePopover":805,"./placemaker/components/FeaturePopovers/FeaturePopover.js":805,"./placemaker/components/FeaturePopovers/FeaturePopover.module":1115,"./placemaker/components/FeaturePopovers/FeaturePopover.module.scss":1115,"./placemaker/components/FeaturePopovers/FeaturePopoverContainer":626,"./placemaker/components/FeaturePopovers/FeaturePopoverContainer.js":626,"./placemaker/components/FeaturePopovers/FeaturePopoverContainer.module":1116,"./placemaker/components/FeaturePopovers/FeaturePopoverContainer.module.scss":1116,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/HTMLInputField":1111,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/HTMLInputField.js":1111,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/ListPicker":809,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/ListPicker.js":809,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/ListPicker.module":379,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/ListPicker.module.scss":379,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/ReferenceLayersField":1632,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/ReferenceLayersField.js":1632,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/TaxonomyTermsField":1633,"./placemaker/components/FeaturePopovers/FeaturePopoverFormRows/TaxonomyTermsField.js":1633,"./placemaker/components/FeaturePopovers/FeatureSharePanel":625,"./placemaker/components/FeaturePopovers/FeatureSharePanel.js":625,"./placemaker/components/FeaturePopovers/FeatureSharePanel.module":380,"./placemaker/components/FeaturePopovers/FeatureSharePanel.module.scss":380,"./placemaker/components/FeaturePopovers/FeatureUsers":811,"./placemaker/components/FeaturePopovers/FeatureUsers.js":811,"./placemaker/components/FeaturePopovers/FeatureUsers.module":606,"./placemaker/components/FeaturePopovers/FeatureUsers.module.scss":606,"./placemaker/components/Global/GrommetTheme":798,"./placemaker/components/Global/GrommetTheme.js":798,"./placemaker/components/Global/GrommetTheme.module":695,"./placemaker/components/Global/GrommetTheme.module.scss":695,"./placemaker/components/Global/Placemaker":803,"./placemaker/components/Global/Placemaker.js":803,"./placemaker/components/Global/Placemaker.module":463,"./placemaker/components/Global/Placemaker.module.scss":463,"./placemaker/components/Global/PlacemakerPopup":698,"./placemaker/components/Global/PlacemakerPopup.js":698,"./placemaker/components/Global/Snapping":1097,"./placemaker/components/Global/Snapping.js":1097,"./placemaker/components/Global/SnappingWhenCreating":461,"./placemaker/components/Global/SnappingWhenCreating.js":461,"./placemaker/components/Grid/AnnotationConflict":817,"./placemaker/components/Grid/AnnotationConflict.js":817,"./placemaker/components/Grid/AnnotationConflict.module":464,"./placemaker/components/Grid/AnnotationConflict.module.scss":464,"./placemaker/components/Grid/ChangeSquareStateDialog":819,"./placemaker/components/Grid/ChangeSquareStateDialog.js":819,"./placemaker/components/Grid/ChangeSquareStateDialog.module":465,"./placemaker/components/Grid/ChangeSquareStateDialog.module.scss":465,"./placemaker/components/Grid/ContributorsPanel":821,"./placemaker/components/Grid/ContributorsPanel.js":821,"./placemaker/components/Grid/ContributorsPanel.module":1126,"./placemaker/components/Grid/ContributorsPanel.module.scss":1126,"./placemaker/components/Grid/GridSquare":812,"./placemaker/components/Grid/GridSquare.js":812,"./placemaker/components/Grid/GridSquare.module":1127,"./placemaker/components/Grid/GridSquare.module.scss":1127,"./placemaker/components/Grid/InfoPanel":818,"./placemaker/components/Grid/InfoPanel.js":818,"./placemaker/components/Grid/InfoPanel.module":607,"./placemaker/components/Grid/InfoPanel.module.scss":607,"./placemaker/components/Grid/TitlePanel":820,"./placemaker/components/Grid/TitlePanel.js":820,"./placemaker/components/Grid/TitlePanel.module":329,"./placemaker/components/Grid/TitlePanel.module.scss":329,"./placemaker/components/Home/GridLegend":801,"./placemaker/components/Home/GridLegend.js":801,"./placemaker/components/Home/GridLegend.module":1089,"./placemaker/components/Home/GridLegend.module.scss":1089,"./placemaker/components/Home/Home":799,"./placemaker/components/Home/Home.js":799,"./placemaker/components/Home/Home.module":697,"./placemaker/components/Home/Home.module.scss":697,"./placemaker/components/Layers/ReferenceLayer":622,"./placemaker/components/Layers/ReferenceLayer.js":622,"./placemaker/components/Layers/ReferenceLayer.module":320,"./placemaker/components/Layers/ReferenceLayer.module.scss":320,"./placemaker/components/Layers/ReferenceLayerRow":1123,"./placemaker/components/Layers/ReferenceLayerRow.js":1123,"./placemaker/components/Layers/ReferenceLayersContainer":333,"./placemaker/components/Layers/ReferenceLayersContainer.js":333,"./placemaker/components/Layers/ReferenceLayersContainer.module":702,"./placemaker/components/Layers/ReferenceLayersContainer.module.scss":702,"./placemaker/components/SearchByUser/SearchByUser":627,"./placemaker/components/SearchByUser/SearchByUser.js":627,"./placemaker/components/SearchByUser/SearchByUser.module":1130,"./placemaker/components/SearchByUser/SearchByUser.module.scss":1130,"./placemaker/components/Shared/BaseNavigation":227,"./placemaker/components/Shared/BaseNavigation.js":227,"./placemaker/components/Shared/BaseNavigation.module":605,"./placemaker/components/Shared/BaseNavigation.module.scss":605,"./placemaker/components/Shared/BookmarksList":802,"./placemaker/components/Shared/BookmarksList.js":802,"./placemaker/components/Shared/BookmarksList.module":1090,"./placemaker/components/Shared/BookmarksList.module.scss":1090,"./placemaker/components/Shared/CursorPositionTracker":1117,"./placemaker/components/Shared/CursorPositionTracker.js":1117,"./placemaker/components/Shared/LoadingSpinner":384,"./placemaker/components/Shared/LoadingSpinner.js":384,"./placemaker/components/Shared/LoadingSpinner.module":699,"./placemaker/components/Shared/LoadingSpinner.module.scss":699,"./placemaker/components/Shared/MobileMessage":804,"./placemaker/components/Shared/MobileMessage.js":804,"./placemaker/components/Shared/MobileMessage.module":1091,"./placemaker/components/Shared/MobileMessage.module.scss":1091,"./placemaker/components/Shared/Search":800,"./placemaker/components/Shared/Search.js":800,"./placemaker/components/Shared/Search.module":577,"./placemaker/components/Shared/Search.module.scss":577,"./placemaker/components/Shared/SearchUsers":653,"./placemaker/components/Shared/SearchUsers.js":653,"./placemaker/components/Shared/Sidebar":195,"./placemaker/components/Shared/Sidebar.js":195,"./placemaker/components/Shared/Sidebar.module":417,"./placemaker/components/Shared/Sidebar.module.scss":417,"./placemaker/components/Shared/SidebarTextContent":253,"./placemaker/components/Shared/SidebarTextContent.js":253,"./placemaker/components/Shared/SidebarTextContent.module":1088,"./placemaker/components/Shared/SidebarTextContent.module.scss":1088,"./placemaker/components/Shared/featureColors":69,"./placemaker/components/Shared/featureColors.js":69,"./placemaker/components/Shared/gridColors":83,"./placemaker/components/Shared/gridColors.js":83,"./placemaker/components/Tools/CombineButton":1121,"./placemaker/components/Tools/CombineButton.js":1121,"./placemaker/components/Tools/CutAwayButton":1122,"./placemaker/components/Tools/CutAwayButton.js":1122,"./placemaker/components/Tools/DeleteButton":1120,"./placemaker/components/Tools/DeleteButton.js":1120,"./placemaker/components/Tools/Toolbar":341,"./placemaker/components/Tools/Toolbar.js":341,"./placemaker/components/Tools/Toolbar.module":701,"./placemaker/components/Tools/Toolbar.module.scss":701,"./placemaker/components/Tools/ToolbarActions":816,"./placemaker/components/Tools/ToolbarActions.js":816,"./placemaker/components/Tools/ToolbarActions.module":1119,"./placemaker/components/Tools/ToolbarActions.module.scss":1119,"./placemaker/components/Tools/ToolbarButton":814,"./placemaker/components/Tools/ToolbarButton.js":814,"./placemaker/components/Tools/ToolbarButton.module":116,"./placemaker/components/Tools/ToolbarButton.module.scss":116,"./placemaker/components/Tools/ToolbarButtonGroup":813,"./placemaker/components/Tools/ToolbarButtonGroup.js":813,"./placemaker/components/Tools/ToolbarButtonGroup.module":1118,"./placemaker/components/Tools/ToolbarButtonGroup.module.scss":1118,"./placemaker/components/Tools/ToolbarButtonToggle":815,"./placemaker/components/Tools/ToolbarButtonToggle.js":815,"./placemaker/components/Tools/ToolbarButtonToggle.module":1634,"./placemaker/components/Tools/ToolbarButtonToggle.module.scss":1634,"./placemaker/components/UpdateRecency/UpdateRecency":824,"./placemaker/components/UpdateRecency/UpdateRecency.js":824,"./placemaker/components/UpdateRecency/UpdateRecency.module":1131,"./placemaker/components/UpdateRecency/UpdateRecency.module.scss":1131,"./placemaker/helpers":270,"./placemaker/helpers.js":270,"./placemaker/index":991,"./placemaker/index.js":991,"./placemaker/models/DrawingModeModel":1087,"./placemaker/models/DrawingModeModel.js":1087,"./placemaker/models/FeatureLayerModel":696,"./placemaker/models/FeatureLayerModel.js":696,"./placemaker/models/FeatureModel":378,"./placemaker/models/FeatureModel.js":378,"./placemaker/models/GridModel":1086,"./placemaker/models/GridModel.js":1086,"./placemaker/models/GridSquareModel":575,"./placemaker/models/GridSquareModel.js":575,"./placemaker/models/PlaceModel":1083,"./placemaker/models/PlaceModel.js":1083,"./placemaker/models/ReferenceLayerModel":1085,"./placemaker/models/ReferenceLayerModel.js":1085,"./placemaker/models/RootStore":43,"./placemaker/models/RootStore.js":43,"./placemaker/models/ViewportModel":1082,"./placemaker/models/ViewportModel.js":1082,"./placemaker/queries/FeatureLayerQueries":265,"./placemaker/queries/FeatureLayerQueries.js":265,"./placemaker/queries/FeatureMutations":220,"./placemaker/queries/FeatureMutations.js":220,"./placemaker/queries/LayerQueries":1635,"./placemaker/queries/LayerQueries.js":1635,"./placemaker/queries/SquareMutations":576,"./placemaker/queries/SquareMutations.js":576,"./placemaker/queries/WholeGridQueries":1093,"./placemaker/queries/WholeGridQueries.js":1093,"./placemaker/queries/client":147,"./placemaker/queries/client.js":147,"./placemaker/utils/turfPolygonReduce":1084,"./placemaker/utils/turfPolygonReduce.js":1084,"./shared/pin":470,"./shared/pin.js":470,"./wizards/AttachedVideo":1282,"./wizards/AttachedVideo.js":1282,"./wizards/LocationPickerMap":1290,"./wizards/LocationPickerMap.js":1290,"./wizards/Media":1291,"./wizards/Media.js":1291,"./wizards/OverlayCreator/ColorInput":534,"./wizards/OverlayCreator/ColorInput.js":534,"./wizards/OverlayCreator/ColorInput.module":654,"./wizards/OverlayCreator/ColorInput.module.scss":654,"./wizards/OverlayCreator/GetLayersForDeck":655,"./wizards/OverlayCreator/GetLayersForDeck.js":655,"./wizards/OverlayCreator/OverlayCreator":945,"./wizards/OverlayCreator/OverlayCreator.js":945,"./wizards/OverlayCreator/OverlayCreator.module":658,"./wizards/OverlayCreator/OverlayCreator.module.scss":658,"./wizards/OverlayCreator/OverlayCreatorAddLayerExisting":540,"./wizards/OverlayCreator/OverlayCreatorAddLayerExisting.js":540,"./wizards/OverlayCreator/OverlayCreatorAddLayerExisting.module":449,"./wizards/OverlayCreator/OverlayCreatorAddLayerExisting.module.scss":449,"./wizards/OverlayCreator/OverlayCreatorAddLayerPanel":537,"./wizards/OverlayCreator/OverlayCreatorAddLayerPanel.js":537,"./wizards/OverlayCreator/OverlayCreatorAddLayerPanel.module":249,"./wizards/OverlayCreator/OverlayCreatorAddLayerPanel.module.scss":249,"./wizards/OverlayCreator/OverlayCreatorAddLayerURL":539,"./wizards/OverlayCreator/OverlayCreatorAddLayerURL.js":539,"./wizards/OverlayCreator/OverlayCreatorAddLayerURL.module":448,"./wizards/OverlayCreator/OverlayCreatorAddLayerURL.module.scss":448,"./wizards/OverlayCreator/OverlayCreatorAddLayerUploader":538,"./wizards/OverlayCreator/OverlayCreatorAddLayerUploader.js":538,"./wizards/OverlayCreator/OverlayCreatorAddLayerUploader.module":581,"./wizards/OverlayCreator/OverlayCreatorAddLayerUploader.module.scss":581,"./wizards/OverlayCreator/OverlayCreatorCheckTilingErrorsPanel":542,"./wizards/OverlayCreator/OverlayCreatorCheckTilingErrorsPanel.js":542,"./wizards/OverlayCreator/OverlayCreatorCheckTilingErrorsPanel.module":321,"./wizards/OverlayCreator/OverlayCreatorCheckTilingErrorsPanel.module.scss":321,"./wizards/OverlayCreator/OverlayCreatorLayerManager":536,"./wizards/OverlayCreator/OverlayCreatorLayerManager.js":536,"./wizards/OverlayCreator/OverlayCreatorLayerManager.module":48,"./wizards/OverlayCreator/OverlayCreatorLayerManager.module.scss":48,"./wizards/OverlayCreator/OverlayCreatorMap":535,"./wizards/OverlayCreator/OverlayCreatorMap.js":535,"./wizards/OverlayCreator/OverlayCreatorMap.module":579,"./wizards/OverlayCreator/OverlayCreatorMap.module.scss":579,"./wizards/OverlayCreator/OverlayCreatorMessages":541,"./wizards/OverlayCreator/OverlayCreatorMessages.js":541,"./wizards/OverlayCreator/OverlayCreatorMessages.module":582,"./wizards/OverlayCreator/OverlayCreatorMessages.module.scss":582,"./wizards/OverlayCreator/OverlayCreatorPopover":657,"./wizards/OverlayCreator/OverlayCreatorPopover.js":657,"./wizards/OverlayCreator/ResizeRectangleMode":663,"./wizards/OverlayCreator/ResizeRectangleMode.js":663,"./wizards/OverlayCreator/store/LayerModel":371,"./wizards/OverlayCreator/store/LayerModel.js":371,"./wizards/OverlayCreator/store/OverlayCreatorStore":103,"./wizards/OverlayCreator/store/OverlayCreatorStore.js":103,"./wizards/OverlayCreator/store/OverlayGroupModel":578,"./wizards/OverlayCreator/store/OverlayGroupModel.js":578,"./wizards/RouteCreator/RouteCreator":962,"./wizards/RouteCreator/RouteCreator.js":962,"./wizards/RouteCreator/RouteCreator.module":660,"./wizards/RouteCreator/RouteCreator.module.scss":660,"./wizards/RouteCreator/RouteCreatorGuidance":544,"./wizards/RouteCreator/RouteCreatorGuidance.js":544,"./wizards/RouteCreator/RouteCreatorGuidance.module":409,"./wizards/RouteCreator/RouteCreatorGuidance.module.scss":409,"./wizards/RouteCreator/RouteCreatorMap":543,"./wizards/RouteCreator/RouteCreatorMap.js":543,"./wizards/RouteCreator/RouteCreatorMap.module":583,"./wizards/RouteCreator/RouteCreatorMap.module.scss":583,"./wizards/RouteCreator/store/RootStore":266,"./wizards/RouteCreator/store/RootStore.js":266,"./wizards/RouteCreator/store/Stop":659,"./wizards/RouteCreator/store/Stop.js":659,"./wizards/TrailCreator/TrailCreator":963,"./wizards/TrailCreator/TrailCreator.js":963,"./wizards/TrailCreator/TrailCreator.module":662,"./wizards/TrailCreator/TrailCreator.module.scss":662,"./wizards/TrailCreator/TrailCreatorGuidance":546,"./wizards/TrailCreator/TrailCreatorGuidance.js":546,"./wizards/TrailCreator/TrailCreatorGuidance.module":221,"./wizards/TrailCreator/TrailCreatorGuidance.module.scss":221,"./wizards/TrailCreator/TrailCreatorMap":545,"./wizards/TrailCreator/TrailCreatorMap.js":545,"./wizards/TrailCreator/TrailCreatorMap.module":584,"./wizards/TrailCreator/TrailCreatorMap.module.scss":584,"./wizards/TrailCreator/store/RootStore":267,"./wizards/TrailCreator/store/RootStore.js":267,"./wizards/TrailCreator/store/Stop":661,"./wizards/TrailCreator/store/Stop.js":661,"./wizards/shared/helpers":246,"./wizards/shared/helpers.js":246};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=1653},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),i=n.n(r).a.createContext(void 0)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),i=n.n(r),o=n(381),a=n(436);var s=function(t){var e=t.children,n=t.items,s=void 0===n?[]:n,u=t.onMore,l=t.renderMarker,c=t.replace,f=t.show,h=t.step,p=void 0===h?50:h,d=Object(r.useState)(f),m=d[0],g=d[1],y=Object(r.useMemo)((function(){return Math.floor(s.length/p)}),[s.length,p]),v=Object(r.useState)([0,m?Math.floor((m+p)/p)-1:0]),b=v[0],_=v[1],A=Object(r.useState)([]),w=A[0],x=A[1],E=Object(r.useState)(0),O=E[0],S=E[1],P=Object(r.useRef)(),C=Object(r.useRef)();Object(r.useEffect)((function(){var t,e,n=function(){if(t){var e,n,r=t[0];if(r===document)e=document.documentElement.scrollTop||document.body.scrollTop,n=window.innerHeight;else e=r.scrollTop,n=r.getBoundingClientRect().height;for(var i=n/4,o=0,a=0,s=w[a]||0;w[a+1]&&s<e-i;)o+=1,s+=w[a+=1];for(var u=o;void 0!==w[a]&&s<e+n+i;)u+=1,s+=w[a+=1]||0;if(c||(o=0,u=Math.max(b[1],u)),m){var l=Math.floor((m+p)/p)-1;o=Math.min(l,o),u=Math.max(l,u)}o===b[0]&&u===b[1]||_([o,u])}},r=function(){clearTimeout(e),e=setTimeout(n,10)};return C.current&&(t=Object(o.b)(C.current)).forEach((function(t){return t.addEventListener("scroll",r)})),window.addEventListener("resize",r),n(),function(){t&&t.forEach((function(t){return t.removeEventListener("scroll",r)})),window.removeEventListener("resize",r),clearTimeout(e)}}),[w,b,c,m,p]),Object(r.useEffect)((function(){u&&b[1]===y&&s.length>=O&&(S(s.length+1),u())}),[s.length,y,u,O,b,p]),Object(r.useLayoutEffect)((function(){var t=setTimeout((function(){if(m&&C.current){var t=m-b[0]*p+(b[0]?1:0),e=C.current.parentNode.children.item(t);if(e){var n=Object(o.a)(e);Object(o.g)(e,n)?e.scrollIntoView(!0):Object(o.f)(e,n)&&e.scrollIntoView(!1),g(void 0)}}}),100);return function(){return clearTimeout(t)}}),[b,m,p]),Object(r.useLayoutEffect)((function(){if(C.current){var t=C.current.parentNode.children;if((P.current?1:0)+(b[1]-b[0]+1)*p+1===t.length){for(var e,n,r=b[0];r<=b[1];){var i=(P.current?1:0)+(r-b[0])*p,o=Math.min(i+p-1,t.length-1),a=void 0!==n?n:t.item(i).getBoundingClientRect().top,s=t.item(o).getBoundingClientRect().bottom,u=s-a;!s||w&&w[r]===u||(e||(e=[].concat(w||[])),e[r]=u),n=s,r+=1}for(;c&&r<=y;){if(!w[r]&&w[r]!==w[0]){e||(e=[].concat(w||[]));var l=e;e[r]=l[0]}r+=1}e&&x(e)}}}),[y,w,b,c,p]);var T=Object(r.useMemo)((function(){if(!c)return 0;for(var t=0,e=0;e<b[0];)t+=w[e]||0,e+=1;return t}),[w,b,c]),k=Object(r.useMemo)((function(){if(!c)return 0;for(var t=0,e=b[1]+1;e<=y;)t+=w[e]||0,e+=1;return t}),[y,w,b,c]),I=b[0]*p,L=Math.min((b[1]+1)*p,s.length)-1,j=[];if(T){var M=i.a.createElement(a.a,{key:"above",ref:P,flex:!1,height:T+"px"});l&&(M=i.a.cloneElement(l(M),{key:"above"})),j.push(M)}if(s.slice(I,L+1).forEach((function(t,n){var r=e(t,I+n);j.push(r)})),c||b[1]<y||u){var R=i.a.createElement(a.a,{key:"below",ref:!l&&C||void 0,flex:!1,height:(k||0)+"px"});if(l){var N=l(R);R=i.a.cloneElement(N,{key:"below",ref:function(t){C.current=t;var e=N.ref;"function"===typeof e?e(t):null!==e&&(e.current=t)}})}j.push(R)}return j}},function(t,e,n){},function(t,e,n){},,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var r=n(0),i=n.n(r),o=n(128),a=n(4),s=n(32),u=n(381),l=n(681),c=n(1654),f=n(56),h=n(403),p=n(436),d=n(1592),m=n(1594);var g=Object(a.keyframes)(["0%{opacity:0.5;transform:scale(0.8);}100%{opacity:1;transform:scale(1);}"]),y=a.default.div.withConfig({displayName:"StyledDrop",componentId:"sc-16s5rx8-0"})([""," border-radius:",";position:fixed;z-index:",";outline:none;"," opacity:0;transform-origin:",";animation:"," 0.1s forwards;animation-delay:0.01s;@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){display:flex;align-items:stretch;}",""],m.a,(function(t){return t.theme.global.drop.border.radius}),(function(t){return t.theme.global.drop.zIndex}),(function(t){return!t.plain&&Object(h.d)(t.theme.global.drop.background,t.theme)}),(function(t){return function(t){var e="top";t.bottom&&(e="bottom");var n="left";return t.right&&(n="right"),e+" "+n}(t.alignProp)}),g,(function(t){return t.theme.global.drop&&t.theme.global.drop.extend}));function v(){return v=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},v.apply(this,arguments)}y.defaultProps={},Object.setPrototypeOf(y.defaultProps,s.a);var b=function(t){27===(t.keyCode?t.keyCode:t.which)&&t.stopPropagation()},_={top:"top",left:"left"},A=[],w=Object(r.forwardRef)((function(t,e){var n=t.align,o=void 0===n?_:n,m=t.onAlign,g=t.children,w=t.dropTarget,x=t.elevation,E=t.onClickOutside,O=t.onEsc,S=t.onKeyDown,P=t.overflow,C=void 0===P?"auto":P,T=t.plain,k=t.responsive,I=t.restrictFocus,L=t.stretch,j=void 0===L?"width":L,M=t.trapFocus,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,["align","onAlign","children","dropTarget","elevation","onClickOutside","onEsc","onKeyDown","overflow","plain","responsive","restrictFocus","stretch","trapFocus"]),N=Object(r.useContext)(a.ThemeContext)||s.a.theme,D=Object(r.useContext)(c.a)||A,F=Object(r.useMemo)((function(){return D.length}),[D]),B=Object(r.useMemo)((function(){return[].concat(D,[F])}),[D,F]),z=Object(r.useRef)();Object(r.useEffect)((function(){var t,n=function(t){var n,r=window.innerWidth,i=window.innerHeight,a=w,s=(e||z).current;if(s&&a){s.style.left="",s.style.top="",s.style.bottom="",s.style.width="",t||(s.style.maxHeight="");var u,l,c,h,p=a.getBoundingClientRect(),d=s.getBoundingClientRect();u=j?Math.min("align"===j?Math.min(p.width,d.width):Math.max(p.width,d.width),r):Math.min(d.width,r),o.left?"left"===o.left?l=p.left:"right"===o.left&&(l=p.left+p.width):o.right?"left"===o.right?l=p.left-u:"right"===o.right&&(l=p.left+p.width-u):l=p.left+p.width/2-u/2,l+u>r?l-=l+u-r:l<0&&(l=0);var g=d.height;if(o.top){c="top"===o.top?p.top:p.bottom;var y=100-p.bottom/i*100;i===c||y<=20?(c="",g=h="bottom"===o.top?p.top:p.bottom,s.style.maxHeight=g+"px"):c>0?(g=i-c,s.style.maxHeight=g+"px"):g=i-c}else o.bottom?(g=h="bottom"===o.bottom?p.bottom:p.top,s.style.maxHeight=g+"px"):g=i-(c=p.top+p.height/2-d.height/2);k&&(d.height>g||g<i/10)&&(o.top&&c>i/2?(c="",g=h="bottom"===o.top?p.top:p.bottom):o.bottom&&g<i/2&&(h="",g=i-(c="bottom"===o.bottom?p.top:p.bottom))),s.style.left=l+"px",j&&(s.style.width=u+.1+"px"),""!==c&&(s.style.top=c+"px"),""!==h&&(s.style.bottom=i-h+"px"),t||(N.drop&&N.drop.maxHeight&&(g=Math.min(g,Object(f.b)(N.drop.maxHeight))),s.style.maxHeight=g+"px")}m&&(n=""!==(e||z).current.style.top?"top":"bottom",m(n))},r=function(){(t=Object(u.b)(w)).forEach((function(t){return t.addEventListener("scroll",n)}))},i=function(){t.forEach((function(t){return t.removeEventListener("scroll",n)})),t=[]},a=function(t){for(var e=null,n=t.target;null===e&&n!==document;){var r=n.getAttribute("data-g-portal-id");null!==r&&(e=parseInt(r,10)),n=n.parentNode}null!==e&&-1===D.indexOf(e)||E(t)},s=function(){i(),r(),n(!1)};return r(),window.addEventListener("resize",s),E&&document.addEventListener("mousedown",a),n(!1),function(){i(),window.removeEventListener("resize",s),E&&document.removeEventListener("mousedown",a)}}),[o,m,w,E,D,F,e,k,I,j,N.drop]),Object(r.useEffect)((function(){I&&(e||z).current.focus()}),[e,I]);var U=i.a.createElement(y,v({ref:e||z,as:p.a,plain:T,elevation:T?void 0:x||N.global.drop.shadowSize||"small",tabIndex:"-1",alignProp:o,overflow:C,"data-g-portal-id":F},R),g);if(N.global.drop.background){var G=Object(h.c)(N.global.drop.background,N);void 0!==G&&G!==N.dark&&(U=i.a.createElement(a.ThemeContext.Provider,{value:v({},N,{dark:G})},U))}return i.a.createElement(c.a.Provider,{value:B},i.a.createElement(l.a,{onKeyDown:O&&b,trapFocus:M},i.a.createElement(d.a,{capture:!0,onEsc:O?function(t){t.stopPropagation(),O(t)}:void 0,onKeyDown:S,target:"document"},U)))})),x=n(1595);function E(){return E=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},E.apply(this,arguments)}var O=Object(r.forwardRef)((function(t,e){var n=t.restrictFocus,l=t.target,c=t.trapFocus,f=void 0===c||c,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,["restrictFocus","target","trapFocus"]),p=Object(r.useContext)(a.ThemeContext)||s.a.theme,d=Object(r.useState)(),m=d[0],g=d[1];Object(r.useEffect)((function(){return g(document.activeElement)}),[]);var y=Object(r.useState)(),v=y[0],b=y[1],_=Object(r.useContext)(x.a);return Object(r.useEffect)((function(){return b(Object(u.e)(_))}),[_]),Object(r.useEffect)((function(){return function(){n&&m&&(m.focus?Object(u.j)(m):m.parentNode&&m.parentNode.focus&&Object(u.j)(m.parentNode)),v&&_.removeChild(v)}}),[_,v,m,n]),v?Object(o.createPortal)(i.a.createElement(w,E({ref:e,dir:p&&p.dir,dropTarget:l,restrictFocus:n,trapFocus:f},h)),v):null}));O.displayName="Drop";var S=O},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(0),i=n.n(r),o=n(4),a=n(51),s=n(1594),u=n(32),l=Object(o.css)(["color:",";"],(function(t){return Object(a.c)(t.colorProp,t.theme)})),c=Object(o.css)(["font-weight:",";"],(function(t){return t.weight})),f=Object(o.css)(["word-break:",";"],(function(t){return t.wordBreak})),h=Object(o.css)(["font-family:",";"],(function(t){return t.theme.text.font.family})),p=Object(o.default)("span").withConfig({shouldForwardProp:function(t,e){return e(t)&&"size"!==t}}).withConfig({displayName:"StyledText",componentId:"sc-1sadyjn-0"})([""," "," "," "," "," "," "," "," ",""],s.g,(function(t){return function(t){var e=t.size||"medium",n=t.theme.text[e];return n?Object(o.css)(["font-size:",";line-height:",";"],n.size,n.height):Object(o.css)(["font-size:",";line-height:normal;"],e)}(t)}),(function(t){return t.textAlign&&s.n}),(function(t){return t.truncate&&"\n  white-space: nowrap;\n  max-width: 100%;\n  overflow: hidden;\n  text-overflow: ellipsis;\n"}),(function(t){return t.colorProp&&l}),(function(t){return t.weight&&c}),(function(t){return t.wordBreak&&f}),(function(t){return t.theme.text.font&&t.theme.text.font.family&&h}),(function(t){return t.theme.text&&t.theme.text.extend}));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},d.apply(this,arguments)}p.defaultProps={},Object.setPrototypeOf(p.defaultProps,u.a);var m=Object(r.forwardRef)((function(t,e){var n=t.color,r=t.tag,o=t.as,a=t.a11yTitle,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}(t,["color","tag","as","a11yTitle"]);return i.a.createElement(p,d({as:!o&&r?r:o,colorProp:n,"aria-label":a},s,{ref:e}))}));m.displayName="Text",m.defaultProps={level:1};var g=m}]);